diff --git a/cluster-autoscaler/cloudprovider/exoscale/internal/github.com/exoscale/egoscale/v2/oapi/oapi_mock.go b/cluster-autoscaler/cloudprovider/exoscale/internal/github.com/exoscale/egoscale/v2/oapi/oapi_mock.go index 3ea04f061a5b..71fa391d4314 100644 --- a/cluster-autoscaler/cloudprovider/exoscale/internal/github.com/exoscale/egoscale/v2/oapi/oapi_mock.go +++ b/cluster-autoscaler/cloudprovider/exoscale/internal/github.com/exoscale/egoscale/v2/oapi/oapi_mock.go @@ -1,3 +1,6 @@ +//go:build windows && !dockerless +// +build windows,!dockerless + /* Copyright 2021 The Kubernetes Authors. diff --git a/cluster-autoscaler/cloudprovider/exoscale/internal/github.com/exoscale/egoscale/v2/oapi/request.go b/cluster-autoscaler/cloudprovider/exoscale/internal/github.com/exoscale/egoscale/v2/oapi/request.go index a23bb5debd7c..42f63005caa8 100644 --- a/cluster-autoscaler/cloudprovider/exoscale/internal/github.com/exoscale/egoscale/v2/oapi/request.go +++ b/cluster-autoscaler/cloudprovider/exoscale/internal/github.com/exoscale/egoscale/v2/oapi/request.go @@ -1,3 +1,6 @@ +//go:build !dockerless +// +build !dockerless + /* Copyright 2021 The Kubernetes Authors. diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/common_response.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/common_response.go index 0c8698f88d42..803dcdae26df 100644 --- a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/common_response.go +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/common_response.go @@ -1,3 +1,6 @@ +//go:build !linux && !windows && !dockerless +// +build !linux,!windows,!dockerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/section.go b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/section.go index 2ebfc05c99a1..7de8ad15008e 100644 --- a/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/section.go +++ b/cluster-autoscaler/cloudprovider/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/section.go @@ -1,3 +1,6 @@ +//go:build !linux && !windows && !dockerless +// +build !linux,!windows,!dockerless + /* Copyright 2016 The Kubernetes Authors. diff --git a/cluster-autoscaler/go.mod b/cluster-autoscaler/go.mod index 6b5431ed05ef..ce38e4356601 100644 --- a/cluster-autoscaler/go.mod +++ b/cluster-autoscaler/go.mod @@ -25,26 +25,26 @@ require ( github.com/satori/go.uuid v1.2.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 - golang.org/x/crypto v0.0.0-20220214200702-86341886e292 - golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 + golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 + golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f google.golang.org/api v0.46.0 google.golang.org/grpc v1.40.0 google.golang.org/protobuf v1.27.1 gopkg.in/gcfg.v1 v1.2.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.24.0 - k8s.io/apimachinery v0.24.0 - k8s.io/apiserver v0.24.0 - k8s.io/client-go v0.24.0 - k8s.io/cloud-provider v0.24.0 - k8s.io/component-base v0.24.0 - k8s.io/component-helpers v0.24.0 - k8s.io/klog/v2 v2.60.1 - k8s.io/kubelet v0.23.0 - k8s.io/kubernetes v1.24.0 + k8s.io/api v0.23.0 + k8s.io/apimachinery v0.23.0 + k8s.io/apiserver v0.23.0 + k8s.io/client-go v0.23.0 + k8s.io/cloud-provider v0.23.0 + k8s.io/component-base v0.23.0 + k8s.io/component-helpers v0.23.0 + k8s.io/klog/v2 v2.30.0 + k8s.io/kubelet v0.0.0 + k8s.io/kubernetes v1.23.0 k8s.io/legacy-cloud-providers v0.0.0 - k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 - sigs.k8s.io/cloud-provider-azure v1.23.2 + k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b + sigs.k8s.io/cloud-provider-azure v1.1.3 ) replace github.com/aws/aws-sdk-go/service/eks => github.com/aws/aws-sdk-go/service/eks v1.38.49 @@ -53,56 +53,56 @@ replace github.com/digitalocean/godo => github.com/digitalocean/godo v1.27.0 replace github.com/rancher/go-rancher => github.com/rancher/go-rancher v0.1.0 -replace k8s.io/api => k8s.io/api v0.24.0 +replace k8s.io/api => k8s.io/api v0.23.0 -replace k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.24.0 +replace k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.23.0 -replace k8s.io/apimachinery => k8s.io/apimachinery v0.24.1-rc.0 +replace k8s.io/apimachinery => k8s.io/apimachinery v0.23.1-rc.0 -replace k8s.io/apiserver => k8s.io/apiserver v0.24.0 +replace k8s.io/apiserver => k8s.io/apiserver v0.23.0 -replace k8s.io/cli-runtime => k8s.io/cli-runtime v0.24.0 +replace k8s.io/cli-runtime => k8s.io/cli-runtime v0.23.0 -replace k8s.io/client-go => k8s.io/client-go v0.24.0 +replace k8s.io/client-go => k8s.io/client-go v0.23.0 -replace k8s.io/cloud-provider => k8s.io/cloud-provider v0.24.0 +replace k8s.io/cloud-provider => k8s.io/cloud-provider v0.23.0 -replace k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.24.0 +replace k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.23.0 -replace k8s.io/code-generator => k8s.io/code-generator v0.24.1-rc.0 +replace k8s.io/code-generator => k8s.io/code-generator v0.23.1-rc.0 -replace k8s.io/component-base => k8s.io/component-base v0.24.0 +replace k8s.io/component-base => k8s.io/component-base v0.23.0 -replace k8s.io/component-helpers => k8s.io/component-helpers v0.24.0 +replace k8s.io/component-helpers => k8s.io/component-helpers v0.23.0 -replace k8s.io/controller-manager => k8s.io/controller-manager v0.24.0 +replace k8s.io/controller-manager => k8s.io/controller-manager v0.23.0 -replace k8s.io/cri-api => k8s.io/cri-api v0.25.0-alpha.0 +replace k8s.io/cri-api => k8s.io/cri-api v0.23.1-rc.0 -replace k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.24.0 +replace k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.23.0 -replace k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.24.0 +replace k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.23.0 -replace k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.24.0 +replace k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.23.0 -replace k8s.io/kube-proxy => k8s.io/kube-proxy v0.24.0 +replace k8s.io/kube-proxy => k8s.io/kube-proxy v0.23.0 -replace k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.24.0 +replace k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.23.0 -replace k8s.io/kubectl => k8s.io/kubectl v0.24.0 +replace k8s.io/kubectl => k8s.io/kubectl v0.23.0 -replace k8s.io/kubelet => k8s.io/kubelet v0.24.0 +replace k8s.io/kubelet => k8s.io/kubelet v0.23.0 -replace k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.24.0 +replace k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.23.0 -replace k8s.io/metrics => k8s.io/metrics v0.24.0 +replace k8s.io/metrics => k8s.io/metrics v0.23.0 -replace k8s.io/mount-utils => k8s.io/mount-utils v0.24.1-rc.0 +replace k8s.io/mount-utils => k8s.io/mount-utils v0.23.2-rc.0 -replace k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.24.0 +replace k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.23.0 -replace k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.24.0 +replace k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.23.0 -replace k8s.io/sample-controller => k8s.io/sample-controller v0.24.0 +replace k8s.io/sample-controller => k8s.io/sample-controller v0.23.0 -replace k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.24.0 +replace k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.23.0 diff --git a/cluster-autoscaler/go.sum b/cluster-autoscaler/go.sum index f01815ab5b1e..070e7653e857 100644 --- a/cluster-autoscaler/go.sum +++ b/cluster-autoscaler/go.sum @@ -45,13 +45,16 @@ github.com/Azure/azure-sdk-for-go v46.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9mo github.com/Azure/azure-sdk-for-go v55.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v55.8.0+incompatible h1:EuccMPzxu67cIE95/mrtwQivLv7ETmURi5IUgLNVug8= github.com/Azure/azure-sdk-for-go v55.8.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.11.4/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= github.com/Azure/go-autorest/autorest v0.11.17/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= +github.com/Azure/go-autorest/autorest v0.11.19/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= github.com/Azure/go-autorest/autorest v0.11.22 h1:bXiQwDjrRmBQOE67bwlvUKAC1EU1yZTPQ38c+bstZws= github.com/Azure/go-autorest/autorest v0.11.22/go.mod h1:BAWYUWGPEtKPzjVkp0Q6an0MJcJDsoh5Z1BFAEFs4Xs= github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= @@ -74,9 +77,8 @@ github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935 github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= github.com/Azure/go-autorest/autorest/validation v0.1.0/go.mod h1:Ha3z/SqBeaalWQvokg3NZAlQTalVMtOIAs1aGK7G6u8= +github.com/Azure/go-autorest/autorest/validation v0.3.0 h1:3I9AAI63HfcLtphd9g39ruUwRI+Ca+z/f36KHPFRUss= github.com/Azure/go-autorest/autorest/validation v0.3.0/go.mod h1:yhLgjC0Wda5DYXl6JAsWyUe4KVNffhoDhG0zVzUMo3E= -github.com/Azure/go-autorest/autorest/validation v0.3.1 h1:AgyqjAd94fwNAoTjl/WQXg4VvFeRFpO+UhNyRXqF1ac= -github.com/Azure/go-autorest/autorest/validation v0.3.1/go.mod h1:yhLgjC0Wda5DYXl6JAsWyUe4KVNffhoDhG0zVzUMo3E= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= @@ -118,8 +120,6 @@ github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hC github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/auth0/go-jwt-middleware v1.0.1 h1:/fsQ4vRr4zod1wKReUH+0A3ySRjGiT9G34kypO/EKwI= @@ -135,12 +135,13 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bits-and-blooms/bitset v1.2.0 h1:Kn4yilvwNtMACtf1eYDlG8H77R07mZSPbMjLyS07ChA= +github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= +github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= -github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -152,14 +153,14 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw= -github.com/checkpoint-restore/go-criu/v5 v5.3.0 h1:wpFFOoomK3389ue2lAb0Boag6XPht5QYpipxmSNL4d8= -github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= +github.com/checkpoint-restore/go-criu/v5 v5.0.0 h1:TW8f/UvntYoVDMN1K2HlT82qH1rb0sOjpGw3m6Ym+i4= +github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= -github.com/cilium/ebpf v0.7.0 h1:1k/q3ATgxSXRdrmPfH8d7YK0GfqVsEKZAX9dQZvs56k= -github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= +github.com/cilium/ebpf v0.6.2 h1:iHsfF/t4aW4heW2YKfeHrVPGdtYTL4C4KocpM8KTSnI= +github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/clusterhq/flocker-go v0.0.0-20160920122132-2b8b7259d313 h1:eIHD9GNM3Hp7kcRW5mvcz7WTR3ETeoYYKwpgA04kaXE= github.com/clusterhq/flocker-go v0.0.0-20160920122132-2b8b7259d313/go.mod h1:P1wt9Z3DP8O6W3rvwCt0REIlshg1InHImaLW0t3ObY0= @@ -175,12 +176,11 @@ github.com/container-storage-interface/spec v1.5.0/go.mod h1:8K96oQNkJ7pFcC2R9Z1 github.com/containerd/cgroups v1.0.1 h1:iJnMvco9XGvKUvNQkv88bE4uJXxRQH18efbKo9w5vHQ= github.com/containerd/cgroups v1.0.1/go.mod h1:0SJrPIenamHDcZhEcJMNBB85rHcUsw4f25ZfBiPYRkU= github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= +github.com/containerd/console v1.0.2 h1:Pi6D+aZXM+oUw1czuKgH5IJ+y0jhYcwBJfx5/Ghn9dE= github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= -github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw= -github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= github.com/containerd/containerd v1.4.9/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.4.12 h1:V+SHzYmhng/iju6M5nFrpTTusrhidoxKTwdwLw+u4c4= -github.com/containerd/containerd v1.4.12/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.4.11 h1:QCGOUN+i70jEEL/A6JVIbhy4f4fanzAzSR4kNG7SlcE= +github.com/containerd/containerd v1.4.11/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM= github.com/containerd/fifo v1.0.0/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= github.com/containerd/go-runc v1.0.0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= @@ -188,6 +188,8 @@ github.com/containerd/ttrpc v1.0.2 h1:2/O3oTZN36q2xRolk0a2WWGgh7/Vf/liElg5hFYLX9 github.com/containerd/ttrpc v1.0.2/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= github.com/containerd/typeurl v1.0.2 h1:Chlt8zIieDbzQFzXzAeBEF92KhExuE4p9p92/QmY7aY= github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= +github.com/containernetworking/cni v0.8.1 h1:7zpDnQ3T3s4ucOuJ/ZCLrYBxzkg0AELFfII3Epo9TmI= +github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= github.com/coredns/caddy v1.1.0/go.mod h1:A6ntJQlAWuQfFlsd9hvigKbo2WS0VUs2l1e2F+BawD4= github.com/coredns/corefile-migration v1.0.14/go.mod h1:XnhgULOEouimnzgn0t4WPuFDN2/PJQcTxdWKC5eXNGE= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= @@ -205,11 +207,11 @@ github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cyphar/filepath-securejoin v0.2.3 h1:YX6ebbZCZP7VkM3scTTokDgBL2TY741X51MTk3ycuNI= -github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= +github.com/cyphar/filepath-securejoin v0.2.2 h1:jCwT2GTP+PY5nBz3c/YL5PAIbusElVrPujOBSCj8xRg= +github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -221,13 +223,13 @@ github.com/digitalocean/godo v1.27.0/go.mod h1:iJnN9rVu6K5LioLxLimlq0uRI+y/eAQjR github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi/U= github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= -github.com/dnaeon/go-vcr v1.0.1 h1:r8L/HqC0Hje5AXMu1ooW8oyQyOFv4GxqpL0nRP7SLLY= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= -github.com/docker/distribution v2.8.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= -github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.12+incompatible h1:CEeNmFM0QZIsJCZKMkZx0ZcahTiewkrgiwfYD+dfl1U= -github.com/docker/docker v20.10.12+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= +github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= +github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= +github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v20.10.7+incompatible h1:Z6O9Nhsjv+ayUEeI1IojKbYcsGdgYSNqxe1s2MYzUhQ= +github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= @@ -266,9 +268,8 @@ github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoD github.com/frankban/quicktest v1.11.3 h1:8sXhOn0uLys67V8EsXLc6eszDs8VXWxL3iRvebPhedY= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= -github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= @@ -286,6 +287,7 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0 h1:QK40JKJyMdUDz+h+xvCsru/bJhvG0UxvePV0ufL/AcE= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= @@ -303,9 +305,8 @@ github.com/go-ozzo/ozzo-validation v3.5.0+incompatible/go.mod h1:gsEKFIVnabGBt6m github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/godbus/dbus/v5 v5.0.4 h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/godbus/dbus/v5 v5.0.6 h1:mkgN1ofwASrYnJ5W6U/BxG15eXXXjirgZc7CLqkcaro= -github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -357,12 +358,10 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -github.com/google/cadvisor v0.44.1 h1:hsAxDZOY+5xSCXH12d/G9cxYTfP+32cMT3J7aatrgDY= -github.com/google/cadvisor v0.44.1/go.mod h1:GQ9KQfz0iNHQk3D6ftzJWK4TXabfIgM10Oy3FkR+Gzg= -github.com/google/cel-go v0.10.1/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSxrmI1w= +github.com/google/cadvisor v0.43.0 h1:z0ULgYPKZ7L/c7Zjq+ZD6ltklWwYdCSvBMgSjNC/hGo= +github.com/google/cadvisor v0.43.0/go.mod h1:+RdMSbc3FVr5NYCD2dOEJy/LI0jYJ/0xJXkzWXEyiFQ= +github.com/google/cel-go v0.9.0/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSxrmI1w= github.com/google/cel-spec v0.6.0/go.mod h1:Nwjgxy5CbjlPrtCWjeDjUyKMl8w41YBYGjsyDdqk0xA= -github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= -github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -403,6 +402,7 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+ github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= +github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/gophercloud/gophercloud v0.1.0 h1:P/nh25+rzXouhytV2pUHBb65fnds26Ghl8/391+sT5o= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= @@ -537,11 +537,11 @@ github.com/moby/ipvs v1.0.1 h1:aoZ7fhLTXgDbzVrAnvV+XbKOU8kOET7B3+xULDF/1o0= github.com/moby/ipvs v1.0.1/go.mod h1:2pngiyseZbIKXNv7hsKj3O9UEz30c53MT9005gt2hxQ= github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= -github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= -github.com/moby/sys/mountinfo v0.6.0 h1:gUDhXQx58YNrpHlK4nSL+7y2pxFZkUcXqzFDKWdC0Oo= -github.com/moby/sys/mountinfo v0.6.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= +github.com/moby/sys/mountinfo v0.4.1 h1:1O+1cHA1aujwEwwVMa2Xm2l+gIpUHyd3+D+d7LZh1kM= +github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= +github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= +github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 h1:yH0SvLzcbZxcJXho2yh7CqdENGMQe73Cw3woZBpPli0= github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= -github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -549,9 +549,11 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/mohae/deepcopy v0.0.0-20170603005431-491d3605edfb h1:e+l77LJOEqXTIQihQJVkA6ZxPOUmfPM5e4H7rcpgtSk= github.com/mohae/deepcopy v0.0.0-20170603005431-491d3605edfb/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mrunalp/fileutils v0.5.0 h1:NKzVxiH7eSk+OQ4M+ZYW1K6h27RUV3MI6NUTsHhU6Z4= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= @@ -574,27 +576,25 @@ github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.16.0 h1:6gjqkI8iiRHMvdccRJM8rVKjCWk6ZIm6FTm3ddIe4/c= -github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.15.0 h1:WjP/FQ/sk43MRmnEcT+MlDw2TFvkrXlprrPST/IudjU= +github.com/onsi/gomega v1.15.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= -github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v1.1.0/go.mod h1:Tj1hFw6eFWp/o33uxGf5yF2BX5yz2Z6iptFpuvbbKqc= -github.com/opencontainers/runc v1.1.1 h1:PJ9DSs2sVwE0iVr++pAHE6QkS9tzcVWozlPifdwMgrU= -github.com/opencontainers/runc v1.1.1/go.mod h1:Tj1hFw6eFWp/o33uxGf5yF2BX5yz2Z6iptFpuvbbKqc= +github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= +github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/runc v1.0.2 h1:opHZMaswlyxz1OuGpBE53Dwe4/xF7EZTY0A2L/FpCOg= +github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 h1:3snG66yBm59tKhhSPQrQ/0bCrv1LQbKt40LnUPiUxdc= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/selinux v1.10.0 h1:rAiKF8hTcgLI3w0DHm6i0ylVVcOrlgR1kK99DRLDhyU= -github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= +github.com/opencontainers/selinux v1.8.2 h1:c4ca10UMgRcvZ6h0K4HtS15UaVSBEaE+iln2LVpAuGc= +github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= @@ -649,13 +649,12 @@ github.com/rubiojr/go-vhd v0.0.0-20200706105327-02e210299021 h1:if3/24+h9Sq6eDx8 github.com/rubiojr/go-vhd v0.0.0-20200706105327-02e210299021/go.mod h1:DM5xW0nvfNNm2uytzsvhI3OnX8uzaRAg8UX/CnDqbto= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921 h1:58EBmR2dMNL2n/FnbQewK3D14nXr0V9CObDSvMJLq+Y= -github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= +github.com/seccomp/libseccomp-golang v0.9.1 h1:NJjM5DNFOs0s3kYE1WUOr6G8V97sdt46rlXTMfXGWBo= +github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= @@ -680,9 +679,8 @@ github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkU github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= +github.com/spf13/cobra v1.2.1 h1:+KmjbUw1hriSNMF55oPrkZcb27aECyrj8V2ytv7kWDw= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= -github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= -github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -733,21 +731,18 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/etcd/api/v3 v3.5.0 h1:GsV3S+OfZEOCNXdtNkBSR7kgLobAa/SO6tCxRa0GAYw= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/api/v3 v3.5.1 h1:v28cktvBq+7vGyJXF8G+rWJmj+1XUmMtqcLnH8hDocM= -go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/client/pkg/v3 v3.5.0 h1:2aQv6F436YnN7I4VbI8PPYrBhu+SmrTaADcf8Mi/6PU= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/pkg/v3 v3.5.1 h1:XIQcHCFSG53bJETYeRJtIxdLv2EWRGxcfzR8lSnTH4E= -go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0 h1:ftQ0nOOHMcbMS3KIaDQ0g5Qcd6bhaBrQT6b89DfwLTs= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.etcd.io/etcd/client/v3 v3.5.0 h1:62Eh0XOro+rDwkrypAGDfgmNh5Joq+z+W9HZdlXMzek= go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= -go.etcd.io/etcd/client/v3 v3.5.1 h1:oImGuV5LGKjCqXdjkMHCyWa5OO1gYKCnC/1sgdfj1Uk= -go.etcd.io/etcd/client/v3 v3.5.1/go.mod h1:OnjH4M8OnAotwaB2l9bVgZzRFKru7/ZMoS46OtKyd3Q= go.etcd.io/etcd/pkg/v3 v3.5.0 h1:ntrg6vvKRW26JRmHTE0iNlDgYK6JX3hg/4cD62X0ixk= go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= go.etcd.io/etcd/raft/v3 v3.5.0 h1:kw2TmO3yFTgE+F0mdKkG7xMxkit2duBDa2Hu6D/HMlw= @@ -810,10 +805,11 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220214200702-86341886e292 h1:f+lwQ+GtmgoY+A2YaQxlSOnDjXcQ7ZRLWOHbC6HtRqE= -golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -860,7 +856,6 @@ golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hM golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -909,11 +904,9 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210825183410-e898025ed96a h1:bRuuGXV8wwSdGTB+CtJf+FjgO1APK1CoO39T4BN/XBw= golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -929,9 +922,8 @@ golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210427180440-81ed05c6b58c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f h1:Qmd2pbz05z7z6lm0DrgQVVPuBm92jqujBKMHMOlOQEw= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -994,6 +986,7 @@ golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1011,25 +1004,20 @@ golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210503080704-8803ae5d1324/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158 h1:rm+CHSpPEEW2IsXUib1ThaHIjuBVZjxNgSKmBLFfD4c= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1044,9 +1032,8 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= -golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1109,8 +1096,8 @@ golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.10-0.20220218145154-897bd77cd717 h1:hI3jKY4Hpf63ns040onEbB3dAkR/H/P83hw1TG8dD3Y= -golang.org/x/tools v0.1.10-0.20220218145154-897bd77cd717/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff h1:VX/uD7MK0AHXGiScH3fsieUQUcpmRERPDYtqZdJnA+Q= +golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1200,9 +1187,8 @@ google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210429181445-86c259c2b4ab/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2 h1:NHN4wOCScVzKhPenJ2dt+BTs3X/XkBVI/Rh4iDt55T8= google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368 h1:Et6SkiuvnBn+SgrSYXs/BrUpGB4mbdwt4R3vaPIlicA= -google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1288,67 +1274,65 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.24.0 h1:J0hann2hfxWr1hinZIDefw7Q96wmCBx6SSB8IY0MdDg= -k8s.io/api v0.24.0/go.mod h1:5Jl90IUrJHUJYEMANRURMiVvJ0g7Ax7r3R1bqO8zx8I= -k8s.io/apiextensions-apiserver v0.24.0/go.mod h1:iuVe4aEpe6827lvO6yWQVxiPSpPoSKVjkq+MIdg84cM= -k8s.io/apimachinery v0.24.1-rc.0 h1:mjcDse2fEbUbiSZYU83NxdLUXlCSprcMlQVgNWn6tGk= -k8s.io/apimachinery v0.24.1-rc.0/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= -k8s.io/apiserver v0.24.0 h1:GR7kGsjOMfilRvlG3Stxv/3uz/ryvJ/aZXc5pqdsNV0= -k8s.io/apiserver v0.24.0/go.mod h1:WFx2yiOMawnogNToVvUYT9nn1jaIkMKj41ZYCVycsBA= -k8s.io/cli-runtime v0.24.0/go.mod h1:9XxoZDsEkRFUThnwqNviqzljtT/LdHtNWvcNFrAXl0A= -k8s.io/client-go v0.24.0 h1:lbE4aB1gTHvYFSwm6eD3OF14NhFDKCejlnsGYlSJe5U= -k8s.io/client-go v0.24.0/go.mod h1:VFPQET+cAFpYxh6Bq6f4xyMY80G6jKKktU6G0m00VDw= -k8s.io/cloud-provider v0.24.0 h1:kQ6zB2oy0VDl+6vdRAKEbtwDM1MmuhNCyA/v+Fk2g30= -k8s.io/cloud-provider v0.24.0/go.mod h1:cqkEWJWzToaqtS5ti8KQJQcL2IWssWGXHzicxZyaC6s= -k8s.io/cluster-bootstrap v0.24.0/go.mod h1:xw+IfoaUweMCAoi+VYhmqkcjii2G7gNg59dmGn7hi0g= -k8s.io/code-generator v0.24.1-rc.0/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w= -k8s.io/component-base v0.24.0 h1:h5jieHZQoHrY/lHG+HyrSbJeyfuitheBvqvKwKHVC0g= -k8s.io/component-base v0.24.0/go.mod h1:Dgazgon0i7KYUsS8krG8muGiMVtUZxG037l1MKyXgrA= -k8s.io/component-helpers v0.24.0 h1:hZIHGfdd55thhqd9oxjDTw68OAPauDMJ+8hC69aNw1I= -k8s.io/component-helpers v0.24.0/go.mod h1:Q2SlLm4h6g6lPTC9GMMfzdywfLSvJT2f1hOnnjaWD8c= -k8s.io/controller-manager v0.24.0/go.mod h1:ageMNQZc7cNH0FF1oarm7wZs6XyJj/V82nNVmgPaeDU= -k8s.io/cri-api v0.25.0-alpha.0 h1:cGTy/e2rO3oVyEMTG80epYhysmFL73CH6Xjvk1P6VTo= -k8s.io/cri-api v0.25.0-alpha.0/go.mod h1:t3tImFtGeStN+ES69bQUX9sFg67ek38BM9YIJhMmuig= -k8s.io/csi-translation-lib v0.24.0 h1:U56SfLSjpaSkrbR0PdEZXOAKbUKDQP80KV/LwFbix/g= -k8s.io/csi-translation-lib v0.24.0/go.mod h1:jJaC3a1tI3IShByiAQmOOCl5PKpiZ51Vh70c9Eg2msM= +k8s.io/api v0.23.0 h1:WrL1gb73VSC8obi8cuYETJGXEoFNEh3LU0Pt+Sokgro= +k8s.io/api v0.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg= +k8s.io/apiextensions-apiserver v0.23.0/go.mod h1:xIFAEEDlAZgpVBl/1VSjGDmLoXAWRG40+GsWhKhAxY4= +k8s.io/apimachinery v0.23.1-rc.0 h1:Msf1V+9oq/V5GD8Zb81YxR5/fmA2/6X8gqTynPrvrvo= +k8s.io/apimachinery v0.23.1-rc.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= +k8s.io/apiserver v0.23.0 h1:Ds/QveXWi9aJ8ISB0CJa4zBNc5njxAs5u3rmMIexqCY= +k8s.io/apiserver v0.23.0/go.mod h1:Cec35u/9zAepDPPFyT+UMrgqOCjgJ5qtfVJDxjZYmt4= +k8s.io/cli-runtime v0.23.0/go.mod h1:B5N3YH0KP1iKr6gEuJ/RRmGjO0mJQ/f/JrsmEiPQAlU= +k8s.io/client-go v0.23.0 h1:vcsOqyPq7XV3QmQRCBH/t9BICJM9Q1M18qahjv+rebY= +k8s.io/client-go v0.23.0/go.mod h1:hrDnpnK1mSr65lHHcUuIZIXDgEbzc7/683c6hyG4jTA= +k8s.io/cloud-provider v0.23.0 h1:9LATZJu57XanN7po4Xfj6jTLp44uhKiu5Xa3+3Cutz0= +k8s.io/cloud-provider v0.23.0/go.mod h1:vY9zulPUCjwCg9TBMh5Qi42JUZUNecQNF7FojNELWws= +k8s.io/cluster-bootstrap v0.23.0/go.mod h1:VltEnKWfrRTiKgOXp3ts3vh7yqNlH6KFKFflo9GtCBg= +k8s.io/code-generator v0.23.1-rc.0/go.mod h1:vQvOhDXhuzqiVfM/YHp+dmg10WDZCchJVObc9MvowsE= +k8s.io/component-base v0.23.0 h1:UAnyzjvVZ2ZR1lF35YwtNY6VMN94WtOnArcXBu34es8= +k8s.io/component-base v0.23.0/go.mod h1:DHH5uiFvLC1edCpvcTDV++NKULdYYU6pR9Tt3HIKMKI= +k8s.io/component-helpers v0.23.0 h1:qNbqN10QTefiWcCOPkHL/0nn81sdKVv6ZgEXcSyot/U= +k8s.io/component-helpers v0.23.0/go.mod h1:liXMh6FZS4qamKtMJQ7uLHnFe3tlC86RX5mJEk/aerg= +k8s.io/controller-manager v0.23.0/go.mod h1:6/IKItSv6p9FY3mSbHgsOYmt4y+HDxiC5hEFg9rJVc8= +k8s.io/cri-api v0.23.1-rc.0 h1:18rKv9P8lf0Eh4PAwous0fsFCMXE5jLssuNGoFyVUqE= +k8s.io/cri-api v0.23.1-rc.0/go.mod h1:2edENu3/mkyW3c6fVPPPaVGEFbLRacJizBbSp7ZOLOo= +k8s.io/csi-translation-lib v0.23.0 h1:YRTaf2FTKFHwtISWrtzpE/opXesEnyEG3mY2ioyOyxc= +k8s.io/csi-translation-lib v0.23.0/go.mod h1:ho0ljka+BEcdlvFrG08L8FpYi6QJeSGgQLWeVOAeeM8= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/gengo v0.0.0-20211129171323-c02415ce4185/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.10.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= +k8s.io/klog/v2 v2.30.0 h1:bUO6drIvCIsvZ/XFgfxoGFQU/a4Qkh0iAlvUR7vlHJw= k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/klog/v2 v2.60.1 h1:VW25q3bZx9uE3vvdL6M8ezOX79vA2Aq1nEWLqNQclHc= -k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-aggregator v0.24.0/go.mod h1:ftfs6Fi46z3cKzeF2kvNBPLbMlSKuqZbesJGNp/cQnw= -k8s.io/kube-controller-manager v0.24.0/go.mod h1:s0pbwI8UuBEDdXQbTUpQdNIyU4rQ7jOxaXAcRBoWpJQ= +k8s.io/kube-aggregator v0.23.0/go.mod h1:b1vpoaTWKZjCzvbe1KXFw3vPbISrghJsg7/RI8oZUME= +k8s.io/kube-controller-manager v0.23.0/go.mod h1:iHapRJJBe+fWu6hG3ye43YMFEeZcnIlRxDUS72bwJoE= k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= +k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= -k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 h1:Gii5eqf+GmIEwGNKQYQClCayuJCe2/4fZUvF7VG99sU= -k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= -k8s.io/kube-proxy v0.24.0 h1:p8KNQT+OrCU1T2xQAdmVl/+2YJOHyUD6IZc+h+Jjjho= -k8s.io/kube-proxy v0.24.0/go.mod h1:OZ1k9jSwW94Rmj5hepCFea7qlGvvU+bfcosc6+dcFKA= -k8s.io/kube-scheduler v0.24.0 h1:YGw6ILB2NRoTDfY2I5iqMz+CAVRqYrgySZZzhgEWA2c= -k8s.io/kube-scheduler v0.24.0/go.mod h1:DUq+fXaC51N1kl2YnT2EZSxOph6JOmIJe/pQe5keZPc= -k8s.io/kubectl v0.24.0 h1:nA+WtMLVdXUs4wLogGd1mPTAesnLdBpCVgCmz3I7dXo= -k8s.io/kubectl v0.24.0/go.mod h1:pdXkmCyHiRTqjYfyUJiXtbVNURhv0/Q1TyRhy2d5ic0= -k8s.io/kubelet v0.24.0 h1:fH+D6mSr4DGIeHp/O2+mCEJhkVq3Gpgv9BVOHI+GrWY= -k8s.io/kubelet v0.24.0/go.mod h1:p3BBacmHTCMpUf+nluhlyzuGHmONKAspqCvpu9oPAyA= -k8s.io/kubernetes v1.24.0 h1:9qRjlCuMjooyFTXLxduMBT+MZSdROWa3idI1AXZirVs= -k8s.io/kubernetes v1.24.0/go.mod h1:8e8maMiZzBR2/8Po5Uulx+MXZUYJuN3vtKwD4Ct1Xi0= -k8s.io/legacy-cloud-providers v0.24.0 h1:fk5EC+/TWHyJWGE1N8y4W5RPQ1vhPlPAB55WvCSTtbc= -k8s.io/legacy-cloud-providers v0.24.0/go.mod h1:j2gujMUYBEtbYfJaL8JUOgInzERm9fxJwEaOkZcnEUk= -k8s.io/metrics v0.24.0/go.mod h1:jrLlFGdKl3X+szubOXPG0Lf2aVxuV3QJcbsgVRAM6fI= -k8s.io/mount-utils v0.24.1-rc.0 h1:ngwZvo7suzq1F7IAkIllHO1mOuC53loLTGNWAQuIYrM= -k8s.io/mount-utils v0.24.1-rc.0/go.mod h1:XrSqB3a2e8sq+aU+rlbcBtQ3EgcuDk5RP9ZsGxjoDrI= -k8s.io/pod-security-admission v0.24.0/go.mod h1:YBS4mAdoba2qMvLPE3S7eMIxGlqUf4amHH26jUUqXX4= -k8s.io/sample-apiserver v0.24.0/go.mod h1:6YGSatoHMHIac/2dTtARwYH8PVWY5qq1L9ZYbxZ9lHY= -k8s.io/system-validators v1.7.0/go.mod h1:gP1Ky+R9wtrSiFbrpEPwWMeYz9yqyy1S/KOh0Vci7WI= +k8s.io/kube-proxy v0.23.0 h1:mQqh5k1xTdsC5dPjO367Kejw3X5uudTU3HJz4r45hjQ= +k8s.io/kube-proxy v0.23.0/go.mod h1:AFPfNIiOeDhHVtfN7ZfE1Wd8aP5qYov3khPu4VFeBb4= +k8s.io/kube-scheduler v0.23.0 h1:O10up3dvuMygl+m2cgCRHurbLRyVfrpqqSMbU1mM01s= +k8s.io/kube-scheduler v0.23.0/go.mod h1:BXDjbJEXtr9PU5/XzLtWMNG6Mid4GYBSGVWzP72UxKk= +k8s.io/kubectl v0.23.0 h1:WABWfj+Z4tC3SfKBCtZr5sIVHsFtkU9Azii4DR9IT6Y= +k8s.io/kubectl v0.23.0/go.mod h1:TfcGEs3u4dkmoC2eku1GYymdGaMtPMcaLLFrX/RB2kI= +k8s.io/kubelet v0.23.0 h1:hHdHe/Hp3R2HzxnYI8/f173gDUOTRYERd7S7+to9MZw= +k8s.io/kubelet v0.23.0/go.mod h1:A4DxfIt5Ka+rz54HAFhs1bgiFjJT6lcaAYUcACZl1/k= +k8s.io/kubernetes v1.23.0 h1:r2DrryCpnmFfBuelpUNSWXHtD6Zy7SdwaCcycV5DsJE= +k8s.io/kubernetes v1.23.0/go.mod h1:sgD3+Qzb8FHlRKlZnNCN+np3zZuHEAb/0PKLJkYyCUI= +k8s.io/legacy-cloud-providers v0.23.0 h1:QJ/+6EXh0y4ko92d1+uSS0dmLvrAASlHMDxdMSTQbVc= +k8s.io/legacy-cloud-providers v0.23.0/go.mod h1:tM5owPlhLyEYJC2FLHgcGu1jks5ANvH2JlY03mnUYU4= +k8s.io/metrics v0.23.0/go.mod h1:NDiZTwppEtAuKJ1Rxt3S4dhyRzdp6yUcJf0vo023dPo= +k8s.io/mount-utils v0.23.2-rc.0 h1:Qn837ILIBK3FaVxGCVk0iYHnS64yXYeCBltHMKIet+c= +k8s.io/mount-utils v0.23.2-rc.0/go.mod h1:9pFhzVjxle1osJUo++9MFDat9HPkQUOoHCn+eExZ3Ew= +k8s.io/pod-security-admission v0.23.0/go.mod h1:vGExA081PHZFK9Yma4kuPtfWwy5zxbEUhniiUDKFicM= +k8s.io/sample-apiserver v0.23.0/go.mod h1:o0U/1hkfndbnLg1OfVHQiG08lmDkYJq7qljCuwjoTrI= +k8s.io/system-validators v1.6.0/go.mod h1:bPldcLgkIUK22ALflnsXk8pvkTEndYdNuaHH6gRrl0Q= +k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210707171843-4b05e18ac7d9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b h1:wxEMGetGMur3J1xuGLQY7GEQYg9bZxKn3tKo5k/eYcs= k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc= -k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= @@ -1358,22 +1342,18 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25 h1:DEQ12ZRxJjsglk5JIi5bLgpKaHihGervKmg5uryaEHw= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25/go.mod h1:Mlj9PNLmG9bZ6BHFwFKDo5afkpWyUISkb9Me0GnK66I= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.30 h1:dUk62HQ3ZFhD48Qr8MIXCiKA8wInBQCtuE4QGfFW7yA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.30/go.mod h1:fEO7lRTdivWO2qYVCVG7dEADOMo/MLDCVr8So2g88Uw= -sigs.k8s.io/cloud-provider-azure v1.23.2 h1:DQuKWZ168Ei8iterMX5Ri02DtcoKWbU1S2Jkqwk6aDw= -sigs.k8s.io/cloud-provider-azure v1.23.2/go.mod h1:yQ1Tjce4uX29FGI0pvAEH0CVt+a7RGfOwVdkAon8ygw= +sigs.k8s.io/cloud-provider-azure v1.1.3 h1:0oZIBYPBgyZIznyH3iur0kUfDqxdTDaQ72IZAFZfyM8= +sigs.k8s.io/cloud-provider-azure v1.1.3/go.mod h1:Tfg7/kQxnJD26sry07J/naRXWoX27XxmuGSG2Xpw/DY= +sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= -sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y= -sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= -sigs.k8s.io/kustomize/api v0.11.4/go.mod h1:k+8RsqYbgpkIrJ4p9jcdPqe8DprLxFUUO0yNOq8C+xI= -sigs.k8s.io/kustomize/cmd/config v0.10.6/go.mod h1:/S4A4nUANUa4bZJ/Edt7ZQTyKOY9WCER0uBS1SW2Rco= -sigs.k8s.io/kustomize/kustomize/v4 v4.5.4/go.mod h1:Zo/Xc5FKD6sHl0lilbrieeGeZHVYCA4BzxeAaLI05Bg= -sigs.k8s.io/kustomize/kyaml v0.13.6/go.mod h1:yHP031rn1QX1lr/Xd934Ri/xdVNG8BE2ECa78Ht/kEg= +sigs.k8s.io/kustomize/api v0.10.1/go.mod h1:2FigT1QN6xKdcnGS2Ppp1uIWrtWN28Ms8A3OZUZhwr8= +sigs.k8s.io/kustomize/cmd/config v0.10.2/go.mod h1:K2aW7nXJ0AaT+VA/eO0/dzFLxmpFcTzudmAgDwPY1HQ= +sigs.k8s.io/kustomize/kustomize/v4 v4.4.1/go.mod h1:qOKJMMz2mBP+vcS7vK+mNz4HBLjaQSWRY22EF6Tb7Io= +sigs.k8s.io/kustomize/kyaml v0.13.0/go.mod h1:FTJxEZ86ScK184NpGSAQcfEqee0nul8oLCK30D47m4E= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.1.2 h1:Hr/htKFmJEbtMgS/UD0N+gtgctAqz81t3nu+sPzynno= sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= -sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= -sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/LICENSE b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/LICENSE new file mode 100644 index 000000000000..e3d9a64d1d85 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Microsoft Corporation + +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. diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/README.md b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/README.md new file mode 100644 index 000000000000..261c041e7aba --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/README.md @@ -0,0 +1,12 @@ +# go-ansiterm + +This is a cross platform Ansi Terminal Emulation library. It reads a stream of Ansi characters and produces the appropriate function calls. The results of the function calls are platform dependent. + +For example the parser might receive "ESC, [, A" as a stream of three characters. This is the code for Cursor Up (http://www.vt100.net/docs/vt510-rm/CUU). The parser then calls the cursor up function (CUU()) on an event handler. The event handler determines what platform specific work must be done to cause the cursor to move up one position. + +The parser (parser.go) is a partial implementation of this state machine (http://vt100.net/emu/vt500_parser.png). There are also two event handler implementations, one for tests (test_event_handler.go) to validate that the expected events are being produced and called, the other is a Windows implementation (winterm/win_event_handler.go). + +See parser_test.go for examples exercising the state machine and generating appropriate function calls. + +----- +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/constants.go b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/constants.go new file mode 100644 index 000000000000..96504a33bc9e --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/constants.go @@ -0,0 +1,188 @@ +package ansiterm + +const LogEnv = "DEBUG_TERMINAL" + +// ANSI constants +// References: +// -- http://www.ecma-international.org/publications/standards/Ecma-048.htm +// -- http://man7.org/linux/man-pages/man4/console_codes.4.html +// -- http://manpages.ubuntu.com/manpages/intrepid/man4/console_codes.4.html +// -- http://en.wikipedia.org/wiki/ANSI_escape_code +// -- http://vt100.net/emu/dec_ansi_parser +// -- http://vt100.net/emu/vt500_parser.svg +// -- http://invisible-island.net/xterm/ctlseqs/ctlseqs.html +// -- http://www.inwap.com/pdp10/ansicode.txt +const ( + // ECMA-48 Set Graphics Rendition + // Note: + // -- Constants leading with an underscore (e.g., _ANSI_xxx) are unsupported or reserved + // -- Fonts could possibly be supported via SetCurrentConsoleFontEx + // -- Windows does not expose the per-window cursor (i.e., caret) blink times + ANSI_SGR_RESET = 0 + ANSI_SGR_BOLD = 1 + ANSI_SGR_DIM = 2 + _ANSI_SGR_ITALIC = 3 + ANSI_SGR_UNDERLINE = 4 + _ANSI_SGR_BLINKSLOW = 5 + _ANSI_SGR_BLINKFAST = 6 + ANSI_SGR_REVERSE = 7 + _ANSI_SGR_INVISIBLE = 8 + _ANSI_SGR_LINETHROUGH = 9 + _ANSI_SGR_FONT_00 = 10 + _ANSI_SGR_FONT_01 = 11 + _ANSI_SGR_FONT_02 = 12 + _ANSI_SGR_FONT_03 = 13 + _ANSI_SGR_FONT_04 = 14 + _ANSI_SGR_FONT_05 = 15 + _ANSI_SGR_FONT_06 = 16 + _ANSI_SGR_FONT_07 = 17 + _ANSI_SGR_FONT_08 = 18 + _ANSI_SGR_FONT_09 = 19 + _ANSI_SGR_FONT_10 = 20 + _ANSI_SGR_DOUBLEUNDERLINE = 21 + ANSI_SGR_BOLD_DIM_OFF = 22 + _ANSI_SGR_ITALIC_OFF = 23 + ANSI_SGR_UNDERLINE_OFF = 24 + _ANSI_SGR_BLINK_OFF = 25 + _ANSI_SGR_RESERVED_00 = 26 + ANSI_SGR_REVERSE_OFF = 27 + _ANSI_SGR_INVISIBLE_OFF = 28 + _ANSI_SGR_LINETHROUGH_OFF = 29 + ANSI_SGR_FOREGROUND_BLACK = 30 + ANSI_SGR_FOREGROUND_RED = 31 + ANSI_SGR_FOREGROUND_GREEN = 32 + ANSI_SGR_FOREGROUND_YELLOW = 33 + ANSI_SGR_FOREGROUND_BLUE = 34 + ANSI_SGR_FOREGROUND_MAGENTA = 35 + ANSI_SGR_FOREGROUND_CYAN = 36 + ANSI_SGR_FOREGROUND_WHITE = 37 + _ANSI_SGR_RESERVED_01 = 38 + ANSI_SGR_FOREGROUND_DEFAULT = 39 + ANSI_SGR_BACKGROUND_BLACK = 40 + ANSI_SGR_BACKGROUND_RED = 41 + ANSI_SGR_BACKGROUND_GREEN = 42 + ANSI_SGR_BACKGROUND_YELLOW = 43 + ANSI_SGR_BACKGROUND_BLUE = 44 + ANSI_SGR_BACKGROUND_MAGENTA = 45 + ANSI_SGR_BACKGROUND_CYAN = 46 + ANSI_SGR_BACKGROUND_WHITE = 47 + _ANSI_SGR_RESERVED_02 = 48 + ANSI_SGR_BACKGROUND_DEFAULT = 49 + // 50 - 65: Unsupported + + ANSI_MAX_CMD_LENGTH = 4096 + + MAX_INPUT_EVENTS = 128 + DEFAULT_WIDTH = 80 + DEFAULT_HEIGHT = 24 + + ANSI_BEL = 0x07 + ANSI_BACKSPACE = 0x08 + ANSI_TAB = 0x09 + ANSI_LINE_FEED = 0x0A + ANSI_VERTICAL_TAB = 0x0B + ANSI_FORM_FEED = 0x0C + ANSI_CARRIAGE_RETURN = 0x0D + ANSI_ESCAPE_PRIMARY = 0x1B + ANSI_ESCAPE_SECONDARY = 0x5B + ANSI_OSC_STRING_ENTRY = 0x5D + ANSI_COMMAND_FIRST = 0x40 + ANSI_COMMAND_LAST = 0x7E + DCS_ENTRY = 0x90 + CSI_ENTRY = 0x9B + OSC_STRING = 0x9D + ANSI_PARAMETER_SEP = ";" + ANSI_CMD_G0 = '(' + ANSI_CMD_G1 = ')' + ANSI_CMD_G2 = '*' + ANSI_CMD_G3 = '+' + ANSI_CMD_DECPNM = '>' + ANSI_CMD_DECPAM = '=' + ANSI_CMD_OSC = ']' + ANSI_CMD_STR_TERM = '\\' + + KEY_CONTROL_PARAM_2 = ";2" + KEY_CONTROL_PARAM_3 = ";3" + KEY_CONTROL_PARAM_4 = ";4" + KEY_CONTROL_PARAM_5 = ";5" + KEY_CONTROL_PARAM_6 = ";6" + KEY_CONTROL_PARAM_7 = ";7" + KEY_CONTROL_PARAM_8 = ";8" + KEY_ESC_CSI = "\x1B[" + KEY_ESC_N = "\x1BN" + KEY_ESC_O = "\x1BO" + + FILL_CHARACTER = ' ' +) + +func getByteRange(start byte, end byte) []byte { + bytes := make([]byte, 0, 32) + for i := start; i <= end; i++ { + bytes = append(bytes, byte(i)) + } + + return bytes +} + +var toGroundBytes = getToGroundBytes() +var executors = getExecuteBytes() + +// SPACE 20+A0 hex Always and everywhere a blank space +// Intermediate 20-2F hex !"#$%&'()*+,-./ +var intermeds = getByteRange(0x20, 0x2F) + +// Parameters 30-3F hex 0123456789:;<=>? +// CSI Parameters 30-39, 3B hex 0123456789; +var csiParams = getByteRange(0x30, 0x3F) + +var csiCollectables = append(getByteRange(0x30, 0x39), getByteRange(0x3B, 0x3F)...) + +// Uppercase 40-5F hex @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_ +var upperCase = getByteRange(0x40, 0x5F) + +// Lowercase 60-7E hex `abcdefghijlkmnopqrstuvwxyz{|}~ +var lowerCase = getByteRange(0x60, 0x7E) + +// Alphabetics 40-7E hex (all of upper and lower case) +var alphabetics = append(upperCase, lowerCase...) + +var printables = getByteRange(0x20, 0x7F) + +var escapeIntermediateToGroundBytes = getByteRange(0x30, 0x7E) +var escapeToGroundBytes = getEscapeToGroundBytes() + +// See http://www.vt100.net/emu/vt500_parser.png for description of the complex +// byte ranges below + +func getEscapeToGroundBytes() []byte { + escapeToGroundBytes := getByteRange(0x30, 0x4F) + escapeToGroundBytes = append(escapeToGroundBytes, getByteRange(0x51, 0x57)...) + escapeToGroundBytes = append(escapeToGroundBytes, 0x59) + escapeToGroundBytes = append(escapeToGroundBytes, 0x5A) + escapeToGroundBytes = append(escapeToGroundBytes, 0x5C) + escapeToGroundBytes = append(escapeToGroundBytes, getByteRange(0x60, 0x7E)...) + return escapeToGroundBytes +} + +func getExecuteBytes() []byte { + executeBytes := getByteRange(0x00, 0x17) + executeBytes = append(executeBytes, 0x19) + executeBytes = append(executeBytes, getByteRange(0x1C, 0x1F)...) + return executeBytes +} + +func getToGroundBytes() []byte { + groundBytes := []byte{0x18} + groundBytes = append(groundBytes, 0x1A) + groundBytes = append(groundBytes, getByteRange(0x80, 0x8F)...) + groundBytes = append(groundBytes, getByteRange(0x91, 0x97)...) + groundBytes = append(groundBytes, 0x99) + groundBytes = append(groundBytes, 0x9A) + groundBytes = append(groundBytes, 0x9C) + return groundBytes +} + +// Delete 7F hex Always and everywhere ignored +// C1 Control 80-9F hex 32 additional control characters +// G1 Displayable A1-FE hex 94 additional displayable characters +// Special A0+FF hex Same as SPACE and DELETE diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/context.go b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/context.go new file mode 100644 index 000000000000..8d66e777c038 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/context.go @@ -0,0 +1,7 @@ +package ansiterm + +type ansiContext struct { + currentChar byte + paramBuffer []byte + interBuffer []byte +} diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/csi_entry_state.go b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/csi_entry_state.go new file mode 100644 index 000000000000..bcbe00d0c5ec --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/csi_entry_state.go @@ -0,0 +1,49 @@ +package ansiterm + +type csiEntryState struct { + baseState +} + +func (csiState csiEntryState) Handle(b byte) (s state, e error) { + csiState.parser.logf("CsiEntry::Handle %#x", b) + + nextState, err := csiState.baseState.Handle(b) + if nextState != nil || err != nil { + return nextState, err + } + + switch { + case sliceContains(alphabetics, b): + return csiState.parser.ground, nil + case sliceContains(csiCollectables, b): + return csiState.parser.csiParam, nil + case sliceContains(executors, b): + return csiState, csiState.parser.execute() + } + + return csiState, nil +} + +func (csiState csiEntryState) Transition(s state) error { + csiState.parser.logf("CsiEntry::Transition %s --> %s", csiState.Name(), s.Name()) + csiState.baseState.Transition(s) + + switch s { + case csiState.parser.ground: + return csiState.parser.csiDispatch() + case csiState.parser.csiParam: + switch { + case sliceContains(csiParams, csiState.parser.context.currentChar): + csiState.parser.collectParam() + case sliceContains(intermeds, csiState.parser.context.currentChar): + csiState.parser.collectInter() + } + } + + return nil +} + +func (csiState csiEntryState) Enter() error { + csiState.parser.clear() + return nil +} diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/csi_param_state.go b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/csi_param_state.go new file mode 100644 index 000000000000..7ed5e01c3428 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/csi_param_state.go @@ -0,0 +1,38 @@ +package ansiterm + +type csiParamState struct { + baseState +} + +func (csiState csiParamState) Handle(b byte) (s state, e error) { + csiState.parser.logf("CsiParam::Handle %#x", b) + + nextState, err := csiState.baseState.Handle(b) + if nextState != nil || err != nil { + return nextState, err + } + + switch { + case sliceContains(alphabetics, b): + return csiState.parser.ground, nil + case sliceContains(csiCollectables, b): + csiState.parser.collectParam() + return csiState, nil + case sliceContains(executors, b): + return csiState, csiState.parser.execute() + } + + return csiState, nil +} + +func (csiState csiParamState) Transition(s state) error { + csiState.parser.logf("CsiParam::Transition %s --> %s", csiState.Name(), s.Name()) + csiState.baseState.Transition(s) + + switch s { + case csiState.parser.ground: + return csiState.parser.csiDispatch() + } + + return nil +} diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/escape_intermediate_state.go b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/escape_intermediate_state.go new file mode 100644 index 000000000000..1c719db9e48c --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/escape_intermediate_state.go @@ -0,0 +1,36 @@ +package ansiterm + +type escapeIntermediateState struct { + baseState +} + +func (escState escapeIntermediateState) Handle(b byte) (s state, e error) { + escState.parser.logf("escapeIntermediateState::Handle %#x", b) + nextState, err := escState.baseState.Handle(b) + if nextState != nil || err != nil { + return nextState, err + } + + switch { + case sliceContains(intermeds, b): + return escState, escState.parser.collectInter() + case sliceContains(executors, b): + return escState, escState.parser.execute() + case sliceContains(escapeIntermediateToGroundBytes, b): + return escState.parser.ground, nil + } + + return escState, nil +} + +func (escState escapeIntermediateState) Transition(s state) error { + escState.parser.logf("escapeIntermediateState::Transition %s --> %s", escState.Name(), s.Name()) + escState.baseState.Transition(s) + + switch s { + case escState.parser.ground: + return escState.parser.escDispatch() + } + + return nil +} diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/escape_state.go b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/escape_state.go new file mode 100644 index 000000000000..6390abd231ba --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/escape_state.go @@ -0,0 +1,47 @@ +package ansiterm + +type escapeState struct { + baseState +} + +func (escState escapeState) Handle(b byte) (s state, e error) { + escState.parser.logf("escapeState::Handle %#x", b) + nextState, err := escState.baseState.Handle(b) + if nextState != nil || err != nil { + return nextState, err + } + + switch { + case b == ANSI_ESCAPE_SECONDARY: + return escState.parser.csiEntry, nil + case b == ANSI_OSC_STRING_ENTRY: + return escState.parser.oscString, nil + case sliceContains(executors, b): + return escState, escState.parser.execute() + case sliceContains(escapeToGroundBytes, b): + return escState.parser.ground, nil + case sliceContains(intermeds, b): + return escState.parser.escapeIntermediate, nil + } + + return escState, nil +} + +func (escState escapeState) Transition(s state) error { + escState.parser.logf("Escape::Transition %s --> %s", escState.Name(), s.Name()) + escState.baseState.Transition(s) + + switch s { + case escState.parser.ground: + return escState.parser.escDispatch() + case escState.parser.escapeIntermediate: + return escState.parser.collectInter() + } + + return nil +} + +func (escState escapeState) Enter() error { + escState.parser.clear() + return nil +} diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/event_handler.go b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/event_handler.go new file mode 100644 index 000000000000..98087b38c202 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/event_handler.go @@ -0,0 +1,90 @@ +package ansiterm + +type AnsiEventHandler interface { + // Print + Print(b byte) error + + // Execute C0 commands + Execute(b byte) error + + // CUrsor Up + CUU(int) error + + // CUrsor Down + CUD(int) error + + // CUrsor Forward + CUF(int) error + + // CUrsor Backward + CUB(int) error + + // Cursor to Next Line + CNL(int) error + + // Cursor to Previous Line + CPL(int) error + + // Cursor Horizontal position Absolute + CHA(int) error + + // Vertical line Position Absolute + VPA(int) error + + // CUrsor Position + CUP(int, int) error + + // Horizontal and Vertical Position (depends on PUM) + HVP(int, int) error + + // Text Cursor Enable Mode + DECTCEM(bool) error + + // Origin Mode + DECOM(bool) error + + // 132 Column Mode + DECCOLM(bool) error + + // Erase in Display + ED(int) error + + // Erase in Line + EL(int) error + + // Insert Line + IL(int) error + + // Delete Line + DL(int) error + + // Insert Character + ICH(int) error + + // Delete Character + DCH(int) error + + // Set Graphics Rendition + SGR([]int) error + + // Pan Down + SU(int) error + + // Pan Up + SD(int) error + + // Device Attributes + DA([]string) error + + // Set Top and Bottom Margins + DECSTBM(int, int) error + + // Index + IND() error + + // Reverse Index + RI() error + + // Flush updates from previous commands + Flush() error +} diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/go.mod b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/go.mod new file mode 100644 index 000000000000..965cb8120ec9 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/go.mod @@ -0,0 +1,5 @@ +module github.com/Azure/go-ansiterm + +go 1.16 + +require golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/go.sum b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/go.sum new file mode 100644 index 000000000000..9f05d9d3edde --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/go.sum @@ -0,0 +1,2 @@ +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 h1:RqytpXGR1iVNX7psjB3ff8y7sNFinVFvkx1c8SjBkio= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/ground_state.go b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/ground_state.go new file mode 100644 index 000000000000..52451e94693a --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/ground_state.go @@ -0,0 +1,24 @@ +package ansiterm + +type groundState struct { + baseState +} + +func (gs groundState) Handle(b byte) (s state, e error) { + gs.parser.context.currentChar = b + + nextState, err := gs.baseState.Handle(b) + if nextState != nil || err != nil { + return nextState, err + } + + switch { + case sliceContains(printables, b): + return gs, gs.parser.print() + + case sliceContains(executors, b): + return gs, gs.parser.execute() + } + + return gs, nil +} diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/osc_string_state.go b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/osc_string_state.go new file mode 100644 index 000000000000..593b10ab6963 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/osc_string_state.go @@ -0,0 +1,31 @@ +package ansiterm + +type oscStringState struct { + baseState +} + +func (oscState oscStringState) Handle(b byte) (s state, e error) { + oscState.parser.logf("OscString::Handle %#x", b) + nextState, err := oscState.baseState.Handle(b) + if nextState != nil || err != nil { + return nextState, err + } + + switch { + case isOscStringTerminator(b): + return oscState.parser.ground, nil + } + + return oscState, nil +} + +// See below for OSC string terminators for linux +// http://man7.org/linux/man-pages/man4/console_codes.4.html +func isOscStringTerminator(b byte) bool { + + if b == ANSI_BEL || b == 0x5C { + return true + } + + return false +} diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/parser.go b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/parser.go new file mode 100644 index 000000000000..03cec7ada62a --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/parser.go @@ -0,0 +1,151 @@ +package ansiterm + +import ( + "errors" + "log" + "os" +) + +type AnsiParser struct { + currState state + eventHandler AnsiEventHandler + context *ansiContext + csiEntry state + csiParam state + dcsEntry state + escape state + escapeIntermediate state + error state + ground state + oscString state + stateMap []state + + logf func(string, ...interface{}) +} + +type Option func(*AnsiParser) + +func WithLogf(f func(string, ...interface{})) Option { + return func(ap *AnsiParser) { + ap.logf = f + } +} + +func CreateParser(initialState string, evtHandler AnsiEventHandler, opts ...Option) *AnsiParser { + ap := &AnsiParser{ + eventHandler: evtHandler, + context: &ansiContext{}, + } + for _, o := range opts { + o(ap) + } + + if isDebugEnv := os.Getenv(LogEnv); isDebugEnv == "1" { + logFile, _ := os.Create("ansiParser.log") + logger := log.New(logFile, "", log.LstdFlags) + if ap.logf != nil { + l := ap.logf + ap.logf = func(s string, v ...interface{}) { + l(s, v...) + logger.Printf(s, v...) + } + } else { + ap.logf = logger.Printf + } + } + + if ap.logf == nil { + ap.logf = func(string, ...interface{}) {} + } + + ap.csiEntry = csiEntryState{baseState{name: "CsiEntry", parser: ap}} + ap.csiParam = csiParamState{baseState{name: "CsiParam", parser: ap}} + ap.dcsEntry = dcsEntryState{baseState{name: "DcsEntry", parser: ap}} + ap.escape = escapeState{baseState{name: "Escape", parser: ap}} + ap.escapeIntermediate = escapeIntermediateState{baseState{name: "EscapeIntermediate", parser: ap}} + ap.error = errorState{baseState{name: "Error", parser: ap}} + ap.ground = groundState{baseState{name: "Ground", parser: ap}} + ap.oscString = oscStringState{baseState{name: "OscString", parser: ap}} + + ap.stateMap = []state{ + ap.csiEntry, + ap.csiParam, + ap.dcsEntry, + ap.escape, + ap.escapeIntermediate, + ap.error, + ap.ground, + ap.oscString, + } + + ap.currState = getState(initialState, ap.stateMap) + + ap.logf("CreateParser: parser %p", ap) + return ap +} + +func getState(name string, states []state) state { + for _, el := range states { + if el.Name() == name { + return el + } + } + + return nil +} + +func (ap *AnsiParser) Parse(bytes []byte) (int, error) { + for i, b := range bytes { + if err := ap.handle(b); err != nil { + return i, err + } + } + + return len(bytes), ap.eventHandler.Flush() +} + +func (ap *AnsiParser) handle(b byte) error { + ap.context.currentChar = b + newState, err := ap.currState.Handle(b) + if err != nil { + return err + } + + if newState == nil { + ap.logf("WARNING: newState is nil") + return errors.New("New state of 'nil' is invalid.") + } + + if newState != ap.currState { + if err := ap.changeState(newState); err != nil { + return err + } + } + + return nil +} + +func (ap *AnsiParser) changeState(newState state) error { + ap.logf("ChangeState %s --> %s", ap.currState.Name(), newState.Name()) + + // Exit old state + if err := ap.currState.Exit(); err != nil { + ap.logf("Exit state '%s' failed with : '%v'", ap.currState.Name(), err) + return err + } + + // Perform transition action + if err := ap.currState.Transition(newState); err != nil { + ap.logf("Transition from '%s' to '%s' failed with: '%v'", ap.currState.Name(), newState.Name, err) + return err + } + + // Enter new state + if err := newState.Enter(); err != nil { + ap.logf("Enter state '%s' failed with: '%v'", newState.Name(), err) + return err + } + + ap.currState = newState + return nil +} diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/parser_action_helpers.go b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/parser_action_helpers.go new file mode 100644 index 000000000000..de0a1f9cde3b --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/parser_action_helpers.go @@ -0,0 +1,99 @@ +package ansiterm + +import ( + "strconv" +) + +func parseParams(bytes []byte) ([]string, error) { + paramBuff := make([]byte, 0, 0) + params := []string{} + + for _, v := range bytes { + if v == ';' { + if len(paramBuff) > 0 { + // Completed parameter, append it to the list + s := string(paramBuff) + params = append(params, s) + paramBuff = make([]byte, 0, 0) + } + } else { + paramBuff = append(paramBuff, v) + } + } + + // Last parameter may not be terminated with ';' + if len(paramBuff) > 0 { + s := string(paramBuff) + params = append(params, s) + } + + return params, nil +} + +func parseCmd(context ansiContext) (string, error) { + return string(context.currentChar), nil +} + +func getInt(params []string, dflt int) int { + i := getInts(params, 1, dflt)[0] + return i +} + +func getInts(params []string, minCount int, dflt int) []int { + ints := []int{} + + for _, v := range params { + i, _ := strconv.Atoi(v) + // Zero is mapped to the default value in VT100. + if i == 0 { + i = dflt + } + ints = append(ints, i) + } + + if len(ints) < minCount { + remaining := minCount - len(ints) + for i := 0; i < remaining; i++ { + ints = append(ints, dflt) + } + } + + return ints +} + +func (ap *AnsiParser) modeDispatch(param string, set bool) error { + switch param { + case "?3": + return ap.eventHandler.DECCOLM(set) + case "?6": + return ap.eventHandler.DECOM(set) + case "?25": + return ap.eventHandler.DECTCEM(set) + } + return nil +} + +func (ap *AnsiParser) hDispatch(params []string) error { + if len(params) == 1 { + return ap.modeDispatch(params[0], true) + } + + return nil +} + +func (ap *AnsiParser) lDispatch(params []string) error { + if len(params) == 1 { + return ap.modeDispatch(params[0], false) + } + + return nil +} + +func getEraseParam(params []string) int { + param := getInt(params, 0) + if param < 0 || 3 < param { + param = 0 + } + + return param +} diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/parser_actions.go b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/parser_actions.go new file mode 100644 index 000000000000..0bb5e51e9aa6 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/parser_actions.go @@ -0,0 +1,119 @@ +package ansiterm + +func (ap *AnsiParser) collectParam() error { + currChar := ap.context.currentChar + ap.logf("collectParam %#x", currChar) + ap.context.paramBuffer = append(ap.context.paramBuffer, currChar) + return nil +} + +func (ap *AnsiParser) collectInter() error { + currChar := ap.context.currentChar + ap.logf("collectInter %#x", currChar) + ap.context.paramBuffer = append(ap.context.interBuffer, currChar) + return nil +} + +func (ap *AnsiParser) escDispatch() error { + cmd, _ := parseCmd(*ap.context) + intermeds := ap.context.interBuffer + ap.logf("escDispatch currentChar: %#x", ap.context.currentChar) + ap.logf("escDispatch: %v(%v)", cmd, intermeds) + + switch cmd { + case "D": // IND + return ap.eventHandler.IND() + case "E": // NEL, equivalent to CRLF + err := ap.eventHandler.Execute(ANSI_CARRIAGE_RETURN) + if err == nil { + err = ap.eventHandler.Execute(ANSI_LINE_FEED) + } + return err + case "M": // RI + return ap.eventHandler.RI() + } + + return nil +} + +func (ap *AnsiParser) csiDispatch() error { + cmd, _ := parseCmd(*ap.context) + params, _ := parseParams(ap.context.paramBuffer) + ap.logf("Parsed params: %v with length: %d", params, len(params)) + + ap.logf("csiDispatch: %v(%v)", cmd, params) + + switch cmd { + case "@": + return ap.eventHandler.ICH(getInt(params, 1)) + case "A": + return ap.eventHandler.CUU(getInt(params, 1)) + case "B": + return ap.eventHandler.CUD(getInt(params, 1)) + case "C": + return ap.eventHandler.CUF(getInt(params, 1)) + case "D": + return ap.eventHandler.CUB(getInt(params, 1)) + case "E": + return ap.eventHandler.CNL(getInt(params, 1)) + case "F": + return ap.eventHandler.CPL(getInt(params, 1)) + case "G": + return ap.eventHandler.CHA(getInt(params, 1)) + case "H": + ints := getInts(params, 2, 1) + x, y := ints[0], ints[1] + return ap.eventHandler.CUP(x, y) + case "J": + param := getEraseParam(params) + return ap.eventHandler.ED(param) + case "K": + param := getEraseParam(params) + return ap.eventHandler.EL(param) + case "L": + return ap.eventHandler.IL(getInt(params, 1)) + case "M": + return ap.eventHandler.DL(getInt(params, 1)) + case "P": + return ap.eventHandler.DCH(getInt(params, 1)) + case "S": + return ap.eventHandler.SU(getInt(params, 1)) + case "T": + return ap.eventHandler.SD(getInt(params, 1)) + case "c": + return ap.eventHandler.DA(params) + case "d": + return ap.eventHandler.VPA(getInt(params, 1)) + case "f": + ints := getInts(params, 2, 1) + x, y := ints[0], ints[1] + return ap.eventHandler.HVP(x, y) + case "h": + return ap.hDispatch(params) + case "l": + return ap.lDispatch(params) + case "m": + return ap.eventHandler.SGR(getInts(params, 1, 0)) + case "r": + ints := getInts(params, 2, 1) + top, bottom := ints[0], ints[1] + return ap.eventHandler.DECSTBM(top, bottom) + default: + ap.logf("ERROR: Unsupported CSI command: '%s', with full context: %v", cmd, ap.context) + return nil + } + +} + +func (ap *AnsiParser) print() error { + return ap.eventHandler.Print(ap.context.currentChar) +} + +func (ap *AnsiParser) clear() error { + ap.context = &ansiContext{} + return nil +} + +func (ap *AnsiParser) execute() error { + return ap.eventHandler.Execute(ap.context.currentChar) +} diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/states.go b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/states.go new file mode 100644 index 000000000000..f2ea1fcd12da --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/states.go @@ -0,0 +1,71 @@ +package ansiterm + +type stateID int + +type state interface { + Enter() error + Exit() error + Handle(byte) (state, error) + Name() string + Transition(state) error +} + +type baseState struct { + name string + parser *AnsiParser +} + +func (base baseState) Enter() error { + return nil +} + +func (base baseState) Exit() error { + return nil +} + +func (base baseState) Handle(b byte) (s state, e error) { + + switch { + case b == CSI_ENTRY: + return base.parser.csiEntry, nil + case b == DCS_ENTRY: + return base.parser.dcsEntry, nil + case b == ANSI_ESCAPE_PRIMARY: + return base.parser.escape, nil + case b == OSC_STRING: + return base.parser.oscString, nil + case sliceContains(toGroundBytes, b): + return base.parser.ground, nil + } + + return nil, nil +} + +func (base baseState) Name() string { + return base.name +} + +func (base baseState) Transition(s state) error { + if s == base.parser.ground { + execBytes := []byte{0x18} + execBytes = append(execBytes, 0x1A) + execBytes = append(execBytes, getByteRange(0x80, 0x8F)...) + execBytes = append(execBytes, getByteRange(0x91, 0x97)...) + execBytes = append(execBytes, 0x99) + execBytes = append(execBytes, 0x9A) + + if sliceContains(execBytes, base.parser.context.currentChar) { + return base.parser.execute() + } + } + + return nil +} + +type dcsEntryState struct { + baseState +} + +type errorState struct { + baseState +} diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/utilities.go b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/utilities.go new file mode 100644 index 000000000000..392114493a22 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/utilities.go @@ -0,0 +1,21 @@ +package ansiterm + +import ( + "strconv" +) + +func sliceContains(bytes []byte, b byte) bool { + for _, v := range bytes { + if v == b { + return true + } + } + + return false +} + +func convertBytesToInteger(bytes []byte) int { + s := string(bytes) + i, _ := strconv.Atoi(s) + return i +} diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/winterm/ansi.go b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/winterm/ansi.go new file mode 100644 index 000000000000..5599082ae9cb --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/winterm/ansi.go @@ -0,0 +1,196 @@ +// +build windows + +package winterm + +import ( + "fmt" + "os" + "strconv" + "strings" + "syscall" + + "github.com/Azure/go-ansiterm" + windows "golang.org/x/sys/windows" +) + +// Windows keyboard constants +// See https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx. +const ( + VK_PRIOR = 0x21 // PAGE UP key + VK_NEXT = 0x22 // PAGE DOWN key + VK_END = 0x23 // END key + VK_HOME = 0x24 // HOME key + VK_LEFT = 0x25 // LEFT ARROW key + VK_UP = 0x26 // UP ARROW key + VK_RIGHT = 0x27 // RIGHT ARROW key + VK_DOWN = 0x28 // DOWN ARROW key + VK_SELECT = 0x29 // SELECT key + VK_PRINT = 0x2A // PRINT key + VK_EXECUTE = 0x2B // EXECUTE key + VK_SNAPSHOT = 0x2C // PRINT SCREEN key + VK_INSERT = 0x2D // INS key + VK_DELETE = 0x2E // DEL key + VK_HELP = 0x2F // HELP key + VK_F1 = 0x70 // F1 key + VK_F2 = 0x71 // F2 key + VK_F3 = 0x72 // F3 key + VK_F4 = 0x73 // F4 key + VK_F5 = 0x74 // F5 key + VK_F6 = 0x75 // F6 key + VK_F7 = 0x76 // F7 key + VK_F8 = 0x77 // F8 key + VK_F9 = 0x78 // F9 key + VK_F10 = 0x79 // F10 key + VK_F11 = 0x7A // F11 key + VK_F12 = 0x7B // F12 key + + RIGHT_ALT_PRESSED = 0x0001 + LEFT_ALT_PRESSED = 0x0002 + RIGHT_CTRL_PRESSED = 0x0004 + LEFT_CTRL_PRESSED = 0x0008 + SHIFT_PRESSED = 0x0010 + NUMLOCK_ON = 0x0020 + SCROLLLOCK_ON = 0x0040 + CAPSLOCK_ON = 0x0080 + ENHANCED_KEY = 0x0100 +) + +type ansiCommand struct { + CommandBytes []byte + Command string + Parameters []string + IsSpecial bool +} + +func newAnsiCommand(command []byte) *ansiCommand { + + if isCharacterSelectionCmdChar(command[1]) { + // Is Character Set Selection commands + return &ansiCommand{ + CommandBytes: command, + Command: string(command), + IsSpecial: true, + } + } + + // last char is command character + lastCharIndex := len(command) - 1 + + ac := &ansiCommand{ + CommandBytes: command, + Command: string(command[lastCharIndex]), + IsSpecial: false, + } + + // more than a single escape + if lastCharIndex != 0 { + start := 1 + // skip if double char escape sequence + if command[0] == ansiterm.ANSI_ESCAPE_PRIMARY && command[1] == ansiterm.ANSI_ESCAPE_SECONDARY { + start++ + } + // convert this to GetNextParam method + ac.Parameters = strings.Split(string(command[start:lastCharIndex]), ansiterm.ANSI_PARAMETER_SEP) + } + + return ac +} + +func (ac *ansiCommand) paramAsSHORT(index int, defaultValue int16) int16 { + if index < 0 || index >= len(ac.Parameters) { + return defaultValue + } + + param, err := strconv.ParseInt(ac.Parameters[index], 10, 16) + if err != nil { + return defaultValue + } + + return int16(param) +} + +func (ac *ansiCommand) String() string { + return fmt.Sprintf("0x%v \"%v\" (\"%v\")", + bytesToHex(ac.CommandBytes), + ac.Command, + strings.Join(ac.Parameters, "\",\"")) +} + +// isAnsiCommandChar returns true if the passed byte falls within the range of ANSI commands. +// See http://manpages.ubuntu.com/manpages/intrepid/man4/console_codes.4.html. +func isAnsiCommandChar(b byte) bool { + switch { + case ansiterm.ANSI_COMMAND_FIRST <= b && b <= ansiterm.ANSI_COMMAND_LAST && b != ansiterm.ANSI_ESCAPE_SECONDARY: + return true + case b == ansiterm.ANSI_CMD_G1 || b == ansiterm.ANSI_CMD_OSC || b == ansiterm.ANSI_CMD_DECPAM || b == ansiterm.ANSI_CMD_DECPNM: + // non-CSI escape sequence terminator + return true + case b == ansiterm.ANSI_CMD_STR_TERM || b == ansiterm.ANSI_BEL: + // String escape sequence terminator + return true + } + return false +} + +func isXtermOscSequence(command []byte, current byte) bool { + return (len(command) >= 2 && command[0] == ansiterm.ANSI_ESCAPE_PRIMARY && command[1] == ansiterm.ANSI_CMD_OSC && current != ansiterm.ANSI_BEL) +} + +func isCharacterSelectionCmdChar(b byte) bool { + return (b == ansiterm.ANSI_CMD_G0 || b == ansiterm.ANSI_CMD_G1 || b == ansiterm.ANSI_CMD_G2 || b == ansiterm.ANSI_CMD_G3) +} + +// bytesToHex converts a slice of bytes to a human-readable string. +func bytesToHex(b []byte) string { + hex := make([]string, len(b)) + for i, ch := range b { + hex[i] = fmt.Sprintf("%X", ch) + } + return strings.Join(hex, "") +} + +// ensureInRange adjusts the passed value, if necessary, to ensure it is within +// the passed min / max range. +func ensureInRange(n int16, min int16, max int16) int16 { + if n < min { + return min + } else if n > max { + return max + } else { + return n + } +} + +func GetStdFile(nFile int) (*os.File, uintptr) { + var file *os.File + + // syscall uses negative numbers + // windows package uses very big uint32 + // Keep these switches split so we don't have to convert ints too much. + switch uint32(nFile) { + case windows.STD_INPUT_HANDLE: + file = os.Stdin + case windows.STD_OUTPUT_HANDLE: + file = os.Stdout + case windows.STD_ERROR_HANDLE: + file = os.Stderr + default: + switch nFile { + case syscall.STD_INPUT_HANDLE: + file = os.Stdin + case syscall.STD_OUTPUT_HANDLE: + file = os.Stdout + case syscall.STD_ERROR_HANDLE: + file = os.Stderr + default: + panic(fmt.Errorf("Invalid standard handle identifier: %v", nFile)) + } + } + + fd, err := syscall.GetStdHandle(nFile) + if err != nil { + panic(fmt.Errorf("Invalid standard handle identifier: %v -- %v", nFile, err)) + } + + return file, uintptr(fd) +} diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/winterm/api.go b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/winterm/api.go new file mode 100644 index 000000000000..6055e33b912b --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/winterm/api.go @@ -0,0 +1,327 @@ +// +build windows + +package winterm + +import ( + "fmt" + "syscall" + "unsafe" +) + +//=========================================================================================================== +// IMPORTANT NOTE: +// +// The methods below make extensive use of the "unsafe" package to obtain the required pointers. +// Beginning in Go 1.3, the garbage collector may release local variables (e.g., incoming arguments, stack +// variables) the pointers reference *before* the API completes. +// +// As a result, in those cases, the code must hint that the variables remain in active by invoking the +// dummy method "use" (see below). Newer versions of Go are planned to change the mechanism to no longer +// require unsafe pointers. +// +// If you add or modify methods, ENSURE protection of local variables through the "use" builtin to inform +// the garbage collector the variables remain in use if: +// +// -- The value is not a pointer (e.g., int32, struct) +// -- The value is not referenced by the method after passing the pointer to Windows +// +// See http://golang.org/doc/go1.3. +//=========================================================================================================== + +var ( + kernel32DLL = syscall.NewLazyDLL("kernel32.dll") + + getConsoleCursorInfoProc = kernel32DLL.NewProc("GetConsoleCursorInfo") + setConsoleCursorInfoProc = kernel32DLL.NewProc("SetConsoleCursorInfo") + setConsoleCursorPositionProc = kernel32DLL.NewProc("SetConsoleCursorPosition") + setConsoleModeProc = kernel32DLL.NewProc("SetConsoleMode") + getConsoleScreenBufferInfoProc = kernel32DLL.NewProc("GetConsoleScreenBufferInfo") + setConsoleScreenBufferSizeProc = kernel32DLL.NewProc("SetConsoleScreenBufferSize") + scrollConsoleScreenBufferProc = kernel32DLL.NewProc("ScrollConsoleScreenBufferA") + setConsoleTextAttributeProc = kernel32DLL.NewProc("SetConsoleTextAttribute") + setConsoleWindowInfoProc = kernel32DLL.NewProc("SetConsoleWindowInfo") + writeConsoleOutputProc = kernel32DLL.NewProc("WriteConsoleOutputW") + readConsoleInputProc = kernel32DLL.NewProc("ReadConsoleInputW") + waitForSingleObjectProc = kernel32DLL.NewProc("WaitForSingleObject") +) + +// Windows Console constants +const ( + // Console modes + // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms686033(v=vs.85).aspx. + ENABLE_PROCESSED_INPUT = 0x0001 + ENABLE_LINE_INPUT = 0x0002 + ENABLE_ECHO_INPUT = 0x0004 + ENABLE_WINDOW_INPUT = 0x0008 + ENABLE_MOUSE_INPUT = 0x0010 + ENABLE_INSERT_MODE = 0x0020 + ENABLE_QUICK_EDIT_MODE = 0x0040 + ENABLE_EXTENDED_FLAGS = 0x0080 + ENABLE_AUTO_POSITION = 0x0100 + ENABLE_VIRTUAL_TERMINAL_INPUT = 0x0200 + + ENABLE_PROCESSED_OUTPUT = 0x0001 + ENABLE_WRAP_AT_EOL_OUTPUT = 0x0002 + ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x0004 + DISABLE_NEWLINE_AUTO_RETURN = 0x0008 + ENABLE_LVB_GRID_WORLDWIDE = 0x0010 + + // Character attributes + // Note: + // -- The attributes are combined to produce various colors (e.g., Blue + Green will create Cyan). + // Clearing all foreground or background colors results in black; setting all creates white. + // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms682088(v=vs.85).aspx#_win32_character_attributes. + FOREGROUND_BLUE uint16 = 0x0001 + FOREGROUND_GREEN uint16 = 0x0002 + FOREGROUND_RED uint16 = 0x0004 + FOREGROUND_INTENSITY uint16 = 0x0008 + FOREGROUND_MASK uint16 = 0x000F + + BACKGROUND_BLUE uint16 = 0x0010 + BACKGROUND_GREEN uint16 = 0x0020 + BACKGROUND_RED uint16 = 0x0040 + BACKGROUND_INTENSITY uint16 = 0x0080 + BACKGROUND_MASK uint16 = 0x00F0 + + COMMON_LVB_MASK uint16 = 0xFF00 + COMMON_LVB_REVERSE_VIDEO uint16 = 0x4000 + COMMON_LVB_UNDERSCORE uint16 = 0x8000 + + // Input event types + // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms683499(v=vs.85).aspx. + KEY_EVENT = 0x0001 + MOUSE_EVENT = 0x0002 + WINDOW_BUFFER_SIZE_EVENT = 0x0004 + MENU_EVENT = 0x0008 + FOCUS_EVENT = 0x0010 + + // WaitForSingleObject return codes + WAIT_ABANDONED = 0x00000080 + WAIT_FAILED = 0xFFFFFFFF + WAIT_SIGNALED = 0x0000000 + WAIT_TIMEOUT = 0x00000102 + + // WaitForSingleObject wait duration + WAIT_INFINITE = 0xFFFFFFFF + WAIT_ONE_SECOND = 1000 + WAIT_HALF_SECOND = 500 + WAIT_QUARTER_SECOND = 250 +) + +// Windows API Console types +// -- See https://msdn.microsoft.com/en-us/library/windows/desktop/ms682101(v=vs.85).aspx for Console specific types (e.g., COORD) +// -- See https://msdn.microsoft.com/en-us/library/aa296569(v=vs.60).aspx for comments on alignment +type ( + CHAR_INFO struct { + UnicodeChar uint16 + Attributes uint16 + } + + CONSOLE_CURSOR_INFO struct { + Size uint32 + Visible int32 + } + + CONSOLE_SCREEN_BUFFER_INFO struct { + Size COORD + CursorPosition COORD + Attributes uint16 + Window SMALL_RECT + MaximumWindowSize COORD + } + + COORD struct { + X int16 + Y int16 + } + + SMALL_RECT struct { + Left int16 + Top int16 + Right int16 + Bottom int16 + } + + // INPUT_RECORD is a C/C++ union of which KEY_EVENT_RECORD is one case, it is also the largest + // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms683499(v=vs.85).aspx. + INPUT_RECORD struct { + EventType uint16 + KeyEvent KEY_EVENT_RECORD + } + + KEY_EVENT_RECORD struct { + KeyDown int32 + RepeatCount uint16 + VirtualKeyCode uint16 + VirtualScanCode uint16 + UnicodeChar uint16 + ControlKeyState uint32 + } + + WINDOW_BUFFER_SIZE struct { + Size COORD + } +) + +// boolToBOOL converts a Go bool into a Windows int32. +func boolToBOOL(f bool) int32 { + if f { + return int32(1) + } else { + return int32(0) + } +} + +// GetConsoleCursorInfo retrieves information about the size and visiblity of the console cursor. +// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms683163(v=vs.85).aspx. +func GetConsoleCursorInfo(handle uintptr, cursorInfo *CONSOLE_CURSOR_INFO) error { + r1, r2, err := getConsoleCursorInfoProc.Call(handle, uintptr(unsafe.Pointer(cursorInfo)), 0) + return checkError(r1, r2, err) +} + +// SetConsoleCursorInfo sets the size and visiblity of the console cursor. +// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms686019(v=vs.85).aspx. +func SetConsoleCursorInfo(handle uintptr, cursorInfo *CONSOLE_CURSOR_INFO) error { + r1, r2, err := setConsoleCursorInfoProc.Call(handle, uintptr(unsafe.Pointer(cursorInfo)), 0) + return checkError(r1, r2, err) +} + +// SetConsoleCursorPosition location of the console cursor. +// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms686025(v=vs.85).aspx. +func SetConsoleCursorPosition(handle uintptr, coord COORD) error { + r1, r2, err := setConsoleCursorPositionProc.Call(handle, coordToPointer(coord)) + use(coord) + return checkError(r1, r2, err) +} + +// GetConsoleMode gets the console mode for given file descriptor +// See http://msdn.microsoft.com/en-us/library/windows/desktop/ms683167(v=vs.85).aspx. +func GetConsoleMode(handle uintptr) (mode uint32, err error) { + err = syscall.GetConsoleMode(syscall.Handle(handle), &mode) + return mode, err +} + +// SetConsoleMode sets the console mode for given file descriptor +// See http://msdn.microsoft.com/en-us/library/windows/desktop/ms686033(v=vs.85).aspx. +func SetConsoleMode(handle uintptr, mode uint32) error { + r1, r2, err := setConsoleModeProc.Call(handle, uintptr(mode), 0) + use(mode) + return checkError(r1, r2, err) +} + +// GetConsoleScreenBufferInfo retrieves information about the specified console screen buffer. +// See http://msdn.microsoft.com/en-us/library/windows/desktop/ms683171(v=vs.85).aspx. +func GetConsoleScreenBufferInfo(handle uintptr) (*CONSOLE_SCREEN_BUFFER_INFO, error) { + info := CONSOLE_SCREEN_BUFFER_INFO{} + err := checkError(getConsoleScreenBufferInfoProc.Call(handle, uintptr(unsafe.Pointer(&info)), 0)) + if err != nil { + return nil, err + } + return &info, nil +} + +func ScrollConsoleScreenBuffer(handle uintptr, scrollRect SMALL_RECT, clipRect SMALL_RECT, destOrigin COORD, char CHAR_INFO) error { + r1, r2, err := scrollConsoleScreenBufferProc.Call(handle, uintptr(unsafe.Pointer(&scrollRect)), uintptr(unsafe.Pointer(&clipRect)), coordToPointer(destOrigin), uintptr(unsafe.Pointer(&char))) + use(scrollRect) + use(clipRect) + use(destOrigin) + use(char) + return checkError(r1, r2, err) +} + +// SetConsoleScreenBufferSize sets the size of the console screen buffer. +// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms686044(v=vs.85).aspx. +func SetConsoleScreenBufferSize(handle uintptr, coord COORD) error { + r1, r2, err := setConsoleScreenBufferSizeProc.Call(handle, coordToPointer(coord)) + use(coord) + return checkError(r1, r2, err) +} + +// SetConsoleTextAttribute sets the attributes of characters written to the +// console screen buffer by the WriteFile or WriteConsole function. +// See http://msdn.microsoft.com/en-us/library/windows/desktop/ms686047(v=vs.85).aspx. +func SetConsoleTextAttribute(handle uintptr, attribute uint16) error { + r1, r2, err := setConsoleTextAttributeProc.Call(handle, uintptr(attribute), 0) + use(attribute) + return checkError(r1, r2, err) +} + +// SetConsoleWindowInfo sets the size and position of the console screen buffer's window. +// Note that the size and location must be within and no larger than the backing console screen buffer. +// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms686125(v=vs.85).aspx. +func SetConsoleWindowInfo(handle uintptr, isAbsolute bool, rect SMALL_RECT) error { + r1, r2, err := setConsoleWindowInfoProc.Call(handle, uintptr(boolToBOOL(isAbsolute)), uintptr(unsafe.Pointer(&rect))) + use(isAbsolute) + use(rect) + return checkError(r1, r2, err) +} + +// WriteConsoleOutput writes the CHAR_INFOs from the provided buffer to the active console buffer. +// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms687404(v=vs.85).aspx. +func WriteConsoleOutput(handle uintptr, buffer []CHAR_INFO, bufferSize COORD, bufferCoord COORD, writeRegion *SMALL_RECT) error { + r1, r2, err := writeConsoleOutputProc.Call(handle, uintptr(unsafe.Pointer(&buffer[0])), coordToPointer(bufferSize), coordToPointer(bufferCoord), uintptr(unsafe.Pointer(writeRegion))) + use(buffer) + use(bufferSize) + use(bufferCoord) + return checkError(r1, r2, err) +} + +// ReadConsoleInput reads (and removes) data from the console input buffer. +// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms684961(v=vs.85).aspx. +func ReadConsoleInput(handle uintptr, buffer []INPUT_RECORD, count *uint32) error { + r1, r2, err := readConsoleInputProc.Call(handle, uintptr(unsafe.Pointer(&buffer[0])), uintptr(len(buffer)), uintptr(unsafe.Pointer(count))) + use(buffer) + return checkError(r1, r2, err) +} + +// WaitForSingleObject waits for the passed handle to be signaled. +// It returns true if the handle was signaled; false otherwise. +// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms687032(v=vs.85).aspx. +func WaitForSingleObject(handle uintptr, msWait uint32) (bool, error) { + r1, _, err := waitForSingleObjectProc.Call(handle, uintptr(uint32(msWait))) + switch r1 { + case WAIT_ABANDONED, WAIT_TIMEOUT: + return false, nil + case WAIT_SIGNALED: + return true, nil + } + use(msWait) + return false, err +} + +// String helpers +func (info CONSOLE_SCREEN_BUFFER_INFO) String() string { + return fmt.Sprintf("Size(%v) Cursor(%v) Window(%v) Max(%v)", info.Size, info.CursorPosition, info.Window, info.MaximumWindowSize) +} + +func (coord COORD) String() string { + return fmt.Sprintf("%v,%v", coord.X, coord.Y) +} + +func (rect SMALL_RECT) String() string { + return fmt.Sprintf("(%v,%v),(%v,%v)", rect.Left, rect.Top, rect.Right, rect.Bottom) +} + +// checkError evaluates the results of a Windows API call and returns the error if it failed. +func checkError(r1, r2 uintptr, err error) error { + // Windows APIs return non-zero to indicate success + if r1 != 0 { + return nil + } + + // Return the error if provided, otherwise default to EINVAL + if err != nil { + return err + } + return syscall.EINVAL +} + +// coordToPointer converts a COORD into a uintptr (by fooling the type system). +func coordToPointer(c COORD) uintptr { + // Note: This code assumes the two SHORTs are correctly laid out; the "cast" to uint32 is just to get a pointer to pass. + return uintptr(*((*uint32)(unsafe.Pointer(&c)))) +} + +// use is a no-op, but the compiler cannot see that it is. +// Calling use(p) ensures that p is kept live until that point. +func use(p interface{}) {} diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/winterm/attr_translation.go b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/winterm/attr_translation.go new file mode 100644 index 000000000000..cbec8f728f49 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/winterm/attr_translation.go @@ -0,0 +1,100 @@ +// +build windows + +package winterm + +import "github.com/Azure/go-ansiterm" + +const ( + FOREGROUND_COLOR_MASK = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE + BACKGROUND_COLOR_MASK = BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE +) + +// collectAnsiIntoWindowsAttributes modifies the passed Windows text mode flags to reflect the +// request represented by the passed ANSI mode. +func collectAnsiIntoWindowsAttributes(windowsMode uint16, inverted bool, baseMode uint16, ansiMode int16) (uint16, bool) { + switch ansiMode { + + // Mode styles + case ansiterm.ANSI_SGR_BOLD: + windowsMode = windowsMode | FOREGROUND_INTENSITY + + case ansiterm.ANSI_SGR_DIM, ansiterm.ANSI_SGR_BOLD_DIM_OFF: + windowsMode &^= FOREGROUND_INTENSITY + + case ansiterm.ANSI_SGR_UNDERLINE: + windowsMode = windowsMode | COMMON_LVB_UNDERSCORE + + case ansiterm.ANSI_SGR_REVERSE: + inverted = true + + case ansiterm.ANSI_SGR_REVERSE_OFF: + inverted = false + + case ansiterm.ANSI_SGR_UNDERLINE_OFF: + windowsMode &^= COMMON_LVB_UNDERSCORE + + // Foreground colors + case ansiterm.ANSI_SGR_FOREGROUND_DEFAULT: + windowsMode = (windowsMode &^ FOREGROUND_MASK) | (baseMode & FOREGROUND_MASK) + + case ansiterm.ANSI_SGR_FOREGROUND_BLACK: + windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) + + case ansiterm.ANSI_SGR_FOREGROUND_RED: + windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_RED + + case ansiterm.ANSI_SGR_FOREGROUND_GREEN: + windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_GREEN + + case ansiterm.ANSI_SGR_FOREGROUND_YELLOW: + windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_RED | FOREGROUND_GREEN + + case ansiterm.ANSI_SGR_FOREGROUND_BLUE: + windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_BLUE + + case ansiterm.ANSI_SGR_FOREGROUND_MAGENTA: + windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_RED | FOREGROUND_BLUE + + case ansiterm.ANSI_SGR_FOREGROUND_CYAN: + windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_GREEN | FOREGROUND_BLUE + + case ansiterm.ANSI_SGR_FOREGROUND_WHITE: + windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE + + // Background colors + case ansiterm.ANSI_SGR_BACKGROUND_DEFAULT: + // Black with no intensity + windowsMode = (windowsMode &^ BACKGROUND_MASK) | (baseMode & BACKGROUND_MASK) + + case ansiterm.ANSI_SGR_BACKGROUND_BLACK: + windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) + + case ansiterm.ANSI_SGR_BACKGROUND_RED: + windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_RED + + case ansiterm.ANSI_SGR_BACKGROUND_GREEN: + windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_GREEN + + case ansiterm.ANSI_SGR_BACKGROUND_YELLOW: + windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_RED | BACKGROUND_GREEN + + case ansiterm.ANSI_SGR_BACKGROUND_BLUE: + windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_BLUE + + case ansiterm.ANSI_SGR_BACKGROUND_MAGENTA: + windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_RED | BACKGROUND_BLUE + + case ansiterm.ANSI_SGR_BACKGROUND_CYAN: + windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_GREEN | BACKGROUND_BLUE + + case ansiterm.ANSI_SGR_BACKGROUND_WHITE: + windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE + } + + return windowsMode, inverted +} + +// invertAttributes inverts the foreground and background colors of a Windows attributes value +func invertAttributes(windowsMode uint16) uint16 { + return (COMMON_LVB_MASK & windowsMode) | ((FOREGROUND_MASK & windowsMode) << 4) | ((BACKGROUND_MASK & windowsMode) >> 4) +} diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go new file mode 100644 index 000000000000..3ee06ea72824 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go @@ -0,0 +1,101 @@ +// +build windows + +package winterm + +const ( + horizontal = iota + vertical +) + +func (h *windowsAnsiEventHandler) getCursorWindow(info *CONSOLE_SCREEN_BUFFER_INFO) SMALL_RECT { + if h.originMode { + sr := h.effectiveSr(info.Window) + return SMALL_RECT{ + Top: sr.top, + Bottom: sr.bottom, + Left: 0, + Right: info.Size.X - 1, + } + } else { + return SMALL_RECT{ + Top: info.Window.Top, + Bottom: info.Window.Bottom, + Left: 0, + Right: info.Size.X - 1, + } + } +} + +// setCursorPosition sets the cursor to the specified position, bounded to the screen size +func (h *windowsAnsiEventHandler) setCursorPosition(position COORD, window SMALL_RECT) error { + position.X = ensureInRange(position.X, window.Left, window.Right) + position.Y = ensureInRange(position.Y, window.Top, window.Bottom) + err := SetConsoleCursorPosition(h.fd, position) + if err != nil { + return err + } + h.logf("Cursor position set: (%d, %d)", position.X, position.Y) + return err +} + +func (h *windowsAnsiEventHandler) moveCursorVertical(param int) error { + return h.moveCursor(vertical, param) +} + +func (h *windowsAnsiEventHandler) moveCursorHorizontal(param int) error { + return h.moveCursor(horizontal, param) +} + +func (h *windowsAnsiEventHandler) moveCursor(moveMode int, param int) error { + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + + position := info.CursorPosition + switch moveMode { + case horizontal: + position.X += int16(param) + case vertical: + position.Y += int16(param) + } + + if err = h.setCursorPosition(position, h.getCursorWindow(info)); err != nil { + return err + } + + return nil +} + +func (h *windowsAnsiEventHandler) moveCursorLine(param int) error { + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + + position := info.CursorPosition + position.X = 0 + position.Y += int16(param) + + if err = h.setCursorPosition(position, h.getCursorWindow(info)); err != nil { + return err + } + + return nil +} + +func (h *windowsAnsiEventHandler) moveCursorColumn(param int) error { + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + + position := info.CursorPosition + position.X = int16(param) - 1 + + if err = h.setCursorPosition(position, h.getCursorWindow(info)); err != nil { + return err + } + + return nil +} diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/winterm/erase_helpers.go b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/winterm/erase_helpers.go new file mode 100644 index 000000000000..244b5fa25efb --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/winterm/erase_helpers.go @@ -0,0 +1,84 @@ +// +build windows + +package winterm + +import "github.com/Azure/go-ansiterm" + +func (h *windowsAnsiEventHandler) clearRange(attributes uint16, fromCoord COORD, toCoord COORD) error { + // Ignore an invalid (negative area) request + if toCoord.Y < fromCoord.Y { + return nil + } + + var err error + + var coordStart = COORD{} + var coordEnd = COORD{} + + xCurrent, yCurrent := fromCoord.X, fromCoord.Y + xEnd, yEnd := toCoord.X, toCoord.Y + + // Clear any partial initial line + if xCurrent > 0 { + coordStart.X, coordStart.Y = xCurrent, yCurrent + coordEnd.X, coordEnd.Y = xEnd, yCurrent + + err = h.clearRect(attributes, coordStart, coordEnd) + if err != nil { + return err + } + + xCurrent = 0 + yCurrent += 1 + } + + // Clear intervening rectangular section + if yCurrent < yEnd { + coordStart.X, coordStart.Y = xCurrent, yCurrent + coordEnd.X, coordEnd.Y = xEnd, yEnd-1 + + err = h.clearRect(attributes, coordStart, coordEnd) + if err != nil { + return err + } + + xCurrent = 0 + yCurrent = yEnd + } + + // Clear remaining partial ending line + coordStart.X, coordStart.Y = xCurrent, yCurrent + coordEnd.X, coordEnd.Y = xEnd, yEnd + + err = h.clearRect(attributes, coordStart, coordEnd) + if err != nil { + return err + } + + return nil +} + +func (h *windowsAnsiEventHandler) clearRect(attributes uint16, fromCoord COORD, toCoord COORD) error { + region := SMALL_RECT{Top: fromCoord.Y, Left: fromCoord.X, Bottom: toCoord.Y, Right: toCoord.X} + width := toCoord.X - fromCoord.X + 1 + height := toCoord.Y - fromCoord.Y + 1 + size := uint32(width) * uint32(height) + + if size <= 0 { + return nil + } + + buffer := make([]CHAR_INFO, size) + + char := CHAR_INFO{ansiterm.FILL_CHARACTER, attributes} + for i := 0; i < int(size); i++ { + buffer[i] = char + } + + err := WriteConsoleOutput(h.fd, buffer, COORD{X: width, Y: height}, COORD{X: 0, Y: 0}, ®ion) + if err != nil { + return err + } + + return nil +} diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/winterm/scroll_helper.go b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/winterm/scroll_helper.go new file mode 100644 index 000000000000..2d27fa1d0288 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/winterm/scroll_helper.go @@ -0,0 +1,118 @@ +// +build windows + +package winterm + +// effectiveSr gets the current effective scroll region in buffer coordinates +func (h *windowsAnsiEventHandler) effectiveSr(window SMALL_RECT) scrollRegion { + top := addInRange(window.Top, h.sr.top, window.Top, window.Bottom) + bottom := addInRange(window.Top, h.sr.bottom, window.Top, window.Bottom) + if top >= bottom { + top = window.Top + bottom = window.Bottom + } + return scrollRegion{top: top, bottom: bottom} +} + +func (h *windowsAnsiEventHandler) scrollUp(param int) error { + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + + sr := h.effectiveSr(info.Window) + return h.scroll(param, sr, info) +} + +func (h *windowsAnsiEventHandler) scrollDown(param int) error { + return h.scrollUp(-param) +} + +func (h *windowsAnsiEventHandler) deleteLines(param int) error { + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + + start := info.CursorPosition.Y + sr := h.effectiveSr(info.Window) + // Lines cannot be inserted or deleted outside the scrolling region. + if start >= sr.top && start <= sr.bottom { + sr.top = start + return h.scroll(param, sr, info) + } else { + return nil + } +} + +func (h *windowsAnsiEventHandler) insertLines(param int) error { + return h.deleteLines(-param) +} + +// scroll scrolls the provided scroll region by param lines. The scroll region is in buffer coordinates. +func (h *windowsAnsiEventHandler) scroll(param int, sr scrollRegion, info *CONSOLE_SCREEN_BUFFER_INFO) error { + h.logf("scroll: scrollTop: %d, scrollBottom: %d", sr.top, sr.bottom) + h.logf("scroll: windowTop: %d, windowBottom: %d", info.Window.Top, info.Window.Bottom) + + // Copy from and clip to the scroll region (full buffer width) + scrollRect := SMALL_RECT{ + Top: sr.top, + Bottom: sr.bottom, + Left: 0, + Right: info.Size.X - 1, + } + + // Origin to which area should be copied + destOrigin := COORD{ + X: 0, + Y: sr.top - int16(param), + } + + char := CHAR_INFO{ + UnicodeChar: ' ', + Attributes: h.attributes, + } + + if err := ScrollConsoleScreenBuffer(h.fd, scrollRect, scrollRect, destOrigin, char); err != nil { + return err + } + return nil +} + +func (h *windowsAnsiEventHandler) deleteCharacters(param int) error { + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + return h.scrollLine(param, info.CursorPosition, info) +} + +func (h *windowsAnsiEventHandler) insertCharacters(param int) error { + return h.deleteCharacters(-param) +} + +// scrollLine scrolls a line horizontally starting at the provided position by a number of columns. +func (h *windowsAnsiEventHandler) scrollLine(columns int, position COORD, info *CONSOLE_SCREEN_BUFFER_INFO) error { + // Copy from and clip to the scroll region (full buffer width) + scrollRect := SMALL_RECT{ + Top: position.Y, + Bottom: position.Y, + Left: position.X, + Right: info.Size.X - 1, + } + + // Origin to which area should be copied + destOrigin := COORD{ + X: position.X - int16(columns), + Y: position.Y, + } + + char := CHAR_INFO{ + UnicodeChar: ' ', + Attributes: h.attributes, + } + + if err := ScrollConsoleScreenBuffer(h.fd, scrollRect, scrollRect, destOrigin, char); err != nil { + return err + } + return nil +} diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/winterm/utilities.go b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/winterm/utilities.go new file mode 100644 index 000000000000..afa7635d77ba --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/winterm/utilities.go @@ -0,0 +1,9 @@ +// +build windows + +package winterm + +// AddInRange increments a value by the passed quantity while ensuring the values +// always remain within the supplied min / max range. +func addInRange(n int16, increment int16, min int16, max int16) int16 { + return ensureInRange(n+increment, min, max) +} diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/winterm/win_event_handler.go b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/winterm/win_event_handler.go new file mode 100644 index 000000000000..2d40fb75ad0b --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/Azure/go-ansiterm/winterm/win_event_handler.go @@ -0,0 +1,743 @@ +// +build windows + +package winterm + +import ( + "bytes" + "log" + "os" + "strconv" + + "github.com/Azure/go-ansiterm" +) + +type windowsAnsiEventHandler struct { + fd uintptr + file *os.File + infoReset *CONSOLE_SCREEN_BUFFER_INFO + sr scrollRegion + buffer bytes.Buffer + attributes uint16 + inverted bool + wrapNext bool + drewMarginByte bool + originMode bool + marginByte byte + curInfo *CONSOLE_SCREEN_BUFFER_INFO + curPos COORD + logf func(string, ...interface{}) +} + +type Option func(*windowsAnsiEventHandler) + +func WithLogf(f func(string, ...interface{})) Option { + return func(w *windowsAnsiEventHandler) { + w.logf = f + } +} + +func CreateWinEventHandler(fd uintptr, file *os.File, opts ...Option) ansiterm.AnsiEventHandler { + infoReset, err := GetConsoleScreenBufferInfo(fd) + if err != nil { + return nil + } + + h := &windowsAnsiEventHandler{ + fd: fd, + file: file, + infoReset: infoReset, + attributes: infoReset.Attributes, + } + for _, o := range opts { + o(h) + } + + if isDebugEnv := os.Getenv(ansiterm.LogEnv); isDebugEnv == "1" { + logFile, _ := os.Create("winEventHandler.log") + logger := log.New(logFile, "", log.LstdFlags) + if h.logf != nil { + l := h.logf + h.logf = func(s string, v ...interface{}) { + l(s, v...) + logger.Printf(s, v...) + } + } else { + h.logf = logger.Printf + } + } + + if h.logf == nil { + h.logf = func(string, ...interface{}) {} + } + + return h +} + +type scrollRegion struct { + top int16 + bottom int16 +} + +// simulateLF simulates a LF or CR+LF by scrolling if necessary to handle the +// current cursor position and scroll region settings, in which case it returns +// true. If no special handling is necessary, then it does nothing and returns +// false. +// +// In the false case, the caller should ensure that a carriage return +// and line feed are inserted or that the text is otherwise wrapped. +func (h *windowsAnsiEventHandler) simulateLF(includeCR bool) (bool, error) { + if h.wrapNext { + if err := h.Flush(); err != nil { + return false, err + } + h.clearWrap() + } + pos, info, err := h.getCurrentInfo() + if err != nil { + return false, err + } + sr := h.effectiveSr(info.Window) + if pos.Y == sr.bottom { + // Scrolling is necessary. Let Windows automatically scroll if the scrolling region + // is the full window. + if sr.top == info.Window.Top && sr.bottom == info.Window.Bottom { + if includeCR { + pos.X = 0 + h.updatePos(pos) + } + return false, nil + } + + // A custom scroll region is active. Scroll the window manually to simulate + // the LF. + if err := h.Flush(); err != nil { + return false, err + } + h.logf("Simulating LF inside scroll region") + if err := h.scrollUp(1); err != nil { + return false, err + } + if includeCR { + pos.X = 0 + if err := SetConsoleCursorPosition(h.fd, pos); err != nil { + return false, err + } + } + return true, nil + + } else if pos.Y < info.Window.Bottom { + // Let Windows handle the LF. + pos.Y++ + if includeCR { + pos.X = 0 + } + h.updatePos(pos) + return false, nil + } else { + // The cursor is at the bottom of the screen but outside the scroll + // region. Skip the LF. + h.logf("Simulating LF outside scroll region") + if includeCR { + if err := h.Flush(); err != nil { + return false, err + } + pos.X = 0 + if err := SetConsoleCursorPosition(h.fd, pos); err != nil { + return false, err + } + } + return true, nil + } +} + +// executeLF executes a LF without a CR. +func (h *windowsAnsiEventHandler) executeLF() error { + handled, err := h.simulateLF(false) + if err != nil { + return err + } + if !handled { + // Windows LF will reset the cursor column position. Write the LF + // and restore the cursor position. + pos, _, err := h.getCurrentInfo() + if err != nil { + return err + } + h.buffer.WriteByte(ansiterm.ANSI_LINE_FEED) + if pos.X != 0 { + if err := h.Flush(); err != nil { + return err + } + h.logf("Resetting cursor position for LF without CR") + if err := SetConsoleCursorPosition(h.fd, pos); err != nil { + return err + } + } + } + return nil +} + +func (h *windowsAnsiEventHandler) Print(b byte) error { + if h.wrapNext { + h.buffer.WriteByte(h.marginByte) + h.clearWrap() + if _, err := h.simulateLF(true); err != nil { + return err + } + } + pos, info, err := h.getCurrentInfo() + if err != nil { + return err + } + if pos.X == info.Size.X-1 { + h.wrapNext = true + h.marginByte = b + } else { + pos.X++ + h.updatePos(pos) + h.buffer.WriteByte(b) + } + return nil +} + +func (h *windowsAnsiEventHandler) Execute(b byte) error { + switch b { + case ansiterm.ANSI_TAB: + h.logf("Execute(TAB)") + // Move to the next tab stop, but preserve auto-wrap if already set. + if !h.wrapNext { + pos, info, err := h.getCurrentInfo() + if err != nil { + return err + } + pos.X = (pos.X + 8) - pos.X%8 + if pos.X >= info.Size.X { + pos.X = info.Size.X - 1 + } + if err := h.Flush(); err != nil { + return err + } + if err := SetConsoleCursorPosition(h.fd, pos); err != nil { + return err + } + } + return nil + + case ansiterm.ANSI_BEL: + h.buffer.WriteByte(ansiterm.ANSI_BEL) + return nil + + case ansiterm.ANSI_BACKSPACE: + if h.wrapNext { + if err := h.Flush(); err != nil { + return err + } + h.clearWrap() + } + pos, _, err := h.getCurrentInfo() + if err != nil { + return err + } + if pos.X > 0 { + pos.X-- + h.updatePos(pos) + h.buffer.WriteByte(ansiterm.ANSI_BACKSPACE) + } + return nil + + case ansiterm.ANSI_VERTICAL_TAB, ansiterm.ANSI_FORM_FEED: + // Treat as true LF. + return h.executeLF() + + case ansiterm.ANSI_LINE_FEED: + // Simulate a CR and LF for now since there is no way in go-ansiterm + // to tell if the LF should include CR (and more things break when it's + // missing than when it's incorrectly added). + handled, err := h.simulateLF(true) + if handled || err != nil { + return err + } + return h.buffer.WriteByte(ansiterm.ANSI_LINE_FEED) + + case ansiterm.ANSI_CARRIAGE_RETURN: + if h.wrapNext { + if err := h.Flush(); err != nil { + return err + } + h.clearWrap() + } + pos, _, err := h.getCurrentInfo() + if err != nil { + return err + } + if pos.X != 0 { + pos.X = 0 + h.updatePos(pos) + h.buffer.WriteByte(ansiterm.ANSI_CARRIAGE_RETURN) + } + return nil + + default: + return nil + } +} + +func (h *windowsAnsiEventHandler) CUU(param int) error { + if err := h.Flush(); err != nil { + return err + } + h.logf("CUU: [%v]", []string{strconv.Itoa(param)}) + h.clearWrap() + return h.moveCursorVertical(-param) +} + +func (h *windowsAnsiEventHandler) CUD(param int) error { + if err := h.Flush(); err != nil { + return err + } + h.logf("CUD: [%v]", []string{strconv.Itoa(param)}) + h.clearWrap() + return h.moveCursorVertical(param) +} + +func (h *windowsAnsiEventHandler) CUF(param int) error { + if err := h.Flush(); err != nil { + return err + } + h.logf("CUF: [%v]", []string{strconv.Itoa(param)}) + h.clearWrap() + return h.moveCursorHorizontal(param) +} + +func (h *windowsAnsiEventHandler) CUB(param int) error { + if err := h.Flush(); err != nil { + return err + } + h.logf("CUB: [%v]", []string{strconv.Itoa(param)}) + h.clearWrap() + return h.moveCursorHorizontal(-param) +} + +func (h *windowsAnsiEventHandler) CNL(param int) error { + if err := h.Flush(); err != nil { + return err + } + h.logf("CNL: [%v]", []string{strconv.Itoa(param)}) + h.clearWrap() + return h.moveCursorLine(param) +} + +func (h *windowsAnsiEventHandler) CPL(param int) error { + if err := h.Flush(); err != nil { + return err + } + h.logf("CPL: [%v]", []string{strconv.Itoa(param)}) + h.clearWrap() + return h.moveCursorLine(-param) +} + +func (h *windowsAnsiEventHandler) CHA(param int) error { + if err := h.Flush(); err != nil { + return err + } + h.logf("CHA: [%v]", []string{strconv.Itoa(param)}) + h.clearWrap() + return h.moveCursorColumn(param) +} + +func (h *windowsAnsiEventHandler) VPA(param int) error { + if err := h.Flush(); err != nil { + return err + } + h.logf("VPA: [[%d]]", param) + h.clearWrap() + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + window := h.getCursorWindow(info) + position := info.CursorPosition + position.Y = window.Top + int16(param) - 1 + return h.setCursorPosition(position, window) +} + +func (h *windowsAnsiEventHandler) CUP(row int, col int) error { + if err := h.Flush(); err != nil { + return err + } + h.logf("CUP: [[%d %d]]", row, col) + h.clearWrap() + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + + window := h.getCursorWindow(info) + position := COORD{window.Left + int16(col) - 1, window.Top + int16(row) - 1} + return h.setCursorPosition(position, window) +} + +func (h *windowsAnsiEventHandler) HVP(row int, col int) error { + if err := h.Flush(); err != nil { + return err + } + h.logf("HVP: [[%d %d]]", row, col) + h.clearWrap() + return h.CUP(row, col) +} + +func (h *windowsAnsiEventHandler) DECTCEM(visible bool) error { + if err := h.Flush(); err != nil { + return err + } + h.logf("DECTCEM: [%v]", []string{strconv.FormatBool(visible)}) + h.clearWrap() + return nil +} + +func (h *windowsAnsiEventHandler) DECOM(enable bool) error { + if err := h.Flush(); err != nil { + return err + } + h.logf("DECOM: [%v]", []string{strconv.FormatBool(enable)}) + h.clearWrap() + h.originMode = enable + return h.CUP(1, 1) +} + +func (h *windowsAnsiEventHandler) DECCOLM(use132 bool) error { + if err := h.Flush(); err != nil { + return err + } + h.logf("DECCOLM: [%v]", []string{strconv.FormatBool(use132)}) + h.clearWrap() + if err := h.ED(2); err != nil { + return err + } + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + targetWidth := int16(80) + if use132 { + targetWidth = 132 + } + if info.Size.X < targetWidth { + if err := SetConsoleScreenBufferSize(h.fd, COORD{targetWidth, info.Size.Y}); err != nil { + h.logf("set buffer failed: %v", err) + return err + } + } + window := info.Window + window.Left = 0 + window.Right = targetWidth - 1 + if err := SetConsoleWindowInfo(h.fd, true, window); err != nil { + h.logf("set window failed: %v", err) + return err + } + if info.Size.X > targetWidth { + if err := SetConsoleScreenBufferSize(h.fd, COORD{targetWidth, info.Size.Y}); err != nil { + h.logf("set buffer failed: %v", err) + return err + } + } + return SetConsoleCursorPosition(h.fd, COORD{0, 0}) +} + +func (h *windowsAnsiEventHandler) ED(param int) error { + if err := h.Flush(); err != nil { + return err + } + h.logf("ED: [%v]", []string{strconv.Itoa(param)}) + h.clearWrap() + + // [J -- Erases from the cursor to the end of the screen, including the cursor position. + // [1J -- Erases from the beginning of the screen to the cursor, including the cursor position. + // [2J -- Erases the complete display. The cursor does not move. + // Notes: + // -- Clearing the entire buffer, versus just the Window, works best for Windows Consoles + + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + + var start COORD + var end COORD + + switch param { + case 0: + start = info.CursorPosition + end = COORD{info.Size.X - 1, info.Size.Y - 1} + + case 1: + start = COORD{0, 0} + end = info.CursorPosition + + case 2: + start = COORD{0, 0} + end = COORD{info.Size.X - 1, info.Size.Y - 1} + } + + err = h.clearRange(h.attributes, start, end) + if err != nil { + return err + } + + // If the whole buffer was cleared, move the window to the top while preserving + // the window-relative cursor position. + if param == 2 { + pos := info.CursorPosition + window := info.Window + pos.Y -= window.Top + window.Bottom -= window.Top + window.Top = 0 + if err := SetConsoleCursorPosition(h.fd, pos); err != nil { + return err + } + if err := SetConsoleWindowInfo(h.fd, true, window); err != nil { + return err + } + } + + return nil +} + +func (h *windowsAnsiEventHandler) EL(param int) error { + if err := h.Flush(); err != nil { + return err + } + h.logf("EL: [%v]", strconv.Itoa(param)) + h.clearWrap() + + // [K -- Erases from the cursor to the end of the line, including the cursor position. + // [1K -- Erases from the beginning of the line to the cursor, including the cursor position. + // [2K -- Erases the complete line. + + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + + var start COORD + var end COORD + + switch param { + case 0: + start = info.CursorPosition + end = COORD{info.Size.X, info.CursorPosition.Y} + + case 1: + start = COORD{0, info.CursorPosition.Y} + end = info.CursorPosition + + case 2: + start = COORD{0, info.CursorPosition.Y} + end = COORD{info.Size.X, info.CursorPosition.Y} + } + + err = h.clearRange(h.attributes, start, end) + if err != nil { + return err + } + + return nil +} + +func (h *windowsAnsiEventHandler) IL(param int) error { + if err := h.Flush(); err != nil { + return err + } + h.logf("IL: [%v]", strconv.Itoa(param)) + h.clearWrap() + return h.insertLines(param) +} + +func (h *windowsAnsiEventHandler) DL(param int) error { + if err := h.Flush(); err != nil { + return err + } + h.logf("DL: [%v]", strconv.Itoa(param)) + h.clearWrap() + return h.deleteLines(param) +} + +func (h *windowsAnsiEventHandler) ICH(param int) error { + if err := h.Flush(); err != nil { + return err + } + h.logf("ICH: [%v]", strconv.Itoa(param)) + h.clearWrap() + return h.insertCharacters(param) +} + +func (h *windowsAnsiEventHandler) DCH(param int) error { + if err := h.Flush(); err != nil { + return err + } + h.logf("DCH: [%v]", strconv.Itoa(param)) + h.clearWrap() + return h.deleteCharacters(param) +} + +func (h *windowsAnsiEventHandler) SGR(params []int) error { + if err := h.Flush(); err != nil { + return err + } + strings := []string{} + for _, v := range params { + strings = append(strings, strconv.Itoa(v)) + } + + h.logf("SGR: [%v]", strings) + + if len(params) <= 0 { + h.attributes = h.infoReset.Attributes + h.inverted = false + } else { + for _, attr := range params { + + if attr == ansiterm.ANSI_SGR_RESET { + h.attributes = h.infoReset.Attributes + h.inverted = false + continue + } + + h.attributes, h.inverted = collectAnsiIntoWindowsAttributes(h.attributes, h.inverted, h.infoReset.Attributes, int16(attr)) + } + } + + attributes := h.attributes + if h.inverted { + attributes = invertAttributes(attributes) + } + err := SetConsoleTextAttribute(h.fd, attributes) + if err != nil { + return err + } + + return nil +} + +func (h *windowsAnsiEventHandler) SU(param int) error { + if err := h.Flush(); err != nil { + return err + } + h.logf("SU: [%v]", []string{strconv.Itoa(param)}) + h.clearWrap() + return h.scrollUp(param) +} + +func (h *windowsAnsiEventHandler) SD(param int) error { + if err := h.Flush(); err != nil { + return err + } + h.logf("SD: [%v]", []string{strconv.Itoa(param)}) + h.clearWrap() + return h.scrollDown(param) +} + +func (h *windowsAnsiEventHandler) DA(params []string) error { + h.logf("DA: [%v]", params) + // DA cannot be implemented because it must send data on the VT100 input stream, + // which is not available to go-ansiterm. + return nil +} + +func (h *windowsAnsiEventHandler) DECSTBM(top int, bottom int) error { + if err := h.Flush(); err != nil { + return err + } + h.logf("DECSTBM: [%d, %d]", top, bottom) + + // Windows is 0 indexed, Linux is 1 indexed + h.sr.top = int16(top - 1) + h.sr.bottom = int16(bottom - 1) + + // This command also moves the cursor to the origin. + h.clearWrap() + return h.CUP(1, 1) +} + +func (h *windowsAnsiEventHandler) RI() error { + if err := h.Flush(); err != nil { + return err + } + h.logf("RI: []") + h.clearWrap() + + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + + sr := h.effectiveSr(info.Window) + if info.CursorPosition.Y == sr.top { + return h.scrollDown(1) + } + + return h.moveCursorVertical(-1) +} + +func (h *windowsAnsiEventHandler) IND() error { + h.logf("IND: []") + return h.executeLF() +} + +func (h *windowsAnsiEventHandler) Flush() error { + h.curInfo = nil + if h.buffer.Len() > 0 { + h.logf("Flush: [%s]", h.buffer.Bytes()) + if _, err := h.buffer.WriteTo(h.file); err != nil { + return err + } + } + + if h.wrapNext && !h.drewMarginByte { + h.logf("Flush: drawing margin byte '%c'", h.marginByte) + + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + + charInfo := []CHAR_INFO{{UnicodeChar: uint16(h.marginByte), Attributes: info.Attributes}} + size := COORD{1, 1} + position := COORD{0, 0} + region := SMALL_RECT{Left: info.CursorPosition.X, Top: info.CursorPosition.Y, Right: info.CursorPosition.X, Bottom: info.CursorPosition.Y} + if err := WriteConsoleOutput(h.fd, charInfo, size, position, ®ion); err != nil { + return err + } + h.drewMarginByte = true + } + return nil +} + +// cacheConsoleInfo ensures that the current console screen information has been queried +// since the last call to Flush(). It must be called before accessing h.curInfo or h.curPos. +func (h *windowsAnsiEventHandler) getCurrentInfo() (COORD, *CONSOLE_SCREEN_BUFFER_INFO, error) { + if h.curInfo == nil { + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return COORD{}, nil, err + } + h.curInfo = info + h.curPos = info.CursorPosition + } + return h.curPos, h.curInfo, nil +} + +func (h *windowsAnsiEventHandler) updatePos(pos COORD) { + if h.curInfo == nil { + panic("failed to call getCurrentInfo before calling updatePos") + } + h.curPos = pos +} + +// clearWrap clears the state where the cursor is in the margin +// waiting for the next character before wrapping the line. This must +// be done before most operations that act on the cursor. +func (h *windowsAnsiEventHandler) clearWrap() { + h.wrapNext = false + h.drewMarginByte = false +} diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/validation/validation.go b/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/validation/validation.go index ff41cfe07960..65899b69b8c8 100644 --- a/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/validation/validation.go +++ b/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/validation/validation.go @@ -24,9 +24,6 @@ import ( "strings" ) -// Disabled controls if parameter validation should be globally disabled. The default is false. -var Disabled bool - // Constraint stores constraint name, target field name // Rule and chain validations. type Constraint struct { @@ -71,9 +68,6 @@ const ( // Validate method validates constraints on parameter // passed in validation array. func Validate(m []Validation) error { - if Disabled { - return nil - } for _, item := range m { v := reflect.ValueOf(item.TargetValue) for _, constraint := range item.Constraints { diff --git a/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/.gitignore b/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/.gitignore new file mode 100644 index 000000000000..5c204d28b0e3 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/.gitignore @@ -0,0 +1,26 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof + +target diff --git a/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/.travis.yml b/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/.travis.yml new file mode 100644 index 000000000000..094aa5ce070c --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/.travis.yml @@ -0,0 +1,37 @@ +language: go + +sudo: false + +branches: + except: + - release + +branches: + only: + - master + - travis + +go: + - "1.11.x" + - tip + +matrix: + allow_failures: + - go: tip + +before_install: + - if [ -n "$GH_USER" ]; then git config --global github.user ${GH_USER}; fi; + - if [ -n "$GH_TOKEN" ]; then git config --global github.token ${GH_TOKEN}; fi; + - go get github.com/mattn/goveralls + +before_script: + - make deps + +script: + - make qa + +after_failure: + - cat ./target/test/report.xml + +after_success: + - if [ "$TRAVIS_GO_VERSION" = "1.11.1" ]; then $HOME/gopath/bin/goveralls -covermode=count -coverprofile=target/report/coverage.out -service=travis-ci; fi; diff --git a/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/LICENSE b/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/LICENSE new file mode 100644 index 000000000000..59cab8a939be --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2014 Will Fitzgerald. 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 Google Inc. 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 +OWNER 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. diff --git a/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/README.md b/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/README.md new file mode 100644 index 000000000000..97e83071e41a --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/README.md @@ -0,0 +1,93 @@ +# bitset + +*Go language library to map between non-negative integers and boolean values* + +[![Test](https://github.com/bits-and-blooms/bitset/workflows/Test/badge.svg)](https://github.com/willf/bitset/actions?query=workflow%3ATest) +[![Go Report Card](https://goreportcard.com/badge/github.com/willf/bitset)](https://goreportcard.com/report/github.com/willf/bitset) +[![PkgGoDev](https://pkg.go.dev/badge/github.com/bits-and-blooms/bitset?tab=doc)](https://pkg.go.dev/github.com/bits-and-blooms/bitset?tab=doc) + + +## Description + +Package bitset implements bitsets, a mapping between non-negative integers and boolean values. +It should be more efficient than map[uint] bool. + +It provides methods for setting, clearing, flipping, and testing individual integers. + +But it also provides set intersection, union, difference, complement, and symmetric operations, as well as tests to check whether any, all, or no bits are set, and querying a bitset's current length and number of positive bits. + +BitSets are expanded to the size of the largest set bit; the memory allocation is approximately Max bits, where Max is the largest set bit. BitSets are never shrunk. On creation, a hint can be given for the number of bits that will be used. + +Many of the methods, including Set, Clear, and Flip, return a BitSet pointer, which allows for chaining. + +### Example use: + +```go +package main + +import ( + "fmt" + "math/rand" + + "github.com/bits-and-blooms/bitset" +) + +func main() { + fmt.Printf("Hello from BitSet!\n") + var b bitset.BitSet + // play some Go Fish + for i := 0; i < 100; i++ { + card1 := uint(rand.Intn(52)) + card2 := uint(rand.Intn(52)) + b.Set(card1) + if b.Test(card2) { + fmt.Println("Go Fish!") + } + b.Clear(card1) + } + + // Chaining + b.Set(10).Set(11) + + for i, e := b.NextSet(0); e; i, e = b.NextSet(i + 1) { + fmt.Println("The following bit is set:", i) + } + if b.Intersection(bitset.New(100).Set(10)).Count() == 1 { + fmt.Println("Intersection works.") + } else { + fmt.Println("Intersection doesn't work???") + } +} +``` + +As an alternative to BitSets, one should check out the 'big' package, which provides a (less set-theoretical) view of bitsets. + +Package documentation is at: https://pkg.go.dev/github.com/bits-and-blooms/bitset?tab=doc + +## Memory Usage + +The memory usage of a bitset using N bits is at least N/8 bytes. The number of bits in a bitset is at least as large as one plus the greatest bit index you have accessed. Thus it is possible to run out of memory while using a bitset. If you have lots of bits, you might prefer compressed bitsets, like the [Roaring bitmaps](http://roaringbitmap.org) and its [Go implementation](https://github.com/RoaringBitmap/roaring). + +## Implementation Note + +Go 1.9 introduced a native `math/bits` library. We provide backward compatibility to Go 1.7, which might be removed. + +It is possible that a later version will match the `math/bits` return signature for counts (which is `int`, rather than our library's `unit64`). If so, the version will be bumped. + +## Installation + +```bash +go get github.com/bits-and-blooms/bitset +``` + +## Contributing + +If you wish to contribute to this project, please branch and issue a pull request against master ("[GitHub Flow](https://guides.github.com/introduction/flow/)") + +## Running all tests + +Before committing the code, please check if it passes tests, has adequate coverage, etc. +```bash +go test +go test -cover +``` diff --git a/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/azure-pipelines.yml b/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/azure-pipelines.yml new file mode 100644 index 000000000000..f9b295918404 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/azure-pipelines.yml @@ -0,0 +1,39 @@ +# Go +# Build your Go project. +# Add steps that test, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/go + +trigger: +- master + +pool: + vmImage: 'Ubuntu-16.04' + +variables: + GOBIN: '$(GOPATH)/bin' # Go binaries path + GOROOT: '/usr/local/go1.11' # Go installation path + GOPATH: '$(system.defaultWorkingDirectory)/gopath' # Go workspace path + modulePath: '$(GOPATH)/src/github.com/$(build.repository.name)' # Path to the module's code + +steps: +- script: | + mkdir -p '$(GOBIN)' + mkdir -p '$(GOPATH)/pkg' + mkdir -p '$(modulePath)' + shopt -s extglob + shopt -s dotglob + mv !(gopath) '$(modulePath)' + echo '##vso[task.prependpath]$(GOBIN)' + echo '##vso[task.prependpath]$(GOROOT)/bin' + displayName: 'Set up the Go workspace' + +- script: | + go version + go get -v -t -d ./... + if [ -f Gopkg.toml ]; then + curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh + dep ensure + fi + go build -v . + workingDirectory: '$(modulePath)' + displayName: 'Get dependencies, then build' diff --git a/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/bitset.go b/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/bitset.go new file mode 100644 index 000000000000..d688806a54b8 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/bitset.go @@ -0,0 +1,952 @@ +/* +Package bitset implements bitsets, a mapping +between non-negative integers and boolean values. It should be more +efficient than map[uint] bool. + +It provides methods for setting, clearing, flipping, and testing +individual integers. + +But it also provides set intersection, union, difference, +complement, and symmetric operations, as well as tests to +check whether any, all, or no bits are set, and querying a +bitset's current length and number of positive bits. + +BitSets are expanded to the size of the largest set bit; the +memory allocation is approximately Max bits, where Max is +the largest set bit. BitSets are never shrunk. On creation, +a hint can be given for the number of bits that will be used. + +Many of the methods, including Set,Clear, and Flip, return +a BitSet pointer, which allows for chaining. + +Example use: + + import "bitset" + var b BitSet + b.Set(10).Set(11) + if b.Test(1000) { + b.Clear(1000) + } + if B.Intersection(bitset.New(100).Set(10)).Count() > 1 { + fmt.Println("Intersection works.") + } + +As an alternative to BitSets, one should check out the 'big' package, +which provides a (less set-theoretical) view of bitsets. + +*/ +package bitset + +import ( + "bufio" + "bytes" + "encoding/base64" + "encoding/binary" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// the wordSize of a bit set +const wordSize = uint(64) + +// log2WordSize is lg(wordSize) +const log2WordSize = uint(6) + +// allBits has every bit set +const allBits uint64 = 0xffffffffffffffff + +// default binary BigEndian +var binaryOrder binary.ByteOrder = binary.BigEndian + +// default json encoding base64.URLEncoding +var base64Encoding = base64.URLEncoding + +// Base64StdEncoding Marshal/Unmarshal BitSet with base64.StdEncoding(Default: base64.URLEncoding) +func Base64StdEncoding() { base64Encoding = base64.StdEncoding } + +// LittleEndian Marshal/Unmarshal Binary as Little Endian(Default: binary.BigEndian) +func LittleEndian() { binaryOrder = binary.LittleEndian } + +// A BitSet is a set of bits. The zero value of a BitSet is an empty set of length 0. +type BitSet struct { + length uint + set []uint64 +} + +// Error is used to distinguish errors (panics) generated in this package. +type Error string + +// safeSet will fixup b.set to be non-nil and return the field value +func (b *BitSet) safeSet() []uint64 { + if b.set == nil { + b.set = make([]uint64, wordsNeeded(0)) + } + return b.set +} + +// From is a constructor used to create a BitSet from an array of integers +func From(buf []uint64) *BitSet { + return &BitSet{uint(len(buf)) * 64, buf} +} + +// Bytes returns the bitset as array of integers +func (b *BitSet) Bytes() []uint64 { + return b.set +} + +// wordsNeeded calculates the number of words needed for i bits +func wordsNeeded(i uint) int { + if i > (Cap() - wordSize + 1) { + return int(Cap() >> log2WordSize) + } + return int((i + (wordSize - 1)) >> log2WordSize) +} + +// New creates a new BitSet with a hint that length bits will be required +func New(length uint) (bset *BitSet) { + defer func() { + if r := recover(); r != nil { + bset = &BitSet{ + 0, + make([]uint64, 0), + } + } + }() + + bset = &BitSet{ + length, + make([]uint64, wordsNeeded(length)), + } + + return bset +} + +// Cap returns the total possible capacity, or number of bits +func Cap() uint { + return ^uint(0) +} + +// Len returns the number of bits in the BitSet. +// Note the difference to method Count, see example. +func (b *BitSet) Len() uint { + return b.length +} + +// extendSetMaybe adds additional words to incorporate new bits if needed +func (b *BitSet) extendSetMaybe(i uint) { + if i >= b.length { // if we need more bits, make 'em + if i >= Cap() { + panic("You are exceeding the capacity") + } + nsize := wordsNeeded(i + 1) + if b.set == nil { + b.set = make([]uint64, nsize) + } else if cap(b.set) >= nsize { + b.set = b.set[:nsize] // fast resize + } else if len(b.set) < nsize { + newset := make([]uint64, nsize, 2*nsize) // increase capacity 2x + copy(newset, b.set) + b.set = newset + } + b.length = i + 1 + } +} + +// Test whether bit i is set. +func (b *BitSet) Test(i uint) bool { + if i >= b.length { + return false + } + return b.set[i>>log2WordSize]&(1<<(i&(wordSize-1))) != 0 +} + +// Set bit i to 1, the capacity of the bitset is automatically +// increased accordingly. +// If i>= Cap(), this function will panic. +// Warning: using a very large value for 'i' +// may lead to a memory shortage and a panic: the caller is responsible +// for providing sensible parameters in line with their memory capacity. +func (b *BitSet) Set(i uint) *BitSet { + b.extendSetMaybe(i) + b.set[i>>log2WordSize] |= 1 << (i & (wordSize - 1)) + return b +} + +// Clear bit i to 0 +func (b *BitSet) Clear(i uint) *BitSet { + if i >= b.length { + return b + } + b.set[i>>log2WordSize] &^= 1 << (i & (wordSize - 1)) + return b +} + +// SetTo sets bit i to value. +// If i>= Cap(), this function will panic. +// Warning: using a very large value for 'i' +// may lead to a memory shortage and a panic: the caller is responsible +// for providing sensible parameters in line with their memory capacity. +func (b *BitSet) SetTo(i uint, value bool) *BitSet { + if value { + return b.Set(i) + } + return b.Clear(i) +} + +// Flip bit at i. +// If i>= Cap(), this function will panic. +// Warning: using a very large value for 'i' +// may lead to a memory shortage and a panic: the caller is responsible +// for providing sensible parameters in line with their memory capacity. +func (b *BitSet) Flip(i uint) *BitSet { + if i >= b.length { + return b.Set(i) + } + b.set[i>>log2WordSize] ^= 1 << (i & (wordSize - 1)) + return b +} + +// FlipRange bit in [start, end). +// If end>= Cap(), this function will panic. +// Warning: using a very large value for 'end' +// may lead to a memory shortage and a panic: the caller is responsible +// for providing sensible parameters in line with their memory capacity. +func (b *BitSet) FlipRange(start, end uint) *BitSet { + if start >= end { + return b + } + + b.extendSetMaybe(end - 1) + var startWord uint = start >> log2WordSize + var endWord uint = end >> log2WordSize + b.set[startWord] ^= ^(^uint64(0) << (start & (wordSize - 1))) + for i := startWord; i < endWord; i++ { + b.set[i] = ^b.set[i] + } + b.set[endWord] ^= ^uint64(0) >> (-end & (wordSize - 1)) + return b +} + +// Shrink shrinks BitSet so that the provided value is the last possible +// set value. It clears all bits > the provided index and reduces the size +// and length of the set. +// +// Note that the parameter value is not the new length in bits: it is the +// maximal value that can be stored in the bitset after the function call. +// The new length in bits is the parameter value + 1. Thus it is not possible +// to use this function to set the length to 0, the minimal value of the length +// after this function call is 1. +// +// A new slice is allocated to store the new bits, so you may see an increase in +// memory usage until the GC runs. Normally this should not be a problem, but if you +// have an extremely large BitSet its important to understand that the old BitSet will +// remain in memory until the GC frees it. +func (b *BitSet) Shrink(lastbitindex uint) *BitSet { + length := lastbitindex + 1 + idx := wordsNeeded(length) + if idx > len(b.set) { + return b + } + shrunk := make([]uint64, idx) + copy(shrunk, b.set[:idx]) + b.set = shrunk + b.length = length + b.set[idx-1] &= (allBits >> (uint64(64) - uint64(length&(wordSize-1)))) + return b +} + +// Compact shrinks BitSet to so that we preserve all set bits, while minimizing +// memory usage. Compact calls Shrink. +func (b *BitSet) Compact() *BitSet { + idx := len(b.set) - 1 + for ; idx >= 0 && b.set[idx] == 0; idx-- { + } + newlength := uint((idx + 1) << log2WordSize) + if newlength >= b.length { + return b // nothing to do + } + if newlength > 0 { + return b.Shrink(newlength - 1) + } + // We preserve one word + return b.Shrink(63) +} + +// InsertAt takes an index which indicates where a bit should be +// inserted. Then it shifts all the bits in the set to the left by 1, starting +// from the given index position, and sets the index position to 0. +// +// Depending on the size of your BitSet, and where you are inserting the new entry, +// this method could be extremely slow and in some cases might cause the entire BitSet +// to be recopied. +func (b *BitSet) InsertAt(idx uint) *BitSet { + insertAtElement := (idx >> log2WordSize) + + // if length of set is a multiple of wordSize we need to allocate more space first + if b.isLenExactMultiple() { + b.set = append(b.set, uint64(0)) + } + + var i uint + for i = uint(len(b.set) - 1); i > insertAtElement; i-- { + // all elements above the position where we want to insert can simply by shifted + b.set[i] <<= 1 + + // we take the most significant bit of the previous element and set it as + // the least significant bit of the current element + b.set[i] |= (b.set[i-1] & 0x8000000000000000) >> 63 + } + + // generate a mask to extract the data that we need to shift left + // within the element where we insert a bit + dataMask := ^(uint64(1)< 0x40000 { + buffer.WriteString("...") + break + } + buffer.WriteString(strconv.FormatInt(int64(i), 10)) + i, e = b.NextSet(i + 1) + if e { + buffer.WriteString(",") + } + } + buffer.WriteString("}") + return buffer.String() +} + +// DeleteAt deletes the bit at the given index position from +// within the bitset +// All the bits residing on the left of the deleted bit get +// shifted right by 1 +// The running time of this operation may potentially be +// relatively slow, O(length) +func (b *BitSet) DeleteAt(i uint) *BitSet { + // the index of the slice element where we'll delete a bit + deleteAtElement := i >> log2WordSize + + // generate a mask for the data that needs to be shifted right + // within that slice element that gets modified + dataMask := ^((uint64(1) << (i & (wordSize - 1))) - 1) + + // extract the data that we'll shift right from the slice element + data := b.set[deleteAtElement] & dataMask + + // set the masked area to 0 while leaving the rest as it is + b.set[deleteAtElement] &= ^dataMask + + // shift the previously extracted data to the right and then + // set it in the previously masked area + b.set[deleteAtElement] |= (data >> 1) & dataMask + + // loop over all the consecutive slice elements to copy each + // lowest bit into the highest position of the previous element, + // then shift the entire content to the right by 1 + for i := int(deleteAtElement) + 1; i < len(b.set); i++ { + b.set[i-1] |= (b.set[i] & 1) << 63 + b.set[i] >>= 1 + } + + b.length = b.length - 1 + + return b +} + +// NextSet returns the next bit set from the specified index, +// including possibly the current index +// along with an error code (true = valid, false = no set bit found) +// for i,e := v.NextSet(0); e; i,e = v.NextSet(i + 1) {...} +// +// Users concerned with performance may want to use NextSetMany to +// retrieve several values at once. +func (b *BitSet) NextSet(i uint) (uint, bool) { + x := int(i >> log2WordSize) + if x >= len(b.set) { + return 0, false + } + w := b.set[x] + w = w >> (i & (wordSize - 1)) + if w != 0 { + return i + trailingZeroes64(w), true + } + x = x + 1 + for x < len(b.set) { + if b.set[x] != 0 { + return uint(x)*wordSize + trailingZeroes64(b.set[x]), true + } + x = x + 1 + + } + return 0, false +} + +// NextSetMany returns many next bit sets from the specified index, +// including possibly the current index and up to cap(buffer). +// If the returned slice has len zero, then no more set bits were found +// +// buffer := make([]uint, 256) // this should be reused +// j := uint(0) +// j, buffer = bitmap.NextSetMany(j, buffer) +// for ; len(buffer) > 0; j, buffer = bitmap.NextSetMany(j,buffer) { +// for k := range buffer { +// do something with buffer[k] +// } +// j += 1 +// } +// +// +// It is possible to retrieve all set bits as follow: +// +// indices := make([]uint, bitmap.Count()) +// bitmap.NextSetMany(0, indices) +// +// However if bitmap.Count() is large, it might be preferable to +// use several calls to NextSetMany, for performance reasons. +func (b *BitSet) NextSetMany(i uint, buffer []uint) (uint, []uint) { + myanswer := buffer + capacity := cap(buffer) + x := int(i >> log2WordSize) + if x >= len(b.set) || capacity == 0 { + return 0, myanswer[:0] + } + skip := i & (wordSize - 1) + word := b.set[x] >> skip + myanswer = myanswer[:capacity] + size := int(0) + for word != 0 { + r := trailingZeroes64(word) + t := word & ((^word) + 1) + myanswer[size] = r + i + size++ + if size == capacity { + goto End + } + word = word ^ t + } + x++ + for idx, word := range b.set[x:] { + for word != 0 { + r := trailingZeroes64(word) + t := word & ((^word) + 1) + myanswer[size] = r + (uint(x+idx) << 6) + size++ + if size == capacity { + goto End + } + word = word ^ t + } + } +End: + if size > 0 { + return myanswer[size-1], myanswer[:size] + } + return 0, myanswer[:0] +} + +// NextClear returns the next clear bit from the specified index, +// including possibly the current index +// along with an error code (true = valid, false = no bit found i.e. all bits are set) +func (b *BitSet) NextClear(i uint) (uint, bool) { + x := int(i >> log2WordSize) + if x >= len(b.set) { + return 0, false + } + w := b.set[x] + w = w >> (i & (wordSize - 1)) + wA := allBits >> (i & (wordSize - 1)) + index := i + trailingZeroes64(^w) + if w != wA && index < b.length { + return index, true + } + x++ + for x < len(b.set) { + index = uint(x)*wordSize + trailingZeroes64(^b.set[x]) + if b.set[x] != allBits && index < b.length { + return index, true + } + x++ + } + return 0, false +} + +// ClearAll clears the entire BitSet +func (b *BitSet) ClearAll() *BitSet { + if b != nil && b.set != nil { + for i := range b.set { + b.set[i] = 0 + } + } + return b +} + +// wordCount returns the number of words used in a bit set +func (b *BitSet) wordCount() int { + return len(b.set) +} + +// Clone this BitSet +func (b *BitSet) Clone() *BitSet { + c := New(b.length) + if b.set != nil { // Clone should not modify current object + copy(c.set, b.set) + } + return c +} + +// Copy into a destination BitSet +// Returning the size of the destination BitSet +// like array copy +func (b *BitSet) Copy(c *BitSet) (count uint) { + if c == nil { + return + } + if b.set != nil { // Copy should not modify current object + copy(c.set, b.set) + } + count = c.length + if b.length < c.length { + count = b.length + } + return +} + +// Count (number of set bits). +// Also known as "popcount" or "population count". +func (b *BitSet) Count() uint { + if b != nil && b.set != nil { + return uint(popcntSlice(b.set)) + } + return 0 +} + +// Equal tests the equivalence of two BitSets. +// False if they are of different sizes, otherwise true +// only if all the same bits are set +func (b *BitSet) Equal(c *BitSet) bool { + if c == nil || b == nil { + return c == b + } + if b.length != c.length { + return false + } + if b.length == 0 { // if they have both length == 0, then could have nil set + return true + } + // testing for equality shoud not transform the bitset (no call to safeSet) + + for p, v := range b.set { + if c.set[p] != v { + return false + } + } + return true +} + +func panicIfNull(b *BitSet) { + if b == nil { + panic(Error("BitSet must not be null")) + } +} + +// Difference of base set and other set +// This is the BitSet equivalent of &^ (and not) +func (b *BitSet) Difference(compare *BitSet) (result *BitSet) { + panicIfNull(b) + panicIfNull(compare) + result = b.Clone() // clone b (in case b is bigger than compare) + l := int(compare.wordCount()) + if l > int(b.wordCount()) { + l = int(b.wordCount()) + } + for i := 0; i < l; i++ { + result.set[i] = b.set[i] &^ compare.set[i] + } + return +} + +// DifferenceCardinality computes the cardinality of the differnce +func (b *BitSet) DifferenceCardinality(compare *BitSet) uint { + panicIfNull(b) + panicIfNull(compare) + l := int(compare.wordCount()) + if l > int(b.wordCount()) { + l = int(b.wordCount()) + } + cnt := uint64(0) + cnt += popcntMaskSlice(b.set[:l], compare.set[:l]) + cnt += popcntSlice(b.set[l:]) + return uint(cnt) +} + +// InPlaceDifference computes the difference of base set and other set +// This is the BitSet equivalent of &^ (and not) +func (b *BitSet) InPlaceDifference(compare *BitSet) { + panicIfNull(b) + panicIfNull(compare) + l := int(compare.wordCount()) + if l > int(b.wordCount()) { + l = int(b.wordCount()) + } + for i := 0; i < l; i++ { + b.set[i] &^= compare.set[i] + } +} + +// Convenience function: return two bitsets ordered by +// increasing length. Note: neither can be nil +func sortByLength(a *BitSet, b *BitSet) (ap *BitSet, bp *BitSet) { + if a.length <= b.length { + ap, bp = a, b + } else { + ap, bp = b, a + } + return +} + +// Intersection of base set and other set +// This is the BitSet equivalent of & (and) +func (b *BitSet) Intersection(compare *BitSet) (result *BitSet) { + panicIfNull(b) + panicIfNull(compare) + b, compare = sortByLength(b, compare) + result = New(b.length) + for i, word := range b.set { + result.set[i] = word & compare.set[i] + } + return +} + +// IntersectionCardinality computes the cardinality of the union +func (b *BitSet) IntersectionCardinality(compare *BitSet) uint { + panicIfNull(b) + panicIfNull(compare) + b, compare = sortByLength(b, compare) + cnt := popcntAndSlice(b.set, compare.set) + return uint(cnt) +} + +// InPlaceIntersection destructively computes the intersection of +// base set and the compare set. +// This is the BitSet equivalent of & (and) +func (b *BitSet) InPlaceIntersection(compare *BitSet) { + panicIfNull(b) + panicIfNull(compare) + l := int(compare.wordCount()) + if l > int(b.wordCount()) { + l = int(b.wordCount()) + } + for i := 0; i < l; i++ { + b.set[i] &= compare.set[i] + } + for i := l; i < len(b.set); i++ { + b.set[i] = 0 + } + if compare.length > 0 { + b.extendSetMaybe(compare.length - 1) + } +} + +// Union of base set and other set +// This is the BitSet equivalent of | (or) +func (b *BitSet) Union(compare *BitSet) (result *BitSet) { + panicIfNull(b) + panicIfNull(compare) + b, compare = sortByLength(b, compare) + result = compare.Clone() + for i, word := range b.set { + result.set[i] = word | compare.set[i] + } + return +} + +// UnionCardinality computes the cardinality of the uniton of the base set +// and the compare set. +func (b *BitSet) UnionCardinality(compare *BitSet) uint { + panicIfNull(b) + panicIfNull(compare) + b, compare = sortByLength(b, compare) + cnt := popcntOrSlice(b.set, compare.set) + if len(compare.set) > len(b.set) { + cnt += popcntSlice(compare.set[len(b.set):]) + } + return uint(cnt) +} + +// InPlaceUnion creates the destructive union of base set and compare set. +// This is the BitSet equivalent of | (or). +func (b *BitSet) InPlaceUnion(compare *BitSet) { + panicIfNull(b) + panicIfNull(compare) + l := int(compare.wordCount()) + if l > int(b.wordCount()) { + l = int(b.wordCount()) + } + if compare.length > 0 { + b.extendSetMaybe(compare.length - 1) + } + for i := 0; i < l; i++ { + b.set[i] |= compare.set[i] + } + if len(compare.set) > l { + for i := l; i < len(compare.set); i++ { + b.set[i] = compare.set[i] + } + } +} + +// SymmetricDifference of base set and other set +// This is the BitSet equivalent of ^ (xor) +func (b *BitSet) SymmetricDifference(compare *BitSet) (result *BitSet) { + panicIfNull(b) + panicIfNull(compare) + b, compare = sortByLength(b, compare) + // compare is bigger, so clone it + result = compare.Clone() + for i, word := range b.set { + result.set[i] = word ^ compare.set[i] + } + return +} + +// SymmetricDifferenceCardinality computes the cardinality of the symmetric difference +func (b *BitSet) SymmetricDifferenceCardinality(compare *BitSet) uint { + panicIfNull(b) + panicIfNull(compare) + b, compare = sortByLength(b, compare) + cnt := popcntXorSlice(b.set, compare.set) + if len(compare.set) > len(b.set) { + cnt += popcntSlice(compare.set[len(b.set):]) + } + return uint(cnt) +} + +// InPlaceSymmetricDifference creates the destructive SymmetricDifference of base set and other set +// This is the BitSet equivalent of ^ (xor) +func (b *BitSet) InPlaceSymmetricDifference(compare *BitSet) { + panicIfNull(b) + panicIfNull(compare) + l := int(compare.wordCount()) + if l > int(b.wordCount()) { + l = int(b.wordCount()) + } + if compare.length > 0 { + b.extendSetMaybe(compare.length - 1) + } + for i := 0; i < l; i++ { + b.set[i] ^= compare.set[i] + } + if len(compare.set) > l { + for i := l; i < len(compare.set); i++ { + b.set[i] = compare.set[i] + } + } +} + +// Is the length an exact multiple of word sizes? +func (b *BitSet) isLenExactMultiple() bool { + return b.length%wordSize == 0 +} + +// Clean last word by setting unused bits to 0 +func (b *BitSet) cleanLastWord() { + if !b.isLenExactMultiple() { + b.set[len(b.set)-1] &= allBits >> (wordSize - b.length%wordSize) + } +} + +// Complement computes the (local) complement of a biset (up to length bits) +func (b *BitSet) Complement() (result *BitSet) { + panicIfNull(b) + result = New(b.length) + for i, word := range b.set { + result.set[i] = ^word + } + result.cleanLastWord() + return +} + +// All returns true if all bits are set, false otherwise. Returns true for +// empty sets. +func (b *BitSet) All() bool { + panicIfNull(b) + return b.Count() == b.length +} + +// None returns true if no bit is set, false otherwise. Returns true for +// empty sets. +func (b *BitSet) None() bool { + panicIfNull(b) + if b != nil && b.set != nil { + for _, word := range b.set { + if word > 0 { + return false + } + } + return true + } + return true +} + +// Any returns true if any bit is set, false otherwise +func (b *BitSet) Any() bool { + panicIfNull(b) + return !b.None() +} + +// IsSuperSet returns true if this is a superset of the other set +func (b *BitSet) IsSuperSet(other *BitSet) bool { + for i, e := other.NextSet(0); e; i, e = other.NextSet(i + 1) { + if !b.Test(i) { + return false + } + } + return true +} + +// IsStrictSuperSet returns true if this is a strict superset of the other set +func (b *BitSet) IsStrictSuperSet(other *BitSet) bool { + return b.Count() > other.Count() && b.IsSuperSet(other) +} + +// DumpAsBits dumps a bit set as a string of bits +func (b *BitSet) DumpAsBits() string { + if b.set == nil { + return "." + } + buffer := bytes.NewBufferString("") + i := len(b.set) - 1 + for ; i >= 0; i-- { + fmt.Fprintf(buffer, "%064b.", b.set[i]) + } + return buffer.String() +} + +// BinaryStorageSize returns the binary storage requirements +func (b *BitSet) BinaryStorageSize() int { + return binary.Size(uint64(0)) + binary.Size(b.set) +} + +// WriteTo writes a BitSet to a stream +func (b *BitSet) WriteTo(stream io.Writer) (int64, error) { + length := uint64(b.length) + + // Write length + err := binary.Write(stream, binaryOrder, length) + if err != nil { + return 0, err + } + + // Write set + err = binary.Write(stream, binaryOrder, b.set) + return int64(b.BinaryStorageSize()), err +} + +// ReadFrom reads a BitSet from a stream written using WriteTo +func (b *BitSet) ReadFrom(stream io.Reader) (int64, error) { + var length uint64 + + // Read length first + err := binary.Read(stream, binaryOrder, &length) + if err != nil { + return 0, err + } + newset := New(uint(length)) + + if uint64(newset.length) != length { + return 0, errors.New("unmarshalling error: type mismatch") + } + + // Read remaining bytes as set + err = binary.Read(stream, binaryOrder, newset.set) + if err != nil { + return 0, err + } + + *b = *newset + return int64(b.BinaryStorageSize()), nil +} + +// MarshalBinary encodes a BitSet into a binary form and returns the result. +func (b *BitSet) MarshalBinary() ([]byte, error) { + var buf bytes.Buffer + writer := bufio.NewWriter(&buf) + + _, err := b.WriteTo(writer) + if err != nil { + return []byte{}, err + } + + err = writer.Flush() + + return buf.Bytes(), err +} + +// UnmarshalBinary decodes the binary form generated by MarshalBinary. +func (b *BitSet) UnmarshalBinary(data []byte) error { + buf := bytes.NewReader(data) + reader := bufio.NewReader(buf) + + _, err := b.ReadFrom(reader) + + return err +} + +// MarshalJSON marshals a BitSet as a JSON structure +func (b *BitSet) MarshalJSON() ([]byte, error) { + buffer := bytes.NewBuffer(make([]byte, 0, b.BinaryStorageSize())) + _, err := b.WriteTo(buffer) + if err != nil { + return nil, err + } + + // URLEncode all bytes + return json.Marshal(base64Encoding.EncodeToString(buffer.Bytes())) +} + +// UnmarshalJSON unmarshals a BitSet from JSON created using MarshalJSON +func (b *BitSet) UnmarshalJSON(data []byte) error { + // Unmarshal as string + var s string + err := json.Unmarshal(data, &s) + if err != nil { + return err + } + + // URLDecode string + buf, err := base64Encoding.DecodeString(s) + if err != nil { + return err + } + + _, err = b.ReadFrom(bytes.NewReader(buf)) + return err +} diff --git a/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/go.mod b/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/go.mod new file mode 100644 index 000000000000..c43e4522b7f9 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/go.mod @@ -0,0 +1,3 @@ +module github.com/bits-and-blooms/bitset + +go 1.14 diff --git a/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/go.sum b/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/go.sum new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/popcnt.go b/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/popcnt.go new file mode 100644 index 000000000000..76577a838284 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/popcnt.go @@ -0,0 +1,53 @@ +package bitset + +// bit population count, take from +// https://code.google.com/p/go/issues/detail?id=4988#c11 +// credit: https://code.google.com/u/arnehormann/ +func popcount(x uint64) (n uint64) { + x -= (x >> 1) & 0x5555555555555555 + x = (x>>2)&0x3333333333333333 + x&0x3333333333333333 + x += x >> 4 + x &= 0x0f0f0f0f0f0f0f0f + x *= 0x0101010101010101 + return x >> 56 +} + +func popcntSliceGo(s []uint64) uint64 { + cnt := uint64(0) + for _, x := range s { + cnt += popcount(x) + } + return cnt +} + +func popcntMaskSliceGo(s, m []uint64) uint64 { + cnt := uint64(0) + for i := range s { + cnt += popcount(s[i] &^ m[i]) + } + return cnt +} + +func popcntAndSliceGo(s, m []uint64) uint64 { + cnt := uint64(0) + for i := range s { + cnt += popcount(s[i] & m[i]) + } + return cnt +} + +func popcntOrSliceGo(s, m []uint64) uint64 { + cnt := uint64(0) + for i := range s { + cnt += popcount(s[i] | m[i]) + } + return cnt +} + +func popcntXorSliceGo(s, m []uint64) uint64 { + cnt := uint64(0) + for i := range s { + cnt += popcount(s[i] ^ m[i]) + } + return cnt +} diff --git a/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/popcnt_19.go b/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/popcnt_19.go new file mode 100644 index 000000000000..fc8ff4f367c2 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/popcnt_19.go @@ -0,0 +1,45 @@ +// +build go1.9 + +package bitset + +import "math/bits" + +func popcntSlice(s []uint64) uint64 { + var cnt int + for _, x := range s { + cnt += bits.OnesCount64(x) + } + return uint64(cnt) +} + +func popcntMaskSlice(s, m []uint64) uint64 { + var cnt int + for i := range s { + cnt += bits.OnesCount64(s[i] &^ m[i]) + } + return uint64(cnt) +} + +func popcntAndSlice(s, m []uint64) uint64 { + var cnt int + for i := range s { + cnt += bits.OnesCount64(s[i] & m[i]) + } + return uint64(cnt) +} + +func popcntOrSlice(s, m []uint64) uint64 { + var cnt int + for i := range s { + cnt += bits.OnesCount64(s[i] | m[i]) + } + return uint64(cnt) +} + +func popcntXorSlice(s, m []uint64) uint64 { + var cnt int + for i := range s { + cnt += bits.OnesCount64(s[i] ^ m[i]) + } + return uint64(cnt) +} diff --git a/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/popcnt_amd64.go b/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/popcnt_amd64.go new file mode 100644 index 000000000000..4cf64f24ad03 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/popcnt_amd64.go @@ -0,0 +1,68 @@ +// +build !go1.9 +// +build amd64,!appengine + +package bitset + +// *** the following functions are defined in popcnt_amd64.s + +//go:noescape + +func hasAsm() bool + +// useAsm is a flag used to select the GO or ASM implementation of the popcnt function +var useAsm = hasAsm() + +//go:noescape + +func popcntSliceAsm(s []uint64) uint64 + +//go:noescape + +func popcntMaskSliceAsm(s, m []uint64) uint64 + +//go:noescape + +func popcntAndSliceAsm(s, m []uint64) uint64 + +//go:noescape + +func popcntOrSliceAsm(s, m []uint64) uint64 + +//go:noescape + +func popcntXorSliceAsm(s, m []uint64) uint64 + +func popcntSlice(s []uint64) uint64 { + if useAsm { + return popcntSliceAsm(s) + } + return popcntSliceGo(s) +} + +func popcntMaskSlice(s, m []uint64) uint64 { + if useAsm { + return popcntMaskSliceAsm(s, m) + } + return popcntMaskSliceGo(s, m) +} + +func popcntAndSlice(s, m []uint64) uint64 { + if useAsm { + return popcntAndSliceAsm(s, m) + } + return popcntAndSliceGo(s, m) +} + +func popcntOrSlice(s, m []uint64) uint64 { + if useAsm { + return popcntOrSliceAsm(s, m) + } + return popcntOrSliceGo(s, m) +} + +func popcntXorSlice(s, m []uint64) uint64 { + if useAsm { + return popcntXorSliceAsm(s, m) + } + return popcntXorSliceGo(s, m) +} diff --git a/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/popcnt_amd64.s b/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/popcnt_amd64.s new file mode 100644 index 000000000000..666c0dcc17f5 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/popcnt_amd64.s @@ -0,0 +1,104 @@ +// +build !go1.9 +// +build amd64,!appengine + +TEXT ·hasAsm(SB),4,$0-1 +MOVQ $1, AX +CPUID +SHRQ $23, CX +ANDQ $1, CX +MOVB CX, ret+0(FP) +RET + +#define POPCNTQ_DX_DX BYTE $0xf3; BYTE $0x48; BYTE $0x0f; BYTE $0xb8; BYTE $0xd2 + +TEXT ·popcntSliceAsm(SB),4,$0-32 +XORQ AX, AX +MOVQ s+0(FP), SI +MOVQ s_len+8(FP), CX +TESTQ CX, CX +JZ popcntSliceEnd +popcntSliceLoop: +BYTE $0xf3; BYTE $0x48; BYTE $0x0f; BYTE $0xb8; BYTE $0x16 // POPCNTQ (SI), DX +ADDQ DX, AX +ADDQ $8, SI +LOOP popcntSliceLoop +popcntSliceEnd: +MOVQ AX, ret+24(FP) +RET + +TEXT ·popcntMaskSliceAsm(SB),4,$0-56 +XORQ AX, AX +MOVQ s+0(FP), SI +MOVQ s_len+8(FP), CX +TESTQ CX, CX +JZ popcntMaskSliceEnd +MOVQ m+24(FP), DI +popcntMaskSliceLoop: +MOVQ (DI), DX +NOTQ DX +ANDQ (SI), DX +POPCNTQ_DX_DX +ADDQ DX, AX +ADDQ $8, SI +ADDQ $8, DI +LOOP popcntMaskSliceLoop +popcntMaskSliceEnd: +MOVQ AX, ret+48(FP) +RET + +TEXT ·popcntAndSliceAsm(SB),4,$0-56 +XORQ AX, AX +MOVQ s+0(FP), SI +MOVQ s_len+8(FP), CX +TESTQ CX, CX +JZ popcntAndSliceEnd +MOVQ m+24(FP), DI +popcntAndSliceLoop: +MOVQ (DI), DX +ANDQ (SI), DX +POPCNTQ_DX_DX +ADDQ DX, AX +ADDQ $8, SI +ADDQ $8, DI +LOOP popcntAndSliceLoop +popcntAndSliceEnd: +MOVQ AX, ret+48(FP) +RET + +TEXT ·popcntOrSliceAsm(SB),4,$0-56 +XORQ AX, AX +MOVQ s+0(FP), SI +MOVQ s_len+8(FP), CX +TESTQ CX, CX +JZ popcntOrSliceEnd +MOVQ m+24(FP), DI +popcntOrSliceLoop: +MOVQ (DI), DX +ORQ (SI), DX +POPCNTQ_DX_DX +ADDQ DX, AX +ADDQ $8, SI +ADDQ $8, DI +LOOP popcntOrSliceLoop +popcntOrSliceEnd: +MOVQ AX, ret+48(FP) +RET + +TEXT ·popcntXorSliceAsm(SB),4,$0-56 +XORQ AX, AX +MOVQ s+0(FP), SI +MOVQ s_len+8(FP), CX +TESTQ CX, CX +JZ popcntXorSliceEnd +MOVQ m+24(FP), DI +popcntXorSliceLoop: +MOVQ (DI), DX +XORQ (SI), DX +POPCNTQ_DX_DX +ADDQ DX, AX +ADDQ $8, SI +ADDQ $8, DI +LOOP popcntXorSliceLoop +popcntXorSliceEnd: +MOVQ AX, ret+48(FP) +RET diff --git a/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/popcnt_generic.go b/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/popcnt_generic.go new file mode 100644 index 000000000000..21e0ff7b4fc5 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/popcnt_generic.go @@ -0,0 +1,24 @@ +// +build !go1.9 +// +build !amd64 appengine + +package bitset + +func popcntSlice(s []uint64) uint64 { + return popcntSliceGo(s) +} + +func popcntMaskSlice(s, m []uint64) uint64 { + return popcntMaskSliceGo(s, m) +} + +func popcntAndSlice(s, m []uint64) uint64 { + return popcntAndSliceGo(s, m) +} + +func popcntOrSlice(s, m []uint64) uint64 { + return popcntOrSliceGo(s, m) +} + +func popcntXorSlice(s, m []uint64) uint64 { + return popcntXorSliceGo(s, m) +} diff --git a/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/trailing_zeros_18.go b/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/trailing_zeros_18.go new file mode 100644 index 000000000000..c52b61be9fc2 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/trailing_zeros_18.go @@ -0,0 +1,14 @@ +// +build !go1.9 + +package bitset + +var deBruijn = [...]byte{ + 0, 1, 56, 2, 57, 49, 28, 3, 61, 58, 42, 50, 38, 29, 17, 4, + 62, 47, 59, 36, 45, 43, 51, 22, 53, 39, 33, 30, 24, 18, 12, 5, + 63, 55, 48, 27, 60, 41, 37, 16, 46, 35, 44, 21, 52, 32, 23, 11, + 54, 26, 40, 15, 34, 20, 31, 10, 25, 14, 19, 9, 13, 8, 7, 6, +} + +func trailingZeroes64(v uint64) uint { + return uint(deBruijn[((v&-v)*0x03f79d71b4ca8b09)>>58]) +} diff --git a/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/trailing_zeros_19.go b/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/trailing_zeros_19.go new file mode 100644 index 000000000000..36a988e714d1 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/bits-and-blooms/bitset/trailing_zeros_19.go @@ -0,0 +1,9 @@ +// +build go1.9 + +package bitset + +import "math/bits" + +func trailingZeroes64(v uint64) uint { + return uint(bits.TrailingZeros64(v)) +} diff --git a/cluster-autoscaler/vendor/github.com/blang/semver/.travis.yml b/cluster-autoscaler/vendor/github.com/blang/semver/.travis.yml new file mode 100644 index 000000000000..102fb9a691b6 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/blang/semver/.travis.yml @@ -0,0 +1,21 @@ +language: go +matrix: + include: + - go: 1.4.3 + - go: 1.5.4 + - go: 1.6.3 + - go: 1.7 + - go: tip + allow_failures: + - go: tip +install: +- go get golang.org/x/tools/cmd/cover +- go get github.com/mattn/goveralls +script: +- echo "Test and track coverage" ; $HOME/gopath/bin/goveralls -package "." -service=travis-ci + -repotoken $COVERALLS_TOKEN +- echo "Build examples" ; cd examples && go build +- echo "Check if gofmt'd" ; diff -u <(echo -n) <(gofmt -d -s .) +env: + global: + secure: HroGEAUQpVq9zX1b1VIkraLiywhGbzvNnTZq2TMxgK7JHP8xqNplAeF1izrR2i4QLL9nsY+9WtYss4QuPvEtZcVHUobw6XnL6radF7jS1LgfYZ9Y7oF+zogZ2I5QUMRLGA7rcxQ05s7mKq3XZQfeqaNts4bms/eZRefWuaFZbkw= diff --git a/cluster-autoscaler/vendor/github.com/blang/semver/v4/LICENSE b/cluster-autoscaler/vendor/github.com/blang/semver/LICENSE similarity index 100% rename from cluster-autoscaler/vendor/github.com/blang/semver/v4/LICENSE rename to cluster-autoscaler/vendor/github.com/blang/semver/LICENSE diff --git a/cluster-autoscaler/vendor/github.com/blang/semver/README.md b/cluster-autoscaler/vendor/github.com/blang/semver/README.md new file mode 100644 index 000000000000..08b2e4a3d76e --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/blang/semver/README.md @@ -0,0 +1,194 @@ +semver for golang [![Build Status](https://travis-ci.org/blang/semver.svg?branch=master)](https://travis-ci.org/blang/semver) [![GoDoc](https://godoc.org/github.com/blang/semver?status.png)](https://godoc.org/github.com/blang/semver) [![Coverage Status](https://img.shields.io/coveralls/blang/semver.svg)](https://coveralls.io/r/blang/semver?branch=master) +====== + +semver is a [Semantic Versioning](http://semver.org/) library written in golang. It fully covers spec version `2.0.0`. + +Usage +----- +```bash +$ go get github.com/blang/semver +``` +Note: Always vendor your dependencies or fix on a specific version tag. + +```go +import github.com/blang/semver +v1, err := semver.Make("1.0.0-beta") +v2, err := semver.Make("2.0.0-beta") +v1.Compare(v2) +``` + +Also check the [GoDocs](http://godoc.org/github.com/blang/semver). + +Why should I use this lib? +----- + +- Fully spec compatible +- No reflection +- No regex +- Fully tested (Coverage >99%) +- Readable parsing/validation errors +- Fast (See [Benchmarks](#benchmarks)) +- Only Stdlib +- Uses values instead of pointers +- Many features, see below + + +Features +----- + +- Parsing and validation at all levels +- Comparator-like comparisons +- Compare Helper Methods +- InPlace manipulation +- Ranges `>=1.0.0 <2.0.0 || >=3.0.0 !3.0.1-beta.1` +- Wildcards `>=1.x`, `<=2.5.x` +- Sortable (implements sort.Interface) +- database/sql compatible (sql.Scanner/Valuer) +- encoding/json compatible (json.Marshaler/Unmarshaler) + +Ranges +------ + +A `Range` is a set of conditions which specify which versions satisfy the range. + +A condition is composed of an operator and a version. The supported operators are: + +- `<1.0.0` Less than `1.0.0` +- `<=1.0.0` Less than or equal to `1.0.0` +- `>1.0.0` Greater than `1.0.0` +- `>=1.0.0` Greater than or equal to `1.0.0` +- `1.0.0`, `=1.0.0`, `==1.0.0` Equal to `1.0.0` +- `!1.0.0`, `!=1.0.0` Not equal to `1.0.0`. Excludes version `1.0.0`. + +Note that spaces between the operator and the version will be gracefully tolerated. + +A `Range` can link multiple `Ranges` separated by space: + +Ranges can be linked by logical AND: + + - `>1.0.0 <2.0.0` would match between both ranges, so `1.1.1` and `1.8.7` but not `1.0.0` or `2.0.0` + - `>1.0.0 <3.0.0 !2.0.3-beta.2` would match every version between `1.0.0` and `3.0.0` except `2.0.3-beta.2` + +Ranges can also be linked by logical OR: + + - `<2.0.0 || >=3.0.0` would match `1.x.x` and `3.x.x` but not `2.x.x` + +AND has a higher precedence than OR. It's not possible to use brackets. + +Ranges can be combined by both AND and OR + + - `>1.0.0 <2.0.0 || >3.0.0 !4.2.1` would match `1.2.3`, `1.9.9`, `3.1.1`, but not `4.2.1`, `2.1.1` + +Range usage: + +``` +v, err := semver.Parse("1.2.3") +range, err := semver.ParseRange(">1.0.0 <2.0.0 || >=3.0.0") +if range(v) { + //valid +} + +``` + +Example +----- + +Have a look at full examples in [examples/main.go](examples/main.go) + +```go +import github.com/blang/semver + +v, err := semver.Make("0.0.1-alpha.preview+123.github") +fmt.Printf("Major: %d\n", v.Major) +fmt.Printf("Minor: %d\n", v.Minor) +fmt.Printf("Patch: %d\n", v.Patch) +fmt.Printf("Pre: %s\n", v.Pre) +fmt.Printf("Build: %s\n", v.Build) + +// Prerelease versions array +if len(v.Pre) > 0 { + fmt.Println("Prerelease versions:") + for i, pre := range v.Pre { + fmt.Printf("%d: %q\n", i, pre) + } +} + +// Build meta data array +if len(v.Build) > 0 { + fmt.Println("Build meta data:") + for i, build := range v.Build { + fmt.Printf("%d: %q\n", i, build) + } +} + +v001, err := semver.Make("0.0.1") +// Compare using helpers: v.GT(v2), v.LT, v.GTE, v.LTE +v001.GT(v) == true +v.LT(v001) == true +v.GTE(v) == true +v.LTE(v) == true + +// Or use v.Compare(v2) for comparisons (-1, 0, 1): +v001.Compare(v) == 1 +v.Compare(v001) == -1 +v.Compare(v) == 0 + +// Manipulate Version in place: +v.Pre[0], err = semver.NewPRVersion("beta") +if err != nil { + fmt.Printf("Error parsing pre release version: %q", err) +} + +fmt.Println("\nValidate versions:") +v.Build[0] = "?" + +err = v.Validate() +if err != nil { + fmt.Printf("Validation failed: %s\n", err) +} +``` + + +Benchmarks +----- + + BenchmarkParseSimple-4 5000000 390 ns/op 48 B/op 1 allocs/op + BenchmarkParseComplex-4 1000000 1813 ns/op 256 B/op 7 allocs/op + BenchmarkParseAverage-4 1000000 1171 ns/op 163 B/op 4 allocs/op + BenchmarkStringSimple-4 20000000 119 ns/op 16 B/op 1 allocs/op + BenchmarkStringLarger-4 10000000 206 ns/op 32 B/op 2 allocs/op + BenchmarkStringComplex-4 5000000 324 ns/op 80 B/op 3 allocs/op + BenchmarkStringAverage-4 5000000 273 ns/op 53 B/op 2 allocs/op + BenchmarkValidateSimple-4 200000000 9.33 ns/op 0 B/op 0 allocs/op + BenchmarkValidateComplex-4 3000000 469 ns/op 0 B/op 0 allocs/op + BenchmarkValidateAverage-4 5000000 256 ns/op 0 B/op 0 allocs/op + BenchmarkCompareSimple-4 100000000 11.8 ns/op 0 B/op 0 allocs/op + BenchmarkCompareComplex-4 50000000 30.8 ns/op 0 B/op 0 allocs/op + BenchmarkCompareAverage-4 30000000 41.5 ns/op 0 B/op 0 allocs/op + BenchmarkSort-4 3000000 419 ns/op 256 B/op 2 allocs/op + BenchmarkRangeParseSimple-4 2000000 850 ns/op 192 B/op 5 allocs/op + BenchmarkRangeParseAverage-4 1000000 1677 ns/op 400 B/op 10 allocs/op + BenchmarkRangeParseComplex-4 300000 5214 ns/op 1440 B/op 30 allocs/op + BenchmarkRangeMatchSimple-4 50000000 25.6 ns/op 0 B/op 0 allocs/op + BenchmarkRangeMatchAverage-4 30000000 56.4 ns/op 0 B/op 0 allocs/op + BenchmarkRangeMatchComplex-4 10000000 153 ns/op 0 B/op 0 allocs/op + +See benchmark cases at [semver_test.go](semver_test.go) + + +Motivation +----- + +I simply couldn't find any lib supporting the full spec. Others were just wrong or used reflection and regex which i don't like. + + +Contribution +----- + +Feel free to make a pull request. For bigger changes create a issue first to discuss about it. + + +License +----- + +See [LICENSE](LICENSE) file. diff --git a/cluster-autoscaler/vendor/github.com/blang/semver/v4/json.go b/cluster-autoscaler/vendor/github.com/blang/semver/json.go similarity index 100% rename from cluster-autoscaler/vendor/github.com/blang/semver/v4/json.go rename to cluster-autoscaler/vendor/github.com/blang/semver/json.go diff --git a/cluster-autoscaler/vendor/github.com/blang/semver/package.json b/cluster-autoscaler/vendor/github.com/blang/semver/package.json new file mode 100644 index 000000000000..1cf8ebdd9c18 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/blang/semver/package.json @@ -0,0 +1,17 @@ +{ + "author": "blang", + "bugs": { + "URL": "https://github.com/blang/semver/issues", + "url": "https://github.com/blang/semver/issues" + }, + "gx": { + "dvcsimport": "github.com/blang/semver" + }, + "gxVersion": "0.10.0", + "language": "go", + "license": "MIT", + "name": "semver", + "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", + "version": "3.5.1" +} + diff --git a/cluster-autoscaler/vendor/github.com/blang/semver/v4/range.go b/cluster-autoscaler/vendor/github.com/blang/semver/range.go similarity index 99% rename from cluster-autoscaler/vendor/github.com/blang/semver/v4/range.go rename to cluster-autoscaler/vendor/github.com/blang/semver/range.go index 95f7139b9770..fca406d47939 100644 --- a/cluster-autoscaler/vendor/github.com/blang/semver/v4/range.go +++ b/cluster-autoscaler/vendor/github.com/blang/semver/range.go @@ -327,7 +327,7 @@ func expandWildcardVersion(parts [][]string) ([][]string, error) { for _, p := range parts { var newParts []string for _, ap := range p { - if strings.Contains(ap, "x") { + if strings.Index(ap, "x") != -1 { opStr, vStr, err := splitComparatorVersion(ap) if err != nil { return nil, err diff --git a/cluster-autoscaler/vendor/github.com/blang/semver/v4/semver.go b/cluster-autoscaler/vendor/github.com/blang/semver/semver.go similarity index 85% rename from cluster-autoscaler/vendor/github.com/blang/semver/v4/semver.go rename to cluster-autoscaler/vendor/github.com/blang/semver/semver.go index 307de610f927..8ee0842e6ac7 100644 --- a/cluster-autoscaler/vendor/github.com/blang/semver/v4/semver.go +++ b/cluster-autoscaler/vendor/github.com/blang/semver/semver.go @@ -26,7 +26,7 @@ type Version struct { Minor uint64 Patch uint64 Pre []PRVersion - Build []string //No Precedence + Build []string //No Precendence } // Version to string @@ -61,18 +61,6 @@ func (v Version) String() string { return string(b) } -// FinalizeVersion discards prerelease and build number and only returns -// major, minor and patch number. -func (v Version) FinalizeVersion() string { - b := make([]byte, 0, 5) - b = strconv.AppendUint(b, v.Major, 10) - b = append(b, '.') - b = strconv.AppendUint(b, v.Minor, 10) - b = append(b, '.') - b = strconv.AppendUint(b, v.Patch, 10) - return string(b) -} - // Equals checks if v is equal to o. func (v Version) Equals(o Version) bool { return (v.Compare(o) == 0) @@ -173,27 +161,6 @@ func (v Version) Compare(o Version) int { } -// IncrementPatch increments the patch version -func (v *Version) IncrementPatch() error { - v.Patch++ - return nil -} - -// IncrementMinor increments the minor version -func (v *Version) IncrementMinor() error { - v.Minor++ - v.Patch = 0 - return nil -} - -// IncrementMajor increments the major version -func (v *Version) IncrementMajor() error { - v.Major++ - v.Minor = 0 - v.Patch = 0 - return nil -} - // Validate validates v and returns error in case func (v Version) Validate() error { // Major, Minor, Patch already validated using uint64 @@ -222,10 +189,10 @@ func (v Version) Validate() error { } // New is an alias for Parse and returns a pointer, parses version string and returns a validated Version or error -func New(s string) (*Version, error) { +func New(s string) (vp *Version, err error) { v, err := Parse(s) - vp := &v - return vp, err + vp = &v + return } // Make is an alias for Parse, parses version string and returns a validated Version or error @@ -235,25 +202,14 @@ func Make(s string) (Version, error) { // ParseTolerant allows for certain version specifications that do not strictly adhere to semver // specs to be parsed by this library. It does so by normalizing versions before passing them to -// Parse(). It currently trims spaces, removes a "v" prefix, adds a 0 patch number to versions -// with only major and minor components specified, and removes leading 0s. +// Parse(). It currently trims spaces, removes a "v" prefix, and adds a 0 patch number to versions +// with only major and minor components specified func ParseTolerant(s string) (Version, error) { s = strings.TrimSpace(s) s = strings.TrimPrefix(s, "v") // Split into major.minor.(patch+pr+meta) parts := strings.SplitN(s, ".", 3) - // Remove leading zeros. - for i, p := range parts { - if len(p) > 1 { - p = strings.TrimLeft(p, "0") - if len(p) == 0 || !strings.ContainsAny(p[0:1], "0123456789") { - p = "0" + p - } - parts[i] = p - } - } - // Fill up shortened versions. if len(parts) < 3 { if strings.ContainsAny(parts[len(parts)-1], "+-") { return Version{}, errors.New("Short version cannot contain PreRelease/Build meta data") @@ -261,8 +217,8 @@ func ParseTolerant(s string) (Version, error) { for len(parts) < 3 { parts = append(parts, "0") } + s = strings.Join(parts, ".") } - s = strings.Join(parts, ".") return Parse(s) } @@ -460,17 +416,3 @@ func NewBuildVersion(s string) (string, error) { } return s, nil } - -// FinalizeVersion returns the major, minor and patch number only and discards -// prerelease and build number. -func FinalizeVersion(s string) (string, error) { - v, err := Parse(s) - if err != nil { - return "", err - } - v.Pre = nil - v.Build = nil - - finalVer := v.String() - return finalVer, nil -} diff --git a/cluster-autoscaler/vendor/github.com/blang/semver/v4/sort.go b/cluster-autoscaler/vendor/github.com/blang/semver/sort.go similarity index 100% rename from cluster-autoscaler/vendor/github.com/blang/semver/v4/sort.go rename to cluster-autoscaler/vendor/github.com/blang/semver/sort.go diff --git a/cluster-autoscaler/vendor/github.com/blang/semver/v4/sql.go b/cluster-autoscaler/vendor/github.com/blang/semver/sql.go similarity index 87% rename from cluster-autoscaler/vendor/github.com/blang/semver/v4/sql.go rename to cluster-autoscaler/vendor/github.com/blang/semver/sql.go index db958134f3b4..eb4d802666e0 100644 --- a/cluster-autoscaler/vendor/github.com/blang/semver/v4/sql.go +++ b/cluster-autoscaler/vendor/github.com/blang/semver/sql.go @@ -14,7 +14,7 @@ func (v *Version) Scan(src interface{}) (err error) { case []byte: str = string(src) default: - return fmt.Errorf("version.Scan: cannot convert %T to string", src) + return fmt.Errorf("Version.Scan: cannot convert %T to string.", src) } if t, err := Parse(str); err == nil { diff --git a/cluster-autoscaler/vendor/github.com/blang/semver/v4/go.mod b/cluster-autoscaler/vendor/github.com/blang/semver/v4/go.mod deleted file mode 100644 index 06d26221870d..000000000000 --- a/cluster-autoscaler/vendor/github.com/blang/semver/v4/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module github.com/blang/semver/v4 - -go 1.14 diff --git a/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/.gitignore b/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/.gitignore index 1b87ff10e6b8..d99bf92cfef7 100644 --- a/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/.gitignore +++ b/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/.gitignore @@ -1,6 +1,6 @@ test/test -test/test.coverage test/piggie/piggie -test/phaul/phaul -test/phaul/phaul.coverage +test/phaul image +rpc/rpc.proto +stats/stats.proto diff --git a/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/Makefile b/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/Makefile index 67c43a05b32b..2c303a3c9f42 100644 --- a/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/Makefile +++ b/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/Makefile @@ -1,12 +1,5 @@ -SHELL = /bin/bash GO ?= go CC ?= gcc -COVERAGE_PATH ?= $(shell pwd)/.coverage -CRIU_FEATURE_MEM_TRACK = $(shell if criu check --feature mem_dirty_track > /dev/null; then echo 1; else echo 0; fi) -CRIU_FEATURE_LAZY_PAGES = $(shell if criu check --feature uffd-noncoop > /dev/null; then echo 1; else echo 0; fi) -CRIU_FEATURE_PIDFD_STORE = $(shell if criu check --feature pidfd_store > /dev/null; then echo 1; else echo 0; fi) - -export CRIU_FEATURE_MEM_TRACK CRIU_FEATURE_LAZY_PAGES CRIU_FEATURE_PIDFD_STORE all: build test phaul-test @@ -16,15 +9,13 @@ lint: build: $(GO) build -v ./... -TEST_PAYLOAD := test/piggie/piggie -TEST_BINARIES := test/test $(TEST_PAYLOAD) test/phaul/phaul -COVERAGE_BINARIES := test/test.coverage test/phaul/phaul.coverage +TEST_BINARIES := test/test test/piggie/piggie test/phaul/phaul test-bin: $(TEST_BINARIES) test/piggie/piggie: test/piggie/piggie.c $(CC) $^ -o $@ -test/test: test/main.go +test/test: test/*.go $(GO) build -v -o $@ $^ test: $(TEST_BINARIES) @@ -36,7 +27,7 @@ test: $(TEST_BINARIES) } rm -rf image -test/phaul/phaul: test/phaul/main.go +test/phaul/phaul: test/phaul/*.go $(GO) build -v -o $@ $^ phaul-test: $(TEST_BINARIES) @@ -46,41 +37,10 @@ phaul-test: $(TEST_BINARIES) pkill -9 piggie; \ } -test/test.coverage: test/*.go - $(GO) test \ - -covermode=count \ - -coverpkg=./... \ - -mod=vendor \ - -tags coverage \ - -buildmode=pie -c -o $@ $^ - -test/phaul/phaul.coverage: test/phaul/*.go - $(GO) test \ - -covermode=count \ - -coverpkg=./... \ - -mod=vendor \ - -tags coverage \ - -buildmode=pie -c -o $@ $^ - -coverage: $(COVERAGE_BINARIES) $(TEST_PAYLOAD) - mkdir -p $(COVERAGE_PATH) - mkdir -p image - PID=$$(test/piggie/piggie) && { \ - test/test.coverage -test.coverprofile=coverprofile.integration.$$RANDOM -test.outputdir=${COVERAGE_PATH} COVERAGE dump $$PID image && \ - test/test.coverage -test.coverprofile=coverprofile.integration.$$RANDOM -test.outputdir=${COVERAGE_PATH} COVERAGE restore image; \ - pkill -9 piggie; \ - } - rm -rf image - PID=$$(test/piggie/piggie) && { \ - test/phaul/phaul.coverage -test.coverprofile=coverprofile.integration.$$RANDOM -test.outputdir=${COVERAGE_PATH} COVERAGE $$PID; \ - pkill -9 piggie; \ - } - echo "mode: set" > .coverage/coverage.out && cat .coverage/coverprofile* | \ - grep -v mode: | sort -r | awk '{if($$1 != last) {print $$0;last=$$1}}' >> .coverage/coverage.out - clean: - @rm -f $(TEST_BINARIES) $(COVERAGE_BINARIES) codecov - @rm -rf image $(COVERAGE_PATH) + @rm -f $(TEST_BINARIES) + @rm -rf image + @rm -f rpc/rpc.proto stats/stats.proto rpc/rpc.proto: curl -sSL https://raw.githubusercontent.com/checkpoint-restore/criu/master/images/rpc.proto -o $@ @@ -89,19 +49,9 @@ stats/stats.proto: curl -sSL https://raw.githubusercontent.com/checkpoint-restore/criu/master/images/stats.proto -o $@ rpc/rpc.pb.go: rpc/rpc.proto - protoc --go_out=. --go_opt=M$^=rpc/ $^ + protoc --go_out=. $^ stats/stats.pb.go: stats/stats.proto - protoc --go_out=. --go_opt=M$^=stats/ $^ - -vendor: - GO111MODULE=on $(GO) mod tidy - GO111MODULE=on $(GO) mod vendor - GO111MODULE=on $(GO) mod verify - -codecov: - curl -Os https://uploader.codecov.io/latest/linux/codecov - chmod +x codecov - ./codecov -f '.coverage/coverage.out' + protoc --go_out=. $^ -.PHONY: build test phaul-test test-bin clean lint vendor coverage codecov +.PHONY: build test phaul-test test-bin clean lint diff --git a/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/README.md b/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/README.md index a7483321b5c3..390da3e98b07 100644 --- a/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/README.md +++ b/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/README.md @@ -16,7 +16,7 @@ The following example would print the version of CRIU: import ( "log" - "github.com/checkpoint-restore/go-criu/v5" + "github.com/checkpoint/restore/go-criu/v5" ) func main() { @@ -50,7 +50,6 @@ The following table shows the relation between go-criu and criu versions: | Major version | Latest release | CRIU version | | -------------- | -------------- | ------------ | -| v5             | 5.2.0         | 3.16         | | v5             | 5.0.0         | 3.15         | | v4             | 4.1.0         | 3.14         | diff --git a/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/features.go b/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/features.go deleted file mode 100644 index c7127f95157a..000000000000 --- a/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/features.go +++ /dev/null @@ -1,45 +0,0 @@ -package criu - -import ( - "fmt" - - "github.com/checkpoint-restore/go-criu/v5/rpc" -) - -// Feature checking in go-criu is based on the libcriu feature checking function. - -// Feature checking allows the user to check if CRIU supports -// certain features. There are CRIU features which do not depend -// on the version of CRIU but on kernel features or architecture. -// -// One example is memory tracking. Memory tracking can be disabled -// in the kernel or there are architectures which do not support -// it (aarch64 for example). By using the feature check a libcriu -// user can easily query CRIU if a certain feature is available. -// -// The features which should be checked can be marked in the -// structure 'struct criu_feature_check'. Each structure member -// that is set to true will result in CRIU checking for the -// availability of that feature in the current combination of -// CRIU/kernel/architecture. -// -// Available features will be set to true when the function -// returns successfully. Missing features will be set to false. - -func (c *Criu) FeatureCheck(features *rpc.CriuFeatures) (*rpc.CriuFeatures, error) { - resp, err := c.doSwrkWithResp( - rpc.CriuReqType_FEATURE_CHECK, - nil, - nil, - features, - ) - if err != nil { - return nil, err - } - - if resp.GetType() != rpc.CriuReqType_FEATURE_CHECK { - return nil, fmt.Errorf("Unexpected CRIU RPC response") - } - - return features, nil -} diff --git a/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/go.mod b/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/go.mod index cf4fea9f05e7..58931e5f9837 100644 --- a/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/go.mod +++ b/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/go.mod @@ -3,6 +3,7 @@ module github.com/checkpoint-restore/go-criu/v5 go 1.13 require ( + github.com/golang/protobuf v1.4.3 golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c - google.golang.org/protobuf v1.27.1 + google.golang.org/protobuf v1.23.0 ) diff --git a/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/go.sum b/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/go.sum index 789fdcb11aa9..0a5a48cde74c 100644 --- a/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/go.sum +++ b/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/go.sum @@ -1,10 +1,22 @@ -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c h1:VwygUrnw9jn88c4u8GD3rZQbqrP/tgas88tPUbBxQrk= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= diff --git a/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/main.go b/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/main.go index 88b1b24587af..78811c309ce2 100644 --- a/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/main.go +++ b/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/main.go @@ -87,19 +87,19 @@ func (c *Criu) sendAndRecv(reqB []byte) ([]byte, int, error) { } func (c *Criu) doSwrk(reqType rpc.CriuReqType, opts *rpc.CriuOpts, nfy Notify) error { - resp, err := c.doSwrkWithResp(reqType, opts, nfy, nil) + resp, err := c.doSwrkWithResp(reqType, opts, nfy) if err != nil { return err } respType := resp.GetType() if respType != reqType { - return errors.New("unexpected CRIU RPC response") + return errors.New("unexpected responce") } return nil } -func (c *Criu) doSwrkWithResp(reqType rpc.CriuReqType, opts *rpc.CriuOpts, nfy Notify, features *rpc.CriuFeatures) (*rpc.CriuResp, error) { +func (c *Criu) doSwrkWithResp(reqType rpc.CriuReqType, opts *rpc.CriuOpts, nfy Notify) (*rpc.CriuResp, error) { var resp *rpc.CriuResp req := rpc.CriuReq{ @@ -111,10 +111,6 @@ func (c *Criu) doSwrkWithResp(reqType rpc.CriuReqType, opts *rpc.CriuOpts, nfy N opts.NotifyScripts = proto.Bool(true) } - if features != nil { - req.Features = features - } - if c.swrkCmd == nil { err := c.Prepare() if err != nil { @@ -213,7 +209,7 @@ func (c *Criu) StartPageServer(opts *rpc.CriuOpts) error { // StartPageServerChld starts the page server and returns PID and port func (c *Criu) StartPageServerChld(opts *rpc.CriuOpts) (int, int, error) { - resp, err := c.doSwrkWithResp(rpc.CriuReqType_PAGE_SERVER_CHLD, opts, nil, nil) + resp, err := c.doSwrkWithResp(rpc.CriuReqType_PAGE_SERVER_CHLD, opts, nil) if err != nil { return 0, 0, err } @@ -224,7 +220,7 @@ func (c *Criu) StartPageServerChld(opts *rpc.CriuOpts) (int, int, error) { // GetCriuVersion executes the VERSION RPC call and returns the version // as an integer. Major * 10000 + Minor * 100 + SubLevel func (c *Criu) GetCriuVersion() (int, error) { - resp, err := c.doSwrkWithResp(rpc.CriuReqType_VERSION, nil, nil, nil) + resp, err := c.doSwrkWithResp(rpc.CriuReqType_VERSION, nil, nil) if err != nil { return 0, err } diff --git a/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/rpc/rpc.pb.go b/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/rpc/rpc.pb.go index 15e33fea52fd..fa37f93cbd6d 100644 --- a/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/rpc/rpc.pb.go +++ b/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/rpc/rpc.pb.go @@ -1,14 +1,13 @@ -// SPDX-License-Identifier: MIT - // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.25.0 // protoc v3.12.4 // source: rpc/rpc.proto package rpc import ( + proto "github.com/golang/protobuf/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -22,6 +21,10 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + type CriuCgMode int32 const ( @@ -703,9 +706,7 @@ type CriuOpts struct { Tls *bool `protobuf:"varint,58,opt,name=tls" json:"tls,omitempty"` TlsNoCnVerify *bool `protobuf:"varint,59,opt,name=tls_no_cn_verify,json=tlsNoCnVerify" json:"tls_no_cn_verify,omitempty"` CgroupYard *string `protobuf:"bytes,60,opt,name=cgroup_yard,json=cgroupYard" json:"cgroup_yard,omitempty"` - PreDumpMode *CriuPreDumpMode `protobuf:"varint,61,opt,name=pre_dump_mode,json=preDumpMode,enum=CriuPreDumpMode,def=1" json:"pre_dump_mode,omitempty"` - PidfdStoreSk *int32 `protobuf:"varint,62,opt,name=pidfd_store_sk,json=pidfdStoreSk" json:"pidfd_store_sk,omitempty"` - LsmMountContext *string `protobuf:"bytes,63,opt,name=lsm_mount_context,json=lsmMountContext" json:"lsm_mount_context,omitempty"` // optional bool check_mounts = 128; + PreDumpMode *CriuPreDumpMode `protobuf:"varint,61,opt,name=pre_dump_mode,json=preDumpMode,enum=CriuPreDumpMode,def=1" json:"pre_dump_mode,omitempty"` // optional bool check_mounts = 128; } // Default values for CriuOpts fields. @@ -1168,20 +1169,6 @@ func (x *CriuOpts) GetPreDumpMode() CriuPreDumpMode { return Default_CriuOpts_PreDumpMode } -func (x *CriuOpts) GetPidfdStoreSk() int32 { - if x != nil && x.PidfdStoreSk != nil { - return *x.PidfdStoreSk - } - return 0 -} - -func (x *CriuOpts) GetLsmMountContext() string { - if x != nil && x.LsmMountContext != nil { - return *x.LsmMountContext - } - return "" -} - type CriuDumpResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1339,9 +1326,8 @@ type CriuFeatures struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - MemTrack *bool `protobuf:"varint,1,opt,name=mem_track,json=memTrack" json:"mem_track,omitempty"` - LazyPages *bool `protobuf:"varint,2,opt,name=lazy_pages,json=lazyPages" json:"lazy_pages,omitempty"` - PidfdStore *bool `protobuf:"varint,3,opt,name=pidfd_store,json=pidfdStore" json:"pidfd_store,omitempty"` + MemTrack *bool `protobuf:"varint,1,opt,name=mem_track,json=memTrack" json:"mem_track,omitempty"` + LazyPages *bool `protobuf:"varint,2,opt,name=lazy_pages,json=lazyPages" json:"lazy_pages,omitempty"` } func (x *CriuFeatures) Reset() { @@ -1390,13 +1376,6 @@ func (x *CriuFeatures) GetLazyPages() bool { return false } -func (x *CriuFeatures) GetPidfdStore() bool { - if x != nil && x.PidfdStore != nil { - return *x.PidfdStore - } - return false -} - type CriuReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1739,7 +1718,7 @@ var file_rpc_rpc_proto_rawDesc = []byte{ 0x52, 0x04, 0x63, 0x74, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x1f, 0x0a, 0x07, 0x75, 0x6e, 0x69, 0x78, 0x5f, 0x73, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, - 0x20, 0x02, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x22, 0x8c, 0x11, 0x0a, 0x09, + 0x20, 0x02, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x6f, 0x64, 0x65, 0x22, 0xba, 0x10, 0x0a, 0x09, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x6f, 0x70, 0x74, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x64, 0x69, 0x72, 0x5f, 0x66, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x05, 0x52, 0x0b, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x44, 0x69, 0x72, 0x46, 0x64, 0x12, 0x10, 0x0a, @@ -1871,100 +1850,92 @@ var file_rpc_rpc_proto_rawDesc = []byte{ 0x75, 0x6d, 0x70, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x3d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x70, 0x72, 0x65, 0x5f, 0x64, 0x75, 0x6d, 0x70, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x3a, 0x06, 0x53, 0x50, 0x4c, 0x49, 0x43, 0x45, 0x52, 0x0b, 0x70, 0x72, 0x65, - 0x44, 0x75, 0x6d, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x69, 0x64, 0x66, - 0x64, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x73, 0x6b, 0x18, 0x3e, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0c, 0x70, 0x69, 0x64, 0x66, 0x64, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x6b, 0x12, 0x2a, - 0x0a, 0x11, 0x6c, 0x73, 0x6d, 0x5f, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x18, 0x3f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x73, 0x6d, 0x4d, 0x6f, - 0x75, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x2c, 0x0a, 0x0e, 0x63, 0x72, - 0x69, 0x75, 0x5f, 0x64, 0x75, 0x6d, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, - 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, - 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x22, 0x25, 0x0a, 0x11, 0x63, 0x72, 0x69, 0x75, - 0x5f, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, - 0x03, 0x70, 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x05, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, - 0x37, 0x0a, 0x0b, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x12, 0x16, - 0x0a, 0x06, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x6c, 0x0a, 0x0d, 0x63, 0x72, 0x69, 0x75, - 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x65, 0x6d, - 0x5f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x65, - 0x6d, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x61, 0x7a, 0x79, 0x5f, 0x70, - 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6c, 0x61, 0x7a, 0x79, - 0x50, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x69, 0x64, 0x66, 0x64, 0x5f, 0x73, - 0x74, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x70, 0x69, 0x64, 0x66, - 0x64, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x22, 0xd0, 0x01, 0x0a, 0x08, 0x63, 0x72, 0x69, 0x75, 0x5f, - 0x72, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, - 0x0e, 0x32, 0x0e, 0x2e, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x72, 0x65, 0x71, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x6f, 0x70, 0x74, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x6f, 0x70, 0x74, - 0x73, 0x52, 0x04, 0x6f, 0x70, 0x74, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6e, 0x6f, 0x74, 0x69, 0x66, - 0x79, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0d, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1b, - 0x0a, 0x09, 0x6b, 0x65, 0x65, 0x70, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x08, 0x6b, 0x65, 0x65, 0x70, 0x4f, 0x70, 0x65, 0x6e, 0x12, 0x2a, 0x0a, 0x08, 0x66, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, - 0x63, 0x72, 0x69, 0x75, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, 0x08, 0x66, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x8f, 0x03, 0x0a, 0x09, 0x63, 0x72, - 0x69, 0x75, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x12, 0x22, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x72, 0x65, 0x71, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x23, 0x0a, 0x04, 0x64, 0x75, 0x6d, 0x70, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x64, 0x75, 0x6d, 0x70, 0x5f, - 0x72, 0x65, 0x73, 0x70, 0x52, 0x04, 0x64, 0x75, 0x6d, 0x70, 0x12, 0x2c, 0x0a, 0x07, 0x72, 0x65, - 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x72, - 0x69, 0x75, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x52, - 0x07, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x24, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x69, - 0x66, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x63, 0x72, 0x69, 0x75, 0x5f, - 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x52, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x12, 0x26, - 0x0a, 0x02, 0x70, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x72, 0x69, - 0x75, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x6e, - 0x66, 0x6f, 0x52, 0x02, 0x70, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x72, 0x5f, 0x65, 0x72, 0x72, - 0x6e, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x72, 0x45, 0x72, 0x72, 0x6e, - 0x6f, 0x12, 0x2a, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x1b, 0x0a, - 0x09, 0x63, 0x72, 0x5f, 0x65, 0x72, 0x72, 0x6d, 0x73, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x63, 0x72, 0x45, 0x72, 0x72, 0x6d, 0x73, 0x67, 0x12, 0x27, 0x0a, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x63, 0x72, - 0x69, 0x75, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xb0, 0x01, 0x0a, 0x0c, - 0x63, 0x72, 0x69, 0x75, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, - 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x02, - 0x28, 0x05, 0x52, 0x0b, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, - 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x02, 0x28, 0x05, 0x52, 0x0b, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x69, 0x74, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x67, 0x69, 0x74, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x75, 0x62, 0x6c, - 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x73, 0x75, 0x62, 0x6c, - 0x65, 0x76, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x2a, 0x5f, - 0x0a, 0x0c, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x63, 0x67, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x0a, - 0x0a, 0x06, 0x49, 0x47, 0x4e, 0x4f, 0x52, 0x45, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x47, - 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x52, 0x4f, 0x50, 0x53, - 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x4f, 0x46, 0x54, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, - 0x46, 0x55, 0x4c, 0x4c, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x43, 0x54, - 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x06, 0x2a, - 0x2d, 0x0a, 0x12, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x70, 0x72, 0x65, 0x5f, 0x64, 0x75, 0x6d, 0x70, - 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x50, 0x4c, 0x49, 0x43, 0x45, 0x10, - 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x56, 0x4d, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x10, 0x02, 0x2a, 0xd0, - 0x01, 0x0a, 0x0d, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x72, 0x65, 0x71, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x12, 0x09, 0x0a, 0x05, 0x45, 0x4d, 0x50, 0x54, 0x59, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x44, - 0x55, 0x4d, 0x50, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x53, 0x54, 0x4f, 0x52, 0x45, - 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x10, 0x03, 0x12, 0x0c, 0x0a, - 0x08, 0x50, 0x52, 0x45, 0x5f, 0x44, 0x55, 0x4d, 0x50, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x50, - 0x41, 0x47, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, - 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x59, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x43, 0x50, 0x55, 0x49, - 0x4e, 0x46, 0x4f, 0x5f, 0x44, 0x55, 0x4d, 0x50, 0x10, 0x07, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x50, - 0x55, 0x49, 0x4e, 0x46, 0x4f, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x10, 0x08, 0x12, 0x11, 0x0a, - 0x0d, 0x46, 0x45, 0x41, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x10, 0x09, - 0x12, 0x0b, 0x0a, 0x07, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x0a, 0x12, 0x0c, 0x0a, - 0x08, 0x57, 0x41, 0x49, 0x54, 0x5f, 0x50, 0x49, 0x44, 0x10, 0x0b, 0x12, 0x14, 0x0a, 0x10, 0x50, - 0x41, 0x47, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x43, 0x48, 0x4c, 0x44, 0x10, - 0x0c, + 0x44, 0x75, 0x6d, 0x70, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x2c, 0x0a, 0x0e, 0x63, 0x72, 0x69, 0x75, + 0x5f, 0x64, 0x75, 0x6d, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x22, 0x25, 0x0a, 0x11, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x72, + 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x70, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x02, 0x28, 0x05, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x37, 0x0a, + 0x0b, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x4b, 0x0a, 0x0d, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x66, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x65, 0x6d, 0x5f, 0x74, + 0x72, 0x61, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x65, 0x6d, 0x54, + 0x72, 0x61, 0x63, 0x6b, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x61, 0x7a, 0x79, 0x5f, 0x70, 0x61, 0x67, + 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6c, 0x61, 0x7a, 0x79, 0x50, 0x61, + 0x67, 0x65, 0x73, 0x22, 0xd0, 0x01, 0x0a, 0x08, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x72, 0x65, 0x71, + 0x12, 0x22, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0e, 0x32, 0x0e, + 0x2e, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x72, 0x65, 0x71, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x6f, 0x70, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x6f, 0x70, 0x74, 0x73, 0x52, 0x04, + 0x6f, 0x70, 0x74, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x5f, 0x73, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x6e, 0x6f, + 0x74, 0x69, 0x66, 0x79, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6b, + 0x65, 0x65, 0x70, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, + 0x6b, 0x65, 0x65, 0x70, 0x4f, 0x70, 0x65, 0x6e, 0x12, 0x2a, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x72, 0x69, + 0x75, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x8f, 0x03, 0x0a, 0x09, 0x63, 0x72, 0x69, 0x75, 0x5f, + 0x72, 0x65, 0x73, 0x70, 0x12, 0x22, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x02, + 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x72, 0x65, 0x71, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x12, 0x23, 0x0a, 0x04, 0x64, 0x75, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0f, 0x2e, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x64, 0x75, 0x6d, 0x70, 0x5f, 0x72, 0x65, 0x73, + 0x70, 0x52, 0x04, 0x64, 0x75, 0x6d, 0x70, 0x12, 0x2c, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x72, 0x69, 0x75, 0x5f, + 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x52, 0x07, 0x72, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x24, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x6e, 0x6f, 0x74, + 0x69, 0x66, 0x79, 0x52, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x12, 0x26, 0x0a, 0x02, 0x70, + 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x52, + 0x02, 0x70, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x72, 0x5f, 0x65, 0x72, 0x72, 0x6e, 0x6f, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x72, 0x45, 0x72, 0x72, 0x6e, 0x6f, 0x12, 0x2a, + 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0e, 0x2e, 0x63, 0x72, 0x69, 0x75, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, + 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x72, + 0x5f, 0x65, 0x72, 0x72, 0x6d, 0x73, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, + 0x72, 0x45, 0x72, 0x72, 0x6d, 0x73, 0x67, 0x12, 0x27, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x63, 0x72, 0x69, 0x75, 0x5f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xb0, 0x01, 0x0a, 0x0c, 0x63, 0x72, 0x69, + 0x75, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x61, 0x6a, + 0x6f, 0x72, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x02, 0x28, 0x05, 0x52, + 0x0b, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, + 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x02, + 0x28, 0x05, 0x52, 0x0b, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, + 0x14, 0x0a, 0x05, 0x67, 0x69, 0x74, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x67, 0x69, 0x74, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x75, 0x62, 0x6c, 0x65, 0x76, 0x65, + 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x73, 0x75, 0x62, 0x6c, 0x65, 0x76, 0x65, + 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x2a, 0x5f, 0x0a, 0x0c, 0x63, + 0x72, 0x69, 0x75, 0x5f, 0x63, 0x67, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x49, + 0x47, 0x4e, 0x4f, 0x52, 0x45, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x47, 0x5f, 0x4e, 0x4f, + 0x4e, 0x45, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x52, 0x4f, 0x50, 0x53, 0x10, 0x02, 0x12, + 0x08, 0x0a, 0x04, 0x53, 0x4f, 0x46, 0x54, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x55, 0x4c, + 0x4c, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x43, 0x54, 0x10, 0x05, 0x12, + 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x06, 0x2a, 0x2d, 0x0a, 0x12, + 0x63, 0x72, 0x69, 0x75, 0x5f, 0x70, 0x72, 0x65, 0x5f, 0x64, 0x75, 0x6d, 0x70, 0x5f, 0x6d, 0x6f, + 0x64, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x50, 0x4c, 0x49, 0x43, 0x45, 0x10, 0x01, 0x12, 0x0b, + 0x0a, 0x07, 0x56, 0x4d, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x10, 0x02, 0x2a, 0xd0, 0x01, 0x0a, 0x0d, + 0x63, 0x72, 0x69, 0x75, 0x5f, 0x72, 0x65, 0x71, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, + 0x05, 0x45, 0x4d, 0x50, 0x54, 0x59, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x55, 0x4d, 0x50, + 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x53, 0x54, 0x4f, 0x52, 0x45, 0x10, 0x02, 0x12, + 0x09, 0x0a, 0x05, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x52, + 0x45, 0x5f, 0x44, 0x55, 0x4d, 0x50, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x41, 0x47, 0x45, + 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x54, + 0x49, 0x46, 0x59, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x43, 0x50, 0x55, 0x49, 0x4e, 0x46, 0x4f, + 0x5f, 0x44, 0x55, 0x4d, 0x50, 0x10, 0x07, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x50, 0x55, 0x49, 0x4e, + 0x46, 0x4f, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x10, 0x08, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x45, + 0x41, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x10, 0x09, 0x12, 0x0b, 0x0a, + 0x07, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x0a, 0x12, 0x0c, 0x0a, 0x08, 0x57, 0x41, + 0x49, 0x54, 0x5f, 0x50, 0x49, 0x44, 0x10, 0x0b, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x41, 0x47, 0x45, + 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x43, 0x48, 0x4c, 0x44, 0x10, 0x0c, } var ( diff --git a/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/rpc/rpc.proto b/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/rpc/rpc.proto deleted file mode 100644 index 61e1b24f4a47..000000000000 --- a/cluster-autoscaler/vendor/github.com/checkpoint-restore/go-criu/v5/rpc/rpc.proto +++ /dev/null @@ -1,239 +0,0 @@ -// SPDX-License-Identifier: MIT - -syntax = "proto2"; - -message criu_page_server_info { - optional string address = 1; - optional int32 port = 2; - optional int32 pid = 3; - optional int32 fd = 4; -} - -message criu_veth_pair { - required string if_in = 1; - required string if_out = 2; -}; - -message ext_mount_map { - required string key = 1; - required string val = 2; -}; - -message join_namespace { - required string ns = 1; - required string ns_file = 2; - optional string extra_opt = 3; -} - -message inherit_fd { - required string key = 1; - required int32 fd = 2; -}; - -message cgroup_root { - optional string ctrl = 1; - required string path = 2; -}; - -message unix_sk { - required uint32 inode = 1; -}; - -enum criu_cg_mode { - IGNORE = 0; - CG_NONE = 1; - PROPS = 2; - SOFT = 3; - FULL = 4; - STRICT = 5; - DEFAULT = 6; -}; - -enum criu_pre_dump_mode { - SPLICE = 1; - VM_READ = 2; -}; - -message criu_opts { - required int32 images_dir_fd = 1; - optional int32 pid = 2; /* if not set on dump, will dump requesting process */ - - optional bool leave_running = 3; - optional bool ext_unix_sk = 4; - optional bool tcp_established = 5; - optional bool evasive_devices = 6; - optional bool shell_job = 7; - optional bool file_locks = 8; - optional int32 log_level = 9 [default = 2]; - optional string log_file = 10; /* No subdirs are allowed. Consider using work-dir */ - - optional criu_page_server_info ps = 11; - - optional bool notify_scripts = 12; - - optional string root = 13; - optional string parent_img = 14; - optional bool track_mem = 15; - optional bool auto_dedup = 16; - - optional int32 work_dir_fd = 17; - optional bool link_remap = 18; - repeated criu_veth_pair veths = 19; /* DEPRECATED, use external instead */ - - optional uint32 cpu_cap = 20 [default = 0xffffffff]; - optional bool force_irmap = 21; - repeated string exec_cmd = 22; - - repeated ext_mount_map ext_mnt = 23; /* DEPRECATED, use external instead */ - optional bool manage_cgroups = 24; /* backward compatibility */ - repeated cgroup_root cg_root = 25; - - optional bool rst_sibling = 26; /* swrk only */ - repeated inherit_fd inherit_fd = 27; /* swrk only */ - - optional bool auto_ext_mnt = 28; - optional bool ext_sharing = 29; - optional bool ext_masters = 30; - - repeated string skip_mnt = 31; - repeated string enable_fs = 32; - - repeated unix_sk unix_sk_ino = 33; /* DEPRECATED, use external instead */ - - optional criu_cg_mode manage_cgroups_mode = 34; - optional uint32 ghost_limit = 35 [default = 0x100000]; - repeated string irmap_scan_paths = 36; - repeated string external = 37; - optional uint32 empty_ns = 38; - repeated join_namespace join_ns = 39; - - optional string cgroup_props = 41; - optional string cgroup_props_file = 42; - repeated string cgroup_dump_controller = 43; - - optional string freeze_cgroup = 44; - optional uint32 timeout = 45; - optional bool tcp_skip_in_flight = 46; - optional bool weak_sysctls = 47; - optional bool lazy_pages = 48; - optional int32 status_fd = 49; - optional bool orphan_pts_master = 50; - optional string config_file = 51; - optional bool tcp_close = 52; - optional string lsm_profile = 53; - optional string tls_cacert = 54; - optional string tls_cacrl = 55; - optional string tls_cert = 56; - optional string tls_key = 57; - optional bool tls = 58; - optional bool tls_no_cn_verify = 59; - optional string cgroup_yard = 60; - optional criu_pre_dump_mode pre_dump_mode = 61 [default = SPLICE]; - optional int32 pidfd_store_sk = 62; - optional string lsm_mount_context = 63; -/* optional bool check_mounts = 128; */ -} - -message criu_dump_resp { - optional bool restored = 1; -} - -message criu_restore_resp { - required int32 pid = 1; -} - -message criu_notify { - optional string script = 1; - optional int32 pid = 2; -} - -enum criu_req_type { - EMPTY = 0; - DUMP = 1; - RESTORE = 2; - CHECK = 3; - PRE_DUMP = 4; - PAGE_SERVER = 5; - - NOTIFY = 6; - - CPUINFO_DUMP = 7; - CPUINFO_CHECK = 8; - - FEATURE_CHECK = 9; - - VERSION = 10; - - WAIT_PID = 11; - PAGE_SERVER_CHLD = 12; -} - -/* - * List of features which can queried via - * CRIU_REQ_TYPE__FEATURE_CHECK - */ -message criu_features { - optional bool mem_track = 1; - optional bool lazy_pages = 2; - optional bool pidfd_store = 3; -} - -/* - * Request -- each type corresponds to must-be-there - * request arguments of respective type - */ - -message criu_req { - required criu_req_type type = 1; - - optional criu_opts opts = 2; - optional bool notify_success = 3; - - /* - * When set service won't close the connection but - * will wait for more req-s to appear. Works not - * for all request types. - */ - optional bool keep_open = 4; - /* - * 'features' can be used to query which features - * are supported by the installed criu/kernel - * via RPC. - */ - optional criu_features features = 5; - - /* 'pid' is used for WAIT_PID */ - optional uint32 pid = 6; -} - -/* - * Response -- it states whether the request was served - * and additional request-specific information - */ - -message criu_resp { - required criu_req_type type = 1; - required bool success = 2; - - optional criu_dump_resp dump = 3; - optional criu_restore_resp restore = 4; - optional criu_notify notify = 5; - optional criu_page_server_info ps = 6; - - optional int32 cr_errno = 7; - optional criu_features features = 8; - optional string cr_errmsg = 9; - optional criu_version version = 10; - - optional int32 status = 11; -} - -/* Answer for criu_req_type.VERSION requests */ -message criu_version { - required int32 major_number = 1; - required int32 minor_number = 2; - optional string gitid = 3; - optional int32 sublevel = 4; - optional int32 extra = 5; - optional string name = 6; -} diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/.gitignore b/cluster-autoscaler/vendor/github.com/cilium/ebpf/.gitignore index b46162b8ec33..38b15653c0f9 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/.gitignore +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/.gitignore @@ -5,7 +5,6 @@ *.so *.dylib *.o -!*_bpf*.o # Test binary, build with `go test -c` *.test diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/.golangci.yaml b/cluster-autoscaler/vendor/github.com/cilium/ebpf/.golangci.yaml index dc62dd6d0fc7..a88374197ecb 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/.golangci.yaml +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/.golangci.yaml @@ -24,5 +24,6 @@ linters: # Could be enabled later: # - gocyclo + # - prealloc # - maligned # - gosec diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/ARCHITECTURE.md b/cluster-autoscaler/vendor/github.com/cilium/ebpf/ARCHITECTURE.md index 6cbb31b6481e..aee9c0a0d4d5 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/ARCHITECTURE.md +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/ARCHITECTURE.md @@ -57,7 +57,7 @@ Objects loading a spec will fail because the kernel is too old, or a feature is not enabled. There are multiple ways the library deals with that: -* Fallback: older kernels don't allow naming programs and maps. The library +* Fallback: older kernels don't allowing naming programs and maps. The library automatically detects support for names, and omits them during load if necessary. This works since name is primarily a debug aid. @@ -68,7 +68,7 @@ enabled. There are multiple ways the library deals with that: Once program and map objects are loaded they expose the kernel's low-level API, e.g. `NextKey`. Often this API is awkward to use in Go, so there are safer wrappers on top of the low-level API, like `MapIterator`. The low-level API is -useful when our higher-level API doesn't support a particular use case. +useful as an out when our higher-level API doesn't support a particular use case. Links --- diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/CONTRIBUTING.md b/cluster-autoscaler/vendor/github.com/cilium/ebpf/CONTRIBUTING.md index 0d29eae81e3e..72ceb4378297 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/CONTRIBUTING.md +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/CONTRIBUTING.md @@ -6,8 +6,8 @@ are welcome. Please take a look at [the architecture](ARCHITECTURE.md) to get a better understanding for the high-level goals. New features must be accompanied by tests. Before starting work on any large -feature, please [join](https://ebpf.io/slack) the -[#ebpf-go](https://cilium.slack.com/messages/ebpf-go) channel on Slack to +feature, please [join](https://cilium.herokuapp.com/) the +[#libbpf-go](https://cilium.slack.com/messages/libbpf-go) channel on Slack to discuss the design first. When submitting pull requests, consider writing details about what problem you diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/Makefile b/cluster-autoscaler/vendor/github.com/cilium/ebpf/Makefile index 0bc15c0810cb..5dd342c5b287 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/Makefile +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/Makefile @@ -18,14 +18,11 @@ TARGETS := \ testdata/loader-clang-7 \ testdata/loader-clang-9 \ testdata/loader-$(CLANG) \ - testdata/btf_map_init \ testdata/invalid_map \ testdata/raw_tracepoint \ testdata/invalid_map_static \ - testdata/invalid_btf_map_init \ + testdata/initialized_btf_map \ testdata/strings \ - testdata/freplace \ - testdata/iproute2_map_compat \ internal/btf/testdata/relocs .PHONY: all clean docker-all docker-shell diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/README.md b/cluster-autoscaler/vendor/github.com/cilium/ebpf/README.md index 01e2fff92bbc..76c3c303bb1b 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/README.md +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/README.md @@ -2,16 +2,28 @@ [![PkgGoDev](https://pkg.go.dev/badge/github.com/cilium/ebpf)](https://pkg.go.dev/github.com/cilium/ebpf) -![HoneyGopher](.github/images/cilium-ebpf.png) - eBPF is a pure Go library that provides utilities for loading, compiling, and debugging eBPF programs. It has minimal external dependencies and is intended to be used in long running processes. +* [asm](https://pkg.go.dev/github.com/cilium/ebpf/asm) contains a basic + assembler +* [link](https://pkg.go.dev/github.com/cilium/ebpf/link) allows attaching eBPF + to various hooks +* [perf](https://pkg.go.dev/github.com/cilium/ebpf/perf) allows reading from a + `PERF_EVENT_ARRAY` +* [cmd/bpf2go](https://pkg.go.dev/github.com/cilium/ebpf/cmd/bpf2go) allows + compiling and embedding eBPF programs in Go code + The library is maintained by [Cloudflare](https://www.cloudflare.com) and -[Cilium](https://www.cilium.io). +[Cilium](https://www.cilium.io). Feel free to +[join](https://cilium.herokuapp.com/) the +[#libbpf-go](https://cilium.slack.com/messages/libbpf-go) channel on Slack. + +## Current status -See [ebpf.io](https://ebpf.io) for other projects from the eBPF ecosystem. +The package is production ready, but **the API is explicitly unstable right +now**. Expect to update your code if you want to follow along. ## Getting Started @@ -21,37 +33,21 @@ your own tools can be found under [examples/](examples/). Contributions are highly encouraged, as they highlight certain use cases of eBPF and the library, and help shape the future of the project. -## Getting Help - -Please -[join](https://ebpf.io/slack) the -[#ebpf-go](https://cilium.slack.com/messages/ebpf-go) channel on Slack if you -have questions regarding the library. - -## Packages - -This library includes the following packages: - -* [asm](https://pkg.go.dev/github.com/cilium/ebpf/asm) contains a basic - assembler, allowing you to write eBPF assembly instructions directly - within your Go code. (You don't need to use this if you prefer to write your eBPF program in C.) -* [cmd/bpf2go](https://pkg.go.dev/github.com/cilium/ebpf/cmd/bpf2go) allows - compiling and embedding eBPF programs written in C within Go code. As well as - compiling the C code, it auto-generates Go code for loading and manipulating - the eBPF program and map objects. -* [link](https://pkg.go.dev/github.com/cilium/ebpf/link) allows attaching eBPF - to various hooks -* [perf](https://pkg.go.dev/github.com/cilium/ebpf/perf) allows reading from a - `PERF_EVENT_ARRAY` -* [ringbuf](https://pkg.go.dev/github.com/cilium/ebpf/ringbuf) allows reading from a - `BPF_MAP_TYPE_RINGBUF` map - - ## Requirements * A version of Go that is [supported by upstream](https://golang.org/doc/devel/release.html#policy) -* Linux >= 4.9. CI is run against LTS releases. +* Linux 4.9, 4.19 or 5.4 (versions in-between should work, but are not tested) + +## Useful resources + +* [eBPF.io](https://ebpf.io) (recommended) +* [Cilium eBPF documentation](https://docs.cilium.io/en/latest/bpf/#bpf-guide) + (recommended) +* [Linux documentation on + BPF](https://www.kernel.org/doc/html/latest/networking/filter.html) +* [eBPF features by Linux + version](https://github.com/iovisor/bcc/blob/master/docs/kernel-versions.md) ## Regenerating Testdata @@ -64,7 +60,3 @@ The toolchain image build files are kept in [testdata/docker/](testdata/docker/) ## License MIT - -### eBPF Gopher - -The eBPF honeygopher is based on the Go gopher designed by Renee French. diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/asm/func.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/asm/func.go index bfa5d59c976e..aee2c7ac8106 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/asm/func.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/asm/func.go @@ -184,12 +184,6 @@ const ( FnKtimeGetCoarseNs FnImaInodeHash FnSockFromFile - FnCheckMtu - FnForEachMapElem - FnSnprintf - FnSysBpf - FnBtfFindByNameKind - FnSysClose ) // Call emits a function call. diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/asm/func_string.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/asm/func_string.go index 5a0e333639a3..a712c5da8af9 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/asm/func_string.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/asm/func_string.go @@ -171,17 +171,11 @@ func _() { _ = x[FnKtimeGetCoarseNs-160] _ = x[FnImaInodeHash-161] _ = x[FnSockFromFile-162] - _ = x[FnCheckMtu-163] - _ = x[FnForEachMapElem-164] - _ = x[FnSnprintf-165] - _ = x[FnSysBpf-166] - _ = x[FnBtfFindByNameKind-167] - _ = x[FnSysClose-168] } -const _BuiltinFunc_name = "FnUnspecFnMapLookupElemFnMapUpdateElemFnMapDeleteElemFnProbeReadFnKtimeGetNsFnTracePrintkFnGetPrandomU32FnGetSmpProcessorIdFnSkbStoreBytesFnL3CsumReplaceFnL4CsumReplaceFnTailCallFnCloneRedirectFnGetCurrentPidTgidFnGetCurrentUidGidFnGetCurrentCommFnGetCgroupClassidFnSkbVlanPushFnSkbVlanPopFnSkbGetTunnelKeyFnSkbSetTunnelKeyFnPerfEventReadFnRedirectFnGetRouteRealmFnPerfEventOutputFnSkbLoadBytesFnGetStackidFnCsumDiffFnSkbGetTunnelOptFnSkbSetTunnelOptFnSkbChangeProtoFnSkbChangeTypeFnSkbUnderCgroupFnGetHashRecalcFnGetCurrentTaskFnProbeWriteUserFnCurrentTaskUnderCgroupFnSkbChangeTailFnSkbPullDataFnCsumUpdateFnSetHashInvalidFnGetNumaNodeIdFnSkbChangeHeadFnXdpAdjustHeadFnProbeReadStrFnGetSocketCookieFnGetSocketUidFnSetHashFnSetsockoptFnSkbAdjustRoomFnRedirectMapFnSkRedirectMapFnSockMapUpdateFnXdpAdjustMetaFnPerfEventReadValueFnPerfProgReadValueFnGetsockoptFnOverrideReturnFnSockOpsCbFlagsSetFnMsgRedirectMapFnMsgApplyBytesFnMsgCorkBytesFnMsgPullDataFnBindFnXdpAdjustTailFnSkbGetXfrmStateFnGetStackFnSkbLoadBytesRelativeFnFibLookupFnSockHashUpdateFnMsgRedirectHashFnSkRedirectHashFnLwtPushEncapFnLwtSeg6StoreBytesFnLwtSeg6AdjustSrhFnLwtSeg6ActionFnRcRepeatFnRcKeydownFnSkbCgroupIdFnGetCurrentCgroupIdFnGetLocalStorageFnSkSelectReuseportFnSkbAncestorCgroupIdFnSkLookupTcpFnSkLookupUdpFnSkReleaseFnMapPushElemFnMapPopElemFnMapPeekElemFnMsgPushDataFnMsgPopDataFnRcPointerRelFnSpinLockFnSpinUnlockFnSkFullsockFnTcpSockFnSkbEcnSetCeFnGetListenerSockFnSkcLookupTcpFnTcpCheckSyncookieFnSysctlGetNameFnSysctlGetCurrentValueFnSysctlGetNewValueFnSysctlSetNewValueFnStrtolFnStrtoulFnSkStorageGetFnSkStorageDeleteFnSendSignalFnTcpGenSyncookieFnSkbOutputFnProbeReadUserFnProbeReadKernelFnProbeReadUserStrFnProbeReadKernelStrFnTcpSendAckFnSendSignalThreadFnJiffies64FnReadBranchRecordsFnGetNsCurrentPidTgidFnXdpOutputFnGetNetnsCookieFnGetCurrentAncestorCgroupIdFnSkAssignFnKtimeGetBootNsFnSeqPrintfFnSeqWriteFnSkCgroupIdFnSkAncestorCgroupIdFnRingbufOutputFnRingbufReserveFnRingbufSubmitFnRingbufDiscardFnRingbufQueryFnCsumLevelFnSkcToTcp6SockFnSkcToTcpSockFnSkcToTcpTimewaitSockFnSkcToTcpRequestSockFnSkcToUdp6SockFnGetTaskStackFnLoadHdrOptFnStoreHdrOptFnReserveHdrOptFnInodeStorageGetFnInodeStorageDeleteFnDPathFnCopyFromUserFnSnprintfBtfFnSeqPrintfBtfFnSkbCgroupClassidFnRedirectNeighFnPerCpuPtrFnThisCpuPtrFnRedirectPeerFnTaskStorageGetFnTaskStorageDeleteFnGetCurrentTaskBtfFnBprmOptsSetFnKtimeGetCoarseNsFnImaInodeHashFnSockFromFileFnCheckMtuFnForEachMapElemFnSnprintfFnSysBpfFnBtfFindByNameKindFnSysClose" +const _BuiltinFunc_name = "FnUnspecFnMapLookupElemFnMapUpdateElemFnMapDeleteElemFnProbeReadFnKtimeGetNsFnTracePrintkFnGetPrandomU32FnGetSmpProcessorIdFnSkbStoreBytesFnL3CsumReplaceFnL4CsumReplaceFnTailCallFnCloneRedirectFnGetCurrentPidTgidFnGetCurrentUidGidFnGetCurrentCommFnGetCgroupClassidFnSkbVlanPushFnSkbVlanPopFnSkbGetTunnelKeyFnSkbSetTunnelKeyFnPerfEventReadFnRedirectFnGetRouteRealmFnPerfEventOutputFnSkbLoadBytesFnGetStackidFnCsumDiffFnSkbGetTunnelOptFnSkbSetTunnelOptFnSkbChangeProtoFnSkbChangeTypeFnSkbUnderCgroupFnGetHashRecalcFnGetCurrentTaskFnProbeWriteUserFnCurrentTaskUnderCgroupFnSkbChangeTailFnSkbPullDataFnCsumUpdateFnSetHashInvalidFnGetNumaNodeIdFnSkbChangeHeadFnXdpAdjustHeadFnProbeReadStrFnGetSocketCookieFnGetSocketUidFnSetHashFnSetsockoptFnSkbAdjustRoomFnRedirectMapFnSkRedirectMapFnSockMapUpdateFnXdpAdjustMetaFnPerfEventReadValueFnPerfProgReadValueFnGetsockoptFnOverrideReturnFnSockOpsCbFlagsSetFnMsgRedirectMapFnMsgApplyBytesFnMsgCorkBytesFnMsgPullDataFnBindFnXdpAdjustTailFnSkbGetXfrmStateFnGetStackFnSkbLoadBytesRelativeFnFibLookupFnSockHashUpdateFnMsgRedirectHashFnSkRedirectHashFnLwtPushEncapFnLwtSeg6StoreBytesFnLwtSeg6AdjustSrhFnLwtSeg6ActionFnRcRepeatFnRcKeydownFnSkbCgroupIdFnGetCurrentCgroupIdFnGetLocalStorageFnSkSelectReuseportFnSkbAncestorCgroupIdFnSkLookupTcpFnSkLookupUdpFnSkReleaseFnMapPushElemFnMapPopElemFnMapPeekElemFnMsgPushDataFnMsgPopDataFnRcPointerRelFnSpinLockFnSpinUnlockFnSkFullsockFnTcpSockFnSkbEcnSetCeFnGetListenerSockFnSkcLookupTcpFnTcpCheckSyncookieFnSysctlGetNameFnSysctlGetCurrentValueFnSysctlGetNewValueFnSysctlSetNewValueFnStrtolFnStrtoulFnSkStorageGetFnSkStorageDeleteFnSendSignalFnTcpGenSyncookieFnSkbOutputFnProbeReadUserFnProbeReadKernelFnProbeReadUserStrFnProbeReadKernelStrFnTcpSendAckFnSendSignalThreadFnJiffies64FnReadBranchRecordsFnGetNsCurrentPidTgidFnXdpOutputFnGetNetnsCookieFnGetCurrentAncestorCgroupIdFnSkAssignFnKtimeGetBootNsFnSeqPrintfFnSeqWriteFnSkCgroupIdFnSkAncestorCgroupIdFnRingbufOutputFnRingbufReserveFnRingbufSubmitFnRingbufDiscardFnRingbufQueryFnCsumLevelFnSkcToTcp6SockFnSkcToTcpSockFnSkcToTcpTimewaitSockFnSkcToTcpRequestSockFnSkcToUdp6SockFnGetTaskStackFnLoadHdrOptFnStoreHdrOptFnReserveHdrOptFnInodeStorageGetFnInodeStorageDeleteFnDPathFnCopyFromUserFnSnprintfBtfFnSeqPrintfBtfFnSkbCgroupClassidFnRedirectNeighFnPerCpuPtrFnThisCpuPtrFnRedirectPeerFnTaskStorageGetFnTaskStorageDeleteFnGetCurrentTaskBtfFnBprmOptsSetFnKtimeGetCoarseNsFnImaInodeHashFnSockFromFile" -var _BuiltinFunc_index = [...]uint16{0, 8, 23, 38, 53, 64, 76, 89, 104, 123, 138, 153, 168, 178, 193, 212, 230, 246, 264, 277, 289, 306, 323, 338, 348, 363, 380, 394, 406, 416, 433, 450, 466, 481, 497, 512, 528, 544, 568, 583, 596, 608, 624, 639, 654, 669, 683, 700, 714, 723, 735, 750, 763, 778, 793, 808, 828, 847, 859, 875, 894, 910, 925, 939, 952, 958, 973, 990, 1000, 1022, 1033, 1049, 1066, 1082, 1096, 1115, 1133, 1148, 1158, 1169, 1182, 1202, 1219, 1238, 1259, 1272, 1285, 1296, 1309, 1321, 1334, 1347, 1359, 1373, 1383, 1395, 1407, 1416, 1429, 1446, 1460, 1479, 1494, 1517, 1536, 1555, 1563, 1572, 1586, 1603, 1615, 1632, 1643, 1658, 1675, 1693, 1713, 1725, 1743, 1754, 1773, 1794, 1805, 1821, 1849, 1859, 1875, 1886, 1896, 1908, 1928, 1943, 1959, 1974, 1990, 2004, 2015, 2030, 2044, 2066, 2087, 2102, 2116, 2128, 2141, 2156, 2173, 2193, 2200, 2214, 2227, 2241, 2259, 2274, 2285, 2297, 2311, 2327, 2346, 2365, 2378, 2396, 2410, 2424, 2434, 2450, 2460, 2468, 2487, 2497} +var _BuiltinFunc_index = [...]uint16{0, 8, 23, 38, 53, 64, 76, 89, 104, 123, 138, 153, 168, 178, 193, 212, 230, 246, 264, 277, 289, 306, 323, 338, 348, 363, 380, 394, 406, 416, 433, 450, 466, 481, 497, 512, 528, 544, 568, 583, 596, 608, 624, 639, 654, 669, 683, 700, 714, 723, 735, 750, 763, 778, 793, 808, 828, 847, 859, 875, 894, 910, 925, 939, 952, 958, 973, 990, 1000, 1022, 1033, 1049, 1066, 1082, 1096, 1115, 1133, 1148, 1158, 1169, 1182, 1202, 1219, 1238, 1259, 1272, 1285, 1296, 1309, 1321, 1334, 1347, 1359, 1373, 1383, 1395, 1407, 1416, 1429, 1446, 1460, 1479, 1494, 1517, 1536, 1555, 1563, 1572, 1586, 1603, 1615, 1632, 1643, 1658, 1675, 1693, 1713, 1725, 1743, 1754, 1773, 1794, 1805, 1821, 1849, 1859, 1875, 1886, 1896, 1908, 1928, 1943, 1959, 1974, 1990, 2004, 2015, 2030, 2044, 2066, 2087, 2102, 2116, 2128, 2141, 2156, 2173, 2193, 2200, 2214, 2227, 2241, 2259, 2274, 2285, 2297, 2311, 2327, 2346, 2365, 2378, 2396, 2410, 2424} func (i BuiltinFunc) String() string { if i < 0 || i >= BuiltinFunc(len(_BuiltinFunc_index)-1) { diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/asm/instruction.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/asm/instruction.go index 64d717d156d5..e7ac0109e2dc 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/asm/instruction.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/asm/instruction.go @@ -181,11 +181,6 @@ func (ins *Instruction) IsFunctionCall() bool { return ins.OpCode.JumpOp() == Call && ins.Src == PseudoCall } -// IsBuiltinCall returns true if the instruction is a built-in call, i.e. BPF helper call. -func (ins *Instruction) IsBuiltinCall() bool { - return ins.OpCode.JumpOp() == Call && ins.Src == R0 && ins.Dst == R0 -} - // IsConstantLoad returns true if the instruction loads a constant of the // given size. func (ins *Instruction) IsConstantLoad(size Size) bool { diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/attachtype_string.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/attachtype_string.go deleted file mode 100644 index de355ed90922..000000000000 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/attachtype_string.go +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by "stringer -type AttachType -trimprefix Attach"; DO NOT EDIT. - -package ebpf - -import "strconv" - -func _() { - // An "invalid array index" compiler error signifies that the constant values have changed. - // Re-run the stringer command to generate them again. - var x [1]struct{} - _ = x[AttachNone-0] - _ = x[AttachCGroupInetIngress-0] - _ = x[AttachCGroupInetEgress-1] - _ = x[AttachCGroupInetSockCreate-2] - _ = x[AttachCGroupSockOps-3] - _ = x[AttachSkSKBStreamParser-4] - _ = x[AttachSkSKBStreamVerdict-5] - _ = x[AttachCGroupDevice-6] - _ = x[AttachSkMsgVerdict-7] - _ = x[AttachCGroupInet4Bind-8] - _ = x[AttachCGroupInet6Bind-9] - _ = x[AttachCGroupInet4Connect-10] - _ = x[AttachCGroupInet6Connect-11] - _ = x[AttachCGroupInet4PostBind-12] - _ = x[AttachCGroupInet6PostBind-13] - _ = x[AttachCGroupUDP4Sendmsg-14] - _ = x[AttachCGroupUDP6Sendmsg-15] - _ = x[AttachLircMode2-16] - _ = x[AttachFlowDissector-17] - _ = x[AttachCGroupSysctl-18] - _ = x[AttachCGroupUDP4Recvmsg-19] - _ = x[AttachCGroupUDP6Recvmsg-20] - _ = x[AttachCGroupGetsockopt-21] - _ = x[AttachCGroupSetsockopt-22] - _ = x[AttachTraceRawTp-23] - _ = x[AttachTraceFEntry-24] - _ = x[AttachTraceFExit-25] - _ = x[AttachModifyReturn-26] - _ = x[AttachLSMMac-27] - _ = x[AttachTraceIter-28] - _ = x[AttachCgroupInet4GetPeername-29] - _ = x[AttachCgroupInet6GetPeername-30] - _ = x[AttachCgroupInet4GetSockname-31] - _ = x[AttachCgroupInet6GetSockname-32] - _ = x[AttachXDPDevMap-33] - _ = x[AttachCgroupInetSockRelease-34] - _ = x[AttachXDPCPUMap-35] - _ = x[AttachSkLookup-36] - _ = x[AttachXDP-37] - _ = x[AttachSkSKBVerdict-38] - _ = x[AttachSkReuseportSelect-39] - _ = x[AttachSkReuseportSelectOrMigrate-40] - _ = x[AttachPerfEvent-41] -} - -const _AttachType_name = "NoneCGroupInetEgressCGroupInetSockCreateCGroupSockOpsSkSKBStreamParserSkSKBStreamVerdictCGroupDeviceSkMsgVerdictCGroupInet4BindCGroupInet6BindCGroupInet4ConnectCGroupInet6ConnectCGroupInet4PostBindCGroupInet6PostBindCGroupUDP4SendmsgCGroupUDP6SendmsgLircMode2FlowDissectorCGroupSysctlCGroupUDP4RecvmsgCGroupUDP6RecvmsgCGroupGetsockoptCGroupSetsockoptTraceRawTpTraceFEntryTraceFExitModifyReturnLSMMacTraceIterCgroupInet4GetPeernameCgroupInet6GetPeernameCgroupInet4GetSocknameCgroupInet6GetSocknameXDPDevMapCgroupInetSockReleaseXDPCPUMapSkLookupXDPSkSKBVerdictSkReuseportSelectSkReuseportSelectOrMigratePerfEvent" - -var _AttachType_index = [...]uint16{0, 4, 20, 40, 53, 70, 88, 100, 112, 127, 142, 160, 178, 197, 216, 233, 250, 259, 272, 284, 301, 318, 334, 350, 360, 371, 381, 393, 399, 408, 430, 452, 474, 496, 505, 526, 535, 543, 546, 558, 575, 601, 610} - -func (i AttachType) String() string { - if i >= AttachType(len(_AttachType_index)-1) { - return "AttachType(" + strconv.FormatInt(int64(i), 10) + ")" - } - return _AttachType_name[_AttachType_index[i]:_AttachType_index[i+1]] -} diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/collection.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/collection.go index 2ededc87a05c..17cc69492ea9 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/collection.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/collection.go @@ -1,7 +1,6 @@ package ebpf import ( - "encoding/binary" "errors" "fmt" "io" @@ -26,10 +25,6 @@ type CollectionOptions struct { type CollectionSpec struct { Maps map[string]*MapSpec Programs map[string]*ProgramSpec - - // ByteOrder specifies whether the ELF was compiled for - // big-endian or little-endian architectures. - ByteOrder binary.ByteOrder } // Copy returns a recursive copy of the spec. @@ -39,9 +34,8 @@ func (cs *CollectionSpec) Copy() *CollectionSpec { } cpy := CollectionSpec{ - Maps: make(map[string]*MapSpec, len(cs.Maps)), - Programs: make(map[string]*ProgramSpec, len(cs.Programs)), - ByteOrder: cs.ByteOrder, + Maps: make(map[string]*MapSpec, len(cs.Maps)), + Programs: make(map[string]*ProgramSpec, len(cs.Programs)), } for name, spec := range cs.Maps { @@ -129,7 +123,7 @@ func (cs *CollectionSpec) RewriteConstants(consts map[string]interface{}) error buf := make([]byte, len(value)) copy(buf, value) - err := patchValue(buf, rodata.BTF.Value, consts) + err := patchValue(buf, btf.MapValue(rodata.BTF), consts) if err != nil { return err } @@ -140,15 +134,15 @@ func (cs *CollectionSpec) RewriteConstants(consts map[string]interface{}) error // Assign the contents of a CollectionSpec to a struct. // -// This function is a shortcut to manually checking the presence -// of maps and programs in a CollectionSpec. Consider using bpf2go -// if this sounds useful. +// This function is a short-cut to manually checking the presence +// of maps and programs in a collection spec. Consider using bpf2go if this +// sounds useful. // -// 'to' must be a pointer to a struct. A field of the +// The argument to must be a pointer to a struct. A field of the // struct is updated with values from Programs or Maps if it // has an `ebpf` tag and its type is *ProgramSpec or *MapSpec. -// The tag's value specifies the name of the program or map as -// found in the CollectionSpec. +// The tag gives the name of the program or map as found in +// the CollectionSpec. // // struct { // Foo *ebpf.ProgramSpec `ebpf:"xdp_foo"` @@ -156,47 +150,42 @@ func (cs *CollectionSpec) RewriteConstants(consts map[string]interface{}) error // Ignored int // } // -// Returns an error if any of the eBPF objects can't be found, or -// if the same MapSpec or ProgramSpec is assigned multiple times. +// Returns an error if any of the fields can't be found, or +// if the same map or program is assigned multiple times. func (cs *CollectionSpec) Assign(to interface{}) error { - // Assign() only supports assigning ProgramSpecs and MapSpecs, - // so doesn't load any resources into the kernel. - getValue := func(typ reflect.Type, name string) (interface{}, error) { + valueOf := func(typ reflect.Type, name string) (reflect.Value, error) { switch typ { - case reflect.TypeOf((*ProgramSpec)(nil)): - if p := cs.Programs[name]; p != nil { - return p, nil + p := cs.Programs[name] + if p == nil { + return reflect.Value{}, fmt.Errorf("missing program %q", name) } - return nil, fmt.Errorf("missing program %q", name) - + return reflect.ValueOf(p), nil case reflect.TypeOf((*MapSpec)(nil)): - if m := cs.Maps[name]; m != nil { - return m, nil + m := cs.Maps[name] + if m == nil { + return reflect.Value{}, fmt.Errorf("missing map %q", name) } - return nil, fmt.Errorf("missing map %q", name) - + return reflect.ValueOf(m), nil default: - return nil, fmt.Errorf("unsupported type %s", typ) + return reflect.Value{}, fmt.Errorf("unsupported type %s", typ) } } - return assignValues(to, getValue) + return assignValues(to, valueOf) } -// LoadAndAssign loads Maps and Programs into the kernel and assigns them -// to a struct. +// LoadAndAssign maps and programs into the kernel and assign them to a struct. // -// This function is a shortcut to manually checking the presence -// of maps and programs in a CollectionSpec. Consider using bpf2go -// if this sounds useful. +// This function is a short-cut to manually checking the presence +// of maps and programs in a collection spec. Consider using bpf2go if this +// sounds useful. // -// 'to' must be a pointer to a struct. A field of the struct is updated with -// a Program or Map if it has an `ebpf` tag and its type is *Program or *Map. -// The tag's value specifies the name of the program or map as found in the -// CollectionSpec. Before updating the struct, the requested objects and their -// dependent resources are loaded into the kernel and populated with values if -// specified. +// The argument to must be a pointer to a struct. A field of the +// struct is updated with values from Programs or Maps if it +// has an `ebpf` tag and its type is *Program or *Map. +// The tag gives the name of the program or map as found in +// the CollectionSpec. // // struct { // Foo *ebpf.Program `ebpf:"xdp_foo"` @@ -207,53 +196,39 @@ func (cs *CollectionSpec) Assign(to interface{}) error { // opts may be nil. // // Returns an error if any of the fields can't be found, or -// if the same Map or Program is assigned multiple times. +// if the same map or program is assigned multiple times. func (cs *CollectionSpec) LoadAndAssign(to interface{}, opts *CollectionOptions) error { - loader := newCollectionLoader(cs, opts) - defer loader.cleanup() + if opts == nil { + opts = &CollectionOptions{} + } - // Support assigning Programs and Maps, lazy-loading the required objects. - assignedMaps := make(map[string]bool) - getValue := func(typ reflect.Type, name string) (interface{}, error) { - switch typ { + loadMap, loadProgram, done, cleanup := lazyLoadCollection(cs, opts) + defer cleanup() + valueOf := func(typ reflect.Type, name string) (reflect.Value, error) { + switch typ { case reflect.TypeOf((*Program)(nil)): - return loader.loadProgram(name) - + p, err := loadProgram(name) + if err != nil { + return reflect.Value{}, err + } + return reflect.ValueOf(p), nil case reflect.TypeOf((*Map)(nil)): - assignedMaps[name] = true - return loader.loadMap(name) - + m, err := loadMap(name) + if err != nil { + return reflect.Value{}, err + } + return reflect.ValueOf(m), nil default: - return nil, fmt.Errorf("unsupported type %s", typ) + return reflect.Value{}, fmt.Errorf("unsupported type %s", typ) } } - // Load the Maps and Programs requested by the annotated struct. - if err := assignValues(to, getValue); err != nil { + if err := assignValues(to, valueOf); err != nil { return err } - // Populate the requested maps. Has a chance of lazy-loading other dependent maps. - if err := loader.populateMaps(); err != nil { - return err - } - - // Evaluate the loader's objects after all (lazy)loading has taken place. - for n, m := range loader.maps { - switch m.typ { - case ProgramArray: - // Require all lazy-loaded ProgramArrays to be assigned to the given object. - // Without any references, they will be closed on the first GC and all tail - // calls into them will miss. - if !assignedMaps[n] { - return fmt.Errorf("ProgramArray %s must be assigned to prevent missed tail calls", n) - } - } - } - - loader.finalize() - + done() return nil } @@ -271,32 +246,24 @@ func NewCollection(spec *CollectionSpec) (*Collection, error) { // NewCollectionWithOptions creates a Collection from a specification. func NewCollectionWithOptions(spec *CollectionSpec, opts CollectionOptions) (*Collection, error) { - loader := newCollectionLoader(spec, &opts) - defer loader.cleanup() + loadMap, loadProgram, done, cleanup := lazyLoadCollection(spec, &opts) + defer cleanup() - // Create maps first, as their fds need to be linked into programs. for mapName := range spec.Maps { - if _, err := loader.loadMap(mapName); err != nil { + _, err := loadMap(mapName) + if err != nil { return nil, err } } for progName := range spec.Programs { - if _, err := loader.loadProgram(progName); err != nil { + _, err := loadProgram(progName) + if err != nil { return nil, err } } - // Maps can contain Program and Map stubs, so populate them after - // all Maps and Programs have been successfully loaded. - if err := loader.populateMaps(); err != nil { - return nil, err - } - - maps, progs := loader.maps, loader.programs - - loader.finalize() - + maps, progs := done() return &Collection{ progs, maps, @@ -347,154 +314,113 @@ func (hc handleCache) close() { for _, handle := range hc.btfHandles { handle.Close() } + hc.btfHandles = nil + hc.btfSpecs = nil } -type collectionLoader struct { - coll *CollectionSpec - opts *CollectionOptions - maps map[string]*Map - programs map[string]*Program - handles *handleCache -} - -func newCollectionLoader(coll *CollectionSpec, opts *CollectionOptions) *collectionLoader { - if opts == nil { - opts = &CollectionOptions{} - } - - return &collectionLoader{ - coll, - opts, - make(map[string]*Map), - make(map[string]*Program), - newHandleCache(), - } -} - -// finalize should be called when all the collectionLoader's resources -// have been successfully loaded into the kernel and populated with values. -func (cl *collectionLoader) finalize() { - cl.maps, cl.programs = nil, nil -} - -// cleanup cleans up all resources left over in the collectionLoader. -// Call finalize() when Map and Program creation/population is successful -// to prevent them from getting closed. -func (cl *collectionLoader) cleanup() { - cl.handles.close() - for _, m := range cl.maps { - m.Close() - } - for _, p := range cl.programs { - p.Close() - } -} - -func (cl *collectionLoader) loadMap(mapName string) (*Map, error) { - if m := cl.maps[mapName]; m != nil { - return m, nil - } - - mapSpec := cl.coll.Maps[mapName] - if mapSpec == nil { - return nil, fmt.Errorf("missing map %s", mapName) - } - - m, err := newMapWithOptions(mapSpec, cl.opts.Maps, cl.handles) - if err != nil { - return nil, fmt.Errorf("map %s: %w", mapName, err) - } +func lazyLoadCollection(coll *CollectionSpec, opts *CollectionOptions) ( + loadMap func(string) (*Map, error), + loadProgram func(string) (*Program, error), + done func() (map[string]*Map, map[string]*Program), + cleanup func(), +) { + var ( + maps = make(map[string]*Map) + progs = make(map[string]*Program) + handles = newHandleCache() + skipMapsAndProgs = false + ) + + cleanup = func() { + handles.close() + + if skipMapsAndProgs { + return + } - cl.maps[mapName] = m - return m, nil -} + for _, m := range maps { + m.Close() + } -func (cl *collectionLoader) loadProgram(progName string) (*Program, error) { - if prog := cl.programs[progName]; prog != nil { - return prog, nil + for _, p := range progs { + p.Close() + } } - progSpec := cl.coll.Programs[progName] - if progSpec == nil { - return nil, fmt.Errorf("unknown program %s", progName) + done = func() (map[string]*Map, map[string]*Program) { + skipMapsAndProgs = true + return maps, progs } - progSpec = progSpec.Copy() - - // Rewrite any reference to a valid map. - for i := range progSpec.Instructions { - ins := &progSpec.Instructions[i] - - if !ins.IsLoadFromMap() || ins.Reference == "" { - continue + loadMap = func(mapName string) (*Map, error) { + if m := maps[mapName]; m != nil { + return m, nil } - if uint32(ins.Constant) != math.MaxUint32 { - // Don't overwrite maps already rewritten, users can - // rewrite programs in the spec themselves - continue + mapSpec := coll.Maps[mapName] + if mapSpec == nil { + return nil, fmt.Errorf("missing map %s", mapName) } - m, err := cl.loadMap(ins.Reference) + m, err := newMapWithOptions(mapSpec, opts.Maps, handles) if err != nil { - return nil, fmt.Errorf("program %s: %w", progName, err) + return nil, fmt.Errorf("map %s: %w", mapName, err) } - fd := m.FD() - if fd < 0 { - return nil, fmt.Errorf("map %s: %w", ins.Reference, internal.ErrClosedFd) + maps[mapName] = m + return m, nil + } + + loadProgram = func(progName string) (*Program, error) { + if prog := progs[progName]; prog != nil { + return prog, nil } - if err := ins.RewriteMapPtr(m.FD()); err != nil { - return nil, fmt.Errorf("program %s: map %s: %w", progName, ins.Reference, err) + + progSpec := coll.Programs[progName] + if progSpec == nil { + return nil, fmt.Errorf("unknown program %s", progName) } - } - prog, err := newProgramWithOptions(progSpec, cl.opts.Programs, cl.handles) - if err != nil { - return nil, fmt.Errorf("program %s: %w", progName, err) - } + progSpec = progSpec.Copy() - cl.programs[progName] = prog - return prog, nil -} + // Rewrite any reference to a valid map. + for i := range progSpec.Instructions { + ins := &progSpec.Instructions[i] -func (cl *collectionLoader) populateMaps() error { - for mapName, m := range cl.maps { - mapSpec, ok := cl.coll.Maps[mapName] - if !ok { - return fmt.Errorf("missing map spec %s", mapName) - } + if !ins.IsLoadFromMap() || ins.Reference == "" { + continue + } - mapSpec = mapSpec.Copy() + if uint32(ins.Constant) != math.MaxUint32 { + // Don't overwrite maps already rewritten, users can + // rewrite programs in the spec themselves + continue + } - // Replace any object stubs with loaded objects. - for i, kv := range mapSpec.Contents { - switch v := kv.Value.(type) { - case programStub: - // loadProgram is idempotent and could return an existing Program. - prog, err := cl.loadProgram(string(v)) - if err != nil { - return fmt.Errorf("loading program %s, for map %s: %w", v, mapName, err) - } - mapSpec.Contents[i] = MapKV{kv.Key, prog} + m, err := loadMap(ins.Reference) + if err != nil { + return nil, fmt.Errorf("program %s: %w", progName, err) + } - case mapStub: - // loadMap is idempotent and could return an existing Map. - innerMap, err := cl.loadMap(string(v)) - if err != nil { - return fmt.Errorf("loading inner map %s, for map %s: %w", v, mapName, err) - } - mapSpec.Contents[i] = MapKV{kv.Key, innerMap} + fd := m.FD() + if fd < 0 { + return nil, fmt.Errorf("map %s: %w", ins.Reference, internal.ErrClosedFd) + } + if err := ins.RewriteMapPtr(m.FD()); err != nil { + return nil, fmt.Errorf("progam %s: map %s: %w", progName, ins.Reference, err) } } - // Populate and freeze the map if specified. - if err := m.finalize(mapSpec); err != nil { - return fmt.Errorf("populating map %s: %w", mapName, err) + prog, err := newProgramWithOptions(progSpec, opts.Programs, handles) + if err != nil { + return nil, fmt.Errorf("program %s: %w", progName, err) } + + progs[progName] = prog + return prog, nil } - return nil + return } // LoadCollection parses an object file and converts it to a collection. @@ -540,81 +466,108 @@ func (coll *Collection) DetachProgram(name string) *Program { return p } -// structField represents a struct field containing the ebpf struct tag. -type structField struct { - reflect.StructField - value reflect.Value -} +// Assign the contents of a collection to a struct. +// +// Deprecated: use CollectionSpec.Assign instead. It provides the same +// functionality but creates only the maps and programs requested. +func (coll *Collection) Assign(to interface{}) error { + assignedMaps := make(map[string]struct{}) + assignedPrograms := make(map[string]struct{}) + valueOf := func(typ reflect.Type, name string) (reflect.Value, error) { + switch typ { + case reflect.TypeOf((*Program)(nil)): + p := coll.Programs[name] + if p == nil { + return reflect.Value{}, fmt.Errorf("missing program %q", name) + } + assignedPrograms[name] = struct{}{} + return reflect.ValueOf(p), nil + case reflect.TypeOf((*Map)(nil)): + m := coll.Maps[name] + if m == nil { + return reflect.Value{}, fmt.Errorf("missing map %q", name) + } + assignedMaps[name] = struct{}{} + return reflect.ValueOf(m), nil + default: + return reflect.Value{}, fmt.Errorf("unsupported type %s", typ) + } + } -// ebpfFields extracts field names tagged with 'ebpf' from a struct type. -// Keep track of visited types to avoid infinite recursion. -func ebpfFields(structVal reflect.Value, visited map[reflect.Type]bool) ([]structField, error) { - if visited == nil { - visited = make(map[reflect.Type]bool) + if err := assignValues(to, valueOf); err != nil { + return err } - structType := structVal.Type() - if structType.Kind() != reflect.Struct { - return nil, fmt.Errorf("%s is not a struct", structType) + for name := range assignedPrograms { + coll.DetachProgram(name) } - if visited[structType] { - return nil, fmt.Errorf("recursion on type %s", structType) + for name := range assignedMaps { + coll.DetachMap(name) } - fields := make([]structField, 0, structType.NumField()) - for i := 0; i < structType.NumField(); i++ { - field := structField{structType.Field(i), structVal.Field(i)} + return nil +} + +func assignValues(to interface{}, valueOf func(reflect.Type, string) (reflect.Value, error)) error { + type structField struct { + reflect.StructField + value reflect.Value + } - // If the field is tagged, gather it and move on. - name := field.Tag.Get("ebpf") - if name != "" { - fields = append(fields, field) - continue + var ( + fields []structField + visitedTypes = make(map[reflect.Type]bool) + flattenStruct func(reflect.Value) error + ) + + flattenStruct = func(structVal reflect.Value) error { + structType := structVal.Type() + if structType.Kind() != reflect.Struct { + return fmt.Errorf("%s is not a struct", structType) + } + + if visitedTypes[structType] { + return fmt.Errorf("recursion on type %s", structType) } - // If the field does not have an ebpf tag, but is a struct or a pointer - // to a struct, attempt to gather its fields as well. - var v reflect.Value - switch field.Type.Kind() { - case reflect.Ptr: - if field.Type.Elem().Kind() != reflect.Struct { + for i := 0; i < structType.NumField(); i++ { + field := structField{structType.Field(i), structVal.Field(i)} + + name := field.Tag.Get("ebpf") + if name != "" { + fields = append(fields, field) continue } - if field.value.IsNil() { - return nil, fmt.Errorf("nil pointer to %s", structType) - } + var err error + switch field.Type.Kind() { + case reflect.Ptr: + if field.Type.Elem().Kind() != reflect.Struct { + continue + } + + if field.value.IsNil() { + return fmt.Errorf("nil pointer to %s", structType) + } - // Obtain the destination type of the pointer. - v = field.value.Elem() + err = flattenStruct(field.value.Elem()) - case reflect.Struct: - // Reference the value's type directly. - v = field.value + case reflect.Struct: + err = flattenStruct(field.value) - default: - continue - } + default: + continue + } - inner, err := ebpfFields(v, visited) - if err != nil { - return nil, fmt.Errorf("field %s: %w", field.Name, err) + if err != nil { + return fmt.Errorf("field %s: %w", field.Name, err) + } } - fields = append(fields, inner...) + return nil } - return fields, nil -} - -// assignValues attempts to populate all fields of 'to' tagged with 'ebpf'. -// -// getValue is called for every tagged field of 'to' and must return the value -// to be assigned to the field with the given typ and name. -func assignValues(to interface{}, - getValue func(typ reflect.Type, name string) (interface{}, error)) error { - toValue := reflect.ValueOf(to) if toValue.Type().Kind() != reflect.Ptr { return fmt.Errorf("%T is not a pointer to struct", to) @@ -624,8 +577,7 @@ func assignValues(to interface{}, return fmt.Errorf("nil pointer to %T", to) } - fields, err := ebpfFields(toValue.Elem(), nil) - if err != nil { + if err := flattenStruct(toValue.Elem()); err != nil { return err } @@ -635,23 +587,19 @@ func assignValues(to interface{}, name string } - assigned := make(map[elem]string) + assignedTo := make(map[elem]string) for _, field := range fields { - // Get string value the field is tagged with. - tag := field.Tag.Get("ebpf") - if strings.Contains(tag, ",") { + name := field.Tag.Get("ebpf") + if strings.Contains(name, ",") { return fmt.Errorf("field %s: ebpf tag contains a comma", field.Name) } - // Check if the eBPF object with the requested - // type and tag was already assigned elsewhere. - e := elem{field.Type, tag} - if af := assigned[e]; af != "" { - return fmt.Errorf("field %s: object %q was already assigned to %s", field.Name, tag, af) + e := elem{field.Type, name} + if assignedField := assignedTo[e]; assignedField != "" { + return fmt.Errorf("field %s: %q was already assigned to %s", field.Name, name, assignedField) } - // Get the eBPF object referred to by the tag. - value, err := getValue(field.Type, tag) + value, err := valueOf(field.Type, name) if err != nil { return fmt.Errorf("field %s: %w", field.Name, err) } @@ -659,9 +607,9 @@ func assignValues(to interface{}, if !field.value.CanSet() { return fmt.Errorf("field %s: can't set value", field.Name) } - field.value.Set(reflect.ValueOf(value)) - assigned[e] = field.Name + field.value.Set(value) + assignedTo[e] = field.Name } return nil diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/elf_reader.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/elf_reader.go index 42010f43e583..c2afbc36a5a9 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/elf_reader.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/elf_reader.go @@ -19,7 +19,7 @@ import ( ) // elfCode is a convenience to reduce the amount of arguments that have to -// be passed around explicitly. You should treat its contents as immutable. +// be passed around explicitly. You should treat it's contents as immutable. type elfCode struct { *internal.SafeELFFile sections map[elf.SectionIndex]*elfSection @@ -188,7 +188,7 @@ func LoadCollectionSpecFromReader(rd io.ReaderAt) (*CollectionSpec, error) { return nil, fmt.Errorf("load programs: %w", err) } - return &CollectionSpec{maps, progs, ec.ByteOrder}, nil + return &CollectionSpec{maps, progs}, nil } func loadLicense(sec *elf.Section) (string, error) { @@ -520,12 +520,8 @@ func (ec *elfCode) loadMaps(maps map[string]*MapSpec) error { return fmt.Errorf("map %s: missing flags", mapName) } - extra, err := io.ReadAll(lr) - if err != nil { - return fmt.Errorf("map %s: reading map tail: %w", mapName, err) - } - if len(extra) > 0 { - spec.Extra = *bytes.NewReader(extra) + if _, err := io.Copy(internal.DiscardZeroes{}, lr); err != nil { + return fmt.Errorf("map %s: unknown and non-zero fields in definition", mapName) } if err := spec.clampPerfEventArraySize(); err != nil { @@ -539,9 +535,6 @@ func (ec *elfCode) loadMaps(maps map[string]*MapSpec) error { return nil } -// loadBTFMaps iterates over all ELF sections marked as BTF map sections -// (like .maps) and parses them into MapSpecs. Dump the .maps section and -// any relocations with `readelf -x .maps -r `. func (ec *elfCode) loadBTFMaps(maps map[string]*MapSpec) error { for _, sec := range ec.sections { if sec.kind != btfMapSection { @@ -552,46 +545,33 @@ func (ec *elfCode) loadBTFMaps(maps map[string]*MapSpec) error { return fmt.Errorf("missing BTF") } - // Each section must appear as a DataSec in the ELF's BTF blob. - var ds *btf.Datasec + _, err := io.Copy(internal.DiscardZeroes{}, bufio.NewReader(sec.Open())) + if err != nil { + return fmt.Errorf("section %v: initializing BTF map definitions: %w", sec.Name, internal.ErrNotSupported) + } + + var ds btf.Datasec if err := ec.btf.FindType(sec.Name, &ds); err != nil { return fmt.Errorf("cannot find section '%s' in BTF: %w", sec.Name, err) } - // Open a Reader to the ELF's raw section bytes so we can assert that all - // of them are zero on a per-map (per-Var) basis. For now, the section's - // sole purpose is to receive relocations, so all must be zero. - rs := sec.Open() - for _, vs := range ds.Vars { - // BPF maps are declared as and assigned to global variables, - // so iterate over each Var in the DataSec and validate their types. v, ok := vs.Type.(*btf.Var) if !ok { return fmt.Errorf("section %v: unexpected type %s", sec.Name, vs.Type) } name := string(v.Name) - // The BTF metadata for each Var contains the full length of the map - // declaration, so read the corresponding amount of bytes from the ELF. - // This way, we can pinpoint which map declaration contains unexpected - // (and therefore unsupported) data. - _, err := io.Copy(internal.DiscardZeroes{}, io.LimitReader(rs, int64(vs.Size))) - if err != nil { - return fmt.Errorf("section %v: map %s: initializing BTF map definitions: %w", sec.Name, name, internal.ErrNotSupported) - } - if maps[name] != nil { return fmt.Errorf("section %v: map %s already exists", sec.Name, name) } - // Each Var representing a BTF map definition contains a Struct. mapStruct, ok := v.Type.(*btf.Struct) if !ok { return fmt.Errorf("expected struct, got %s", v.Type) } - mapSpec, err := mapSpecFromBTF(sec, &vs, mapStruct, ec.btf, name, false) + mapSpec, err := mapSpecFromBTF(name, mapStruct, false, ec.btf) if err != nil { return fmt.Errorf("map %v: %w", name, err) } @@ -602,52 +582,32 @@ func (ec *elfCode) loadBTFMaps(maps map[string]*MapSpec) error { maps[name] = mapSpec } - - // Drain the ELF section reader to make sure all bytes are accounted for - // with BTF metadata. - i, err := io.Copy(io.Discard, rs) - if err != nil { - return fmt.Errorf("section %v: unexpected error reading remainder of ELF section: %w", sec.Name, err) - } - if i > 0 { - return fmt.Errorf("section %v: %d unexpected remaining bytes in ELF section, invalid BTF?", sec.Name, i) - } } return nil } -// A programStub is a placeholder for a Program to be inserted at a certain map key. -// It needs to be resolved into a Program later on in the loader process. -type programStub string - -// A mapStub is a placeholder for a Map to be inserted at a certain map key. -// It needs to be resolved into a Map later on in the loader process. -type mapStub string - // mapSpecFromBTF produces a MapSpec based on a btf.Struct def representing // a BTF map definition. The name and spec arguments will be copied to the // resulting MapSpec, and inner must be true on any resursive invocations. -func mapSpecFromBTF(es *elfSection, vs *btf.VarSecinfo, def *btf.Struct, spec *btf.Spec, name string, inner bool) (*MapSpec, error) { +func mapSpecFromBTF(name string, def *btf.Struct, inner bool, spec *btf.Spec) (*MapSpec, error) { + var ( - key, value btf.Type - keySize, valueSize uint32 - mapType MapType - flags, maxEntries uint32 - pinType PinType - innerMapSpec *MapSpec - contents []MapKV - err error + key, value btf.Type + keySize, valueSize uint32 + mapType, flags, maxEntries uint32 + pinType PinType + innerMapSpec *MapSpec + err error ) for i, member := range def.Members { switch member.Name { case "type": - mt, err := uintFromBTF(member.Type) + mapType, err = uintFromBTF(member.Type) if err != nil { return nil, fmt.Errorf("can't get type: %w", err) } - mapType = MapType(mt) case "map_flags": flags, err = uintFromBTF(member.Type) @@ -757,7 +717,7 @@ func mapSpecFromBTF(es *elfSection, vs *btf.VarSecinfo, def *btf.Struct, spec *b case *btf.Struct: // The values member pointing to an array of structs means we're expecting // a map-in-map declaration. - if mapType != ArrayOfMaps && mapType != HashOfMaps { + if MapType(mapType) != ArrayOfMaps && MapType(mapType) != HashOfMaps { return nil, errors.New("outer map needs to be an array or a hash of maps") } if inner { @@ -771,38 +731,21 @@ func mapSpecFromBTF(es *elfSection, vs *btf.VarSecinfo, def *btf.Struct, spec *b // on kernels 5.2 and up) // Pass the BTF spec from the parent object, since both parent and // child must be created from the same BTF blob (on kernels that support BTF). - innerMapSpec, err = mapSpecFromBTF(es, vs, t, spec, name+"_inner", true) + innerMapSpec, err = mapSpecFromBTF(name+"_inner", t, true, spec) if err != nil { return nil, fmt.Errorf("can't parse BTF map definition of inner map: %w", err) } - case *btf.FuncProto: - // The values member contains an array of function pointers, meaning an - // autopopulated PROG_ARRAY. - if mapType != ProgramArray { - return nil, errors.New("map needs to be a program array") - } - default: return nil, fmt.Errorf("unsupported value type %q in 'values' field", t) } - contents, err = resolveBTFValuesContents(es, vs, member) - if err != nil { - return nil, fmt.Errorf("resolving values contents: %w", err) - } - default: return nil, fmt.Errorf("unrecognized field %s in BTF map definition", member.Name) } } - if key == nil { - key = &btf.Void{} - } - if value == nil { - value = &btf.Void{} - } + bm := btf.NewMap(spec, key, value) return &MapSpec{ Name: SanitizeName(name, -1), @@ -811,10 +754,9 @@ func mapSpecFromBTF(es *elfSection, vs *btf.VarSecinfo, def *btf.Struct, spec *b ValueSize: valueSize, MaxEntries: maxEntries, Flags: flags, - BTF: &btf.Map{Spec: spec, Key: key, Value: value}, + BTF: &bm, Pinning: pinType, InnerMap: innerMapSpec, - Contents: contents, }, nil } @@ -851,64 +793,6 @@ func resolveBTFArrayMacro(typ btf.Type) (btf.Type, error) { return ptr.Target, nil } -// resolveBTFValuesContents resolves relocations into ELF sections belonging -// to btf.VarSecinfo's. This can be used on the 'values' member in BTF map -// definitions to extract static declarations of map contents. -func resolveBTFValuesContents(es *elfSection, vs *btf.VarSecinfo, member btf.Member) ([]MapKV, error) { - // The elements of a .values pointer array are not encoded in BTF. - // Instead, relocations are generated into each array index. - // However, it's possible to leave certain array indices empty, so all - // indices' offsets need to be checked for emitted relocations. - - // The offset of the 'values' member within the _struct_ (in bits) - // is the starting point of the array. Convert to bytes. Add VarSecinfo - // offset to get the absolute position in the ELF blob. - start := (member.OffsetBits / 8) + vs.Offset - // 'values' is encoded in BTF as a zero (variable) length struct - // member, and its contents run until the end of the VarSecinfo. - // Add VarSecinfo offset to get the absolute position in the ELF blob. - end := vs.Size + vs.Offset - // The size of an address in this section. This determines the width of - // an index in the array. - align := uint32(es.SectionHeader.Addralign) - - // Check if variable-length section is aligned. - if (end-start)%align != 0 { - return nil, errors.New("unaligned static values section") - } - elems := (end - start) / align - - if elems == 0 { - return nil, nil - } - - contents := make([]MapKV, 0, elems) - - // k is the array index, off is its corresponding ELF section offset. - for k, off := uint32(0), start; k < elems; k, off = k+1, off+align { - r, ok := es.relocations[uint64(off)] - if !ok { - continue - } - - // Relocation exists for the current offset in the ELF section. - // Emit a value stub based on the type of relocation to be replaced by - // a real fd later in the pipeline before populating the map. - // Map keys are encoded in MapKV entries, so empty array indices are - // skipped here. - switch t := elf.ST_TYPE(r.Info); t { - case elf.STT_FUNC: - contents = append(contents, MapKV{uint32(k), programStub(r.Name)}) - case elf.STT_OBJECT: - contents = append(contents, MapKV{uint32(k), mapStub(r.Name)}) - default: - return nil, fmt.Errorf("unknown relocation type %v", t) - } - } - - return contents, nil -} - func (ec *elfCode) loadDataSections(maps map[string]*MapSpec) error { for _, sec := range ec.sections { if sec.kind != dataSection { @@ -925,9 +809,9 @@ func (ec *elfCode) loadDataSections(maps map[string]*MapSpec) error { return errors.New("data sections require BTF, make sure all consts are marked as static") } - var datasec *btf.Datasec - if err := ec.btf.FindType(sec.Name, &datasec); err != nil { - return fmt.Errorf("data section %s: can't get BTF: %w", sec.Name, err) + btfMap, err := ec.btf.Datasec(sec.Name) + if err != nil { + return err } data, err := sec.Data() @@ -946,7 +830,7 @@ func (ec *elfCode) loadDataSections(maps map[string]*MapSpec) error { ValueSize: uint32(len(data)), MaxEntries: 1, Contents: []MapKV{{uint32(0), data}}, - BTF: &btf.Map{Spec: ec.btf, Key: &btf.Void{}, Value: datasec}, + BTF: btfMap, } switch sec.Name { @@ -971,8 +855,6 @@ func getProgType(sectionName string) (ProgramType, AttachType, uint32, string) { }{ // From https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/lib/bpf/libbpf.c "socket": {SocketFilter, AttachNone, 0}, - "sk_reuseport/migrate": {SkReuseport, AttachSkReuseportSelectOrMigrate, 0}, - "sk_reuseport": {SkReuseport, AttachSkReuseportSelect, 0}, "seccomp": {SocketFilter, AttachNone, 0}, "kprobe/": {Kprobe, AttachNone, 0}, "uprobe/": {Kprobe, AttachNone, 0}, @@ -1002,7 +884,6 @@ func getProgType(sectionName string) (ProgramType, AttachType, uint32, string) { "fmod_ret.s/": {Tracing, AttachModifyReturn, unix.BPF_F_SLEEPABLE}, "fexit.s/": {Tracing, AttachTraceFExit, unix.BPF_F_SLEEPABLE}, "sk_lookup/": {SkLookup, AttachSkLookup, 0}, - "freplace/": {Extension, AttachNone, 0}, "lsm/": {LSM, AttachLSMMac, 0}, "lsm.s/": {LSM, AttachLSMMac, unix.BPF_F_SLEEPABLE}, @@ -1026,11 +907,6 @@ func getProgType(sectionName string) (ProgramType, AttachType, uint32, string) { "cgroup/setsockopt": {CGroupSockopt, AttachCGroupSetsockopt, 0}, "classifier": {SchedCLS, AttachNone, 0}, "action": {SchedACT, AttachNone, 0}, - - "cgroup/getsockname4": {CGroupSockAddr, AttachCgroupInet4GetSockname, 0}, - "cgroup/getsockname6": {CGroupSockAddr, AttachCgroupInet6GetSockname, 0}, - "cgroup/getpeername4": {CGroupSockAddr, AttachCgroupInet4GetPeername, 0}, - "cgroup/getpeername6": {CGroupSockAddr, AttachCgroupInet6GetPeername, 0}, } for prefix, t := range types { diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/elf_reader_fuzz.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/elf_reader_fuzz.go index 5f4e0a0ad023..d46d135f2fcd 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/elf_reader_fuzz.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/elf_reader_fuzz.go @@ -1,4 +1,3 @@ -//go:build gofuzz // +build gofuzz // Use with https://github.com/dvyukov/go-fuzz diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/go.mod b/cluster-autoscaler/vendor/github.com/cilium/ebpf/go.mod index f5edf690ab06..df8139621c3e 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/go.mod +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/go.mod @@ -1,9 +1,9 @@ module github.com/cilium/ebpf -go 1.16 +go 1.15 require ( github.com/frankban/quicktest v1.11.3 github.com/google/go-cmp v0.5.4 - golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34 + golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c ) diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/go.sum b/cluster-autoscaler/vendor/github.com/cilium/ebpf/go.sum index 1ef5a4767e81..a5039262aab0 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/go.sum +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/go.sum @@ -7,7 +7,7 @@ github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34 h1:GkvMjFtXUmahfDtashnc1mnrCtuBVcwse5QV2lUk/tI= -golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c h1:VwygUrnw9jn88c4u8GD3rZQbqrP/tgas88tPUbBxQrk= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/info.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/info.go index 65fa4d7d8502..b95131ef5726 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/info.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/info.go @@ -12,7 +12,6 @@ import ( "time" "github.com/cilium/ebpf/internal" - "github.com/cilium/ebpf/internal/btf" ) // MapInfo describes a map. @@ -88,16 +87,12 @@ type ProgramInfo struct { Tag string // Name as supplied by user space at load time. Name string - // BTF for the program. - btf btf.ID - // IDS map ids related to program. - ids []MapID stats *programStats } func newProgramInfoFromFd(fd *internal.FD) (*ProgramInfo, error) { - info, err := bpfGetProgInfoByFD(fd, nil) + info, err := bpfGetProgInfoByFD(fd) if errors.Is(err, syscall.EINVAL) { return newProgramInfoFromProc(fd) } @@ -105,15 +100,6 @@ func newProgramInfoFromFd(fd *internal.FD) (*ProgramInfo, error) { return nil, err } - var mapIDs []MapID - if info.nr_map_ids > 0 { - mapIDs = make([]MapID, info.nr_map_ids) - info, err = bpfGetProgInfoByFD(fd, mapIDs) - if err != nil { - return nil, err - } - } - return &ProgramInfo{ Type: ProgramType(info.prog_type), id: ProgramID(info.id), @@ -121,8 +107,6 @@ func newProgramInfoFromFd(fd *internal.FD) (*ProgramInfo, error) { Tag: hex.EncodeToString(info.tag[:]), // name is available from 4.15. Name: internal.CString(info.name[:]), - btf: btf.ID(info.btf_id), - ids: mapIDs, stats: &programStats{ runtime: time.Duration(info.run_time_ns), runCount: info.run_cnt, @@ -158,17 +142,6 @@ func (pi *ProgramInfo) ID() (ProgramID, bool) { return pi.id, pi.id > 0 } -// BTFID returns the BTF ID associated with the program. -// -// Available from 5.0. -// -// The bool return value indicates whether this optional field is available and -// populated. (The field may be available but not populated if the kernel -// supports the field but the program was loaded without BTF information.) -func (pi *ProgramInfo) BTFID() (btf.ID, bool) { - return pi.btf, pi.btf > 0 -} - // RunCount returns the total number of times the program was called. // // Can return 0 if the collection of statistics is not enabled. See EnableStats(). @@ -191,13 +164,6 @@ func (pi *ProgramInfo) Runtime() (time.Duration, bool) { return time.Duration(0), false } -// MapIDs returns the maps related to the program. -// -// The bool return value indicates whether this optional field is available. -func (pi *ProgramInfo) MapIDs() ([]MapID, bool) { - return pi.ids, pi.ids != nil -} - func scanFdInfo(fd *internal.FD, fields map[string]interface{}) error { raw, err := fd.Value() if err != nil { diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/align.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/align.go deleted file mode 100644 index 8b4f2658eacb..000000000000 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/align.go +++ /dev/null @@ -1,6 +0,0 @@ -package internal - -// Align returns 'n' updated to 'alignment' boundary. -func Align(n, alignment int) int { - return (int(n) + alignment - 1) / alignment * alignment -} diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/btf.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/btf.go index 2b5f6d226a4f..5da9e11921a3 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/btf.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/btf.go @@ -7,6 +7,7 @@ import ( "errors" "fmt" "io" + "io/ioutil" "math" "os" "reflect" @@ -26,15 +27,12 @@ var ( ErrNoExtendedInfo = errors.New("no extended info") ) -// ID represents the unique ID of a BTF object. -type ID uint32 - // Spec represents decoded BTF. type Spec struct { rawTypes []rawType strings stringTable types []Type - namedTypes map[string][]NamedType + namedTypes map[string][]namedType funcInfos map[string]extInfo lineInfos map[string]extInfo coreRelos map[string]coreRelos @@ -63,6 +61,15 @@ func LoadSpecFromReader(rd io.ReaderAt) (*Spec, error) { } defer file.Close() + btfSection, btfExtSection, sectionSizes, err := findBtfSections(file) + if err != nil { + return nil, err + } + + if btfSection == nil { + return nil, fmt.Errorf("btf: %w", ErrNotFound) + } + symbols, err := file.Symbols() if err != nil { return nil, fmt.Errorf("can't read symbols: %v", err) @@ -80,6 +87,10 @@ func LoadSpecFromReader(rd io.ReaderAt) (*Spec, error) { } secName := file.Sections[symbol.Section].Name + if _, ok := sectionSizes[secName]; !ok { + continue + } + if symbol.Value > math.MaxUint32 { return nil, fmt.Errorf("section %s: symbol %s: size exceeds maximum", secName, symbol.Name) } @@ -87,10 +98,24 @@ func LoadSpecFromReader(rd io.ReaderAt) (*Spec, error) { variableOffsets[variable{secName, symbol.Name}] = uint32(symbol.Value) } - return loadSpecFromELF(file, variableOffsets) + spec, err := loadNakedSpec(btfSection.Open(), file.ByteOrder, sectionSizes, variableOffsets) + if err != nil { + return nil, err + } + + if btfExtSection == nil { + return spec, nil + } + + spec.funcInfos, spec.lineInfos, spec.coreRelos, err = parseExtInfos(btfExtSection.Open(), file.ByteOrder, spec.strings) + if err != nil { + return nil, fmt.Errorf("can't read ext info: %w", err) + } + + return spec, nil } -func loadSpecFromELF(file *internal.SafeELFFile, variableOffsets map[variable]uint32) (*Spec, error) { +func findBtfSections(file *internal.SafeELFFile) (*elf.Section, *elf.Section, map[string]uint32, error) { var ( btfSection *elf.Section btfExtSection *elf.Section @@ -109,45 +134,33 @@ func loadSpecFromELF(file *internal.SafeELFFile, variableOffsets map[variable]ui } if sec.Size > math.MaxUint32 { - return nil, fmt.Errorf("section %s exceeds maximum size", sec.Name) + return nil, nil, nil, fmt.Errorf("section %s exceeds maximum size", sec.Name) } sectionSizes[sec.Name] = uint32(sec.Size) } } + return btfSection, btfExtSection, sectionSizes, nil +} - if btfSection == nil { - return nil, fmt.Errorf("btf: %w", ErrNotFound) - } - - spec, err := loadRawSpec(btfSection.Open(), file.ByteOrder, sectionSizes, variableOffsets) +func loadSpecFromVmlinux(rd io.ReaderAt) (*Spec, error) { + file, err := internal.NewSafeELFFile(rd) if err != nil { return nil, err } + defer file.Close() - if btfExtSection == nil { - return spec, nil - } - - spec.funcInfos, spec.lineInfos, spec.coreRelos, err = parseExtInfos(btfExtSection.Open(), file.ByteOrder, spec.strings) + btfSection, _, _, err := findBtfSections(file) if err != nil { - return nil, fmt.Errorf("can't read ext info: %w", err) + return nil, fmt.Errorf(".BTF ELF section: %s", err) } - - return spec, nil -} - -// LoadRawSpec reads a blob of BTF data that isn't wrapped in an ELF file. -// -// Prefer using LoadSpecFromReader, since this function only supports a subset -// of BTF. -func LoadRawSpec(btf io.Reader, bo binary.ByteOrder) (*Spec, error) { - // This will return an error if we encounter a Datasec, since we can't fix - // it up. - return loadRawSpec(btf, bo, nil, nil) + if btfSection == nil { + return nil, fmt.Errorf("unable to find .BTF ELF section") + } + return loadNakedSpec(btfSection.Open(), file.ByteOrder, nil, nil) } -func loadRawSpec(btf io.Reader, bo binary.ByteOrder, sectionSizes map[string]uint32, variableOffsets map[variable]uint32) (*Spec, error) { +func loadNakedSpec(btf io.ReadSeeker, bo binary.ByteOrder, sectionSizes map[string]uint32, variableOffsets map[variable]uint32) (*Spec, error) { rawTypes, rawStrings, err := parseBTF(btf, bo) if err != nil { return nil, err @@ -204,7 +217,7 @@ func loadKernelSpec() (*Spec, error) { if err == nil { defer fh.Close() - return LoadRawSpec(fh, internal.NativeEndian) + return loadNakedSpec(fh, internal.NativeEndian, nil, nil) } // use same list of locations as libbpf @@ -228,20 +241,14 @@ func loadKernelSpec() (*Spec, error) { } defer fh.Close() - file, err := internal.NewSafeELFFile(fh) - if err != nil { - return nil, err - } - defer file.Close() - - return loadSpecFromELF(file, nil) + return loadSpecFromVmlinux(fh) } return nil, fmt.Errorf("no BTF for kernel version %s: %w", release, internal.ErrNotSupported) } -func parseBTF(btf io.Reader, bo binary.ByteOrder) ([]rawType, stringTable, error) { - rawBTF, err := io.ReadAll(btf) +func parseBTF(btf io.ReadSeeker, bo binary.ByteOrder) ([]rawType, stringTable, error) { + rawBTF, err := ioutil.ReadAll(btf) if err != nil { return nil, nil, fmt.Errorf("can't read BTF: %v", err) } @@ -350,30 +357,6 @@ func fixupDatasec(rawTypes []rawType, rawStrings stringTable, sectionSizes map[s return nil } -// Copy creates a copy of Spec. -func (s *Spec) Copy() *Spec { - types, _ := copyTypes(s.types, nil) - namedTypes := make(map[string][]NamedType) - for _, typ := range types { - if named, ok := typ.(NamedType); ok { - name := essentialName(named.TypeName()) - namedTypes[name] = append(namedTypes[name], named) - } - } - - // NB: Other parts of spec are not copied since they are immutable. - return &Spec{ - s.rawTypes, - s.strings, - types, - namedTypes, - s.funcInfos, - s.lineInfos, - s.coreRelos, - s.byteOrder, - } -} - type marshalOpts struct { ByteOrder binary.ByteOrder StripFuncLinkage bool @@ -464,37 +447,36 @@ func (s *Spec) Program(name string, length uint64) (*Program, error) { return &Program{s, length, funcInfos, lineInfos, relos}, nil } +// Datasec returns the BTF required to create maps which represent data sections. +func (s *Spec) Datasec(name string) (*Map, error) { + var datasec Datasec + if err := s.FindType(name, &datasec); err != nil { + return nil, fmt.Errorf("data section %s: can't get BTF: %w", name, err) + } + + m := NewMap(s, &Void{}, &datasec) + return &m, nil +} + // FindType searches for a type with a specific name. // -// Called T a type that satisfies Type, typ must be a non-nil **T. -// On success, the address of the found type will be copied in typ. +// hint determines the type of the returned Type. // // Returns an error wrapping ErrNotFound if no matching // type exists in spec. -func (s *Spec) FindType(name string, typ interface{}) error { - typValue := reflect.ValueOf(typ) - if typValue.Kind() != reflect.Ptr { - return fmt.Errorf("%T is not a pointer", typ) - } - - typPtr := typValue.Elem() - if !typPtr.CanSet() { - return fmt.Errorf("%T cannot be set", typ) - } - - wanted := typPtr.Type() - if !wanted.AssignableTo(reflect.TypeOf((*Type)(nil)).Elem()) { - return fmt.Errorf("%T does not satisfy Type interface", typ) - } +func (s *Spec) FindType(name string, typ Type) error { + var ( + wanted = reflect.TypeOf(typ) + candidate Type + ) - var candidate Type for _, typ := range s.namedTypes[essentialName(name)] { if reflect.TypeOf(typ) != wanted { continue } // Match against the full name, not just the essential one. - if typ.TypeName() != name { + if typ.name() != name { continue } @@ -509,15 +491,15 @@ func (s *Spec) FindType(name string, typ interface{}) error { return fmt.Errorf("type %s: %w", name, ErrNotFound) } - typPtr.Set(reflect.ValueOf(candidate)) - + cpy, _ := copyType(candidate, nil) + value := reflect.Indirect(reflect.ValueOf(cpy)) + reflect.Indirect(reflect.ValueOf(typ)).Set(value) return nil } // Handle is a reference to BTF loaded into the kernel. type Handle struct { - spec *Spec - fd *internal.FD + fd *internal.FD } // NewHandle loads BTF into the kernel. @@ -559,32 +541,7 @@ func NewHandle(spec *Spec) (*Handle, error) { return nil, internal.ErrorWithLog(err, logBuf, logErr) } - return &Handle{spec.Copy(), fd}, nil -} - -// NewHandleFromID returns the BTF handle for a given id. -// -// Returns ErrNotExist, if there is no BTF with the given id. -// -// Requires CAP_SYS_ADMIN. -func NewHandleFromID(id ID) (*Handle, error) { - fd, err := internal.BPFObjGetFDByID(internal.BPF_BTF_GET_FD_BY_ID, uint32(id)) - if err != nil { - return nil, fmt.Errorf("get BTF by id: %w", err) - } - - info, err := newInfoFromFd(fd) - if err != nil { - _ = fd.Close() - return nil, fmt.Errorf("get BTF spec for handle: %w", err) - } - - return &Handle{info.BTF, fd}, nil -} - -// Spec returns the Spec that defined the BTF loaded into the kernel. -func (h *Handle) Spec() *Spec { - return h.spec + return &Handle{fd}, nil } // Close destroys the handle. @@ -606,8 +563,43 @@ func (h *Handle) FD() int { // Map is the BTF for a map. type Map struct { - Spec *Spec - Key, Value Type + spec *Spec + key, value Type +} + +// NewMap returns a new Map containing the given values. +// The key and value arguments are initialized to Void if nil values are given. +func NewMap(spec *Spec, key Type, value Type) Map { + if key == nil { + key = &Void{} + } + if value == nil { + value = &Void{} + } + + return Map{ + spec: spec, + key: key, + value: value, + } +} + +// MapSpec should be a method on Map, but is a free function +// to hide it from users of the ebpf package. +func MapSpec(m *Map) *Spec { + return m.spec +} + +// MapKey should be a method on Map, but is a free function +// to hide it from users of the ebpf package. +func MapKey(m *Map) Type { + return m.key +} + +// MapValue should be a method on Map, but is a free function +// to hide it from users of the ebpf package. +func MapValue(m *Map) Type { + return m.value } // Program is the BTF information for a stream of instructions. @@ -618,59 +610,68 @@ type Program struct { coreRelos coreRelos } -// Spec returns the BTF spec of this program. -func (p *Program) Spec() *Spec { - return p.spec +// ProgramSpec returns the Spec needed for loading function and line infos into the kernel. +// +// This is a free function instead of a method to hide it from users +// of package ebpf. +func ProgramSpec(s *Program) *Spec { + return s.spec } -// Append the information from other to the Program. -func (p *Program) Append(other *Program) error { - if other.spec != p.spec { - return fmt.Errorf("can't append program with different BTF specs") - } - - funcInfos, err := p.funcInfos.append(other.funcInfos, p.length) +// ProgramAppend the information from other to the Program. +// +// This is a free function instead of a method to hide it from users +// of package ebpf. +func ProgramAppend(s, other *Program) error { + funcInfos, err := s.funcInfos.append(other.funcInfos, s.length) if err != nil { return fmt.Errorf("func infos: %w", err) } - lineInfos, err := p.lineInfos.append(other.lineInfos, p.length) + lineInfos, err := s.lineInfos.append(other.lineInfos, s.length) if err != nil { return fmt.Errorf("line infos: %w", err) } - p.funcInfos = funcInfos - p.lineInfos = lineInfos - p.coreRelos = p.coreRelos.append(other.coreRelos, p.length) - p.length += other.length + s.funcInfos = funcInfos + s.lineInfos = lineInfos + s.coreRelos = s.coreRelos.append(other.coreRelos, s.length) + s.length += other.length return nil } -// FuncInfos returns the binary form of BTF function infos. -func (p *Program) FuncInfos() (recordSize uint32, bytes []byte, err error) { - bytes, err = p.funcInfos.MarshalBinary() +// ProgramFuncInfos returns the binary form of BTF function infos. +// +// This is a free function instead of a method to hide it from users +// of package ebpf. +func ProgramFuncInfos(s *Program) (recordSize uint32, bytes []byte, err error) { + bytes, err = s.funcInfos.MarshalBinary() if err != nil { - return 0, nil, fmt.Errorf("func infos: %w", err) + return 0, nil, err } - return p.funcInfos.recordSize, bytes, nil + return s.funcInfos.recordSize, bytes, nil } -// LineInfos returns the binary form of BTF line infos. -func (p *Program) LineInfos() (recordSize uint32, bytes []byte, err error) { - bytes, err = p.lineInfos.MarshalBinary() +// ProgramLineInfos returns the binary form of BTF line infos. +// +// This is a free function instead of a method to hide it from users +// of package ebpf. +func ProgramLineInfos(s *Program) (recordSize uint32, bytes []byte, err error) { + bytes, err = s.lineInfos.MarshalBinary() if err != nil { - return 0, nil, fmt.Errorf("line infos: %w", err) + return 0, nil, err } - return p.lineInfos.recordSize, bytes, nil + return s.lineInfos.recordSize, bytes, nil } -// Fixups returns the changes required to adjust the program to the target. +// ProgramFixups returns the changes required to adjust the program to the target. // -// Passing a nil target will relocate against the running kernel. -func (p *Program) Fixups(target *Spec) (COREFixups, error) { - if len(p.coreRelos) == 0 { +// This is a free function instead of a method to hide it from users +// of package ebpf. +func ProgramFixups(s *Program, target *Spec) (COREFixups, error) { + if len(s.coreRelos) == 0 { return nil, nil } @@ -682,7 +683,7 @@ func (p *Program) Fixups(target *Spec) (COREFixups, error) { } } - return coreRelocate(p.spec, target, p.coreRelos) + return coreRelocate(s.spec, target, s.coreRelos) } type bpfLoadBTFAttr struct { diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/btf_types.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/btf_types.go index d98c73ca594a..a5ef94512013 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/btf_types.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/btf_types.go @@ -31,8 +31,6 @@ const ( // Added ~5.1 kindVar kindDatasec - // Added ~5.13 - kindFloat ) // FuncLinkage describes BTF function linkage metadata. @@ -56,7 +54,7 @@ const ( const ( btfTypeKindShift = 24 - btfTypeKindLen = 5 + btfTypeKindLen = 4 btfTypeVlenShift = 0 btfTypeVlenMask = 16 btfTypeKindFlagShift = 31 @@ -69,8 +67,8 @@ type btfType struct { /* "info" bits arrangement * bits 0-15: vlen (e.g. # of struct's members), linkage * bits 16-23: unused - * bits 24-28: kind (e.g. int, ptr, array...etc) - * bits 29-30: unused + * bits 24-27: kind (e.g. int, ptr, array...etc) + * bits 28-30: unused * bit 31: kind_flag, currently used by * struct, union and fwd */ @@ -119,8 +117,6 @@ func (k btfKind) String() string { return "Variable" case kindDatasec: return "Section" - case kindFloat: - return "Float" default: return fmt.Sprintf("Unknown (%d)", k) } @@ -264,7 +260,6 @@ func readTypes(r io.Reader, bo binary.ByteOrder) ([]rawType, error) { data = new(btfVariable) case kindDatasec: data = make([]btfVarSecinfo, header.Vlen()) - case kindFloat: default: return nil, fmt.Errorf("type id %v: unknown kind: %v", id, header.Kind()) } diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/core.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/core.go index d02df9d50bb3..7c888f602d0d 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/core.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/core.go @@ -234,13 +234,13 @@ func coreRelocate(local, target *Spec, relos coreRelos) (COREFixups, error) { } localType := local.types[id] - named, ok := localType.(NamedType) - if !ok || named.TypeName() == "" { + named, ok := localType.(namedType) + if !ok || named.name() == "" { return nil, fmt.Errorf("relocate unnamed or anonymous type %s: %w", localType, ErrNotSupported) } relos := relosByID[id] - targets := target.namedTypes[essentialName(named.TypeName())] + targets := target.namedTypes[named.essentialName()] fixups, err := coreCalculateFixups(localType, targets, relos) if err != nil { return nil, fmt.Errorf("relocate %s: %w", localType, err) @@ -262,7 +262,7 @@ var errImpossibleRelocation = errors.New("impossible relocation") // // The best target is determined by scoring: the less poisoning we have to do // the better the target is. -func coreCalculateFixups(local Type, targets []NamedType, relos coreRelos) ([]COREFixup, error) { +func coreCalculateFixups(local Type, targets []namedType, relos coreRelos) ([]COREFixup, error) { localID := local.ID() local, err := copyType(local, skipQualifierAndTypedef) if err != nil { @@ -467,8 +467,8 @@ func parseCoreAccessor(accessor string) (coreAccessor, error) { return nil, fmt.Errorf("empty accessor") } + var result coreAccessor parts := strings.Split(accessor, ":") - result := make(coreAccessor, 0, len(parts)) for _, part := range parts { // 31 bits to avoid overflowing int on 32 bit platforms. index, err := strconv.ParseUint(part, 10, 31) @@ -564,7 +564,7 @@ func coreFindField(local Type, localAcc coreAccessor, target Type) (_, _ coreFie // This is an anonymous struct or union, ignore it. local = localMember.Type - localOffset += localMember.OffsetBits + localOffset += localMember.Offset localMaybeFlex = false continue } @@ -585,10 +585,10 @@ func coreFindField(local Type, localAcc coreAccessor, target Type) (_, _ coreFie local = localMember.Type localMaybeFlex = acc == len(localMembers)-1 - localOffset += localMember.OffsetBits + localOffset += localMember.Offset target = targetMember.Type targetMaybeFlex = last - targetOffset += targetMember.OffsetBits + targetOffset += targetMember.Offset case *Array: // For arrays, acc is the index in the target. @@ -639,7 +639,7 @@ func coreFindField(local Type, localAcc coreAccessor, target Type) (_, _ coreFie // coreFindMember finds a member in a composite type while handling anonymous // structs and unions. -func coreFindMember(typ composite, name string) (Member, bool, error) { +func coreFindMember(typ composite, name Name) (Member, bool, error) { if name == "" { return Member{}, false, errors.New("can't search for anonymous member") } @@ -670,7 +670,7 @@ func coreFindMember(typ composite, name string) (Member, bool, error) { for j, member := range members { if member.Name == name { // NB: This is safe because member is a copy. - member.OffsetBits += target.offset + member.Offset += target.offset return member, j == len(members)-1, nil } @@ -685,7 +685,7 @@ func coreFindMember(typ composite, name string) (Member, bool, error) { return Member{}, false, fmt.Errorf("anonymous non-composite type %T not allowed", member.Type) } - targets = append(targets, offsetTarget{comp, target.offset + member.OffsetBits}) + targets = append(targets, offsetTarget{comp, target.offset + member.Offset}) } } @@ -704,9 +704,9 @@ func coreFindEnumValue(local Type, localAcc coreAccessor, target Type) (localVal return nil, nil, errImpossibleRelocation } - localName := essentialName(localValue.Name) + localName := localValue.Name.essentialName() for i, targetValue := range targetEnum.Values { - if essentialName(targetValue.Name) != localName { + if targetValue.Name.essentialName() != localName { continue } @@ -813,7 +813,6 @@ func coreAreTypesCompatible(localType Type, targetType Type) error { * least one of enums should be anonymous; * - for ENUMs, check sizes, names are ignored; * - for INT, size and signedness are ignored; - * - any two FLOATs are always compatible; * - for ARRAY, dimensionality is ignored, element types are checked for * compatibility recursively; * [ NB: coreAreMembersCompatible doesn't recurse, this check is done @@ -849,16 +848,16 @@ func coreAreMembersCompatible(localType Type, targetType Type) error { } switch lv := localType.(type) { - case *Array, *Pointer, *Float: + case *Array, *Pointer: return nil case *Enum: tv := targetType.(*Enum) - return doNamesMatch(lv.Name, tv.Name) + return doNamesMatch(lv.name(), tv.name()) case *Fwd: tv := targetType.(*Fwd) - return doNamesMatch(lv.Name, tv.Name) + return doNamesMatch(lv.name(), tv.name()) case *Int: tv := targetType.(*Int) diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/ext_info.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/ext_info.go index cdae2ec40827..beba1bce6980 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/ext_info.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/ext_info.go @@ -7,6 +7,7 @@ import ( "errors" "fmt" "io" + "io/ioutil" "github.com/cilium/ebpf/asm" "github.com/cilium/ebpf/internal" @@ -63,7 +64,7 @@ func parseExtInfos(r io.ReadSeeker, bo binary.ByteOrder, strings stringTable) (f // Of course, the .BTF.ext header has different semantics than the // .BTF ext header. We need to ignore non-null values. - _, err = io.CopyN(io.Discard, r, remainder) + _, err = io.CopyN(ioutil.Discard, r, remainder) if err != nil { return nil, nil, nil, fmt.Errorf("header padding: %v", err) } @@ -113,16 +114,11 @@ type extInfoRecord struct { } type extInfo struct { - byteOrder binary.ByteOrder recordSize uint32 records []extInfoRecord } func (ei extInfo) append(other extInfo, offset uint64) (extInfo, error) { - if other.byteOrder != ei.byteOrder { - return extInfo{}, fmt.Errorf("ext_info byte order mismatch, want %v (got %v)", ei.byteOrder, other.byteOrder) - } - if other.recordSize != ei.recordSize { return extInfo{}, fmt.Errorf("ext_info record size mismatch, want %d (got %d)", ei.recordSize, other.recordSize) } @@ -135,14 +131,10 @@ func (ei extInfo) append(other extInfo, offset uint64) (extInfo, error) { Opaque: info.Opaque, }) } - return extInfo{ei.byteOrder, ei.recordSize, records}, nil + return extInfo{ei.recordSize, records}, nil } func (ei extInfo) MarshalBinary() ([]byte, error) { - if ei.byteOrder != internal.NativeEndian { - return nil, fmt.Errorf("%s is not the native byte order", ei.byteOrder) - } - if len(ei.records) == 0 { return nil, nil } @@ -205,7 +197,6 @@ func parseExtInfo(r io.Reader, bo binary.ByteOrder, strings stringTable) (map[st } result[secName] = extInfo{ - bo, recordSize, records, } diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/fuzz.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/fuzz.go index 220b285afe00..37e043fd378c 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/fuzz.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/fuzz.go @@ -1,4 +1,3 @@ -//go:build gofuzz // +build gofuzz // Use with https://github.com/dvyukov/go-fuzz diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/info.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/info.go deleted file mode 100644 index 6a9b5d2e0ba3..000000000000 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/info.go +++ /dev/null @@ -1,48 +0,0 @@ -package btf - -import ( - "bytes" - - "github.com/cilium/ebpf/internal" -) - -// info describes a BTF object. -type info struct { - BTF *Spec - ID ID - // Name is an identifying name for the BTF, currently only used by the - // kernel. - Name string - // KernelBTF is true if the BTf originated with the kernel and not - // userspace. - KernelBTF bool -} - -func newInfoFromFd(fd *internal.FD) (*info, error) { - // We invoke the syscall once with a empty BTF and name buffers to get size - // information to allocate buffers. Then we invoke it a second time with - // buffers to receive the data. - bpfInfo, err := bpfGetBTFInfoByFD(fd, nil, nil) - if err != nil { - return nil, err - } - - btfBuffer := make([]byte, bpfInfo.btfSize) - nameBuffer := make([]byte, bpfInfo.nameLen) - bpfInfo, err = bpfGetBTFInfoByFD(fd, btfBuffer, nameBuffer) - if err != nil { - return nil, err - } - - spec, err := loadRawSpec(bytes.NewReader(btfBuffer), internal.NativeEndian, nil, nil) - if err != nil { - return nil, err - } - - return &info{ - BTF: spec, - ID: ID(bpfInfo.id), - Name: internal.CString(nameBuffer), - KernelBTF: bpfInfo.kernelBTF != 0, - }, nil -} diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/strings.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/strings.go index 9876aa227c0a..8782643a043e 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/strings.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/strings.go @@ -5,12 +5,13 @@ import ( "errors" "fmt" "io" + "io/ioutil" ) type stringTable []byte func readStringTable(r io.Reader) (stringTable, error) { - contents, err := io.ReadAll(r) + contents, err := ioutil.ReadAll(r) if err != nil { return nil, fmt.Errorf("can't read string table: %v", err) } @@ -52,3 +53,8 @@ func (st stringTable) Lookup(offset uint32) (string, error) { return string(str[:end]), nil } + +func (st stringTable) LookupName(offset uint32) (Name, error) { + str, err := st.Lookup(offset) + return Name(str), err +} diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/syscalls.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/syscalls.go deleted file mode 100644 index a4f80abd011f..000000000000 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/syscalls.go +++ /dev/null @@ -1,31 +0,0 @@ -package btf - -import ( - "fmt" - "unsafe" - - "github.com/cilium/ebpf/internal" -) - -type bpfBTFInfo struct { - btf internal.Pointer - btfSize uint32 - id uint32 - name internal.Pointer - nameLen uint32 - kernelBTF uint32 -} - -func bpfGetBTFInfoByFD(fd *internal.FD, btf, name []byte) (*bpfBTFInfo, error) { - info := bpfBTFInfo{ - btf: internal.NewSlicePointer(btf), - btfSize: uint32(len(btf)), - name: internal.NewSlicePointer(name), - nameLen: uint32(len(name)), - } - if err := internal.BPFObjGetInfoByFD(fd, unsafe.Pointer(&info), unsafe.Sizeof(info)); err != nil { - return nil, fmt.Errorf("can't get program info: %w", err) - } - - return &info, nil -} diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/types.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/types.go index 5c8e7c6e59da..62aa31bcd781 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/types.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/btf/types.go @@ -30,26 +30,27 @@ type Type interface { walk(*typeDeque) } -// NamedType is a type with a name. -type NamedType interface { +// namedType is a type with a name. +// +// Most named types simply embed Name. +type namedType interface { Type + name() string + essentialName() string +} + +// Name identifies a type. +// +// Anonymous types have an empty name. +type Name string - // Name of the type, empty for anonymous types. - TypeName() string +func (n Name) name() string { + return string(n) } -var ( - _ NamedType = (*Int)(nil) - _ NamedType = (*Struct)(nil) - _ NamedType = (*Union)(nil) - _ NamedType = (*Enum)(nil) - _ NamedType = (*Fwd)(nil) - _ NamedType = (*Func)(nil) - _ NamedType = (*Typedef)(nil) - _ NamedType = (*Var)(nil) - _ NamedType = (*Datasec)(nil) - _ NamedType = (*Float)(nil) -) +func (n Name) essentialName() string { + return essentialName(string(n)) +} // Void is the unit type of BTF. type Void struct{} @@ -71,17 +72,19 @@ const ( // Int is an integer of a given length. type Int struct { TypeID - Name string + Name // The size of the integer in bytes. Size uint32 Encoding IntEncoding - // OffsetBits is the starting bit offset. Currently always 0. + // Offset is the starting bit offset. Currently always 0. // See https://www.kernel.org/doc/html/latest/bpf/btf.html#btf-kind-int - OffsetBits uint32 - Bits byte + Offset uint32 + Bits byte } +var _ namedType = (*Int)(nil) + func (i *Int) String() string { var s strings.Builder @@ -107,16 +110,15 @@ func (i *Int) String() string { return s.String() } -func (i *Int) TypeName() string { return i.Name } -func (i *Int) size() uint32 { return i.Size } -func (i *Int) walk(*typeDeque) {} +func (i *Int) size() uint32 { return i.Size } +func (i *Int) walk(*typeDeque) {} func (i *Int) copy() Type { cpy := *i return &cpy } func (i *Int) isBitfield() bool { - return i.OffsetBits > 0 + return i.Offset > 0 } // Pointer is a pointer to another type. @@ -156,7 +158,7 @@ func (arr *Array) copy() Type { // Struct is a compound type of consecutive members. type Struct struct { TypeID - Name string + Name // The size of the struct including padding, in bytes Size uint32 Members []Member @@ -166,8 +168,6 @@ func (s *Struct) String() string { return fmt.Sprintf("struct#%d[%q]", s.TypeID, s.Name) } -func (s *Struct) TypeName() string { return s.Name } - func (s *Struct) size() uint32 { return s.Size } func (s *Struct) walk(tdq *typeDeque) { @@ -189,7 +189,7 @@ func (s *Struct) members() []Member { // Union is a compound type where members occupy the same memory. type Union struct { TypeID - Name string + Name // The size of the union including padding, in bytes. Size uint32 Members []Member @@ -199,8 +199,6 @@ func (u *Union) String() string { return fmt.Sprintf("union#%d[%q]", u.TypeID, u.Name) } -func (u *Union) TypeName() string { return u.Name } - func (u *Union) size() uint32 { return u.Size } func (u *Union) walk(tdq *typeDeque) { @@ -238,17 +236,17 @@ var ( // // It is not a valid Type. type Member struct { - Name string + Name Type Type - // OffsetBits is the bit offset of this member. - OffsetBits uint32 + // Offset is the bit offset of this member + Offset uint32 BitfieldSize uint32 } // Enum lists possible values. type Enum struct { TypeID - Name string + Name Values []EnumValue } @@ -256,13 +254,11 @@ func (e *Enum) String() string { return fmt.Sprintf("enum#%d[%q]", e.TypeID, e.Name) } -func (e *Enum) TypeName() string { return e.Name } - // EnumValue is part of an Enum // // Is is not a valid Type type EnumValue struct { - Name string + Name Value int32 } @@ -298,7 +294,7 @@ func (fk FwdKind) String() string { // Fwd is a forward declaration of a Type. type Fwd struct { TypeID - Name string + Name Kind FwdKind } @@ -306,8 +302,6 @@ func (f *Fwd) String() string { return fmt.Sprintf("fwd#%d[%s %q]", f.TypeID, f.Kind, f.Name) } -func (f *Fwd) TypeName() string { return f.Name } - func (f *Fwd) walk(*typeDeque) {} func (f *Fwd) copy() Type { cpy := *f @@ -317,7 +311,7 @@ func (f *Fwd) copy() Type { // Typedef is an alias of a Type. type Typedef struct { TypeID - Name string + Name Type Type } @@ -325,8 +319,6 @@ func (td *Typedef) String() string { return fmt.Sprintf("typedef#%d[%q #%d]", td.TypeID, td.Name, td.Type.ID()) } -func (td *Typedef) TypeName() string { return td.Name } - func (td *Typedef) walk(tdq *typeDeque) { tdq.push(&td.Type) } func (td *Typedef) copy() Type { cpy := *td @@ -387,7 +379,7 @@ func (r *Restrict) copy() Type { // Func is a function definition. type Func struct { TypeID - Name string + Name Type Type Linkage FuncLinkage } @@ -396,8 +388,6 @@ func (f *Func) String() string { return fmt.Sprintf("func#%d[%s %q proto=#%d]", f.TypeID, f.Linkage, f.Name, f.Type.ID()) } -func (f *Func) TypeName() string { return f.Name } - func (f *Func) walk(tdq *typeDeque) { tdq.push(&f.Type) } func (f *Func) copy() Type { cpy := *f @@ -436,14 +426,14 @@ func (fp *FuncProto) copy() Type { } type FuncParam struct { - Name string + Name Type Type } // Var is a global variable. type Var struct { TypeID - Name string + Name Type Type Linkage VarLinkage } @@ -452,8 +442,6 @@ func (v *Var) String() string { return fmt.Sprintf("var#%d[%s %q]", v.TypeID, v.Linkage, v.Name) } -func (v *Var) TypeName() string { return v.Name } - func (v *Var) walk(tdq *typeDeque) { tdq.push(&v.Type) } func (v *Var) copy() Type { cpy := *v @@ -463,7 +451,7 @@ func (v *Var) copy() Type { // Datasec is a global program section containing data. type Datasec struct { TypeID - Name string + Name Size uint32 Vars []VarSecinfo } @@ -472,8 +460,6 @@ func (ds *Datasec) String() string { return fmt.Sprintf("section#%d[%q]", ds.TypeID, ds.Name) } -func (ds *Datasec) TypeName() string { return ds.Name } - func (ds *Datasec) size() uint32 { return ds.Size } func (ds *Datasec) walk(tdq *typeDeque) { @@ -489,7 +475,7 @@ func (ds *Datasec) copy() Type { return &cpy } -// VarSecinfo describes variable in a Datasec. +// VarSecinfo describes variable in a Datasec // // It is not a valid Type. type VarSecinfo struct { @@ -498,27 +484,6 @@ type VarSecinfo struct { Size uint32 } -// Float is a float of a given length. -type Float struct { - TypeID - Name string - - // The size of the float in bytes. - Size uint32 -} - -func (f *Float) String() string { - return fmt.Sprintf("float%d#%d[%q]", f.Size*8, f.TypeID, f.Name) -} - -func (f *Float) TypeName() string { return f.Name } -func (f *Float) size() uint32 { return f.Size } -func (f *Float) walk(*typeDeque) {} -func (f *Float) copy() Type { - cpy := *f - return &cpy -} - type sizer interface { size() uint32 } @@ -600,36 +565,14 @@ func Sizeof(typ Type) (int, error) { // // Returns any errors from transform verbatim. func copyType(typ Type, transform func(Type) (Type, error)) (Type, error) { - copies := make(copier) - return typ, copies.copy(&typ, transform) -} - -// copy a slice of Types recursively. -// -// Types may form a cycle. -// -// Returns any errors from transform verbatim. -func copyTypes(types []Type, transform func(Type) (Type, error)) ([]Type, error) { - result := make([]Type, len(types)) - copy(result, types) - - copies := make(copier) - for i := range result { - if err := copies.copy(&result[i], transform); err != nil { - return nil, err - } - } - - return result, nil -} - -type copier map[Type]Type + var ( + copies = make(map[Type]Type) + work typeDeque + ) -func (c copier) copy(typ *Type, transform func(Type) (Type, error)) error { - var work typeDeque - for t := typ; t != nil; t = work.pop() { + for t := &typ; t != nil; t = work.pop() { // *t is the identity of the type. - if cpy := c[*t]; cpy != nil { + if cpy := copies[*t]; cpy != nil { *t = cpy continue } @@ -638,21 +581,21 @@ func (c copier) copy(typ *Type, transform func(Type) (Type, error)) error { if transform != nil { tf, err := transform(*t) if err != nil { - return fmt.Errorf("copy %s: %w", *t, err) + return nil, fmt.Errorf("copy %s: %w", typ, err) } cpy = tf.copy() } else { cpy = (*t).copy() } - c[*t] = cpy + copies[*t] = cpy *t = cpy // Mark any nested types for copying. cpy.walk(&work) } - return nil + return typ, nil } // typeDeque keeps track of pointers to types which still @@ -663,10 +606,6 @@ type typeDeque struct { mask uint64 } -func (dq *typeDeque) empty() bool { - return dq.read == dq.write -} - // push adds a type to the stack. func (dq *typeDeque) push(t *Type) { if dq.write-dq.read < uint64(len(dq.types)) { @@ -693,7 +632,7 @@ func (dq *typeDeque) push(t *Type) { // shift returns the first element or null. func (dq *typeDeque) shift() *Type { - if dq.empty() { + if dq.read == dq.write { return nil } @@ -706,7 +645,7 @@ func (dq *typeDeque) shift() *Type { // pop returns the last element or null. func (dq *typeDeque) pop() *Type { - if dq.empty() { + if dq.read == dq.write { return nil } @@ -735,7 +674,7 @@ func (dq *typeDeque) all() []*Type { // Returns a map of named types (so, where NameOff is non-zero) and a slice of types // indexed by TypeID. Since BTF ignores compilation units, multiple types may share // the same name. A Type may form a cyclic graph by pointing at itself. -func inflateRawTypes(rawTypes []rawType, rawStrings stringTable) (types []Type, namedTypes map[string][]NamedType, err error) { +func inflateRawTypes(rawTypes []rawType, rawStrings stringTable) (types []Type, namedTypes map[string][]namedType, err error) { type fixupDef struct { id TypeID expectedKind btfKind @@ -752,17 +691,17 @@ func inflateRawTypes(rawTypes []rawType, rawStrings stringTable) (types []Type, // work, since otherwise append might re-allocate members. members := make([]Member, 0, len(raw)) for i, btfMember := range raw { - name, err := rawStrings.Lookup(btfMember.NameOff) + name, err := rawStrings.LookupName(btfMember.NameOff) if err != nil { return nil, fmt.Errorf("can't get name for member %d: %w", i, err) } m := Member{ - Name: name, - OffsetBits: btfMember.Offset, + Name: name, + Offset: btfMember.Offset, } if kindFlag { m.BitfieldSize = btfMember.Offset >> 24 - m.OffsetBits &= 0xffffff + m.Offset &= 0xffffff } members = append(members, m) } @@ -774,7 +713,7 @@ func inflateRawTypes(rawTypes []rawType, rawStrings stringTable) (types []Type, types = make([]Type, 0, len(rawTypes)) types = append(types, (*Void)(nil)) - namedTypes = make(map[string][]NamedType) + namedTypes = make(map[string][]namedType) for i, raw := range rawTypes { var ( @@ -784,7 +723,7 @@ func inflateRawTypes(rawTypes []rawType, rawStrings stringTable) (types []Type, typ Type ) - name, err := rawStrings.Lookup(raw.NameOff) + name, err := rawStrings.LookupName(raw.NameOff) if err != nil { return nil, nil, fmt.Errorf("get name for type id %d: %w", id, err) } @@ -826,7 +765,7 @@ func inflateRawTypes(rawTypes []rawType, rawStrings stringTable) (types []Type, rawvals := raw.data.([]btfEnum) vals := make([]EnumValue, 0, len(rawvals)) for i, btfVal := range rawvals { - name, err := rawStrings.Lookup(btfVal.NameOff) + name, err := rawStrings.LookupName(btfVal.NameOff) if err != nil { return nil, nil, fmt.Errorf("get name for enum value %d: %s", i, err) } @@ -873,7 +812,7 @@ func inflateRawTypes(rawTypes []rawType, rawStrings stringTable) (types []Type, rawparams := raw.data.([]btfParam) params := make([]FuncParam, 0, len(rawparams)) for i, param := range rawparams { - name, err := rawStrings.Lookup(param.NameOff) + name, err := rawStrings.LookupName(param.NameOff) if err != nil { return nil, nil, fmt.Errorf("get name for func proto parameter %d: %s", i, err) } @@ -909,17 +848,14 @@ func inflateRawTypes(rawTypes []rawType, rawStrings stringTable) (types []Type, } typ = &Datasec{id, name, raw.SizeType, vars} - case kindFloat: - typ = &Float{id, name, raw.Size()} - default: return nil, nil, fmt.Errorf("type id %d: unknown kind: %v", id, raw.Kind()) } types = append(types, typ) - if named, ok := typ.(NamedType); ok { - if name := essentialName(named.TypeName()); name != "" { + if named, ok := typ.(namedType); ok { + if name := essentialName(named.name()); name != "" { namedTypes[name] = append(namedTypes[name], named) } } diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/cpu.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/cpu.go index 3affa1efb9db..d3424ba4345d 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/cpu.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/cpu.go @@ -2,7 +2,7 @@ package internal import ( "fmt" - "os" + "io/ioutil" "strings" "sync" ) @@ -24,7 +24,7 @@ func PossibleCPUs() (int, error) { } func parseCPUsFromFile(path string) (int, error) { - spec, err := os.ReadFile(path) + spec, err := ioutil.ReadFile(path) if err != nil { return 0, err } diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/ptr_32_be.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/ptr_32_be.go index 8c114ddf4763..a56fbcc8e01b 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/ptr_32_be.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/ptr_32_be.go @@ -1,4 +1,3 @@ -//go:build armbe || mips || mips64p32 // +build armbe mips mips64p32 package internal diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/ptr_32_le.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/ptr_32_le.go index e65a61e45d34..be2ecfca7313 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/ptr_32_le.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/ptr_32_le.go @@ -1,4 +1,3 @@ -//go:build 386 || amd64p32 || arm || mipsle || mips64p32le // +build 386 amd64p32 arm mipsle mips64p32le package internal diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/ptr_64.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/ptr_64.go index 71a3afe307b3..69452dceb9a0 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/ptr_64.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/ptr_64.go @@ -1,5 +1,5 @@ -//go:build !386 && !amd64p32 && !arm && !mipsle && !mips64p32le && !armbe && !mips && !mips64p32 -// +build !386,!amd64p32,!arm,!mipsle,!mips64p32le,!armbe,!mips,!mips64p32 +// +build !386,!amd64p32,!arm,!mipsle,!mips64p32le +// +build !armbe,!mips,!mips64p32 package internal diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/syscall.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/syscall.go index b75037bb9d68..b766e643e07a 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/syscall.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/syscall.go @@ -1,7 +1,6 @@ package internal import ( - "errors" "fmt" "path/filepath" "runtime" @@ -69,48 +68,6 @@ func BPF(cmd BPFCmd, attr unsafe.Pointer, size uintptr) (uintptr, error) { return r1, err } -type BPFProgLoadAttr struct { - ProgType uint32 - InsCount uint32 - Instructions Pointer - License Pointer - LogLevel uint32 - LogSize uint32 - LogBuf Pointer - KernelVersion uint32 // since 4.1 2541517c32be - ProgFlags uint32 // since 4.11 e07b98d9bffe - ProgName BPFObjName // since 4.15 067cae47771c - ProgIfIndex uint32 // since 4.15 1f6f4cb7ba21 - ExpectedAttachType uint32 // since 4.17 5e43f899b03a - ProgBTFFd uint32 - FuncInfoRecSize uint32 - FuncInfo Pointer - FuncInfoCnt uint32 - LineInfoRecSize uint32 - LineInfo Pointer - LineInfoCnt uint32 - AttachBTFID uint32 - AttachProgFd uint32 -} - -// BPFProgLoad wraps BPF_PROG_LOAD. -func BPFProgLoad(attr *BPFProgLoadAttr) (*FD, error) { - for { - fd, err := BPF(BPF_PROG_LOAD, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) - // As of ~4.20 the verifier can be interrupted by a signal, - // and returns EAGAIN in that case. - if errors.Is(err, unix.EAGAIN) { - continue - } - - if err != nil { - return nil, err - } - - return NewFD(uint32(fd)), nil - } -} - type BPFProgAttachAttr struct { TargetFd uint32 AttachBpfFd uint32 @@ -223,22 +180,6 @@ func BPFObjGetInfoByFD(fd *FD, info unsafe.Pointer, size uintptr) error { return nil } -type bpfGetFDByIDAttr struct { - id uint32 - next uint32 -} - -// BPFObjGetInfoByFD wraps BPF_*_GET_FD_BY_ID. -// -// Available from 4.13. -func BPFObjGetFDByID(cmd BPFCmd, id uint32) (*FD, error) { - attr := bpfGetFDByIDAttr{ - id: id, - } - ptr, err := BPF(cmd, unsafe.Pointer(&attr), unsafe.Sizeof(attr)) - return NewFD(uint32(ptr)), err -} - // BPFObjName is a null-terminated string made up of // 'A-Za-z0-9_' characters. type BPFObjName [unix.BPF_OBJ_NAME_LEN]byte diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/unix/types_linux.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/unix/types_linux.go index 9aa70fa78c2a..0a18eaf0cf84 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/unix/types_linux.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/unix/types_linux.go @@ -1,4 +1,3 @@ -//go:build linux // +build linux package unix @@ -21,11 +20,10 @@ const ( EPERM = linux.EPERM ESRCH = linux.ESRCH ENODEV = linux.ENODEV - EBADF = linux.EBADF - E2BIG = linux.E2BIG // ENOTSUPP is not the same as ENOTSUP or EOPNOTSUP ENOTSUPP = syscall.Errno(0x20c) + EBADF = linux.EBADF BPF_F_NO_PREALLOC = linux.BPF_F_NO_PREALLOC BPF_F_NUMA_NODE = linux.BPF_F_NUMA_NODE BPF_F_RDONLY = linux.BPF_F_RDONLY @@ -37,9 +35,6 @@ const ( BPF_F_INNER_MAP = linux.BPF_F_INNER_MAP BPF_OBJ_NAME_LEN = linux.BPF_OBJ_NAME_LEN BPF_TAG_SIZE = linux.BPF_TAG_SIZE - BPF_RINGBUF_BUSY_BIT = linux.BPF_RINGBUF_BUSY_BIT - BPF_RINGBUF_DISCARD_BIT = linux.BPF_RINGBUF_DISCARD_BIT - BPF_RINGBUF_HDR_SZ = linux.BPF_RINGBUF_HDR_SZ SYS_BPF = linux.SYS_BPF F_DUPFD_CLOEXEC = linux.F_DUPFD_CLOEXEC EPOLL_CTL_ADD = linux.EPOLL_CTL_ADD @@ -74,6 +69,11 @@ type Statfs_t = linux.Statfs_t // Rlimit is a wrapper type Rlimit = linux.Rlimit +// Setrlimit is a wrapper +func Setrlimit(resource int, rlim *Rlimit) (err error) { + return linux.Setrlimit(resource, rlim) +} + // Syscall is a wrapper func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { return linux.Syscall(trap, a1, a2, a3) @@ -202,7 +202,3 @@ func KernelRelease() (string, error) { release := string(uname.Release[:end]) return release, nil } - -func Prlimit(pid, resource int, new, old *Rlimit) error { - return linux.Prlimit(pid, resource, new, old) -} diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/unix/types_other.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/unix/types_other.go index 4f50d896ebb8..1b06defc0a09 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/unix/types_other.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/unix/types_other.go @@ -1,4 +1,3 @@ -//go:build !linux // +build !linux package unix @@ -22,7 +21,6 @@ const ( ESRCH = syscall.ESRCH ENODEV = syscall.ENODEV EBADF = syscall.Errno(0) - E2BIG = syscall.Errno(0) // ENOTSUPP is not the same as ENOTSUP or EOPNOTSUP ENOTSUPP = syscall.Errno(0x20c) @@ -37,9 +35,6 @@ const ( BPF_F_INNER_MAP = 0 BPF_OBJ_NAME_LEN = 0x10 BPF_TAG_SIZE = 0x8 - BPF_RINGBUF_BUSY_BIT = 0 - BPF_RINGBUF_DISCARD_BIT = 0 - BPF_RINGBUF_HDR_SZ = 0 SYS_BPF = 321 F_DUPFD_CLOEXEC = 0x406 EPOLLIN = 0x1 @@ -91,6 +86,11 @@ type Rlimit struct { Max uint64 } +// Setrlimit is a wrapper +func Setrlimit(resource int, rlim *Rlimit) (err error) { + return errNonLinux +} + // Syscall is a wrapper func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { return 0, 0, syscall.Errno(1) @@ -261,7 +261,3 @@ func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags func KernelRelease() (string, error) { return "", errNonLinux } - -func Prlimit(pid, resource int, new, old *Rlimit) error { - return errNonLinux -} diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/version.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/version.go index 4915e583767a..1a678bfe6574 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/version.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/internal/version.go @@ -2,7 +2,7 @@ package internal import ( "fmt" - "os" + "io/ioutil" "regexp" "sync" @@ -109,7 +109,7 @@ func detectKernelVersion() (Version, error) { // Example format: Ubuntu 4.15.0-91.92-generic 4.15.18 // This method exists in the kernel itself, see d18acd15c // ("perf tools: Fix kernel version error in ubuntu"). - if pvs, err := os.ReadFile("/proc/version_signature"); err == nil { + if pvs, err := ioutil.ReadFile("/proc/version_signature"); err == nil { // If /proc/version_signature exists, failing to parse it is an error. // It only exists on Ubuntu, where the real patch level is not obtainable // through any other method. diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/link/freplace.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/link/freplace.go deleted file mode 100644 index a698e1a9d30c..000000000000 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/link/freplace.go +++ /dev/null @@ -1,88 +0,0 @@ -package link - -import ( - "fmt" - - "github.com/cilium/ebpf" - "github.com/cilium/ebpf/internal/btf" -) - -type FreplaceLink struct { - RawLink -} - -// AttachFreplace attaches the given eBPF program to the function it replaces. -// -// The program and name can either be provided at link time, or can be provided -// at program load time. If they were provided at load time, they should be nil -// and empty respectively here, as they will be ignored by the kernel. -// Examples: -// -// AttachFreplace(dispatcher, "function", replacement) -// AttachFreplace(nil, "", replacement) -func AttachFreplace(targetProg *ebpf.Program, name string, prog *ebpf.Program) (*FreplaceLink, error) { - if (name == "") != (targetProg == nil) { - return nil, fmt.Errorf("must provide both or neither of name and targetProg: %w", errInvalidInput) - } - if prog == nil { - return nil, fmt.Errorf("prog cannot be nil: %w", errInvalidInput) - } - if prog.Type() != ebpf.Extension { - return nil, fmt.Errorf("eBPF program type %s is not an Extension: %w", prog.Type(), errInvalidInput) - } - - var ( - target int - typeID btf.TypeID - ) - if targetProg != nil { - info, err := targetProg.Info() - if err != nil { - return nil, err - } - btfID, ok := info.BTFID() - if !ok { - return nil, fmt.Errorf("could not get BTF ID for program %s: %w", info.Name, errInvalidInput) - } - btfHandle, err := btf.NewHandleFromID(btfID) - if err != nil { - return nil, err - } - defer btfHandle.Close() - - var function *btf.Func - if err := btfHandle.Spec().FindType(name, &function); err != nil { - return nil, err - } - - target = targetProg.FD() - typeID = function.ID() - } - - link, err := AttachRawLink(RawLinkOptions{ - Target: target, - Program: prog, - Attach: ebpf.AttachNone, - BTF: typeID, - }) - if err != nil { - return nil, err - } - - return &FreplaceLink{*link}, nil -} - -// Update implements the Link interface. -func (f *FreplaceLink) Update(new *ebpf.Program) error { - return fmt.Errorf("freplace update: %w", ErrNotSupported) -} - -// LoadPinnedFreplace loads a pinned iterator from a bpffs. -func LoadPinnedFreplace(fileName string, opts *ebpf.LoadPinOptions) (*FreplaceLink, error) { - link, err := LoadPinnedRawLink(fileName, TracingType, opts) - if err != nil { - return nil, err - } - - return &FreplaceLink{*link}, err -} diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/link/kprobe.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/link/kprobe.go index b6577b5a9925..ea71d6d608a8 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/link/kprobe.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/link/kprobe.go @@ -5,6 +5,7 @@ import ( "crypto/rand" "errors" "fmt" + "io/ioutil" "os" "path/filepath" "runtime" @@ -71,11 +72,10 @@ func (pt probeType) RetprobeBit() (uint64, error) { // given kernel symbol starts executing. See /proc/kallsyms for available // symbols. For example, printk(): // -// kp, err := Kprobe("printk", prog) +// Kprobe("printk", prog) // -// Losing the reference to the resulting Link (kp) will close the Kprobe -// and prevent further execution of prog. The Link must be Closed during -// program shutdown to avoid leaking system resources. +// The resulting Link must be Closed during program shutdown to avoid leaking +// system resources. func Kprobe(symbol string, prog *ebpf.Program) (Link, error) { k, err := kprobe(symbol, prog, false) if err != nil { @@ -95,11 +95,10 @@ func Kprobe(symbol string, prog *ebpf.Program) (Link, error) { // before the given kernel symbol exits, with the function stack left intact. // See /proc/kallsyms for available symbols. For example, printk(): // -// kp, err := Kretprobe("printk", prog) +// Kretprobe("printk", prog) // -// Losing the reference to the resulting Link (kp) will close the Kretprobe -// and prevent further execution of prog. The Link must be Closed during -// program shutdown to avoid leaking system resources. +// The resulting Link must be Closed during program shutdown to avoid leaking +// system resources. func Kretprobe(symbol string, prog *ebpf.Program) (Link, error) { k, err := kprobe(symbol, prog, true) if err != nil { @@ -158,7 +157,7 @@ func kprobe(symbol string, prog *ebpf.Program, ret bool) (*perfEvent, error) { // pmuKprobe opens a perf event based on the kprobe PMU. // Returns os.ErrNotExist if the given symbol does not exist in the kernel. func pmuKprobe(symbol string, ret bool) (*perfEvent, error) { - return pmuProbe(kprobeType, symbol, "", 0, perfAllThreads, ret) + return pmuProbe(kprobeType, symbol, "", 0, ret) } // pmuProbe opens a perf event based on a Performance Monitoring Unit. @@ -168,7 +167,7 @@ func pmuKprobe(symbol string, ret bool) (*perfEvent, error) { // 33ea4b24277b "perf/core: Implement the 'perf_uprobe' PMU" // // Returns ErrNotSupported if the kernel doesn't support perf_[k,u]probe PMU -func pmuProbe(typ probeType, symbol, path string, offset uint64, pid int, ret bool) (*perfEvent, error) { +func pmuProbe(typ probeType, symbol, path string, offset uint64, ret bool) (*perfEvent, error) { // Getting the PMU type will fail if the kernel doesn't support // the perf_[k,u]probe PMU. et, err := getPMUEventType(typ) @@ -192,7 +191,7 @@ func pmuProbe(typ probeType, symbol, path string, offset uint64, pid int, ret bo switch typ { case kprobeType: // Create a pointer to a NUL-terminated string for the kernel. - sp, err = unsafeStringPtr(symbol) + sp, err := unsafeStringPtr(symbol) if err != nil { return nil, err } @@ -203,7 +202,7 @@ func pmuProbe(typ probeType, symbol, path string, offset uint64, pid int, ret bo Config: config, // Retprobe flag } case uprobeType: - sp, err = unsafeStringPtr(path) + sp, err := unsafeStringPtr(path) if err != nil { return nil, err } @@ -221,7 +220,7 @@ func pmuProbe(typ probeType, symbol, path string, offset uint64, pid int, ret bo } } - fd, err := unix.PerfEventOpen(&attr, pid, 0, -1, unix.PERF_FLAG_FD_CLOEXEC) + fd, err := unix.PerfEventOpen(&attr, perfAllThreads, 0, -1, unix.PERF_FLAG_FD_CLOEXEC) // Since commit 97c753e62e6c, ENOENT is correctly returned instead of EINVAL // when trying to create a kretprobe for a missing symbol. Make sure ENOENT @@ -229,11 +228,6 @@ func pmuProbe(typ probeType, symbol, path string, offset uint64, pid int, ret bo if errors.Is(err, os.ErrNotExist) || errors.Is(err, unix.EINVAL) { return nil, fmt.Errorf("symbol '%s' not found: %w", symbol, os.ErrNotExist) } - // Since at least commit cb9a19fe4aa51, ENOTSUPP is returned - // when attempting to set a uprobe on a trap instruction. - if errors.Is(err, unix.ENOTSUPP) { - return nil, fmt.Errorf("failed setting uprobe on offset %#x (possible trap insn): %w", offset, err) - } if err != nil { return nil, fmt.Errorf("opening perf event: %w", err) } @@ -252,7 +246,7 @@ func pmuProbe(typ probeType, symbol, path string, offset uint64, pid int, ret bo // tracefsKprobe creates a Kprobe tracefs entry. func tracefsKprobe(symbol string, ret bool) (*perfEvent, error) { - return tracefsProbe(kprobeType, symbol, "", 0, perfAllThreads, ret) + return tracefsProbe(kprobeType, symbol, "", 0, ret) } // tracefsProbe creates a trace event by writing an entry to /[k,u]probe_events. @@ -261,7 +255,7 @@ func tracefsKprobe(symbol string, ret bool) (*perfEvent, error) { // Path and offset are only set in the case of uprobe(s) and are used to set // the executable/library path on the filesystem and the offset where the probe is inserted. // A perf event is then opened on the newly-created trace event and returned to the caller. -func tracefsProbe(typ probeType, symbol, path string, offset uint64, pid int, ret bool) (*perfEvent, error) { +func tracefsProbe(typ probeType, symbol, path string, offset uint64, ret bool) (*perfEvent, error) { // Generate a random string for each trace event we attempt to create. // This value is used as the 'group' token in tracefs to allow creating // multiple kprobe trace events with the same name. @@ -294,7 +288,7 @@ func tracefsProbe(typ probeType, symbol, path string, offset uint64, pid int, re } // Kprobes are ephemeral tracepoints and share the same perf event type. - fd, err := openTracepointPerfEvent(tid, pid) + fd, err := openTracepointPerfEvent(tid) if err != nil { return nil, err } @@ -419,7 +413,7 @@ func probePrefix(ret bool) string { func determineRetprobeBit(typ probeType) (uint64, error) { p := filepath.Join("/sys/bus/event_source/devices/", typ.String(), "/format/retprobe") - data, err := os.ReadFile(p) + data, err := ioutil.ReadFile(p) if err != nil { return 0, err } diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/link/link.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/link/link.go index 4926584696bb..16cfff415dd4 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/link/link.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/link/link.go @@ -6,7 +6,6 @@ import ( "github.com/cilium/ebpf" "github.com/cilium/ebpf/internal" - "github.com/cilium/ebpf/internal/btf" ) var ErrNotSupported = internal.ErrNotSupported @@ -30,8 +29,8 @@ type Link interface { // Close frees resources. // - // The link will be broken unless it has been successfully pinned. - // A link may continue past the lifetime of the process if Close is + // The link will be broken unless it has been pinned. A link + // may continue past the lifetime of the process if Close is // not called. Close() error @@ -50,8 +49,6 @@ type RawLinkOptions struct { Program *ebpf.Program // Attach must match the attach type of Program. Attach ebpf.AttachType - // BTF is the BTF of the attachment target. - BTF btf.TypeID } // RawLinkInfo contains metadata on a link. @@ -86,10 +83,9 @@ func AttachRawLink(opts RawLinkOptions) (*RawLink, error) { } attr := bpfLinkCreateAttr{ - targetFd: uint32(opts.Target), - progFd: uint32(progFd), - attachType: opts.Attach, - targetBTFID: uint32(opts.BTF), + targetFd: uint32(opts.Target), + progFd: uint32(progFd), + attachType: opts.Attach, } fd, err := bpfLinkCreate(&attr) if err != nil { diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/link/perf_event.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/link/perf_event.go index 7e0443a75cb0..5267a47ec9bb 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/link/perf_event.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/link/perf_event.go @@ -4,6 +4,7 @@ import ( "bytes" "errors" "fmt" + "io/ioutil" "os" "path/filepath" "regexp" @@ -235,7 +236,7 @@ func getPMUEventType(typ probeType) (uint64, error) { // openTracepointPerfEvent opens a tracepoint-type perf event. System-wide // [k,u]probes created by writing to /[k,u]probe_events are tracepoints // behind the scenes, and can be attached to using these perf events. -func openTracepointPerfEvent(tid uint64, pid int) (*internal.FD, error) { +func openTracepointPerfEvent(tid uint64) (*internal.FD, error) { attr := unix.PerfEventAttr{ Type: unix.PERF_TYPE_TRACEPOINT, Config: tid, @@ -244,7 +245,7 @@ func openTracepointPerfEvent(tid uint64, pid int) (*internal.FD, error) { Wakeup: 1, } - fd, err := unix.PerfEventOpen(&attr, pid, 0, -1, unix.PERF_FLAG_FD_CLOEXEC) + fd, err := unix.PerfEventOpen(&attr, perfAllThreads, 0, -1, unix.PERF_FLAG_FD_CLOEXEC) if err != nil { return nil, fmt.Errorf("opening tracepoint perf event: %w", err) } @@ -262,7 +263,7 @@ func uint64FromFile(base string, path ...string) (uint64, error) { return 0, fmt.Errorf("path '%s' attempts to escape base path '%s': %w", l, base, errInvalidInput) } - data, err := os.ReadFile(p) + data, err := ioutil.ReadFile(p) if err != nil { return 0, fmt.Errorf("reading file %s: %w", p, err) } diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/link/syscalls.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/link/syscalls.go index a61499438b22..30e8a8805072 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/link/syscalls.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/link/syscalls.go @@ -88,11 +88,10 @@ var haveProgAttachReplace = internal.FeatureTest("BPF_PROG_ATTACH atomic replace }) type bpfLinkCreateAttr struct { - progFd uint32 - targetFd uint32 - attachType ebpf.AttachType - flags uint32 - targetBTFID uint32 + progFd uint32 + targetFd uint32 + attachType ebpf.AttachType + flags uint32 } func bpfLinkCreate(attr *bpfLinkCreateAttr) (*internal.FD, error) { diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/link/tracepoint.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/link/tracepoint.go index 7423df86b137..b8ae04bf0a05 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/link/tracepoint.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/link/tracepoint.go @@ -11,11 +11,7 @@ import ( // tracepoints. The top-level directory is the group, the event's subdirectory // is the name. Example: // -// tp, err := Tracepoint("syscalls", "sys_enter_fork", prog) -// -// Losing the reference to the resulting Link (tp) will close the Tracepoint -// and prevent further execution of prog. The Link must be Closed during -// program shutdown to avoid leaking system resources. +// Tracepoint("syscalls", "sys_enter_fork", prog) // // Note that attaching eBPF programs to syscalls (sys_enter_*/sys_exit_*) is // only possible as of kernel 4.14 (commit cf5f5ce). @@ -38,7 +34,7 @@ func Tracepoint(group, name string, prog *ebpf.Program) (Link, error) { return nil, err } - fd, err := openTracepointPerfEvent(tid, perfAllThreads) + fd, err := openTracepointPerfEvent(tid) if err != nil { return nil, err } diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/link/uprobe.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/link/uprobe.go index 59170ce0468d..2bc395ee3cd2 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/link/uprobe.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/link/uprobe.go @@ -25,18 +25,14 @@ var ( value uint64 err error }{} - - // ErrNoSymbol indicates that the given symbol was not found - // in the ELF symbols table. - ErrNoSymbol = errors.New("not found") ) // Executable defines an executable program on the filesystem. type Executable struct { // Path of the executable on the filesystem. path string - // Parsed ELF symbols and dynamic symbols offsets. - offsets map[string]uint64 + // Parsed ELF symbols and dynamic symbols. + symbols map[string]elf.Symbol } // UprobeOptions defines additional parameters that will be used @@ -45,9 +41,6 @@ type UprobeOptions struct { // Symbol offset. Must be provided in case of external symbols (shared libs). // If set, overrides the offset eventually parsed from the executable. Offset uint64 - // Only set the uprobe on the given process ID. Useful when tracing - // shared library calls or programs that have many running instances. - PID int } // To open a new Executable, use: @@ -71,84 +64,42 @@ func OpenExecutable(path string) (*Executable, error) { return nil, fmt.Errorf("parse ELF file: %w", err) } - if se.Type != elf.ET_EXEC && se.Type != elf.ET_DYN { - // ELF is not an executable or a shared object. - return nil, errors.New("the given file is not an executable or a shared object") - } - - ex := Executable{ + var ex = Executable{ path: path, - offsets: make(map[string]uint64), + symbols: make(map[string]elf.Symbol), + } + if err := ex.addSymbols(se.Symbols); err != nil { + return nil, err } - if err := ex.load(se); err != nil { + if err := ex.addSymbols(se.DynamicSymbols); err != nil { return nil, err } return &ex, nil } -func (ex *Executable) load(f *internal.SafeELFFile) error { - syms, err := f.Symbols() +func (ex *Executable) addSymbols(f func() ([]elf.Symbol, error)) error { + // elf.Symbols and elf.DynamicSymbols return ErrNoSymbols if the section is not found. + syms, err := f() if err != nil && !errors.Is(err, elf.ErrNoSymbols) { return err } - - dynsyms, err := f.DynamicSymbols() - if err != nil && !errors.Is(err, elf.ErrNoSymbols) { - return err - } - - syms = append(syms, dynsyms...) - for _, s := range syms { if elf.ST_TYPE(s.Info) != elf.STT_FUNC { // Symbol not associated with a function or other executable code. continue } - - off := s.Value - - // Loop over ELF segments. - for _, prog := range f.Progs { - // Skip uninteresting segments. - if prog.Type != elf.PT_LOAD || (prog.Flags&elf.PF_X) == 0 { - continue - } - - if prog.Vaddr <= s.Value && s.Value < (prog.Vaddr+prog.Memsz) { - // If the symbol value is contained in the segment, calculate - // the symbol offset. - // - // fn symbol offset = fn symbol VA - .text VA + .text offset - // - // stackoverflow.com/a/40249502 - off = s.Value - prog.Vaddr + prog.Off - break - } - } - - ex.offsets[s.Name] = off + ex.symbols[s.Name] = s } - return nil } -func (ex *Executable) offset(symbol string) (uint64, error) { - if off, ok := ex.offsets[symbol]; ok { - // Symbols with location 0 from section undef are shared library calls and - // are relocated before the binary is executed. Dynamic linking is not - // implemented by the library, so mark this as unsupported for now. - // - // Since only offset values are stored and not elf.Symbol, if the value is 0, - // assume it's an external symbol. - if off == 0 { - return 0, fmt.Errorf("cannot resolve %s library call '%s', "+ - "consider providing the offset via options: %w", ex.path, symbol, ErrNotSupported) - } - return off, nil +func (ex *Executable) symbol(symbol string) (*elf.Symbol, error) { + if s, ok := ex.symbols[symbol]; ok { + return &s, nil } - return 0, fmt.Errorf("symbol %s: %w", symbol, ErrNoSymbol) + return nil, fmt.Errorf("symbol %s not found", symbol) } // Uprobe attaches the given eBPF program to a perf event that fires when the @@ -161,14 +112,11 @@ func (ex *Executable) offset(symbol string) (uint64, error) { // When using symbols which belongs to shared libraries, // an offset must be provided via options: // -// up, err := ex.Uprobe("main", prog, &UprobeOptions{Offset: 0x123}) -// -// Losing the reference to the resulting Link (up) will close the Uprobe -// and prevent further execution of prog. The Link must be Closed during -// program shutdown to avoid leaking system resources. +// ex.Uprobe("main", prog, &UprobeOptions{Offset: 0x123}) // -// Functions provided by shared libraries can currently not be traced and -// will result in an ErrNotSupported. +// The resulting Link must be Closed during program shutdown to avoid leaking +// system resources. Functions provided by shared libraries can currently not +// be traced and will result in an ErrNotSupported. func (ex *Executable) Uprobe(symbol string, prog *ebpf.Program, opts *UprobeOptions) (Link, error) { u, err := ex.uprobe(symbol, prog, opts, false) if err != nil { @@ -193,14 +141,11 @@ func (ex *Executable) Uprobe(symbol string, prog *ebpf.Program, opts *UprobeOpti // When using symbols which belongs to shared libraries, // an offset must be provided via options: // -// up, err := ex.Uretprobe("main", prog, &UprobeOptions{Offset: 0x123}) -// -// Losing the reference to the resulting Link (up) will close the Uprobe -// and prevent further execution of prog. The Link must be Closed during -// program shutdown to avoid leaking system resources. +// ex.Uretprobe("main", prog, &UprobeOptions{Offset: 0x123}) // -// Functions provided by shared libraries can currently not be traced and -// will result in an ErrNotSupported. +// The resulting Link must be Closed during program shutdown to avoid leaking +// system resources. Functions provided by shared libraries can currently not +// be traced and will result in an ErrNotSupported. func (ex *Executable) Uretprobe(symbol string, prog *ebpf.Program, opts *UprobeOptions) (Link, error) { u, err := ex.uprobe(symbol, prog, opts, true) if err != nil { @@ -230,20 +175,24 @@ func (ex *Executable) uprobe(symbol string, prog *ebpf.Program, opts *UprobeOpti if opts != nil && opts.Offset != 0 { offset = opts.Offset } else { - off, err := ex.offset(symbol) + sym, err := ex.symbol(symbol) if err != nil { - return nil, err + return nil, fmt.Errorf("symbol '%s' not found: %w", symbol, err) + } + + // Symbols with location 0 from section undef are shared library calls and + // are relocated before the binary is executed. Dynamic linking is not + // implemented by the library, so mark this as unsupported for now. + if sym.Section == elf.SHN_UNDEF && sym.Value == 0 { + return nil, fmt.Errorf("cannot resolve %s library call '%s', "+ + "consider providing the offset via options: %w", ex.path, symbol, ErrNotSupported) } - offset = off - } - pid := perfAllThreads - if opts != nil && opts.PID != 0 { - pid = opts.PID + offset = sym.Value } // Use uprobe PMU if the kernel has it available. - tp, err := pmuUprobe(symbol, ex.path, offset, pid, ret) + tp, err := pmuUprobe(symbol, ex.path, offset, ret) if err == nil { return tp, nil } @@ -252,7 +201,7 @@ func (ex *Executable) uprobe(symbol string, prog *ebpf.Program, opts *UprobeOpti } // Use tracefs if uprobe PMU is missing. - tp, err = tracefsUprobe(uprobeSanitizedSymbol(symbol), ex.path, offset, pid, ret) + tp, err = tracefsUprobe(uprobeSanitizedSymbol(symbol), ex.path, offset, ret) if err != nil { return nil, fmt.Errorf("creating trace event '%s:%s' in tracefs: %w", ex.path, symbol, err) } @@ -261,13 +210,13 @@ func (ex *Executable) uprobe(symbol string, prog *ebpf.Program, opts *UprobeOpti } // pmuUprobe opens a perf event based on the uprobe PMU. -func pmuUprobe(symbol, path string, offset uint64, pid int, ret bool) (*perfEvent, error) { - return pmuProbe(uprobeType, symbol, path, offset, pid, ret) +func pmuUprobe(symbol, path string, offset uint64, ret bool) (*perfEvent, error) { + return pmuProbe(uprobeType, symbol, path, offset, ret) } // tracefsUprobe creates a Uprobe tracefs entry. -func tracefsUprobe(symbol, path string, offset uint64, pid int, ret bool) (*perfEvent, error) { - return tracefsProbe(uprobeType, symbol, path, offset, pid, ret) +func tracefsUprobe(symbol, path string, offset uint64, ret bool) (*perfEvent, error) { + return tracefsProbe(uprobeType, symbol, path, offset, ret) } // uprobeSanitizedSymbol replaces every invalid characted for the tracefs api with an underscore. diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/linker.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/linker.go index f3b1629e70a8..6c2efef9e42c 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/linker.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/linker.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/cilium/ebpf/asm" + "github.com/cilium/ebpf/internal/btf" ) // link resolves bpf-to-bpf calls. @@ -39,7 +40,7 @@ func link(prog *ProgramSpec, libs []*ProgramSpec) error { pending = append(pending, lib.Instructions) if prog.BTF != nil && lib.BTF != nil { - if err := prog.BTF.Append(lib.BTF); err != nil { + if err := btf.ProgramAppend(prog.BTF, lib.BTF); err != nil { return fmt.Errorf("linking BTF of %s: %w", lib.Name, err) } } @@ -135,25 +136,5 @@ func fixupJumpsAndCalls(insns asm.Instructions) error { } } - // fixupBPFCalls replaces bpf_probe_read_{kernel,user}[_str] with bpf_probe_read[_str] on older kernels - // https://github.com/libbpf/libbpf/blob/master/src/libbpf.c#L6009 - iter = insns.Iterate() - for iter.Next() { - ins := iter.Ins - if !ins.IsBuiltinCall() { - continue - } - switch asm.BuiltinFunc(ins.Constant) { - case asm.FnProbeReadKernel, asm.FnProbeReadUser: - if err := haveProbeReadKernel(); err != nil { - ins.Constant = int64(asm.FnProbeRead) - } - case asm.FnProbeReadKernelStr, asm.FnProbeReadUserStr: - if err := haveProbeReadKernel(); err != nil { - ins.Constant = int64(asm.FnProbeReadStr) - } - } - } - return nil } diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/map.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/map.go index cca387ead019..f257d88c03e3 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/map.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/map.go @@ -1,7 +1,6 @@ package ebpf import ( - "bytes" "errors" "fmt" "io" @@ -66,11 +65,6 @@ type MapSpec struct { // InnerMap is used as a template for ArrayOfMaps and HashOfMaps InnerMap *MapSpec - // Extra trailing bytes found in the ELF map definition when using structs - // larger than libbpf's bpf_map_def. Must be empty before instantiating - // the MapSpec into a Map. - Extra bytes.Reader - // The BTF associated with this map. BTF *btf.Map } @@ -88,12 +82,9 @@ func (ms *MapSpec) Copy() *MapSpec { } cpy := *ms - cpy.Contents = make([]MapKV, len(ms.Contents)) copy(cpy.Contents, ms.Contents) - cpy.InnerMap = ms.InnerMap.Copy() - return &cpy } @@ -197,24 +188,14 @@ func NewMap(spec *MapSpec) (*Map, error) { // // The caller is responsible for ensuring the process' rlimit is set // sufficiently high for locking memory during map creation. This can be done -// by calling rlimit.RemoveMemlock() prior to calling NewMapWithOptions. +// by calling unix.Setrlimit with unix.RLIMIT_MEMLOCK prior to calling NewMapWithOptions. // // May return an error wrapping ErrMapIncompatible. func NewMapWithOptions(spec *MapSpec, opts MapOptions) (*Map, error) { handles := newHandleCache() defer handles.close() - m, err := newMapWithOptions(spec, opts, handles) - if err != nil { - return nil, fmt.Errorf("creating map: %w", err) - } - - err = m.finalize(spec) - if err != nil { - return nil, fmt.Errorf("populating map: %w", err) - } - - return m, nil + return newMapWithOptions(spec, opts, handles) } func newMapWithOptions(spec *MapSpec, opts MapOptions, handles *handleCache) (_ *Map, err error) { @@ -226,12 +207,8 @@ func newMapWithOptions(spec *MapSpec, opts MapOptions, handles *handleCache) (_ switch spec.Pinning { case PinByName: - if spec.Name == "" { - return nil, fmt.Errorf("pin by name: missing Name") - } - - if opts.PinPath == "" { - return nil, fmt.Errorf("pin by name: missing MapOptions.PinPath") + if spec.Name == "" || opts.PinPath == "" { + return nil, fmt.Errorf("pin by name: missing Name or PinPath") } path := filepath.Join(opts.PinPath, spec.Name) @@ -267,19 +244,16 @@ func newMapWithOptions(spec *MapSpec, opts MapOptions, handles *handleCache) (_ return nil, errors.New("inner maps cannot be pinned") } - template, err := spec.InnerMap.createMap(nil, opts, handles) + template, err := createMap(spec.InnerMap, nil, opts, handles) if err != nil { - return nil, fmt.Errorf("inner map: %w", err) + return nil, err } defer template.Close() - // Intentionally skip populating and freezing (finalizing) - // the inner map template since it will be removed shortly. - innerFd = template.fd } - m, err := spec.createMap(innerFd, opts, handles) + m, err := createMap(spec, innerFd, opts, handles) if err != nil { return nil, err } @@ -295,9 +269,7 @@ func newMapWithOptions(spec *MapSpec, opts MapOptions, handles *handleCache) (_ return m, nil } -// createMap validates the spec's properties and creates the map in the kernel -// using the given opts. It does not populate or freeze the map. -func (spec *MapSpec) createMap(inner *internal.FD, opts MapOptions, handles *handleCache) (_ *Map, err error) { +func createMap(spec *MapSpec, inner *internal.FD, opts MapOptions, handles *handleCache) (_ *Map, err error) { closeOnError := func(closer io.Closer) { if err != nil { closer.Close() @@ -306,16 +278,10 @@ func (spec *MapSpec) createMap(inner *internal.FD, opts MapOptions, handles *han spec = spec.Copy() - // Kernels 4.13 through 5.4 used a struct bpf_map_def that contained - // additional 'inner_map_idx' and later 'numa_node' fields. - // In order to support loading these definitions, tolerate the presence of - // extra bytes, but require them to be zeroes. - if _, err := io.Copy(internal.DiscardZeroes{}, &spec.Extra); err != nil { - return nil, errors.New("extra contains unhandled non-zero bytes, drain before creating map") - } - switch spec.Type { - case ArrayOfMaps, HashOfMaps: + case ArrayOfMaps: + fallthrough + case HashOfMaps: if err := haveNestedMaps(); err != nil { return nil, err } @@ -384,7 +350,7 @@ func (spec *MapSpec) createMap(inner *internal.FD, opts MapOptions, handles *han var btfDisabled bool if spec.BTF != nil { - handle, err := handles.btfHandle(spec.BTF.Spec) + handle, err := handles.btfHandle(btf.MapSpec(spec.BTF)) btfDisabled = errors.Is(err, btf.ErrNotSupported) if err != nil && !btfDisabled { return nil, fmt.Errorf("load BTF: %w", err) @@ -392,15 +358,15 @@ func (spec *MapSpec) createMap(inner *internal.FD, opts MapOptions, handles *han if handle != nil { attr.BTFFd = uint32(handle.FD()) - attr.BTFKeyTypeID = uint32(spec.BTF.Key.ID()) - attr.BTFValueTypeID = uint32(spec.BTF.Value.ID()) + attr.BTFKeyTypeID = uint32(btf.MapKey(spec.BTF).ID()) + attr.BTFValueTypeID = uint32(btf.MapValue(spec.BTF).ID()) } } fd, err := internal.BPFMapCreate(&attr) if err != nil { if errors.Is(err, unix.EPERM) { - return nil, fmt.Errorf("map create: %w (MEMLOCK bay be too low, consider rlimit.RemoveMemlock)", err) + return nil, fmt.Errorf("map create: RLIMIT_MEMLOCK may be too low: %w", err) } if btfDisabled { return nil, fmt.Errorf("map create without BTF: %w", err) @@ -414,11 +380,19 @@ func (spec *MapSpec) createMap(inner *internal.FD, opts MapOptions, handles *han return nil, fmt.Errorf("map create: %w", err) } + if err := m.populate(spec.Contents); err != nil { + return nil, fmt.Errorf("map create: can't set initial contents: %w", err) + } + + if spec.Freeze { + if err := m.Freeze(); err != nil { + return nil, fmt.Errorf("can't freeze map: %w", err) + } + } + return m, nil } -// newMap allocates and returns a new Map structure. -// Sets the fullValueSize on per-CPU maps. func newMap(fd *internal.FD, name string, typ MapType, keySize, valueSize, maxEntries, flags uint32) (*Map, error) { m := &Map{ name, @@ -441,7 +415,7 @@ func newMap(fd *internal.FD, name string, typ MapType, keySize, valueSize, maxEn return nil, err } - m.fullValueSize = internal.Align(int(valueSize), 8) * possibleCPUs + m.fullValueSize = align(int(valueSize), 8) * possibleCPUs return m, nil } @@ -918,21 +892,12 @@ func (m *Map) Freeze() error { return nil } -// finalize populates the Map according to the Contents specified -// in spec and freezes the Map if requested by spec. -func (m *Map) finalize(spec *MapSpec) error { - for _, kv := range spec.Contents { +func (m *Map) populate(contents []MapKV) error { + for _, kv := range contents { if err := m.Put(kv.Key, kv.Value); err != nil { - return fmt.Errorf("putting value: key %v: %w", kv.Key, err) + return fmt.Errorf("key %v: %w", kv.Key, err) } } - - if spec.Freeze { - if err := m.Freeze(); err != nil { - return fmt.Errorf("freezing map: %w", err) - } - } - return nil } @@ -1247,7 +1212,7 @@ func MapGetNextID(startID MapID) (MapID, error) { // // Returns ErrNotExist, if there is no eBPF map with the given id. func NewMapFromID(id MapID) (*Map, error) { - fd, err := internal.BPFObjGetFDByID(internal.BPF_MAP_GET_FD_BY_ID, uint32(id)) + fd, err := bpfObjGetFDByID(internal.BPF_MAP_GET_FD_BY_ID, uint32(id)) if err != nil { return nil, err } diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/marshalers.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/marshalers.go index e461d673d701..f2610eff9c78 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/marshalers.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/marshalers.go @@ -8,7 +8,6 @@ import ( "fmt" "reflect" "runtime" - "sync" "unsafe" "github.com/cilium/ebpf/internal" @@ -40,10 +39,6 @@ func marshalPtr(data interface{}, length int) (internal.Pointer, error) { // Returns an error if the given value isn't representable in exactly // length bytes. func marshalBytes(data interface{}, length int) (buf []byte, err error) { - if data == nil { - return nil, errors.New("can't marshal a nil value") - } - switch value := data.(type) { case encoding.BinaryMarshaler: buf, err = value.MarshalBinary() @@ -82,30 +77,22 @@ func makeBuffer(dst interface{}, length int) (internal.Pointer, []byte) { return internal.NewSlicePointer(buf), buf } -var bytesReaderPool = sync.Pool{ - New: func() interface{} { - return new(bytes.Reader) - }, -} - // unmarshalBytes converts a byte buffer into an arbitrary value. // // Prefer using Map.unmarshalKey and Map.unmarshalValue if possible, since // those have special cases that allow more types to be encoded. -// -// The common int32 and int64 types are directly handled to avoid -// unnecessary heap allocations as happening in the default case. func unmarshalBytes(data interface{}, buf []byte) error { switch value := data.(type) { case unsafe.Pointer: - var dst []byte - // Use unsafe.Slice when we drop support for pre1.17 (https://github.com/golang/go/issues/19367) - // We could opt for removing unsafe.Pointer support in the lib as well - sh := (*reflect.SliceHeader)(unsafe.Pointer(&dst)) - sh.Data = uintptr(value) - sh.Len = len(buf) - sh.Cap = len(buf) + // This could be solved in Go 1.17 by unsafe.Slice instead. (https://github.com/golang/go/issues/19367) + // We could opt for removing unsafe.Pointer support in the lib as well. + sh := &reflect.SliceHeader{ //nolint:govet + Data: uintptr(value), + Len: len(buf), + Cap: len(buf), + } + dst := *(*[]byte)(unsafe.Pointer(sh)) copy(dst, buf) runtime.KeepAlive(value) return nil @@ -119,38 +106,12 @@ func unmarshalBytes(data interface{}, buf []byte) error { case *[]byte: *value = buf return nil - case *int32: - if len(buf) < 4 { - return errors.New("int32 requires 4 bytes") - } - *value = int32(internal.NativeEndian.Uint32(buf)) - return nil - case *uint32: - if len(buf) < 4 { - return errors.New("uint32 requires 4 bytes") - } - *value = internal.NativeEndian.Uint32(buf) - return nil - case *int64: - if len(buf) < 8 { - return errors.New("int64 requires 8 bytes") - } - *value = int64(internal.NativeEndian.Uint64(buf)) - return nil - case *uint64: - if len(buf) < 8 { - return errors.New("uint64 requires 8 bytes") - } - *value = internal.NativeEndian.Uint64(buf) - return nil case string: return errors.New("require pointer to string") case []byte: return errors.New("require pointer to []byte") default: - rd := bytesReaderPool.Get().(*bytes.Reader) - rd.Reset(buf) - defer bytesReaderPool.Put(rd) + rd := bytes.NewReader(buf) if err := binary.Read(rd, internal.NativeEndian, value); err != nil { return fmt.Errorf("decoding %T: %v", value, err) } @@ -181,7 +142,7 @@ func marshalPerCPUValue(slice interface{}, elemLength int) (internal.Pointer, er return internal.Pointer{}, fmt.Errorf("per-CPU value exceeds number of CPUs") } - alignedElemLength := internal.Align(elemLength, 8) + alignedElemLength := align(elemLength, 8) buf := make([]byte, alignedElemLength*possibleCPUs) for i := 0; i < sliceLen; i++ { @@ -251,3 +212,7 @@ func unmarshalPerCPUValue(slicePtr interface{}, elemLength int, buf []byte) erro reflect.ValueOf(slicePtr).Elem().Set(slice) return nil } + +func align(n, alignment int) int { + return (int(n) + alignment - 1) / alignment * alignment +} diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/prog.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/prog.go index 3549a3fe3f0c..13bdb6ddad1e 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/prog.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/prog.go @@ -57,21 +57,16 @@ type ProgramSpec struct { // Name is passed to the kernel as a debug aid. Must only contain // alpha numeric and '_' characters. Name string - // Type determines at which hook in the kernel a program will run. Type ProgramType AttachType AttachType - // Name of a kernel data structure or function to attach to. Its - // interpretation depends on Type and AttachType. - AttachTo string - // The program to attach to. Must be provided manually. - AttachTarget *Program + // Name of a kernel data structure to attach to. It's interpretation + // depends on Type and AttachType. + AttachTo string Instructions asm.Instructions - // Flags is passed to the kernel and specifies additional program // load attributes. Flags uint32 - // License of the program. Some helpers are only available if // the license is deemed compatible with the GPL. // @@ -151,7 +146,7 @@ func NewProgramWithOptions(spec *ProgramSpec, opts ProgramOptions) (*Program, er func newProgramWithOptions(spec *ProgramSpec, opts ProgramOptions, handles *handleCache) (*Program, error) { if len(spec.Instructions) == 0 { - return nil, errors.New("instructions cannot be empty") + return nil, errors.New("Instructions cannot be empty") } if spec.ByteOrder != nil && spec.ByteOrder != internal.NativeEndian { @@ -171,16 +166,16 @@ func newProgramWithOptions(spec *ProgramSpec, opts ProgramOptions, handles *hand kv = v.Kernel() } - attr := &internal.BPFProgLoadAttr{ - ProgType: uint32(spec.Type), - ProgFlags: spec.Flags, - ExpectedAttachType: uint32(spec.AttachType), - License: internal.NewStringPointer(spec.License), - KernelVersion: kv, + attr := &bpfProgLoadAttr{ + progType: spec.Type, + progFlags: spec.Flags, + expectedAttachType: spec.AttachType, + license: internal.NewStringPointer(spec.License), + kernelVersion: kv, } if haveObjName() == nil { - attr.ProgName = internal.NewBPFObjName(spec.Name) + attr.progName = internal.NewBPFObjName(spec.Name) } var err error @@ -195,35 +190,35 @@ func newProgramWithOptions(spec *ProgramSpec, opts ProgramOptions, handles *hand var btfDisabled bool var core btf.COREFixups if spec.BTF != nil { - core, err = spec.BTF.Fixups(targetBTF) + core, err = btf.ProgramFixups(spec.BTF, targetBTF) if err != nil { return nil, fmt.Errorf("CO-RE relocations: %w", err) } - handle, err := handles.btfHandle(spec.BTF.Spec()) + handle, err := handles.btfHandle(btf.ProgramSpec(spec.BTF)) btfDisabled = errors.Is(err, btf.ErrNotSupported) if err != nil && !btfDisabled { return nil, fmt.Errorf("load BTF: %w", err) } if handle != nil { - attr.ProgBTFFd = uint32(handle.FD()) + attr.progBTFFd = uint32(handle.FD()) - recSize, bytes, err := spec.BTF.LineInfos() + recSize, bytes, err := btf.ProgramLineInfos(spec.BTF) if err != nil { return nil, fmt.Errorf("get BTF line infos: %w", err) } - attr.LineInfoRecSize = recSize - attr.LineInfoCnt = uint32(uint64(len(bytes)) / uint64(recSize)) - attr.LineInfo = internal.NewSlicePointer(bytes) + attr.lineInfoRecSize = recSize + attr.lineInfoCnt = uint32(uint64(len(bytes)) / uint64(recSize)) + attr.lineInfo = internal.NewSlicePointer(bytes) - recSize, bytes, err = spec.BTF.FuncInfos() + recSize, bytes, err = btf.ProgramFuncInfos(spec.BTF) if err != nil { return nil, fmt.Errorf("get BTF function infos: %w", err) } - attr.FuncInfoRecSize = recSize - attr.FuncInfoCnt = uint32(uint64(len(bytes)) / uint64(recSize)) - attr.FuncInfo = internal.NewSlicePointer(bytes) + attr.funcInfoRecSize = recSize + attr.funcInfoCnt = uint32(uint64(len(bytes)) / uint64(recSize)) + attr.funcInfo = internal.NewSlicePointer(bytes) } } @@ -243,41 +238,16 @@ func newProgramWithOptions(spec *ProgramSpec, opts ProgramOptions, handles *hand } bytecode := buf.Bytes() - attr.Instructions = internal.NewSlicePointer(bytecode) - attr.InsCount = uint32(len(bytecode) / asm.InstructionSize) + attr.instructions = internal.NewSlicePointer(bytecode) + attr.insCount = uint32(len(bytecode) / asm.InstructionSize) if spec.AttachTo != "" { - if spec.AttachTarget != nil { - info, err := spec.AttachTarget.Info() - if err != nil { - return nil, fmt.Errorf("load target BTF: %w", err) - } - - btfID, ok := info.BTFID() - if !ok { - return nil, fmt.Errorf("load target BTF: no BTF info available") - } - btfHandle, err := btf.NewHandleFromID(btfID) - if err != nil { - return nil, fmt.Errorf("load target BTF: %w", err) - } - defer btfHandle.Close() - - targetBTF = btfHandle.Spec() - if err != nil { - return nil, fmt.Errorf("load target BTF: %w", err) - } - } - target, err := resolveBTFType(targetBTF, spec.AttachTo, spec.Type, spec.AttachType) if err != nil { return nil, err } if target != nil { - attr.AttachBTFID = uint32(target.ID()) - } - if spec.AttachTarget != nil { - attr.AttachProgFd = uint32(spec.AttachTarget.FD()) + attr.attachBTFID = target.ID() } } @@ -289,12 +259,12 @@ func newProgramWithOptions(spec *ProgramSpec, opts ProgramOptions, handles *hand var logBuf []byte if opts.LogLevel > 0 { logBuf = make([]byte, logSize) - attr.LogLevel = opts.LogLevel - attr.LogSize = uint32(len(logBuf)) - attr.LogBuf = internal.NewSlicePointer(logBuf) + attr.logLevel = opts.LogLevel + attr.logSize = uint32(len(logBuf)) + attr.logBuf = internal.NewSlicePointer(logBuf) } - fd, err := internal.BPFProgLoad(attr) + fd, err := bpfProgLoad(attr) if err == nil { return &Program{internal.CString(logBuf), fd, spec.Name, "", spec.Type}, nil } @@ -303,20 +273,17 @@ func newProgramWithOptions(spec *ProgramSpec, opts ProgramOptions, handles *hand if opts.LogLevel == 0 && opts.LogSize >= 0 { // Re-run with the verifier enabled to get better error messages. logBuf = make([]byte, logSize) - attr.LogLevel = 1 - attr.LogSize = uint32(len(logBuf)) - attr.LogBuf = internal.NewSlicePointer(logBuf) + attr.logLevel = 1 + attr.logSize = uint32(len(logBuf)) + attr.logBuf = internal.NewSlicePointer(logBuf) - fd, logErr = internal.BPFProgLoad(attr) - if logErr == nil { - fd.Close() - } + _, logErr = bpfProgLoad(attr) } if errors.Is(logErr, unix.EPERM) && logBuf[0] == 0 { // EPERM due to RLIMIT_MEMLOCK happens before the verifier, so we can // check that the log is empty to reduce false positives. - return nil, fmt.Errorf("load program: %w (MEMLOCK bay be too low, consider rlimit.RemoveMemlock)", logErr) + return nil, fmt.Errorf("load program: RLIMIT_MEMLOCK may be too low: %w", logErr) } err = internal.ErrorWithLog(err, logBuf, logErr) @@ -343,7 +310,7 @@ func NewProgramFromFD(fd int) (*Program, error) { // // Returns ErrNotExist, if there is no eBPF program with the given id. func NewProgramFromID(id ProgramID) (*Program, error) { - fd, err := internal.BPFObjGetFDByID(internal.BPF_PROG_GET_FD_BY_ID, uint32(id)) + fd, err := bpfObjGetFDByID(internal.BPF_PROG_GET_FD_BY_ID, uint32(id)) if err != nil { return nil, fmt.Errorf("get program by id: %w", err) } @@ -710,44 +677,45 @@ func ProgramGetNextID(startID ProgramID) (ProgramID, error) { // // Deprecated: use ProgramInfo.ID() instead. func (p *Program) ID() (ProgramID, error) { - info, err := bpfGetProgInfoByFD(p.fd, nil) + info, err := bpfGetProgInfoByFD(p.fd) if err != nil { return ProgramID(0), err } return ProgramID(info.id), nil } -func resolveBTFType(spec *btf.Spec, name string, progType ProgramType, attachType AttachType) (btf.Type, error) { +func resolveBTFType(kernel *btf.Spec, name string, progType ProgramType, attachType AttachType) (btf.Type, error) { type match struct { p ProgramType a AttachType } + var target btf.Type var typeName, featureName string switch (match{progType, attachType}) { case match{LSM, AttachLSMMac}: + target = new(btf.Func) typeName = "bpf_lsm_" + name featureName = name + " LSM hook" + case match{Tracing, AttachTraceIter}: + target = new(btf.Func) typeName = "bpf_iter_" + name featureName = name + " iterator" - case match{Extension, AttachNone}: - typeName = name - featureName = fmt.Sprintf("freplace %s", name) + default: return nil, nil } - if spec == nil { + if kernel == nil { var err error - spec, err = btf.LoadKernelSpec() + kernel, err = btf.LoadKernelSpec() if err != nil { return nil, fmt.Errorf("load kernel spec: %w", err) } } - var target *btf.Func - err := spec.FindType(typeName, &target) + err := kernel.FindType(typeName, target) if errors.Is(err, btf.ErrNotFound) { return nil, &internal.UnsupportedFeatureError{ Name: featureName, @@ -756,6 +724,5 @@ func resolveBTFType(spec *btf.Spec, name string, progType ProgramType, attachTyp if err != nil { return nil, fmt.Errorf("resolve BTF for %s: %w", featureName, err) } - return target, nil } diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/run-tests.sh b/cluster-autoscaler/vendor/github.com/cilium/ebpf/run-tests.sh index a079edc7e18c..e2437beed2a5 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/run-tests.sh +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/run-tests.sh @@ -5,7 +5,7 @@ # Run all tests on a 5.4 kernel # $ ./run-tests.sh 5.4 # Run a subset of tests: -# $ ./run-tests.sh 5.4 ./link +# $ ./run-tests.sh 5.4 go test ./link set -euo pipefail @@ -48,17 +48,15 @@ if [[ "${1:-}" = "--exec-vm" ]]; then rm "${output}/fake-stdin" fi - if ! $sudo virtme-run --kimg "${input}/bzImage" --memory 768M --pwd \ - --rwdir="${testdir}=${testdir}" \ - --rodir=/run/input="${input}" \ - --rwdir=/run/output="${output}" \ - --script-sh "PATH=\"$PATH\" \"$script\" --exec-test $cmd" \ - --kopt possible_cpus=2; then # need at least two CPUs for some tests - exit 23 - fi + $sudo virtme-run --kimg "${input}/bzImage" --memory 768M --pwd \ + --rwdir="${testdir}=${testdir}" \ + --rodir=/run/input="${input}" \ + --rwdir=/run/output="${output}" \ + --script-sh "PATH=\"$PATH\" \"$script\" --exec-test $cmd" \ + --qemu-opts -smp 2 # need at least two CPUs for some tests if [[ ! -e "${output}/success" ]]; then - exit 42 + exit 1 fi $sudo rm -r "$output" @@ -76,7 +74,7 @@ elif [[ "${1:-}" = "--exec-test" ]]; then dmesg -C if ! "$@"; then dmesg - exit 1 # this return code is "swallowed" by qemu + exit 1 fi touch "/run/output/success" exit 0 @@ -110,7 +108,7 @@ else echo "No selftests found, disabling" fi -args=(-short -coverpkg=./... -coverprofile=coverage.out -count 1 ./...) +args=(-v -short -coverpkg=./... -coverprofile=coverage.out -count 1 ./...) if (( $# > 0 )); then args=("$@") fi diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/syscalls.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/syscalls.go index f8cb5f0e0cd6..f5a38549bb7c 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/syscalls.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/syscalls.go @@ -1,14 +1,13 @@ package ebpf import ( - "bytes" "errors" "fmt" "os" "unsafe" - "github.com/cilium/ebpf/asm" "github.com/cilium/ebpf/internal" + "github.com/cilium/ebpf/internal/btf" "github.com/cilium/ebpf/internal/unix" ) @@ -74,6 +73,30 @@ type bpfMapInfo struct { btf_value_type_id uint32 } +type bpfProgLoadAttr struct { + progType ProgramType + insCount uint32 + instructions internal.Pointer + license internal.Pointer + logLevel uint32 + logSize uint32 + logBuf internal.Pointer + kernelVersion uint32 // since 4.1 2541517c32be + progFlags uint32 // since 4.11 e07b98d9bffe + progName internal.BPFObjName // since 4.15 067cae47771c + progIfIndex uint32 // since 4.15 1f6f4cb7ba21 + expectedAttachType AttachType // since 4.17 5e43f899b03a + progBTFFd uint32 + funcInfoRecSize uint32 + funcInfo internal.Pointer + funcInfoCnt uint32 + lineInfoRecSize uint32 + lineInfo internal.Pointer + lineInfoCnt uint32 + attachBTFID btf.TypeID + attachProgFd uint32 +} + type bpfProgInfo struct { prog_type uint32 id uint32 @@ -84,7 +107,7 @@ type bpfProgInfo struct { xlated_prog_insns internal.Pointer load_time uint64 // since 4.15 cb4d2b3f03d8 created_by_uid uint32 - nr_map_ids uint32 // since 4.15 cb4d2b3f03d8 + nr_map_ids uint32 map_ids internal.Pointer name internal.BPFObjName // since 4.15 067cae47771c ifindex uint32 @@ -122,6 +145,11 @@ type bpfProgTestRunAttr struct { duration uint32 } +type bpfGetFDByIDAttr struct { + id uint32 + next uint32 +} + type bpfMapFreezeAttr struct { mapFd uint32 } @@ -132,6 +160,23 @@ type bpfObjGetNextIDAttr struct { openFlags uint32 } +func bpfProgLoad(attr *bpfProgLoadAttr) (*internal.FD, error) { + for { + fd, err := internal.BPF(internal.BPF_PROG_LOAD, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) + // As of ~4.20 the verifier can be interrupted by a signal, + // and returns EAGAIN in that case. + if errors.Is(err, unix.EAGAIN) { + continue + } + + if err != nil { + return nil, err + } + + return internal.NewFD(uint32(fd)), nil + } +} + func bpfProgTestRun(attr *bpfProgTestRunAttr) error { _, err := internal.BPF(internal.BPF_PROG_TEST_RUN, unsafe.Pointer(attr), unsafe.Sizeof(*attr)) return err @@ -327,10 +372,6 @@ func wrapMapError(err error) error { return internal.SyscallError(ErrNotSupported, unix.ENOTSUPP) } - if errors.Is(err, unix.E2BIG) { - return fmt.Errorf("key too big for map: %w", err) - } - return err } @@ -347,13 +388,8 @@ func bpfMapFreeze(m *internal.FD) error { return err } -func bpfGetProgInfoByFD(fd *internal.FD, ids []MapID) (*bpfProgInfo, error) { +func bpfGetProgInfoByFD(fd *internal.FD) (*bpfProgInfo, error) { var info bpfProgInfo - if len(ids) > 0 { - info.nr_map_ids = uint32(len(ids)) - info.map_ids = internal.NewPointer(unsafe.Pointer(&ids[0])) - } - if err := internal.BPFObjGetInfoByFD(fd, unsafe.Pointer(&info), unsafe.Sizeof(info)); err != nil { return nil, fmt.Errorf("can't get program info: %w", err) } @@ -435,30 +471,10 @@ var haveBatchAPI = internal.FeatureTest("map batch api", "5.6", func() error { return nil }) -var haveProbeReadKernel = internal.FeatureTest("bpf_probe_read_kernel", "5.5", func() error { - insns := asm.Instructions{ - asm.Mov.Reg(asm.R1, asm.R10), - asm.Add.Imm(asm.R1, -8), - asm.Mov.Imm(asm.R2, 8), - asm.Mov.Imm(asm.R3, 0), - asm.FnProbeReadKernel.Call(), - asm.Return(), - } - buf := bytes.NewBuffer(make([]byte, 0, len(insns)*asm.InstructionSize)) - if err := insns.Marshal(buf, internal.NativeEndian); err != nil { - return err +func bpfObjGetFDByID(cmd internal.BPFCmd, id uint32) (*internal.FD, error) { + attr := bpfGetFDByIDAttr{ + id: id, } - bytecode := buf.Bytes() - - fd, err := internal.BPFProgLoad(&internal.BPFProgLoadAttr{ - ProgType: uint32(Kprobe), - License: internal.NewStringPointer("GPL"), - Instructions: internal.NewSlicePointer(bytecode), - InsCount: uint32(len(bytecode) / asm.InstructionSize), - }) - if err != nil { - return internal.ErrNotSupported - } - _ = fd.Close() - return nil -}) + ptr, err := internal.BPF(cmd, unsafe.Pointer(&attr), unsafe.Sizeof(attr)) + return internal.NewFD(uint32(ptr)), err +} diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/types.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/types.go index 84b83f9f9855..441a82fe4c1c 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/types.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/types.go @@ -4,17 +4,12 @@ import ( "github.com/cilium/ebpf/internal/unix" ) -//go:generate stringer -output types_string.go -type=MapType,ProgramType,PinType +//go:generate stringer -output types_string.go -type=MapType,ProgramType,AttachType,PinType // MapType indicates the type map structure // that will be initialized in the kernel. type MapType uint32 -// Max returns the latest supported MapType. -func (_ MapType) Max() MapType { - return maxMapType - 1 -} - // All the various map types that can be created const ( UnspecifiedMap MapType = iota @@ -90,28 +85,15 @@ const ( SkStorage // DevMapHash - Hash-based indexing scheme for references to network devices. DevMapHash - // StructOpsMap - This map holds a kernel struct with its function pointer implemented in a BPF - // program. - StructOpsMap - // RingBuf - Similar to PerfEventArray, but shared across all CPUs. + StructOpts RingBuf - // InodeStorage - Specialized local storage map for inodes. InodeStorage - // TaskStorage - Specialized local storage map for task_struct. TaskStorage - // maxMapType - Bound enum of MapTypes, has to be last in enum. - maxMapType ) -// Deprecated: StructOpts was a typo, use StructOpsMap instead. -// -// Declared as a variable to prevent stringer from picking it up -// as an enum value. -var StructOpts MapType = StructOpsMap - // hasPerCPUValue returns true if the Map stores a value per CPU. func (mt MapType) hasPerCPUValue() bool { - return mt == PerCPUHash || mt == PerCPUArray || mt == LRUCPUHash || mt == PerCPUCGroupStorage + return mt == PerCPUHash || mt == PerCPUArray || mt == LRUCPUHash } // canStoreMap returns true if the map type accepts a map fd @@ -129,11 +111,6 @@ func (mt MapType) canStoreProgram() bool { // ProgramType of the eBPF program type ProgramType uint32 -// Max return the latest supported ProgramType. -func (_ ProgramType) Max() ProgramType { - return maxProgramType - 1 -} - // eBPF program types const ( UnspecifiedProgram ProgramType = iota @@ -167,7 +144,6 @@ const ( Extension LSM SkLookup - maxProgramType ) // AttachType of the eBPF program, needed to differentiate allowed context accesses in @@ -175,8 +151,6 @@ const ( // Will cause invalid argument (EINVAL) at program load time if set incorrectly. type AttachType uint32 -//go:generate stringer -type AttachType -trimprefix Attach - // AttachNone is an alias for AttachCGroupInetIngress for readability reasons. const AttachNone AttachType = 0 @@ -219,10 +193,6 @@ const ( AttachXDPCPUMap AttachSkLookup AttachXDP - AttachSkSKBVerdict - AttachSkReuseportSelect - AttachSkReuseportSelectOrMigrate - AttachPerfEvent ) // AttachFlags of the eBPF program used in BPF_PROG_ATTACH command diff --git a/cluster-autoscaler/vendor/github.com/cilium/ebpf/types_string.go b/cluster-autoscaler/vendor/github.com/cilium/ebpf/types_string.go index 81cbc9efde0c..c25f7656479b 100644 --- a/cluster-autoscaler/vendor/github.com/cilium/ebpf/types_string.go +++ b/cluster-autoscaler/vendor/github.com/cilium/ebpf/types_string.go @@ -1,4 +1,4 @@ -// Code generated by "stringer -output types_string.go -type=MapType,ProgramType,PinType"; DO NOT EDIT. +// Code generated by "stringer -output types_string.go -type=MapType,ProgramType,AttachType,PinType"; DO NOT EDIT. package ebpf @@ -34,16 +34,15 @@ func _() { _ = x[Stack-23] _ = x[SkStorage-24] _ = x[DevMapHash-25] - _ = x[StructOpsMap-26] + _ = x[StructOpts-26] _ = x[RingBuf-27] _ = x[InodeStorage-28] _ = x[TaskStorage-29] - _ = x[maxMapType-30] } -const _MapType_name = "UnspecifiedMapHashArrayProgramArrayPerfEventArrayPerCPUHashPerCPUArrayStackTraceCGroupArrayLRUHashLRUCPUHashLPMTrieArrayOfMapsHashOfMapsDevMapSockMapCPUMapXSKMapSockHashCGroupStorageReusePortSockArrayPerCPUCGroupStorageQueueStackSkStorageDevMapHashStructOpsMapRingBufInodeStorageTaskStoragemaxMapType" +const _MapType_name = "UnspecifiedMapHashArrayProgramArrayPerfEventArrayPerCPUHashPerCPUArrayStackTraceCGroupArrayLRUHashLRUCPUHashLPMTrieArrayOfMapsHashOfMapsDevMapSockMapCPUMapXSKMapSockHashCGroupStorageReusePortSockArrayPerCPUCGroupStorageQueueStackSkStorageDevMapHashStructOptsRingBufInodeStorageTaskStorage" -var _MapType_index = [...]uint16{0, 14, 18, 23, 35, 49, 59, 70, 80, 91, 98, 108, 115, 126, 136, 142, 149, 155, 161, 169, 182, 200, 219, 224, 229, 238, 248, 260, 267, 279, 290, 300} +var _MapType_index = [...]uint16{0, 14, 18, 23, 35, 49, 59, 70, 80, 91, 98, 108, 115, 126, 136, 142, 149, 155, 161, 169, 182, 200, 219, 224, 229, 238, 248, 258, 265, 277, 288} func (i MapType) String() string { if i >= MapType(len(_MapType_index)-1) { @@ -86,12 +85,11 @@ func _() { _ = x[Extension-28] _ = x[LSM-29] _ = x[SkLookup-30] - _ = x[maxProgramType-31] } -const _ProgramType_name = "UnspecifiedProgramSocketFilterKprobeSchedCLSSchedACTTracePointXDPPerfEventCGroupSKBCGroupSockLWTInLWTOutLWTXmitSockOpsSkSKBCGroupDeviceSkMsgRawTracepointCGroupSockAddrLWTSeg6LocalLircMode2SkReuseportFlowDissectorCGroupSysctlRawTracepointWritableCGroupSockoptTracingStructOpsExtensionLSMSkLookupmaxProgramType" +const _ProgramType_name = "UnspecifiedProgramSocketFilterKprobeSchedCLSSchedACTTracePointXDPPerfEventCGroupSKBCGroupSockLWTInLWTOutLWTXmitSockOpsSkSKBCGroupDeviceSkMsgRawTracepointCGroupSockAddrLWTSeg6LocalLircMode2SkReuseportFlowDissectorCGroupSysctlRawTracepointWritableCGroupSockoptTracingStructOpsExtensionLSMSkLookup" -var _ProgramType_index = [...]uint16{0, 18, 30, 36, 44, 52, 62, 65, 74, 83, 93, 98, 104, 111, 118, 123, 135, 140, 153, 167, 179, 188, 199, 212, 224, 245, 258, 265, 274, 283, 286, 294, 308} +var _ProgramType_index = [...]uint16{0, 18, 30, 36, 44, 52, 62, 65, 74, 83, 93, 98, 104, 111, 118, 123, 135, 140, 153, 167, 179, 188, 199, 212, 224, 245, 258, 265, 274, 283, 286, 294} func (i ProgramType) String() string { if i >= ProgramType(len(_ProgramType_index)-1) { @@ -99,6 +97,61 @@ func (i ProgramType) String() string { } return _ProgramType_name[_ProgramType_index[i]:_ProgramType_index[i+1]] } +func _() { + // An "invalid array index" compiler error signifies that the constant values have changed. + // Re-run the stringer command to generate them again. + var x [1]struct{} + _ = x[AttachNone-0] + _ = x[AttachCGroupInetIngress-0] + _ = x[AttachCGroupInetEgress-1] + _ = x[AttachCGroupInetSockCreate-2] + _ = x[AttachCGroupSockOps-3] + _ = x[AttachSkSKBStreamParser-4] + _ = x[AttachSkSKBStreamVerdict-5] + _ = x[AttachCGroupDevice-6] + _ = x[AttachSkMsgVerdict-7] + _ = x[AttachCGroupInet4Bind-8] + _ = x[AttachCGroupInet6Bind-9] + _ = x[AttachCGroupInet4Connect-10] + _ = x[AttachCGroupInet6Connect-11] + _ = x[AttachCGroupInet4PostBind-12] + _ = x[AttachCGroupInet6PostBind-13] + _ = x[AttachCGroupUDP4Sendmsg-14] + _ = x[AttachCGroupUDP6Sendmsg-15] + _ = x[AttachLircMode2-16] + _ = x[AttachFlowDissector-17] + _ = x[AttachCGroupSysctl-18] + _ = x[AttachCGroupUDP4Recvmsg-19] + _ = x[AttachCGroupUDP6Recvmsg-20] + _ = x[AttachCGroupGetsockopt-21] + _ = x[AttachCGroupSetsockopt-22] + _ = x[AttachTraceRawTp-23] + _ = x[AttachTraceFEntry-24] + _ = x[AttachTraceFExit-25] + _ = x[AttachModifyReturn-26] + _ = x[AttachLSMMac-27] + _ = x[AttachTraceIter-28] + _ = x[AttachCgroupInet4GetPeername-29] + _ = x[AttachCgroupInet6GetPeername-30] + _ = x[AttachCgroupInet4GetSockname-31] + _ = x[AttachCgroupInet6GetSockname-32] + _ = x[AttachXDPDevMap-33] + _ = x[AttachCgroupInetSockRelease-34] + _ = x[AttachXDPCPUMap-35] + _ = x[AttachSkLookup-36] + _ = x[AttachXDP-37] +} + +const _AttachType_name = "AttachNoneAttachCGroupInetEgressAttachCGroupInetSockCreateAttachCGroupSockOpsAttachSkSKBStreamParserAttachSkSKBStreamVerdictAttachCGroupDeviceAttachSkMsgVerdictAttachCGroupInet4BindAttachCGroupInet6BindAttachCGroupInet4ConnectAttachCGroupInet6ConnectAttachCGroupInet4PostBindAttachCGroupInet6PostBindAttachCGroupUDP4SendmsgAttachCGroupUDP6SendmsgAttachLircMode2AttachFlowDissectorAttachCGroupSysctlAttachCGroupUDP4RecvmsgAttachCGroupUDP6RecvmsgAttachCGroupGetsockoptAttachCGroupSetsockoptAttachTraceRawTpAttachTraceFEntryAttachTraceFExitAttachModifyReturnAttachLSMMacAttachTraceIterAttachCgroupInet4GetPeernameAttachCgroupInet6GetPeernameAttachCgroupInet4GetSocknameAttachCgroupInet6GetSocknameAttachXDPDevMapAttachCgroupInetSockReleaseAttachXDPCPUMapAttachSkLookupAttachXDP" + +var _AttachType_index = [...]uint16{0, 10, 32, 58, 77, 100, 124, 142, 160, 181, 202, 226, 250, 275, 300, 323, 346, 361, 380, 398, 421, 444, 466, 488, 504, 521, 537, 555, 567, 582, 610, 638, 666, 694, 709, 736, 751, 765, 774} + +func (i AttachType) String() string { + if i >= AttachType(len(_AttachType_index)-1) { + return "AttachType(" + strconv.FormatInt(int64(i), 10) + ")" + } + return _AttachType_name[_AttachType_index[i]:_AttachType_index[i+1]] +} func _() { // An "invalid array index" compiler error signifies that the constant values have changed. // Re-run the stringer command to generate them again. diff --git a/cluster-autoscaler/vendor/github.com/containerd/console/console_windows.go b/cluster-autoscaler/vendor/github.com/containerd/console/console_windows.go index 787c11fe56fd..129a92883ddb 100644 --- a/cluster-autoscaler/vendor/github.com/containerd/console/console_windows.go +++ b/cluster-autoscaler/vendor/github.com/containerd/console/console_windows.go @@ -17,10 +17,10 @@ package console import ( - "errors" "fmt" "os" + "github.com/pkg/errors" "golang.org/x/sys/windows" ) @@ -103,7 +103,7 @@ func (m *master) Reset() error { {m.err, m.errMode}, } { if err := windows.SetConsoleMode(s.fd, s.mode); err != nil { - return fmt.Errorf("unable to restore console mode: %w", err) + return errors.Wrap(err, "unable to restore console mode") } } @@ -114,7 +114,7 @@ func (m *master) Size() (WinSize, error) { var info windows.ConsoleScreenBufferInfo err := windows.GetConsoleScreenBufferInfo(m.out, &info) if err != nil { - return WinSize{}, fmt.Errorf("unable to get console info: %w", err) + return WinSize{}, errors.Wrap(err, "unable to get console info") } winsize := WinSize{ @@ -139,7 +139,7 @@ func (m *master) DisableEcho() error { mode |= windows.ENABLE_LINE_INPUT if err := windows.SetConsoleMode(m.in, mode); err != nil { - return fmt.Errorf("unable to set console to disable echo: %w", err) + return errors.Wrap(err, "unable to set console to disable echo") } return nil @@ -192,7 +192,7 @@ func makeInputRaw(fd windows.Handle, mode uint32) error { } if err := windows.SetConsoleMode(fd, mode); err != nil { - return fmt.Errorf("unable to set console to raw mode: %w", err) + return errors.Wrap(err, "unable to set console to raw mode") } return nil diff --git a/cluster-autoscaler/vendor/github.com/containerd/console/console_zos.go b/cluster-autoscaler/vendor/github.com/containerd/console/console_zos.go deleted file mode 100644 index b348a839a03b..000000000000 --- a/cluster-autoscaler/vendor/github.com/containerd/console/console_zos.go +++ /dev/null @@ -1,163 +0,0 @@ -// +build zos - -/* - Copyright The containerd Authors. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -package console - -import ( - "fmt" - "os" - - "golang.org/x/sys/unix" -) - -// NewPty creates a new pty pair -// The master is returned as the first console and a string -// with the path to the pty slave is returned as the second -func NewPty() (Console, string, error) { - var f File - var err error - var slave string - for i := 0;; i++ { - ptyp := fmt.Sprintf("/dev/ptyp%04d", i) - f, err = os.OpenFile(ptyp, os.O_RDWR, 0600) - if err == nil { - slave = fmt.Sprintf("/dev/ttyp%04d", i) - break - } - if os.IsNotExist(err) { - return nil, "", err - } - // else probably Resource Busy - } - m, err := newMaster(f) - if err != nil { - return nil, "", err - } - return m, slave, nil -} - -type master struct { - f File - original *unix.Termios -} - -func (m *master) Read(b []byte) (int, error) { - return m.f.Read(b) -} - -func (m *master) Write(b []byte) (int, error) { - return m.f.Write(b) -} - -func (m *master) Close() error { - return m.f.Close() -} - -func (m *master) Resize(ws WinSize) error { - return tcswinsz(m.f.Fd(), ws) -} - -func (m *master) ResizeFrom(c Console) error { - ws, err := c.Size() - if err != nil { - return err - } - return m.Resize(ws) -} - -func (m *master) Reset() error { - if m.original == nil { - return nil - } - return tcset(m.f.Fd(), m.original) -} - -func (m *master) getCurrent() (unix.Termios, error) { - var termios unix.Termios - if err := tcget(m.f.Fd(), &termios); err != nil { - return unix.Termios{}, err - } - return termios, nil -} - -func (m *master) SetRaw() error { - rawState, err := m.getCurrent() - if err != nil { - return err - } - rawState = cfmakeraw(rawState) - rawState.Oflag = rawState.Oflag | unix.OPOST - return tcset(m.f.Fd(), &rawState) -} - -func (m *master) DisableEcho() error { - rawState, err := m.getCurrent() - if err != nil { - return err - } - rawState.Lflag = rawState.Lflag &^ unix.ECHO - return tcset(m.f.Fd(), &rawState) -} - -func (m *master) Size() (WinSize, error) { - return tcgwinsz(m.f.Fd()) -} - -func (m *master) Fd() uintptr { - return m.f.Fd() -} - -func (m *master) Name() string { - return m.f.Name() -} - -// checkConsole checks if the provided file is a console -func checkConsole(f File) error { - var termios unix.Termios - if tcget(f.Fd(), &termios) != nil { - return ErrNotAConsole - } - return nil -} - -func newMaster(f File) (Console, error) { - m := &master{ - f: f, - } - t, err := m.getCurrent() - if err != nil { - return nil, err - } - m.original = &t - return m, nil -} - -// ClearONLCR sets the necessary tty_ioctl(4)s to ensure that a pty pair -// created by us acts normally. In particular, a not-very-well-known default of -// Linux unix98 ptys is that they have +onlcr by default. While this isn't a -// problem for terminal emulators, because we relay data from the terminal we -// also relay that funky line discipline. -func ClearONLCR(fd uintptr) error { - return setONLCR(fd, false) -} - -// SetONLCR sets the necessary tty_ioctl(4)s to ensure that a pty pair -// created by us acts as intended for a terminal emulator. -func SetONLCR(fd uintptr) error { - return setONLCR(fd, true) -} diff --git a/cluster-autoscaler/vendor/github.com/containerd/console/go.mod b/cluster-autoscaler/vendor/github.com/containerd/console/go.mod index 1fe5b7fecb4a..7fca0a9a3ac1 100644 --- a/cluster-autoscaler/vendor/github.com/containerd/console/go.mod +++ b/cluster-autoscaler/vendor/github.com/containerd/console/go.mod @@ -2,4 +2,7 @@ module github.com/containerd/console go 1.13 -require golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c +require ( + github.com/pkg/errors v0.9.1 + golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c +) diff --git a/cluster-autoscaler/vendor/github.com/containerd/console/go.sum b/cluster-autoscaler/vendor/github.com/containerd/console/go.sum index 1225630b7b60..9db384d3b006 100644 --- a/cluster-autoscaler/vendor/github.com/containerd/console/go.sum +++ b/cluster-autoscaler/vendor/github.com/containerd/console/go.sum @@ -1,2 +1,4 @@ +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c h1:VwygUrnw9jn88c4u8GD3rZQbqrP/tgas88tPUbBxQrk= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/cluster-autoscaler/vendor/github.com/containerd/console/tc_unix.go b/cluster-autoscaler/vendor/github.com/containerd/console/tc_unix.go index a6bf01e8d1a2..5cd4c550ce88 100644 --- a/cluster-autoscaler/vendor/github.com/containerd/console/tc_unix.go +++ b/cluster-autoscaler/vendor/github.com/containerd/console/tc_unix.go @@ -1,4 +1,4 @@ -// +build darwin freebsd linux netbsd openbsd solaris zos +// +build darwin freebsd linux netbsd openbsd solaris /* Copyright The containerd Authors. diff --git a/cluster-autoscaler/vendor/github.com/containerd/containerd/errdefs/errors.go b/cluster-autoscaler/vendor/github.com/containerd/containerd/errdefs/errors.go new file mode 100644 index 000000000000..05a35228ca42 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/containerd/containerd/errdefs/errors.go @@ -0,0 +1,93 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +// Package errdefs defines the common errors used throughout containerd +// packages. +// +// Use with errors.Wrap and error.Wrapf to add context to an error. +// +// To detect an error class, use the IsXXX functions to tell whether an error +// is of a certain type. +// +// The functions ToGRPC and FromGRPC can be used to map server-side and +// client-side errors to the correct types. +package errdefs + +import ( + "context" + + "github.com/pkg/errors" +) + +// Definitions of common error types used throughout containerd. All containerd +// errors returned by most packages will map into one of these errors classes. +// Packages should return errors of these types when they want to instruct a +// client to take a particular action. +// +// For the most part, we just try to provide local grpc errors. Most conditions +// map very well to those defined by grpc. +var ( + ErrUnknown = errors.New("unknown") // used internally to represent a missed mapping. + ErrInvalidArgument = errors.New("invalid argument") + ErrNotFound = errors.New("not found") + ErrAlreadyExists = errors.New("already exists") + ErrFailedPrecondition = errors.New("failed precondition") + ErrUnavailable = errors.New("unavailable") + ErrNotImplemented = errors.New("not implemented") // represents not supported and unimplemented +) + +// IsInvalidArgument returns true if the error is due to an invalid argument +func IsInvalidArgument(err error) bool { + return errors.Is(err, ErrInvalidArgument) +} + +// IsNotFound returns true if the error is due to a missing object +func IsNotFound(err error) bool { + return errors.Is(err, ErrNotFound) +} + +// IsAlreadyExists returns true if the error is due to an already existing +// metadata item +func IsAlreadyExists(err error) bool { + return errors.Is(err, ErrAlreadyExists) +} + +// IsFailedPrecondition returns true if an operation could not proceed to the +// lack of a particular condition +func IsFailedPrecondition(err error) bool { + return errors.Is(err, ErrFailedPrecondition) +} + +// IsUnavailable returns true if the error is due to a resource being unavailable +func IsUnavailable(err error) bool { + return errors.Is(err, ErrUnavailable) +} + +// IsNotImplemented returns true if the error is due to not being implemented +func IsNotImplemented(err error) bool { + return errors.Is(err, ErrNotImplemented) +} + +// IsCanceled returns true if the error is due to `context.Canceled`. +func IsCanceled(err error) bool { + return errors.Is(err, context.Canceled) +} + +// IsDeadlineExceeded returns true if the error is due to +// `context.DeadlineExceeded`. +func IsDeadlineExceeded(err error) bool { + return errors.Is(err, context.DeadlineExceeded) +} diff --git a/cluster-autoscaler/vendor/github.com/containerd/containerd/errdefs/grpc.go b/cluster-autoscaler/vendor/github.com/containerd/containerd/errdefs/grpc.go new file mode 100644 index 000000000000..209f63bd0fc0 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/containerd/containerd/errdefs/grpc.go @@ -0,0 +1,147 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package errdefs + +import ( + "context" + "strings" + + "github.com/pkg/errors" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +// ToGRPC will attempt to map the backend containerd error into a grpc error, +// using the original error message as a description. +// +// Further information may be extracted from certain errors depending on their +// type. +// +// If the error is unmapped, the original error will be returned to be handled +// by the regular grpc error handling stack. +func ToGRPC(err error) error { + if err == nil { + return nil + } + + if isGRPCError(err) { + // error has already been mapped to grpc + return err + } + + switch { + case IsInvalidArgument(err): + return status.Errorf(codes.InvalidArgument, err.Error()) + case IsNotFound(err): + return status.Errorf(codes.NotFound, err.Error()) + case IsAlreadyExists(err): + return status.Errorf(codes.AlreadyExists, err.Error()) + case IsFailedPrecondition(err): + return status.Errorf(codes.FailedPrecondition, err.Error()) + case IsUnavailable(err): + return status.Errorf(codes.Unavailable, err.Error()) + case IsNotImplemented(err): + return status.Errorf(codes.Unimplemented, err.Error()) + case IsCanceled(err): + return status.Errorf(codes.Canceled, err.Error()) + case IsDeadlineExceeded(err): + return status.Errorf(codes.DeadlineExceeded, err.Error()) + } + + return err +} + +// ToGRPCf maps the error to grpc error codes, assembling the formatting string +// and combining it with the target error string. +// +// This is equivalent to errors.ToGRPC(errors.Wrapf(err, format, args...)) +func ToGRPCf(err error, format string, args ...interface{}) error { + return ToGRPC(errors.Wrapf(err, format, args...)) +} + +// FromGRPC returns the underlying error from a grpc service based on the grpc error code +func FromGRPC(err error) error { + if err == nil { + return nil + } + + var cls error // divide these into error classes, becomes the cause + + switch code(err) { + case codes.InvalidArgument: + cls = ErrInvalidArgument + case codes.AlreadyExists: + cls = ErrAlreadyExists + case codes.NotFound: + cls = ErrNotFound + case codes.Unavailable: + cls = ErrUnavailable + case codes.FailedPrecondition: + cls = ErrFailedPrecondition + case codes.Unimplemented: + cls = ErrNotImplemented + case codes.Canceled: + cls = context.Canceled + case codes.DeadlineExceeded: + cls = context.DeadlineExceeded + default: + cls = ErrUnknown + } + + msg := rebaseMessage(cls, err) + if msg != "" { + err = errors.Wrap(cls, msg) + } else { + err = errors.WithStack(cls) + } + + return err +} + +// rebaseMessage removes the repeats for an error at the end of an error +// string. This will happen when taking an error over grpc then remapping it. +// +// Effectively, we just remove the string of cls from the end of err if it +// appears there. +func rebaseMessage(cls error, err error) string { + desc := errDesc(err) + clss := cls.Error() + if desc == clss { + return "" + } + + return strings.TrimSuffix(desc, ": "+clss) +} + +func isGRPCError(err error) bool { + _, ok := status.FromError(err) + return ok +} + +func code(err error) codes.Code { + if s, ok := status.FromError(err); ok { + return s.Code() + } + return codes.Unknown +} + +func errDesc(err error) string { + if s, ok := status.FromError(err); ok { + return s.Message() + } + return err.Error() +} diff --git a/cluster-autoscaler/vendor/github.com/containerd/containerd/log/context.go b/cluster-autoscaler/vendor/github.com/containerd/containerd/log/context.go new file mode 100644 index 000000000000..21599c4fd646 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/containerd/containerd/log/context.go @@ -0,0 +1,60 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package log + +import ( + "context" + + "github.com/sirupsen/logrus" +) + +var ( + // G is an alias for GetLogger. + // + // We may want to define this locally to a package to get package tagged log + // messages. + G = GetLogger + + // L is an alias for the standard logger. + L = logrus.NewEntry(logrus.StandardLogger()) +) + +type ( + loggerKey struct{} +) + +// RFC3339NanoFixed is time.RFC3339Nano with nanoseconds padded using zeros to +// ensure the formatted time is always the same number of characters. +const RFC3339NanoFixed = "2006-01-02T15:04:05.000000000Z07:00" + +// WithLogger returns a new context with the provided logger. Use in +// combination with logger.WithField(s) for great effect. +func WithLogger(ctx context.Context, logger *logrus.Entry) context.Context { + return context.WithValue(ctx, loggerKey{}, logger) +} + +// GetLogger retrieves the current logger from the context. If no logger is +// available, the default logger is returned. +func GetLogger(ctx context.Context) *logrus.Entry { + logger := ctx.Value(loggerKey{}) + + if logger == nil { + return L + } + + return logger.(*logrus.Entry) +} diff --git a/cluster-autoscaler/vendor/github.com/containerd/containerd/platforms/compare.go b/cluster-autoscaler/vendor/github.com/containerd/containerd/platforms/compare.go new file mode 100644 index 000000000000..3ad22a10d0ce --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/containerd/containerd/platforms/compare.go @@ -0,0 +1,229 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package platforms + +import specs "github.com/opencontainers/image-spec/specs-go/v1" + +// MatchComparer is able to match and compare platforms to +// filter and sort platforms. +type MatchComparer interface { + Matcher + + Less(specs.Platform, specs.Platform) bool +} + +// Only returns a match comparer for a single platform +// using default resolution logic for the platform. +// +// For ARMv8, will also match ARMv7, ARMv6 and ARMv5 (for 32bit runtimes) +// For ARMv7, will also match ARMv6 and ARMv5 +// For ARMv6, will also match ARMv5 +func Only(platform specs.Platform) MatchComparer { + platform = Normalize(platform) + if platform.Architecture == "arm" { + if platform.Variant == "v8" { + return orderedPlatformComparer{ + matchers: []Matcher{ + &matcher{ + Platform: platform, + }, + &matcher{ + Platform: specs.Platform{ + Architecture: platform.Architecture, + OS: platform.OS, + OSVersion: platform.OSVersion, + OSFeatures: platform.OSFeatures, + Variant: "v7", + }, + }, + &matcher{ + Platform: specs.Platform{ + Architecture: platform.Architecture, + OS: platform.OS, + OSVersion: platform.OSVersion, + OSFeatures: platform.OSFeatures, + Variant: "v6", + }, + }, + &matcher{ + Platform: specs.Platform{ + Architecture: platform.Architecture, + OS: platform.OS, + OSVersion: platform.OSVersion, + OSFeatures: platform.OSFeatures, + Variant: "v5", + }, + }, + }, + } + } + if platform.Variant == "v7" { + return orderedPlatformComparer{ + matchers: []Matcher{ + &matcher{ + Platform: platform, + }, + &matcher{ + Platform: specs.Platform{ + Architecture: platform.Architecture, + OS: platform.OS, + OSVersion: platform.OSVersion, + OSFeatures: platform.OSFeatures, + Variant: "v6", + }, + }, + &matcher{ + Platform: specs.Platform{ + Architecture: platform.Architecture, + OS: platform.OS, + OSVersion: platform.OSVersion, + OSFeatures: platform.OSFeatures, + Variant: "v5", + }, + }, + }, + } + } + if platform.Variant == "v6" { + return orderedPlatformComparer{ + matchers: []Matcher{ + &matcher{ + Platform: platform, + }, + &matcher{ + Platform: specs.Platform{ + Architecture: platform.Architecture, + OS: platform.OS, + OSVersion: platform.OSVersion, + OSFeatures: platform.OSFeatures, + Variant: "v5", + }, + }, + }, + } + } + } + + return singlePlatformComparer{ + Matcher: &matcher{ + Platform: platform, + }, + } +} + +// Ordered returns a platform MatchComparer which matches any of the platforms +// but orders them in order they are provided. +func Ordered(platforms ...specs.Platform) MatchComparer { + matchers := make([]Matcher, len(platforms)) + for i := range platforms { + matchers[i] = NewMatcher(platforms[i]) + } + return orderedPlatformComparer{ + matchers: matchers, + } +} + +// Any returns a platform MatchComparer which matches any of the platforms +// with no preference for ordering. +func Any(platforms ...specs.Platform) MatchComparer { + matchers := make([]Matcher, len(platforms)) + for i := range platforms { + matchers[i] = NewMatcher(platforms[i]) + } + return anyPlatformComparer{ + matchers: matchers, + } +} + +// All is a platform MatchComparer which matches all platforms +// with preference for ordering. +var All MatchComparer = allPlatformComparer{} + +type singlePlatformComparer struct { + Matcher +} + +func (c singlePlatformComparer) Less(p1, p2 specs.Platform) bool { + return c.Match(p1) && !c.Match(p2) +} + +type orderedPlatformComparer struct { + matchers []Matcher +} + +func (c orderedPlatformComparer) Match(platform specs.Platform) bool { + for _, m := range c.matchers { + if m.Match(platform) { + return true + } + } + return false +} + +func (c orderedPlatformComparer) Less(p1 specs.Platform, p2 specs.Platform) bool { + for _, m := range c.matchers { + p1m := m.Match(p1) + p2m := m.Match(p2) + if p1m && !p2m { + return true + } + if p1m || p2m { + return false + } + } + return false +} + +type anyPlatformComparer struct { + matchers []Matcher +} + +func (c anyPlatformComparer) Match(platform specs.Platform) bool { + for _, m := range c.matchers { + if m.Match(platform) { + return true + } + } + return false +} + +func (c anyPlatformComparer) Less(p1, p2 specs.Platform) bool { + var p1m, p2m bool + for _, m := range c.matchers { + if !p1m && m.Match(p1) { + p1m = true + } + if !p2m && m.Match(p2) { + p2m = true + } + if p1m && p2m { + return false + } + } + // If one matches, and the other does, sort match first + return p1m && !p2m +} + +type allPlatformComparer struct{} + +func (allPlatformComparer) Match(specs.Platform) bool { + return true +} + +func (allPlatformComparer) Less(specs.Platform, specs.Platform) bool { + return false +} diff --git a/cluster-autoscaler/vendor/github.com/containerd/containerd/platforms/cpuinfo.go b/cluster-autoscaler/vendor/github.com/containerd/containerd/platforms/cpuinfo.go new file mode 100644 index 000000000000..db65a726b902 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/containerd/containerd/platforms/cpuinfo.go @@ -0,0 +1,122 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package platforms + +import ( + "bufio" + "os" + "runtime" + "strings" + + "github.com/containerd/containerd/errdefs" + "github.com/containerd/containerd/log" + "github.com/pkg/errors" +) + +// Present the ARM instruction set architecture, eg: v7, v8 +var cpuVariant string + +func init() { + if isArmArch(runtime.GOARCH) { + cpuVariant = getCPUVariant() + } else { + cpuVariant = "" + } +} + +// For Linux, the kernel has already detected the ABI, ISA and Features. +// So we don't need to access the ARM registers to detect platform information +// by ourselves. We can just parse these information from /proc/cpuinfo +func getCPUInfo(pattern string) (info string, err error) { + if !isLinuxOS(runtime.GOOS) { + return "", errors.Wrapf(errdefs.ErrNotImplemented, "getCPUInfo for OS %s", runtime.GOOS) + } + + cpuinfo, err := os.Open("/proc/cpuinfo") + if err != nil { + return "", err + } + defer cpuinfo.Close() + + // Start to Parse the Cpuinfo line by line. For SMP SoC, we parse + // the first core is enough. + scanner := bufio.NewScanner(cpuinfo) + for scanner.Scan() { + newline := scanner.Text() + list := strings.Split(newline, ":") + + if len(list) > 1 && strings.EqualFold(strings.TrimSpace(list[0]), pattern) { + return strings.TrimSpace(list[1]), nil + } + } + + // Check whether the scanner encountered errors + err = scanner.Err() + if err != nil { + return "", err + } + + return "", errors.Wrapf(errdefs.ErrNotFound, "getCPUInfo for pattern: %s", pattern) +} + +func getCPUVariant() string { + if runtime.GOOS == "windows" || runtime.GOOS == "darwin" { + // Windows/Darwin only supports v7 for ARM32 and v8 for ARM64 and so we can use + // runtime.GOARCH to determine the variants + var variant string + switch runtime.GOARCH { + case "arm64": + variant = "v8" + case "arm": + variant = "v7" + default: + variant = "unknown" + } + + return variant + } + + variant, err := getCPUInfo("Cpu architecture") + if err != nil { + log.L.WithError(err).Error("failure getting variant") + return "" + } + + switch strings.ToLower(variant) { + case "8", "aarch64": + // special case: if running a 32-bit userspace on aarch64, the variant should be "v7" + if runtime.GOARCH == "arm" { + variant = "v7" + } else { + variant = "v8" + } + case "7", "7m", "?(12)", "?(13)", "?(14)", "?(15)", "?(16)", "?(17)": + variant = "v7" + case "6", "6tej": + variant = "v6" + case "5", "5t", "5te", "5tej": + variant = "v5" + case "4", "4t": + variant = "v4" + case "3": + variant = "v3" + default: + variant = "unknown" + } + + return variant +} diff --git a/cluster-autoscaler/vendor/github.com/containerd/containerd/platforms/database.go b/cluster-autoscaler/vendor/github.com/containerd/containerd/platforms/database.go new file mode 100644 index 000000000000..6ede94061eb8 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/containerd/containerd/platforms/database.go @@ -0,0 +1,114 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package platforms + +import ( + "runtime" + "strings" +) + +// isLinuxOS returns true if the operating system is Linux. +// +// The OS value should be normalized before calling this function. +func isLinuxOS(os string) bool { + return os == "linux" +} + +// These function are generated from https://golang.org/src/go/build/syslist.go. +// +// We use switch statements because they are slightly faster than map lookups +// and use a little less memory. + +// isKnownOS returns true if we know about the operating system. +// +// The OS value should be normalized before calling this function. +func isKnownOS(os string) bool { + switch os { + case "aix", "android", "darwin", "dragonfly", "freebsd", "hurd", "illumos", "js", "linux", "nacl", "netbsd", "openbsd", "plan9", "solaris", "windows", "zos": + return true + } + return false +} + +// isArmArch returns true if the architecture is ARM. +// +// The arch value should be normalized before being passed to this function. +func isArmArch(arch string) bool { + switch arch { + case "arm", "arm64": + return true + } + return false +} + +// isKnownArch returns true if we know about the architecture. +// +// The arch value should be normalized before being passed to this function. +func isKnownArch(arch string) bool { + switch arch { + case "386", "amd64", "amd64p32", "arm", "armbe", "arm64", "arm64be", "ppc64", "ppc64le", "mips", "mipsle", "mips64", "mips64le", "mips64p32", "mips64p32le", "ppc", "riscv", "riscv64", "s390", "s390x", "sparc", "sparc64", "wasm": + return true + } + return false +} + +func normalizeOS(os string) string { + if os == "" { + return runtime.GOOS + } + os = strings.ToLower(os) + + switch os { + case "macos": + os = "darwin" + } + return os +} + +// normalizeArch normalizes the architecture. +func normalizeArch(arch, variant string) (string, string) { + arch, variant = strings.ToLower(arch), strings.ToLower(variant) + switch arch { + case "i386": + arch = "386" + variant = "" + case "x86_64", "x86-64": + arch = "amd64" + variant = "" + case "aarch64", "arm64": + arch = "arm64" + switch variant { + case "8", "v8": + variant = "" + } + case "armhf": + arch = "arm" + variant = "v7" + case "armel": + arch = "arm" + variant = "v6" + case "arm": + switch variant { + case "", "7": + variant = "v7" + case "5", "6", "8": + variant = "v" + variant + } + } + + return arch, variant +} diff --git a/cluster-autoscaler/vendor/github.com/containerd/containerd/platforms/defaults.go b/cluster-autoscaler/vendor/github.com/containerd/containerd/platforms/defaults.go new file mode 100644 index 000000000000..a14d80e58cbf --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/containerd/containerd/platforms/defaults.go @@ -0,0 +1,38 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package platforms + +import ( + "runtime" + + specs "github.com/opencontainers/image-spec/specs-go/v1" +) + +// DefaultString returns the default string specifier for the platform. +func DefaultString() string { + return Format(DefaultSpec()) +} + +// DefaultSpec returns the current platform's default platform specification. +func DefaultSpec() specs.Platform { + return specs.Platform{ + OS: runtime.GOOS, + Architecture: runtime.GOARCH, + // The Variant field will be empty if arch != ARM. + Variant: cpuVariant, + } +} diff --git a/cluster-autoscaler/vendor/github.com/containerd/console/tc_zos.go b/cluster-autoscaler/vendor/github.com/containerd/containerd/platforms/defaults_unix.go similarity index 79% rename from cluster-autoscaler/vendor/github.com/containerd/console/tc_zos.go rename to cluster-autoscaler/vendor/github.com/containerd/containerd/platforms/defaults_unix.go index 4262eaf4cc07..e8a7d5ffa0d6 100644 --- a/cluster-autoscaler/vendor/github.com/containerd/console/tc_zos.go +++ b/cluster-autoscaler/vendor/github.com/containerd/containerd/platforms/defaults_unix.go @@ -1,3 +1,5 @@ +// +build !windows + /* Copyright The containerd Authors. @@ -14,13 +16,9 @@ limitations under the License. */ -package console - -import ( - "golang.org/x/sys/unix" -) +package platforms -const ( - cmdTcGet = unix.TCGETS - cmdTcSet = unix.TCSETS -) +// Default returns the default matcher for the platform. +func Default() MatchComparer { + return Only(DefaultSpec()) +} diff --git a/cluster-autoscaler/vendor/github.com/containerd/containerd/platforms/defaults_windows.go b/cluster-autoscaler/vendor/github.com/containerd/containerd/platforms/defaults_windows.go new file mode 100644 index 000000000000..0defbd36c042 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/containerd/containerd/platforms/defaults_windows.go @@ -0,0 +1,31 @@ +// +build windows + +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package platforms + +import ( + specs "github.com/opencontainers/image-spec/specs-go/v1" +) + +// Default returns the default matcher for the platform. +func Default() MatchComparer { + return Ordered(DefaultSpec(), specs.Platform{ + OS: "linux", + Architecture: "amd64", + }) +} diff --git a/cluster-autoscaler/vendor/github.com/containerd/containerd/platforms/platforms.go b/cluster-autoscaler/vendor/github.com/containerd/containerd/platforms/platforms.go new file mode 100644 index 000000000000..77d3f184ec1b --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/containerd/containerd/platforms/platforms.go @@ -0,0 +1,278 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +// Package platforms provides a toolkit for normalizing, matching and +// specifying container platforms. +// +// Centered around OCI platform specifications, we define a string-based +// specifier syntax that can be used for user input. With a specifier, users +// only need to specify the parts of the platform that are relevant to their +// context, providing an operating system or architecture or both. +// +// How do I use this package? +// +// The vast majority of use cases should simply use the match function with +// user input. The first step is to parse a specifier into a matcher: +// +// m, err := Parse("linux") +// if err != nil { ... } +// +// Once you have a matcher, use it to match against the platform declared by a +// component, typically from an image or runtime. Since extracting an images +// platform is a little more involved, we'll use an example against the +// platform default: +// +// if ok := m.Match(Default()); !ok { /* doesn't match */ } +// +// This can be composed in loops for resolving runtimes or used as a filter for +// fetch and select images. +// +// More details of the specifier syntax and platform spec follow. +// +// Declaring Platform Support +// +// Components that have strict platform requirements should use the OCI +// platform specification to declare their support. Typically, this will be +// images and runtimes that should make these declaring which platform they +// support specifically. This looks roughly as follows: +// +// type Platform struct { +// Architecture string +// OS string +// Variant string +// } +// +// Most images and runtimes should at least set Architecture and OS, according +// to their GOARCH and GOOS values, respectively (follow the OCI image +// specification when in doubt). ARM should set variant under certain +// discussions, which are outlined below. +// +// Platform Specifiers +// +// While the OCI platform specifications provide a tool for components to +// specify structured information, user input typically doesn't need the full +// context and much can be inferred. To solve this problem, we introduced +// "specifiers". A specifier has the format +// `||/[/]`. The user can provide either the +// operating system or the architecture or both. +// +// An example of a common specifier is `linux/amd64`. If the host has a default +// of runtime that matches this, the user can simply provide the component that +// matters. For example, if a image provides amd64 and arm64 support, the +// operating system, `linux` can be inferred, so they only have to provide +// `arm64` or `amd64`. Similar behavior is implemented for operating systems, +// where the architecture may be known but a runtime may support images from +// different operating systems. +// +// Normalization +// +// Because not all users are familiar with the way the Go runtime represents +// platforms, several normalizations have been provided to make this package +// easier to user. +// +// The following are performed for architectures: +// +// Value Normalized +// aarch64 arm64 +// armhf arm +// armel arm/v6 +// i386 386 +// x86_64 amd64 +// x86-64 amd64 +// +// We also normalize the operating system `macos` to `darwin`. +// +// ARM Support +// +// To qualify ARM architecture, the Variant field is used to qualify the arm +// version. The most common arm version, v7, is represented without the variant +// unless it is explicitly provided. This is treated as equivalent to armhf. A +// previous architecture, armel, will be normalized to arm/v6. +// +// While these normalizations are provided, their support on arm platforms has +// not yet been fully implemented and tested. +package platforms + +import ( + "regexp" + "runtime" + "strconv" + "strings" + + "github.com/containerd/containerd/errdefs" + specs "github.com/opencontainers/image-spec/specs-go/v1" + "github.com/pkg/errors" +) + +var ( + specifierRe = regexp.MustCompile(`^[A-Za-z0-9_-]+$`) +) + +// Matcher matches platforms specifications, provided by an image or runtime. +type Matcher interface { + Match(platform specs.Platform) bool +} + +// NewMatcher returns a simple matcher based on the provided platform +// specification. The returned matcher only looks for equality based on os, +// architecture and variant. +// +// One may implement their own matcher if this doesn't provide the required +// functionality. +// +// Applications should opt to use `Match` over directly parsing specifiers. +func NewMatcher(platform specs.Platform) Matcher { + return &matcher{ + Platform: Normalize(platform), + } +} + +type matcher struct { + specs.Platform +} + +func (m *matcher) Match(platform specs.Platform) bool { + normalized := Normalize(platform) + return m.OS == normalized.OS && + m.Architecture == normalized.Architecture && + m.Variant == normalized.Variant +} + +func (m *matcher) String() string { + return Format(m.Platform) +} + +// Parse parses the platform specifier syntax into a platform declaration. +// +// Platform specifiers are in the format `||/[/]`. +// The minimum required information for a platform specifier is the operating +// system or architecture. If there is only a single string (no slashes), the +// value will be matched against the known set of operating systems, then fall +// back to the known set of architectures. The missing component will be +// inferred based on the local environment. +func Parse(specifier string) (specs.Platform, error) { + if strings.Contains(specifier, "*") { + // TODO(stevvooe): need to work out exact wildcard handling + return specs.Platform{}, errors.Wrapf(errdefs.ErrInvalidArgument, "%q: wildcards not yet supported", specifier) + } + + parts := strings.Split(specifier, "/") + + for _, part := range parts { + if !specifierRe.MatchString(part) { + return specs.Platform{}, errors.Wrapf(errdefs.ErrInvalidArgument, "%q is an invalid component of %q: platform specifier component must match %q", part, specifier, specifierRe.String()) + } + } + + var p specs.Platform + switch len(parts) { + case 1: + // in this case, we will test that the value might be an OS, then look + // it up. If it is not known, we'll treat it as an architecture. Since + // we have very little information about the platform here, we are + // going to be a little more strict if we don't know about the argument + // value. + p.OS = normalizeOS(parts[0]) + if isKnownOS(p.OS) { + // picks a default architecture + p.Architecture = runtime.GOARCH + if p.Architecture == "arm" && cpuVariant != "v7" { + p.Variant = cpuVariant + } + + return p, nil + } + + p.Architecture, p.Variant = normalizeArch(parts[0], "") + if p.Architecture == "arm" && p.Variant == "v7" { + p.Variant = "" + } + if isKnownArch(p.Architecture) { + p.OS = runtime.GOOS + return p, nil + } + + return specs.Platform{}, errors.Wrapf(errdefs.ErrInvalidArgument, "%q: unknown operating system or architecture", specifier) + case 2: + // In this case, we treat as a regular os/arch pair. We don't care + // about whether or not we know of the platform. + p.OS = normalizeOS(parts[0]) + p.Architecture, p.Variant = normalizeArch(parts[1], "") + if p.Architecture == "arm" && p.Variant == "v7" { + p.Variant = "" + } + + return p, nil + case 3: + // we have a fully specified variant, this is rare + p.OS = normalizeOS(parts[0]) + p.Architecture, p.Variant = normalizeArch(parts[1], parts[2]) + if p.Architecture == "arm64" && p.Variant == "" { + p.Variant = "v8" + } + + return p, nil + } + + return specs.Platform{}, errors.Wrapf(errdefs.ErrInvalidArgument, "%q: cannot parse platform specifier", specifier) +} + +// MustParse is like Parses but panics if the specifier cannot be parsed. +// Simplifies initialization of global variables. +func MustParse(specifier string) specs.Platform { + p, err := Parse(specifier) + if err != nil { + panic("platform: Parse(" + strconv.Quote(specifier) + "): " + err.Error()) + } + return p +} + +// Format returns a string specifier from the provided platform specification. +func Format(platform specs.Platform) string { + if platform.OS == "" { + return "unknown" + } + + return joinNotEmpty(platform.OS, platform.Architecture, platform.Variant) +} + +func joinNotEmpty(s ...string) string { + var ss []string + for _, s := range s { + if s == "" { + continue + } + + ss = append(ss, s) + } + + return strings.Join(ss, "/") +} + +// Normalize validates and translate the platform to the canonical value. +// +// For example, if "Aarch64" is encountered, we change it to "arm64" or if +// "x86_64" is encountered, it becomes "amd64". +func Normalize(platform specs.Platform) specs.Platform { + platform.OS = normalizeOS(platform.OS) + platform.Architecture, platform.Variant = normalizeArch(platform.Architecture, platform.Variant) + + // these fields are deprecated, remove them + platform.OSFeatures = nil + platform.OSVersion = "" + + return platform +} diff --git a/cluster-autoscaler/vendor/github.com/containernetworking/cni/LICENSE b/cluster-autoscaler/vendor/github.com/containernetworking/cni/LICENSE new file mode 100644 index 000000000000..8f71f43fee3f --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/containernetworking/cni/LICENSE @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/cluster-autoscaler/vendor/github.com/containernetworking/cni/libcni/api.go b/cluster-autoscaler/vendor/github.com/containernetworking/cni/libcni/api.go new file mode 100644 index 000000000000..7e52bd838734 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/containernetworking/cni/libcni/api.go @@ -0,0 +1,673 @@ +// Copyright 2015 CNI authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package libcni + +import ( + "context" + "encoding/json" + "fmt" + "io/ioutil" + "os" + "path/filepath" + "strings" + + "github.com/containernetworking/cni/pkg/invoke" + "github.com/containernetworking/cni/pkg/types" + "github.com/containernetworking/cni/pkg/utils" + "github.com/containernetworking/cni/pkg/version" +) + +var ( + CacheDir = "/var/lib/cni" +) + +const ( + CNICacheV1 = "cniCacheV1" +) + +// A RuntimeConf holds the arguments to one invocation of a CNI plugin +// excepting the network configuration, with the nested exception that +// the `runtimeConfig` from the network configuration is included +// here. +type RuntimeConf struct { + ContainerID string + NetNS string + IfName string + Args [][2]string + // A dictionary of capability-specific data passed by the runtime + // to plugins as top-level keys in the 'runtimeConfig' dictionary + // of the plugin's stdin data. libcni will ensure that only keys + // in this map which match the capabilities of the plugin are passed + // to the plugin + CapabilityArgs map[string]interface{} + + // DEPRECATED. Will be removed in a future release. + CacheDir string +} + +type NetworkConfig struct { + Network *types.NetConf + Bytes []byte +} + +type NetworkConfigList struct { + Name string + CNIVersion string + DisableCheck bool + Plugins []*NetworkConfig + Bytes []byte +} + +type CNI interface { + AddNetworkList(ctx context.Context, net *NetworkConfigList, rt *RuntimeConf) (types.Result, error) + CheckNetworkList(ctx context.Context, net *NetworkConfigList, rt *RuntimeConf) error + DelNetworkList(ctx context.Context, net *NetworkConfigList, rt *RuntimeConf) error + GetNetworkListCachedResult(net *NetworkConfigList, rt *RuntimeConf) (types.Result, error) + GetNetworkListCachedConfig(net *NetworkConfigList, rt *RuntimeConf) ([]byte, *RuntimeConf, error) + + AddNetwork(ctx context.Context, net *NetworkConfig, rt *RuntimeConf) (types.Result, error) + CheckNetwork(ctx context.Context, net *NetworkConfig, rt *RuntimeConf) error + DelNetwork(ctx context.Context, net *NetworkConfig, rt *RuntimeConf) error + GetNetworkCachedResult(net *NetworkConfig, rt *RuntimeConf) (types.Result, error) + GetNetworkCachedConfig(net *NetworkConfig, rt *RuntimeConf) ([]byte, *RuntimeConf, error) + + ValidateNetworkList(ctx context.Context, net *NetworkConfigList) ([]string, error) + ValidateNetwork(ctx context.Context, net *NetworkConfig) ([]string, error) +} + +type CNIConfig struct { + Path []string + exec invoke.Exec + cacheDir string +} + +// CNIConfig implements the CNI interface +var _ CNI = &CNIConfig{} + +// NewCNIConfig returns a new CNIConfig object that will search for plugins +// in the given paths and use the given exec interface to run those plugins, +// or if the exec interface is not given, will use a default exec handler. +func NewCNIConfig(path []string, exec invoke.Exec) *CNIConfig { + return NewCNIConfigWithCacheDir(path, "", exec) +} + +// NewCNIConfigWithCacheDir returns a new CNIConfig object that will search for plugins +// in the given paths use the given exec interface to run those plugins, +// or if the exec interface is not given, will use a default exec handler. +// The given cache directory will be used for temporary data storage when needed. +func NewCNIConfigWithCacheDir(path []string, cacheDir string, exec invoke.Exec) *CNIConfig { + return &CNIConfig{ + Path: path, + cacheDir: cacheDir, + exec: exec, + } +} + +func buildOneConfig(name, cniVersion string, orig *NetworkConfig, prevResult types.Result, rt *RuntimeConf) (*NetworkConfig, error) { + var err error + + inject := map[string]interface{}{ + "name": name, + "cniVersion": cniVersion, + } + // Add previous plugin result + if prevResult != nil { + inject["prevResult"] = prevResult + } + + // Ensure every config uses the same name and version + orig, err = InjectConf(orig, inject) + if err != nil { + return nil, err + } + + return injectRuntimeConfig(orig, rt) +} + +// This function takes a libcni RuntimeConf structure and injects values into +// a "runtimeConfig" dictionary in the CNI network configuration JSON that +// will be passed to the plugin on stdin. +// +// Only "capabilities arguments" passed by the runtime are currently injected. +// These capabilities arguments are filtered through the plugin's advertised +// capabilities from its config JSON, and any keys in the CapabilityArgs +// matching plugin capabilities are added to the "runtimeConfig" dictionary +// sent to the plugin via JSON on stdin. For example, if the plugin's +// capabilities include "portMappings", and the CapabilityArgs map includes a +// "portMappings" key, that key and its value are added to the "runtimeConfig" +// dictionary to be passed to the plugin's stdin. +func injectRuntimeConfig(orig *NetworkConfig, rt *RuntimeConf) (*NetworkConfig, error) { + var err error + + rc := make(map[string]interface{}) + for capability, supported := range orig.Network.Capabilities { + if !supported { + continue + } + if data, ok := rt.CapabilityArgs[capability]; ok { + rc[capability] = data + } + } + + if len(rc) > 0 { + orig, err = InjectConf(orig, map[string]interface{}{"runtimeConfig": rc}) + if err != nil { + return nil, err + } + } + + return orig, nil +} + +// ensure we have a usable exec if the CNIConfig was not given one +func (c *CNIConfig) ensureExec() invoke.Exec { + if c.exec == nil { + c.exec = &invoke.DefaultExec{ + RawExec: &invoke.RawExec{Stderr: os.Stderr}, + PluginDecoder: version.PluginDecoder{}, + } + } + return c.exec +} + +type cachedInfo struct { + Kind string `json:"kind"` + ContainerID string `json:"containerId"` + Config []byte `json:"config"` + IfName string `json:"ifName"` + NetworkName string `json:"networkName"` + CniArgs [][2]string `json:"cniArgs,omitempty"` + CapabilityArgs map[string]interface{} `json:"capabilityArgs,omitempty"` + RawResult map[string]interface{} `json:"result,omitempty"` + Result types.Result `json:"-"` +} + +// getCacheDir returns the cache directory in this order: +// 1) global cacheDir from CNIConfig object +// 2) deprecated cacheDir from RuntimeConf object +// 3) fall back to default cache directory +func (c *CNIConfig) getCacheDir(rt *RuntimeConf) string { + if c.cacheDir != "" { + return c.cacheDir + } + if rt.CacheDir != "" { + return rt.CacheDir + } + return CacheDir +} + +func (c *CNIConfig) getCacheFilePath(netName string, rt *RuntimeConf) (string, error) { + if netName == "" || rt.ContainerID == "" || rt.IfName == "" { + return "", fmt.Errorf("cache file path requires network name (%q), container ID (%q), and interface name (%q)", netName, rt.ContainerID, rt.IfName) + } + return filepath.Join(c.getCacheDir(rt), "results", fmt.Sprintf("%s-%s-%s", netName, rt.ContainerID, rt.IfName)), nil +} + +func (c *CNIConfig) cacheAdd(result types.Result, config []byte, netName string, rt *RuntimeConf) error { + cached := cachedInfo{ + Kind: CNICacheV1, + ContainerID: rt.ContainerID, + Config: config, + IfName: rt.IfName, + NetworkName: netName, + CniArgs: rt.Args, + CapabilityArgs: rt.CapabilityArgs, + } + + // We need to get type.Result into cachedInfo as JSON map + // Marshal to []byte, then Unmarshal into cached.RawResult + data, err := json.Marshal(result) + if err != nil { + return err + } + + err = json.Unmarshal(data, &cached.RawResult) + if err != nil { + return err + } + + newBytes, err := json.Marshal(&cached) + if err != nil { + return err + } + + fname, err := c.getCacheFilePath(netName, rt) + if err != nil { + return err + } + if err := os.MkdirAll(filepath.Dir(fname), 0700); err != nil { + return err + } + + return ioutil.WriteFile(fname, newBytes, 0600) +} + +func (c *CNIConfig) cacheDel(netName string, rt *RuntimeConf) error { + fname, err := c.getCacheFilePath(netName, rt) + if err != nil { + // Ignore error + return nil + } + return os.Remove(fname) +} + +func (c *CNIConfig) getCachedConfig(netName string, rt *RuntimeConf) ([]byte, *RuntimeConf, error) { + var bytes []byte + + fname, err := c.getCacheFilePath(netName, rt) + if err != nil { + return nil, nil, err + } + bytes, err = ioutil.ReadFile(fname) + if err != nil { + // Ignore read errors; the cached result may not exist on-disk + return nil, nil, nil + } + + unmarshaled := cachedInfo{} + if err := json.Unmarshal(bytes, &unmarshaled); err != nil { + return nil, nil, fmt.Errorf("failed to unmarshal cached network %q config: %v", netName, err) + } + if unmarshaled.Kind != CNICacheV1 { + return nil, nil, fmt.Errorf("read cached network %q config has wrong kind: %v", netName, unmarshaled.Kind) + } + + newRt := *rt + if unmarshaled.CniArgs != nil { + newRt.Args = unmarshaled.CniArgs + } + newRt.CapabilityArgs = unmarshaled.CapabilityArgs + + return unmarshaled.Config, &newRt, nil +} + +func (c *CNIConfig) getLegacyCachedResult(netName, cniVersion string, rt *RuntimeConf) (types.Result, error) { + fname, err := c.getCacheFilePath(netName, rt) + if err != nil { + return nil, err + } + data, err := ioutil.ReadFile(fname) + if err != nil { + // Ignore read errors; the cached result may not exist on-disk + return nil, nil + } + + // Read the version of the cached result + decoder := version.ConfigDecoder{} + resultCniVersion, err := decoder.Decode(data) + if err != nil { + return nil, err + } + + // Ensure we can understand the result + result, err := version.NewResult(resultCniVersion, data) + if err != nil { + return nil, err + } + + // Convert to the config version to ensure plugins get prevResult + // in the same version as the config. The cached result version + // should match the config version unless the config was changed + // while the container was running. + result, err = result.GetAsVersion(cniVersion) + if err != nil && resultCniVersion != cniVersion { + return nil, fmt.Errorf("failed to convert cached result version %q to config version %q: %v", resultCniVersion, cniVersion, err) + } + return result, err +} + +func (c *CNIConfig) getCachedResult(netName, cniVersion string, rt *RuntimeConf) (types.Result, error) { + fname, err := c.getCacheFilePath(netName, rt) + if err != nil { + return nil, err + } + fdata, err := ioutil.ReadFile(fname) + if err != nil { + // Ignore read errors; the cached result may not exist on-disk + return nil, nil + } + + cachedInfo := cachedInfo{} + if err := json.Unmarshal(fdata, &cachedInfo); err != nil || cachedInfo.Kind != CNICacheV1 { + return c.getLegacyCachedResult(netName, cniVersion, rt) + } + + newBytes, err := json.Marshal(&cachedInfo.RawResult) + if err != nil { + return nil, fmt.Errorf("failed to marshal cached network %q config: %v", netName, err) + } + + // Read the version of the cached result + decoder := version.ConfigDecoder{} + resultCniVersion, err := decoder.Decode(newBytes) + if err != nil { + return nil, err + } + + // Ensure we can understand the result + result, err := version.NewResult(resultCniVersion, newBytes) + if err != nil { + return nil, err + } + + // Convert to the config version to ensure plugins get prevResult + // in the same version as the config. The cached result version + // should match the config version unless the config was changed + // while the container was running. + result, err = result.GetAsVersion(cniVersion) + if err != nil && resultCniVersion != cniVersion { + return nil, fmt.Errorf("failed to convert cached result version %q to config version %q: %v", resultCniVersion, cniVersion, err) + } + return result, err +} + +// GetNetworkListCachedResult returns the cached Result of the previous +// AddNetworkList() operation for a network list, or an error. +func (c *CNIConfig) GetNetworkListCachedResult(list *NetworkConfigList, rt *RuntimeConf) (types.Result, error) { + return c.getCachedResult(list.Name, list.CNIVersion, rt) +} + +// GetNetworkCachedResult returns the cached Result of the previous +// AddNetwork() operation for a network, or an error. +func (c *CNIConfig) GetNetworkCachedResult(net *NetworkConfig, rt *RuntimeConf) (types.Result, error) { + return c.getCachedResult(net.Network.Name, net.Network.CNIVersion, rt) +} + +// GetNetworkListCachedConfig copies the input RuntimeConf to output +// RuntimeConf with fields updated with info from the cached Config. +func (c *CNIConfig) GetNetworkListCachedConfig(list *NetworkConfigList, rt *RuntimeConf) ([]byte, *RuntimeConf, error) { + return c.getCachedConfig(list.Name, rt) +} + +// GetNetworkCachedConfig copies the input RuntimeConf to output +// RuntimeConf with fields updated with info from the cached Config. +func (c *CNIConfig) GetNetworkCachedConfig(net *NetworkConfig, rt *RuntimeConf) ([]byte, *RuntimeConf, error) { + return c.getCachedConfig(net.Network.Name, rt) +} + +func (c *CNIConfig) addNetwork(ctx context.Context, name, cniVersion string, net *NetworkConfig, prevResult types.Result, rt *RuntimeConf) (types.Result, error) { + c.ensureExec() + pluginPath, err := c.exec.FindInPath(net.Network.Type, c.Path) + if err != nil { + return nil, err + } + if err := utils.ValidateContainerID(rt.ContainerID); err != nil { + return nil, err + } + if err := utils.ValidateNetworkName(name); err != nil { + return nil, err + } + if err := utils.ValidateInterfaceName(rt.IfName); err != nil { + return nil, err + } + + newConf, err := buildOneConfig(name, cniVersion, net, prevResult, rt) + if err != nil { + return nil, err + } + + return invoke.ExecPluginWithResult(ctx, pluginPath, newConf.Bytes, c.args("ADD", rt), c.exec) +} + +// AddNetworkList executes a sequence of plugins with the ADD command +func (c *CNIConfig) AddNetworkList(ctx context.Context, list *NetworkConfigList, rt *RuntimeConf) (types.Result, error) { + var err error + var result types.Result + for _, net := range list.Plugins { + result, err = c.addNetwork(ctx, list.Name, list.CNIVersion, net, result, rt) + if err != nil { + return nil, err + } + } + + if err = c.cacheAdd(result, list.Bytes, list.Name, rt); err != nil { + return nil, fmt.Errorf("failed to set network %q cached result: %v", list.Name, err) + } + + return result, nil +} + +func (c *CNIConfig) checkNetwork(ctx context.Context, name, cniVersion string, net *NetworkConfig, prevResult types.Result, rt *RuntimeConf) error { + c.ensureExec() + pluginPath, err := c.exec.FindInPath(net.Network.Type, c.Path) + if err != nil { + return err + } + + newConf, err := buildOneConfig(name, cniVersion, net, prevResult, rt) + if err != nil { + return err + } + + return invoke.ExecPluginWithoutResult(ctx, pluginPath, newConf.Bytes, c.args("CHECK", rt), c.exec) +} + +// CheckNetworkList executes a sequence of plugins with the CHECK command +func (c *CNIConfig) CheckNetworkList(ctx context.Context, list *NetworkConfigList, rt *RuntimeConf) error { + // CHECK was added in CNI spec version 0.4.0 and higher + if gtet, err := version.GreaterThanOrEqualTo(list.CNIVersion, "0.4.0"); err != nil { + return err + } else if !gtet { + return fmt.Errorf("configuration version %q does not support the CHECK command", list.CNIVersion) + } + + if list.DisableCheck { + return nil + } + + cachedResult, err := c.getCachedResult(list.Name, list.CNIVersion, rt) + if err != nil { + return fmt.Errorf("failed to get network %q cached result: %v", list.Name, err) + } + + for _, net := range list.Plugins { + if err := c.checkNetwork(ctx, list.Name, list.CNIVersion, net, cachedResult, rt); err != nil { + return err + } + } + + return nil +} + +func (c *CNIConfig) delNetwork(ctx context.Context, name, cniVersion string, net *NetworkConfig, prevResult types.Result, rt *RuntimeConf) error { + c.ensureExec() + pluginPath, err := c.exec.FindInPath(net.Network.Type, c.Path) + if err != nil { + return err + } + + newConf, err := buildOneConfig(name, cniVersion, net, prevResult, rt) + if err != nil { + return err + } + + return invoke.ExecPluginWithoutResult(ctx, pluginPath, newConf.Bytes, c.args("DEL", rt), c.exec) +} + +// DelNetworkList executes a sequence of plugins with the DEL command +func (c *CNIConfig) DelNetworkList(ctx context.Context, list *NetworkConfigList, rt *RuntimeConf) error { + var cachedResult types.Result + + // Cached result on DEL was added in CNI spec version 0.4.0 and higher + if gtet, err := version.GreaterThanOrEqualTo(list.CNIVersion, "0.4.0"); err != nil { + return err + } else if gtet { + cachedResult, err = c.getCachedResult(list.Name, list.CNIVersion, rt) + if err != nil { + return fmt.Errorf("failed to get network %q cached result: %v", list.Name, err) + } + } + + for i := len(list.Plugins) - 1; i >= 0; i-- { + net := list.Plugins[i] + if err := c.delNetwork(ctx, list.Name, list.CNIVersion, net, cachedResult, rt); err != nil { + return err + } + } + _ = c.cacheDel(list.Name, rt) + + return nil +} + +// AddNetwork executes the plugin with the ADD command +func (c *CNIConfig) AddNetwork(ctx context.Context, net *NetworkConfig, rt *RuntimeConf) (types.Result, error) { + result, err := c.addNetwork(ctx, net.Network.Name, net.Network.CNIVersion, net, nil, rt) + if err != nil { + return nil, err + } + + if err = c.cacheAdd(result, net.Bytes, net.Network.Name, rt); err != nil { + return nil, fmt.Errorf("failed to set network %q cached result: %v", net.Network.Name, err) + } + + return result, nil +} + +// CheckNetwork executes the plugin with the CHECK command +func (c *CNIConfig) CheckNetwork(ctx context.Context, net *NetworkConfig, rt *RuntimeConf) error { + // CHECK was added in CNI spec version 0.4.0 and higher + if gtet, err := version.GreaterThanOrEqualTo(net.Network.CNIVersion, "0.4.0"); err != nil { + return err + } else if !gtet { + return fmt.Errorf("configuration version %q does not support the CHECK command", net.Network.CNIVersion) + } + + cachedResult, err := c.getCachedResult(net.Network.Name, net.Network.CNIVersion, rt) + if err != nil { + return fmt.Errorf("failed to get network %q cached result: %v", net.Network.Name, err) + } + return c.checkNetwork(ctx, net.Network.Name, net.Network.CNIVersion, net, cachedResult, rt) +} + +// DelNetwork executes the plugin with the DEL command +func (c *CNIConfig) DelNetwork(ctx context.Context, net *NetworkConfig, rt *RuntimeConf) error { + var cachedResult types.Result + + // Cached result on DEL was added in CNI spec version 0.4.0 and higher + if gtet, err := version.GreaterThanOrEqualTo(net.Network.CNIVersion, "0.4.0"); err != nil { + return err + } else if gtet { + cachedResult, err = c.getCachedResult(net.Network.Name, net.Network.CNIVersion, rt) + if err != nil { + return fmt.Errorf("failed to get network %q cached result: %v", net.Network.Name, err) + } + } + + if err := c.delNetwork(ctx, net.Network.Name, net.Network.CNIVersion, net, cachedResult, rt); err != nil { + return err + } + _ = c.cacheDel(net.Network.Name, rt) + return nil +} + +// ValidateNetworkList checks that a configuration is reasonably valid. +// - all the specified plugins exist on disk +// - every plugin supports the desired version. +// +// Returns a list of all capabilities supported by the configuration, or error +func (c *CNIConfig) ValidateNetworkList(ctx context.Context, list *NetworkConfigList) ([]string, error) { + version := list.CNIVersion + + // holding map for seen caps (in case of duplicates) + caps := map[string]interface{}{} + + errs := []error{} + for _, net := range list.Plugins { + if err := c.validatePlugin(ctx, net.Network.Type, version); err != nil { + errs = append(errs, err) + } + for c, enabled := range net.Network.Capabilities { + if !enabled { + continue + } + caps[c] = struct{}{} + } + } + + if len(errs) > 0 { + return nil, fmt.Errorf("%v", errs) + } + + // make caps list + cc := make([]string, 0, len(caps)) + for c := range caps { + cc = append(cc, c) + } + + return cc, nil +} + +// ValidateNetwork checks that a configuration is reasonably valid. +// It uses the same logic as ValidateNetworkList) +// Returns a list of capabilities +func (c *CNIConfig) ValidateNetwork(ctx context.Context, net *NetworkConfig) ([]string, error) { + caps := []string{} + for c, ok := range net.Network.Capabilities { + if ok { + caps = append(caps, c) + } + } + if err := c.validatePlugin(ctx, net.Network.Type, net.Network.CNIVersion); err != nil { + return nil, err + } + return caps, nil +} + +// validatePlugin checks that an individual plugin's configuration is sane +func (c *CNIConfig) validatePlugin(ctx context.Context, pluginName, expectedVersion string) error { + c.ensureExec() + pluginPath, err := c.exec.FindInPath(pluginName, c.Path) + if err != nil { + return err + } + if expectedVersion == "" { + expectedVersion = "0.1.0" + } + + vi, err := invoke.GetVersionInfo(ctx, pluginPath, c.exec) + if err != nil { + return err + } + for _, vers := range vi.SupportedVersions() { + if vers == expectedVersion { + return nil + } + } + return fmt.Errorf("plugin %s does not support config version %q", pluginName, expectedVersion) +} + +// GetVersionInfo reports which versions of the CNI spec are supported by +// the given plugin. +func (c *CNIConfig) GetVersionInfo(ctx context.Context, pluginType string) (version.PluginInfo, error) { + c.ensureExec() + pluginPath, err := c.exec.FindInPath(pluginType, c.Path) + if err != nil { + return nil, err + } + + return invoke.GetVersionInfo(ctx, pluginPath, c.exec) +} + +// ===== +func (c *CNIConfig) args(action string, rt *RuntimeConf) *invoke.Args { + return &invoke.Args{ + Command: action, + ContainerID: rt.ContainerID, + NetNS: rt.NetNS, + PluginArgs: rt.Args, + IfName: rt.IfName, + Path: strings.Join(c.Path, string(os.PathListSeparator)), + } +} diff --git a/cluster-autoscaler/vendor/github.com/containernetworking/cni/libcni/conf.go b/cluster-autoscaler/vendor/github.com/containernetworking/cni/libcni/conf.go new file mode 100644 index 000000000000..d8920cf8cd56 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/containernetworking/cni/libcni/conf.go @@ -0,0 +1,268 @@ +// Copyright 2015 CNI authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package libcni + +import ( + "encoding/json" + "fmt" + "io/ioutil" + "os" + "path/filepath" + "sort" +) + +type NotFoundError struct { + Dir string + Name string +} + +func (e NotFoundError) Error() string { + return fmt.Sprintf(`no net configuration with name "%s" in %s`, e.Name, e.Dir) +} + +type NoConfigsFoundError struct { + Dir string +} + +func (e NoConfigsFoundError) Error() string { + return fmt.Sprintf(`no net configurations found in %s`, e.Dir) +} + +func ConfFromBytes(bytes []byte) (*NetworkConfig, error) { + conf := &NetworkConfig{Bytes: bytes} + if err := json.Unmarshal(bytes, &conf.Network); err != nil { + return nil, fmt.Errorf("error parsing configuration: %s", err) + } + if conf.Network.Type == "" { + return nil, fmt.Errorf("error parsing configuration: missing 'type'") + } + return conf, nil +} + +func ConfFromFile(filename string) (*NetworkConfig, error) { + bytes, err := ioutil.ReadFile(filename) + if err != nil { + return nil, fmt.Errorf("error reading %s: %s", filename, err) + } + return ConfFromBytes(bytes) +} + +func ConfListFromBytes(bytes []byte) (*NetworkConfigList, error) { + rawList := make(map[string]interface{}) + if err := json.Unmarshal(bytes, &rawList); err != nil { + return nil, fmt.Errorf("error parsing configuration list: %s", err) + } + + rawName, ok := rawList["name"] + if !ok { + return nil, fmt.Errorf("error parsing configuration list: no name") + } + name, ok := rawName.(string) + if !ok { + return nil, fmt.Errorf("error parsing configuration list: invalid name type %T", rawName) + } + + var cniVersion string + rawVersion, ok := rawList["cniVersion"] + if ok { + cniVersion, ok = rawVersion.(string) + if !ok { + return nil, fmt.Errorf("error parsing configuration list: invalid cniVersion type %T", rawVersion) + } + } + + disableCheck := false + if rawDisableCheck, ok := rawList["disableCheck"]; ok { + disableCheck, ok = rawDisableCheck.(bool) + if !ok { + return nil, fmt.Errorf("error parsing configuration list: invalid disableCheck type %T", rawDisableCheck) + } + } + + list := &NetworkConfigList{ + Name: name, + DisableCheck: disableCheck, + CNIVersion: cniVersion, + Bytes: bytes, + } + + var plugins []interface{} + plug, ok := rawList["plugins"] + if !ok { + return nil, fmt.Errorf("error parsing configuration list: no 'plugins' key") + } + plugins, ok = plug.([]interface{}) + if !ok { + return nil, fmt.Errorf("error parsing configuration list: invalid 'plugins' type %T", plug) + } + if len(plugins) == 0 { + return nil, fmt.Errorf("error parsing configuration list: no plugins in list") + } + + for i, conf := range plugins { + newBytes, err := json.Marshal(conf) + if err != nil { + return nil, fmt.Errorf("failed to marshal plugin config %d: %v", i, err) + } + netConf, err := ConfFromBytes(newBytes) + if err != nil { + return nil, fmt.Errorf("failed to parse plugin config %d: %v", i, err) + } + list.Plugins = append(list.Plugins, netConf) + } + + return list, nil +} + +func ConfListFromFile(filename string) (*NetworkConfigList, error) { + bytes, err := ioutil.ReadFile(filename) + if err != nil { + return nil, fmt.Errorf("error reading %s: %s", filename, err) + } + return ConfListFromBytes(bytes) +} + +func ConfFiles(dir string, extensions []string) ([]string, error) { + // In part, adapted from rkt/networking/podenv.go#listFiles + files, err := ioutil.ReadDir(dir) + switch { + case err == nil: // break + case os.IsNotExist(err): + return nil, nil + default: + return nil, err + } + + confFiles := []string{} + for _, f := range files { + if f.IsDir() { + continue + } + fileExt := filepath.Ext(f.Name()) + for _, ext := range extensions { + if fileExt == ext { + confFiles = append(confFiles, filepath.Join(dir, f.Name())) + } + } + } + return confFiles, nil +} + +func LoadConf(dir, name string) (*NetworkConfig, error) { + files, err := ConfFiles(dir, []string{".conf", ".json"}) + switch { + case err != nil: + return nil, err + case len(files) == 0: + return nil, NoConfigsFoundError{Dir: dir} + } + sort.Strings(files) + + for _, confFile := range files { + conf, err := ConfFromFile(confFile) + if err != nil { + return nil, err + } + if conf.Network.Name == name { + return conf, nil + } + } + return nil, NotFoundError{dir, name} +} + +func LoadConfList(dir, name string) (*NetworkConfigList, error) { + files, err := ConfFiles(dir, []string{".conflist"}) + if err != nil { + return nil, err + } + sort.Strings(files) + + for _, confFile := range files { + conf, err := ConfListFromFile(confFile) + if err != nil { + return nil, err + } + if conf.Name == name { + return conf, nil + } + } + + // Try and load a network configuration file (instead of list) + // from the same name, then upconvert. + singleConf, err := LoadConf(dir, name) + if err != nil { + // A little extra logic so the error makes sense + if _, ok := err.(NoConfigsFoundError); len(files) != 0 && ok { + // Config lists found but no config files found + return nil, NotFoundError{dir, name} + } + + return nil, err + } + return ConfListFromConf(singleConf) +} + +func InjectConf(original *NetworkConfig, newValues map[string]interface{}) (*NetworkConfig, error) { + config := make(map[string]interface{}) + err := json.Unmarshal(original.Bytes, &config) + if err != nil { + return nil, fmt.Errorf("unmarshal existing network bytes: %s", err) + } + + for key, value := range newValues { + if key == "" { + return nil, fmt.Errorf("keys cannot be empty") + } + + if value == nil { + return nil, fmt.Errorf("key '%s' value must not be nil", key) + } + + config[key] = value + } + + newBytes, err := json.Marshal(config) + if err != nil { + return nil, err + } + + return ConfFromBytes(newBytes) +} + +// ConfListFromConf "upconverts" a network config in to a NetworkConfigList, +// with the single network as the only entry in the list. +func ConfListFromConf(original *NetworkConfig) (*NetworkConfigList, error) { + // Re-deserialize the config's json, then make a raw map configlist. + // This may seem a bit strange, but it's to make the Bytes fields + // actually make sense. Otherwise, the generated json is littered with + // golang default values. + + rawConfig := make(map[string]interface{}) + if err := json.Unmarshal(original.Bytes, &rawConfig); err != nil { + return nil, err + } + + rawConfigList := map[string]interface{}{ + "name": original.Network.Name, + "cniVersion": original.Network.CNIVersion, + "plugins": []interface{}{rawConfig}, + } + + b, err := json.Marshal(rawConfigList) + if err != nil { + return nil, err + } + return ConfListFromBytes(b) +} diff --git a/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/invoke/args.go b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/invoke/args.go new file mode 100644 index 000000000000..3cdb4bc8dadf --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/invoke/args.go @@ -0,0 +1,128 @@ +// Copyright 2015 CNI authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package invoke + +import ( + "fmt" + "os" + "strings" +) + +type CNIArgs interface { + // For use with os/exec; i.e., return nil to inherit the + // environment from this process + // For use in delegation; inherit the environment from this + // process and allow overrides + AsEnv() []string +} + +type inherited struct{} + +var inheritArgsFromEnv inherited + +func (*inherited) AsEnv() []string { + return nil +} + +func ArgsFromEnv() CNIArgs { + return &inheritArgsFromEnv +} + +type Args struct { + Command string + ContainerID string + NetNS string + PluginArgs [][2]string + PluginArgsStr string + IfName string + Path string +} + +// Args implements the CNIArgs interface +var _ CNIArgs = &Args{} + +func (args *Args) AsEnv() []string { + env := os.Environ() + pluginArgsStr := args.PluginArgsStr + if pluginArgsStr == "" { + pluginArgsStr = stringify(args.PluginArgs) + } + + // Duplicated values which come first will be overridden, so we must put the + // custom values in the end to avoid being overridden by the process environments. + env = append(env, + "CNI_COMMAND="+args.Command, + "CNI_CONTAINERID="+args.ContainerID, + "CNI_NETNS="+args.NetNS, + "CNI_ARGS="+pluginArgsStr, + "CNI_IFNAME="+args.IfName, + "CNI_PATH="+args.Path, + ) + return dedupEnv(env) +} + +// taken from rkt/networking/net_plugin.go +func stringify(pluginArgs [][2]string) string { + entries := make([]string, len(pluginArgs)) + + for i, kv := range pluginArgs { + entries[i] = strings.Join(kv[:], "=") + } + + return strings.Join(entries, ";") +} + +// DelegateArgs implements the CNIArgs interface +// used for delegation to inherit from environments +// and allow some overrides like CNI_COMMAND +var _ CNIArgs = &DelegateArgs{} + +type DelegateArgs struct { + Command string +} + +func (d *DelegateArgs) AsEnv() []string { + env := os.Environ() + + // The custom values should come in the end to override the existing + // process environment of the same key. + env = append(env, + "CNI_COMMAND="+d.Command, + ) + return dedupEnv(env) +} + +// dedupEnv returns a copy of env with any duplicates removed, in favor of later values. +// Items not of the normal environment "key=value" form are preserved unchanged. +func dedupEnv(env []string) []string { + out := make([]string, 0, len(env)) + envMap := map[string]string{} + + for _, kv := range env { + // find the first "=" in environment, if not, just keep it + eq := strings.Index(kv, "=") + if eq < 0 { + out = append(out, kv) + continue + } + envMap[kv[:eq]] = kv[eq+1:] + } + + for k, v := range envMap { + out = append(out, fmt.Sprintf("%s=%s", k, v)) + } + + return out +} diff --git a/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/invoke/delegate.go b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/invoke/delegate.go new file mode 100644 index 000000000000..8defe4dd3982 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/invoke/delegate.go @@ -0,0 +1,80 @@ +// Copyright 2016 CNI authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package invoke + +import ( + "context" + "os" + "path/filepath" + + "github.com/containernetworking/cni/pkg/types" +) + +func delegateCommon(delegatePlugin string, exec Exec) (string, Exec, error) { + if exec == nil { + exec = defaultExec + } + + paths := filepath.SplitList(os.Getenv("CNI_PATH")) + pluginPath, err := exec.FindInPath(delegatePlugin, paths) + if err != nil { + return "", nil, err + } + + return pluginPath, exec, nil +} + +// DelegateAdd calls the given delegate plugin with the CNI ADD action and +// JSON configuration +func DelegateAdd(ctx context.Context, delegatePlugin string, netconf []byte, exec Exec) (types.Result, error) { + pluginPath, realExec, err := delegateCommon(delegatePlugin, exec) + if err != nil { + return nil, err + } + + // DelegateAdd will override the original "CNI_COMMAND" env from process with ADD + return ExecPluginWithResult(ctx, pluginPath, netconf, delegateArgs("ADD"), realExec) +} + +// DelegateCheck calls the given delegate plugin with the CNI CHECK action and +// JSON configuration +func DelegateCheck(ctx context.Context, delegatePlugin string, netconf []byte, exec Exec) error { + pluginPath, realExec, err := delegateCommon(delegatePlugin, exec) + if err != nil { + return err + } + + // DelegateCheck will override the original CNI_COMMAND env from process with CHECK + return ExecPluginWithoutResult(ctx, pluginPath, netconf, delegateArgs("CHECK"), realExec) +} + +// DelegateDel calls the given delegate plugin with the CNI DEL action and +// JSON configuration +func DelegateDel(ctx context.Context, delegatePlugin string, netconf []byte, exec Exec) error { + pluginPath, realExec, err := delegateCommon(delegatePlugin, exec) + if err != nil { + return err + } + + // DelegateDel will override the original CNI_COMMAND env from process with DEL + return ExecPluginWithoutResult(ctx, pluginPath, netconf, delegateArgs("DEL"), realExec) +} + +// return CNIArgs used by delegation +func delegateArgs(action string) *DelegateArgs { + return &DelegateArgs{ + Command: action, + } +} diff --git a/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/invoke/exec.go b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/invoke/exec.go new file mode 100644 index 000000000000..8e6d30b82904 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/invoke/exec.go @@ -0,0 +1,144 @@ +// Copyright 2015 CNI authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package invoke + +import ( + "context" + "fmt" + "os" + + "github.com/containernetworking/cni/pkg/types" + "github.com/containernetworking/cni/pkg/version" +) + +// Exec is an interface encapsulates all operations that deal with finding +// and executing a CNI plugin. Tests may provide a fake implementation +// to avoid writing fake plugins to temporary directories during the test. +type Exec interface { + ExecPlugin(ctx context.Context, pluginPath string, stdinData []byte, environ []string) ([]byte, error) + FindInPath(plugin string, paths []string) (string, error) + Decode(jsonBytes []byte) (version.PluginInfo, error) +} + +// For example, a testcase could pass an instance of the following fakeExec +// object to ExecPluginWithResult() to verify the incoming stdin and environment +// and provide a tailored response: +// +//import ( +// "encoding/json" +// "path" +// "strings" +//) +// +//type fakeExec struct { +// version.PluginDecoder +//} +// +//func (f *fakeExec) ExecPlugin(pluginPath string, stdinData []byte, environ []string) ([]byte, error) { +// net := &types.NetConf{} +// err := json.Unmarshal(stdinData, net) +// if err != nil { +// return nil, fmt.Errorf("failed to unmarshal configuration: %v", err) +// } +// pluginName := path.Base(pluginPath) +// if pluginName != net.Type { +// return nil, fmt.Errorf("plugin name %q did not match config type %q", pluginName, net.Type) +// } +// for _, e := range environ { +// // Check environment for forced failure request +// parts := strings.Split(e, "=") +// if len(parts) > 0 && parts[0] == "FAIL" { +// return nil, fmt.Errorf("failed to execute plugin %s", pluginName) +// } +// } +// return []byte("{\"CNIVersion\":\"0.4.0\"}"), nil +//} +// +//func (f *fakeExec) FindInPath(plugin string, paths []string) (string, error) { +// if len(paths) > 0 { +// return path.Join(paths[0], plugin), nil +// } +// return "", fmt.Errorf("failed to find plugin %s in paths %v", plugin, paths) +//} + +func ExecPluginWithResult(ctx context.Context, pluginPath string, netconf []byte, args CNIArgs, exec Exec) (types.Result, error) { + if exec == nil { + exec = defaultExec + } + + stdoutBytes, err := exec.ExecPlugin(ctx, pluginPath, netconf, args.AsEnv()) + if err != nil { + return nil, err + } + + // Plugin must return result in same version as specified in netconf + versionDecoder := &version.ConfigDecoder{} + confVersion, err := versionDecoder.Decode(netconf) + if err != nil { + return nil, err + } + + return version.NewResult(confVersion, stdoutBytes) +} + +func ExecPluginWithoutResult(ctx context.Context, pluginPath string, netconf []byte, args CNIArgs, exec Exec) error { + if exec == nil { + exec = defaultExec + } + _, err := exec.ExecPlugin(ctx, pluginPath, netconf, args.AsEnv()) + return err +} + +// GetVersionInfo returns the version information available about the plugin. +// For recent-enough plugins, it uses the information returned by the VERSION +// command. For older plugins which do not recognize that command, it reports +// version 0.1.0 +func GetVersionInfo(ctx context.Context, pluginPath string, exec Exec) (version.PluginInfo, error) { + if exec == nil { + exec = defaultExec + } + args := &Args{ + Command: "VERSION", + + // set fake values required by plugins built against an older version of skel + NetNS: "dummy", + IfName: "dummy", + Path: "dummy", + } + stdin := []byte(fmt.Sprintf(`{"cniVersion":%q}`, version.Current())) + stdoutBytes, err := exec.ExecPlugin(ctx, pluginPath, stdin, args.AsEnv()) + if err != nil { + if err.Error() == "unknown CNI_COMMAND: VERSION" { + return version.PluginSupports("0.1.0"), nil + } + return nil, err + } + + return exec.Decode(stdoutBytes) +} + +// DefaultExec is an object that implements the Exec interface which looks +// for and executes plugins from disk. +type DefaultExec struct { + *RawExec + version.PluginDecoder +} + +// DefaultExec implements the Exec interface +var _ Exec = &DefaultExec{} + +var defaultExec = &DefaultExec{ + RawExec: &RawExec{Stderr: os.Stderr}, +} diff --git a/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/invoke/find.go b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/invoke/find.go new file mode 100644 index 000000000000..e62029eb788b --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/invoke/find.go @@ -0,0 +1,48 @@ +// Copyright 2015 CNI authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package invoke + +import ( + "fmt" + "os" + "path/filepath" + "strings" +) + +// FindInPath returns the full path of the plugin by searching in the provided path +func FindInPath(plugin string, paths []string) (string, error) { + if plugin == "" { + return "", fmt.Errorf("no plugin name provided") + } + + if strings.ContainsRune(plugin, os.PathSeparator) { + return "", fmt.Errorf("invalid plugin name: %s", plugin) + } + + if len(paths) == 0 { + return "", fmt.Errorf("no paths provided") + } + + for _, path := range paths { + for _, fe := range ExecutableFileExtensions { + fullpath := filepath.Join(path, plugin) + fe + if fi, err := os.Stat(fullpath); err == nil && fi.Mode().IsRegular() { + return fullpath, nil + } + } + } + + return "", fmt.Errorf("failed to find plugin %q in path %s", plugin, paths) +} diff --git a/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/invoke/os_unix.go b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/invoke/os_unix.go new file mode 100644 index 000000000000..9bcfb4553677 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/invoke/os_unix.go @@ -0,0 +1,20 @@ +// Copyright 2016 CNI authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +package invoke + +// Valid file extensions for plugin executables. +var ExecutableFileExtensions = []string{""} diff --git a/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/invoke/os_windows.go b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/invoke/os_windows.go new file mode 100644 index 000000000000..7665125b133c --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/invoke/os_windows.go @@ -0,0 +1,18 @@ +// Copyright 2016 CNI authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package invoke + +// Valid file extensions for plugin executables. +var ExecutableFileExtensions = []string{".exe", ""} diff --git a/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/invoke/raw_exec.go b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/invoke/raw_exec.go new file mode 100644 index 000000000000..5ab5cc885762 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/invoke/raw_exec.go @@ -0,0 +1,88 @@ +// Copyright 2016 CNI authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package invoke + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "os/exec" + "strings" + "time" + + "github.com/containernetworking/cni/pkg/types" +) + +type RawExec struct { + Stderr io.Writer +} + +func (e *RawExec) ExecPlugin(ctx context.Context, pluginPath string, stdinData []byte, environ []string) ([]byte, error) { + stdout := &bytes.Buffer{} + stderr := &bytes.Buffer{} + c := exec.CommandContext(ctx, pluginPath) + c.Env = environ + c.Stdin = bytes.NewBuffer(stdinData) + c.Stdout = stdout + c.Stderr = stderr + + // Retry the command on "text file busy" errors + for i := 0; i <= 5; i++ { + err := c.Run() + + // Command succeeded + if err == nil { + break + } + + // If the plugin is currently about to be written, then we wait a + // second and try it again + if strings.Contains(err.Error(), "text file busy") { + time.Sleep(time.Second) + continue + } + + // All other errors except than the busy text file + return nil, e.pluginErr(err, stdout.Bytes(), stderr.Bytes()) + } + + // Copy stderr to caller's buffer in case plugin printed to both + // stdout and stderr for some reason. Ignore failures as stderr is + // only informational. + if e.Stderr != nil && stderr.Len() > 0 { + _, _ = stderr.WriteTo(e.Stderr) + } + return stdout.Bytes(), nil +} + +func (e *RawExec) pluginErr(err error, stdout, stderr []byte) error { + emsg := types.Error{} + if len(stdout) == 0 { + if len(stderr) == 0 { + emsg.Msg = fmt.Sprintf("netplugin failed with no error message: %v", err) + } else { + emsg.Msg = fmt.Sprintf("netplugin failed: %q", string(stderr)) + } + } else if perr := json.Unmarshal(stdout, &emsg); perr != nil { + emsg.Msg = fmt.Sprintf("netplugin failed but error parsing its diagnostic message %q: %v", string(stdout), perr) + } + return &emsg +} + +func (e *RawExec) FindInPath(plugin string, paths []string) (string, error) { + return FindInPath(plugin, paths) +} diff --git a/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/types/020/types.go b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/types/020/types.go new file mode 100644 index 000000000000..36f31678a8e6 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/types/020/types.go @@ -0,0 +1,126 @@ +// Copyright 2016 CNI authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types020 + +import ( + "encoding/json" + "fmt" + "io" + "net" + "os" + + "github.com/containernetworking/cni/pkg/types" +) + +const ImplementedSpecVersion string = "0.2.0" + +var SupportedVersions = []string{"", "0.1.0", ImplementedSpecVersion} + +// Compatibility types for CNI version 0.1.0 and 0.2.0 + +func NewResult(data []byte) (types.Result, error) { + result := &Result{} + if err := json.Unmarshal(data, result); err != nil { + return nil, err + } + return result, nil +} + +func GetResult(r types.Result) (*Result, error) { + // We expect version 0.1.0/0.2.0 results + result020, err := r.GetAsVersion(ImplementedSpecVersion) + if err != nil { + return nil, err + } + result, ok := result020.(*Result) + if !ok { + return nil, fmt.Errorf("failed to convert result") + } + return result, nil +} + +// Result is what gets returned from the plugin (via stdout) to the caller +type Result struct { + CNIVersion string `json:"cniVersion,omitempty"` + IP4 *IPConfig `json:"ip4,omitempty"` + IP6 *IPConfig `json:"ip6,omitempty"` + DNS types.DNS `json:"dns,omitempty"` +} + +func (r *Result) Version() string { + return ImplementedSpecVersion +} + +func (r *Result) GetAsVersion(version string) (types.Result, error) { + for _, supportedVersion := range SupportedVersions { + if version == supportedVersion { + r.CNIVersion = version + return r, nil + } + } + return nil, fmt.Errorf("cannot convert version %q to %s", SupportedVersions, version) +} + +func (r *Result) Print() error { + return r.PrintTo(os.Stdout) +} + +func (r *Result) PrintTo(writer io.Writer) error { + data, err := json.MarshalIndent(r, "", " ") + if err != nil { + return err + } + _, err = writer.Write(data) + return err +} + +// IPConfig contains values necessary to configure an interface +type IPConfig struct { + IP net.IPNet + Gateway net.IP + Routes []types.Route +} + +// net.IPNet is not JSON (un)marshallable so this duality is needed +// for our custom IPNet type + +// JSON (un)marshallable types +type ipConfig struct { + IP types.IPNet `json:"ip"` + Gateway net.IP `json:"gateway,omitempty"` + Routes []types.Route `json:"routes,omitempty"` +} + +func (c *IPConfig) MarshalJSON() ([]byte, error) { + ipc := ipConfig{ + IP: types.IPNet(c.IP), + Gateway: c.Gateway, + Routes: c.Routes, + } + + return json.Marshal(ipc) +} + +func (c *IPConfig) UnmarshalJSON(data []byte) error { + ipc := ipConfig{} + if err := json.Unmarshal(data, &ipc); err != nil { + return err + } + + c.IP = net.IPNet(ipc.IP) + c.Gateway = ipc.Gateway + c.Routes = ipc.Routes + return nil +} diff --git a/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/types/args.go b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/types/args.go new file mode 100644 index 000000000000..4eac64899470 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/types/args.go @@ -0,0 +1,112 @@ +// Copyright 2015 CNI authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "encoding" + "fmt" + "reflect" + "strings" +) + +// UnmarshallableBool typedef for builtin bool +// because builtin type's methods can't be declared +type UnmarshallableBool bool + +// UnmarshalText implements the encoding.TextUnmarshaler interface. +// Returns boolean true if the string is "1" or "[Tt]rue" +// Returns boolean false if the string is "0" or "[Ff]alse" +func (b *UnmarshallableBool) UnmarshalText(data []byte) error { + s := strings.ToLower(string(data)) + switch s { + case "1", "true": + *b = true + case "0", "false": + *b = false + default: + return fmt.Errorf("boolean unmarshal error: invalid input %s", s) + } + return nil +} + +// UnmarshallableString typedef for builtin string +type UnmarshallableString string + +// UnmarshalText implements the encoding.TextUnmarshaler interface. +// Returns the string +func (s *UnmarshallableString) UnmarshalText(data []byte) error { + *s = UnmarshallableString(data) + return nil +} + +// CommonArgs contains the IgnoreUnknown argument +// and must be embedded by all Arg structs +type CommonArgs struct { + IgnoreUnknown UnmarshallableBool `json:"ignoreunknown,omitempty"` +} + +// GetKeyField is a helper function to receive Values +// Values that represent a pointer to a struct +func GetKeyField(keyString string, v reflect.Value) reflect.Value { + return v.Elem().FieldByName(keyString) +} + +// UnmarshalableArgsError is used to indicate error unmarshalling args +// from the args-string in the form "K=V;K2=V2;..." +type UnmarshalableArgsError struct { + error +} + +// LoadArgs parses args from a string in the form "K=V;K2=V2;..." +func LoadArgs(args string, container interface{}) error { + if args == "" { + return nil + } + + containerValue := reflect.ValueOf(container) + + pairs := strings.Split(args, ";") + unknownArgs := []string{} + for _, pair := range pairs { + kv := strings.Split(pair, "=") + if len(kv) != 2 { + return fmt.Errorf("ARGS: invalid pair %q", pair) + } + keyString := kv[0] + valueString := kv[1] + keyField := GetKeyField(keyString, containerValue) + if !keyField.IsValid() { + unknownArgs = append(unknownArgs, pair) + continue + } + keyFieldIface := keyField.Addr().Interface() + u, ok := keyFieldIface.(encoding.TextUnmarshaler) + if !ok { + return UnmarshalableArgsError{fmt.Errorf( + "ARGS: cannot unmarshal into field '%s' - type '%s' does not implement encoding.TextUnmarshaler", + keyString, reflect.TypeOf(keyFieldIface))} + } + err := u.UnmarshalText([]byte(valueString)) + if err != nil { + return fmt.Errorf("ARGS: error parsing value of pair %q: %v)", pair, err) + } + } + + isIgnoreUnknown := GetKeyField("IgnoreUnknown", containerValue).Bool() + if len(unknownArgs) > 0 && !isIgnoreUnknown { + return fmt.Errorf("ARGS: unknown args %q", unknownArgs) + } + return nil +} diff --git a/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/types/current/types.go b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/types/current/types.go new file mode 100644 index 000000000000..754cc6e722ea --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/types/current/types.go @@ -0,0 +1,276 @@ +// Copyright 2016 CNI authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package current + +import ( + "encoding/json" + "fmt" + "io" + "net" + "os" + + "github.com/containernetworking/cni/pkg/types" + "github.com/containernetworking/cni/pkg/types/020" +) + +const ImplementedSpecVersion string = "0.4.0" + +var SupportedVersions = []string{"0.3.0", "0.3.1", ImplementedSpecVersion} + +func NewResult(data []byte) (types.Result, error) { + result := &Result{} + if err := json.Unmarshal(data, result); err != nil { + return nil, err + } + return result, nil +} + +func GetResult(r types.Result) (*Result, error) { + resultCurrent, err := r.GetAsVersion(ImplementedSpecVersion) + if err != nil { + return nil, err + } + result, ok := resultCurrent.(*Result) + if !ok { + return nil, fmt.Errorf("failed to convert result") + } + return result, nil +} + +var resultConverters = []struct { + versions []string + convert func(types.Result) (*Result, error) +}{ + {types020.SupportedVersions, convertFrom020}, + {SupportedVersions, convertFrom030}, +} + +func convertFrom020(result types.Result) (*Result, error) { + oldResult, err := types020.GetResult(result) + if err != nil { + return nil, err + } + + newResult := &Result{ + CNIVersion: ImplementedSpecVersion, + DNS: oldResult.DNS, + Routes: []*types.Route{}, + } + + if oldResult.IP4 != nil { + newResult.IPs = append(newResult.IPs, &IPConfig{ + Version: "4", + Address: oldResult.IP4.IP, + Gateway: oldResult.IP4.Gateway, + }) + for _, route := range oldResult.IP4.Routes { + newResult.Routes = append(newResult.Routes, &types.Route{ + Dst: route.Dst, + GW: route.GW, + }) + } + } + + if oldResult.IP6 != nil { + newResult.IPs = append(newResult.IPs, &IPConfig{ + Version: "6", + Address: oldResult.IP6.IP, + Gateway: oldResult.IP6.Gateway, + }) + for _, route := range oldResult.IP6.Routes { + newResult.Routes = append(newResult.Routes, &types.Route{ + Dst: route.Dst, + GW: route.GW, + }) + } + } + + return newResult, nil +} + +func convertFrom030(result types.Result) (*Result, error) { + newResult, ok := result.(*Result) + if !ok { + return nil, fmt.Errorf("failed to convert result") + } + newResult.CNIVersion = ImplementedSpecVersion + return newResult, nil +} + +func NewResultFromResult(result types.Result) (*Result, error) { + version := result.Version() + for _, converter := range resultConverters { + for _, supportedVersion := range converter.versions { + if version == supportedVersion { + return converter.convert(result) + } + } + } + return nil, fmt.Errorf("unsupported CNI result22 version %q", version) +} + +// Result is what gets returned from the plugin (via stdout) to the caller +type Result struct { + CNIVersion string `json:"cniVersion,omitempty"` + Interfaces []*Interface `json:"interfaces,omitempty"` + IPs []*IPConfig `json:"ips,omitempty"` + Routes []*types.Route `json:"routes,omitempty"` + DNS types.DNS `json:"dns,omitempty"` +} + +// Convert to the older 0.2.0 CNI spec Result type +func (r *Result) convertTo020() (*types020.Result, error) { + oldResult := &types020.Result{ + CNIVersion: types020.ImplementedSpecVersion, + DNS: r.DNS, + } + + for _, ip := range r.IPs { + // Only convert the first IP address of each version as 0.2.0 + // and earlier cannot handle multiple IP addresses + if ip.Version == "4" && oldResult.IP4 == nil { + oldResult.IP4 = &types020.IPConfig{ + IP: ip.Address, + Gateway: ip.Gateway, + } + } else if ip.Version == "6" && oldResult.IP6 == nil { + oldResult.IP6 = &types020.IPConfig{ + IP: ip.Address, + Gateway: ip.Gateway, + } + } + + if oldResult.IP4 != nil && oldResult.IP6 != nil { + break + } + } + + for _, route := range r.Routes { + is4 := route.Dst.IP.To4() != nil + if is4 && oldResult.IP4 != nil { + oldResult.IP4.Routes = append(oldResult.IP4.Routes, types.Route{ + Dst: route.Dst, + GW: route.GW, + }) + } else if !is4 && oldResult.IP6 != nil { + oldResult.IP6.Routes = append(oldResult.IP6.Routes, types.Route{ + Dst: route.Dst, + GW: route.GW, + }) + } + } + + if oldResult.IP4 == nil && oldResult.IP6 == nil { + return nil, fmt.Errorf("cannot convert: no valid IP addresses") + } + + return oldResult, nil +} + +func (r *Result) Version() string { + return ImplementedSpecVersion +} + +func (r *Result) GetAsVersion(version string) (types.Result, error) { + switch version { + case "0.3.0", "0.3.1", ImplementedSpecVersion: + r.CNIVersion = version + return r, nil + case types020.SupportedVersions[0], types020.SupportedVersions[1], types020.SupportedVersions[2]: + return r.convertTo020() + } + return nil, fmt.Errorf("cannot convert version 0.3.x to %q", version) +} + +func (r *Result) Print() error { + return r.PrintTo(os.Stdout) +} + +func (r *Result) PrintTo(writer io.Writer) error { + data, err := json.MarshalIndent(r, "", " ") + if err != nil { + return err + } + _, err = writer.Write(data) + return err +} + +// Convert this old version result to the current CNI version result +func (r *Result) Convert() (*Result, error) { + return r, nil +} + +// Interface contains values about the created interfaces +type Interface struct { + Name string `json:"name"` + Mac string `json:"mac,omitempty"` + Sandbox string `json:"sandbox,omitempty"` +} + +func (i *Interface) String() string { + return fmt.Sprintf("%+v", *i) +} + +// Int returns a pointer to the int value passed in. Used to +// set the IPConfig.Interface field. +func Int(v int) *int { + return &v +} + +// IPConfig contains values necessary to configure an IP address on an interface +type IPConfig struct { + // IP version, either "4" or "6" + Version string + // Index into Result structs Interfaces list + Interface *int + Address net.IPNet + Gateway net.IP +} + +func (i *IPConfig) String() string { + return fmt.Sprintf("%+v", *i) +} + +// JSON (un)marshallable types +type ipConfig struct { + Version string `json:"version"` + Interface *int `json:"interface,omitempty"` + Address types.IPNet `json:"address"` + Gateway net.IP `json:"gateway,omitempty"` +} + +func (c *IPConfig) MarshalJSON() ([]byte, error) { + ipc := ipConfig{ + Version: c.Version, + Interface: c.Interface, + Address: types.IPNet(c.Address), + Gateway: c.Gateway, + } + + return json.Marshal(ipc) +} + +func (c *IPConfig) UnmarshalJSON(data []byte) error { + ipc := ipConfig{} + if err := json.Unmarshal(data, &ipc); err != nil { + return err + } + + c.Version = ipc.Version + c.Interface = ipc.Interface + c.Address = net.IPNet(ipc.Address) + c.Gateway = ipc.Gateway + return nil +} diff --git a/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/types/types.go b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/types/types.go new file mode 100644 index 000000000000..3fa757a5d224 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/types/types.go @@ -0,0 +1,207 @@ +// Copyright 2015 CNI authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "encoding/json" + "fmt" + "io" + "net" + "os" +) + +// like net.IPNet but adds JSON marshalling and unmarshalling +type IPNet net.IPNet + +// ParseCIDR takes a string like "10.2.3.1/24" and +// return IPNet with "10.2.3.1" and /24 mask +func ParseCIDR(s string) (*net.IPNet, error) { + ip, ipn, err := net.ParseCIDR(s) + if err != nil { + return nil, err + } + + ipn.IP = ip + return ipn, nil +} + +func (n IPNet) MarshalJSON() ([]byte, error) { + return json.Marshal((*net.IPNet)(&n).String()) +} + +func (n *IPNet) UnmarshalJSON(data []byte) error { + var s string + if err := json.Unmarshal(data, &s); err != nil { + return err + } + + tmp, err := ParseCIDR(s) + if err != nil { + return err + } + + *n = IPNet(*tmp) + return nil +} + +// NetConf describes a network. +type NetConf struct { + CNIVersion string `json:"cniVersion,omitempty"` + + Name string `json:"name,omitempty"` + Type string `json:"type,omitempty"` + Capabilities map[string]bool `json:"capabilities,omitempty"` + IPAM IPAM `json:"ipam,omitempty"` + DNS DNS `json:"dns"` + + RawPrevResult map[string]interface{} `json:"prevResult,omitempty"` + PrevResult Result `json:"-"` +} + +type IPAM struct { + Type string `json:"type,omitempty"` +} + +// NetConfList describes an ordered list of networks. +type NetConfList struct { + CNIVersion string `json:"cniVersion,omitempty"` + + Name string `json:"name,omitempty"` + DisableCheck bool `json:"disableCheck,omitempty"` + Plugins []*NetConf `json:"plugins,omitempty"` +} + +type ResultFactoryFunc func([]byte) (Result, error) + +// Result is an interface that provides the result of plugin execution +type Result interface { + // The highest CNI specification result version the result supports + // without having to convert + Version() string + + // Returns the result converted into the requested CNI specification + // result version, or an error if conversion failed + GetAsVersion(version string) (Result, error) + + // Prints the result in JSON format to stdout + Print() error + + // Prints the result in JSON format to provided writer + PrintTo(writer io.Writer) error +} + +func PrintResult(result Result, version string) error { + newResult, err := result.GetAsVersion(version) + if err != nil { + return err + } + return newResult.Print() +} + +// DNS contains values interesting for DNS resolvers +type DNS struct { + Nameservers []string `json:"nameservers,omitempty"` + Domain string `json:"domain,omitempty"` + Search []string `json:"search,omitempty"` + Options []string `json:"options,omitempty"` +} + +type Route struct { + Dst net.IPNet + GW net.IP +} + +func (r *Route) String() string { + return fmt.Sprintf("%+v", *r) +} + +// Well known error codes +// see https://github.com/containernetworking/cni/blob/master/SPEC.md#well-known-error-codes +const ( + ErrUnknown uint = iota // 0 + ErrIncompatibleCNIVersion // 1 + ErrUnsupportedField // 2 + ErrUnknownContainer // 3 + ErrInvalidEnvironmentVariables // 4 + ErrIOFailure // 5 + ErrDecodingFailure // 6 + ErrInvalidNetworkConfig // 7 + ErrTryAgainLater uint = 11 + ErrInternal uint = 999 +) + +type Error struct { + Code uint `json:"code"` + Msg string `json:"msg"` + Details string `json:"details,omitempty"` +} + +func NewError(code uint, msg, details string) *Error { + return &Error{ + Code: code, + Msg: msg, + Details: details, + } +} + +func (e *Error) Error() string { + details := "" + if e.Details != "" { + details = fmt.Sprintf("; %v", e.Details) + } + return fmt.Sprintf("%v%v", e.Msg, details) +} + +func (e *Error) Print() error { + return prettyPrint(e) +} + +// net.IPNet is not JSON (un)marshallable so this duality is needed +// for our custom IPNet type + +// JSON (un)marshallable types +type route struct { + Dst IPNet `json:"dst"` + GW net.IP `json:"gw,omitempty"` +} + +func (r *Route) UnmarshalJSON(data []byte) error { + rt := route{} + if err := json.Unmarshal(data, &rt); err != nil { + return err + } + + r.Dst = net.IPNet(rt.Dst) + r.GW = rt.GW + return nil +} + +func (r Route) MarshalJSON() ([]byte, error) { + rt := route{ + Dst: IPNet(r.Dst), + GW: r.GW, + } + + return json.Marshal(rt) +} + +func prettyPrint(obj interface{}) error { + data, err := json.MarshalIndent(obj, "", " ") + if err != nil { + return err + } + _, err = os.Stdout.Write(data) + return err +} diff --git a/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/utils/utils.go b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/utils/utils.go new file mode 100644 index 000000000000..b8ec38874595 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/utils/utils.go @@ -0,0 +1,84 @@ +// Copyright 2019 CNI authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package utils + +import ( + "bytes" + "fmt" + "regexp" + "unicode" + + "github.com/containernetworking/cni/pkg/types" +) + +const ( + // cniValidNameChars is the regexp used to validate valid characters in + // containerID and networkName + cniValidNameChars = `[a-zA-Z0-9][a-zA-Z0-9_.\-]` + + // maxInterfaceNameLength is the length max of a valid interface name + maxInterfaceNameLength = 15 +) + +var cniReg = regexp.MustCompile(`^` + cniValidNameChars + `*$`) + +// ValidateContainerID will validate that the supplied containerID is not empty does not contain invalid characters +func ValidateContainerID(containerID string) *types.Error { + + if containerID == "" { + return types.NewError(types.ErrUnknownContainer, "missing containerID", "") + } + if !cniReg.MatchString(containerID) { + return types.NewError(types.ErrInvalidEnvironmentVariables, "invalid characters in containerID", containerID) + } + return nil +} + +// ValidateNetworkName will validate that the supplied networkName does not contain invalid characters +func ValidateNetworkName(networkName string) *types.Error { + + if networkName == "" { + return types.NewError(types.ErrInvalidNetworkConfig, "missing network name:", "") + } + if !cniReg.MatchString(networkName) { + return types.NewError(types.ErrInvalidNetworkConfig, "invalid characters found in network name", networkName) + } + return nil +} + +// ValidateInterfaceName will validate the interface name based on the three rules below +// 1. The name must not be empty +// 2. The name must be less than 16 characters +// 3. The name must not be "." or ".." +// 3. The name must not contain / or : or any whitespace characters +// ref to https://github.com/torvalds/linux/blob/master/net/core/dev.c#L1024 +func ValidateInterfaceName(ifName string) *types.Error { + if len(ifName) == 0 { + return types.NewError(types.ErrInvalidEnvironmentVariables, "interface name is empty", "") + } + if len(ifName) > maxInterfaceNameLength { + return types.NewError(types.ErrInvalidEnvironmentVariables, "interface name is too long", fmt.Sprintf("interface name should be less than %d characters", maxInterfaceNameLength+1)) + } + if ifName == "." || ifName == ".." { + return types.NewError(types.ErrInvalidEnvironmentVariables, "interface name is . or ..", "") + } + for _, r := range bytes.Runes([]byte(ifName)) { + if r == '/' || r == ':' || unicode.IsSpace(r) { + return types.NewError(types.ErrInvalidEnvironmentVariables, "interface name contains / or : or whitespace characters", "") + } + } + + return nil +} diff --git a/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/version/conf.go b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/version/conf.go new file mode 100644 index 000000000000..3cca58bbeb8d --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/version/conf.go @@ -0,0 +1,37 @@ +// Copyright 2016 CNI authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package version + +import ( + "encoding/json" + "fmt" +) + +// ConfigDecoder can decode the CNI version available in network config data +type ConfigDecoder struct{} + +func (*ConfigDecoder) Decode(jsonBytes []byte) (string, error) { + var conf struct { + CNIVersion string `json:"cniVersion"` + } + err := json.Unmarshal(jsonBytes, &conf) + if err != nil { + return "", fmt.Errorf("decoding version from network config: %s", err) + } + if conf.CNIVersion == "" { + return "0.1.0", nil + } + return conf.CNIVersion, nil +} diff --git a/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/version/plugin.go b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/version/plugin.go new file mode 100644 index 000000000000..1df427243f35 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/version/plugin.go @@ -0,0 +1,144 @@ +// Copyright 2016 CNI authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package version + +import ( + "encoding/json" + "fmt" + "io" + "strconv" + "strings" +) + +// PluginInfo reports information about CNI versioning +type PluginInfo interface { + // SupportedVersions returns one or more CNI spec versions that the plugin + // supports. If input is provided in one of these versions, then the plugin + // promises to use the same CNI version in its response + SupportedVersions() []string + + // Encode writes this CNI version information as JSON to the given Writer + Encode(io.Writer) error +} + +type pluginInfo struct { + CNIVersion_ string `json:"cniVersion"` + SupportedVersions_ []string `json:"supportedVersions,omitempty"` +} + +// pluginInfo implements the PluginInfo interface +var _ PluginInfo = &pluginInfo{} + +func (p *pluginInfo) Encode(w io.Writer) error { + return json.NewEncoder(w).Encode(p) +} + +func (p *pluginInfo) SupportedVersions() []string { + return p.SupportedVersions_ +} + +// PluginSupports returns a new PluginInfo that will report the given versions +// as supported +func PluginSupports(supportedVersions ...string) PluginInfo { + if len(supportedVersions) < 1 { + panic("programmer error: you must support at least one version") + } + return &pluginInfo{ + CNIVersion_: Current(), + SupportedVersions_: supportedVersions, + } +} + +// PluginDecoder can decode the response returned by a plugin's VERSION command +type PluginDecoder struct{} + +func (*PluginDecoder) Decode(jsonBytes []byte) (PluginInfo, error) { + var info pluginInfo + err := json.Unmarshal(jsonBytes, &info) + if err != nil { + return nil, fmt.Errorf("decoding version info: %s", err) + } + if info.CNIVersion_ == "" { + return nil, fmt.Errorf("decoding version info: missing field cniVersion") + } + if len(info.SupportedVersions_) == 0 { + if info.CNIVersion_ == "0.2.0" { + return PluginSupports("0.1.0", "0.2.0"), nil + } + return nil, fmt.Errorf("decoding version info: missing field supportedVersions") + } + return &info, nil +} + +// ParseVersion parses a version string like "3.0.1" or "0.4.5" into major, +// minor, and micro numbers or returns an error +func ParseVersion(version string) (int, int, int, error) { + var major, minor, micro int + if version == "" { + return -1, -1, -1, fmt.Errorf("invalid version %q: the version is empty", version) + } + + parts := strings.Split(version, ".") + if len(parts) >= 4 { + return -1, -1, -1, fmt.Errorf("invalid version %q: too many parts", version) + } + + major, err := strconv.Atoi(parts[0]) + if err != nil { + return -1, -1, -1, fmt.Errorf("failed to convert major version part %q: %v", parts[0], err) + } + + if len(parts) >= 2 { + minor, err = strconv.Atoi(parts[1]) + if err != nil { + return -1, -1, -1, fmt.Errorf("failed to convert minor version part %q: %v", parts[1], err) + } + } + + if len(parts) >= 3 { + micro, err = strconv.Atoi(parts[2]) + if err != nil { + return -1, -1, -1, fmt.Errorf("failed to convert micro version part %q: %v", parts[2], err) + } + } + + return major, minor, micro, nil +} + +// GreaterThanOrEqualTo takes two string versions, parses them into major/minor/micro +// numbers, and compares them to determine whether the first version is greater +// than or equal to the second +func GreaterThanOrEqualTo(version, otherVersion string) (bool, error) { + firstMajor, firstMinor, firstMicro, err := ParseVersion(version) + if err != nil { + return false, err + } + + secondMajor, secondMinor, secondMicro, err := ParseVersion(otherVersion) + if err != nil { + return false, err + } + + if firstMajor > secondMajor { + return true, nil + } else if firstMajor == secondMajor { + if firstMinor > secondMinor { + return true, nil + } else if firstMinor == secondMinor && firstMicro >= secondMicro { + return true, nil + } + } + return false, nil +} diff --git a/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/version/reconcile.go b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/version/reconcile.go new file mode 100644 index 000000000000..25c3810b2aaf --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/version/reconcile.go @@ -0,0 +1,49 @@ +// Copyright 2016 CNI authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package version + +import "fmt" + +type ErrorIncompatible struct { + Config string + Supported []string +} + +func (e *ErrorIncompatible) Details() string { + return fmt.Sprintf("config is %q, plugin supports %q", e.Config, e.Supported) +} + +func (e *ErrorIncompatible) Error() string { + return fmt.Sprintf("incompatible CNI versions: %s", e.Details()) +} + +type Reconciler struct{} + +func (r *Reconciler) Check(configVersion string, pluginInfo PluginInfo) *ErrorIncompatible { + return r.CheckRaw(configVersion, pluginInfo.SupportedVersions()) +} + +func (*Reconciler) CheckRaw(configVersion string, supportedVersions []string) *ErrorIncompatible { + for _, supportedVersion := range supportedVersions { + if configVersion == supportedVersion { + return nil + } + } + + return &ErrorIncompatible{ + Config: configVersion, + Supported: supportedVersions, + } +} diff --git a/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/version/version.go b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/version/version.go new file mode 100644 index 000000000000..8f3508e61f38 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/containernetworking/cni/pkg/version/version.go @@ -0,0 +1,83 @@ +// Copyright 2016 CNI authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package version + +import ( + "encoding/json" + "fmt" + + "github.com/containernetworking/cni/pkg/types" + "github.com/containernetworking/cni/pkg/types/020" + "github.com/containernetworking/cni/pkg/types/current" +) + +// Current reports the version of the CNI spec implemented by this library +func Current() string { + return "0.4.0" +} + +// Legacy PluginInfo describes a plugin that is backwards compatible with the +// CNI spec version 0.1.0. In particular, a runtime compiled against the 0.1.0 +// library ought to work correctly with a plugin that reports support for +// Legacy versions. +// +// Any future CNI spec versions which meet this definition should be added to +// this list. +var Legacy = PluginSupports("0.1.0", "0.2.0") +var All = PluginSupports("0.1.0", "0.2.0", "0.3.0", "0.3.1", "0.4.0") + +var resultFactories = []struct { + supportedVersions []string + newResult types.ResultFactoryFunc +}{ + {current.SupportedVersions, current.NewResult}, + {types020.SupportedVersions, types020.NewResult}, +} + +// Finds a Result object matching the requested version (if any) and asks +// that object to parse the plugin result, returning an error if parsing failed. +func NewResult(version string, resultBytes []byte) (types.Result, error) { + reconciler := &Reconciler{} + for _, resultFactory := range resultFactories { + err := reconciler.CheckRaw(version, resultFactory.supportedVersions) + if err == nil { + // Result supports this version + return resultFactory.newResult(resultBytes) + } + } + + return nil, fmt.Errorf("unsupported CNI result version %q", version) +} + +// ParsePrevResult parses a prevResult in a NetConf structure and sets +// the NetConf's PrevResult member to the parsed Result object. +func ParsePrevResult(conf *types.NetConf) error { + if conf.RawPrevResult == nil { + return nil + } + + resultBytes, err := json.Marshal(conf.RawPrevResult) + if err != nil { + return fmt.Errorf("could not serialize prevResult: %v", err) + } + + conf.RawPrevResult = nil + conf.PrevResult, err = NewResult(conf.CNIVersion, resultBytes) + if err != nil { + return fmt.Errorf("could not parse prevResult: %v", err) + } + + return nil +} diff --git a/cluster-autoscaler/vendor/github.com/cyphar/filepath-securejoin/.travis.yml b/cluster-autoscaler/vendor/github.com/cyphar/filepath-securejoin/.travis.yml index b94ff8cf92a9..3938f3834944 100644 --- a/cluster-autoscaler/vendor/github.com/cyphar/filepath-securejoin/.travis.yml +++ b/cluster-autoscaler/vendor/github.com/cyphar/filepath-securejoin/.travis.yml @@ -4,12 +4,10 @@ language: go go: - - 1.13.x - - 1.16.x + - 1.7.x + - 1.8.x - tip -arch: - - AMD64 - - ppc64le + os: - linux - osx diff --git a/cluster-autoscaler/vendor/github.com/cyphar/filepath-securejoin/README.md b/cluster-autoscaler/vendor/github.com/cyphar/filepath-securejoin/README.md index 3624617c89b0..49b2baa9f35c 100644 --- a/cluster-autoscaler/vendor/github.com/cyphar/filepath-securejoin/README.md +++ b/cluster-autoscaler/vendor/github.com/cyphar/filepath-securejoin/README.md @@ -7,19 +7,6 @@ standard library][go#20126]. The purpose of this function is to be a "secure" alternative to `filepath.Join`, and in particular it provides certain guarantees that are not provided by `filepath.Join`. -> **NOTE**: This code is *only* safe if you are not at risk of other processes -> modifying path components after you've used `SecureJoin`. If it is possible -> for a malicious process to modify path components of the resolved path, then -> you will be vulnerable to some fairly trivial TOCTOU race conditions. [There -> are some Linux kernel patches I'm working on which might allow for a better -> solution.][lwn-obeneath] -> -> In addition, with a slightly modified API it might be possible to use -> `O_PATH` and verify that the opened path is actually the resolved one -- but -> I have not done that yet. I might add it in the future as a helper function -> to help users verify the path (we can't just return `/proc/self/fd/` -> because that doesn't always work transparently for all users). - This is the function prototype: ```go @@ -29,8 +16,8 @@ func SecureJoin(root, unsafePath string) (string, error) This library **guarantees** the following: * If no error is set, the resulting string **must** be a child path of - `root` and will not contain any symlink path components (they will all be - expanded). + `SecureJoin` and will not contain any symlink path components (they will all + be expanded). * When expanding symlinks, all symlink path components **must** be resolved relative to the provided root. In particular, this can be considered a @@ -38,7 +25,7 @@ This library **guarantees** the following: these symlinks will **not** be expanded lexically (`filepath.Clean` is not called on the input before processing). -* Non-existent path components are unaffected by `SecureJoin` (similar to +* Non-existant path components are unaffected by `SecureJoin` (similar to `filepath.EvalSymlinks`'s semantics). * The returned path will always be `filepath.Clean`ed and thus not contain any @@ -70,7 +57,6 @@ func SecureJoin(root, unsafePath string) (string, error) { } ``` -[lwn-obeneath]: https://lwn.net/Articles/767547/ [go#20126]: https://github.com/golang/go/issues/20126 ### License ### diff --git a/cluster-autoscaler/vendor/github.com/cyphar/filepath-securejoin/VERSION b/cluster-autoscaler/vendor/github.com/cyphar/filepath-securejoin/VERSION index 7179039691ce..ee1372d33a29 100644 --- a/cluster-autoscaler/vendor/github.com/cyphar/filepath-securejoin/VERSION +++ b/cluster-autoscaler/vendor/github.com/cyphar/filepath-securejoin/VERSION @@ -1 +1 @@ -0.2.3 +0.2.2 diff --git a/cluster-autoscaler/vendor/github.com/cyphar/filepath-securejoin/go.mod b/cluster-autoscaler/vendor/github.com/cyphar/filepath-securejoin/go.mod deleted file mode 100644 index 0607c1fa060f..000000000000 --- a/cluster-autoscaler/vendor/github.com/cyphar/filepath-securejoin/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module github.com/cyphar/filepath-securejoin - -go 1.13 diff --git a/cluster-autoscaler/vendor/github.com/cyphar/filepath-securejoin/join.go b/cluster-autoscaler/vendor/github.com/cyphar/filepath-securejoin/join.go index 7dd08dbbdf7b..c4ca3d713005 100644 --- a/cluster-autoscaler/vendor/github.com/cyphar/filepath-securejoin/join.go +++ b/cluster-autoscaler/vendor/github.com/cyphar/filepath-securejoin/join.go @@ -12,20 +12,39 @@ package securejoin import ( "bytes" - "errors" "os" "path/filepath" "strings" "syscall" + + "github.com/pkg/errors" ) +// ErrSymlinkLoop is returned by SecureJoinVFS when too many symlinks have been +// evaluated in attempting to securely join the two given paths. +var ErrSymlinkLoop = errors.Wrap(syscall.ELOOP, "secure join") + // IsNotExist tells you if err is an error that implies that either the path // accessed does not exist (or path components don't exist). This is // effectively a more broad version of os.IsNotExist. func IsNotExist(err error) bool { + // If it's a bone-fide ENOENT just bail. + if os.IsNotExist(errors.Cause(err)) { + return true + } + // Check that it's not actually an ENOTDIR, which in some cases is a more // convoluted case of ENOENT (usually involving weird paths). - return errors.Is(err, os.ErrNotExist) || errors.Is(err, syscall.ENOTDIR) || errors.Is(err, syscall.ENOENT) + var errno error + switch err := errors.Cause(err).(type) { + case *os.PathError: + errno = err.Err + case *os.LinkError: + errno = err.Err + case *os.SyscallError: + errno = err.Err + } + return errno == syscall.ENOTDIR || errno == syscall.ENOENT } // SecureJoinVFS joins the two given path components (similar to Join) except @@ -49,7 +68,7 @@ func SecureJoinVFS(root, unsafePath string, vfs VFS) (string, error) { n := 0 for unsafePath != "" { if n > 255 { - return "", &os.PathError{Op: "SecureJoin", Path: root + "/" + unsafePath, Err: syscall.ELOOP} + return "", ErrSymlinkLoop } // Next path component, p. diff --git a/cluster-autoscaler/vendor/github.com/cyphar/filepath-securejoin/vendor.conf b/cluster-autoscaler/vendor/github.com/cyphar/filepath-securejoin/vendor.conf new file mode 100644 index 000000000000..66bb574b955b --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/cyphar/filepath-securejoin/vendor.conf @@ -0,0 +1 @@ +github.com/pkg/errors v0.8.0 diff --git a/cluster-autoscaler/vendor/github.com/docker/distribution/reference/normalize.go b/cluster-autoscaler/vendor/github.com/docker/distribution/reference/normalize.go index b3dfb7a6d7e1..2d71fc5e9ffd 100644 --- a/cluster-autoscaler/vendor/github.com/docker/distribution/reference/normalize.go +++ b/cluster-autoscaler/vendor/github.com/docker/distribution/reference/normalize.go @@ -56,35 +56,6 @@ func ParseNormalizedNamed(s string) (Named, error) { return named, nil } -// ParseDockerRef normalizes the image reference following the docker convention. This is added -// mainly for backward compatibility. -// The reference returned can only be either tagged or digested. For reference contains both tag -// and digest, the function returns digested reference, e.g. docker.io/library/busybox:latest@ -// sha256:7cc4b5aefd1d0cadf8d97d4350462ba51c694ebca145b08d7d41b41acc8db5aa will be returned as -// docker.io/library/busybox@sha256:7cc4b5aefd1d0cadf8d97d4350462ba51c694ebca145b08d7d41b41acc8db5aa. -func ParseDockerRef(ref string) (Named, error) { - named, err := ParseNormalizedNamed(ref) - if err != nil { - return nil, err - } - if _, ok := named.(NamedTagged); ok { - if canonical, ok := named.(Canonical); ok { - // The reference is both tagged and digested, only - // return digested. - newNamed, err := WithName(canonical.Name()) - if err != nil { - return nil, err - } - newCanonical, err := WithDigest(newNamed, canonical.Digest()) - if err != nil { - return nil, err - } - return newCanonical, nil - } - } - return TagNameOnly(named), nil -} - // splitDockerDomain splits a repository name to domain and remotename string. // If no valid domain is found, the default domain is used. Repository name // needs to be already validated before. diff --git a/cluster-autoscaler/vendor/github.com/docker/distribution/reference/reference.go b/cluster-autoscaler/vendor/github.com/docker/distribution/reference/reference.go index 8c0c23b2fe1b..2f66cca87a3c 100644 --- a/cluster-autoscaler/vendor/github.com/docker/distribution/reference/reference.go +++ b/cluster-autoscaler/vendor/github.com/docker/distribution/reference/reference.go @@ -205,7 +205,7 @@ func Parse(s string) (Reference, error) { var repo repository nameMatch := anchoredNameRegexp.FindStringSubmatch(matches[1]) - if len(nameMatch) == 3 { + if nameMatch != nil && len(nameMatch) == 3 { repo.domain = nameMatch[1] repo.path = nameMatch[2] } else { diff --git a/cluster-autoscaler/vendor/github.com/docker/distribution/registry/api/errcode/errors.go b/cluster-autoscaler/vendor/github.com/docker/distribution/registry/api/errcode/errors.go new file mode 100644 index 000000000000..6d9bb4b62afb --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/distribution/registry/api/errcode/errors.go @@ -0,0 +1,267 @@ +package errcode + +import ( + "encoding/json" + "fmt" + "strings" +) + +// ErrorCoder is the base interface for ErrorCode and Error allowing +// users of each to just call ErrorCode to get the real ID of each +type ErrorCoder interface { + ErrorCode() ErrorCode +} + +// ErrorCode represents the error type. The errors are serialized via strings +// and the integer format may change and should *never* be exported. +type ErrorCode int + +var _ error = ErrorCode(0) + +// ErrorCode just returns itself +func (ec ErrorCode) ErrorCode() ErrorCode { + return ec +} + +// Error returns the ID/Value +func (ec ErrorCode) Error() string { + // NOTE(stevvooe): Cannot use message here since it may have unpopulated args. + return strings.ToLower(strings.Replace(ec.String(), "_", " ", -1)) +} + +// Descriptor returns the descriptor for the error code. +func (ec ErrorCode) Descriptor() ErrorDescriptor { + d, ok := errorCodeToDescriptors[ec] + + if !ok { + return ErrorCodeUnknown.Descriptor() + } + + return d +} + +// String returns the canonical identifier for this error code. +func (ec ErrorCode) String() string { + return ec.Descriptor().Value +} + +// Message returned the human-readable error message for this error code. +func (ec ErrorCode) Message() string { + return ec.Descriptor().Message +} + +// MarshalText encodes the receiver into UTF-8-encoded text and returns the +// result. +func (ec ErrorCode) MarshalText() (text []byte, err error) { + return []byte(ec.String()), nil +} + +// UnmarshalText decodes the form generated by MarshalText. +func (ec *ErrorCode) UnmarshalText(text []byte) error { + desc, ok := idToDescriptors[string(text)] + + if !ok { + desc = ErrorCodeUnknown.Descriptor() + } + + *ec = desc.Code + + return nil +} + +// WithMessage creates a new Error struct based on the passed-in info and +// overrides the Message property. +func (ec ErrorCode) WithMessage(message string) Error { + return Error{ + Code: ec, + Message: message, + } +} + +// WithDetail creates a new Error struct based on the passed-in info and +// set the Detail property appropriately +func (ec ErrorCode) WithDetail(detail interface{}) Error { + return Error{ + Code: ec, + Message: ec.Message(), + }.WithDetail(detail) +} + +// WithArgs creates a new Error struct and sets the Args slice +func (ec ErrorCode) WithArgs(args ...interface{}) Error { + return Error{ + Code: ec, + Message: ec.Message(), + }.WithArgs(args...) +} + +// Error provides a wrapper around ErrorCode with extra Details provided. +type Error struct { + Code ErrorCode `json:"code"` + Message string `json:"message"` + Detail interface{} `json:"detail,omitempty"` + + // TODO(duglin): See if we need an "args" property so we can do the + // variable substitution right before showing the message to the user +} + +var _ error = Error{} + +// ErrorCode returns the ID/Value of this Error +func (e Error) ErrorCode() ErrorCode { + return e.Code +} + +// Error returns a human readable representation of the error. +func (e Error) Error() string { + return fmt.Sprintf("%s: %s", e.Code.Error(), e.Message) +} + +// WithDetail will return a new Error, based on the current one, but with +// some Detail info added +func (e Error) WithDetail(detail interface{}) Error { + return Error{ + Code: e.Code, + Message: e.Message, + Detail: detail, + } +} + +// WithArgs uses the passed-in list of interface{} as the substitution +// variables in the Error's Message string, but returns a new Error +func (e Error) WithArgs(args ...interface{}) Error { + return Error{ + Code: e.Code, + Message: fmt.Sprintf(e.Code.Message(), args...), + Detail: e.Detail, + } +} + +// ErrorDescriptor provides relevant information about a given error code. +type ErrorDescriptor struct { + // Code is the error code that this descriptor describes. + Code ErrorCode + + // Value provides a unique, string key, often captilized with + // underscores, to identify the error code. This value is used as the + // keyed value when serializing api errors. + Value string + + // Message is a short, human readable decription of the error condition + // included in API responses. + Message string + + // Description provides a complete account of the errors purpose, suitable + // for use in documentation. + Description string + + // HTTPStatusCode provides the http status code that is associated with + // this error condition. + HTTPStatusCode int +} + +// ParseErrorCode returns the value by the string error code. +// `ErrorCodeUnknown` will be returned if the error is not known. +func ParseErrorCode(value string) ErrorCode { + ed, ok := idToDescriptors[value] + if ok { + return ed.Code + } + + return ErrorCodeUnknown +} + +// Errors provides the envelope for multiple errors and a few sugar methods +// for use within the application. +type Errors []error + +var _ error = Errors{} + +func (errs Errors) Error() string { + switch len(errs) { + case 0: + return "" + case 1: + return errs[0].Error() + default: + msg := "errors:\n" + for _, err := range errs { + msg += err.Error() + "\n" + } + return msg + } +} + +// Len returns the current number of errors. +func (errs Errors) Len() int { + return len(errs) +} + +// MarshalJSON converts slice of error, ErrorCode or Error into a +// slice of Error - then serializes +func (errs Errors) MarshalJSON() ([]byte, error) { + var tmpErrs struct { + Errors []Error `json:"errors,omitempty"` + } + + for _, daErr := range errs { + var err Error + + switch daErr.(type) { + case ErrorCode: + err = daErr.(ErrorCode).WithDetail(nil) + case Error: + err = daErr.(Error) + default: + err = ErrorCodeUnknown.WithDetail(daErr) + + } + + // If the Error struct was setup and they forgot to set the + // Message field (meaning its "") then grab it from the ErrCode + msg := err.Message + if msg == "" { + msg = err.Code.Message() + } + + tmpErrs.Errors = append(tmpErrs.Errors, Error{ + Code: err.Code, + Message: msg, + Detail: err.Detail, + }) + } + + return json.Marshal(tmpErrs) +} + +// UnmarshalJSON deserializes []Error and then converts it into slice of +// Error or ErrorCode +func (errs *Errors) UnmarshalJSON(data []byte) error { + var tmpErrs struct { + Errors []Error + } + + if err := json.Unmarshal(data, &tmpErrs); err != nil { + return err + } + + var newErrs Errors + for _, daErr := range tmpErrs.Errors { + // If Message is empty or exactly matches the Code's message string + // then just use the Code, no need for a full Error struct + if daErr.Detail == nil && (daErr.Message == "" || daErr.Message == daErr.Code.Message()) { + // Error's w/o details get converted to ErrorCode + newErrs = append(newErrs, daErr.Code) + } else { + // Error's w/ details are untouched + newErrs = append(newErrs, Error{ + Code: daErr.Code, + Message: daErr.Message, + Detail: daErr.Detail, + }) + } + } + + *errs = newErrs + return nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/distribution/registry/api/errcode/handler.go b/cluster-autoscaler/vendor/github.com/docker/distribution/registry/api/errcode/handler.go new file mode 100644 index 000000000000..d77e70473e7b --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/distribution/registry/api/errcode/handler.go @@ -0,0 +1,40 @@ +package errcode + +import ( + "encoding/json" + "net/http" +) + +// ServeJSON attempts to serve the errcode in a JSON envelope. It marshals err +// and sets the content-type header to 'application/json'. It will handle +// ErrorCoder and Errors, and if necessary will create an envelope. +func ServeJSON(w http.ResponseWriter, err error) error { + w.Header().Set("Content-Type", "application/json; charset=utf-8") + var sc int + + switch errs := err.(type) { + case Errors: + if len(errs) < 1 { + break + } + + if err, ok := errs[0].(ErrorCoder); ok { + sc = err.ErrorCode().Descriptor().HTTPStatusCode + } + case ErrorCoder: + sc = errs.ErrorCode().Descriptor().HTTPStatusCode + err = Errors{err} // create an envelope. + default: + // We just have an unhandled error type, so just place in an envelope + // and move along. + err = Errors{err} + } + + if sc == 0 { + sc = http.StatusInternalServerError + } + + w.WriteHeader(sc) + + return json.NewEncoder(w).Encode(err) +} diff --git a/cluster-autoscaler/vendor/github.com/docker/distribution/registry/api/errcode/register.go b/cluster-autoscaler/vendor/github.com/docker/distribution/registry/api/errcode/register.go new file mode 100644 index 000000000000..d1e8826c6d7d --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/distribution/registry/api/errcode/register.go @@ -0,0 +1,138 @@ +package errcode + +import ( + "fmt" + "net/http" + "sort" + "sync" +) + +var ( + errorCodeToDescriptors = map[ErrorCode]ErrorDescriptor{} + idToDescriptors = map[string]ErrorDescriptor{} + groupToDescriptors = map[string][]ErrorDescriptor{} +) + +var ( + // ErrorCodeUnknown is a generic error that can be used as a last + // resort if there is no situation-specific error message that can be used + ErrorCodeUnknown = Register("errcode", ErrorDescriptor{ + Value: "UNKNOWN", + Message: "unknown error", + Description: `Generic error returned when the error does not have an + API classification.`, + HTTPStatusCode: http.StatusInternalServerError, + }) + + // ErrorCodeUnsupported is returned when an operation is not supported. + ErrorCodeUnsupported = Register("errcode", ErrorDescriptor{ + Value: "UNSUPPORTED", + Message: "The operation is unsupported.", + Description: `The operation was unsupported due to a missing + implementation or invalid set of parameters.`, + HTTPStatusCode: http.StatusMethodNotAllowed, + }) + + // ErrorCodeUnauthorized is returned if a request requires + // authentication. + ErrorCodeUnauthorized = Register("errcode", ErrorDescriptor{ + Value: "UNAUTHORIZED", + Message: "authentication required", + Description: `The access controller was unable to authenticate + the client. Often this will be accompanied by a + Www-Authenticate HTTP response header indicating how to + authenticate.`, + HTTPStatusCode: http.StatusUnauthorized, + }) + + // ErrorCodeDenied is returned if a client does not have sufficient + // permission to perform an action. + ErrorCodeDenied = Register("errcode", ErrorDescriptor{ + Value: "DENIED", + Message: "requested access to the resource is denied", + Description: `The access controller denied access for the + operation on a resource.`, + HTTPStatusCode: http.StatusForbidden, + }) + + // ErrorCodeUnavailable provides a common error to report unavailability + // of a service or endpoint. + ErrorCodeUnavailable = Register("errcode", ErrorDescriptor{ + Value: "UNAVAILABLE", + Message: "service unavailable", + Description: "Returned when a service is not available", + HTTPStatusCode: http.StatusServiceUnavailable, + }) + + // ErrorCodeTooManyRequests is returned if a client attempts too many + // times to contact a service endpoint. + ErrorCodeTooManyRequests = Register("errcode", ErrorDescriptor{ + Value: "TOOMANYREQUESTS", + Message: "too many requests", + Description: `Returned when a client attempts to contact a + service too many times`, + HTTPStatusCode: http.StatusTooManyRequests, + }) +) + +var nextCode = 1000 +var registerLock sync.Mutex + +// Register will make the passed-in error known to the environment and +// return a new ErrorCode +func Register(group string, descriptor ErrorDescriptor) ErrorCode { + registerLock.Lock() + defer registerLock.Unlock() + + descriptor.Code = ErrorCode(nextCode) + + if _, ok := idToDescriptors[descriptor.Value]; ok { + panic(fmt.Sprintf("ErrorValue %q is already registered", descriptor.Value)) + } + if _, ok := errorCodeToDescriptors[descriptor.Code]; ok { + panic(fmt.Sprintf("ErrorCode %v is already registered", descriptor.Code)) + } + + groupToDescriptors[group] = append(groupToDescriptors[group], descriptor) + errorCodeToDescriptors[descriptor.Code] = descriptor + idToDescriptors[descriptor.Value] = descriptor + + nextCode++ + return descriptor.Code +} + +type byValue []ErrorDescriptor + +func (a byValue) Len() int { return len(a) } +func (a byValue) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a byValue) Less(i, j int) bool { return a[i].Value < a[j].Value } + +// GetGroupNames returns the list of Error group names that are registered +func GetGroupNames() []string { + keys := []string{} + + for k := range groupToDescriptors { + keys = append(keys, k) + } + sort.Strings(keys) + return keys +} + +// GetErrorCodeGroup returns the named group of error descriptors +func GetErrorCodeGroup(name string) []ErrorDescriptor { + desc := groupToDescriptors[name] + sort.Sort(byValue(desc)) + return desc +} + +// GetErrorAllDescriptors returns a slice of all ErrorDescriptors that are +// registered, irrespective of what group they're in +func GetErrorAllDescriptors() []ErrorDescriptor { + result := []ErrorDescriptor{} + + for _, group := range GetGroupNames() { + result = append(result, GetErrorCodeGroup(group)...) + } + sort.Sort(byValue(result)) + return result +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/AUTHORS b/cluster-autoscaler/vendor/github.com/docker/docker/AUTHORS new file mode 100644 index 000000000000..dffacff11202 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/AUTHORS @@ -0,0 +1,2175 @@ +# This file lists all individuals having contributed content to the repository. +# For how it is generated, see `hack/generate-authors.sh`. + +Aanand Prasad +Aaron Davidson +Aaron Feng +Aaron Hnatiw +Aaron Huslage +Aaron L. Xu +Aaron Lehmann +Aaron Welch +Aaron.L.Xu +Abel Muiño +Abhijeet Kasurde +Abhinandan Prativadi +Abhinav Ajgaonkar +Abhishek Chanda +Abhishek Sharma +Abin Shahab +Adam Avilla +Adam Dobrawy +Adam Eijdenberg +Adam Kunk +Adam Miller +Adam Mills +Adam Pointer +Adam Singer +Adam Walz +Addam Hardy +Aditi Rajagopal +Aditya +Adnan Khan +Adolfo Ochagavía +Adria Casas +Adrian Moisey +Adrian Mouat +Adrian Oprea +Adrien Folie +Adrien Gallouët +Ahmed Kamal +Ahmet Alp Balkan +Aidan Feldman +Aidan Hobson Sayers +AJ Bowen +Ajey Charantimath +ajneu +Akash Gupta +Akhil Mohan +Akihiro Matsushima +Akihiro Suda +Akim Demaille +Akira Koyasu +Akshay Karle +Al Tobey +alambike +Alan Hoyle +Alan Scherger +Alan Thompson +Albert Callarisa +Albert Zhang +Albin Kerouanton +Alejandro González Hevia +Aleksa Sarai +Aleksandrs Fadins +Alena Prokharchyk +Alessandro Boch +Alessio Biancalana +Alex Chan +Alex Chen +Alex Coventry +Alex Crawford +Alex Ellis +Alex Gaynor +Alex Goodman +Alex Olshansky +Alex Samorukov +Alex Warhawk +Alexander Artemenko +Alexander Boyd +Alexander Larsson +Alexander Midlash +Alexander Morozov +Alexander Shopov +Alexandre Beslic +Alexandre Garnier +Alexandre González +Alexandre Jomin +Alexandru Sfirlogea +Alexei Margasov +Alexey Guskov +Alexey Kotlyarov +Alexey Shamrin +Alexis THOMAS +Alfred Landrum +Ali Dehghani +Alicia Lauerman +Alihan Demir +Allen Madsen +Allen Sun +almoehi +Alvaro Saurin +Alvin Deng +Alvin Richards +amangoel +Amen Belayneh +Amir Goldstein +Amit Bakshi +Amit Krishnan +Amit Shukla +Amr Gawish +Amy Lindburg +Anand Patil +AnandkumarPatel +Anatoly Borodin +Anca Iordache +Anchal Agrawal +Anda Xu +Anders Janmyr +Andre Dublin <81dublin@gmail.com> +Andre Granovsky +Andrea Denisse Gómez +Andrea Luzzardi +Andrea Turli +Andreas Elvers +Andreas Köhler +Andreas Savvides +Andreas Tiefenthaler +Andrei Gherzan +Andrei Vagin +Andrew C. Bodine +Andrew Clay Shafer +Andrew Duckworth +Andrew France +Andrew Gerrand +Andrew Guenther +Andrew He +Andrew Hsu +Andrew Kuklewicz +Andrew Macgregor +Andrew Macpherson +Andrew Martin +Andrew McDonnell +Andrew Munsell +Andrew Pennebaker +Andrew Po +Andrew Weiss +Andrew Williams +Andrews Medina +Andrey Kolomentsev +Andrey Petrov +Andrey Stolbovsky +André Martins +andy +Andy Chambers +andy diller +Andy Goldstein +Andy Kipp +Andy Rothfusz +Andy Smith +Andy Wilson +Anes Hasicic +Anil Belur +Anil Madhavapeddy +Ankit Jain +Ankush Agarwal +Anonmily +Anran Qiao +Anshul Pundir +Anthon van der Neut +Anthony Baire +Anthony Bishopric +Anthony Dahanne +Anthony Sottile +Anton Löfgren +Anton Nikitin +Anton Polonskiy +Anton Tiurin +Antonio Murdaca +Antonis Kalipetis +Antony Messerli +Anuj Bahuguna +Anusha Ragunathan +apocas +Arash Deshmeh +ArikaChen +Arko Dasgupta +Arnaud Lefebvre +Arnaud Porterie +Arnaud Rebillout +Arthur Barr +Arthur Gautier +Artur Meyster +Arun Gupta +Asad Saeeduddin +Asbjørn Enge +averagehuman +Avi Das +Avi Kivity +Avi Miller +Avi Vaid +ayoshitake +Azat Khuyiyakhmetov +Bardia Keyoumarsi +Barnaby Gray +Barry Allard +Bartłomiej Piotrowski +Bastiaan Bakker +bdevloed +Ben Bonnefoy +Ben Firshman +Ben Golub +Ben Gould +Ben Hall +Ben Sargent +Ben Severson +Ben Toews +Ben Wiklund +Benjamin Atkin +Benjamin Baker +Benjamin Boudreau +Benjamin Yolken +Benny Ng +Benoit Chesneau +Bernerd Schaefer +Bernhard M. Wiedemann +Bert Goethals +Bertrand Roussel +Bevisy Zhang +Bharath Thiruveedula +Bhiraj Butala +Bhumika Bayani +Bilal Amarni +Bill Wang +Bily Zhang +Bin Liu +Bingshen Wang +Blake Geno +Boaz Shuster +bobby abbott +Boqin Qin +Boris Pruessmann +Boshi Lian +Bouke Haarsma +Boyd Hemphill +boynux +Bradley Cicenas +Bradley Wright +Brandon Liu +Brandon Philips +Brandon Rhodes +Brendan Dixon +Brent Salisbury +Brett Higgins +Brett Kochendorfer +Brett Randall +Brian (bex) Exelbierd +Brian Bland +Brian DeHamer +Brian Dorsey +Brian Flad +Brian Goff +Brian McCallister +Brian Olsen +Brian Schwind +Brian Shumate +Brian Torres-Gil +Brian Trump +Brice Jaglin +Briehan Lombaard +Brielle Broder +Bruno Bigras +Bruno Binet +Bruno Gazzera +Bruno Renié +Bruno Tavares +Bryan Bess +Bryan Boreham +Bryan Matsuo +Bryan Murphy +Burke Libbey +Byung Kang +Caleb Spare +Calen Pennington +Cameron Boehmer +Cameron Spear +Campbell Allen +Candid Dauth +Cao Weiwei +Carl Henrik Lunde +Carl Loa Odin +Carl X. Su +Carlo Mion +Carlos Alexandro Becker +Carlos de Paula +Carlos Sanchez +Carol Fager-Higgins +Cary +Casey Bisson +Catalin Pirvu +Ce Gao +Cedric Davies +Cezar Sa Espinola +Chad Swenson +Chance Zibolski +Chander Govindarajan +Chanhun Jeong +Chao Wang +Charles Chan +Charles Hooper +Charles Law +Charles Lindsay +Charles Merriam +Charles Sarrazin +Charles Smith +Charlie Drage +Charlie Lewis +Chase Bolt +ChaYoung You +Chen Chao +Chen Chuanliang +Chen Hanxiao +Chen Min +Chen Mingjie +Chen Qiu +Cheng-mean Liu +Chengfei Shang +Chengguang Xu +chenyuzhu +Chetan Birajdar +Chewey +Chia-liang Kao +chli +Cholerae Hu +Chris Alfonso +Chris Armstrong +Chris Dias +Chris Dituri +Chris Fordham +Chris Gavin +Chris Gibson +Chris Khoo +Chris McKinnel +Chris McKinnel +Chris Price +Chris Seto +Chris Snow +Chris St. Pierre +Chris Stivers +Chris Swan +Chris Telfer +Chris Wahl +Chris Weyl +Chris White +Christian Berendt +Christian Brauner +Christian Böhme +Christian Muehlhaeuser +Christian Persson +Christian Rotzoll +Christian Simon +Christian Stefanescu +Christophe Mehay +Christophe Troestler +Christophe Vidal +Christopher Biscardi +Christopher Crone +Christopher Currie +Christopher Jones +Christopher Latham +Christopher Rigor +Christy Norman +Chun Chen +Ciro S. Costa +Clayton Coleman +Clinton Kitson +Cody Roseborough +Coenraad Loubser +Colin Dunklau +Colin Hebert +Colin Panisset +Colin Rice +Colin Walters +Collin Guarino +Colm Hally +companycy +Corbin Coleman +Corey Farrell +Cory Forsyth +cressie176 +CrimsonGlory +Cristian Ariza +Cristian Staretu +cristiano balducci +Cristina Yenyxe Gonzalez Garcia +Cruceru Calin-Cristian +CUI Wei +Cyprian Gracz +Cyril F +Daan van Berkel +Daehyeok Mun +Dafydd Crosby +dalanlan +Damian Smyth +Damien Nadé +Damien Nozay +Damjan Georgievski +Dan Anolik +Dan Buch +Dan Cotora +Dan Feldman +Dan Griffin +Dan Hirsch +Dan Keder +Dan Levy +Dan McPherson +Dan Stine +Dan Williams +Dani Hodovic +Dani Louca +Daniel Antlinger +Daniel Black +Daniel Dao +Daniel Exner +Daniel Farrell +Daniel Garcia +Daniel Gasienica +Daniel Grunwell +Daniel Helfand +Daniel Hiltgen +Daniel J Walsh +Daniel Menet +Daniel Mizyrycki +Daniel Nephin +Daniel Norberg +Daniel Nordberg +Daniel Robinson +Daniel S +Daniel Sweet +Daniel Von Fange +Daniel Watkins +Daniel X Moore +Daniel YC Lin +Daniel Zhang +Danny Berger +Danny Milosavljevic +Danny Yates +Danyal Khaliq +Darren Coxall +Darren Shepherd +Darren Stahl +Dattatraya Kumbhar +Davanum Srinivas +Dave Barboza +Dave Goodchild +Dave Henderson +Dave MacDonald +Dave Tucker +David Anderson +David Calavera +David Chung +David Corking +David Cramer +David Currie +David Davis +David Dooling +David Gageot +David Gebler +David Glasser +David Lawrence +David Lechner +David M. Karr +David Mackey +David Mat +David Mcanulty +David McKay +David P Hilton +David Pelaez +David R. Jenni +David Röthlisberger +David Sheets +David Sissitka +David Trott +David Wang <00107082@163.com> +David Williamson +David Xia +David Young +Davide Ceretti +Dawn Chen +dbdd +dcylabs +Debayan De +Deborah Gertrude Digges +deed02392 +Deep Debroy +Deng Guangxing +Deni Bertovic +Denis Defreyne +Denis Gladkikh +Denis Ollier +Dennis Chen +Dennis Chen +Dennis Docter +Derek +Derek +Derek Ch +Derek McGowan +Deric Crago +Deshi Xiao +devmeyster +Devon Estes +Devvyn Murphy +Dharmit Shah +Dhawal Yogesh Bhanushali +Diego Romero +Diego Siqueira +Dieter Reuter +Dillon Dixon +Dima Stopel +Dimitri John Ledkov +Dimitris Mandalidis +Dimitris Rozakis +Dimitry Andric +Dinesh Subhraveti +Ding Fei +Diogo Monica +DiuDiugirl +Djibril Koné +dkumor +Dmitri Logvinenko +Dmitri Shuralyov +Dmitry Demeshchuk +Dmitry Gusev +Dmitry Kononenko +Dmitry Sharshakov +Dmitry Shyshkin +Dmitry Smirnov +Dmitry V. Krivenok +Dmitry Vorobev +Dolph Mathews +Dominic Tubach +Dominic Yin +Dominik Dingel +Dominik Finkbeiner +Dominik Honnef +Don Kirkby +Don Kjer +Don Spaulding +Donald Huang +Dong Chen +Donghwa Kim +Donovan Jones +Doron Podoleanu +Doug Davis +Doug MacEachern +Doug Tangren +Douglas Curtis +Dr Nic Williams +dragon788 +Dražen Lučanin +Drew Erny +Drew Hubl +Dustin Sallings +Ed Costello +Edmund Wagner +Eiichi Tsukata +Eike Herzbach +Eivin Giske Skaaren +Eivind Uggedal +Elan Ruusamäe +Elango Sivanandam +Elena Morozova +Eli Uriegas +Elias Faxö +Elias Probst +Elijah Zupancic +eluck +Elvir Kuric +Emil Davtyan +Emil Hernvall +Emily Maier +Emily Rose +Emir Ozer +Enguerran +Eohyung Lee +epeterso +Eric Barch +Eric Curtin +Eric G. Noriega +Eric Hanchrow +Eric Lee +Eric Myhre +Eric Paris +Eric Rafaloff +Eric Rosenberg +Eric Sage +Eric Soderstrom +Eric Yang +Eric-Olivier Lamey +Erica Windisch +Erik Bray +Erik Dubbelboer +Erik Hollensbe +Erik Inge Bolsø +Erik Kristensen +Erik St. Martin +Erik Weathers +Erno Hopearuoho +Erwin van der Koogh +Ethan Bell +Ethan Mosbaugh +Euan Kemp +Eugen Krizo +Eugene Yakubovich +Evan Allrich +Evan Carmi +Evan Hazlett +Evan Krall +Evan Phoenix +Evan Wies +Evelyn Xu +Everett Toews +Evgeniy Makhrov +Evgeny Shmarnev +Evgeny Vereshchagin +Ewa Czechowska +Eystein Måløy Stenberg +ezbercih +Ezra Silvera +Fabian Kramm +Fabian Lauer +Fabian Raetz +Fabiano Rosas +Fabio Falci +Fabio Kung +Fabio Rapposelli +Fabio Rehm +Fabrizio Regini +Fabrizio Soppelsa +Faiz Khan +falmp +Fangming Fang +Fangyuan Gao <21551127@zju.edu.cn> +fanjiyun +Fareed Dudhia +Fathi Boudra +Federico Gimenez +Felipe Oliveira +Felipe Ruhland +Felix Abecassis +Felix Geisendörfer +Felix Hupfeld +Felix Rabe +Felix Ruess +Felix Schindler +Feng Yan +Fengtu Wang +Ferenc Szabo +Fernando +Fero Volar +Ferran Rodenas +Filipe Brandenburger +Filipe Oliveira +Flavio Castelli +Flavio Crisciani +Florian +Florian Klein +Florian Maier +Florian Noeding +Florian Schmaus +Florian Weingarten +Florin Asavoaie +Florin Patan +fonglh +Foysal Iqbal +Francesc Campoy +Francesco Mari +Francis Chuang +Francisco Carriedo +Francisco Souza +Frank Groeneveld +Frank Herrmann +Frank Macreery +Frank Rosquin +frankyang +Fred Lifton +Frederick F. Kautz IV +Frederik Loeffert +Frederik Nordahl Jul Sabroe +Freek Kalter +Frieder Bluemle +Fu JinLin +Félix Baylac-Jacqué +Félix Cantournet +Gabe Rosenhouse +Gabor Nagy +Gabriel Linder +Gabriel Monroy +Gabriel Nicolas Avellaneda +Gaetan de Villele +Galen Sampson +Gang Qiao +Gareth Rushgrove +Garrett Barboza +Gary Schaetz +Gaurav +Gaurav Singh +Gaël PORTAY +Genki Takiuchi +GennadySpb +Geoffrey Bachelet +Geon Kim +George Kontridze +George MacRorie +George Xie +Georgi Hristozov +Gereon Frey +German DZ +Gert van Valkenhoef +Gerwim Feiken +Ghislain Bourgeois +Giampaolo Mancini +Gianluca Borello +Gildas Cuisinier +Giovan Isa Musthofa +gissehel +Giuseppe Mazzotta +Gleb Fotengauer-Malinovskiy +Gleb M Borisov +Glyn Normington +GoBella +Goffert van Gool +Goldwyn Rodrigues +Gopikannan Venugopalsamy +Gosuke Miyashita +Gou Rao +Govinda Fichtner +Grant Millar +Grant Reaber +Graydon Hoare +Greg Fausak +Greg Pflaum +Greg Stephens +Greg Thornton +Grzegorz Jaśkiewicz +Guilhem Lettron +Guilherme Salgado +Guillaume Dufour +Guillaume J. Charmes +guoxiuyan +Guri +Gurjeet Singh +Guruprasad +Gustav Sinder +gwx296173 +Günter Zöchbauer +Haichao Yang +haikuoliu +Hakan Özler +Hamish Hutchings +Hannes Ljungberg +Hans Kristian Flaatten +Hans Rødtang +Hao Shu Wei +Hao Zhang <21521210@zju.edu.cn> +Harald Albers +Harald Niesche +Harley Laue +Harold Cooper +Harrison Turton +Harry Zhang +Harshal Patil +Harshal Patil +He Simei +He Xiaoxi +He Xin +heartlock <21521209@zju.edu.cn> +Hector Castro +Helen Xie +Henning Sprang +Hiroshi Hatake +Hiroyuki Sasagawa +Hobofan +Hollie Teal +Hong Xu +Hongbin Lu +Hongxu Jia +Honza Pokorny +Hsing-Hui Hsu +hsinko <21551195@zju.edu.cn> +Hu Keping +Hu Tao +HuanHuan Ye +Huanzhong Zhang +Huayi Zhang +Hugo Duncan +Hugo Marisco <0x6875676f@gmail.com> +Hunter Blanks +huqun +Huu Nguyen +hyeongkyu.lee +Hyzhou Zhy +Iago López Galeiras +Ian Babrou +Ian Bishop +Ian Bull +Ian Calvert +Ian Campbell +Ian Chen +Ian Lee +Ian Main +Ian Philpot +Ian Truslove +Iavael +Icaro Seara +Ignacio Capurro +Igor Dolzhikov +Igor Karpovich +Iliana Weller +Ilkka Laukkanen +Ilya Dmitrichenko +Ilya Gusev +Ilya Khlopotov +imre Fitos +inglesp +Ingo Gottwald +Innovimax +Isaac Dupree +Isabel Jimenez +Isaiah Grace +Isao Jonas +Iskander Sharipov +Ivan Babrou +Ivan Fraixedes +Ivan Grcic +Ivan Markin +J Bruni +J. Nunn +Jack Danger Canty +Jack Laxson +Jacob Atzen +Jacob Edelman +Jacob Tomlinson +Jacob Vallejo +Jacob Wen +Jaime Cepeda +Jaivish Kothari +Jake Champlin +Jake Moshenko +Jake Sanders +jakedt +James Allen +James Carey +James Carr +James DeFelice +James Harrison Fisher +James Kyburz +James Kyle +James Lal +James Mills +James Nesbitt +James Nugent +James Turnbull +James Watkins-Harvey +Jamie Hannaford +Jamshid Afshar +Jan Chren +Jan Keromnes +Jan Koprowski +Jan Pazdziora +Jan Toebes +Jan-Gerd Tenberge +Jan-Jaap Driessen +Jana Radhakrishnan +Jannick Fahlbusch +Januar Wayong +Jared Biel +Jared Hocutt +Jaroslaw Zabiello +jaseg +Jasmine Hegman +Jason A. Donenfeld +Jason Divock +Jason Giedymin +Jason Green +Jason Hall +Jason Heiss +Jason Livesay +Jason McVetta +Jason Plum +Jason Shepherd +Jason Smith +Jason Sommer +Jason Stangroome +jaxgeller +Jay +Jay +Jay Kamat +Jean Rouge +Jean-Baptiste Barth +Jean-Baptiste Dalido +Jean-Christophe Berthon +Jean-Paul Calderone +Jean-Pierre Huynh +Jean-Tiare Le Bigot +Jeeva S. Chelladhurai +Jeff Anderson +Jeff Hajewski +Jeff Johnston +Jeff Lindsay +Jeff Mickey +Jeff Minard +Jeff Nickoloff +Jeff Silberman +Jeff Welch +Jeffrey Bolle +Jeffrey Morgan +Jeffrey van Gogh +Jenny Gebske +Jeremy Chambers +Jeremy Grosser +Jeremy Price +Jeremy Qian +Jeremy Unruh +Jeremy Yallop +Jeroen Franse +Jeroen Jacobs +Jesse Dearing +Jesse Dubay +Jessica Frazelle +Jezeniel Zapanta +Jhon Honce +Ji.Zhilong +Jian Liao +Jian Zhang +Jiang Jinyang +Jie Luo +Jie Ma +Jihyun Hwang +Jilles Oldenbeuving +Jim Alateras +Jim Ehrismann +Jim Galasyn +Jim Minter +Jim Perrin +Jimmy Cuadra +Jimmy Puckett +Jimmy Song +Jinsoo Park +Jintao Zhang +Jiri Appl +Jiri Popelka +Jiuyue Ma +Jiří Župka +Joao Fernandes +Joao Trindade +Joe Beda +Joe Doliner +Joe Ferguson +Joe Gordon +Joe Shaw +Joe Van Dyk +Joel Friedly +Joel Handwell +Joel Hansson +Joel Wurtz +Joey Geiger +Joey Geiger +Joey Gibson +Joffrey F +Johan Euphrosine +Johan Rydberg +Johanan Lieberman +Johannes 'fish' Ziemke +John Costa +John Feminella +John Gardiner Myers +John Gossman +John Harris +John Howard +John Laswell +John Maguire +John Mulhausen +John OBrien III +John Starks +John Stephens +John Tims +John V. Martinez +John Warwick +John Willis +Jon Johnson +Jon Surrell +Jon Wedaman +Jonas Dohse +Jonas Heinrich +Jonas Pfenniger +Jonathan A. Schweder +Jonathan A. Sternberg +Jonathan Boulle +Jonathan Camp +Jonathan Choy +Jonathan Dowland +Jonathan Lebon +Jonathan Lomas +Jonathan McCrohan +Jonathan Mueller +Jonathan Pares +Jonathan Rudenberg +Jonathan Stoppani +Jonh Wendell +Joni Sar +Joost Cassee +Jordan Arentsen +Jordan Jennings +Jordan Sissel +Jorge Marin +Jorit Kleine-Möllhoff +Jose Diaz-Gonzalez +Joseph Anthony Pasquale Holsten +Joseph Hager +Joseph Kern +Joseph Rothrock +Josh +Josh Bodah +Josh Bonczkowski +Josh Chorlton +Josh Eveleth +Josh Hawn +Josh Horwitz +Josh Poimboeuf +Josh Soref +Josh Wilson +Josiah Kiehl +José Tomás Albornoz +Joyce Jang +JP +Julian Taylor +Julien Barbier +Julien Bisconti +Julien Bordellier +Julien Dubois +Julien Kassar +Julien Maitrehenry +Julien Pervillé +Julien Pivotto +Julio Guerra +Julio Montes +Jun-Ru Chang +Jussi Nummelin +Justas Brazauskas +Justen Martin +Justin Cormack +Justin Force +Justin Menga +Justin Plock +Justin Simonelis +Justin Terry +Justyn Temme +Jyrki Puttonen +Jérémy Leherpeur +Jérôme Petazzoni +Jörg Thalheim +K. Heller +Kai Blin +Kai Qiang Wu (Kennan) +Kamil Domański +Kamjar Gerami +Kanstantsin Shautsou +Kara Alexandra +Karan Lyons +Kareem Khazem +kargakis +Karl Grzeszczak +Karol Duleba +Karthik Karanth +Karthik Nayak +Kasper Fabæch Brandt +Kate Heddleston +Katie McLaughlin +Kato Kazuyoshi +Katrina Owen +Kawsar Saiyeed +Kay Yan +kayrus +Kazuhiro Sera +Ke Li +Ke Xu +Kei Ohmura +Keith Hudgins +Keli Hu +Ken Cochrane +Ken Herner +Ken ICHIKAWA +Ken Reese +Kenfe-Mickaël Laventure +Kenjiro Nakayama +Kent Johnson +Kenta Tada +Kevin "qwazerty" Houdebert +Kevin Burke +Kevin Clark +Kevin Feyrer +Kevin J. Lynagh +Kevin Jing Qiu +Kevin Kern +Kevin Menard +Kevin Meredith +Kevin P. Kucharczyk +Kevin Parsons +Kevin Richardson +Kevin Shi +Kevin Wallace +Kevin Yap +Keyvan Fatehi +kies +Kim BKC Carlbacker +Kim Eik +Kimbro Staken +Kir Kolyshkin +Kiran Gangadharan +Kirill SIbirev +knappe +Kohei Tsuruta +Koichi Shiraishi +Konrad Kleine +Konstantin Gribov +Konstantin L +Konstantin Pelykh +Krasi Georgiev +Krasimir Georgiev +Kris-Mikael Krister +Kristian Haugene +Kristina Zabunova +Krystian Wojcicki +Kun Zhang +Kunal Kushwaha +Kunal Tyagi +Kyle Conroy +Kyle Linden +Kyle Wuolle +kyu +Lachlan Coote +Lai Jiangshan +Lajos Papp +Lakshan Perera +Lalatendu Mohanty +Lance Chen +Lance Kinley +Lars Butler +Lars Kellogg-Stedman +Lars R. Damerow +Lars-Magnus Skog +Laszlo Meszaros +Laura Frank +Laurent Erignoux +Laurie Voss +Leandro Siqueira +Lee Chao <932819864@qq.com> +Lee, Meng-Han +leeplay +Lei Gong +Lei Jitang +Len Weincier +Lennie +Leo Gallucci +Leszek Kowalski +Levi Blackstone +Levi Gross +Lewis Daly +Lewis Marshall +Lewis Peckover +Li Yi +Liam Macgillavry +Liana Lo +Liang Mingqiang +Liang-Chi Hsieh +Liao Qingwei +Lifubang +Lihua Tang +Lily Guo +limsy +Lin Lu +LingFaKe +Linus Heckemann +Liran Tal +Liron Levin +Liu Bo +Liu Hua +liwenqi +lixiaobing10051267 +Liz Zhang +LIZAO LI +Lizzie Dixon <_@lizzie.io> +Lloyd Dewolf +Lokesh Mandvekar +longliqiang88 <394564827@qq.com> +Lorenz Leutgeb +Lorenzo Fontana +Lotus Fenn +Louis Delossantos +Louis Opter +Luca Favatella +Luca Marturana +Luca Orlandi +Luca-Bogdan Grigorescu +Lucas Chan +Lucas Chi +Lucas Molas +Lucas Silvestre +Luciano Mores +Luis Martínez de Bartolomé Izquierdo +Luiz Svoboda +Lukas Heeren +Lukas Waslowski +lukaspustina +Lukasz Zajaczkowski +Luke Marsden +Lyn +Lynda O'Leary +Lénaïc Huard +Ma Müller +Ma Shimiao +Mabin +Madhan Raj Mookkandy +Madhav Puri +Madhu Venugopal +Mageee +Mahesh Tiyyagura +malnick +Malte Janduda +Manfred Touron +Manfred Zabarauskas +Manjunath A Kumatagi +Mansi Nahar +Manuel Meurer +Manuel Rüger +Manuel Woelker +mapk0y +Marc Abramowitz +Marc Kuo +Marc Tamsky +Marcel Edmund Franke +Marcelo Horacio Fortino +Marcelo Salazar +Marco Hennings +Marcus Cobden +Marcus Farkas +Marcus Linke +Marcus Martins +Marcus Ramberg +Marek Goldmann +Marian Marinov +Marianna Tessel +Mario Loriedo +Marius Gundersen +Marius Sturm +Marius Voila +Mark Allen +Mark Jeromin +Mark McGranaghan +Mark McKinstry +Mark Milstein +Mark Oates +Mark Parker +Mark West +Markan Patel +Marko Mikulicic +Marko Tibold +Markus Fix +Markus Kortlang +Martijn Dwars +Martijn van Oosterhout +Martin Honermeyer +Martin Kelly +Martin Mosegaard Amdisen +Martin Muzatko +Martin Redmond +Mary Anthony +Masahito Zembutsu +Masato Ohba +Masayuki Morita +Mason Malone +Mateusz Sulima +Mathias Monnerville +Mathieu Champlon +Mathieu Le Marec - Pasquet +Mathieu Parent +Matt Apperson +Matt Bachmann +Matt Bentley +Matt Haggard +Matt Hoyle +Matt McCormick +Matt Moore +Matt Richardson +Matt Rickard +Matt Robenolt +Matt Schurenko +Matt Williams +Matthew Heon +Matthew Lapworth +Matthew Mayer +Matthew Mosesohn +Matthew Mueller +Matthew Riley +Matthias Klumpp +Matthias Kühnle +Matthias Rampke +Matthieu Hauglustaine +Mattias Jernberg +Mauricio Garavaglia +mauriyouth +Max Harmathy +Max Shytikov +Maxim Fedchyshyn +Maxim Ivanov +Maxim Kulkin +Maxim Treskin +Maxime Petazzoni +Maximiliano Maccanti +Maxwell +Meaglith Ma +meejah +Megan Kostick +Mehul Kar +Mei ChunTao +Mengdi Gao +Mert Yazıcıoğlu +mgniu +Micah Zoltu +Michael A. Smith +Michael Bridgen +Michael Brown +Michael Chiang +Michael Crosby +Michael Currie +Michael Friis +Michael Gorsuch +Michael Grauer +Michael Holzheu +Michael Hudson-Doyle +Michael Huettermann +Michael Irwin +Michael Käufl +Michael Neale +Michael Nussbaum +Michael Prokop +Michael Scharf +Michael Spetsiotis +Michael Stapelberg +Michael Steinert +Michael Thies +Michael West +Michael Zhao +Michal Fojtik +Michal Gebauer +Michal Jemala +Michal Minář +Michal Wieczorek +Michaël Pailloncy +Michał Czeraszkiewicz +Michał Gryko +Michiel de Jong +Mickaël Fortunato +Mickaël Remars +Miguel Angel Fernández +Miguel Morales +Mihai Borobocea +Mihuleacc Sergiu +Mike Brown +Mike Bush +Mike Casas +Mike Chelen +Mike Danese +Mike Dillon +Mike Dougherty +Mike Estes +Mike Gaffney +Mike Goelzer +Mike Leone +Mike Lundy +Mike MacCana +Mike Naberezny +Mike Snitzer +mikelinjie <294893458@qq.com> +Mikhail Sobolev +Miklos Szegedi +Milind Chawre +Miloslav Trmač +mingqing +Mingzhen Feng +Misty Stanley-Jones +Mitch Capper +Mizuki Urushida +mlarcher +Mohammad Banikazemi +Mohammad Nasirifar +Mohammed Aaqib Ansari +Mohit Soni +Moorthy RS +Morgan Bauer +Morgante Pell +Morgy93 +Morten Siebuhr +Morton Fox +Moysés Borges +mrfly +Mrunal Patel +Muayyad Alsadi +Mustafa Akın +Muthukumar R +Máximo Cuadros +Médi-Rémi Hashim +Nace Oroz +Nahum Shalman +Nakul Pathak +Nalin Dahyabhai +Nan Monnand Deng +Naoki Orii +Natalie Parker +Natanael Copa +Natasha Jarus +Nate Brennand +Nate Eagleson +Nate Jones +Nathan Hsieh +Nathan Kleyn +Nathan LeClaire +Nathan McCauley +Nathan Williams +Naveed Jamil +Neal McBurnett +Neil Horman +Neil Peterson +Nelson Chen +Neyazul Haque +Nghia Tran +Niall O'Higgins +Nicholas E. Rabenau +Nick Adcock +Nick DeCoursin +Nick Irvine +Nick Neisen +Nick Parker +Nick Payne +Nick Russo +Nick Stenning +Nick Stinemates +NickrenREN +Nicola Kabar +Nicolas Borboën +Nicolas De Loof +Nicolas Dudebout +Nicolas Goy +Nicolas Kaiser +Nicolas Sterchele +Nicolas V Castet +Nicolás Hock Isaza +Nigel Poulton +Nik Nyby +Nikhil Chawla +NikolaMandic +Nikolas Garofil +Nikolay Edigaryev +Nikolay Milovanov +Nirmal Mehta +Nishant Totla +NIWA Hideyuki +Noah Meyerhans +Noah Treuhaft +NobodyOnSE +noducks +Nolan Darilek +Noriki Nakamura +nponeccop +Nuutti Kotivuori +nzwsch +O.S. Tezer +objectified +Odin Ugedal +Oguz Bilgic +Oh Jinkyun +Ohad Schneider +ohmystack +Ole Reifschneider +Oliver Neal +Oliver Reason +Olivier Gambier +Olle Jonsson +Olli Janatuinen +Olly Pomeroy +Omri Shiv +Oriol Francès +Oskar Niburski +Otto Kekäläinen +Ouyang Liduo +Ovidio Mallo +Panagiotis Moustafellos +Paolo G. Giarrusso +Pascal +Pascal Bach +Pascal Borreli +Pascal Hartig +Patrick Böänziger +Patrick Devine +Patrick Hemmer +Patrick Stapleton +Patrik Cyvoct +pattichen +Paul +paul +Paul Annesley +Paul Bellamy +Paul Bowsher +Paul Furtado +Paul Hammond +Paul Jimenez +Paul Kehrer +Paul Lietar +Paul Liljenberg +Paul Morie +Paul Nasrat +Paul Weaver +Paulo Ribeiro +Pavel Lobashov +Pavel Matěja +Pavel Pletenev +Pavel Pospisil +Pavel Sutyrin +Pavel Tikhomirov +Pavlos Ratis +Pavol Vargovcik +Pawel Konczalski +Peeyush Gupta +Peggy Li +Pei Su +Peng Tao +Penghan Wang +Per Weijnitz +perhapszzy@sina.com +Peter Bourgon +Peter Braden +Peter Bücker +Peter Choi +Peter Dave Hello +Peter Edge +Peter Ericson +Peter Esbensen +Peter Jaffe +Peter Kang +Peter Malmgren +Peter Salvatore +Peter Volpe +Peter Waller +Petr Švihlík +Phil +Phil Estes +Phil Spitler +Philip Alexander Etling +Philip Monroe +Philipp Gillé +Philipp Wahala +Philipp Weissensteiner +Phillip Alexander +phineas +pidster +Piergiuliano Bossi +Pierre +Pierre Carrier +Pierre Dal-Pra +Pierre Wacrenier +Pierre-Alain RIVIERE +Piotr Bogdan +pixelistik +Porjo +Poul Kjeldager Sørensen +Pradeep Chhetri +Pradip Dhara +Prasanna Gautam +Pratik Karki +Prayag Verma +Priya Wadhwa +Projjol Banerji +Przemek Hejman +Pure White +pysqz +Qiang Huang +Qinglan Peng +qudongfang +Quentin Brossard +Quentin Perez +Quentin Tayssier +r0n22 +Radostin Stoyanov +Rafal Jeczalik +Rafe Colton +Raghavendra K T +Raghuram Devarakonda +Raja Sami +Rajat Pandit +Rajdeep Dua +Ralf Sippl +Ralle +Ralph Bean +Ramkumar Ramachandra +Ramon Brooker +Ramon van Alteren +RaviTeja Pothana +Ray Tsang +ReadmeCritic +Recursive Madman +Reficul +Regan McCooey +Remi Rampin +Remy Suen +Renato Riccieri Santos Zannon +Renaud Gaubert +Rhys Hiltner +Ri Xu +Ricardo N Feliciano +Rich Moyse +Rich Seymour +Richard +Richard Burnison +Richard Harvey +Richard Mathie +Richard Metzler +Richard Scothern +Richo Healey +Rick Bradley +Rick van de Loo +Rick Wieman +Rik Nijessen +Riku Voipio +Riley Guerin +Ritesh H Shukla +Riyaz Faizullabhoy +Rob Gulewich +Rob Vesse +Robert Bachmann +Robert Bittle +Robert Obryk +Robert Schneider +Robert Stern +Robert Terhaar +Robert Wallis +Robert Wang +Roberto G. Hashioka +Roberto Muñoz Fernández +Robin Naundorf +Robin Schneider +Robin Speekenbrink +Robin Thoni +robpc +Rodolfo Carvalho +Rodrigo Vaz +Roel Van Nyen +Roger Peppe +Rohit Jnagal +Rohit Kadam +Rohit Kapur +Rojin George +Roland Huß +Roland Kammerer +Roland Moriz +Roma Sokolov +Roman Dudin +Roman Mazur +Roman Strashkin +Ron Smits +Ron Williams +Rong Gao +Rong Zhang +Rongxiang Song +root +root +root +root +Rory Hunter +Rory McCune +Ross Boucher +Rovanion Luckey +Royce Remer +Rozhnov Alexandr +Rudolph Gottesheim +Rui Cao +Rui Lopes +Ruilin Li +Runshen Zhu +Russ Magee +Ryan Abrams +Ryan Anderson +Ryan Aslett +Ryan Belgrave +Ryan Detzel +Ryan Fowler +Ryan Liu +Ryan McLaughlin +Ryan O'Donnell +Ryan Seto +Ryan Simmen +Ryan Stelly +Ryan Thomas +Ryan Trauntvein +Ryan Wallner +Ryan Zhang +ryancooper7 +RyanDeng +Ryo Nakao +Rémy Greinhofer +s. rannou +s00318865 +Sabin Basyal +Sachin Joshi +Sagar Hani +Sainath Grandhi +Sakeven Jiang +Salahuddin Khan +Sally O'Malley +Sam Abed +Sam Alba +Sam Bailey +Sam J Sharpe +Sam Neirinck +Sam Reis +Sam Rijs +Sam Whited +Sambuddha Basu +Sami Wagiaalla +Samuel Andaya +Samuel Dion-Girardeau +Samuel Karp +Samuel PHAN +Sandeep Bansal +Sankar சங்கர் +Sanket Saurav +Santhosh Manohar +sapphiredev +Sargun Dhillon +Sascha Andres +Sascha Grunert +SataQiu +Satnam Singh +Satoshi Amemiya +Satoshi Tagomori +Scott Bessler +Scott Collier +Scott Johnston +Scott Stamp +Scott Walls +sdreyesg +Sean Christopherson +Sean Cronin +Sean Lee +Sean McIntyre +Sean OMeara +Sean P. Kane +Sean Rodman +Sebastiaan van Steenis +Sebastiaan van Stijn +Senthil Kumar Selvaraj +Senthil Kumaran +SeongJae Park +Seongyeol Lim +Serge Hallyn +Sergey Alekseev +Sergey Evstifeev +Sergii Kabashniuk +Sergio Lopez +Serhat Gülçiçek +SeungUkLee +Sevki Hasirci +Shane Canon +Shane da Silva +Shaun Kaasten +shaunol +Shawn Landden +Shawn Siefkas +shawnhe +Shayne Wang +Shekhar Gulati +Sheng Yang +Shengbo Song +Shev Yan +Shih-Yuan Lee +Shijiang Wei +Shijun Qin +Shishir Mahajan +Shoubhik Bose +Shourya Sarcar +Shu-Wai Chow +shuai-z +Shukui Yang +Shuwei Hao +Sian Lerk Lau +Sidhartha Mani +sidharthamani +Silas Sewell +Silvan Jegen +Simão Reis +Simei He +Simon Barendse +Simon Eskildsen +Simon Ferquel +Simon Leinen +Simon Menke +Simon Taranto +Simon Vikstrom +Sindhu S +Sjoerd Langkemper +skanehira +Solganik Alexander +Solomon Hykes +Song Gao +Soshi Katsuta +Soulou +Spencer Brown +Spencer Smith +Sridatta Thatipamala +Sridhar Ratnakumar +Srini Brahmaroutu +Srinivasan Srivatsan +Staf Wagemakers +Stanislav Bondarenko +Stanislav Levin +Steeve Morin +Stefan Berger +Stefan J. Wernli +Stefan Praszalowicz +Stefan S. +Stefan Scherer +Stefan Staudenmeyer +Stefan Weil +Stephan Spindler +Stephen Benjamin +Stephen Crosby +Stephen Day +Stephen Drake +Stephen Rust +Steve Desmond +Steve Dougherty +Steve Durrheimer +Steve Francia +Steve Koch +Steven Burgess +Steven Erenst +Steven Hartland +Steven Iveson +Steven Merrill +Steven Richards +Steven Taylor +Stig Larsson +Subhajit Ghosh +Sujith Haridasan +Sun Gengze <690388648@qq.com> +Sun Jianbo +Sune Keller +Sunny Gogoi +Suryakumar Sudar +Sven Dowideit +Swapnil Daingade +Sylvain Baubeau +Sylvain Bellemare +Sébastien +Sébastien HOUZÉ +Sébastien Luttringer +Sébastien Stormacq +Tabakhase +Tadej Janež +TAGOMORI Satoshi +tang0th +Tangi Colin +Tatsuki Sugiura +Tatsushi Inagaki +Taylan Isikdemir +Taylor Jones +Ted M. Young +Tehmasp Chaudhri +Tejaswini Duggaraju +Tejesh Mehta +terryding77 <550147740@qq.com> +tgic +Thatcher Peskens +theadactyl +Thell 'Bo' Fowler +Thermionix +Thijs Terlouw +Thomas Bikeev +Thomas Frössman +Thomas Gazagnaire +Thomas Grainger +Thomas Hansen +Thomas Leonard +Thomas Léveil +Thomas Orozco +Thomas Riccardi +Thomas Schroeter +Thomas Sjögren +Thomas Swift +Thomas Tanaka +Thomas Texier +Ti Zhou +Tianon Gravi +Tianyi Wang +Tibor Vass +Tiffany Jernigan +Tiffany Low +Till Wegmüller +Tim +Tim Bart +Tim Bosse +Tim Dettrick +Tim Düsterhus +Tim Hockin +Tim Potter +Tim Ruffles +Tim Smith +Tim Terhorst +Tim Wang +Tim Waugh +Tim Wraight +Tim Zju <21651152@zju.edu.cn> +timfeirg +Timothy Hobbs +tjwebb123 +tobe +Tobias Bieniek +Tobias Bradtke +Tobias Gesellchen +Tobias Klauser +Tobias Munk +Tobias Schmidt +Tobias Schwab +Todd Crane +Todd Lunter +Todd Whiteman +Toli Kuznets +Tom Barlow +Tom Booth +Tom Denham +Tom Fotherby +Tom Howe +Tom Hulihan +Tom Maaswinkel +Tom Sweeney +Tom Wilkie +Tom X. Tobin +Tomas Tomecek +Tomasz Kopczynski +Tomasz Lipinski +Tomasz Nurkiewicz +Tommaso Visconti +Tomáš Hrčka +Tonny Xu +Tony Abboud +Tony Daws +Tony Miller +toogley +Torstein Husebø +Tõnis Tiigi +Trace Andreason +tracylihui <793912329@qq.com> +Trapier Marshall +Travis Cline +Travis Thieman +Trent Ogren +Trevor +Trevor Pounds +Trevor Sullivan +Trishna Guha +Tristan Carel +Troy Denton +Tycho Andersen +Tyler Brock +Tyler Brown +Tzu-Jung Lee +uhayate +Ulysse Carion +Umesh Yadav +Utz Bacher +vagrant +Vaidas Jablonskis +vanderliang +Velko Ivanov +Veres Lajos +Victor Algaze +Victor Coisne +Victor Costan +Victor I. Wood +Victor Lyuboslavsky +Victor Marmol +Victor Palma +Victor Vieux +Victoria Bialas +Vijaya Kumar K +Vikram bir Singh +Viktor Stanchev +Viktor Vojnovski +VinayRaghavanKS +Vincent Batts +Vincent Bernat +Vincent Boulineau +Vincent Demeester +Vincent Giersch +Vincent Mayers +Vincent Woo +Vinod Kulkarni +Vishal Doshi +Vishnu Kannan +Vitaly Ostrosablin +Vitor Monteiro +Vivek Agarwal +Vivek Dasgupta +Vivek Goyal +Vladimir Bulyga +Vladimir Kirillov +Vladimir Pouzanov +Vladimir Rutsky +Vladimir Varankin +VladimirAus +Vlastimil Zeman +Vojtech Vitek (V-Teq) +waitingkuo +Walter Leibbrandt +Walter Stanish +Wang Chao +Wang Guoliang +Wang Jie +Wang Long +Wang Ping +Wang Xing +Wang Yuexiao +Wang Yumu <37442693@qq.com> +wanghuaiqing +Ward Vandewege +WarheadsSE +Wassim Dhif +Wayne Chang +Wayne Song +Weerasak Chongnguluam +Wei Fu +Wei Wu +Wei-Ting Kuo +weipeng +weiyan +Weiyang Zhu +Wen Cheng Ma +Wendel Fleming +Wenjun Tang +Wenkai Yin +wenlxie +Wentao Zhang +Wenxuan Zhao +Wenyu You <21551128@zju.edu.cn> +Wenzhi Liang +Wes Morgan +Wewang Xiaorenfine +Wiktor Kwapisiewicz +Will Dietz +Will Rouesnel +Will Weaver +willhf +William Delanoue +William Henry +William Hubbs +William Martin +William Riancho +William Thurston +Wilson Júnior +Wing-Kam Wong +WiseTrem +Wolfgang Powisch +Wonjun Kim +xamyzhao +Xian Chaobo +Xianglin Gao +Xianlu Bird +Xiao YongBiao +XiaoBing Jiang +Xiaodong Liu +Xiaodong Zhang +Xiaoxi He +Xiaoxu Chen +Xiaoyu Zhang +xichengliudui <1693291525@qq.com> +xiekeyang +Ximo Guanter Gonzálbez +Xinbo Weng +Xinfeng Liu +Xinzi Zhou +Xiuming Chen +Xuecong Liao +xuzhaokui +Yadnyawalkya Tale +Yahya +YAMADA Tsuyoshi +Yamasaki Masahide +Yan Feng +Yang Bai +Yang Pengfei +yangchenliang +Yanqiang Miao +Yao Zaiyong +Yash Murty +Yassine Tijani +Yasunori Mahata +Yazhong Liu +Yestin Sun +Yi EungJun +Yibai Zhang +Yihang Ho +Ying Li +Yohei Ueda +Yong Tang +Yongxin Li +Yongzhi Pan +Yosef Fertel +You-Sheng Yang (楊有勝) +youcai +Youcef YEKHLEF +Yu Changchun +Yu Chengxia +Yu Peng +Yu-Ju Hong +Yuan Sun +Yuanhong Peng +Yue Zhang +Yuhao Fang +Yuichiro Kaneko +Yunxiang Huang +Yurii Rashkovskii +Yusuf Tarık Günaydın +Yves Junqueira +Zac Dover +Zach Borboa +Zachary Jaffee +Zain Memon +Zaiste! +Zane DeGraffenried +Zefan Li +Zen Lin(Zhinan Lin) +Zhang Kun +Zhang Wei +Zhang Wentao +ZhangHang +zhangxianwei +Zhenan Ye <21551168@zju.edu.cn> +zhenghenghuo +Zhenhai Gao +Zhenkun Bi +zhipengzuo +Zhou Hao +Zhoulin Xie +Zhu Guihua +Zhu Kunjia +Zhuoyun Wei +Ziheng Liu +Zilin Du +zimbatm +Ziming Dong +ZJUshuaizhou <21551191@zju.edu.cn> +zmarouf +Zoltan Tombol +Zou Yu +zqh +Zuhayr Elahi +Zunayed Ali +Álex González +Álvaro Lázaro +Átila Camurça Alves +尹吉峰 +屈骏 +徐俊杰 +慕陶 +搏通 +黄艳红00139573 diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/LICENSE b/cluster-autoscaler/vendor/github.com/docker/docker/LICENSE new file mode 100644 index 000000000000..6d8d58fb676b --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2013-2018 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/NOTICE b/cluster-autoscaler/vendor/github.com/docker/docker/NOTICE new file mode 100644 index 000000000000..58b19b6d15b9 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/NOTICE @@ -0,0 +1,19 @@ +Docker +Copyright 2012-2017 Docker, Inc. + +This product includes software developed at Docker, Inc. (https://www.docker.com). + +This product contains software (https://github.com/creack/pty) developed +by Keith Rarick, licensed under the MIT License. + +The following is courtesy of our legal counsel: + + +Use and transfer of Docker may be subject to certain restrictions by the +United States and other governments. +It is your responsibility to ensure that your use and/or transfer does not +violate applicable laws. + +For more information, please see https://www.bis.doc.gov + +See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/README.md b/cluster-autoscaler/vendor/github.com/docker/docker/api/README.md new file mode 100644 index 000000000000..f136c3433af4 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/README.md @@ -0,0 +1,42 @@ +# Working on the Engine API + +The Engine API is an HTTP API used by the command-line client to communicate with the daemon. It can also be used by third-party software to control the daemon. + +It consists of various components in this repository: + +- `api/swagger.yaml` A Swagger definition of the API. +- `api/types/` Types shared by both the client and server, representing various objects, options, responses, etc. Most are written manually, but some are automatically generated from the Swagger definition. See [#27919](https://github.com/docker/docker/issues/27919) for progress on this. +- `cli/` The command-line client. +- `client/` The Go client used by the command-line client. It can also be used by third-party Go programs. +- `daemon/` The daemon, which serves the API. + +## Swagger definition + +The API is defined by the [Swagger](http://swagger.io/specification/) definition in `api/swagger.yaml`. This definition can be used to: + +1. Automatically generate documentation. +2. Automatically generate the Go server and client. (A work-in-progress.) +3. Provide a machine readable version of the API for introspecting what it can do, automatically generating clients for other languages, etc. + +## Updating the API documentation + +The API documentation is generated entirely from `api/swagger.yaml`. If you make updates to the API, edit this file to represent the change in the documentation. + +The file is split into two main sections: + +- `definitions`, which defines re-usable objects used in requests and responses +- `paths`, which defines the API endpoints (and some inline objects which don't need to be reusable) + +To make an edit, first look for the endpoint you want to edit under `paths`, then make the required edits. Endpoints may reference reusable objects with `$ref`, which can be found in the `definitions` section. + +There is hopefully enough example material in the file for you to copy a similar pattern from elsewhere in the file (e.g. adding new fields or endpoints), but for the full reference, see the [Swagger specification](https://github.com/docker/docker/issues/27919). + +`swagger.yaml` is validated by `hack/validate/swagger` to ensure it is a valid Swagger definition. This is useful when making edits to ensure you are doing the right thing. + +## Viewing the API documentation + +When you make edits to `swagger.yaml`, you may want to check the generated API documentation to ensure it renders correctly. + +Run `make swagger-docs` and a preview will be running at `http://localhost`. Some of the styling may be incorrect, but you'll be able to ensure that it is generating the correct documentation. + +The production documentation is generated by vendoring `swagger.yaml` into [docker/docker.github.io](https://github.com/docker/docker.github.io). diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/common.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/common.go new file mode 100644 index 000000000000..1565e2af6474 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/common.go @@ -0,0 +1,11 @@ +package api // import "github.com/docker/docker/api" + +// Common constants for daemon and client. +const ( + // DefaultVersion of Current REST API + DefaultVersion = "1.41" + + // NoBaseImageSpecifier is the symbol used by the FROM + // command to specify that no base image is to be used. + NoBaseImageSpecifier = "scratch" +) diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/common_unix.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/common_unix.go new file mode 100644 index 000000000000..504b0c90d7bb --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/common_unix.go @@ -0,0 +1,6 @@ +// +build !windows + +package api // import "github.com/docker/docker/api" + +// MinVersion represents Minimum REST API version supported +const MinVersion = "1.12" diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/common_windows.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/common_windows.go new file mode 100644 index 000000000000..590ba5479be1 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/common_windows.go @@ -0,0 +1,8 @@ +package api // import "github.com/docker/docker/api" + +// MinVersion represents Minimum REST API version supported +// Technically the first daemon API version released on Windows is v1.25 in +// engine version 1.13. However, some clients are explicitly using downlevel +// APIs (e.g. docker-compose v2.1 file format) and that is just too restrictive. +// Hence also allowing 1.24 on Windows. +const MinVersion string = "1.24" diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/swagger-gen.yaml b/cluster-autoscaler/vendor/github.com/docker/docker/api/swagger-gen.yaml new file mode 100644 index 000000000000..f07a02737f73 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/swagger-gen.yaml @@ -0,0 +1,12 @@ + +layout: + models: + - name: definition + source: asset:model + target: "{{ joinFilePath .Target .ModelPackage }}" + file_name: "{{ (snakize (pascalize .Name)) }}.go" + operations: + - name: handler + source: asset:serverOperation + target: "{{ joinFilePath .Target .APIPackage .Package }}" + file_name: "{{ (snakize (pascalize .Name)) }}.go" diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/swagger.yaml b/cluster-autoscaler/vendor/github.com/docker/docker/api/swagger.yaml new file mode 100644 index 000000000000..1294e5a22cfd --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/swagger.yaml @@ -0,0 +1,11425 @@ +# A Swagger 2.0 (a.k.a. OpenAPI) definition of the Engine API. +# +# This is used for generating API documentation and the types used by the +# client/server. See api/README.md for more information. +# +# Some style notes: +# - This file is used by ReDoc, which allows GitHub Flavored Markdown in +# descriptions. +# - There is no maximum line length, for ease of editing and pretty diffs. +# - operationIds are in the format "NounVerb", with a singular noun. + +swagger: "2.0" +schemes: + - "http" + - "https" +produces: + - "application/json" + - "text/plain" +consumes: + - "application/json" + - "text/plain" +basePath: "/v1.41" +info: + title: "Docker Engine API" + version: "1.41" + x-logo: + url: "https://docs.docker.com/images/logo-docker-main.png" + description: | + The Engine API is an HTTP API served by Docker Engine. It is the API the + Docker client uses to communicate with the Engine, so everything the Docker + client can do can be done with the API. + + Most of the client's commands map directly to API endpoints (e.g. `docker ps` + is `GET /containers/json`). The notable exception is running containers, + which consists of several API calls. + + # Errors + + The API uses standard HTTP status codes to indicate the success or failure + of the API call. The body of the response will be JSON in the following + format: + + ``` + { + "message": "page not found" + } + ``` + + # Versioning + + The API is usually changed in each release, so API calls are versioned to + ensure that clients don't break. To lock to a specific version of the API, + you prefix the URL with its version, for example, call `/v1.30/info` to use + the v1.30 version of the `/info` endpoint. If the API version specified in + the URL is not supported by the daemon, a HTTP `400 Bad Request` error message + is returned. + + If you omit the version-prefix, the current version of the API (v1.41) is used. + For example, calling `/info` is the same as calling `/v1.41/info`. Using the + API without a version-prefix is deprecated and will be removed in a future release. + + Engine releases in the near future should support this version of the API, + so your client will continue to work even if it is talking to a newer Engine. + + The API uses an open schema model, which means server may add extra properties + to responses. Likewise, the server will ignore any extra query parameters and + request body properties. When you write clients, you need to ignore additional + properties in responses to ensure they do not break when talking to newer + daemons. + + + # Authentication + + Authentication for registries is handled client side. The client has to send + authentication details to various endpoints that need to communicate with + registries, such as `POST /images/(name)/push`. These are sent as + `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) + (JSON) string with the following structure: + + ``` + { + "username": "string", + "password": "string", + "email": "string", + "serveraddress": "string" + } + ``` + + The `serveraddress` is a domain/IP without a protocol. Throughout this + structure, double quotes are required. + + If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), + you can just pass this instead of credentials: + + ``` + { + "identitytoken": "9cbaf023786cd7..." + } + ``` + +# The tags on paths define the menu sections in the ReDoc documentation, so +# the usage of tags must make sense for that: +# - They should be singular, not plural. +# - There should not be too many tags, or the menu becomes unwieldy. For +# example, it is preferable to add a path to the "System" tag instead of +# creating a tag with a single path in it. +# - The order of tags in this list defines the order in the menu. +tags: + # Primary objects + - name: "Container" + x-displayName: "Containers" + description: | + Create and manage containers. + - name: "Image" + x-displayName: "Images" + - name: "Network" + x-displayName: "Networks" + description: | + Networks are user-defined networks that containers can be attached to. + See the [networking documentation](https://docs.docker.com/network/) + for more information. + - name: "Volume" + x-displayName: "Volumes" + description: | + Create and manage persistent storage that can be attached to containers. + - name: "Exec" + x-displayName: "Exec" + description: | + Run new commands inside running containers. Refer to the + [command-line reference](https://docs.docker.com/engine/reference/commandline/exec/) + for more information. + + To exec a command in a container, you first need to create an exec instance, + then start it. These two API endpoints are wrapped up in a single command-line + command, `docker exec`. + + # Swarm things + - name: "Swarm" + x-displayName: "Swarm" + description: | + Engines can be clustered together in a swarm. Refer to the + [swarm mode documentation](https://docs.docker.com/engine/swarm/) + for more information. + - name: "Node" + x-displayName: "Nodes" + description: | + Nodes are instances of the Engine participating in a swarm. Swarm mode + must be enabled for these endpoints to work. + - name: "Service" + x-displayName: "Services" + description: | + Services are the definitions of tasks to run on a swarm. Swarm mode must + be enabled for these endpoints to work. + - name: "Task" + x-displayName: "Tasks" + description: | + A task is a container running on a swarm. It is the atomic scheduling unit + of swarm. Swarm mode must be enabled for these endpoints to work. + - name: "Secret" + x-displayName: "Secrets" + description: | + Secrets are sensitive data that can be used by services. Swarm mode must + be enabled for these endpoints to work. + - name: "Config" + x-displayName: "Configs" + description: | + Configs are application configurations that can be used by services. Swarm + mode must be enabled for these endpoints to work. + # System things + - name: "Plugin" + x-displayName: "Plugins" + - name: "System" + x-displayName: "System" + +definitions: + Port: + type: "object" + description: "An open port on a container" + required: [PrivatePort, Type] + properties: + IP: + type: "string" + format: "ip-address" + description: "Host IP address that the container's port is mapped to" + PrivatePort: + type: "integer" + format: "uint16" + x-nullable: false + description: "Port on the container" + PublicPort: + type: "integer" + format: "uint16" + description: "Port exposed on the host" + Type: + type: "string" + x-nullable: false + enum: ["tcp", "udp", "sctp"] + example: + PrivatePort: 8080 + PublicPort: 80 + Type: "tcp" + + MountPoint: + type: "object" + description: "A mount point inside a container" + properties: + Type: + type: "string" + Name: + type: "string" + Source: + type: "string" + Destination: + type: "string" + Driver: + type: "string" + Mode: + type: "string" + RW: + type: "boolean" + Propagation: + type: "string" + + DeviceMapping: + type: "object" + description: "A device mapping between the host and container" + properties: + PathOnHost: + type: "string" + PathInContainer: + type: "string" + CgroupPermissions: + type: "string" + example: + PathOnHost: "/dev/deviceName" + PathInContainer: "/dev/deviceName" + CgroupPermissions: "mrw" + + DeviceRequest: + type: "object" + description: "A request for devices to be sent to device drivers" + properties: + Driver: + type: "string" + example: "nvidia" + Count: + type: "integer" + example: -1 + DeviceIDs: + type: "array" + items: + type: "string" + example: + - "0" + - "1" + - "GPU-fef8089b-4820-abfc-e83e-94318197576e" + Capabilities: + description: | + A list of capabilities; an OR list of AND lists of capabilities. + type: "array" + items: + type: "array" + items: + type: "string" + example: + # gpu AND nvidia AND compute + - ["gpu", "nvidia", "compute"] + Options: + description: | + Driver-specific options, specified as a key/value pairs. These options + are passed directly to the driver. + type: "object" + additionalProperties: + type: "string" + + ThrottleDevice: + type: "object" + properties: + Path: + description: "Device path" + type: "string" + Rate: + description: "Rate" + type: "integer" + format: "int64" + minimum: 0 + + Mount: + type: "object" + properties: + Target: + description: "Container path." + type: "string" + Source: + description: "Mount source (e.g. a volume name, a host path)." + type: "string" + Type: + description: | + The mount type. Available types: + + - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container. + - `volume` Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are **not** removed when the container is removed. + - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs. + - `npipe` Mounts a named pipe from the host into the container. Must exist prior to creating the container. + type: "string" + enum: + - "bind" + - "volume" + - "tmpfs" + - "npipe" + ReadOnly: + description: "Whether the mount should be read-only." + type: "boolean" + Consistency: + description: "The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`." + type: "string" + BindOptions: + description: "Optional configuration for the `bind` type." + type: "object" + properties: + Propagation: + description: "A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`." + type: "string" + enum: + - "private" + - "rprivate" + - "shared" + - "rshared" + - "slave" + - "rslave" + NonRecursive: + description: "Disable recursive bind mount." + type: "boolean" + default: false + VolumeOptions: + description: "Optional configuration for the `volume` type." + type: "object" + properties: + NoCopy: + description: "Populate volume with data from the target." + type: "boolean" + default: false + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + DriverConfig: + description: "Map of driver specific options" + type: "object" + properties: + Name: + description: "Name of the driver to use to create the volume." + type: "string" + Options: + description: "key/value map of driver specific options." + type: "object" + additionalProperties: + type: "string" + TmpfsOptions: + description: "Optional configuration for the `tmpfs` type." + type: "object" + properties: + SizeBytes: + description: "The size for the tmpfs mount in bytes." + type: "integer" + format: "int64" + Mode: + description: "The permission mode for the tmpfs mount in an integer." + type: "integer" + + RestartPolicy: + description: | + The behavior to apply when the container exits. The default is not to + restart. + + An ever increasing delay (double the previous delay, starting at 100ms) is + added before each restart to prevent flooding the server. + type: "object" + properties: + Name: + type: "string" + description: | + - Empty string means not to restart + - `always` Always restart + - `unless-stopped` Restart always except when the user has manually stopped the container + - `on-failure` Restart only when the container exit code is non-zero + enum: + - "" + - "always" + - "unless-stopped" + - "on-failure" + MaximumRetryCount: + type: "integer" + description: | + If `on-failure` is used, the number of times to retry before giving up. + + Resources: + description: "A container's resources (cgroups config, ulimits, etc)" + type: "object" + properties: + # Applicable to all platforms + CpuShares: + description: | + An integer value representing this container's relative CPU weight + versus other containers. + type: "integer" + Memory: + description: "Memory limit in bytes." + type: "integer" + format: "int64" + default: 0 + # Applicable to UNIX platforms + CgroupParent: + description: | + Path to `cgroups` under which the container's `cgroup` is created. If + the path is not absolute, the path is considered to be relative to the + `cgroups` path of the init process. Cgroups are created if they do not + already exist. + type: "string" + BlkioWeight: + description: "Block IO weight (relative weight)." + type: "integer" + minimum: 0 + maximum: 1000 + BlkioWeightDevice: + description: | + Block IO weight (relative device weight) in the form: + + ``` + [{"Path": "device_path", "Weight": weight}] + ``` + type: "array" + items: + type: "object" + properties: + Path: + type: "string" + Weight: + type: "integer" + minimum: 0 + BlkioDeviceReadBps: + description: | + Limit read rate (bytes per second) from a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + type: "array" + items: + $ref: "#/definitions/ThrottleDevice" + BlkioDeviceWriteBps: + description: | + Limit write rate (bytes per second) to a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + type: "array" + items: + $ref: "#/definitions/ThrottleDevice" + BlkioDeviceReadIOps: + description: | + Limit read rate (IO per second) from a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + type: "array" + items: + $ref: "#/definitions/ThrottleDevice" + BlkioDeviceWriteIOps: + description: | + Limit write rate (IO per second) to a device, in the form: + + ``` + [{"Path": "device_path", "Rate": rate}] + ``` + type: "array" + items: + $ref: "#/definitions/ThrottleDevice" + CpuPeriod: + description: "The length of a CPU period in microseconds." + type: "integer" + format: "int64" + CpuQuota: + description: | + Microseconds of CPU time that the container can get in a CPU period. + type: "integer" + format: "int64" + CpuRealtimePeriod: + description: | + The length of a CPU real-time period in microseconds. Set to 0 to + allocate no time allocated to real-time tasks. + type: "integer" + format: "int64" + CpuRealtimeRuntime: + description: | + The length of a CPU real-time runtime in microseconds. Set to 0 to + allocate no time allocated to real-time tasks. + type: "integer" + format: "int64" + CpusetCpus: + description: | + CPUs in which to allow execution (e.g., `0-3`, `0,1`). + type: "string" + example: "0-3" + CpusetMems: + description: | + Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only + effective on NUMA systems. + type: "string" + Devices: + description: "A list of devices to add to the container." + type: "array" + items: + $ref: "#/definitions/DeviceMapping" + DeviceCgroupRules: + description: "a list of cgroup rules to apply to the container" + type: "array" + items: + type: "string" + example: "c 13:* rwm" + DeviceRequests: + description: | + A list of requests for devices to be sent to device drivers. + type: "array" + items: + $ref: "#/definitions/DeviceRequest" + KernelMemory: + description: | + Kernel memory limit in bytes. + +


+ + > **Deprecated**: This field is deprecated as the kernel 5.4 deprecated + > `kmem.limit_in_bytes`. + type: "integer" + format: "int64" + example: 209715200 + KernelMemoryTCP: + description: "Hard limit for kernel TCP buffer memory (in bytes)." + type: "integer" + format: "int64" + MemoryReservation: + description: "Memory soft limit in bytes." + type: "integer" + format: "int64" + MemorySwap: + description: | + Total memory limit (memory + swap). Set as `-1` to enable unlimited + swap. + type: "integer" + format: "int64" + MemorySwappiness: + description: | + Tune a container's memory swappiness behavior. Accepts an integer + between 0 and 100. + type: "integer" + format: "int64" + minimum: 0 + maximum: 100 + NanoCpus: + description: "CPU quota in units of 10-9 CPUs." + type: "integer" + format: "int64" + OomKillDisable: + description: "Disable OOM Killer for the container." + type: "boolean" + Init: + description: | + Run an init inside the container that forwards signals and reaps + processes. This field is omitted if empty, and the default (as + configured on the daemon) is used. + type: "boolean" + x-nullable: true + PidsLimit: + description: | + Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` + to not change. + type: "integer" + format: "int64" + x-nullable: true + Ulimits: + description: | + A list of resource limits to set in the container. For example: + + ``` + {"Name": "nofile", "Soft": 1024, "Hard": 2048} + ``` + type: "array" + items: + type: "object" + properties: + Name: + description: "Name of ulimit" + type: "string" + Soft: + description: "Soft limit" + type: "integer" + Hard: + description: "Hard limit" + type: "integer" + # Applicable to Windows + CpuCount: + description: | + The number of usable CPUs (Windows only). + + On Windows Server containers, the processor resource controls are + mutually exclusive. The order of precedence is `CPUCount` first, then + `CPUShares`, and `CPUPercent` last. + type: "integer" + format: "int64" + CpuPercent: + description: | + The usable percentage of the available CPUs (Windows only). + + On Windows Server containers, the processor resource controls are + mutually exclusive. The order of precedence is `CPUCount` first, then + `CPUShares`, and `CPUPercent` last. + type: "integer" + format: "int64" + IOMaximumIOps: + description: "Maximum IOps for the container system drive (Windows only)" + type: "integer" + format: "int64" + IOMaximumBandwidth: + description: | + Maximum IO in bytes per second for the container system drive + (Windows only). + type: "integer" + format: "int64" + + Limit: + description: | + An object describing a limit on resources which can be requested by a task. + type: "object" + properties: + NanoCPUs: + type: "integer" + format: "int64" + example: 4000000000 + MemoryBytes: + type: "integer" + format: "int64" + example: 8272408576 + Pids: + description: | + Limits the maximum number of PIDs in the container. Set `0` for unlimited. + type: "integer" + format: "int64" + default: 0 + example: 100 + + ResourceObject: + description: | + An object describing the resources which can be advertised by a node and + requested by a task. + type: "object" + properties: + NanoCPUs: + type: "integer" + format: "int64" + example: 4000000000 + MemoryBytes: + type: "integer" + format: "int64" + example: 8272408576 + GenericResources: + $ref: "#/definitions/GenericResources" + + GenericResources: + description: | + User-defined resources can be either Integer resources (e.g, `SSD=3`) or + String resources (e.g, `GPU=UUID1`). + type: "array" + items: + type: "object" + properties: + NamedResourceSpec: + type: "object" + properties: + Kind: + type: "string" + Value: + type: "string" + DiscreteResourceSpec: + type: "object" + properties: + Kind: + type: "string" + Value: + type: "integer" + format: "int64" + example: + - DiscreteResourceSpec: + Kind: "SSD" + Value: 3 + - NamedResourceSpec: + Kind: "GPU" + Value: "UUID1" + - NamedResourceSpec: + Kind: "GPU" + Value: "UUID2" + + HealthConfig: + description: "A test to perform to check that the container is healthy." + type: "object" + properties: + Test: + description: | + The test to perform. Possible values are: + + - `[]` inherit healthcheck from image or parent image + - `["NONE"]` disable healthcheck + - `["CMD", args...]` exec arguments directly + - `["CMD-SHELL", command]` run command with system's default shell + type: "array" + items: + type: "string" + Interval: + description: | + The time to wait between checks in nanoseconds. It should be 0 or at + least 1000000 (1 ms). 0 means inherit. + type: "integer" + Timeout: + description: | + The time to wait before considering the check to have hung. It should + be 0 or at least 1000000 (1 ms). 0 means inherit. + type: "integer" + Retries: + description: | + The number of consecutive failures needed to consider a container as + unhealthy. 0 means inherit. + type: "integer" + StartPeriod: + description: | + Start period for the container to initialize before starting + health-retries countdown in nanoseconds. It should be 0 or at least + 1000000 (1 ms). 0 means inherit. + type: "integer" + + Health: + description: | + Health stores information about the container's healthcheck results. + type: "object" + properties: + Status: + description: | + Status is one of `none`, `starting`, `healthy` or `unhealthy` + + - "none" Indicates there is no healthcheck + - "starting" Starting indicates that the container is not yet ready + - "healthy" Healthy indicates that the container is running correctly + - "unhealthy" Unhealthy indicates that the container has a problem + type: "string" + enum: + - "none" + - "starting" + - "healthy" + - "unhealthy" + example: "healthy" + FailingStreak: + description: "FailingStreak is the number of consecutive failures" + type: "integer" + example: 0 + Log: + type: "array" + description: | + Log contains the last few results (oldest first) + items: + x-nullable: true + $ref: "#/definitions/HealthcheckResult" + + HealthcheckResult: + description: | + HealthcheckResult stores information about a single run of a healthcheck probe + type: "object" + properties: + Start: + description: | + Date and time at which this check started in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: "string" + format: "date-time" + example: "2020-01-04T10:44:24.496525531Z" + End: + description: | + Date and time at which this check ended in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: "string" + format: "dateTime" + example: "2020-01-04T10:45:21.364524523Z" + ExitCode: + description: | + ExitCode meanings: + + - `0` healthy + - `1` unhealthy + - `2` reserved (considered unhealthy) + - other values: error running probe + type: "integer" + example: 0 + Output: + description: "Output from last check" + type: "string" + + HostConfig: + description: "Container configuration that depends on the host we are running on" + allOf: + - $ref: "#/definitions/Resources" + - type: "object" + properties: + # Applicable to all platforms + Binds: + type: "array" + description: | + A list of volume bindings for this container. Each volume binding + is a string in one of these forms: + + - `host-src:container-dest[:options]` to bind-mount a host path + into the container. Both `host-src`, and `container-dest` must + be an _absolute_ path. + - `volume-name:container-dest[:options]` to bind-mount a volume + managed by a volume driver into the container. `container-dest` + must be an _absolute_ path. + + `options` is an optional, comma-delimited list of: + + - `nocopy` disables automatic copying of data from the container + path to the volume. The `nocopy` flag only applies to named volumes. + - `[ro|rw]` mounts a volume read-only or read-write, respectively. + If omitted or set to `rw`, volumes are mounted read-write. + - `[z|Z]` applies SELinux labels to allow or deny multiple containers + to read and write to the same volume. + - `z`: a _shared_ content label is applied to the content. This + label indicates that multiple containers can share the volume + content, for both reading and writing. + - `Z`: a _private unshared_ label is applied to the content. + This label indicates that only the current container can use + a private volume. Labeling systems such as SELinux require + proper labels to be placed on volume content that is mounted + into a container. Without a label, the security system can + prevent a container's processes from using the content. By + default, the labels set by the host operating system are not + modified. + - `[[r]shared|[r]slave|[r]private]` specifies mount + [propagation behavior](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt). + This only applies to bind-mounted volumes, not internal volumes + or named volumes. Mount propagation requires the source mount + point (the location where the source directory is mounted in the + host operating system) to have the correct propagation properties. + For shared volumes, the source mount point must be set to `shared`. + For slave volumes, the mount must be set to either `shared` or + `slave`. + items: + type: "string" + ContainerIDFile: + type: "string" + description: "Path to a file where the container ID is written" + LogConfig: + type: "object" + description: "The logging configuration for this container" + properties: + Type: + type: "string" + enum: + - "json-file" + - "syslog" + - "journald" + - "gelf" + - "fluentd" + - "awslogs" + - "splunk" + - "etwlogs" + - "none" + Config: + type: "object" + additionalProperties: + type: "string" + NetworkMode: + type: "string" + description: | + Network mode to use for this container. Supported standard values + are: `bridge`, `host`, `none`, and `container:`. Any + other value is taken as a custom network's name to which this + container should connect to. + PortBindings: + $ref: "#/definitions/PortMap" + RestartPolicy: + $ref: "#/definitions/RestartPolicy" + AutoRemove: + type: "boolean" + description: | + Automatically remove the container when the container's process + exits. This has no effect if `RestartPolicy` is set. + VolumeDriver: + type: "string" + description: "Driver that this container uses to mount volumes." + VolumesFrom: + type: "array" + description: | + A list of volumes to inherit from another container, specified in + the form `[:]`. + items: + type: "string" + Mounts: + description: | + Specification for mounts to be added to the container. + type: "array" + items: + $ref: "#/definitions/Mount" + + # Applicable to UNIX platforms + CapAdd: + type: "array" + description: | + A list of kernel capabilities to add to the container. Conflicts + with option 'Capabilities'. + items: + type: "string" + CapDrop: + type: "array" + description: | + A list of kernel capabilities to drop from the container. Conflicts + with option 'Capabilities'. + items: + type: "string" + CgroupnsMode: + type: "string" + enum: + - "private" + - "host" + description: | + cgroup namespace mode for the container. Possible values are: + + - `"private"`: the container runs in its own private cgroup namespace + - `"host"`: use the host system's cgroup namespace + + If not specified, the daemon default is used, which can either be `"private"` + or `"host"`, depending on daemon version, kernel support and configuration. + Dns: + type: "array" + description: "A list of DNS servers for the container to use." + items: + type: "string" + DnsOptions: + type: "array" + description: "A list of DNS options." + items: + type: "string" + DnsSearch: + type: "array" + description: "A list of DNS search domains." + items: + type: "string" + ExtraHosts: + type: "array" + description: | + A list of hostnames/IP mappings to add to the container's `/etc/hosts` + file. Specified in the form `["hostname:IP"]`. + items: + type: "string" + GroupAdd: + type: "array" + description: | + A list of additional groups that the container process will run as. + items: + type: "string" + IpcMode: + type: "string" + description: | + IPC sharing mode for the container. Possible values are: + + - `"none"`: own private IPC namespace, with /dev/shm not mounted + - `"private"`: own private IPC namespace + - `"shareable"`: own private IPC namespace, with a possibility to share it with other containers + - `"container:"`: join another (shareable) container's IPC namespace + - `"host"`: use the host system's IPC namespace + + If not specified, daemon default is used, which can either be `"private"` + or `"shareable"`, depending on daemon version and configuration. + Cgroup: + type: "string" + description: "Cgroup to use for the container." + Links: + type: "array" + description: | + A list of links for the container in the form `container_name:alias`. + items: + type: "string" + OomScoreAdj: + type: "integer" + description: | + An integer value containing the score given to the container in + order to tune OOM killer preferences. + example: 500 + PidMode: + type: "string" + description: | + Set the PID (Process) Namespace mode for the container. It can be + either: + + - `"container:"`: joins another container's PID namespace + - `"host"`: use the host's PID namespace inside the container + Privileged: + type: "boolean" + description: "Gives the container full access to the host." + PublishAllPorts: + type: "boolean" + description: | + Allocates an ephemeral host port for all of a container's + exposed ports. + + Ports are de-allocated when the container stops and allocated when + the container starts. The allocated port might be changed when + restarting the container. + + The port is selected from the ephemeral port range that depends on + the kernel. For example, on Linux the range is defined by + `/proc/sys/net/ipv4/ip_local_port_range`. + ReadonlyRootfs: + type: "boolean" + description: "Mount the container's root filesystem as read only." + SecurityOpt: + type: "array" + description: "A list of string values to customize labels for MLS + systems, such as SELinux." + items: + type: "string" + StorageOpt: + type: "object" + description: | + Storage driver options for this container, in the form `{"size": "120G"}`. + additionalProperties: + type: "string" + Tmpfs: + type: "object" + description: | + A map of container directories which should be replaced by tmpfs + mounts, and their corresponding mount options. For example: + + ``` + { "/run": "rw,noexec,nosuid,size=65536k" } + ``` + additionalProperties: + type: "string" + UTSMode: + type: "string" + description: "UTS namespace to use for the container." + UsernsMode: + type: "string" + description: | + Sets the usernamespace mode for the container when usernamespace + remapping option is enabled. + ShmSize: + type: "integer" + description: | + Size of `/dev/shm` in bytes. If omitted, the system uses 64MB. + minimum: 0 + Sysctls: + type: "object" + description: | + A list of kernel parameters (sysctls) to set in the container. + For example: + + ``` + {"net.ipv4.ip_forward": "1"} + ``` + additionalProperties: + type: "string" + Runtime: + type: "string" + description: "Runtime to use with this container." + # Applicable to Windows + ConsoleSize: + type: "array" + description: | + Initial console size, as an `[height, width]` array. (Windows only) + minItems: 2 + maxItems: 2 + items: + type: "integer" + minimum: 0 + Isolation: + type: "string" + description: | + Isolation technology of the container. (Windows only) + enum: + - "default" + - "process" + - "hyperv" + MaskedPaths: + type: "array" + description: | + The list of paths to be masked inside the container (this overrides + the default set of paths). + items: + type: "string" + ReadonlyPaths: + type: "array" + description: | + The list of paths to be set as read-only inside the container + (this overrides the default set of paths). + items: + type: "string" + + ContainerConfig: + description: "Configuration for a container that is portable between hosts" + type: "object" + properties: + Hostname: + description: "The hostname to use for the container, as a valid RFC 1123 hostname." + type: "string" + Domainname: + description: "The domain name to use for the container." + type: "string" + User: + description: "The user that commands are run as inside the container." + type: "string" + AttachStdin: + description: "Whether to attach to `stdin`." + type: "boolean" + default: false + AttachStdout: + description: "Whether to attach to `stdout`." + type: "boolean" + default: true + AttachStderr: + description: "Whether to attach to `stderr`." + type: "boolean" + default: true + ExposedPorts: + description: | + An object mapping ports to an empty object in the form: + + `{"/": {}}` + type: "object" + additionalProperties: + type: "object" + enum: + - {} + default: {} + Tty: + description: | + Attach standard streams to a TTY, including `stdin` if it is not closed. + type: "boolean" + default: false + OpenStdin: + description: "Open `stdin`" + type: "boolean" + default: false + StdinOnce: + description: "Close `stdin` after one attached client disconnects" + type: "boolean" + default: false + Env: + description: | + A list of environment variables to set inside the container in the + form `["VAR=value", ...]`. A variable without `=` is removed from the + environment, rather than to have an empty value. + type: "array" + items: + type: "string" + Cmd: + description: | + Command to run specified as a string or an array of strings. + type: "array" + items: + type: "string" + Healthcheck: + $ref: "#/definitions/HealthConfig" + ArgsEscaped: + description: "Command is already escaped (Windows only)" + type: "boolean" + Image: + description: | + The name of the image to use when creating the container/ + type: "string" + Volumes: + description: | + An object mapping mount point paths inside the container to empty + objects. + type: "object" + additionalProperties: + type: "object" + enum: + - {} + default: {} + WorkingDir: + description: "The working directory for commands to run in." + type: "string" + Entrypoint: + description: | + The entry point for the container as a string or an array of strings. + + If the array consists of exactly one empty string (`[""]`) then the + entry point is reset to system default (i.e., the entry point used by + docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). + type: "array" + items: + type: "string" + NetworkDisabled: + description: "Disable networking for the container." + type: "boolean" + MacAddress: + description: "MAC address of the container." + type: "string" + OnBuild: + description: | + `ONBUILD` metadata that were defined in the image's `Dockerfile`. + type: "array" + items: + type: "string" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + StopSignal: + description: | + Signal to stop a container as a string or unsigned integer. + type: "string" + default: "SIGTERM" + StopTimeout: + description: "Timeout to stop a container in seconds." + type: "integer" + default: 10 + Shell: + description: | + Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. + type: "array" + items: + type: "string" + + NetworkingConfig: + description: | + NetworkingConfig represents the container's networking configuration for + each of its interfaces. + It is used for the networking configs specified in the `docker create` + and `docker network connect` commands. + type: "object" + properties: + EndpointsConfig: + description: | + A mapping of network name to endpoint configuration for that network. + type: "object" + additionalProperties: + $ref: "#/definitions/EndpointSettings" + example: + # putting an example here, instead of using the example values from + # /definitions/EndpointSettings, because containers/create currently + # does not support attaching to multiple networks, so the example request + # would be confusing if it showed that multiple networks can be contained + # in the EndpointsConfig. + # TODO remove once we support multiple networks on container create (see https://github.com/moby/moby/blob/07e6b843594e061f82baa5fa23c2ff7d536c2a05/daemon/create.go#L323) + EndpointsConfig: + isolated_nw: + IPAMConfig: + IPv4Address: "172.20.30.33" + IPv6Address: "2001:db8:abcd::3033" + LinkLocalIPs: + - "169.254.34.68" + - "fe80::3468" + Links: + - "container_1" + - "container_2" + Aliases: + - "server_x" + - "server_y" + + NetworkSettings: + description: "NetworkSettings exposes the network settings in the API" + type: "object" + properties: + Bridge: + description: Name of the network'a bridge (for example, `docker0`). + type: "string" + example: "docker0" + SandboxID: + description: SandboxID uniquely represents a container's network stack. + type: "string" + example: "9d12daf2c33f5959c8bf90aa513e4f65b561738661003029ec84830cd503a0c3" + HairpinMode: + description: | + Indicates if hairpin NAT should be enabled on the virtual interface. + type: "boolean" + example: false + LinkLocalIPv6Address: + description: IPv6 unicast address using the link-local prefix. + type: "string" + example: "fe80::42:acff:fe11:1" + LinkLocalIPv6PrefixLen: + description: Prefix length of the IPv6 unicast address. + type: "integer" + example: "64" + Ports: + $ref: "#/definitions/PortMap" + SandboxKey: + description: SandboxKey identifies the sandbox + type: "string" + example: "/var/run/docker/netns/8ab54b426c38" + + # TODO is SecondaryIPAddresses actually used? + SecondaryIPAddresses: + description: "" + type: "array" + items: + $ref: "#/definitions/Address" + x-nullable: true + + # TODO is SecondaryIPv6Addresses actually used? + SecondaryIPv6Addresses: + description: "" + type: "array" + items: + $ref: "#/definitions/Address" + x-nullable: true + + # TODO properties below are part of DefaultNetworkSettings, which is + # marked as deprecated since Docker 1.9 and to be removed in Docker v17.12 + EndpointID: + description: | + EndpointID uniquely represents a service endpoint in a Sandbox. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + type: "string" + example: "b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b" + Gateway: + description: | + Gateway address for the default "bridge" network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + type: "string" + example: "172.17.0.1" + GlobalIPv6Address: + description: | + Global IPv6 address for the default "bridge" network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + type: "string" + example: "2001:db8::5689" + GlobalIPv6PrefixLen: + description: | + Mask length of the global IPv6 address. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + type: "integer" + example: 64 + IPAddress: + description: | + IPv4 address for the default "bridge" network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + type: "string" + example: "172.17.0.4" + IPPrefixLen: + description: | + Mask length of the IPv4 address. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + type: "integer" + example: 16 + IPv6Gateway: + description: | + IPv6 gateway address for this network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + type: "string" + example: "2001:db8:2::100" + MacAddress: + description: | + MAC address for the container on the default "bridge" network. + +


+ + > **Deprecated**: This field is only propagated when attached to the + > default "bridge" network. Use the information from the "bridge" + > network inside the `Networks` map instead, which contains the same + > information. This field was deprecated in Docker 1.9 and is scheduled + > to be removed in Docker 17.12.0 + type: "string" + example: "02:42:ac:11:00:04" + Networks: + description: | + Information about all networks that the container is connected to. + type: "object" + additionalProperties: + $ref: "#/definitions/EndpointSettings" + + Address: + description: Address represents an IPv4 or IPv6 IP address. + type: "object" + properties: + Addr: + description: IP address. + type: "string" + PrefixLen: + description: Mask length of the IP address. + type: "integer" + + PortMap: + description: | + PortMap describes the mapping of container ports to host ports, using the + container's port-number and protocol as key in the format `/`, + for example, `80/udp`. + + If a container's port is mapped for multiple protocols, separate entries + are added to the mapping table. + type: "object" + additionalProperties: + type: "array" + x-nullable: true + items: + $ref: "#/definitions/PortBinding" + example: + "443/tcp": + - HostIp: "127.0.0.1" + HostPort: "4443" + "80/tcp": + - HostIp: "0.0.0.0" + HostPort: "80" + - HostIp: "0.0.0.0" + HostPort: "8080" + "80/udp": + - HostIp: "0.0.0.0" + HostPort: "80" + "53/udp": + - HostIp: "0.0.0.0" + HostPort: "53" + "2377/tcp": null + + PortBinding: + description: | + PortBinding represents a binding between a host IP address and a host + port. + type: "object" + properties: + HostIp: + description: "Host IP address that the container's port is mapped to." + type: "string" + example: "127.0.0.1" + HostPort: + description: "Host port number that the container's port is mapped to." + type: "string" + example: "4443" + + GraphDriverData: + description: "Information about a container's graph driver." + type: "object" + required: [Name, Data] + properties: + Name: + type: "string" + x-nullable: false + Data: + type: "object" + x-nullable: false + additionalProperties: + type: "string" + + Image: + type: "object" + required: + - Id + - Parent + - Comment + - Created + - Container + - DockerVersion + - Author + - Architecture + - Os + - Size + - VirtualSize + - GraphDriver + - RootFS + properties: + Id: + type: "string" + x-nullable: false + RepoTags: + type: "array" + items: + type: "string" + RepoDigests: + type: "array" + items: + type: "string" + Parent: + type: "string" + x-nullable: false + Comment: + type: "string" + x-nullable: false + Created: + type: "string" + x-nullable: false + Container: + type: "string" + x-nullable: false + ContainerConfig: + $ref: "#/definitions/ContainerConfig" + DockerVersion: + type: "string" + x-nullable: false + Author: + type: "string" + x-nullable: false + Config: + $ref: "#/definitions/ContainerConfig" + Architecture: + type: "string" + x-nullable: false + Os: + type: "string" + x-nullable: false + OsVersion: + type: "string" + Size: + type: "integer" + format: "int64" + x-nullable: false + VirtualSize: + type: "integer" + format: "int64" + x-nullable: false + GraphDriver: + $ref: "#/definitions/GraphDriverData" + RootFS: + type: "object" + required: [Type] + properties: + Type: + type: "string" + x-nullable: false + Layers: + type: "array" + items: + type: "string" + BaseLayer: + type: "string" + Metadata: + type: "object" + properties: + LastTagTime: + type: "string" + format: "dateTime" + + ImageSummary: + type: "object" + required: + - Id + - ParentId + - RepoTags + - RepoDigests + - Created + - Size + - SharedSize + - VirtualSize + - Labels + - Containers + properties: + Id: + type: "string" + x-nullable: false + ParentId: + type: "string" + x-nullable: false + RepoTags: + type: "array" + x-nullable: false + items: + type: "string" + RepoDigests: + type: "array" + x-nullable: false + items: + type: "string" + Created: + type: "integer" + x-nullable: false + Size: + type: "integer" + x-nullable: false + SharedSize: + type: "integer" + x-nullable: false + VirtualSize: + type: "integer" + x-nullable: false + Labels: + type: "object" + x-nullable: false + additionalProperties: + type: "string" + Containers: + x-nullable: false + type: "integer" + + AuthConfig: + type: "object" + properties: + username: + type: "string" + password: + type: "string" + email: + type: "string" + serveraddress: + type: "string" + example: + username: "hannibal" + password: "xxxx" + serveraddress: "https://index.docker.io/v1/" + + ProcessConfig: + type: "object" + properties: + privileged: + type: "boolean" + user: + type: "string" + tty: + type: "boolean" + entrypoint: + type: "string" + arguments: + type: "array" + items: + type: "string" + + Volume: + type: "object" + required: [Name, Driver, Mountpoint, Labels, Scope, Options] + properties: + Name: + type: "string" + description: "Name of the volume." + x-nullable: false + Driver: + type: "string" + description: "Name of the volume driver used by the volume." + x-nullable: false + Mountpoint: + type: "string" + description: "Mount path of the volume on the host." + x-nullable: false + CreatedAt: + type: "string" + format: "dateTime" + description: "Date/Time the volume was created." + Status: + type: "object" + description: | + Low-level details about the volume, provided by the volume driver. + Details are returned as a map with key/value pairs: + `{"key":"value","key2":"value2"}`. + + The `Status` field is optional, and is omitted if the volume driver + does not support this feature. + additionalProperties: + type: "object" + Labels: + type: "object" + description: "User-defined key/value metadata." + x-nullable: false + additionalProperties: + type: "string" + Scope: + type: "string" + description: | + The level at which the volume exists. Either `global` for cluster-wide, + or `local` for machine level. + default: "local" + x-nullable: false + enum: ["local", "global"] + Options: + type: "object" + description: | + The driver specific options used when creating the volume. + additionalProperties: + type: "string" + UsageData: + type: "object" + x-nullable: true + required: [Size, RefCount] + description: | + Usage details about the volume. This information is used by the + `GET /system/df` endpoint, and omitted in other endpoints. + properties: + Size: + type: "integer" + default: -1 + description: | + Amount of disk space used by the volume (in bytes). This information + is only available for volumes created with the `"local"` volume + driver. For volumes created with other volume drivers, this field + is set to `-1` ("not available") + x-nullable: false + RefCount: + type: "integer" + default: -1 + description: | + The number of containers referencing this volume. This field + is set to `-1` if the reference-count is not available. + x-nullable: false + + example: + Name: "tardis" + Driver: "custom" + Mountpoint: "/var/lib/docker/volumes/tardis" + Status: + hello: "world" + Labels: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + Scope: "local" + CreatedAt: "2016-06-07T20:31:11.853781916Z" + + Network: + type: "object" + properties: + Name: + type: "string" + Id: + type: "string" + Created: + type: "string" + format: "dateTime" + Scope: + type: "string" + Driver: + type: "string" + EnableIPv6: + type: "boolean" + IPAM: + $ref: "#/definitions/IPAM" + Internal: + type: "boolean" + Attachable: + type: "boolean" + Ingress: + type: "boolean" + Containers: + type: "object" + additionalProperties: + $ref: "#/definitions/NetworkContainer" + Options: + type: "object" + additionalProperties: + type: "string" + Labels: + type: "object" + additionalProperties: + type: "string" + example: + Name: "net01" + Id: "7d86d31b1478e7cca9ebed7e73aa0fdeec46c5ca29497431d3007d2d9e15ed99" + Created: "2016-10-19T04:33:30.360899459Z" + Scope: "local" + Driver: "bridge" + EnableIPv6: false + IPAM: + Driver: "default" + Config: + - Subnet: "172.19.0.0/16" + Gateway: "172.19.0.1" + Options: + foo: "bar" + Internal: false + Attachable: false + Ingress: false + Containers: + 19a4d5d687db25203351ed79d478946f861258f018fe384f229f2efa4b23513c: + Name: "test" + EndpointID: "628cadb8bcb92de107b2a1e516cbffe463e321f548feb37697cce00ad694f21a" + MacAddress: "02:42:ac:13:00:02" + IPv4Address: "172.19.0.2/16" + IPv6Address: "" + Options: + com.docker.network.bridge.default_bridge: "true" + com.docker.network.bridge.enable_icc: "true" + com.docker.network.bridge.enable_ip_masquerade: "true" + com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" + com.docker.network.bridge.name: "docker0" + com.docker.network.driver.mtu: "1500" + Labels: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + IPAM: + type: "object" + properties: + Driver: + description: "Name of the IPAM driver to use." + type: "string" + default: "default" + Config: + description: | + List of IPAM configuration options, specified as a map: + + ``` + {"Subnet": , "IPRange": , "Gateway": , "AuxAddress": } + ``` + type: "array" + items: + type: "object" + additionalProperties: + type: "string" + Options: + description: "Driver-specific options, specified as a map." + type: "object" + additionalProperties: + type: "string" + + NetworkContainer: + type: "object" + properties: + Name: + type: "string" + EndpointID: + type: "string" + MacAddress: + type: "string" + IPv4Address: + type: "string" + IPv6Address: + type: "string" + + BuildInfo: + type: "object" + properties: + id: + type: "string" + stream: + type: "string" + error: + type: "string" + errorDetail: + $ref: "#/definitions/ErrorDetail" + status: + type: "string" + progress: + type: "string" + progressDetail: + $ref: "#/definitions/ProgressDetail" + aux: + $ref: "#/definitions/ImageID" + + BuildCache: + type: "object" + properties: + ID: + type: "string" + Parent: + type: "string" + Type: + type: "string" + Description: + type: "string" + InUse: + type: "boolean" + Shared: + type: "boolean" + Size: + description: | + Amount of disk space used by the build cache (in bytes). + type: "integer" + CreatedAt: + description: | + Date and time at which the build cache was created in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: "string" + format: "dateTime" + example: "2016-08-18T10:44:24.496525531Z" + LastUsedAt: + description: | + Date and time at which the build cache was last used in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: "string" + format: "dateTime" + x-nullable: true + example: "2017-08-09T07:09:37.632105588Z" + UsageCount: + type: "integer" + + ImageID: + type: "object" + description: "Image ID or Digest" + properties: + ID: + type: "string" + example: + ID: "sha256:85f05633ddc1c50679be2b16a0479ab6f7637f8884e0cfe0f4d20e1ebb3d6e7c" + + CreateImageInfo: + type: "object" + properties: + id: + type: "string" + error: + type: "string" + status: + type: "string" + progress: + type: "string" + progressDetail: + $ref: "#/definitions/ProgressDetail" + + PushImageInfo: + type: "object" + properties: + error: + type: "string" + status: + type: "string" + progress: + type: "string" + progressDetail: + $ref: "#/definitions/ProgressDetail" + + ErrorDetail: + type: "object" + properties: + code: + type: "integer" + message: + type: "string" + + ProgressDetail: + type: "object" + properties: + current: + type: "integer" + total: + type: "integer" + + ErrorResponse: + description: "Represents an error." + type: "object" + required: ["message"] + properties: + message: + description: "The error message." + type: "string" + x-nullable: false + example: + message: "Something went wrong." + + IdResponse: + description: "Response to an API call that returns just an Id" + type: "object" + required: ["Id"] + properties: + Id: + description: "The id of the newly created object." + type: "string" + x-nullable: false + + EndpointSettings: + description: "Configuration for a network endpoint." + type: "object" + properties: + # Configurations + IPAMConfig: + $ref: "#/definitions/EndpointIPAMConfig" + Links: + type: "array" + items: + type: "string" + example: + - "container_1" + - "container_2" + Aliases: + type: "array" + items: + type: "string" + example: + - "server_x" + - "server_y" + + # Operational data + NetworkID: + description: | + Unique ID of the network. + type: "string" + example: "08754567f1f40222263eab4102e1c733ae697e8e354aa9cd6e18d7402835292a" + EndpointID: + description: | + Unique ID for the service endpoint in a Sandbox. + type: "string" + example: "b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b" + Gateway: + description: | + Gateway address for this network. + type: "string" + example: "172.17.0.1" + IPAddress: + description: | + IPv4 address. + type: "string" + example: "172.17.0.4" + IPPrefixLen: + description: | + Mask length of the IPv4 address. + type: "integer" + example: 16 + IPv6Gateway: + description: | + IPv6 gateway address. + type: "string" + example: "2001:db8:2::100" + GlobalIPv6Address: + description: | + Global IPv6 address. + type: "string" + example: "2001:db8::5689" + GlobalIPv6PrefixLen: + description: | + Mask length of the global IPv6 address. + type: "integer" + format: "int64" + example: 64 + MacAddress: + description: | + MAC address for the endpoint on this network. + type: "string" + example: "02:42:ac:11:00:04" + DriverOpts: + description: | + DriverOpts is a mapping of driver options and values. These options + are passed directly to the driver and are driver specific. + type: "object" + x-nullable: true + additionalProperties: + type: "string" + example: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + + EndpointIPAMConfig: + description: | + EndpointIPAMConfig represents an endpoint's IPAM configuration. + type: "object" + x-nullable: true + properties: + IPv4Address: + type: "string" + example: "172.20.30.33" + IPv6Address: + type: "string" + example: "2001:db8:abcd::3033" + LinkLocalIPs: + type: "array" + items: + type: "string" + example: + - "169.254.34.68" + - "fe80::3468" + + PluginMount: + type: "object" + x-nullable: false + required: [Name, Description, Settable, Source, Destination, Type, Options] + properties: + Name: + type: "string" + x-nullable: false + example: "some-mount" + Description: + type: "string" + x-nullable: false + example: "This is a mount that's used by the plugin." + Settable: + type: "array" + items: + type: "string" + Source: + type: "string" + example: "/var/lib/docker/plugins/" + Destination: + type: "string" + x-nullable: false + example: "/mnt/state" + Type: + type: "string" + x-nullable: false + example: "bind" + Options: + type: "array" + items: + type: "string" + example: + - "rbind" + - "rw" + + PluginDevice: + type: "object" + required: [Name, Description, Settable, Path] + x-nullable: false + properties: + Name: + type: "string" + x-nullable: false + Description: + type: "string" + x-nullable: false + Settable: + type: "array" + items: + type: "string" + Path: + type: "string" + example: "/dev/fuse" + + PluginEnv: + type: "object" + x-nullable: false + required: [Name, Description, Settable, Value] + properties: + Name: + x-nullable: false + type: "string" + Description: + x-nullable: false + type: "string" + Settable: + type: "array" + items: + type: "string" + Value: + type: "string" + + PluginInterfaceType: + type: "object" + x-nullable: false + required: [Prefix, Capability, Version] + properties: + Prefix: + type: "string" + x-nullable: false + Capability: + type: "string" + x-nullable: false + Version: + type: "string" + x-nullable: false + + Plugin: + description: "A plugin for the Engine API" + type: "object" + required: [Settings, Enabled, Config, Name] + properties: + Id: + type: "string" + example: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078" + Name: + type: "string" + x-nullable: false + example: "tiborvass/sample-volume-plugin" + Enabled: + description: + True if the plugin is running. False if the plugin is not running, + only installed. + type: "boolean" + x-nullable: false + example: true + Settings: + description: "Settings that can be modified by users." + type: "object" + x-nullable: false + required: [Args, Devices, Env, Mounts] + properties: + Mounts: + type: "array" + items: + $ref: "#/definitions/PluginMount" + Env: + type: "array" + items: + type: "string" + example: + - "DEBUG=0" + Args: + type: "array" + items: + type: "string" + Devices: + type: "array" + items: + $ref: "#/definitions/PluginDevice" + PluginReference: + description: "plugin remote reference used to push/pull the plugin" + type: "string" + x-nullable: false + example: "localhost:5000/tiborvass/sample-volume-plugin:latest" + Config: + description: "The config of a plugin." + type: "object" + x-nullable: false + required: + - Description + - Documentation + - Interface + - Entrypoint + - WorkDir + - Network + - Linux + - PidHost + - PropagatedMount + - IpcHost + - Mounts + - Env + - Args + properties: + DockerVersion: + description: "Docker Version used to create the plugin" + type: "string" + x-nullable: false + example: "17.06.0-ce" + Description: + type: "string" + x-nullable: false + example: "A sample volume plugin for Docker" + Documentation: + type: "string" + x-nullable: false + example: "https://docs.docker.com/engine/extend/plugins/" + Interface: + description: "The interface between Docker and the plugin" + x-nullable: false + type: "object" + required: [Types, Socket] + properties: + Types: + type: "array" + items: + $ref: "#/definitions/PluginInterfaceType" + example: + - "docker.volumedriver/1.0" + Socket: + type: "string" + x-nullable: false + example: "plugins.sock" + ProtocolScheme: + type: "string" + example: "some.protocol/v1.0" + description: "Protocol to use for clients connecting to the plugin." + enum: + - "" + - "moby.plugins.http/v1" + Entrypoint: + type: "array" + items: + type: "string" + example: + - "/usr/bin/sample-volume-plugin" + - "/data" + WorkDir: + type: "string" + x-nullable: false + example: "/bin/" + User: + type: "object" + x-nullable: false + properties: + UID: + type: "integer" + format: "uint32" + example: 1000 + GID: + type: "integer" + format: "uint32" + example: 1000 + Network: + type: "object" + x-nullable: false + required: [Type] + properties: + Type: + x-nullable: false + type: "string" + example: "host" + Linux: + type: "object" + x-nullable: false + required: [Capabilities, AllowAllDevices, Devices] + properties: + Capabilities: + type: "array" + items: + type: "string" + example: + - "CAP_SYS_ADMIN" + - "CAP_SYSLOG" + AllowAllDevices: + type: "boolean" + x-nullable: false + example: false + Devices: + type: "array" + items: + $ref: "#/definitions/PluginDevice" + PropagatedMount: + type: "string" + x-nullable: false + example: "/mnt/volumes" + IpcHost: + type: "boolean" + x-nullable: false + example: false + PidHost: + type: "boolean" + x-nullable: false + example: false + Mounts: + type: "array" + items: + $ref: "#/definitions/PluginMount" + Env: + type: "array" + items: + $ref: "#/definitions/PluginEnv" + example: + - Name: "DEBUG" + Description: "If set, prints debug messages" + Settable: null + Value: "0" + Args: + type: "object" + x-nullable: false + required: [Name, Description, Settable, Value] + properties: + Name: + x-nullable: false + type: "string" + example: "args" + Description: + x-nullable: false + type: "string" + example: "command line arguments" + Settable: + type: "array" + items: + type: "string" + Value: + type: "array" + items: + type: "string" + rootfs: + type: "object" + properties: + type: + type: "string" + example: "layers" + diff_ids: + type: "array" + items: + type: "string" + example: + - "sha256:675532206fbf3030b8458f88d6e26d4eb1577688a25efec97154c94e8b6b4887" + - "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8" + + ObjectVersion: + description: | + The version number of the object such as node, service, etc. This is needed + to avoid conflicting writes. The client must send the version number along + with the modified specification when updating these objects. + + This approach ensures safe concurrency and determinism in that the change + on the object may not be applied if the version number has changed from the + last read. In other words, if two update requests specify the same base + version, only one of the requests can succeed. As a result, two separate + update requests that happen at the same time will not unintentionally + overwrite each other. + type: "object" + properties: + Index: + type: "integer" + format: "uint64" + example: 373531 + + NodeSpec: + type: "object" + properties: + Name: + description: "Name for the node." + type: "string" + example: "my-node" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + Role: + description: "Role of the node." + type: "string" + enum: + - "worker" + - "manager" + example: "manager" + Availability: + description: "Availability of the node." + type: "string" + enum: + - "active" + - "pause" + - "drain" + example: "active" + example: + Availability: "active" + Name: "node-name" + Role: "manager" + Labels: + foo: "bar" + + Node: + type: "object" + properties: + ID: + type: "string" + example: "24ifsmvkjbyhk" + Version: + $ref: "#/definitions/ObjectVersion" + CreatedAt: + description: | + Date and time at which the node was added to the swarm in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: "string" + format: "dateTime" + example: "2016-08-18T10:44:24.496525531Z" + UpdatedAt: + description: | + Date and time at which the node was last updated in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: "string" + format: "dateTime" + example: "2017-08-09T07:09:37.632105588Z" + Spec: + $ref: "#/definitions/NodeSpec" + Description: + $ref: "#/definitions/NodeDescription" + Status: + $ref: "#/definitions/NodeStatus" + ManagerStatus: + $ref: "#/definitions/ManagerStatus" + + NodeDescription: + description: | + NodeDescription encapsulates the properties of the Node as reported by the + agent. + type: "object" + properties: + Hostname: + type: "string" + example: "bf3067039e47" + Platform: + $ref: "#/definitions/Platform" + Resources: + $ref: "#/definitions/ResourceObject" + Engine: + $ref: "#/definitions/EngineDescription" + TLSInfo: + $ref: "#/definitions/TLSInfo" + + Platform: + description: | + Platform represents the platform (Arch/OS). + type: "object" + properties: + Architecture: + description: | + Architecture represents the hardware architecture (for example, + `x86_64`). + type: "string" + example: "x86_64" + OS: + description: | + OS represents the Operating System (for example, `linux` or `windows`). + type: "string" + example: "linux" + + EngineDescription: + description: "EngineDescription provides information about an engine." + type: "object" + properties: + EngineVersion: + type: "string" + example: "17.06.0" + Labels: + type: "object" + additionalProperties: + type: "string" + example: + foo: "bar" + Plugins: + type: "array" + items: + type: "object" + properties: + Type: + type: "string" + Name: + type: "string" + example: + - Type: "Log" + Name: "awslogs" + - Type: "Log" + Name: "fluentd" + - Type: "Log" + Name: "gcplogs" + - Type: "Log" + Name: "gelf" + - Type: "Log" + Name: "journald" + - Type: "Log" + Name: "json-file" + - Type: "Log" + Name: "logentries" + - Type: "Log" + Name: "splunk" + - Type: "Log" + Name: "syslog" + - Type: "Network" + Name: "bridge" + - Type: "Network" + Name: "host" + - Type: "Network" + Name: "ipvlan" + - Type: "Network" + Name: "macvlan" + - Type: "Network" + Name: "null" + - Type: "Network" + Name: "overlay" + - Type: "Volume" + Name: "local" + - Type: "Volume" + Name: "localhost:5000/vieux/sshfs:latest" + - Type: "Volume" + Name: "vieux/sshfs:latest" + + TLSInfo: + description: | + Information about the issuer of leaf TLS certificates and the trusted root + CA certificate. + type: "object" + properties: + TrustRoot: + description: | + The root CA certificate(s) that are used to validate leaf TLS + certificates. + type: "string" + CertIssuerSubject: + description: + The base64-url-safe-encoded raw subject bytes of the issuer. + type: "string" + CertIssuerPublicKey: + description: | + The base64-url-safe-encoded raw public key bytes of the issuer. + type: "string" + example: + TrustRoot: | + -----BEGIN CERTIFICATE----- + MIIBajCCARCgAwIBAgIUbYqrLSOSQHoxD8CwG6Bi2PJi9c8wCgYIKoZIzj0EAwIw + EzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNDI0MjE0MzAwWhcNMzcwNDE5MjE0 + MzAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH + A0IABJk/VyMPYdaqDXJb/VXh5n/1Yuv7iNrxV3Qb3l06XD46seovcDWs3IZNV1lf + 3Skyr0ofcchipoiHkXBODojJydSjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB + Af8EBTADAQH/MB0GA1UdDgQWBBRUXxuRcnFjDfR/RIAUQab8ZV/n4jAKBggqhkjO + PQQDAgNIADBFAiAy+JTe6Uc3KyLCMiqGl2GyWGQqQDEcO3/YG36x7om65AIhAJvz + pxv6zFeVEkAEEkqIYi0omA9+CjanB/6Bz4n1uw8H + -----END CERTIFICATE----- + CertIssuerSubject: "MBMxETAPBgNVBAMTCHN3YXJtLWNh" + CertIssuerPublicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmT9XIw9h1qoNclv9VeHmf/Vi6/uI2vFXdBveXTpcPjqx6i9wNazchk1XWV/dKTKvSh9xyGKmiIeRcE4OiMnJ1A==" + + NodeStatus: + description: | + NodeStatus represents the status of a node. + + It provides the current status of the node, as seen by the manager. + type: "object" + properties: + State: + $ref: "#/definitions/NodeState" + Message: + type: "string" + example: "" + Addr: + description: "IP address of the node." + type: "string" + example: "172.17.0.2" + + NodeState: + description: "NodeState represents the state of a node." + type: "string" + enum: + - "unknown" + - "down" + - "ready" + - "disconnected" + example: "ready" + + ManagerStatus: + description: | + ManagerStatus represents the status of a manager. + + It provides the current status of a node's manager component, if the node + is a manager. + x-nullable: true + type: "object" + properties: + Leader: + type: "boolean" + default: false + example: true + Reachability: + $ref: "#/definitions/Reachability" + Addr: + description: | + The IP address and port at which the manager is reachable. + type: "string" + example: "10.0.0.46:2377" + + Reachability: + description: "Reachability represents the reachability of a node." + type: "string" + enum: + - "unknown" + - "unreachable" + - "reachable" + example: "reachable" + + SwarmSpec: + description: "User modifiable swarm configuration." + type: "object" + properties: + Name: + description: "Name of the swarm." + type: "string" + example: "default" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + example: + com.example.corp.type: "production" + com.example.corp.department: "engineering" + Orchestration: + description: "Orchestration configuration." + type: "object" + x-nullable: true + properties: + TaskHistoryRetentionLimit: + description: | + The number of historic tasks to keep per instance or node. If + negative, never remove completed or failed tasks. + type: "integer" + format: "int64" + example: 10 + Raft: + description: "Raft configuration." + type: "object" + properties: + SnapshotInterval: + description: "The number of log entries between snapshots." + type: "integer" + format: "uint64" + example: 10000 + KeepOldSnapshots: + description: | + The number of snapshots to keep beyond the current snapshot. + type: "integer" + format: "uint64" + LogEntriesForSlowFollowers: + description: | + The number of log entries to keep around to sync up slow followers + after a snapshot is created. + type: "integer" + format: "uint64" + example: 500 + ElectionTick: + description: | + The number of ticks that a follower will wait for a message from + the leader before becoming a candidate and starting an election. + `ElectionTick` must be greater than `HeartbeatTick`. + + A tick currently defaults to one second, so these translate + directly to seconds currently, but this is NOT guaranteed. + type: "integer" + example: 3 + HeartbeatTick: + description: | + The number of ticks between heartbeats. Every HeartbeatTick ticks, + the leader will send a heartbeat to the followers. + + A tick currently defaults to one second, so these translate + directly to seconds currently, but this is NOT guaranteed. + type: "integer" + example: 1 + Dispatcher: + description: "Dispatcher configuration." + type: "object" + x-nullable: true + properties: + HeartbeatPeriod: + description: | + The delay for an agent to send a heartbeat to the dispatcher. + type: "integer" + format: "int64" + example: 5000000000 + CAConfig: + description: "CA configuration." + type: "object" + x-nullable: true + properties: + NodeCertExpiry: + description: "The duration node certificates are issued for." + type: "integer" + format: "int64" + example: 7776000000000000 + ExternalCAs: + description: | + Configuration for forwarding signing requests to an external + certificate authority. + type: "array" + items: + type: "object" + properties: + Protocol: + description: | + Protocol for communication with the external CA (currently + only `cfssl` is supported). + type: "string" + enum: + - "cfssl" + default: "cfssl" + URL: + description: | + URL where certificate signing requests should be sent. + type: "string" + Options: + description: | + An object with key/value pairs that are interpreted as + protocol-specific options for the external CA driver. + type: "object" + additionalProperties: + type: "string" + CACert: + description: | + The root CA certificate (in PEM format) this external CA uses + to issue TLS certificates (assumed to be to the current swarm + root CA certificate if not provided). + type: "string" + SigningCACert: + description: | + The desired signing CA certificate for all swarm node TLS leaf + certificates, in PEM format. + type: "string" + SigningCAKey: + description: | + The desired signing CA key for all swarm node TLS leaf certificates, + in PEM format. + type: "string" + ForceRotate: + description: | + An integer whose purpose is to force swarm to generate a new + signing CA certificate and key, if none have been specified in + `SigningCACert` and `SigningCAKey` + format: "uint64" + type: "integer" + EncryptionConfig: + description: "Parameters related to encryption-at-rest." + type: "object" + properties: + AutoLockManagers: + description: | + If set, generate a key and use it to lock data stored on the + managers. + type: "boolean" + example: false + TaskDefaults: + description: "Defaults for creating tasks in this cluster." + type: "object" + properties: + LogDriver: + description: | + The log driver to use for tasks created in the orchestrator if + unspecified by a service. + + Updating this value only affects new tasks. Existing tasks continue + to use their previously configured log driver until recreated. + type: "object" + properties: + Name: + description: | + The log driver to use as a default for new tasks. + type: "string" + example: "json-file" + Options: + description: | + Driver-specific options for the selectd log driver, specified + as key/value pairs. + type: "object" + additionalProperties: + type: "string" + example: + "max-file": "10" + "max-size": "100m" + + # The Swarm information for `GET /info`. It is the same as `GET /swarm`, but + # without `JoinTokens`. + ClusterInfo: + description: | + ClusterInfo represents information about the swarm as is returned by the + "/info" endpoint. Join-tokens are not included. + x-nullable: true + type: "object" + properties: + ID: + description: "The ID of the swarm." + type: "string" + example: "abajmipo7b4xz5ip2nrla6b11" + Version: + $ref: "#/definitions/ObjectVersion" + CreatedAt: + description: | + Date and time at which the swarm was initialised in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: "string" + format: "dateTime" + example: "2016-08-18T10:44:24.496525531Z" + UpdatedAt: + description: | + Date and time at which the swarm was last updated in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: "string" + format: "dateTime" + example: "2017-08-09T07:09:37.632105588Z" + Spec: + $ref: "#/definitions/SwarmSpec" + TLSInfo: + $ref: "#/definitions/TLSInfo" + RootRotationInProgress: + description: | + Whether there is currently a root CA rotation in progress for the swarm + type: "boolean" + example: false + DataPathPort: + description: | + DataPathPort specifies the data path port number for data traffic. + Acceptable port range is 1024 to 49151. + If no port is set or is set to 0, the default port (4789) is used. + type: "integer" + format: "uint32" + default: 4789 + example: 4789 + DefaultAddrPool: + description: | + Default Address Pool specifies default subnet pools for global scope + networks. + type: "array" + items: + type: "string" + format: "CIDR" + example: ["10.10.0.0/16", "20.20.0.0/16"] + SubnetSize: + description: | + SubnetSize specifies the subnet size of the networks created from the + default subnet pool. + type: "integer" + format: "uint32" + maximum: 29 + default: 24 + example: 24 + + JoinTokens: + description: | + JoinTokens contains the tokens workers and managers need to join the swarm. + type: "object" + properties: + Worker: + description: | + The token workers can use to join the swarm. + type: "string" + example: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx" + Manager: + description: | + The token managers can use to join the swarm. + type: "string" + example: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2" + + Swarm: + type: "object" + allOf: + - $ref: "#/definitions/ClusterInfo" + - type: "object" + properties: + JoinTokens: + $ref: "#/definitions/JoinTokens" + + TaskSpec: + description: "User modifiable task configuration." + type: "object" + properties: + PluginSpec: + type: "object" + description: | + Plugin spec for the service. *(Experimental release only.)* + +


+ + > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are + > mutually exclusive. PluginSpec is only used when the Runtime field + > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime + > field is set to `attachment`. + properties: + Name: + description: "The name or 'alias' to use for the plugin." + type: "string" + Remote: + description: "The plugin image reference to use." + type: "string" + Disabled: + description: "Disable the plugin once scheduled." + type: "boolean" + PluginPrivilege: + type: "array" + items: + description: | + Describes a permission accepted by the user upon installing the + plugin. + type: "object" + properties: + Name: + type: "string" + Description: + type: "string" + Value: + type: "array" + items: + type: "string" + ContainerSpec: + type: "object" + description: | + Container spec for the service. + +


+ + > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are + > mutually exclusive. PluginSpec is only used when the Runtime field + > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime + > field is set to `attachment`. + properties: + Image: + description: "The image name to use for the container" + type: "string" + Labels: + description: "User-defined key/value data." + type: "object" + additionalProperties: + type: "string" + Command: + description: "The command to be run in the image." + type: "array" + items: + type: "string" + Args: + description: "Arguments to the command." + type: "array" + items: + type: "string" + Hostname: + description: | + The hostname to use for the container, as a valid + [RFC 1123](https://tools.ietf.org/html/rfc1123) hostname. + type: "string" + Env: + description: | + A list of environment variables in the form `VAR=value`. + type: "array" + items: + type: "string" + Dir: + description: "The working directory for commands to run in." + type: "string" + User: + description: "The user inside the container." + type: "string" + Groups: + type: "array" + description: | + A list of additional groups that the container process will run as. + items: + type: "string" + Privileges: + type: "object" + description: "Security options for the container" + properties: + CredentialSpec: + type: "object" + description: "CredentialSpec for managed service account (Windows only)" + properties: + Config: + type: "string" + example: "0bt9dmxjvjiqermk6xrop3ekq" + description: | + Load credential spec from a Swarm Config with the given ID. + The specified config must also be present in the Configs + field with the Runtime property set. + +


+ + + > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + > and `CredentialSpec.Config` are mutually exclusive. + File: + type: "string" + example: "spec.json" + description: | + Load credential spec from this file. The file is read by + the daemon, and must be present in the `CredentialSpecs` + subdirectory in the docker data directory, which defaults + to `C:\ProgramData\Docker\` on Windows. + + For example, specifying `spec.json` loads + `C:\ProgramData\Docker\CredentialSpecs\spec.json`. + +


+ + > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + > and `CredentialSpec.Config` are mutually exclusive. + Registry: + type: "string" + description: | + Load credential spec from this value in the Windows + registry. The specified registry value must be located in: + + `HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers\CredentialSpecs` + +


+ + + > **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, + > and `CredentialSpec.Config` are mutually exclusive. + SELinuxContext: + type: "object" + description: "SELinux labels of the container" + properties: + Disable: + type: "boolean" + description: "Disable SELinux" + User: + type: "string" + description: "SELinux user label" + Role: + type: "string" + description: "SELinux role label" + Type: + type: "string" + description: "SELinux type label" + Level: + type: "string" + description: "SELinux level label" + TTY: + description: "Whether a pseudo-TTY should be allocated." + type: "boolean" + OpenStdin: + description: "Open `stdin`" + type: "boolean" + ReadOnly: + description: "Mount the container's root filesystem as read only." + type: "boolean" + Mounts: + description: | + Specification for mounts to be added to containers created as part + of the service. + type: "array" + items: + $ref: "#/definitions/Mount" + StopSignal: + description: "Signal to stop the container." + type: "string" + StopGracePeriod: + description: | + Amount of time to wait for the container to terminate before + forcefully killing it. + type: "integer" + format: "int64" + HealthCheck: + $ref: "#/definitions/HealthConfig" + Hosts: + type: "array" + description: | + A list of hostname/IP mappings to add to the container's `hosts` + file. The format of extra hosts is specified in the + [hosts(5)](http://man7.org/linux/man-pages/man5/hosts.5.html) + man page: + + IP_address canonical_hostname [aliases...] + items: + type: "string" + DNSConfig: + description: | + Specification for DNS related configurations in resolver configuration + file (`resolv.conf`). + type: "object" + properties: + Nameservers: + description: "The IP addresses of the name servers." + type: "array" + items: + type: "string" + Search: + description: "A search list for host-name lookup." + type: "array" + items: + type: "string" + Options: + description: | + A list of internal resolver variables to be modified (e.g., + `debug`, `ndots:3`, etc.). + type: "array" + items: + type: "string" + Secrets: + description: | + Secrets contains references to zero or more secrets that will be + exposed to the service. + type: "array" + items: + type: "object" + properties: + File: + description: | + File represents a specific target that is backed by a file. + type: "object" + properties: + Name: + description: | + Name represents the final filename in the filesystem. + type: "string" + UID: + description: "UID represents the file UID." + type: "string" + GID: + description: "GID represents the file GID." + type: "string" + Mode: + description: "Mode represents the FileMode of the file." + type: "integer" + format: "uint32" + SecretID: + description: | + SecretID represents the ID of the specific secret that we're + referencing. + type: "string" + SecretName: + description: | + SecretName is the name of the secret that this references, + but this is just provided for lookup/display purposes. The + secret in the reference will be identified by its ID. + type: "string" + Configs: + description: | + Configs contains references to zero or more configs that will be + exposed to the service. + type: "array" + items: + type: "object" + properties: + File: + description: | + File represents a specific target that is backed by a file. + +


+ + > **Note**: `Configs.File` and `Configs.Runtime` are mutually exclusive + type: "object" + properties: + Name: + description: | + Name represents the final filename in the filesystem. + type: "string" + UID: + description: "UID represents the file UID." + type: "string" + GID: + description: "GID represents the file GID." + type: "string" + Mode: + description: "Mode represents the FileMode of the file." + type: "integer" + format: "uint32" + Runtime: + description: | + Runtime represents a target that is not mounted into the + container but is used by the task + +


+ + > **Note**: `Configs.File` and `Configs.Runtime` are mutually + > exclusive + type: "object" + ConfigID: + description: | + ConfigID represents the ID of the specific config that we're + referencing. + type: "string" + ConfigName: + description: | + ConfigName is the name of the config that this references, + but this is just provided for lookup/display purposes. The + config in the reference will be identified by its ID. + type: "string" + Isolation: + type: "string" + description: | + Isolation technology of the containers running the service. + (Windows only) + enum: + - "default" + - "process" + - "hyperv" + Init: + description: | + Run an init inside the container that forwards signals and reaps + processes. This field is omitted if empty, and the default (as + configured on the daemon) is used. + type: "boolean" + x-nullable: true + Sysctls: + description: | + Set kernel namedspaced parameters (sysctls) in the container. + The Sysctls option on services accepts the same sysctls as the + are supported on containers. Note that while the same sysctls are + supported, no guarantees or checks are made about their + suitability for a clustered environment, and it's up to the user + to determine whether a given sysctl will work properly in a + Service. + type: "object" + additionalProperties: + type: "string" + # This option is not used by Windows containers + CapabilityAdd: + type: "array" + description: | + A list of kernel capabilities to add to the default set + for the container. + items: + type: "string" + example: + - "CAP_NET_RAW" + - "CAP_SYS_ADMIN" + - "CAP_SYS_CHROOT" + - "CAP_SYSLOG" + CapabilityDrop: + type: "array" + description: | + A list of kernel capabilities to drop from the default set + for the container. + items: + type: "string" + example: + - "CAP_NET_RAW" + Ulimits: + description: | + A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" + type: "array" + items: + type: "object" + properties: + Name: + description: "Name of ulimit" + type: "string" + Soft: + description: "Soft limit" + type: "integer" + Hard: + description: "Hard limit" + type: "integer" + NetworkAttachmentSpec: + description: | + Read-only spec type for non-swarm containers attached to swarm overlay + networks. + +


+ + > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are + > mutually exclusive. PluginSpec is only used when the Runtime field + > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime + > field is set to `attachment`. + type: "object" + properties: + ContainerID: + description: "ID of the container represented by this task" + type: "string" + Resources: + description: | + Resource requirements which apply to each individual container created + as part of the service. + type: "object" + properties: + Limits: + description: "Define resources limits." + $ref: "#/definitions/Limit" + Reservation: + description: "Define resources reservation." + $ref: "#/definitions/ResourceObject" + RestartPolicy: + description: | + Specification for the restart policy which applies to containers + created as part of this service. + type: "object" + properties: + Condition: + description: "Condition for restart." + type: "string" + enum: + - "none" + - "on-failure" + - "any" + Delay: + description: "Delay between restart attempts." + type: "integer" + format: "int64" + MaxAttempts: + description: | + Maximum attempts to restart a given container before giving up + (default value is 0, which is ignored). + type: "integer" + format: "int64" + default: 0 + Window: + description: | + Windows is the time window used to evaluate the restart policy + (default value is 0, which is unbounded). + type: "integer" + format: "int64" + default: 0 + Placement: + type: "object" + properties: + Constraints: + description: | + An array of constraint expressions to limit the set of nodes where + a task can be scheduled. Constraint expressions can either use a + _match_ (`==`) or _exclude_ (`!=`) rule. Multiple constraints find + nodes that satisfy every expression (AND match). Constraints can + match node or Docker Engine labels as follows: + + node attribute | matches | example + ---------------------|--------------------------------|----------------------------------------------- + `node.id` | Node ID | `node.id==2ivku8v2gvtg4` + `node.hostname` | Node hostname | `node.hostname!=node-2` + `node.role` | Node role (`manager`/`worker`) | `node.role==manager` + `node.platform.os` | Node operating system | `node.platform.os==windows` + `node.platform.arch` | Node architecture | `node.platform.arch==x86_64` + `node.labels` | User-defined node labels | `node.labels.security==high` + `engine.labels` | Docker Engine's labels | `engine.labels.operatingsystem==ubuntu-14.04` + + `engine.labels` apply to Docker Engine labels like operating system, + drivers, etc. Swarm administrators add `node.labels` for operational + purposes by using the [`node update endpoint`](#operation/NodeUpdate). + + type: "array" + items: + type: "string" + example: + - "node.hostname!=node3.corp.example.com" + - "node.role!=manager" + - "node.labels.type==production" + - "node.platform.os==linux" + - "node.platform.arch==x86_64" + Preferences: + description: | + Preferences provide a way to make the scheduler aware of factors + such as topology. They are provided in order from highest to + lowest precedence. + type: "array" + items: + type: "object" + properties: + Spread: + type: "object" + properties: + SpreadDescriptor: + description: | + label descriptor, such as `engine.labels.az`. + type: "string" + example: + - Spread: + SpreadDescriptor: "node.labels.datacenter" + - Spread: + SpreadDescriptor: "node.labels.rack" + MaxReplicas: + description: | + Maximum number of replicas for per node (default value is 0, which + is unlimited) + type: "integer" + format: "int64" + default: 0 + Platforms: + description: | + Platforms stores all the platforms that the service's image can + run on. This field is used in the platform filter for scheduling. + If empty, then the platform filter is off, meaning there are no + scheduling restrictions. + type: "array" + items: + $ref: "#/definitions/Platform" + ForceUpdate: + description: | + A counter that triggers an update even if no relevant parameters have + been changed. + type: "integer" + Runtime: + description: | + Runtime is the type of runtime specified for the task executor. + type: "string" + Networks: + description: "Specifies which networks the service should attach to." + type: "array" + items: + $ref: "#/definitions/NetworkAttachmentConfig" + LogDriver: + description: | + Specifies the log driver to use for tasks created from this spec. If + not present, the default one for the swarm will be used, finally + falling back to the engine default if not specified. + type: "object" + properties: + Name: + type: "string" + Options: + type: "object" + additionalProperties: + type: "string" + + TaskState: + type: "string" + enum: + - "new" + - "allocated" + - "pending" + - "assigned" + - "accepted" + - "preparing" + - "ready" + - "starting" + - "running" + - "complete" + - "shutdown" + - "failed" + - "rejected" + - "remove" + - "orphaned" + + Task: + type: "object" + properties: + ID: + description: "The ID of the task." + type: "string" + Version: + $ref: "#/definitions/ObjectVersion" + CreatedAt: + type: "string" + format: "dateTime" + UpdatedAt: + type: "string" + format: "dateTime" + Name: + description: "Name of the task." + type: "string" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + Spec: + $ref: "#/definitions/TaskSpec" + ServiceID: + description: "The ID of the service this task is part of." + type: "string" + Slot: + type: "integer" + NodeID: + description: "The ID of the node that this task is on." + type: "string" + AssignedGenericResources: + $ref: "#/definitions/GenericResources" + Status: + type: "object" + properties: + Timestamp: + type: "string" + format: "dateTime" + State: + $ref: "#/definitions/TaskState" + Message: + type: "string" + Err: + type: "string" + ContainerStatus: + type: "object" + properties: + ContainerID: + type: "string" + PID: + type: "integer" + ExitCode: + type: "integer" + DesiredState: + $ref: "#/definitions/TaskState" + JobIteration: + description: | + If the Service this Task belongs to is a job-mode service, contains + the JobIteration of the Service this Task was created for. Absent if + the Task was created for a Replicated or Global Service. + $ref: "#/definitions/ObjectVersion" + example: + ID: "0kzzo1i0y4jz6027t0k7aezc7" + Version: + Index: 71 + CreatedAt: "2016-06-07T21:07:31.171892745Z" + UpdatedAt: "2016-06-07T21:07:31.376370513Z" + Spec: + ContainerSpec: + Image: "redis" + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: "any" + MaxAttempts: 0 + Placement: {} + ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" + Slot: 1 + NodeID: "60gvrl6tm78dmak4yl7srz94v" + Status: + Timestamp: "2016-06-07T21:07:31.290032978Z" + State: "running" + Message: "started" + ContainerStatus: + ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035" + PID: 677 + DesiredState: "running" + NetworksAttachments: + - Network: + ID: "4qvuz4ko70xaltuqbt8956gd1" + Version: + Index: 18 + CreatedAt: "2016-06-07T20:31:11.912919752Z" + UpdatedAt: "2016-06-07T21:07:29.955277358Z" + Spec: + Name: "ingress" + Labels: + com.docker.swarm.internal: "true" + DriverConfiguration: {} + IPAMOptions: + Driver: {} + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + DriverState: + Name: "overlay" + Options: + com.docker.network.driver.overlay.vxlanid_list: "256" + IPAMOptions: + Driver: + Name: "default" + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + Addresses: + - "10.255.0.10/16" + AssignedGenericResources: + - DiscreteResourceSpec: + Kind: "SSD" + Value: 3 + - NamedResourceSpec: + Kind: "GPU" + Value: "UUID1" + - NamedResourceSpec: + Kind: "GPU" + Value: "UUID2" + + ServiceSpec: + description: "User modifiable configuration for a service." + properties: + Name: + description: "Name of the service." + type: "string" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + TaskTemplate: + $ref: "#/definitions/TaskSpec" + Mode: + description: "Scheduling mode for the service." + type: "object" + properties: + Replicated: + type: "object" + properties: + Replicas: + type: "integer" + format: "int64" + Global: + type: "object" + ReplicatedJob: + description: | + The mode used for services with a finite number of tasks that run + to a completed state. + type: "object" + properties: + MaxConcurrent: + description: | + The maximum number of replicas to run simultaneously. + type: "integer" + format: "int64" + default: 1 + TotalCompletions: + description: | + The total number of replicas desired to reach the Completed + state. If unset, will default to the value of `MaxConcurrent` + type: "integer" + format: "int64" + GlobalJob: + description: | + The mode used for services which run a task to the completed state + on each valid node. + type: "object" + UpdateConfig: + description: "Specification for the update strategy of the service." + type: "object" + properties: + Parallelism: + description: | + Maximum number of tasks to be updated in one iteration (0 means + unlimited parallelism). + type: "integer" + format: "int64" + Delay: + description: "Amount of time between updates, in nanoseconds." + type: "integer" + format: "int64" + FailureAction: + description: | + Action to take if an updated task fails to run, or stops running + during the update. + type: "string" + enum: + - "continue" + - "pause" + - "rollback" + Monitor: + description: | + Amount of time to monitor each updated task for failures, in + nanoseconds. + type: "integer" + format: "int64" + MaxFailureRatio: + description: | + The fraction of tasks that may fail during an update before the + failure action is invoked, specified as a floating point number + between 0 and 1. + type: "number" + default: 0 + Order: + description: | + The order of operations when rolling out an updated task. Either + the old task is shut down before the new task is started, or the + new task is started before the old task is shut down. + type: "string" + enum: + - "stop-first" + - "start-first" + RollbackConfig: + description: "Specification for the rollback strategy of the service." + type: "object" + properties: + Parallelism: + description: | + Maximum number of tasks to be rolled back in one iteration (0 means + unlimited parallelism). + type: "integer" + format: "int64" + Delay: + description: | + Amount of time between rollback iterations, in nanoseconds. + type: "integer" + format: "int64" + FailureAction: + description: | + Action to take if an rolled back task fails to run, or stops + running during the rollback. + type: "string" + enum: + - "continue" + - "pause" + Monitor: + description: | + Amount of time to monitor each rolled back task for failures, in + nanoseconds. + type: "integer" + format: "int64" + MaxFailureRatio: + description: | + The fraction of tasks that may fail during a rollback before the + failure action is invoked, specified as a floating point number + between 0 and 1. + type: "number" + default: 0 + Order: + description: | + The order of operations when rolling back a task. Either the old + task is shut down before the new task is started, or the new task + is started before the old task is shut down. + type: "string" + enum: + - "stop-first" + - "start-first" + Networks: + description: "Specifies which networks the service should attach to." + type: "array" + items: + $ref: "#/definitions/NetworkAttachmentConfig" + + EndpointSpec: + $ref: "#/definitions/EndpointSpec" + + EndpointPortConfig: + type: "object" + properties: + Name: + type: "string" + Protocol: + type: "string" + enum: + - "tcp" + - "udp" + - "sctp" + TargetPort: + description: "The port inside the container." + type: "integer" + PublishedPort: + description: "The port on the swarm hosts." + type: "integer" + PublishMode: + description: | + The mode in which port is published. + +


+ + - "ingress" makes the target port accessible on every node, + regardless of whether there is a task for the service running on + that node or not. + - "host" bypasses the routing mesh and publish the port directly on + the swarm node where that service is running. + + type: "string" + enum: + - "ingress" + - "host" + default: "ingress" + example: "ingress" + + EndpointSpec: + description: "Properties that can be configured to access and load balance a service." + type: "object" + properties: + Mode: + description: | + The mode of resolution to use for internal load balancing between tasks. + type: "string" + enum: + - "vip" + - "dnsrr" + default: "vip" + Ports: + description: | + List of exposed ports that this service is accessible on from the + outside. Ports can only be provided if `vip` resolution mode is used. + type: "array" + items: + $ref: "#/definitions/EndpointPortConfig" + + Service: + type: "object" + properties: + ID: + type: "string" + Version: + $ref: "#/definitions/ObjectVersion" + CreatedAt: + type: "string" + format: "dateTime" + UpdatedAt: + type: "string" + format: "dateTime" + Spec: + $ref: "#/definitions/ServiceSpec" + Endpoint: + type: "object" + properties: + Spec: + $ref: "#/definitions/EndpointSpec" + Ports: + type: "array" + items: + $ref: "#/definitions/EndpointPortConfig" + VirtualIPs: + type: "array" + items: + type: "object" + properties: + NetworkID: + type: "string" + Addr: + type: "string" + UpdateStatus: + description: "The status of a service update." + type: "object" + properties: + State: + type: "string" + enum: + - "updating" + - "paused" + - "completed" + StartedAt: + type: "string" + format: "dateTime" + CompletedAt: + type: "string" + format: "dateTime" + Message: + type: "string" + ServiceStatus: + description: | + The status of the service's tasks. Provided only when requested as + part of a ServiceList operation. + type: "object" + properties: + RunningTasks: + description: | + The number of tasks for the service currently in the Running state. + type: "integer" + format: "uint64" + example: 7 + DesiredTasks: + description: | + The number of tasks for the service desired to be running. + For replicated services, this is the replica count from the + service spec. For global services, this is computed by taking + count of all tasks for the service with a Desired State other + than Shutdown. + type: "integer" + format: "uint64" + example: 10 + CompletedTasks: + description: | + The number of tasks for a job that are in the Completed state. + This field must be cross-referenced with the service type, as the + value of 0 may mean the service is not in a job mode, or it may + mean the job-mode service has no tasks yet Completed. + type: "integer" + format: "uint64" + JobStatus: + description: | + The status of the service when it is in one of ReplicatedJob or + GlobalJob modes. Absent on Replicated and Global mode services. The + JobIteration is an ObjectVersion, but unlike the Service's version, + does not need to be sent with an update request. + type: "object" + properties: + JobIteration: + description: | + JobIteration is a value increased each time a Job is executed, + successfully or otherwise. "Executed", in this case, means the + job as a whole has been started, not that an individual Task has + been launched. A job is "Executed" when its ServiceSpec is + updated. JobIteration can be used to disambiguate Tasks belonging + to different executions of a job. Though JobIteration will + increase with each subsequent execution, it may not necessarily + increase by 1, and so JobIteration should not be used to + $ref: "#/definitions/ObjectVersion" + LastExecution: + description: | + The last time, as observed by the server, that this job was + started. + type: "string" + format: "dateTime" + example: + ID: "9mnpnzenvg8p8tdbtq4wvbkcz" + Version: + Index: 19 + CreatedAt: "2016-06-07T21:05:51.880065305Z" + UpdatedAt: "2016-06-07T21:07:29.962229872Z" + Spec: + Name: "hopeful_cori" + TaskTemplate: + ContainerSpec: + Image: "redis" + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: "any" + MaxAttempts: 0 + Placement: {} + ForceUpdate: 0 + Mode: + Replicated: + Replicas: 1 + UpdateConfig: + Parallelism: 1 + Delay: 1000000000 + FailureAction: "pause" + Monitor: 15000000000 + MaxFailureRatio: 0.15 + RollbackConfig: + Parallelism: 1 + Delay: 1000000000 + FailureAction: "pause" + Monitor: 15000000000 + MaxFailureRatio: 0.15 + EndpointSpec: + Mode: "vip" + Ports: + - + Protocol: "tcp" + TargetPort: 6379 + PublishedPort: 30001 + Endpoint: + Spec: + Mode: "vip" + Ports: + - + Protocol: "tcp" + TargetPort: 6379 + PublishedPort: 30001 + Ports: + - + Protocol: "tcp" + TargetPort: 6379 + PublishedPort: 30001 + VirtualIPs: + - + NetworkID: "4qvuz4ko70xaltuqbt8956gd1" + Addr: "10.255.0.2/16" + - + NetworkID: "4qvuz4ko70xaltuqbt8956gd1" + Addr: "10.255.0.3/16" + + ImageDeleteResponseItem: + type: "object" + properties: + Untagged: + description: "The image ID of an image that was untagged" + type: "string" + Deleted: + description: "The image ID of an image that was deleted" + type: "string" + + ServiceUpdateResponse: + type: "object" + properties: + Warnings: + description: "Optional warning messages" + type: "array" + items: + type: "string" + example: + Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found" + + ContainerSummary: + type: "array" + items: + type: "object" + properties: + Id: + description: "The ID of this container" + type: "string" + x-go-name: "ID" + Names: + description: "The names that this container has been given" + type: "array" + items: + type: "string" + Image: + description: "The name of the image used when creating this container" + type: "string" + ImageID: + description: "The ID of the image that this container was created from" + type: "string" + Command: + description: "Command to run when starting the container" + type: "string" + Created: + description: "When the container was created" + type: "integer" + format: "int64" + Ports: + description: "The ports exposed by this container" + type: "array" + items: + $ref: "#/definitions/Port" + SizeRw: + description: "The size of files that have been created or changed by this container" + type: "integer" + format: "int64" + SizeRootFs: + description: "The total size of all the files in this container" + type: "integer" + format: "int64" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + State: + description: "The state of this container (e.g. `Exited`)" + type: "string" + Status: + description: "Additional human-readable status of this container (e.g. `Exit 0`)" + type: "string" + HostConfig: + type: "object" + properties: + NetworkMode: + type: "string" + NetworkSettings: + description: "A summary of the container's network settings" + type: "object" + properties: + Networks: + type: "object" + additionalProperties: + $ref: "#/definitions/EndpointSettings" + Mounts: + type: "array" + items: + $ref: "#/definitions/Mount" + + Driver: + description: "Driver represents a driver (network, logging, secrets)." + type: "object" + required: [Name] + properties: + Name: + description: "Name of the driver." + type: "string" + x-nullable: false + example: "some-driver" + Options: + description: "Key/value map of driver-specific options." + type: "object" + x-nullable: false + additionalProperties: + type: "string" + example: + OptionA: "value for driver-specific option A" + OptionB: "value for driver-specific option B" + + SecretSpec: + type: "object" + properties: + Name: + description: "User-defined name of the secret." + type: "string" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + example: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + Data: + description: | + Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) + data to store as secret. + + This field is only used to _create_ a secret, and is not returned by + other endpoints. + type: "string" + example: "" + Driver: + description: | + Name of the secrets driver used to fetch the secret's value from an + external secret store. + $ref: "#/definitions/Driver" + Templating: + description: | + Templating driver, if applicable + + Templating controls whether and how to evaluate the config payload as + a template. If no driver is set, no templating is used. + $ref: "#/definitions/Driver" + + Secret: + type: "object" + properties: + ID: + type: "string" + example: "blt1owaxmitz71s9v5zh81zun" + Version: + $ref: "#/definitions/ObjectVersion" + CreatedAt: + type: "string" + format: "dateTime" + example: "2017-07-20T13:55:28.678958722Z" + UpdatedAt: + type: "string" + format: "dateTime" + example: "2017-07-20T13:55:28.678958722Z" + Spec: + $ref: "#/definitions/SecretSpec" + + ConfigSpec: + type: "object" + properties: + Name: + description: "User-defined name of the config." + type: "string" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + Data: + description: | + Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) + config data. + type: "string" + Templating: + description: | + Templating driver, if applicable + + Templating controls whether and how to evaluate the config payload as + a template. If no driver is set, no templating is used. + $ref: "#/definitions/Driver" + + Config: + type: "object" + properties: + ID: + type: "string" + Version: + $ref: "#/definitions/ObjectVersion" + CreatedAt: + type: "string" + format: "dateTime" + UpdatedAt: + type: "string" + format: "dateTime" + Spec: + $ref: "#/definitions/ConfigSpec" + + ContainerState: + description: | + ContainerState stores container's running state. It's part of ContainerJSONBase + and will be returned by the "inspect" command. + type: "object" + properties: + Status: + description: | + String representation of the container state. Can be one of "created", + "running", "paused", "restarting", "removing", "exited", or "dead". + type: "string" + enum: ["created", "running", "paused", "restarting", "removing", "exited", "dead"] + example: "running" + Running: + description: | + Whether this container is running. + + Note that a running container can be _paused_. The `Running` and `Paused` + booleans are not mutually exclusive: + + When pausing a container (on Linux), the freezer cgroup is used to suspend + all processes in the container. Freezing the process requires the process to + be running. As a result, paused containers are both `Running` _and_ `Paused`. + + Use the `Status` field instead to determine if a container's state is "running". + type: "boolean" + example: true + Paused: + description: "Whether this container is paused." + type: "boolean" + example: false + Restarting: + description: "Whether this container is restarting." + type: "boolean" + example: false + OOMKilled: + description: | + Whether this container has been killed because it ran out of memory. + type: "boolean" + example: false + Dead: + type: "boolean" + example: false + Pid: + description: "The process ID of this container" + type: "integer" + example: 1234 + ExitCode: + description: "The last exit code of this container" + type: "integer" + example: 0 + Error: + type: "string" + StartedAt: + description: "The time when this container was last started." + type: "string" + example: "2020-01-06T09:06:59.461876391Z" + FinishedAt: + description: "The time when this container last exited." + type: "string" + example: "2020-01-06T09:07:59.461876391Z" + Health: + x-nullable: true + $ref: "#/definitions/Health" + + SystemVersion: + type: "object" + description: | + Response of Engine API: GET "/version" + properties: + Platform: + type: "object" + required: [Name] + properties: + Name: + type: "string" + Components: + type: "array" + description: | + Information about system components + items: + type: "object" + x-go-name: ComponentVersion + required: [Name, Version] + properties: + Name: + description: | + Name of the component + type: "string" + example: "Engine" + Version: + description: | + Version of the component + type: "string" + x-nullable: false + example: "19.03.12" + Details: + description: | + Key/value pairs of strings with additional information about the + component. These values are intended for informational purposes + only, and their content is not defined, and not part of the API + specification. + + These messages can be printed by the client as information to the user. + type: "object" + x-nullable: true + Version: + description: "The version of the daemon" + type: "string" + example: "19.03.12" + ApiVersion: + description: | + The default (and highest) API version that is supported by the daemon + type: "string" + example: "1.40" + MinAPIVersion: + description: | + The minimum API version that is supported by the daemon + type: "string" + example: "1.12" + GitCommit: + description: | + The Git commit of the source code that was used to build the daemon + type: "string" + example: "48a66213fe" + GoVersion: + description: | + The version Go used to compile the daemon, and the version of the Go + runtime in use. + type: "string" + example: "go1.13.14" + Os: + description: | + The operating system that the daemon is running on ("linux" or "windows") + type: "string" + example: "linux" + Arch: + description: | + The architecture that the daemon is running on + type: "string" + example: "amd64" + KernelVersion: + description: | + The kernel version (`uname -r`) that the daemon is running on. + + This field is omitted when empty. + type: "string" + example: "4.19.76-linuxkit" + Experimental: + description: | + Indicates if the daemon is started with experimental features enabled. + + This field is omitted when empty / false. + type: "boolean" + example: true + BuildTime: + description: | + The date and time that the daemon was compiled. + type: "string" + example: "2020-06-22T15:49:27.000000000+00:00" + + + SystemInfo: + type: "object" + properties: + ID: + description: | + Unique identifier of the daemon. + +


+ + > **Note**: The format of the ID itself is not part of the API, and + > should not be considered stable. + type: "string" + example: "7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS" + Containers: + description: "Total number of containers on the host." + type: "integer" + example: 14 + ContainersRunning: + description: | + Number of containers with status `"running"`. + type: "integer" + example: 3 + ContainersPaused: + description: | + Number of containers with status `"paused"`. + type: "integer" + example: 1 + ContainersStopped: + description: | + Number of containers with status `"stopped"`. + type: "integer" + example: 10 + Images: + description: | + Total number of images on the host. + + Both _tagged_ and _untagged_ (dangling) images are counted. + type: "integer" + example: 508 + Driver: + description: "Name of the storage driver in use." + type: "string" + example: "overlay2" + DriverStatus: + description: | + Information specific to the storage driver, provided as + "label" / "value" pairs. + + This information is provided by the storage driver, and formatted + in a way consistent with the output of `docker info` on the command + line. + +


+ + > **Note**: The information returned in this field, including the + > formatting of values and labels, should not be considered stable, + > and may change without notice. + type: "array" + items: + type: "array" + items: + type: "string" + example: + - ["Backing Filesystem", "extfs"] + - ["Supports d_type", "true"] + - ["Native Overlay Diff", "true"] + DockerRootDir: + description: | + Root directory of persistent Docker state. + + Defaults to `/var/lib/docker` on Linux, and `C:\ProgramData\docker` + on Windows. + type: "string" + example: "/var/lib/docker" + Plugins: + $ref: "#/definitions/PluginsInfo" + MemoryLimit: + description: "Indicates if the host has memory limit support enabled." + type: "boolean" + example: true + SwapLimit: + description: "Indicates if the host has memory swap limit support enabled." + type: "boolean" + example: true + KernelMemory: + description: | + Indicates if the host has kernel memory limit support enabled. + +


+ + > **Deprecated**: This field is deprecated as the kernel 5.4 deprecated + > `kmem.limit_in_bytes`. + type: "boolean" + example: true + CpuCfsPeriod: + description: | + Indicates if CPU CFS(Completely Fair Scheduler) period is supported by + the host. + type: "boolean" + example: true + CpuCfsQuota: + description: | + Indicates if CPU CFS(Completely Fair Scheduler) quota is supported by + the host. + type: "boolean" + example: true + CPUShares: + description: | + Indicates if CPU Shares limiting is supported by the host. + type: "boolean" + example: true + CPUSet: + description: | + Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the host. + + See [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt) + type: "boolean" + example: true + PidsLimit: + description: "Indicates if the host kernel has PID limit support enabled." + type: "boolean" + example: true + OomKillDisable: + description: "Indicates if OOM killer disable is supported on the host." + type: "boolean" + IPv4Forwarding: + description: "Indicates IPv4 forwarding is enabled." + type: "boolean" + example: true + BridgeNfIptables: + description: "Indicates if `bridge-nf-call-iptables` is available on the host." + type: "boolean" + example: true + BridgeNfIp6tables: + description: "Indicates if `bridge-nf-call-ip6tables` is available on the host." + type: "boolean" + example: true + Debug: + description: | + Indicates if the daemon is running in debug-mode / with debug-level + logging enabled. + type: "boolean" + example: true + NFd: + description: | + The total number of file Descriptors in use by the daemon process. + + This information is only returned if debug-mode is enabled. + type: "integer" + example: 64 + NGoroutines: + description: | + The number of goroutines that currently exist. + + This information is only returned if debug-mode is enabled. + type: "integer" + example: 174 + SystemTime: + description: | + Current system-time in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) + format with nano-seconds. + type: "string" + example: "2017-08-08T20:28:29.06202363Z" + LoggingDriver: + description: | + The logging driver to use as a default for new containers. + type: "string" + CgroupDriver: + description: | + The driver to use for managing cgroups. + type: "string" + enum: ["cgroupfs", "systemd", "none"] + default: "cgroupfs" + example: "cgroupfs" + CgroupVersion: + description: | + The version of the cgroup. + type: "string" + enum: ["1", "2"] + default: "1" + example: "1" + NEventsListener: + description: "Number of event listeners subscribed." + type: "integer" + example: 30 + KernelVersion: + description: | + Kernel version of the host. + + On Linux, this information obtained from `uname`. On Windows this + information is queried from the HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ + registry value, for example _"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)"_. + type: "string" + example: "4.9.38-moby" + OperatingSystem: + description: | + Name of the host's operating system, for example: "Ubuntu 16.04.2 LTS" + or "Windows Server 2016 Datacenter" + type: "string" + example: "Alpine Linux v3.5" + OSVersion: + description: | + Version of the host's operating system + +


+ + > **Note**: The information returned in this field, including its + > very existence, and the formatting of values, should not be considered + > stable, and may change without notice. + type: "string" + example: "16.04" + OSType: + description: | + Generic type of the operating system of the host, as returned by the + Go runtime (`GOOS`). + + Currently returned values are "linux" and "windows". A full list of + possible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment). + type: "string" + example: "linux" + Architecture: + description: | + Hardware architecture of the host, as returned by the Go runtime + (`GOARCH`). + + A full list of possible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment). + type: "string" + example: "x86_64" + NCPU: + description: | + The number of logical CPUs usable by the daemon. + + The number of available CPUs is checked by querying the operating + system when the daemon starts. Changes to operating system CPU + allocation after the daemon is started are not reflected. + type: "integer" + example: 4 + MemTotal: + description: | + Total amount of physical memory available on the host, in bytes. + type: "integer" + format: "int64" + example: 2095882240 + + IndexServerAddress: + description: | + Address / URL of the index server that is used for image search, + and as a default for user authentication for Docker Hub and Docker Cloud. + default: "https://index.docker.io/v1/" + type: "string" + example: "https://index.docker.io/v1/" + RegistryConfig: + $ref: "#/definitions/RegistryServiceConfig" + GenericResources: + $ref: "#/definitions/GenericResources" + HttpProxy: + description: | + HTTP-proxy configured for the daemon. This value is obtained from the + [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. + Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL + are masked in the API response. + + Containers do not automatically inherit this configuration. + type: "string" + example: "http://xxxxx:xxxxx@proxy.corp.example.com:8080" + HttpsProxy: + description: | + HTTPS-proxy configured for the daemon. This value is obtained from the + [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. + Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL + are masked in the API response. + + Containers do not automatically inherit this configuration. + type: "string" + example: "https://xxxxx:xxxxx@proxy.corp.example.com:4443" + NoProxy: + description: | + Comma-separated list of domain extensions for which no proxy should be + used. This value is obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) + environment variable. + + Containers do not automatically inherit this configuration. + type: "string" + example: "*.local, 169.254/16" + Name: + description: "Hostname of the host." + type: "string" + example: "node5.corp.example.com" + Labels: + description: | + User-defined labels (key/value metadata) as set on the daemon. + +


+ + > **Note**: When part of a Swarm, nodes can both have _daemon_ labels, + > set through the daemon configuration, and _node_ labels, set from a + > manager node in the Swarm. Node labels are not included in this + > field. Node labels can be retrieved using the `/nodes/(id)` endpoint + > on a manager node in the Swarm. + type: "array" + items: + type: "string" + example: ["storage=ssd", "production"] + ExperimentalBuild: + description: | + Indicates if experimental features are enabled on the daemon. + type: "boolean" + example: true + ServerVersion: + description: | + Version string of the daemon. + + > **Note**: the [standalone Swarm API](https://docs.docker.com/swarm/swarm-api/) + > returns the Swarm version instead of the daemon version, for example + > `swarm/1.2.8`. + type: "string" + example: "17.06.0-ce" + ClusterStore: + description: | + URL of the distributed storage backend. + + + The storage backend is used for multihost networking (to store + network and endpoint information) and by the node discovery mechanism. + +


+ + > **Deprecated**: This field is only propagated when using standalone Swarm + > mode, and overlay networking using an external k/v store. Overlay + > networks with Swarm mode enabled use the built-in raft store, and + > this field will be empty. + type: "string" + example: "consul://consul.corp.example.com:8600/some/path" + ClusterAdvertise: + description: | + The network endpoint that the Engine advertises for the purpose of + node discovery. ClusterAdvertise is a `host:port` combination on which + the daemon is reachable by other hosts. + +


+ + > **Deprecated**: This field is only propagated when using standalone Swarm + > mode, and overlay networking using an external k/v store. Overlay + > networks with Swarm mode enabled use the built-in raft store, and + > this field will be empty. + type: "string" + example: "node5.corp.example.com:8000" + Runtimes: + description: | + List of [OCI compliant](https://github.com/opencontainers/runtime-spec) + runtimes configured on the daemon. Keys hold the "name" used to + reference the runtime. + + The Docker daemon relies on an OCI compliant runtime (invoked via the + `containerd` daemon) as its interface to the Linux kernel namespaces, + cgroups, and SELinux. + + The default runtime is `runc`, and automatically configured. Additional + runtimes can be configured by the user and will be listed here. + type: "object" + additionalProperties: + $ref: "#/definitions/Runtime" + default: + runc: + path: "runc" + example: + runc: + path: "runc" + runc-master: + path: "/go/bin/runc" + custom: + path: "/usr/local/bin/my-oci-runtime" + runtimeArgs: ["--debug", "--systemd-cgroup=false"] + DefaultRuntime: + description: | + Name of the default OCI runtime that is used when starting containers. + + The default can be overridden per-container at create time. + type: "string" + default: "runc" + example: "runc" + Swarm: + $ref: "#/definitions/SwarmInfo" + LiveRestoreEnabled: + description: | + Indicates if live restore is enabled. + + If enabled, containers are kept running when the daemon is shutdown + or upon daemon start if running containers are detected. + type: "boolean" + default: false + example: false + Isolation: + description: | + Represents the isolation technology to use as a default for containers. + The supported values are platform-specific. + + If no isolation value is specified on daemon start, on Windows client, + the default is `hyperv`, and on Windows server, the default is `process`. + + This option is currently not used on other platforms. + default: "default" + type: "string" + enum: + - "default" + - "hyperv" + - "process" + InitBinary: + description: | + Name and, optional, path of the `docker-init` binary. + + If the path is omitted, the daemon searches the host's `$PATH` for the + binary and uses the first result. + type: "string" + example: "docker-init" + ContainerdCommit: + $ref: "#/definitions/Commit" + RuncCommit: + $ref: "#/definitions/Commit" + InitCommit: + $ref: "#/definitions/Commit" + SecurityOptions: + description: | + List of security features that are enabled on the daemon, such as + apparmor, seccomp, SELinux, user-namespaces (userns), and rootless. + + Additional configuration options for each security feature may + be present, and are included as a comma-separated list of key/value + pairs. + type: "array" + items: + type: "string" + example: + - "name=apparmor" + - "name=seccomp,profile=default" + - "name=selinux" + - "name=userns" + - "name=rootless" + ProductLicense: + description: | + Reports a summary of the product license on the daemon. + + If a commercial license has been applied to the daemon, information + such as number of nodes, and expiration are included. + type: "string" + example: "Community Engine" + DefaultAddressPools: + description: | + List of custom default address pools for local networks, which can be + specified in the daemon.json file or dockerd option. + + Example: a Base "10.10.0.0/16" with Size 24 will define the set of 256 + 10.10.[0-255].0/24 address pools. + type: "array" + items: + type: "object" + properties: + Base: + description: "The network address in CIDR format" + type: "string" + example: "10.10.0.0/16" + Size: + description: "The network pool size" + type: "integer" + example: "24" + Warnings: + description: | + List of warnings / informational messages about missing features, or + issues related to the daemon configuration. + + These messages can be printed by the client as information to the user. + type: "array" + items: + type: "string" + example: + - "WARNING: No memory limit support" + - "WARNING: bridge-nf-call-iptables is disabled" + - "WARNING: bridge-nf-call-ip6tables is disabled" + + + # PluginsInfo is a temp struct holding Plugins name + # registered with docker daemon. It is used by Info struct + PluginsInfo: + description: | + Available plugins per type. + +


+ + > **Note**: Only unmanaged (V1) plugins are included in this list. + > V1 plugins are "lazily" loaded, and are not returned in this list + > if there is no resource using the plugin. + type: "object" + properties: + Volume: + description: "Names of available volume-drivers, and network-driver plugins." + type: "array" + items: + type: "string" + example: ["local"] + Network: + description: "Names of available network-drivers, and network-driver plugins." + type: "array" + items: + type: "string" + example: ["bridge", "host", "ipvlan", "macvlan", "null", "overlay"] + Authorization: + description: "Names of available authorization plugins." + type: "array" + items: + type: "string" + example: ["img-authz-plugin", "hbm"] + Log: + description: "Names of available logging-drivers, and logging-driver plugins." + type: "array" + items: + type: "string" + example: ["awslogs", "fluentd", "gcplogs", "gelf", "journald", "json-file", "logentries", "splunk", "syslog"] + + + RegistryServiceConfig: + description: | + RegistryServiceConfig stores daemon registry services configuration. + type: "object" + x-nullable: true + properties: + AllowNondistributableArtifactsCIDRs: + description: | + List of IP ranges to which nondistributable artifacts can be pushed, + using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632). + + Some images (for example, Windows base images) contain artifacts + whose distribution is restricted by license. When these images are + pushed to a registry, restricted artifacts are not included. + + This configuration override this behavior, and enables the daemon to + push nondistributable artifacts to all registries whose resolved IP + address is within the subnet described by the CIDR syntax. + + This option is useful when pushing images containing + nondistributable artifacts to a registry on an air-gapped network so + hosts on that network can pull the images without connecting to + another server. + + > **Warning**: Nondistributable artifacts typically have restrictions + > on how and where they can be distributed and shared. Only use this + > feature to push artifacts to private registries and ensure that you + > are in compliance with any terms that cover redistributing + > nondistributable artifacts. + + type: "array" + items: + type: "string" + example: ["::1/128", "127.0.0.0/8"] + AllowNondistributableArtifactsHostnames: + description: | + List of registry hostnames to which nondistributable artifacts can be + pushed, using the format `[:]` or `[:]`. + + Some images (for example, Windows base images) contain artifacts + whose distribution is restricted by license. When these images are + pushed to a registry, restricted artifacts are not included. + + This configuration override this behavior for the specified + registries. + + This option is useful when pushing images containing + nondistributable artifacts to a registry on an air-gapped network so + hosts on that network can pull the images without connecting to + another server. + + > **Warning**: Nondistributable artifacts typically have restrictions + > on how and where they can be distributed and shared. Only use this + > feature to push artifacts to private registries and ensure that you + > are in compliance with any terms that cover redistributing + > nondistributable artifacts. + type: "array" + items: + type: "string" + example: ["registry.internal.corp.example.com:3000", "[2001:db8:a0b:12f0::1]:443"] + InsecureRegistryCIDRs: + description: | + List of IP ranges of insecure registries, using the CIDR syntax + ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries + accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates + from unknown CAs) communication. + + By default, local registries (`127.0.0.0/8`) are configured as + insecure. All other registries are secure. Communicating with an + insecure registry is not possible if the daemon assumes that registry + is secure. + + This configuration override this behavior, insecure communication with + registries whose resolved IP address is within the subnet described by + the CIDR syntax. + + Registries can also be marked insecure by hostname. Those registries + are listed under `IndexConfigs` and have their `Secure` field set to + `false`. + + > **Warning**: Using this option can be useful when running a local + > registry, but introduces security vulnerabilities. This option + > should therefore ONLY be used for testing purposes. For increased + > security, users should add their CA to their system's list of trusted + > CAs instead of enabling this option. + type: "array" + items: + type: "string" + example: ["::1/128", "127.0.0.0/8"] + IndexConfigs: + type: "object" + additionalProperties: + $ref: "#/definitions/IndexInfo" + example: + "127.0.0.1:5000": + "Name": "127.0.0.1:5000" + "Mirrors": [] + "Secure": false + "Official": false + "[2001:db8:a0b:12f0::1]:80": + "Name": "[2001:db8:a0b:12f0::1]:80" + "Mirrors": [] + "Secure": false + "Official": false + "docker.io": + Name: "docker.io" + Mirrors: ["https://hub-mirror.corp.example.com:5000/"] + Secure: true + Official: true + "registry.internal.corp.example.com:3000": + Name: "registry.internal.corp.example.com:3000" + Mirrors: [] + Secure: false + Official: false + Mirrors: + description: | + List of registry URLs that act as a mirror for the official + (`docker.io`) registry. + + type: "array" + items: + type: "string" + example: + - "https://hub-mirror.corp.example.com:5000/" + - "https://[2001:db8:a0b:12f0::1]/" + + IndexInfo: + description: + IndexInfo contains information about a registry. + type: "object" + x-nullable: true + properties: + Name: + description: | + Name of the registry, such as "docker.io". + type: "string" + example: "docker.io" + Mirrors: + description: | + List of mirrors, expressed as URIs. + type: "array" + items: + type: "string" + example: + - "https://hub-mirror.corp.example.com:5000/" + - "https://registry-2.docker.io/" + - "https://registry-3.docker.io/" + Secure: + description: | + Indicates if the registry is part of the list of insecure + registries. + + If `false`, the registry is insecure. Insecure registries accept + un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from + unknown CAs) communication. + + > **Warning**: Insecure registries can be useful when running a local + > registry. However, because its use creates security vulnerabilities + > it should ONLY be enabled for testing purposes. For increased + > security, users should add their CA to their system's list of + > trusted CAs instead of enabling this option. + type: "boolean" + example: true + Official: + description: | + Indicates whether this is an official registry (i.e., Docker Hub / docker.io) + type: "boolean" + example: true + + Runtime: + description: | + Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec) + runtime. + + The runtime is invoked by the daemon via the `containerd` daemon. OCI + runtimes act as an interface to the Linux kernel namespaces, cgroups, + and SELinux. + type: "object" + properties: + path: + description: | + Name and, optional, path, of the OCI executable binary. + + If the path is omitted, the daemon searches the host's `$PATH` for the + binary and uses the first result. + type: "string" + example: "/usr/local/bin/my-oci-runtime" + runtimeArgs: + description: | + List of command-line arguments to pass to the runtime when invoked. + type: "array" + x-nullable: true + items: + type: "string" + example: ["--debug", "--systemd-cgroup=false"] + + Commit: + description: | + Commit holds the Git-commit (SHA1) that a binary was built from, as + reported in the version-string of external tools, such as `containerd`, + or `runC`. + type: "object" + properties: + ID: + description: "Actual commit ID of external tool." + type: "string" + example: "cfb82a876ecc11b5ca0977d1733adbe58599088a" + Expected: + description: | + Commit ID of external tool expected by dockerd as set at build time. + type: "string" + example: "2d41c047c83e09a6d61d464906feb2a2f3c52aa4" + + SwarmInfo: + description: | + Represents generic information about swarm. + type: "object" + properties: + NodeID: + description: "Unique identifier of for this node in the swarm." + type: "string" + default: "" + example: "k67qz4598weg5unwwffg6z1m1" + NodeAddr: + description: | + IP address at which this node can be reached by other nodes in the + swarm. + type: "string" + default: "" + example: "10.0.0.46" + LocalNodeState: + $ref: "#/definitions/LocalNodeState" + ControlAvailable: + type: "boolean" + default: false + example: true + Error: + type: "string" + default: "" + RemoteManagers: + description: | + List of ID's and addresses of other managers in the swarm. + type: "array" + default: null + x-nullable: true + items: + $ref: "#/definitions/PeerNode" + example: + - NodeID: "71izy0goik036k48jg985xnds" + Addr: "10.0.0.158:2377" + - NodeID: "79y6h1o4gv8n120drcprv5nmc" + Addr: "10.0.0.159:2377" + - NodeID: "k67qz4598weg5unwwffg6z1m1" + Addr: "10.0.0.46:2377" + Nodes: + description: "Total number of nodes in the swarm." + type: "integer" + x-nullable: true + example: 4 + Managers: + description: "Total number of managers in the swarm." + type: "integer" + x-nullable: true + example: 3 + Cluster: + $ref: "#/definitions/ClusterInfo" + + LocalNodeState: + description: "Current local status of this node." + type: "string" + default: "" + enum: + - "" + - "inactive" + - "pending" + - "active" + - "error" + - "locked" + example: "active" + + PeerNode: + description: "Represents a peer-node in the swarm" + properties: + NodeID: + description: "Unique identifier of for this node in the swarm." + type: "string" + Addr: + description: | + IP address and ports at which this node can be reached. + type: "string" + + NetworkAttachmentConfig: + description: | + Specifies how a service should be attached to a particular network. + type: "object" + properties: + Target: + description: | + The target network for attachment. Must be a network name or ID. + type: "string" + Aliases: + description: | + Discoverable alternate names for the service on this network. + type: "array" + items: + type: "string" + DriverOpts: + description: | + Driver attachment options for the network target. + type: "object" + additionalProperties: + type: "string" + +paths: + /containers/json: + get: + summary: "List containers" + description: | + Returns a list of containers. For details on the format, see the + [inspect endpoint](#operation/ContainerInspect). + + Note that it uses a different, smaller representation of a container + than inspecting a single container. For example, the list of linked + containers is not propagated . + operationId: "ContainerList" + produces: + - "application/json" + parameters: + - name: "all" + in: "query" + description: | + Return all containers. By default, only running containers are shown. + type: "boolean" + default: false + - name: "limit" + in: "query" + description: | + Return this number of most recently created containers, including + non-running ones. + type: "integer" + - name: "size" + in: "query" + description: | + Return the size of container as fields `SizeRw` and `SizeRootFs`. + type: "boolean" + default: false + - name: "filters" + in: "query" + description: | + Filters to process on the container list, encoded as JSON (a + `map[string][]string`). For example, `{"status": ["paused"]}` will + only return paused containers. + + Available filters: + + - `ancestor`=(`[:]`, ``, or ``) + - `before`=(`` or ``) + - `expose`=(`[/]`|`/[]`) + - `exited=` containers with exit code of `` + - `health`=(`starting`|`healthy`|`unhealthy`|`none`) + - `id=` a container's ID + - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only) + - `is-task=`(`true`|`false`) + - `label=key` or `label="key=value"` of a container label + - `name=` a container's name + - `network`=(`` or ``) + - `publish`=(`[/]`|`/[]`) + - `since`=(`` or ``) + - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`) + - `volume`=(`` or ``) + type: "string" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/ContainerSummary" + examples: + application/json: + - Id: "8dfafdbc3a40" + Names: + - "/boring_feynman" + Image: "ubuntu:latest" + ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" + Command: "echo 1" + Created: 1367854155 + State: "Exited" + Status: "Exit 0" + Ports: + - PrivatePort: 2222 + PublicPort: 3333 + Type: "tcp" + Labels: + com.example.vendor: "Acme" + com.example.license: "GPL" + com.example.version: "1.0" + SizeRw: 12288 + SizeRootFs: 0 + HostConfig: + NetworkMode: "default" + NetworkSettings: + Networks: + bridge: + NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" + EndpointID: "2cdc4edb1ded3631c81f57966563e5c8525b81121bb3706a9a9a3ae102711f3f" + Gateway: "172.17.0.1" + IPAddress: "172.17.0.2" + IPPrefixLen: 16 + IPv6Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + MacAddress: "02:42:ac:11:00:02" + Mounts: + - Name: "fac362...80535" + Source: "/data" + Destination: "/data" + Driver: "local" + Mode: "ro,Z" + RW: false + Propagation: "" + - Id: "9cd87474be90" + Names: + - "/coolName" + Image: "ubuntu:latest" + ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" + Command: "echo 222222" + Created: 1367854155 + State: "Exited" + Status: "Exit 0" + Ports: [] + Labels: {} + SizeRw: 12288 + SizeRootFs: 0 + HostConfig: + NetworkMode: "default" + NetworkSettings: + Networks: + bridge: + NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" + EndpointID: "88eaed7b37b38c2a3f0c4bc796494fdf51b270c2d22656412a2ca5d559a64d7a" + Gateway: "172.17.0.1" + IPAddress: "172.17.0.8" + IPPrefixLen: 16 + IPv6Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + MacAddress: "02:42:ac:11:00:08" + Mounts: [] + - Id: "3176a2479c92" + Names: + - "/sleepy_dog" + Image: "ubuntu:latest" + ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" + Command: "echo 3333333333333333" + Created: 1367854154 + State: "Exited" + Status: "Exit 0" + Ports: [] + Labels: {} + SizeRw: 12288 + SizeRootFs: 0 + HostConfig: + NetworkMode: "default" + NetworkSettings: + Networks: + bridge: + NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" + EndpointID: "8b27c041c30326d59cd6e6f510d4f8d1d570a228466f956edf7815508f78e30d" + Gateway: "172.17.0.1" + IPAddress: "172.17.0.6" + IPPrefixLen: 16 + IPv6Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + MacAddress: "02:42:ac:11:00:06" + Mounts: [] + - Id: "4cb07b47f9fb" + Names: + - "/running_cat" + Image: "ubuntu:latest" + ImageID: "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82" + Command: "echo 444444444444444444444444444444444" + Created: 1367854152 + State: "Exited" + Status: "Exit 0" + Ports: [] + Labels: {} + SizeRw: 12288 + SizeRootFs: 0 + HostConfig: + NetworkMode: "default" + NetworkSettings: + Networks: + bridge: + NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" + EndpointID: "d91c7b2f0644403d7ef3095985ea0e2370325cd2332ff3a3225c4247328e66e9" + Gateway: "172.17.0.1" + IPAddress: "172.17.0.5" + IPPrefixLen: 16 + IPv6Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + MacAddress: "02:42:ac:11:00:05" + Mounts: [] + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Container"] + /containers/create: + post: + summary: "Create a container" + operationId: "ContainerCreate" + consumes: + - "application/json" + - "application/octet-stream" + produces: + - "application/json" + parameters: + - name: "name" + in: "query" + description: | + Assign the specified name to the container. Must match + `/?[a-zA-Z0-9][a-zA-Z0-9_.-]+`. + type: "string" + pattern: "^/?[a-zA-Z0-9][a-zA-Z0-9_.-]+$" + - name: "body" + in: "body" + description: "Container to create" + schema: + allOf: + - $ref: "#/definitions/ContainerConfig" + - type: "object" + properties: + HostConfig: + $ref: "#/definitions/HostConfig" + NetworkingConfig: + $ref: "#/definitions/NetworkingConfig" + example: + Hostname: "" + Domainname: "" + User: "" + AttachStdin: false + AttachStdout: true + AttachStderr: true + Tty: false + OpenStdin: false + StdinOnce: false + Env: + - "FOO=bar" + - "BAZ=quux" + Cmd: + - "date" + Entrypoint: "" + Image: "ubuntu" + Labels: + com.example.vendor: "Acme" + com.example.license: "GPL" + com.example.version: "1.0" + Volumes: + /volumes/data: {} + WorkingDir: "" + NetworkDisabled: false + MacAddress: "12:34:56:78:9a:bc" + ExposedPorts: + 22/tcp: {} + StopSignal: "SIGTERM" + StopTimeout: 10 + HostConfig: + Binds: + - "/tmp:/tmp" + Links: + - "redis3:redis" + Memory: 0 + MemorySwap: 0 + MemoryReservation: 0 + KernelMemory: 0 + NanoCpus: 500000 + CpuPercent: 80 + CpuShares: 512 + CpuPeriod: 100000 + CpuRealtimePeriod: 1000000 + CpuRealtimeRuntime: 10000 + CpuQuota: 50000 + CpusetCpus: "0,1" + CpusetMems: "0,1" + MaximumIOps: 0 + MaximumIOBps: 0 + BlkioWeight: 300 + BlkioWeightDevice: + - {} + BlkioDeviceReadBps: + - {} + BlkioDeviceReadIOps: + - {} + BlkioDeviceWriteBps: + - {} + BlkioDeviceWriteIOps: + - {} + DeviceRequests: + - Driver: "nvidia" + Count: -1 + DeviceIDs": ["0", "1", "GPU-fef8089b-4820-abfc-e83e-94318197576e"] + Capabilities: [["gpu", "nvidia", "compute"]] + Options: + property1: "string" + property2: "string" + MemorySwappiness: 60 + OomKillDisable: false + OomScoreAdj: 500 + PidMode: "" + PidsLimit: 0 + PortBindings: + 22/tcp: + - HostPort: "11022" + PublishAllPorts: false + Privileged: false + ReadonlyRootfs: false + Dns: + - "8.8.8.8" + DnsOptions: + - "" + DnsSearch: + - "" + VolumesFrom: + - "parent" + - "other:ro" + CapAdd: + - "NET_ADMIN" + CapDrop: + - "MKNOD" + GroupAdd: + - "newgroup" + RestartPolicy: + Name: "" + MaximumRetryCount: 0 + AutoRemove: true + NetworkMode: "bridge" + Devices: [] + Ulimits: + - {} + LogConfig: + Type: "json-file" + Config: {} + SecurityOpt: [] + StorageOpt: {} + CgroupParent: "" + VolumeDriver: "" + ShmSize: 67108864 + NetworkingConfig: + EndpointsConfig: + isolated_nw: + IPAMConfig: + IPv4Address: "172.20.30.33" + IPv6Address: "2001:db8:abcd::3033" + LinkLocalIPs: + - "169.254.34.68" + - "fe80::3468" + Links: + - "container_1" + - "container_2" + Aliases: + - "server_x" + - "server_y" + + required: true + responses: + 201: + description: "Container created successfully" + schema: + type: "object" + title: "ContainerCreateResponse" + description: "OK response to ContainerCreate operation" + required: [Id, Warnings] + properties: + Id: + description: "The ID of the created container" + type: "string" + x-nullable: false + Warnings: + description: "Warnings encountered when creating the container" + type: "array" + x-nullable: false + items: + type: "string" + examples: + application/json: + Id: "e90e34656806" + Warnings: [] + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 409: + description: "conflict" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Container"] + /containers/{id}/json: + get: + summary: "Inspect a container" + description: "Return low-level information about a container." + operationId: "ContainerInspect" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "object" + title: "ContainerInspectResponse" + properties: + Id: + description: "The ID of the container" + type: "string" + Created: + description: "The time the container was created" + type: "string" + Path: + description: "The path to the command being run" + type: "string" + Args: + description: "The arguments to the command being run" + type: "array" + items: + type: "string" + State: + x-nullable: true + $ref: "#/definitions/ContainerState" + Image: + description: "The container's image ID" + type: "string" + ResolvConfPath: + type: "string" + HostnamePath: + type: "string" + HostsPath: + type: "string" + LogPath: + type: "string" + Name: + type: "string" + RestartCount: + type: "integer" + Driver: + type: "string" + Platform: + type: "string" + MountLabel: + type: "string" + ProcessLabel: + type: "string" + AppArmorProfile: + type: "string" + ExecIDs: + description: "IDs of exec instances that are running in the container." + type: "array" + items: + type: "string" + x-nullable: true + HostConfig: + $ref: "#/definitions/HostConfig" + GraphDriver: + $ref: "#/definitions/GraphDriverData" + SizeRw: + description: | + The size of files that have been created or changed by this + container. + type: "integer" + format: "int64" + SizeRootFs: + description: "The total size of all the files in this container." + type: "integer" + format: "int64" + Mounts: + type: "array" + items: + $ref: "#/definitions/MountPoint" + Config: + $ref: "#/definitions/ContainerConfig" + NetworkSettings: + $ref: "#/definitions/NetworkSettings" + examples: + application/json: + AppArmorProfile: "" + Args: + - "-c" + - "exit 9" + Config: + AttachStderr: true + AttachStdin: false + AttachStdout: true + Cmd: + - "/bin/sh" + - "-c" + - "exit 9" + Domainname: "" + Env: + - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + Healthcheck: + Test: ["CMD-SHELL", "exit 0"] + Hostname: "ba033ac44011" + Image: "ubuntu" + Labels: + com.example.vendor: "Acme" + com.example.license: "GPL" + com.example.version: "1.0" + MacAddress: "" + NetworkDisabled: false + OpenStdin: false + StdinOnce: false + Tty: false + User: "" + Volumes: + /volumes/data: {} + WorkingDir: "" + StopSignal: "SIGTERM" + StopTimeout: 10 + Created: "2015-01-06T15:47:31.485331387Z" + Driver: "devicemapper" + ExecIDs: + - "b35395de42bc8abd327f9dd65d913b9ba28c74d2f0734eeeae84fa1c616a0fca" + - "3fc1232e5cd20c8de182ed81178503dc6437f4e7ef12b52cc5e8de020652f1c4" + HostConfig: + MaximumIOps: 0 + MaximumIOBps: 0 + BlkioWeight: 0 + BlkioWeightDevice: + - {} + BlkioDeviceReadBps: + - {} + BlkioDeviceWriteBps: + - {} + BlkioDeviceReadIOps: + - {} + BlkioDeviceWriteIOps: + - {} + ContainerIDFile: "" + CpusetCpus: "" + CpusetMems: "" + CpuPercent: 80 + CpuShares: 0 + CpuPeriod: 100000 + CpuRealtimePeriod: 1000000 + CpuRealtimeRuntime: 10000 + Devices: [] + DeviceRequests: + - Driver: "nvidia" + Count: -1 + DeviceIDs": ["0", "1", "GPU-fef8089b-4820-abfc-e83e-94318197576e"] + Capabilities: [["gpu", "nvidia", "compute"]] + Options: + property1: "string" + property2: "string" + IpcMode: "" + LxcConf: [] + Memory: 0 + MemorySwap: 0 + MemoryReservation: 0 + KernelMemory: 0 + OomKillDisable: false + OomScoreAdj: 500 + NetworkMode: "bridge" + PidMode: "" + PortBindings: {} + Privileged: false + ReadonlyRootfs: false + PublishAllPorts: false + RestartPolicy: + MaximumRetryCount: 2 + Name: "on-failure" + LogConfig: + Type: "json-file" + Sysctls: + net.ipv4.ip_forward: "1" + Ulimits: + - {} + VolumeDriver: "" + ShmSize: 67108864 + HostnamePath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hostname" + HostsPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hosts" + LogPath: "/var/lib/docker/containers/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b-json.log" + Id: "ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39" + Image: "04c5d3b7b0656168630d3ba35d8889bd0e9caafcaeb3004d2bfbc47e7c5d35d2" + MountLabel: "" + Name: "/boring_euclid" + NetworkSettings: + Bridge: "" + SandboxID: "" + HairpinMode: false + LinkLocalIPv6Address: "" + LinkLocalIPv6PrefixLen: 0 + SandboxKey: "" + EndpointID: "" + Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + IPAddress: "" + IPPrefixLen: 0 + IPv6Gateway: "" + MacAddress: "" + Networks: + bridge: + NetworkID: "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812" + EndpointID: "7587b82f0dada3656fda26588aee72630c6fab1536d36e394b2bfbcf898c971d" + Gateway: "172.17.0.1" + IPAddress: "172.17.0.2" + IPPrefixLen: 16 + IPv6Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + MacAddress: "02:42:ac:12:00:02" + Path: "/bin/sh" + ProcessLabel: "" + ResolvConfPath: "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/resolv.conf" + RestartCount: 1 + State: + Error: "" + ExitCode: 9 + FinishedAt: "2015-01-06T15:47:32.080254511Z" + Health: + Status: "healthy" + FailingStreak: 0 + Log: + - Start: "2019-12-22T10:59:05.6385933Z" + End: "2019-12-22T10:59:05.8078452Z" + ExitCode: 0 + Output: "" + OOMKilled: false + Dead: false + Paused: false + Pid: 0 + Restarting: false + Running: true + StartedAt: "2015-01-06T15:47:32.072697474Z" + Status: "running" + Mounts: + - Name: "fac362...80535" + Source: "/data" + Destination: "/data" + Driver: "local" + Mode: "ro,Z" + RW: false + Propagation: "" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "size" + in: "query" + type: "boolean" + default: false + description: "Return the size of container as fields `SizeRw` and `SizeRootFs`" + tags: ["Container"] + /containers/{id}/top: + get: + summary: "List processes running inside a container" + description: | + On Unix systems, this is done by running the `ps` command. This endpoint + is not supported on Windows. + operationId: "ContainerTop" + responses: + 200: + description: "no error" + schema: + type: "object" + title: "ContainerTopResponse" + description: "OK response to ContainerTop operation" + properties: + Titles: + description: "The ps column titles" + type: "array" + items: + type: "string" + Processes: + description: | + Each process running in the container, where each is process + is an array of values corresponding to the titles. + type: "array" + items: + type: "array" + items: + type: "string" + examples: + application/json: + Titles: + - "UID" + - "PID" + - "PPID" + - "C" + - "STIME" + - "TTY" + - "TIME" + - "CMD" + Processes: + - + - "root" + - "13642" + - "882" + - "0" + - "17:03" + - "pts/0" + - "00:00:00" + - "/bin/bash" + - + - "root" + - "13735" + - "13642" + - "0" + - "17:06" + - "pts/0" + - "00:00:00" + - "sleep 10" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "ps_args" + in: "query" + description: "The arguments to pass to `ps`. For example, `aux`" + type: "string" + default: "-ef" + tags: ["Container"] + /containers/{id}/logs: + get: + summary: "Get container logs" + description: | + Get `stdout` and `stderr` logs from a container. + + Note: This endpoint works only for containers with the `json-file` or + `journald` logging driver. + operationId: "ContainerLogs" + responses: + 200: + description: | + logs returned as a stream in response body. + For the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach). + Note that unlike the attach endpoint, the logs endpoint does not + upgrade the connection and does not set Content-Type. + schema: + type: "string" + format: "binary" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "follow" + in: "query" + description: "Keep connection after returning logs." + type: "boolean" + default: false + - name: "stdout" + in: "query" + description: "Return logs from `stdout`" + type: "boolean" + default: false + - name: "stderr" + in: "query" + description: "Return logs from `stderr`" + type: "boolean" + default: false + - name: "since" + in: "query" + description: "Only return logs since this time, as a UNIX timestamp" + type: "integer" + default: 0 + - name: "until" + in: "query" + description: "Only return logs before this time, as a UNIX timestamp" + type: "integer" + default: 0 + - name: "timestamps" + in: "query" + description: "Add timestamps to every log line" + type: "boolean" + default: false + - name: "tail" + in: "query" + description: | + Only return this number of log lines from the end of the logs. + Specify as an integer or `all` to output all log lines. + type: "string" + default: "all" + tags: ["Container"] + /containers/{id}/changes: + get: + summary: "Get changes on a container’s filesystem" + description: | + Returns which files in a container's filesystem have been added, deleted, + or modified. The `Kind` of modification can be one of: + + - `0`: Modified + - `1`: Added + - `2`: Deleted + operationId: "ContainerChanges" + produces: ["application/json"] + responses: + 200: + description: "The list of changes" + schema: + type: "array" + items: + type: "object" + x-go-name: "ContainerChangeResponseItem" + title: "ContainerChangeResponseItem" + description: "change item in response to ContainerChanges operation" + required: [Path, Kind] + properties: + Path: + description: "Path to file that has changed" + type: "string" + x-nullable: false + Kind: + description: "Kind of change" + type: "integer" + format: "uint8" + enum: [0, 1, 2] + x-nullable: false + examples: + application/json: + - Path: "/dev" + Kind: 0 + - Path: "/dev/kmsg" + Kind: 1 + - Path: "/test" + Kind: 1 + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + tags: ["Container"] + /containers/{id}/export: + get: + summary: "Export a container" + description: "Export the contents of a container as a tarball." + operationId: "ContainerExport" + produces: + - "application/octet-stream" + responses: + 200: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + tags: ["Container"] + /containers/{id}/stats: + get: + summary: "Get container stats based on resource usage" + description: | + This endpoint returns a live stream of a container’s resource usage + statistics. + + The `precpu_stats` is the CPU statistic of the *previous* read, and is + used to calculate the CPU usage percentage. It is not an exact copy + of the `cpu_stats` field. + + If either `precpu_stats.online_cpus` or `cpu_stats.online_cpus` is + nil then for compatibility with older daemons the length of the + corresponding `cpu_usage.percpu_usage` array should be used. + + On a cgroup v2 host, the following fields are not set + * `blkio_stats`: all fields other than `io_service_bytes_recursive` + * `cpu_stats`: `cpu_usage.percpu_usage` + * `memory_stats`: `max_usage` and `failcnt` + Also, `memory_stats.stats` fields are incompatible with cgroup v1. + + To calculate the values shown by the `stats` command of the docker cli tool + the following formulas can be used: + * used_memory = `memory_stats.usage - memory_stats.stats.cache` + * available_memory = `memory_stats.limit` + * Memory usage % = `(used_memory / available_memory) * 100.0` + * cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage` + * system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage` + * number_cpus = `lenght(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus` + * CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0` + operationId: "ContainerStats" + produces: ["application/json"] + responses: + 200: + description: "no error" + schema: + type: "object" + examples: + application/json: + read: "2015-01-08T22:57:31.547920715Z" + pids_stats: + current: 3 + networks: + eth0: + rx_bytes: 5338 + rx_dropped: 0 + rx_errors: 0 + rx_packets: 36 + tx_bytes: 648 + tx_dropped: 0 + tx_errors: 0 + tx_packets: 8 + eth5: + rx_bytes: 4641 + rx_dropped: 0 + rx_errors: 0 + rx_packets: 26 + tx_bytes: 690 + tx_dropped: 0 + tx_errors: 0 + tx_packets: 9 + memory_stats: + stats: + total_pgmajfault: 0 + cache: 0 + mapped_file: 0 + total_inactive_file: 0 + pgpgout: 414 + rss: 6537216 + total_mapped_file: 0 + writeback: 0 + unevictable: 0 + pgpgin: 477 + total_unevictable: 0 + pgmajfault: 0 + total_rss: 6537216 + total_rss_huge: 6291456 + total_writeback: 0 + total_inactive_anon: 0 + rss_huge: 6291456 + hierarchical_memory_limit: 67108864 + total_pgfault: 964 + total_active_file: 0 + active_anon: 6537216 + total_active_anon: 6537216 + total_pgpgout: 414 + total_cache: 0 + inactive_anon: 0 + active_file: 0 + pgfault: 964 + inactive_file: 0 + total_pgpgin: 477 + max_usage: 6651904 + usage: 6537216 + failcnt: 0 + limit: 67108864 + blkio_stats: {} + cpu_stats: + cpu_usage: + percpu_usage: + - 8646879 + - 24472255 + - 36438778 + - 30657443 + usage_in_usermode: 50000000 + total_usage: 100215355 + usage_in_kernelmode: 30000000 + system_cpu_usage: 739306590000000 + online_cpus: 4 + throttling_data: + periods: 0 + throttled_periods: 0 + throttled_time: 0 + precpu_stats: + cpu_usage: + percpu_usage: + - 8646879 + - 24350896 + - 36438778 + - 30657443 + usage_in_usermode: 50000000 + total_usage: 100093996 + usage_in_kernelmode: 30000000 + system_cpu_usage: 9492140000000 + online_cpus: 4 + throttling_data: + periods: 0 + throttled_periods: 0 + throttled_time: 0 + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "stream" + in: "query" + description: | + Stream the output. If false, the stats will be output once and then + it will disconnect. + type: "boolean" + default: true + - name: "one-shot" + in: "query" + description: | + Only get a single stat instead of waiting for 2 cycles. Must be used + with `stream=false`. + type: "boolean" + default: false + tags: ["Container"] + /containers/{id}/resize: + post: + summary: "Resize a container TTY" + description: "Resize the TTY for a container." + operationId: "ContainerResize" + consumes: + - "application/octet-stream" + produces: + - "text/plain" + responses: + 200: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "cannot resize container" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "h" + in: "query" + description: "Height of the TTY session in characters" + type: "integer" + - name: "w" + in: "query" + description: "Width of the TTY session in characters" + type: "integer" + tags: ["Container"] + /containers/{id}/start: + post: + summary: "Start a container" + operationId: "ContainerStart" + responses: + 204: + description: "no error" + 304: + description: "container already started" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "detachKeys" + in: "query" + description: | + Override the key sequence for detaching a container. Format is a + single character `[a-Z]` or `ctrl-` where `` is one + of: `a-z`, `@`, `^`, `[`, `,` or `_`. + type: "string" + tags: ["Container"] + /containers/{id}/stop: + post: + summary: "Stop a container" + operationId: "ContainerStop" + responses: + 204: + description: "no error" + 304: + description: "container already stopped" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "t" + in: "query" + description: "Number of seconds to wait before killing the container" + type: "integer" + tags: ["Container"] + /containers/{id}/restart: + post: + summary: "Restart a container" + operationId: "ContainerRestart" + responses: + 204: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "t" + in: "query" + description: "Number of seconds to wait before killing the container" + type: "integer" + tags: ["Container"] + /containers/{id}/kill: + post: + summary: "Kill a container" + description: | + Send a POSIX signal to a container, defaulting to killing to the + container. + operationId: "ContainerKill" + responses: + 204: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 409: + description: "container is not running" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "Container d37cde0fe4ad63c3a7252023b2f9800282894247d145cb5933ddf6e52cc03a28 is not running" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "signal" + in: "query" + description: "Signal to send to the container as an integer or string (e.g. `SIGINT`)" + type: "string" + default: "SIGKILL" + tags: ["Container"] + /containers/{id}/update: + post: + summary: "Update a container" + description: | + Change various configuration options of a container without having to + recreate it. + operationId: "ContainerUpdate" + consumes: ["application/json"] + produces: ["application/json"] + responses: + 200: + description: "The container has been updated." + schema: + type: "object" + title: "ContainerUpdateResponse" + description: "OK response to ContainerUpdate operation" + properties: + Warnings: + type: "array" + items: + type: "string" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "update" + in: "body" + required: true + schema: + allOf: + - $ref: "#/definitions/Resources" + - type: "object" + properties: + RestartPolicy: + $ref: "#/definitions/RestartPolicy" + example: + BlkioWeight: 300 + CpuShares: 512 + CpuPeriod: 100000 + CpuQuota: 50000 + CpuRealtimePeriod: 1000000 + CpuRealtimeRuntime: 10000 + CpusetCpus: "0,1" + CpusetMems: "0" + Memory: 314572800 + MemorySwap: 514288000 + MemoryReservation: 209715200 + KernelMemory: 52428800 + RestartPolicy: + MaximumRetryCount: 4 + Name: "on-failure" + tags: ["Container"] + /containers/{id}/rename: + post: + summary: "Rename a container" + operationId: "ContainerRename" + responses: + 204: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 409: + description: "name already in use" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "name" + in: "query" + required: true + description: "New name for the container" + type: "string" + tags: ["Container"] + /containers/{id}/pause: + post: + summary: "Pause a container" + description: | + Use the freezer cgroup to suspend all processes in a container. + + Traditionally, when suspending a process the `SIGSTOP` signal is used, + which is observable by the process being suspended. With the freezer + cgroup the process is unaware, and unable to capture, that it is being + suspended, and subsequently resumed. + operationId: "ContainerPause" + responses: + 204: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + tags: ["Container"] + /containers/{id}/unpause: + post: + summary: "Unpause a container" + description: "Resume a container which has been paused." + operationId: "ContainerUnpause" + responses: + 204: + description: "no error" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + tags: ["Container"] + /containers/{id}/attach: + post: + summary: "Attach to a container" + description: | + Attach to a container to read its output or send it input. You can attach + to the same container multiple times and you can reattach to containers + that have been detached. + + Either the `stream` or `logs` parameter must be `true` for this endpoint + to do anything. + + See the [documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) + for more details. + + ### Hijacking + + This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, + and `stderr` on the same socket. + + This is the response from the daemon for an attach request: + + ``` + HTTP/1.1 200 OK + Content-Type: application/vnd.docker.raw-stream + + [STREAM] + ``` + + After the headers and two new lines, the TCP connection can now be used + for raw, bidirectional communication between the client and server. + + To hint potential proxies about connection hijacking, the Docker client + can also optionally send connection upgrade headers. + + For example, the client sends this request to upgrade the connection: + + ``` + POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1 + Upgrade: tcp + Connection: Upgrade + ``` + + The Docker daemon will respond with a `101 UPGRADED` response, and will + similarly follow with the raw stream: + + ``` + HTTP/1.1 101 UPGRADED + Content-Type: application/vnd.docker.raw-stream + Connection: Upgrade + Upgrade: tcp + + [STREAM] + ``` + + ### Stream format + + When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate), + the stream over the hijacked connected is multiplexed to separate out + `stdout` and `stderr`. The stream consists of a series of frames, each + containing a header and a payload. + + The header contains the information which the stream writes (`stdout` or + `stderr`). It also contains the size of the associated frame encoded in + the last four bytes (`uint32`). + + It is encoded on the first eight bytes like this: + + ```go + header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4} + ``` + + `STREAM_TYPE` can be: + + - 0: `stdin` (is written on `stdout`) + - 1: `stdout` + - 2: `stderr` + + `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size + encoded as big endian. + + Following the header is the payload, which is the specified number of + bytes of `STREAM_TYPE`. + + The simplest way to implement this protocol is the following: + + 1. Read 8 bytes. + 2. Choose `stdout` or `stderr` depending on the first byte. + 3. Extract the frame size from the last four bytes. + 4. Read the extracted size and output it on the correct output. + 5. Goto 1. + + ### Stream format when using a TTY + + When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate), + the stream is not multiplexed. The data exchanged over the hijacked + connection is simply the raw data from the process PTY and client's + `stdin`. + + operationId: "ContainerAttach" + produces: + - "application/vnd.docker.raw-stream" + responses: + 101: + description: "no error, hints proxy about hijacking" + 200: + description: "no error, no upgrade header found" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "detachKeys" + in: "query" + description: | + Override the key sequence for detaching a container.Format is a single + character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, + `@`, `^`, `[`, `,` or `_`. + type: "string" + - name: "logs" + in: "query" + description: | + Replay previous logs from the container. + + This is useful for attaching to a container that has started and you + want to output everything since the container started. + + If `stream` is also enabled, once all the previous output has been + returned, it will seamlessly transition into streaming current + output. + type: "boolean" + default: false + - name: "stream" + in: "query" + description: | + Stream attached streams from the time the request was made onwards. + type: "boolean" + default: false + - name: "stdin" + in: "query" + description: "Attach to `stdin`" + type: "boolean" + default: false + - name: "stdout" + in: "query" + description: "Attach to `stdout`" + type: "boolean" + default: false + - name: "stderr" + in: "query" + description: "Attach to `stderr`" + type: "boolean" + default: false + tags: ["Container"] + /containers/{id}/attach/ws: + get: + summary: "Attach to a container via a websocket" + operationId: "ContainerAttachWebsocket" + responses: + 101: + description: "no error, hints proxy about hijacking" + 200: + description: "no error, no upgrade header found" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "detachKeys" + in: "query" + description: | + Override the key sequence for detaching a container.Format is a single + character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, + `@`, `^`, `[`, `,`, or `_`. + type: "string" + - name: "logs" + in: "query" + description: "Return logs" + type: "boolean" + default: false + - name: "stream" + in: "query" + description: "Return stream" + type: "boolean" + default: false + - name: "stdin" + in: "query" + description: "Attach to `stdin`" + type: "boolean" + default: false + - name: "stdout" + in: "query" + description: "Attach to `stdout`" + type: "boolean" + default: false + - name: "stderr" + in: "query" + description: "Attach to `stderr`" + type: "boolean" + default: false + tags: ["Container"] + /containers/{id}/wait: + post: + summary: "Wait for a container" + description: "Block until a container stops, then returns the exit code." + operationId: "ContainerWait" + produces: ["application/json"] + responses: + 200: + description: "The container has exit." + schema: + type: "object" + title: "ContainerWaitResponse" + description: "OK response to ContainerWait operation" + required: [StatusCode] + properties: + StatusCode: + description: "Exit code of the container" + type: "integer" + x-nullable: false + Error: + description: "container waiting error, if any" + type: "object" + properties: + Message: + description: "Details of an error" + type: "string" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "condition" + in: "query" + description: | + Wait until a container state reaches the given condition, either + 'not-running' (default), 'next-exit', or 'removed'. + type: "string" + default: "not-running" + tags: ["Container"] + /containers/{id}: + delete: + summary: "Remove a container" + operationId: "ContainerDelete" + responses: + 204: + description: "no error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 409: + description: "conflict" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: | + You cannot remove a running container: c2ada9df5af8. Stop the + container before attempting removal or force remove + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "v" + in: "query" + description: "Remove anonymous volumes associated with the container." + type: "boolean" + default: false + - name: "force" + in: "query" + description: "If the container is running, kill it before removing it." + type: "boolean" + default: false + - name: "link" + in: "query" + description: "Remove the specified link associated with the container." + type: "boolean" + default: false + tags: ["Container"] + /containers/{id}/archive: + head: + summary: "Get information about files in a container" + description: | + A response header `X-Docker-Container-Path-Stat` is returned, containing + a base64 - encoded JSON object with some filesystem header information + about the path. + operationId: "ContainerArchiveInfo" + responses: + 200: + description: "no error" + headers: + X-Docker-Container-Path-Stat: + type: "string" + description: | + A base64 - encoded JSON object with some filesystem header + information about the path + 400: + description: "Bad parameter" + schema: + allOf: + - $ref: "#/definitions/ErrorResponse" + - type: "object" + properties: + message: + description: | + The error message. Either "must specify path parameter" + (path cannot be empty) or "not a directory" (path was + asserted to be a directory but exists as a file). + type: "string" + x-nullable: false + 404: + description: "Container or path does not exist" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "path" + in: "query" + required: true + description: "Resource in the container’s filesystem to archive." + type: "string" + tags: ["Container"] + get: + summary: "Get an archive of a filesystem resource in a container" + description: "Get a tar archive of a resource in the filesystem of container id." + operationId: "ContainerArchive" + produces: ["application/x-tar"] + responses: + 200: + description: "no error" + 400: + description: "Bad parameter" + schema: + allOf: + - $ref: "#/definitions/ErrorResponse" + - type: "object" + properties: + message: + description: | + The error message. Either "must specify path parameter" + (path cannot be empty) or "not a directory" (path was + asserted to be a directory but exists as a file). + type: "string" + x-nullable: false + 404: + description: "Container or path does not exist" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "path" + in: "query" + required: true + description: "Resource in the container’s filesystem to archive." + type: "string" + tags: ["Container"] + put: + summary: "Extract an archive of files or folders to a directory in a container" + description: "Upload a tar archive to be extracted to a path in the filesystem of container id." + operationId: "PutContainerArchive" + consumes: ["application/x-tar", "application/octet-stream"] + responses: + 200: + description: "The content was extracted successfully" + 400: + description: "Bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 403: + description: "Permission denied, the volume or container rootfs is marked as read-only." + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "No such container or path does not exist inside the container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the container" + type: "string" + - name: "path" + in: "query" + required: true + description: "Path to a directory in the container to extract the archive’s contents into. " + type: "string" + - name: "noOverwriteDirNonDir" + in: "query" + description: | + If `1`, `true`, or `True` then it will be an error if unpacking the + given content would cause an existing directory to be replaced with + a non-directory and vice versa. + type: "string" + - name: "copyUIDGID" + in: "query" + description: | + If `1`, `true`, then it will copy UID/GID maps to the dest file or + dir + type: "string" + - name: "inputStream" + in: "body" + required: true + description: | + The input stream must be a tar archive compressed with one of the + following algorithms: `identity` (no compression), `gzip`, `bzip2`, + or `xz`. + schema: + type: "string" + format: "binary" + tags: ["Container"] + /containers/prune: + post: + summary: "Delete stopped containers" + produces: + - "application/json" + operationId: "ContainerPrune" + parameters: + - name: "filters" + in: "query" + description: | + Filters to process on the prune list, encoded as JSON (a `map[string][]string`). + + Available filters: + - `until=` Prune containers created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. + - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune containers with (or without, in case `label!=...` is used) the specified labels. + type: "string" + responses: + 200: + description: "No error" + schema: + type: "object" + title: "ContainerPruneResponse" + properties: + ContainersDeleted: + description: "Container IDs that were deleted" + type: "array" + items: + type: "string" + SpaceReclaimed: + description: "Disk space reclaimed in bytes" + type: "integer" + format: "int64" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Container"] + /images/json: + get: + summary: "List Images" + description: "Returns a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image." + operationId: "ImageList" + produces: + - "application/json" + responses: + 200: + description: "Summary image data for the images matching the query" + schema: + type: "array" + items: + $ref: "#/definitions/ImageSummary" + examples: + application/json: + - Id: "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8" + ParentId: "" + RepoTags: + - "ubuntu:12.04" + - "ubuntu:precise" + RepoDigests: + - "ubuntu@sha256:992069aee4016783df6345315302fa59681aae51a8eeb2f889dea59290f21787" + Created: 1474925151 + Size: 103579269 + VirtualSize: 103579269 + SharedSize: 0 + Labels: {} + Containers: 2 + - Id: "sha256:3e314f95dcace0f5e4fd37b10862fe8398e3c60ed36600bc0ca5fda78b087175" + ParentId: "" + RepoTags: + - "ubuntu:12.10" + - "ubuntu:quantal" + RepoDigests: + - "ubuntu@sha256:002fba3e3255af10be97ea26e476692a7ebed0bb074a9ab960b2e7a1526b15d7" + - "ubuntu@sha256:68ea0200f0b90df725d99d823905b04cf844f6039ef60c60bf3e019915017bd3" + Created: 1403128455 + Size: 172064416 + VirtualSize: 172064416 + SharedSize: 0 + Labels: {} + Containers: 5 + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "all" + in: "query" + description: "Show all images. Only images from a final layer (no children) are shown by default." + type: "boolean" + default: false + - name: "filters" + in: "query" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to + process on the images list. + + Available filters: + + - `before`=(`[:]`, `` or ``) + - `dangling=true` + - `label=key` or `label="key=value"` of an image label + - `reference`=(`[:]`) + - `since`=(`[:]`, `` or ``) + type: "string" + - name: "digests" + in: "query" + description: "Show digest information as a `RepoDigests` field on each image." + type: "boolean" + default: false + tags: ["Image"] + /build: + post: + summary: "Build an image" + description: | + Build an image from a tar archive with a `Dockerfile` in it. + + The `Dockerfile` specifies how the image is built from the tar archive. It is typically in the archive's root, but can be at a different path or have a different name by specifying the `dockerfile` parameter. [See the `Dockerfile` reference for more information](https://docs.docker.com/engine/reference/builder/). + + The Docker daemon performs a preliminary validation of the `Dockerfile` before starting the build, and returns an error if the syntax is incorrect. After that, each instruction is run one-by-one until the ID of the new image is output. + + The build is canceled if the client drops the connection by quitting or being killed. + operationId: "ImageBuild" + consumes: + - "application/octet-stream" + produces: + - "application/json" + parameters: + - name: "inputStream" + in: "body" + description: "A tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz." + schema: + type: "string" + format: "binary" + - name: "dockerfile" + in: "query" + description: "Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an external `Dockerfile`." + type: "string" + default: "Dockerfile" + - name: "t" + in: "query" + description: "A name and optional tag to apply to the image in the `name:tag` format. If you omit the tag the default `latest` value is assumed. You can provide several `t` parameters." + type: "string" + - name: "extrahosts" + in: "query" + description: "Extra hosts to add to /etc/hosts" + type: "string" + - name: "remote" + in: "query" + description: "A Git repository URI or HTTP/HTTPS context URI. If the URI points to a single text file, the file’s contents are placed into a file called `Dockerfile` and the image is built from that file. If the URI points to a tarball, the file is downloaded by the daemon and the contents therein used as the context for the build. If the URI points to a tarball and the `dockerfile` parameter is also specified, there must be a file with the corresponding path inside the tarball." + type: "string" + - name: "q" + in: "query" + description: "Suppress verbose build output." + type: "boolean" + default: false + - name: "nocache" + in: "query" + description: "Do not use the cache when building the image." + type: "boolean" + default: false + - name: "cachefrom" + in: "query" + description: "JSON array of images used for build cache resolution." + type: "string" + - name: "pull" + in: "query" + description: "Attempt to pull the image even if an older image exists locally." + type: "string" + - name: "rm" + in: "query" + description: "Remove intermediate containers after a successful build." + type: "boolean" + default: true + - name: "forcerm" + in: "query" + description: "Always remove intermediate containers, even upon failure." + type: "boolean" + default: false + - name: "memory" + in: "query" + description: "Set memory limit for build." + type: "integer" + - name: "memswap" + in: "query" + description: "Total memory (memory + swap). Set as `-1` to disable swap." + type: "integer" + - name: "cpushares" + in: "query" + description: "CPU shares (relative weight)." + type: "integer" + - name: "cpusetcpus" + in: "query" + description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)." + type: "string" + - name: "cpuperiod" + in: "query" + description: "The length of a CPU period in microseconds." + type: "integer" + - name: "cpuquota" + in: "query" + description: "Microseconds of CPU time that the container can get in a CPU period." + type: "integer" + - name: "buildargs" + in: "query" + description: > + JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker + uses the buildargs as the environment context for commands run via the `Dockerfile` RUN + instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for + passing secret values. + + + For example, the build arg `FOO=bar` would become `{"FOO":"bar"}` in JSON. This would result in the + query parameter `buildargs={"FOO":"bar"}`. Note that `{"FOO":"bar"}` should be URI component encoded. + + + [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg) + type: "string" + - name: "shmsize" + in: "query" + description: "Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB." + type: "integer" + - name: "squash" + in: "query" + description: "Squash the resulting images layers into a single layer. *(Experimental release only.)*" + type: "boolean" + - name: "labels" + in: "query" + description: "Arbitrary key/value labels to set on the image, as a JSON map of string pairs." + type: "string" + - name: "networkmode" + in: "query" + description: | + Sets the networking mode for the run commands during build. Supported + standard values are: `bridge`, `host`, `none`, and `container:`. + Any other value is taken as a custom network's name or ID to which this + container should connect to. + type: "string" + - name: "Content-type" + in: "header" + type: "string" + enum: + - "application/x-tar" + default: "application/x-tar" + - name: "X-Registry-Config" + in: "header" + description: | + This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to. + + The key is a registry URL, and the value is an auth configuration object, [as described in the authentication section](#section/Authentication). For example: + + ``` + { + "docker.example.com": { + "username": "janedoe", + "password": "hunter2" + }, + "https://index.docker.io/v1/": { + "username": "mobydock", + "password": "conta1n3rize14" + } + } + ``` + + Only the registry domain name (and port if not the default 443) are required. However, for legacy reasons, the Docker Hub registry must be specified with both a `https://` prefix and a `/v1/` suffix even though Docker will prefer to use the v2 registry API. + type: "string" + - name: "platform" + in: "query" + description: "Platform in the format os[/arch[/variant]]" + type: "string" + default: "" + - name: "target" + in: "query" + description: "Target build stage" + type: "string" + default: "" + - name: "outputs" + in: "query" + description: "BuildKit output configuration" + type: "string" + default: "" + responses: + 200: + description: "no error" + 400: + description: "Bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Image"] + /build/prune: + post: + summary: "Delete builder cache" + produces: + - "application/json" + operationId: "BuildPrune" + parameters: + - name: "keep-storage" + in: "query" + description: "Amount of disk space in bytes to keep for cache" + type: "integer" + format: "int64" + - name: "all" + in: "query" + type: "boolean" + description: "Remove all types of build cache" + - name: "filters" + in: "query" + type: "string" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to + process on the list of build cache objects. + + Available filters: + + - `until=`: duration relative to daemon's time, during which build cache was not used, in Go's duration format (e.g., '24h') + - `id=` + - `parent=` + - `type=` + - `description=` + - `inuse` + - `shared` + - `private` + responses: + 200: + description: "No error" + schema: + type: "object" + title: "BuildPruneResponse" + properties: + CachesDeleted: + type: "array" + items: + description: "ID of build cache object" + type: "string" + SpaceReclaimed: + description: "Disk space reclaimed in bytes" + type: "integer" + format: "int64" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Image"] + /images/create: + post: + summary: "Create an image" + description: "Create an image by either pulling it from a registry or importing it." + operationId: "ImageCreate" + consumes: + - "text/plain" + - "application/octet-stream" + produces: + - "application/json" + responses: + 200: + description: "no error" + 404: + description: "repository does not exist or no read access" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "fromImage" + in: "query" + description: "Name of the image to pull. The name may include a tag or digest. This parameter may only be used when pulling an image. The pull is cancelled if the HTTP connection is closed." + type: "string" + - name: "fromSrc" + in: "query" + description: "Source to import. The value may be a URL from which the image can be retrieved or `-` to read the image from the request body. This parameter may only be used when importing an image." + type: "string" + - name: "repo" + in: "query" + description: "Repository name given to an image when it is imported. The repo may include a tag. This parameter may only be used when importing an image." + type: "string" + - name: "tag" + in: "query" + description: "Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled." + type: "string" + - name: "message" + in: "query" + description: "Set commit message for imported image." + type: "string" + - name: "inputImage" + in: "body" + description: "Image content if the value `-` has been specified in fromSrc query parameter" + schema: + type: "string" + required: false + - name: "X-Registry-Auth" + in: "header" + description: | + A base64url-encoded auth configuration. + + Refer to the [authentication section](#section/Authentication) for + details. + type: "string" + - name: "platform" + in: "query" + description: "Platform in the format os[/arch[/variant]]" + type: "string" + default: "" + tags: ["Image"] + /images/{name}/json: + get: + summary: "Inspect an image" + description: "Return low-level information about an image." + operationId: "ImageInspect" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + $ref: "#/definitions/Image" + examples: + application/json: + Id: "sha256:85f05633ddc1c50679be2b16a0479ab6f7637f8884e0cfe0f4d20e1ebb3d6e7c" + Container: "cb91e48a60d01f1e27028b4fc6819f4f290b3cf12496c8176ec714d0d390984a" + Comment: "" + Os: "linux" + Architecture: "amd64" + Parent: "sha256:91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c" + ContainerConfig: + Tty: false + Hostname: "e611e15f9c9d" + Domainname: "" + AttachStdout: false + PublishService: "" + AttachStdin: false + OpenStdin: false + StdinOnce: false + NetworkDisabled: false + OnBuild: [] + Image: "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c" + User: "" + WorkingDir: "" + MacAddress: "" + AttachStderr: false + Labels: + com.example.license: "GPL" + com.example.version: "1.0" + com.example.vendor: "Acme" + Env: + - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + Cmd: + - "/bin/sh" + - "-c" + - "#(nop) LABEL com.example.vendor=Acme com.example.license=GPL com.example.version=1.0" + DockerVersion: "1.9.0-dev" + VirtualSize: 188359297 + Size: 0 + Author: "" + Created: "2015-09-10T08:30:53.26995814Z" + GraphDriver: + Name: "aufs" + Data: {} + RepoDigests: + - "localhost:5000/test/busybox/example@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf" + RepoTags: + - "example:1.0" + - "example:latest" + - "example:stable" + Config: + Image: "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c" + NetworkDisabled: false + OnBuild: [] + StdinOnce: false + PublishService: "" + AttachStdin: false + OpenStdin: false + Domainname: "" + AttachStdout: false + Tty: false + Hostname: "e611e15f9c9d" + Cmd: + - "/bin/bash" + Env: + - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + Labels: + com.example.vendor: "Acme" + com.example.version: "1.0" + com.example.license: "GPL" + MacAddress: "" + AttachStderr: false + WorkingDir: "" + User: "" + RootFS: + Type: "layers" + Layers: + - "sha256:1834950e52ce4d5a88a1bbd131c537f4d0e56d10ff0dd69e66be3b7dfa9df7e6" + - "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef" + 404: + description: "No such image" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such image: someimage (tag: latest)" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or id" + type: "string" + required: true + tags: ["Image"] + /images/{name}/history: + get: + summary: "Get the history of an image" + description: "Return parent layers of an image." + operationId: "ImageHistory" + produces: ["application/json"] + responses: + 200: + description: "List of image layers" + schema: + type: "array" + items: + type: "object" + x-go-name: HistoryResponseItem + title: "HistoryResponseItem" + description: "individual image layer information in response to ImageHistory operation" + required: [Id, Created, CreatedBy, Tags, Size, Comment] + properties: + Id: + type: "string" + x-nullable: false + Created: + type: "integer" + format: "int64" + x-nullable: false + CreatedBy: + type: "string" + x-nullable: false + Tags: + type: "array" + items: + type: "string" + Size: + type: "integer" + format: "int64" + x-nullable: false + Comment: + type: "string" + x-nullable: false + examples: + application/json: + - Id: "3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710" + Created: 1398108230 + CreatedBy: "/bin/sh -c #(nop) ADD file:eb15dbd63394e063b805a3c32ca7bf0266ef64676d5a6fab4801f2e81e2a5148 in /" + Tags: + - "ubuntu:lucid" + - "ubuntu:10.04" + Size: 182964289 + Comment: "" + - Id: "6cfa4d1f33fb861d4d114f43b25abd0ac737509268065cdfd69d544a59c85ab8" + Created: 1398108222 + CreatedBy: "/bin/sh -c #(nop) MAINTAINER Tianon Gravi - mkimage-debootstrap.sh -i iproute,iputils-ping,ubuntu-minimal -t lucid.tar.xz lucid http://archive.ubuntu.com/ubuntu/" + Tags: [] + Size: 0 + Comment: "" + - Id: "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158" + Created: 1371157430 + CreatedBy: "" + Tags: + - "scratch12:latest" + - "scratch:latest" + Size: 0 + Comment: "Imported from -" + 404: + description: "No such image" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or ID" + type: "string" + required: true + tags: ["Image"] + /images/{name}/push: + post: + summary: "Push an image" + description: | + Push an image to a registry. + + If you wish to push an image on to a private registry, that image must + already have a tag which references the registry. For example, + `registry.example.com/myimage:latest`. + + The push is cancelled if the HTTP connection is closed. + operationId: "ImagePush" + consumes: + - "application/octet-stream" + responses: + 200: + description: "No error" + 404: + description: "No such image" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or ID." + type: "string" + required: true + - name: "tag" + in: "query" + description: "The tag to associate with the image on the registry." + type: "string" + - name: "X-Registry-Auth" + in: "header" + description: | + A base64url-encoded auth configuration. + + Refer to the [authentication section](#section/Authentication) for + details. + type: "string" + required: true + tags: ["Image"] + /images/{name}/tag: + post: + summary: "Tag an image" + description: "Tag an image so that it becomes part of a repository." + operationId: "ImageTag" + responses: + 201: + description: "No error" + 400: + description: "Bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "No such image" + schema: + $ref: "#/definitions/ErrorResponse" + 409: + description: "Conflict" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or ID to tag." + type: "string" + required: true + - name: "repo" + in: "query" + description: "The repository to tag in. For example, `someuser/someimage`." + type: "string" + - name: "tag" + in: "query" + description: "The name of the new tag." + type: "string" + tags: ["Image"] + /images/{name}: + delete: + summary: "Remove an image" + description: | + Remove an image, along with any untagged parent images that were + referenced by that image. + + Images can't be removed if they have descendant images, are being + used by a running container or are being used by a build. + operationId: "ImageDelete" + produces: ["application/json"] + responses: + 200: + description: "The image was deleted successfully" + schema: + type: "array" + items: + $ref: "#/definitions/ImageDeleteResponseItem" + examples: + application/json: + - Untagged: "3e2f21a89f" + - Deleted: "3e2f21a89f" + - Deleted: "53b4f83ac9" + 404: + description: "No such image" + schema: + $ref: "#/definitions/ErrorResponse" + 409: + description: "Conflict" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or ID" + type: "string" + required: true + - name: "force" + in: "query" + description: "Remove the image even if it is being used by stopped containers or has other tags" + type: "boolean" + default: false + - name: "noprune" + in: "query" + description: "Do not delete untagged parent images" + type: "boolean" + default: false + tags: ["Image"] + /images/search: + get: + summary: "Search images" + description: "Search for an image on Docker Hub." + operationId: "ImageSearch" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + type: "array" + items: + type: "object" + title: "ImageSearchResponseItem" + properties: + description: + type: "string" + is_official: + type: "boolean" + is_automated: + type: "boolean" + name: + type: "string" + star_count: + type: "integer" + examples: + application/json: + - description: "" + is_official: false + is_automated: false + name: "wma55/u1210sshd" + star_count: 0 + - description: "" + is_official: false + is_automated: false + name: "jdswinbank/sshd" + star_count: 0 + - description: "" + is_official: false + is_automated: false + name: "vgauthier/sshd" + star_count: 0 + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "term" + in: "query" + description: "Term to search" + type: "string" + required: true + - name: "limit" + in: "query" + description: "Maximum number of results to return" + type: "integer" + - name: "filters" + in: "query" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters: + + - `is-automated=(true|false)` + - `is-official=(true|false)` + - `stars=` Matches images that has at least 'number' stars. + type: "string" + tags: ["Image"] + /images/prune: + post: + summary: "Delete unused images" + produces: + - "application/json" + operationId: "ImagePrune" + parameters: + - name: "filters" + in: "query" + description: | + Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: + + - `dangling=` When set to `true` (or `1`), prune only + unused *and* untagged images. When set to `false` + (or `0`), all unused images are pruned. + - `until=` Prune images created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. + - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune images with (or without, in case `label!=...` is used) the specified labels. + type: "string" + responses: + 200: + description: "No error" + schema: + type: "object" + title: "ImagePruneResponse" + properties: + ImagesDeleted: + description: "Images that were deleted" + type: "array" + items: + $ref: "#/definitions/ImageDeleteResponseItem" + SpaceReclaimed: + description: "Disk space reclaimed in bytes" + type: "integer" + format: "int64" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Image"] + /auth: + post: + summary: "Check auth configuration" + description: | + Validate credentials for a registry and, if available, get an identity + token for accessing the registry without password. + operationId: "SystemAuth" + consumes: ["application/json"] + produces: ["application/json"] + responses: + 200: + description: "An identity token was generated successfully." + schema: + type: "object" + title: "SystemAuthResponse" + required: [Status] + properties: + Status: + description: "The status of the authentication" + type: "string" + x-nullable: false + IdentityToken: + description: "An opaque token used to authenticate a user after a successful login" + type: "string" + x-nullable: false + examples: + application/json: + Status: "Login Succeeded" + IdentityToken: "9cbaf023786cd7..." + 204: + description: "No error" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "authConfig" + in: "body" + description: "Authentication to check" + schema: + $ref: "#/definitions/AuthConfig" + tags: ["System"] + /info: + get: + summary: "Get system information" + operationId: "SystemInfo" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + $ref: "#/definitions/SystemInfo" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["System"] + /version: + get: + summary: "Get version" + description: "Returns the version of Docker that is running and various information about the system that Docker is running on." + operationId: "SystemVersion" + produces: ["application/json"] + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/SystemVersion" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["System"] + /_ping: + get: + summary: "Ping" + description: "This is a dummy endpoint you can use to test if the server is accessible." + operationId: "SystemPing" + produces: ["text/plain"] + responses: + 200: + description: "no error" + schema: + type: "string" + example: "OK" + headers: + API-Version: + type: "string" + description: "Max API Version the server supports" + Builder-Version: + type: "string" + description: "Default version of docker image builder" + Docker-Experimental: + type: "boolean" + description: "If the server is running with experimental mode enabled" + Cache-Control: + type: "string" + default: "no-cache, no-store, must-revalidate" + Pragma: + type: "string" + default: "no-cache" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + headers: + Cache-Control: + type: "string" + default: "no-cache, no-store, must-revalidate" + Pragma: + type: "string" + default: "no-cache" + tags: ["System"] + head: + summary: "Ping" + description: "This is a dummy endpoint you can use to test if the server is accessible." + operationId: "SystemPingHead" + produces: ["text/plain"] + responses: + 200: + description: "no error" + schema: + type: "string" + example: "(empty)" + headers: + API-Version: + type: "string" + description: "Max API Version the server supports" + Builder-Version: + type: "string" + description: "Default version of docker image builder" + Docker-Experimental: + type: "boolean" + description: "If the server is running with experimental mode enabled" + Cache-Control: + type: "string" + default: "no-cache, no-store, must-revalidate" + Pragma: + type: "string" + default: "no-cache" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["System"] + /commit: + post: + summary: "Create a new image from a container" + operationId: "ImageCommit" + consumes: + - "application/json" + produces: + - "application/json" + responses: + 201: + description: "no error" + schema: + $ref: "#/definitions/IdResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "containerConfig" + in: "body" + description: "The container configuration" + schema: + $ref: "#/definitions/ContainerConfig" + - name: "container" + in: "query" + description: "The ID or name of the container to commit" + type: "string" + - name: "repo" + in: "query" + description: "Repository name for the created image" + type: "string" + - name: "tag" + in: "query" + description: "Tag name for the create image" + type: "string" + - name: "comment" + in: "query" + description: "Commit message" + type: "string" + - name: "author" + in: "query" + description: "Author of the image (e.g., `John Hannibal Smith `)" + type: "string" + - name: "pause" + in: "query" + description: "Whether to pause the container before committing" + type: "boolean" + default: true + - name: "changes" + in: "query" + description: "`Dockerfile` instructions to apply while committing" + type: "string" + tags: ["Image"] + /events: + get: + summary: "Monitor events" + description: | + Stream real-time events from the server. + + Various objects within Docker report events when something happens to them. + + Containers report these events: `attach`, `commit`, `copy`, `create`, `destroy`, `detach`, `die`, `exec_create`, `exec_detach`, `exec_start`, `exec_die`, `export`, `health_status`, `kill`, `oom`, `pause`, `rename`, `resize`, `restart`, `start`, `stop`, `top`, `unpause`, `update`, and `prune` + + Images report these events: `delete`, `import`, `load`, `pull`, `push`, `save`, `tag`, `untag`, and `prune` + + Volumes report these events: `create`, `mount`, `unmount`, `destroy`, and `prune` + + Networks report these events: `create`, `connect`, `disconnect`, `destroy`, `update`, `remove`, and `prune` + + The Docker daemon reports these events: `reload` + + Services report these events: `create`, `update`, and `remove` + + Nodes report these events: `create`, `update`, and `remove` + + Secrets report these events: `create`, `update`, and `remove` + + Configs report these events: `create`, `update`, and `remove` + + The Builder reports `prune` events + + operationId: "SystemEvents" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "object" + title: "SystemEventsResponse" + properties: + Type: + description: "The type of object emitting the event" + type: "string" + Action: + description: "The type of event" + type: "string" + Actor: + type: "object" + properties: + ID: + description: "The ID of the object emitting the event" + type: "string" + Attributes: + description: "Various key/value attributes of the object, depending on its type" + type: "object" + additionalProperties: + type: "string" + time: + description: "Timestamp of event" + type: "integer" + timeNano: + description: "Timestamp of event, with nanosecond accuracy" + type: "integer" + format: "int64" + examples: + application/json: + Type: "container" + Action: "create" + Actor: + ID: "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743" + Attributes: + com.example.some-label: "some-label-value" + image: "alpine" + name: "my-container" + time: 1461943101 + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "since" + in: "query" + description: "Show events created since this timestamp then stream new events." + type: "string" + - name: "until" + in: "query" + description: "Show events created until this timestamp then stop streaming." + type: "string" + - name: "filters" + in: "query" + description: | + A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters: + + - `config=` config name or ID + - `container=` container name or ID + - `daemon=` daemon name or ID + - `event=` event type + - `image=` image name or ID + - `label=` image or container label + - `network=` network name or ID + - `node=` node ID + - `plugin`= plugin name or ID + - `scope`= local or swarm + - `secret=` secret name or ID + - `service=` service name or ID + - `type=` object to filter by, one of `container`, `image`, `volume`, `network`, `daemon`, `plugin`, `node`, `service`, `secret` or `config` + - `volume=` volume name + type: "string" + tags: ["System"] + /system/df: + get: + summary: "Get data usage information" + operationId: "SystemDataUsage" + responses: + 200: + description: "no error" + schema: + type: "object" + title: "SystemDataUsageResponse" + properties: + LayersSize: + type: "integer" + format: "int64" + Images: + type: "array" + items: + $ref: "#/definitions/ImageSummary" + Containers: + type: "array" + items: + $ref: "#/definitions/ContainerSummary" + Volumes: + type: "array" + items: + $ref: "#/definitions/Volume" + BuildCache: + type: "array" + items: + $ref: "#/definitions/BuildCache" + example: + LayersSize: 1092588 + Images: + - + Id: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749" + ParentId: "" + RepoTags: + - "busybox:latest" + RepoDigests: + - "busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6" + Created: 1466724217 + Size: 1092588 + SharedSize: 0 + VirtualSize: 1092588 + Labels: {} + Containers: 1 + Containers: + - + Id: "e575172ed11dc01bfce087fb27bee502db149e1a0fad7c296ad300bbff178148" + Names: + - "/top" + Image: "busybox" + ImageID: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749" + Command: "top" + Created: 1472592424 + Ports: [] + SizeRootFs: 1092588 + Labels: {} + State: "exited" + Status: "Exited (0) 56 minutes ago" + HostConfig: + NetworkMode: "default" + NetworkSettings: + Networks: + bridge: + IPAMConfig: null + Links: null + Aliases: null + NetworkID: "d687bc59335f0e5c9ee8193e5612e8aee000c8c62ea170cfb99c098f95899d92" + EndpointID: "8ed5115aeaad9abb174f68dcf135b49f11daf597678315231a32ca28441dec6a" + Gateway: "172.18.0.1" + IPAddress: "172.18.0.2" + IPPrefixLen: 16 + IPv6Gateway: "" + GlobalIPv6Address: "" + GlobalIPv6PrefixLen: 0 + MacAddress: "02:42:ac:12:00:02" + Mounts: [] + Volumes: + - + Name: "my-volume" + Driver: "local" + Mountpoint: "/var/lib/docker/volumes/my-volume/_data" + Labels: null + Scope: "local" + Options: null + UsageData: + Size: 10920104 + RefCount: 2 + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["System"] + /images/{name}/get: + get: + summary: "Export an image" + description: | + Get a tarball containing all images and metadata for a repository. + + If `name` is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned. If `name` is an image ID, similarly only that image (and its parents) are returned, but with the exclusion of the `repositories` file in the tarball, as there were no image names referenced. + + ### Image tarball format + + An image tarball contains one directory per image layer (named using its long ID), each containing these files: + + - `VERSION`: currently `1.0` - the file format version + - `json`: detailed layer information, similar to `docker inspect layer_id` + - `layer.tar`: A tarfile containing the filesystem changes in this layer + + The `layer.tar` file contains `aufs` style `.wh..wh.aufs` files and directories for storing attribute changes and deletions. + + If the tarball defines a repository, the tarball should also include a `repositories` file at the root that contains a list of repository and tag names mapped to layer IDs. + + ```json + { + "hello-world": { + "latest": "565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1" + } + } + ``` + operationId: "ImageGet" + produces: + - "application/x-tar" + responses: + 200: + description: "no error" + schema: + type: "string" + format: "binary" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or ID" + type: "string" + required: true + tags: ["Image"] + /images/get: + get: + summary: "Export several images" + description: | + Get a tarball containing all images and metadata for several image + repositories. + + For each value of the `names` parameter: if it is a specific name and + tag (e.g. `ubuntu:latest`), then only that image (and its parents) are + returned; if it is an image ID, similarly only that image (and its parents) + are returned and there would be no names referenced in the 'repositories' + file for this image ID. + + For details on the format, see the [export image endpoint](#operation/ImageGet). + operationId: "ImageGetAll" + produces: + - "application/x-tar" + responses: + 200: + description: "no error" + schema: + type: "string" + format: "binary" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "names" + in: "query" + description: "Image names to filter by" + type: "array" + items: + type: "string" + tags: ["Image"] + /images/load: + post: + summary: "Import images" + description: | + Load a set of images and tags into a repository. + + For details on the format, see the [export image endpoint](#operation/ImageGet). + operationId: "ImageLoad" + consumes: + - "application/x-tar" + produces: + - "application/json" + responses: + 200: + description: "no error" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "imagesTarball" + in: "body" + description: "Tar archive containing images" + schema: + type: "string" + format: "binary" + - name: "quiet" + in: "query" + description: "Suppress progress details during load." + type: "boolean" + default: false + tags: ["Image"] + /containers/{id}/exec: + post: + summary: "Create an exec instance" + description: "Run a command inside a running container." + operationId: "ContainerExec" + consumes: + - "application/json" + produces: + - "application/json" + responses: + 201: + description: "no error" + schema: + $ref: "#/definitions/IdResponse" + 404: + description: "no such container" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such container: c2ada9df5af8" + 409: + description: "container is paused" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "execConfig" + in: "body" + description: "Exec configuration" + schema: + type: "object" + properties: + AttachStdin: + type: "boolean" + description: "Attach to `stdin` of the exec command." + AttachStdout: + type: "boolean" + description: "Attach to `stdout` of the exec command." + AttachStderr: + type: "boolean" + description: "Attach to `stderr` of the exec command." + DetachKeys: + type: "string" + description: | + Override the key sequence for detaching a container. Format is + a single character `[a-Z]` or `ctrl-` where `` + is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. + Tty: + type: "boolean" + description: "Allocate a pseudo-TTY." + Env: + description: | + A list of environment variables in the form `["VAR=value", ...]`. + type: "array" + items: + type: "string" + Cmd: + type: "array" + description: "Command to run, as a string or array of strings." + items: + type: "string" + Privileged: + type: "boolean" + description: "Runs the exec process with extended privileges." + default: false + User: + type: "string" + description: | + The user, and optionally, group to run the exec process inside + the container. Format is one of: `user`, `user:group`, `uid`, + or `uid:gid`. + WorkingDir: + type: "string" + description: | + The working directory for the exec process inside the container. + example: + AttachStdin: false + AttachStdout: true + AttachStderr: true + DetachKeys: "ctrl-p,ctrl-q" + Tty: false + Cmd: + - "date" + Env: + - "FOO=bar" + - "BAZ=quux" + required: true + - name: "id" + in: "path" + description: "ID or name of container" + type: "string" + required: true + tags: ["Exec"] + /exec/{id}/start: + post: + summary: "Start an exec instance" + description: | + Starts a previously set up exec instance. If detach is true, this endpoint + returns immediately after starting the command. Otherwise, it sets up an + interactive session with the command. + operationId: "ExecStart" + consumes: + - "application/json" + produces: + - "application/vnd.docker.raw-stream" + responses: + 200: + description: "No error" + 404: + description: "No such exec instance" + schema: + $ref: "#/definitions/ErrorResponse" + 409: + description: "Container is stopped or paused" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "execStartConfig" + in: "body" + schema: + type: "object" + properties: + Detach: + type: "boolean" + description: "Detach from the command." + Tty: + type: "boolean" + description: "Allocate a pseudo-TTY." + example: + Detach: false + Tty: false + - name: "id" + in: "path" + description: "Exec instance ID" + required: true + type: "string" + tags: ["Exec"] + /exec/{id}/resize: + post: + summary: "Resize an exec instance" + description: | + Resize the TTY session used by an exec instance. This endpoint only works + if `tty` was specified as part of creating and starting the exec instance. + operationId: "ExecResize" + responses: + 201: + description: "No error" + 404: + description: "No such exec instance" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Exec instance ID" + required: true + type: "string" + - name: "h" + in: "query" + description: "Height of the TTY session in characters" + type: "integer" + - name: "w" + in: "query" + description: "Width of the TTY session in characters" + type: "integer" + tags: ["Exec"] + /exec/{id}/json: + get: + summary: "Inspect an exec instance" + description: "Return low-level information about an exec instance." + operationId: "ExecInspect" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + type: "object" + title: "ExecInspectResponse" + properties: + CanRemove: + type: "boolean" + DetachKeys: + type: "string" + ID: + type: "string" + Running: + type: "boolean" + ExitCode: + type: "integer" + ProcessConfig: + $ref: "#/definitions/ProcessConfig" + OpenStdin: + type: "boolean" + OpenStderr: + type: "boolean" + OpenStdout: + type: "boolean" + ContainerID: + type: "string" + Pid: + type: "integer" + description: "The system process ID for the exec process." + examples: + application/json: + CanRemove: false + ContainerID: "b53ee82b53a40c7dca428523e34f741f3abc51d9f297a14ff874bf761b995126" + DetachKeys: "" + ExitCode: 2 + ID: "f33bbfb39f5b142420f4759b2348913bd4a8d1a6d7fd56499cb41a1bb91d7b3b" + OpenStderr: true + OpenStdin: true + OpenStdout: true + ProcessConfig: + arguments: + - "-c" + - "exit 2" + entrypoint: "sh" + privileged: false + tty: true + user: "1000" + Running: false + Pid: 42000 + 404: + description: "No such exec instance" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Exec instance ID" + required: true + type: "string" + tags: ["Exec"] + + /volumes: + get: + summary: "List volumes" + operationId: "VolumeList" + produces: ["application/json"] + responses: + 200: + description: "Summary volume data that matches the query" + schema: + type: "object" + title: "VolumeListResponse" + description: "Volume list response" + required: [Volumes, Warnings] + properties: + Volumes: + type: "array" + x-nullable: false + description: "List of volumes" + items: + $ref: "#/definitions/Volume" + Warnings: + type: "array" + x-nullable: false + description: | + Warnings that occurred when fetching the list of volumes. + items: + type: "string" + + examples: + application/json: + Volumes: + - CreatedAt: "2017-07-19T12:00:26Z" + Name: "tardis" + Driver: "local" + Mountpoint: "/var/lib/docker/volumes/tardis" + Labels: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + Scope: "local" + Options: + device: "tmpfs" + o: "size=100m,uid=1000" + type: "tmpfs" + Warnings: [] + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + description: | + JSON encoded value of the filters (a `map[string][]string`) to + process on the volumes list. Available filters: + + - `dangling=` When set to `true` (or `1`), returns all + volumes that are not in use by a container. When set to `false` + (or `0`), only volumes that are in use by one or more + containers are returned. + - `driver=` Matches volumes based on their driver. + - `label=` or `label=:` Matches volumes based on + the presence of a `label` alone or a `label` and a value. + - `name=` Matches all or part of a volume name. + type: "string" + format: "json" + tags: ["Volume"] + + /volumes/create: + post: + summary: "Create a volume" + operationId: "VolumeCreate" + consumes: ["application/json"] + produces: ["application/json"] + responses: + 201: + description: "The volume was created successfully" + schema: + $ref: "#/definitions/Volume" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "volumeConfig" + in: "body" + required: true + description: "Volume configuration" + schema: + type: "object" + description: "Volume configuration" + title: "VolumeConfig" + properties: + Name: + description: | + The new volume's name. If not specified, Docker generates a name. + type: "string" + x-nullable: false + Driver: + description: "Name of the volume driver to use." + type: "string" + default: "local" + x-nullable: false + DriverOpts: + description: | + A mapping of driver options and values. These options are + passed directly to the driver and are driver specific. + type: "object" + additionalProperties: + type: "string" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + example: + Name: "tardis" + Labels: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + Driver: "custom" + tags: ["Volume"] + + /volumes/{name}: + get: + summary: "Inspect a volume" + operationId: "VolumeInspect" + produces: ["application/json"] + responses: + 200: + description: "No error" + schema: + $ref: "#/definitions/Volume" + 404: + description: "No such volume" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + required: true + description: "Volume name or ID" + type: "string" + tags: ["Volume"] + + delete: + summary: "Remove a volume" + description: "Instruct the driver to remove the volume." + operationId: "VolumeDelete" + responses: + 204: + description: "The volume was removed" + 404: + description: "No such volume or volume driver" + schema: + $ref: "#/definitions/ErrorResponse" + 409: + description: "Volume is in use and cannot be removed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + required: true + description: "Volume name or ID" + type: "string" + - name: "force" + in: "query" + description: "Force the removal of the volume" + type: "boolean" + default: false + tags: ["Volume"] + /volumes/prune: + post: + summary: "Delete unused volumes" + produces: + - "application/json" + operationId: "VolumePrune" + parameters: + - name: "filters" + in: "query" + description: | + Filters to process on the prune list, encoded as JSON (a `map[string][]string`). + + Available filters: + - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune volumes with (or without, in case `label!=...` is used) the specified labels. + type: "string" + responses: + 200: + description: "No error" + schema: + type: "object" + title: "VolumePruneResponse" + properties: + VolumesDeleted: + description: "Volumes that were deleted" + type: "array" + items: + type: "string" + SpaceReclaimed: + description: "Disk space reclaimed in bytes" + type: "integer" + format: "int64" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Volume"] + /networks: + get: + summary: "List networks" + description: | + Returns a list of networks. For details on the format, see the + [network inspect endpoint](#operation/NetworkInspect). + + Note that it uses a different, smaller representation of a network than + inspecting a single network. For example, the list of containers attached + to the network is not propagated in API versions 1.28 and up. + operationId: "NetworkList" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + type: "array" + items: + $ref: "#/definitions/Network" + examples: + application/json: + - Name: "bridge" + Id: "f2de39df4171b0dc801e8002d1d999b77256983dfc63041c0f34030aa3977566" + Created: "2016-10-19T06:21:00.416543526Z" + Scope: "local" + Driver: "bridge" + EnableIPv6: false + Internal: false + Attachable: false + Ingress: false + IPAM: + Driver: "default" + Config: + - + Subnet: "172.17.0.0/16" + Options: + com.docker.network.bridge.default_bridge: "true" + com.docker.network.bridge.enable_icc: "true" + com.docker.network.bridge.enable_ip_masquerade: "true" + com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" + com.docker.network.bridge.name: "docker0" + com.docker.network.driver.mtu: "1500" + - Name: "none" + Id: "e086a3893b05ab69242d3c44e49483a3bbbd3a26b46baa8f61ab797c1088d794" + Created: "0001-01-01T00:00:00Z" + Scope: "local" + Driver: "null" + EnableIPv6: false + Internal: false + Attachable: false + Ingress: false + IPAM: + Driver: "default" + Config: [] + Containers: {} + Options: {} + - Name: "host" + Id: "13e871235c677f196c4e1ecebb9dc733b9b2d2ab589e30c539efeda84a24215e" + Created: "0001-01-01T00:00:00Z" + Scope: "local" + Driver: "host" + EnableIPv6: false + Internal: false + Attachable: false + Ingress: false + IPAM: + Driver: "default" + Config: [] + Containers: {} + Options: {} + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + description: | + JSON encoded value of the filters (a `map[string][]string`) to process + on the networks list. + + Available filters: + + - `dangling=` When set to `true` (or `1`), returns all + networks that are not in use by a container. When set to `false` + (or `0`), only networks that are in use by one or more + containers are returned. + - `driver=` Matches a network's driver. + - `id=` Matches all or part of a network ID. + - `label=` or `label==` of a network label. + - `name=` Matches all or part of a network name. + - `scope=["swarm"|"global"|"local"]` Filters networks by scope (`swarm`, `global`, or `local`). + - `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks. + type: "string" + tags: ["Network"] + + /networks/{id}: + get: + summary: "Inspect a network" + operationId: "NetworkInspect" + produces: + - "application/json" + responses: + 200: + description: "No error" + schema: + $ref: "#/definitions/Network" + 404: + description: "Network not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Network ID or name" + required: true + type: "string" + - name: "verbose" + in: "query" + description: "Detailed inspect output for troubleshooting" + type: "boolean" + default: false + - name: "scope" + in: "query" + description: "Filter the network by scope (swarm, global, or local)" + type: "string" + tags: ["Network"] + + delete: + summary: "Remove a network" + operationId: "NetworkDelete" + responses: + 204: + description: "No error" + 403: + description: "operation not supported for pre-defined networks" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such network" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Network ID or name" + required: true + type: "string" + tags: ["Network"] + + /networks/create: + post: + summary: "Create a network" + operationId: "NetworkCreate" + consumes: + - "application/json" + produces: + - "application/json" + responses: + 201: + description: "No error" + schema: + type: "object" + title: "NetworkCreateResponse" + properties: + Id: + description: "The ID of the created network." + type: "string" + Warning: + type: "string" + example: + Id: "22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30" + Warning: "" + 403: + description: "operation not supported for pre-defined networks" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "plugin not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "networkConfig" + in: "body" + description: "Network configuration" + required: true + schema: + type: "object" + required: ["Name"] + properties: + Name: + description: "The network's name." + type: "string" + CheckDuplicate: + description: | + Check for networks with duplicate names. Since Network is + primarily keyed based on a random ID and not on the name, and + network name is strictly a user-friendly alias to the network + which is uniquely identified using ID, there is no guaranteed + way to check for duplicates. CheckDuplicate is there to provide + a best effort checking of any networks which has the same name + but it is not guaranteed to catch all name collisions. + type: "boolean" + Driver: + description: "Name of the network driver plugin to use." + type: "string" + default: "bridge" + Internal: + description: "Restrict external access to the network." + type: "boolean" + Attachable: + description: | + Globally scoped network is manually attachable by regular + containers from workers in swarm mode. + type: "boolean" + Ingress: + description: | + Ingress network is the network which provides the routing-mesh + in swarm mode. + type: "boolean" + IPAM: + description: "Optional custom IP scheme for the network." + $ref: "#/definitions/IPAM" + EnableIPv6: + description: "Enable IPv6 on the network." + type: "boolean" + Options: + description: "Network specific options to be used by the drivers." + type: "object" + additionalProperties: + type: "string" + Labels: + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + example: + Name: "isolated_nw" + CheckDuplicate: false + Driver: "bridge" + EnableIPv6: true + IPAM: + Driver: "default" + Config: + - Subnet: "172.20.0.0/16" + IPRange: "172.20.10.0/24" + Gateway: "172.20.10.11" + - Subnet: "2001:db8:abcd::/64" + Gateway: "2001:db8:abcd::1011" + Options: + foo: "bar" + Internal: true + Attachable: false + Ingress: false + Options: + com.docker.network.bridge.default_bridge: "true" + com.docker.network.bridge.enable_icc: "true" + com.docker.network.bridge.enable_ip_masquerade: "true" + com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" + com.docker.network.bridge.name: "docker0" + com.docker.network.driver.mtu: "1500" + Labels: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" + tags: ["Network"] + + /networks/{id}/connect: + post: + summary: "Connect a container to a network" + operationId: "NetworkConnect" + consumes: + - "application/json" + responses: + 200: + description: "No error" + 403: + description: "Operation not supported for swarm scoped networks" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "Network or container not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Network ID or name" + required: true + type: "string" + - name: "container" + in: "body" + required: true + schema: + type: "object" + properties: + Container: + type: "string" + description: "The ID or name of the container to connect to the network." + EndpointConfig: + $ref: "#/definitions/EndpointSettings" + example: + Container: "3613f73ba0e4" + EndpointConfig: + IPAMConfig: + IPv4Address: "172.24.56.89" + IPv6Address: "2001:db8::5689" + tags: ["Network"] + + /networks/{id}/disconnect: + post: + summary: "Disconnect a container from a network" + operationId: "NetworkDisconnect" + consumes: + - "application/json" + responses: + 200: + description: "No error" + 403: + description: "Operation not supported for swarm scoped networks" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "Network or container not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "Network ID or name" + required: true + type: "string" + - name: "container" + in: "body" + required: true + schema: + type: "object" + properties: + Container: + type: "string" + description: | + The ID or name of the container to disconnect from the network. + Force: + type: "boolean" + description: | + Force the container to disconnect from the network. + tags: ["Network"] + /networks/prune: + post: + summary: "Delete unused networks" + produces: + - "application/json" + operationId: "NetworkPrune" + parameters: + - name: "filters" + in: "query" + description: | + Filters to process on the prune list, encoded as JSON (a `map[string][]string`). + + Available filters: + - `until=` Prune networks created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. + - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune networks with (or without, in case `label!=...` is used) the specified labels. + type: "string" + responses: + 200: + description: "No error" + schema: + type: "object" + title: "NetworkPruneResponse" + properties: + NetworksDeleted: + description: "Networks that were deleted" + type: "array" + items: + type: "string" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Network"] + /plugins: + get: + summary: "List plugins" + operationId: "PluginList" + description: "Returns information about installed plugins." + produces: ["application/json"] + responses: + 200: + description: "No error" + schema: + type: "array" + items: + $ref: "#/definitions/Plugin" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + type: "string" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to + process on the plugin list. + + Available filters: + + - `capability=` + - `enable=|` + tags: ["Plugin"] + + /plugins/privileges: + get: + summary: "Get plugin privileges" + operationId: "GetPluginPrivileges" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + description: | + Describes a permission the user has to accept upon installing + the plugin. + type: "object" + title: "PluginPrivilegeItem" + properties: + Name: + type: "string" + Description: + type: "string" + Value: + type: "array" + items: + type: "string" + example: + - Name: "network" + Description: "" + Value: + - "host" + - Name: "mount" + Description: "" + Value: + - "/data" + - Name: "device" + Description: "" + Value: + - "/dev/cpu_dma_latency" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "remote" + in: "query" + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + type: "string" + tags: + - "Plugin" + + /plugins/pull: + post: + summary: "Install a plugin" + operationId: "PluginPull" + description: | + Pulls and installs a plugin. After the plugin is installed, it can be + enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable). + produces: + - "application/json" + responses: + 204: + description: "no error" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "remote" + in: "query" + description: | + Remote reference for plugin to install. + + The `:latest` tag is optional, and is used as the default if omitted. + required: true + type: "string" + - name: "name" + in: "query" + description: | + Local name for the pulled plugin. + + The `:latest` tag is optional, and is used as the default if omitted. + required: false + type: "string" + - name: "X-Registry-Auth" + in: "header" + description: | + A base64url-encoded auth configuration to use when pulling a plugin + from a registry. + + Refer to the [authentication section](#section/Authentication) for + details. + type: "string" + - name: "body" + in: "body" + schema: + type: "array" + items: + description: | + Describes a permission accepted by the user upon installing the + plugin. + type: "object" + properties: + Name: + type: "string" + Description: + type: "string" + Value: + type: "array" + items: + type: "string" + example: + - Name: "network" + Description: "" + Value: + - "host" + - Name: "mount" + Description: "" + Value: + - "/data" + - Name: "device" + Description: "" + Value: + - "/dev/cpu_dma_latency" + tags: ["Plugin"] + /plugins/{name}/json: + get: + summary: "Inspect a plugin" + operationId: "PluginInspect" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Plugin" + 404: + description: "plugin is not installed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + type: "string" + tags: ["Plugin"] + /plugins/{name}: + delete: + summary: "Remove a plugin" + operationId: "PluginDelete" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Plugin" + 404: + description: "plugin is not installed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + type: "string" + - name: "force" + in: "query" + description: | + Disable the plugin before removing. This may result in issues if the + plugin is in use by a container. + type: "boolean" + default: false + tags: ["Plugin"] + /plugins/{name}/enable: + post: + summary: "Enable a plugin" + operationId: "PluginEnable" + responses: + 200: + description: "no error" + 404: + description: "plugin is not installed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + type: "string" + - name: "timeout" + in: "query" + description: "Set the HTTP client timeout (in seconds)" + type: "integer" + default: 0 + tags: ["Plugin"] + /plugins/{name}/disable: + post: + summary: "Disable a plugin" + operationId: "PluginDisable" + responses: + 200: + description: "no error" + 404: + description: "plugin is not installed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + type: "string" + tags: ["Plugin"] + /plugins/{name}/upgrade: + post: + summary: "Upgrade a plugin" + operationId: "PluginUpgrade" + responses: + 204: + description: "no error" + 404: + description: "plugin not installed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + type: "string" + - name: "remote" + in: "query" + description: | + Remote reference to upgrade to. + + The `:latest` tag is optional, and is used as the default if omitted. + required: true + type: "string" + - name: "X-Registry-Auth" + in: "header" + description: | + A base64url-encoded auth configuration to use when pulling a plugin + from a registry. + + Refer to the [authentication section](#section/Authentication) for + details. + type: "string" + - name: "body" + in: "body" + schema: + type: "array" + items: + description: | + Describes a permission accepted by the user upon installing the + plugin. + type: "object" + properties: + Name: + type: "string" + Description: + type: "string" + Value: + type: "array" + items: + type: "string" + example: + - Name: "network" + Description: "" + Value: + - "host" + - Name: "mount" + Description: "" + Value: + - "/data" + - Name: "device" + Description: "" + Value: + - "/dev/cpu_dma_latency" + tags: ["Plugin"] + /plugins/create: + post: + summary: "Create a plugin" + operationId: "PluginCreate" + consumes: + - "application/x-tar" + responses: + 204: + description: "no error" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "query" + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + type: "string" + - name: "tarContext" + in: "body" + description: "Path to tar containing plugin rootfs and manifest" + schema: + type: "string" + format: "binary" + tags: ["Plugin"] + /plugins/{name}/push: + post: + summary: "Push a plugin" + operationId: "PluginPush" + description: | + Push a plugin to the registry. + parameters: + - name: "name" + in: "path" + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + type: "string" + responses: + 200: + description: "no error" + 404: + description: "plugin not installed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Plugin"] + /plugins/{name}/set: + post: + summary: "Configure a plugin" + operationId: "PluginSet" + consumes: + - "application/json" + parameters: + - name: "name" + in: "path" + description: | + The name of the plugin. The `:latest` tag is optional, and is the + default if omitted. + required: true + type: "string" + - name: "body" + in: "body" + schema: + type: "array" + items: + type: "string" + example: ["DEBUG=1"] + responses: + 204: + description: "No error" + 404: + description: "Plugin not installed" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Plugin"] + /nodes: + get: + summary: "List nodes" + operationId: "NodeList" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + $ref: "#/definitions/Node" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + description: | + Filters to process on the nodes list, encoded as JSON (a `map[string][]string`). + + Available filters: + - `id=` + - `label=` + - `membership=`(`accepted`|`pending`)` + - `name=` + - `node.label=` + - `role=`(`manager`|`worker`)` + type: "string" + tags: ["Node"] + /nodes/{id}: + get: + summary: "Inspect a node" + operationId: "NodeInspect" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Node" + 404: + description: "no such node" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "The ID or name of the node" + type: "string" + required: true + tags: ["Node"] + delete: + summary: "Delete a node" + operationId: "NodeDelete" + responses: + 200: + description: "no error" + 404: + description: "no such node" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "The ID or name of the node" + type: "string" + required: true + - name: "force" + in: "query" + description: "Force remove a node from the swarm" + default: false + type: "boolean" + tags: ["Node"] + /nodes/{id}/update: + post: + summary: "Update a node" + operationId: "NodeUpdate" + responses: + 200: + description: "no error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such node" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "The ID of the node" + type: "string" + required: true + - name: "body" + in: "body" + schema: + $ref: "#/definitions/NodeSpec" + - name: "version" + in: "query" + description: | + The version number of the node object being updated. This is required + to avoid conflicting writes. + type: "integer" + format: "int64" + required: true + tags: ["Node"] + /swarm: + get: + summary: "Inspect swarm" + operationId: "SwarmInspect" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Swarm" + 404: + description: "no such swarm" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Swarm"] + /swarm/init: + post: + summary: "Initialize a new swarm" + operationId: "SwarmInit" + produces: + - "application/json" + - "text/plain" + responses: + 200: + description: "no error" + schema: + description: "The node ID" + type: "string" + example: "7v2t30z9blmxuhnyo6s4cpenp" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is already part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "body" + in: "body" + required: true + schema: + type: "object" + properties: + ListenAddr: + description: | + Listen address used for inter-manager communication, as well + as determining the networking interface used for the VXLAN + Tunnel Endpoint (VTEP). This can either be an address/port + combination in the form `192.168.1.1:4567`, or an interface + followed by a port number, like `eth0:4567`. If the port number + is omitted, the default swarm listening port is used. + type: "string" + AdvertiseAddr: + description: | + Externally reachable address advertised to other nodes. This + can either be an address/port combination in the form + `192.168.1.1:4567`, or an interface followed by a port number, + like `eth0:4567`. If the port number is omitted, the port + number from the listen address is used. If `AdvertiseAddr` is + not specified, it will be automatically detected when possible. + type: "string" + DataPathAddr: + description: | + Address or interface to use for data path traffic (format: + ``), for example, `192.168.1.1`, or an interface, + like `eth0`. If `DataPathAddr` is unspecified, the same address + as `AdvertiseAddr` is used. + + The `DataPathAddr` specifies the address that global scope + network drivers will publish towards other nodes in order to + reach the containers running on this node. Using this parameter + it is possible to separate the container data traffic from the + management traffic of the cluster. + type: "string" + DataPathPort: + description: | + DataPathPort specifies the data path port number for data traffic. + Acceptable port range is 1024 to 49151. + if no port is set or is set to 0, default port 4789 will be used. + type: "integer" + format: "uint32" + DefaultAddrPool: + description: | + Default Address Pool specifies default subnet pools for global + scope networks. + type: "array" + items: + type: "string" + example: ["10.10.0.0/16", "20.20.0.0/16"] + ForceNewCluster: + description: "Force creation of a new swarm." + type: "boolean" + SubnetSize: + description: | + SubnetSize specifies the subnet size of the networks created + from the default subnet pool. + type: "integer" + format: "uint32" + Spec: + $ref: "#/definitions/SwarmSpec" + example: + ListenAddr: "0.0.0.0:2377" + AdvertiseAddr: "192.168.1.1:2377" + DataPathPort: 4789 + DefaultAddrPool: ["10.10.0.0/8", "20.20.0.0/8"] + SubnetSize: 24 + ForceNewCluster: false + Spec: + Orchestration: {} + Raft: {} + Dispatcher: {} + CAConfig: {} + EncryptionConfig: + AutoLockManagers: false + tags: ["Swarm"] + /swarm/join: + post: + summary: "Join an existing swarm" + operationId: "SwarmJoin" + responses: + 200: + description: "no error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is already part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "body" + in: "body" + required: true + schema: + type: "object" + properties: + ListenAddr: + description: | + Listen address used for inter-manager communication if the node + gets promoted to manager, as well as determining the networking + interface used for the VXLAN Tunnel Endpoint (VTEP). + type: "string" + AdvertiseAddr: + description: | + Externally reachable address advertised to other nodes. This + can either be an address/port combination in the form + `192.168.1.1:4567`, or an interface followed by a port number, + like `eth0:4567`. If the port number is omitted, the port + number from the listen address is used. If `AdvertiseAddr` is + not specified, it will be automatically detected when possible. + type: "string" + DataPathAddr: + description: | + Address or interface to use for data path traffic (format: + ``), for example, `192.168.1.1`, or an interface, + like `eth0`. If `DataPathAddr` is unspecified, the same addres + as `AdvertiseAddr` is used. + + The `DataPathAddr` specifies the address that global scope + network drivers will publish towards other nodes in order to + reach the containers running on this node. Using this parameter + it is possible to separate the container data traffic from the + management traffic of the cluster. + + type: "string" + RemoteAddrs: + description: | + Addresses of manager nodes already participating in the swarm. + type: "array" + items: + type: "string" + JoinToken: + description: "Secret token for joining this swarm." + type: "string" + example: + ListenAddr: "0.0.0.0:2377" + AdvertiseAddr: "192.168.1.1:2377" + RemoteAddrs: + - "node1:2377" + JoinToken: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2" + tags: ["Swarm"] + /swarm/leave: + post: + summary: "Leave a swarm" + operationId: "SwarmLeave" + responses: + 200: + description: "no error" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "force" + description: | + Force leave swarm, even if this is the last manager or that it will + break the cluster. + in: "query" + type: "boolean" + default: false + tags: ["Swarm"] + /swarm/update: + post: + summary: "Update a swarm" + operationId: "SwarmUpdate" + responses: + 200: + description: "no error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "body" + in: "body" + required: true + schema: + $ref: "#/definitions/SwarmSpec" + - name: "version" + in: "query" + description: | + The version number of the swarm object being updated. This is + required to avoid conflicting writes. + type: "integer" + format: "int64" + required: true + - name: "rotateWorkerToken" + in: "query" + description: "Rotate the worker join token." + type: "boolean" + default: false + - name: "rotateManagerToken" + in: "query" + description: "Rotate the manager join token." + type: "boolean" + default: false + - name: "rotateManagerUnlockKey" + in: "query" + description: "Rotate the manager unlock key." + type: "boolean" + default: false + tags: ["Swarm"] + /swarm/unlockkey: + get: + summary: "Get the unlock key" + operationId: "SwarmUnlockkey" + consumes: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "object" + title: "UnlockKeyResponse" + properties: + UnlockKey: + description: "The swarm's unlock key." + type: "string" + example: + UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Swarm"] + /swarm/unlock: + post: + summary: "Unlock a locked manager" + operationId: "SwarmUnlock" + consumes: + - "application/json" + produces: + - "application/json" + parameters: + - name: "body" + in: "body" + required: true + schema: + type: "object" + properties: + UnlockKey: + description: "The swarm's unlock key." + type: "string" + example: + UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8" + responses: + 200: + description: "no error" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Swarm"] + /services: + get: + summary: "List services" + operationId: "ServiceList" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + $ref: "#/definitions/Service" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + type: "string" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to + process on the services list. + + Available filters: + + - `id=` + - `label=` + - `mode=["replicated"|"global"]` + - `name=` + - name: "status" + in: "query" + type: "boolean" + description: | + Include service status, with count of running and desired tasks. + tags: ["Service"] + /services/create: + post: + summary: "Create a service" + operationId: "ServiceCreate" + consumes: + - "application/json" + produces: + - "application/json" + responses: + 201: + description: "no error" + schema: + type: "object" + title: "ServiceCreateResponse" + properties: + ID: + description: "The ID of the created service." + type: "string" + Warning: + description: "Optional warning message" + type: "string" + example: + ID: "ak7w3gjqoa3kuz8xcpnyy0pvl" + Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 403: + description: "network is not eligible for services" + schema: + $ref: "#/definitions/ErrorResponse" + 409: + description: "name conflicts with an existing service" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "body" + in: "body" + required: true + schema: + allOf: + - $ref: "#/definitions/ServiceSpec" + - type: "object" + example: + Name: "web" + TaskTemplate: + ContainerSpec: + Image: "nginx:alpine" + Mounts: + - + ReadOnly: true + Source: "web-data" + Target: "/usr/share/nginx/html" + Type: "volume" + VolumeOptions: + DriverConfig: {} + Labels: + com.example.something: "something-value" + Hosts: ["10.10.10.10 host1", "ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 host2"] + User: "33" + DNSConfig: + Nameservers: ["8.8.8.8"] + Search: ["example.org"] + Options: ["timeout:3"] + Secrets: + - + File: + Name: "www.example.org.key" + UID: "33" + GID: "33" + Mode: 384 + SecretID: "fpjqlhnwb19zds35k8wn80lq9" + SecretName: "example_org_domain_key" + LogDriver: + Name: "json-file" + Options: + max-file: "3" + max-size: "10M" + Placement: {} + Resources: + Limits: + MemoryBytes: 104857600 + Reservations: {} + RestartPolicy: + Condition: "on-failure" + Delay: 10000000000 + MaxAttempts: 10 + Mode: + Replicated: + Replicas: 4 + UpdateConfig: + Parallelism: 2 + Delay: 1000000000 + FailureAction: "pause" + Monitor: 15000000000 + MaxFailureRatio: 0.15 + RollbackConfig: + Parallelism: 1 + Delay: 1000000000 + FailureAction: "pause" + Monitor: 15000000000 + MaxFailureRatio: 0.15 + EndpointSpec: + Ports: + - + Protocol: "tcp" + PublishedPort: 8080 + TargetPort: 80 + Labels: + foo: "bar" + - name: "X-Registry-Auth" + in: "header" + description: | + A base64url-encoded auth configuration for pulling from private + registries. + + Refer to the [authentication section](#section/Authentication) for + details. + type: "string" + tags: ["Service"] + /services/{id}: + get: + summary: "Inspect a service" + operationId: "ServiceInspect" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Service" + 404: + description: "no such service" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "ID or name of service." + required: true + type: "string" + - name: "insertDefaults" + in: "query" + description: "Fill empty fields with default values." + type: "boolean" + default: false + tags: ["Service"] + delete: + summary: "Delete a service" + operationId: "ServiceDelete" + responses: + 200: + description: "no error" + 404: + description: "no such service" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "ID or name of service." + required: true + type: "string" + tags: ["Service"] + /services/{id}/update: + post: + summary: "Update a service" + operationId: "ServiceUpdate" + consumes: ["application/json"] + produces: ["application/json"] + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/ServiceUpdateResponse" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such service" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "ID or name of service." + required: true + type: "string" + - name: "body" + in: "body" + required: true + schema: + allOf: + - $ref: "#/definitions/ServiceSpec" + - type: "object" + example: + Name: "top" + TaskTemplate: + ContainerSpec: + Image: "busybox" + Args: + - "top" + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: "any" + MaxAttempts: 0 + Placement: {} + ForceUpdate: 0 + Mode: + Replicated: + Replicas: 1 + UpdateConfig: + Parallelism: 2 + Delay: 1000000000 + FailureAction: "pause" + Monitor: 15000000000 + MaxFailureRatio: 0.15 + RollbackConfig: + Parallelism: 1 + Delay: 1000000000 + FailureAction: "pause" + Monitor: 15000000000 + MaxFailureRatio: 0.15 + EndpointSpec: + Mode: "vip" + + - name: "version" + in: "query" + description: | + The version number of the service object being updated. This is + required to avoid conflicting writes. + This version number should be the value as currently set on the + service *before* the update. You can find the current version by + calling `GET /services/{id}` + required: true + type: "integer" + - name: "registryAuthFrom" + in: "query" + description: | + If the `X-Registry-Auth` header is not specified, this parameter + indicates where to find registry authorization credentials. + type: "string" + enum: ["spec", "previous-spec"] + default: "spec" + - name: "rollback" + in: "query" + description: | + Set to this parameter to `previous` to cause a server-side rollback + to the previous service spec. The supplied spec will be ignored in + this case. + type: "string" + - name: "X-Registry-Auth" + in: "header" + description: | + A base64url-encoded auth configuration for pulling from private + registries. + + Refer to the [authentication section](#section/Authentication) for + details. + type: "string" + + tags: ["Service"] + /services/{id}/logs: + get: + summary: "Get service logs" + description: | + Get `stdout` and `stderr` logs from a service. See also + [`/containers/{id}/logs`](#operation/ContainerLogs). + + **Note**: This endpoint works only for services with the `local`, + `json-file` or `journald` logging drivers. + operationId: "ServiceLogs" + responses: + 200: + description: "logs returned as a stream in response body" + schema: + type: "string" + format: "binary" + 404: + description: "no such service" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such service: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID or name of the service" + type: "string" + - name: "details" + in: "query" + description: "Show service context and extra details provided to logs." + type: "boolean" + default: false + - name: "follow" + in: "query" + description: "Keep connection after returning logs." + type: "boolean" + default: false + - name: "stdout" + in: "query" + description: "Return logs from `stdout`" + type: "boolean" + default: false + - name: "stderr" + in: "query" + description: "Return logs from `stderr`" + type: "boolean" + default: false + - name: "since" + in: "query" + description: "Only return logs since this time, as a UNIX timestamp" + type: "integer" + default: 0 + - name: "timestamps" + in: "query" + description: "Add timestamps to every log line" + type: "boolean" + default: false + - name: "tail" + in: "query" + description: | + Only return this number of log lines from the end of the logs. + Specify as an integer or `all` to output all log lines. + type: "string" + default: "all" + tags: ["Service"] + /tasks: + get: + summary: "List tasks" + operationId: "TaskList" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + $ref: "#/definitions/Task" + example: + - ID: "0kzzo1i0y4jz6027t0k7aezc7" + Version: + Index: 71 + CreatedAt: "2016-06-07T21:07:31.171892745Z" + UpdatedAt: "2016-06-07T21:07:31.376370513Z" + Spec: + ContainerSpec: + Image: "redis" + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: "any" + MaxAttempts: 0 + Placement: {} + ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" + Slot: 1 + NodeID: "60gvrl6tm78dmak4yl7srz94v" + Status: + Timestamp: "2016-06-07T21:07:31.290032978Z" + State: "running" + Message: "started" + ContainerStatus: + ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035" + PID: 677 + DesiredState: "running" + NetworksAttachments: + - Network: + ID: "4qvuz4ko70xaltuqbt8956gd1" + Version: + Index: 18 + CreatedAt: "2016-06-07T20:31:11.912919752Z" + UpdatedAt: "2016-06-07T21:07:29.955277358Z" + Spec: + Name: "ingress" + Labels: + com.docker.swarm.internal: "true" + DriverConfiguration: {} + IPAMOptions: + Driver: {} + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + DriverState: + Name: "overlay" + Options: + com.docker.network.driver.overlay.vxlanid_list: "256" + IPAMOptions: + Driver: + Name: "default" + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + Addresses: + - "10.255.0.10/16" + - ID: "1yljwbmlr8er2waf8orvqpwms" + Version: + Index: 30 + CreatedAt: "2016-06-07T21:07:30.019104782Z" + UpdatedAt: "2016-06-07T21:07:30.231958098Z" + Name: "hopeful_cori" + Spec: + ContainerSpec: + Image: "redis" + Resources: + Limits: {} + Reservations: {} + RestartPolicy: + Condition: "any" + MaxAttempts: 0 + Placement: {} + ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" + Slot: 1 + NodeID: "60gvrl6tm78dmak4yl7srz94v" + Status: + Timestamp: "2016-06-07T21:07:30.202183143Z" + State: "shutdown" + Message: "shutdown" + ContainerStatus: + ContainerID: "1cf8d63d18e79668b0004a4be4c6ee58cddfad2dae29506d8781581d0688a213" + DesiredState: "shutdown" + NetworksAttachments: + - Network: + ID: "4qvuz4ko70xaltuqbt8956gd1" + Version: + Index: 18 + CreatedAt: "2016-06-07T20:31:11.912919752Z" + UpdatedAt: "2016-06-07T21:07:29.955277358Z" + Spec: + Name: "ingress" + Labels: + com.docker.swarm.internal: "true" + DriverConfiguration: {} + IPAMOptions: + Driver: {} + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + DriverState: + Name: "overlay" + Options: + com.docker.network.driver.overlay.vxlanid_list: "256" + IPAMOptions: + Driver: + Name: "default" + Configs: + - Subnet: "10.255.0.0/16" + Gateway: "10.255.0.1" + Addresses: + - "10.255.0.5/16" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + type: "string" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to + process on the tasks list. + + Available filters: + + - `desired-state=(running | shutdown | accepted)` + - `id=` + - `label=key` or `label="key=value"` + - `name=` + - `node=` + - `service=` + tags: ["Task"] + /tasks/{id}: + get: + summary: "Inspect a task" + operationId: "TaskInspect" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Task" + 404: + description: "no such task" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "ID of the task" + required: true + type: "string" + tags: ["Task"] + /tasks/{id}/logs: + get: + summary: "Get task logs" + description: | + Get `stdout` and `stderr` logs from a task. + See also [`/containers/{id}/logs`](#operation/ContainerLogs). + + **Note**: This endpoint works only for services with the `local`, + `json-file` or `journald` logging drivers. + operationId: "TaskLogs" + responses: + 200: + description: "logs returned as a stream in response body" + schema: + type: "string" + format: "binary" + 404: + description: "no such task" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such task: c2ada9df5af8" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + description: "ID of the task" + type: "string" + - name: "details" + in: "query" + description: "Show task context and extra details provided to logs." + type: "boolean" + default: false + - name: "follow" + in: "query" + description: "Keep connection after returning logs." + type: "boolean" + default: false + - name: "stdout" + in: "query" + description: "Return logs from `stdout`" + type: "boolean" + default: false + - name: "stderr" + in: "query" + description: "Return logs from `stderr`" + type: "boolean" + default: false + - name: "since" + in: "query" + description: "Only return logs since this time, as a UNIX timestamp" + type: "integer" + default: 0 + - name: "timestamps" + in: "query" + description: "Add timestamps to every log line" + type: "boolean" + default: false + - name: "tail" + in: "query" + description: | + Only return this number of log lines from the end of the logs. + Specify as an integer or `all` to output all log lines. + type: "string" + default: "all" + tags: ["Task"] + /secrets: + get: + summary: "List secrets" + operationId: "SecretList" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + $ref: "#/definitions/Secret" + example: + - ID: "blt1owaxmitz71s9v5zh81zun" + Version: + Index: 85 + CreatedAt: "2017-07-20T13:55:28.678958722Z" + UpdatedAt: "2017-07-20T13:55:28.678958722Z" + Spec: + Name: "mysql-passwd" + Labels: + some.label: "some.value" + Driver: + Name: "secret-bucket" + Options: + OptionA: "value for driver option A" + OptionB: "value for driver option B" + - ID: "ktnbjxoalbkvbvedmg1urrz8h" + Version: + Index: 11 + CreatedAt: "2016-11-05T01:20:17.327670065Z" + UpdatedAt: "2016-11-05T01:20:17.327670065Z" + Spec: + Name: "app-dev.crt" + Labels: + foo: "bar" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + type: "string" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to + process on the secrets list. + + Available filters: + + - `id=` + - `label= or label==value` + - `name=` + - `names=` + tags: ["Secret"] + /secrets/create: + post: + summary: "Create a secret" + operationId: "SecretCreate" + consumes: + - "application/json" + produces: + - "application/json" + responses: + 201: + description: "no error" + schema: + $ref: "#/definitions/IdResponse" + 409: + description: "name conflicts with an existing object" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "body" + in: "body" + schema: + allOf: + - $ref: "#/definitions/SecretSpec" + - type: "object" + example: + Name: "app-key.crt" + Labels: + foo: "bar" + Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg==" + Driver: + Name: "secret-bucket" + Options: + OptionA: "value for driver option A" + OptionB: "value for driver option B" + tags: ["Secret"] + /secrets/{id}: + get: + summary: "Inspect a secret" + operationId: "SecretInspect" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Secret" + examples: + application/json: + ID: "ktnbjxoalbkvbvedmg1urrz8h" + Version: + Index: 11 + CreatedAt: "2016-11-05T01:20:17.327670065Z" + UpdatedAt: "2016-11-05T01:20:17.327670065Z" + Spec: + Name: "app-dev.crt" + Labels: + foo: "bar" + Driver: + Name: "secret-bucket" + Options: + OptionA: "value for driver option A" + OptionB: "value for driver option B" + + 404: + description: "secret not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + type: "string" + description: "ID of the secret" + tags: ["Secret"] + delete: + summary: "Delete a secret" + operationId: "SecretDelete" + produces: + - "application/json" + responses: + 204: + description: "no error" + 404: + description: "secret not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + type: "string" + description: "ID of the secret" + tags: ["Secret"] + /secrets/{id}/update: + post: + summary: "Update a Secret" + operationId: "SecretUpdate" + responses: + 200: + description: "no error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such secret" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "The ID or name of the secret" + type: "string" + required: true + - name: "body" + in: "body" + schema: + $ref: "#/definitions/SecretSpec" + description: | + The spec of the secret to update. Currently, only the Labels field + can be updated. All other fields must remain unchanged from the + [SecretInspect endpoint](#operation/SecretInspect) response values. + - name: "version" + in: "query" + description: | + The version number of the secret object being updated. This is + required to avoid conflicting writes. + type: "integer" + format: "int64" + required: true + tags: ["Secret"] + /configs: + get: + summary: "List configs" + operationId: "ConfigList" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + type: "array" + items: + $ref: "#/definitions/Config" + example: + - ID: "ktnbjxoalbkvbvedmg1urrz8h" + Version: + Index: 11 + CreatedAt: "2016-11-05T01:20:17.327670065Z" + UpdatedAt: "2016-11-05T01:20:17.327670065Z" + Spec: + Name: "server.conf" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "filters" + in: "query" + type: "string" + description: | + A JSON encoded value of the filters (a `map[string][]string`) to + process on the configs list. + + Available filters: + + - `id=` + - `label= or label==value` + - `name=` + - `names=` + tags: ["Config"] + /configs/create: + post: + summary: "Create a config" + operationId: "ConfigCreate" + consumes: + - "application/json" + produces: + - "application/json" + responses: + 201: + description: "no error" + schema: + $ref: "#/definitions/IdResponse" + 409: + description: "name conflicts with an existing object" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "body" + in: "body" + schema: + allOf: + - $ref: "#/definitions/ConfigSpec" + - type: "object" + example: + Name: "server.conf" + Labels: + foo: "bar" + Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg==" + tags: ["Config"] + /configs/{id}: + get: + summary: "Inspect a config" + operationId: "ConfigInspect" + produces: + - "application/json" + responses: + 200: + description: "no error" + schema: + $ref: "#/definitions/Config" + examples: + application/json: + ID: "ktnbjxoalbkvbvedmg1urrz8h" + Version: + Index: 11 + CreatedAt: "2016-11-05T01:20:17.327670065Z" + UpdatedAt: "2016-11-05T01:20:17.327670065Z" + Spec: + Name: "app-dev.crt" + 404: + description: "config not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + type: "string" + description: "ID of the config" + tags: ["Config"] + delete: + summary: "Delete a config" + operationId: "ConfigDelete" + produces: + - "application/json" + responses: + 204: + description: "no error" + 404: + description: "config not found" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + required: true + type: "string" + description: "ID of the config" + tags: ["Config"] + /configs/{id}/update: + post: + summary: "Update a Config" + operationId: "ConfigUpdate" + responses: + 200: + description: "no error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 404: + description: "no such config" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + 503: + description: "node is not part of a swarm" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "id" + in: "path" + description: "The ID or name of the config" + type: "string" + required: true + - name: "body" + in: "body" + schema: + $ref: "#/definitions/ConfigSpec" + description: | + The spec of the config to update. Currently, only the Labels field + can be updated. All other fields must remain unchanged from the + [ConfigInspect endpoint](#operation/ConfigInspect) response values. + - name: "version" + in: "query" + description: | + The version number of the config object being updated. This is + required to avoid conflicting writes. + type: "integer" + format: "int64" + required: true + tags: ["Config"] + /distribution/{name}/json: + get: + summary: "Get image information from the registry" + description: | + Return image digest and platform information by contacting the registry. + operationId: "DistributionInspect" + produces: + - "application/json" + responses: + 200: + description: "descriptor and platform information" + schema: + type: "object" + x-go-name: DistributionInspect + title: "DistributionInspectResponse" + required: [Descriptor, Platforms] + properties: + Descriptor: + type: "object" + description: | + A descriptor struct containing digest, media type, and size. + properties: + MediaType: + type: "string" + Size: + type: "integer" + format: "int64" + Digest: + type: "string" + URLs: + type: "array" + items: + type: "string" + Platforms: + type: "array" + description: | + An array containing all platforms supported by the image. + items: + type: "object" + properties: + Architecture: + type: "string" + OS: + type: "string" + OSVersion: + type: "string" + OSFeatures: + type: "array" + items: + type: "string" + Variant: + type: "string" + Features: + type: "array" + items: + type: "string" + examples: + application/json: + Descriptor: + MediaType: "application/vnd.docker.distribution.manifest.v2+json" + Digest: "sha256:c0537ff6a5218ef531ece93d4984efc99bbf3f7497c0a7726c88e2bb7584dc96" + Size: 3987495 + URLs: + - "" + Platforms: + - Architecture: "amd64" + OS: "linux" + OSVersion: "" + OSFeatures: + - "" + Variant: "" + Features: + - "" + 401: + description: "Failed authentication or no image found" + schema: + $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "No such image: someimage (tag: latest)" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" + parameters: + - name: "name" + in: "path" + description: "Image name or id" + type: "string" + required: true + tags: ["Distribution"] + /session: + post: + summary: "Initialize interactive session" + description: | + Start a new interactive session with a server. Session allows server to + call back to the client for advanced capabilities. + + ### Hijacking + + This endpoint hijacks the HTTP connection to HTTP2 transport that allows + the client to expose gPRC services on that connection. + + For example, the client sends this request to upgrade the connection: + + ``` + POST /session HTTP/1.1 + Upgrade: h2c + Connection: Upgrade + ``` + + The Docker daemon responds with a `101 UPGRADED` response follow with + the raw stream: + + ``` + HTTP/1.1 101 UPGRADED + Connection: Upgrade + Upgrade: h2c + ``` + operationId: "Session" + produces: + - "application/vnd.docker.raw-stream" + responses: + 101: + description: "no error, hijacking successful" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" + 500: + description: "server error" + schema: + $ref: "#/definitions/ErrorResponse" + tags: ["Session"] diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/auth.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/auth.go new file mode 100644 index 000000000000..ddf15bb182dd --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/auth.go @@ -0,0 +1,22 @@ +package types // import "github.com/docker/docker/api/types" + +// AuthConfig contains authorization information for connecting to a Registry +type AuthConfig struct { + Username string `json:"username,omitempty"` + Password string `json:"password,omitempty"` + Auth string `json:"auth,omitempty"` + + // Email is an optional value associated with the username. + // This field is deprecated and will be removed in a later + // version of docker. + Email string `json:"email,omitempty"` + + ServerAddress string `json:"serveraddress,omitempty"` + + // IdentityToken is used to authenticate the user and get + // an access token for the registry. + IdentityToken string `json:"identitytoken,omitempty"` + + // RegistryToken is a bearer token to be sent to a registry + RegistryToken string `json:"registrytoken,omitempty"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/blkiodev/blkio.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/blkiodev/blkio.go new file mode 100644 index 000000000000..bf3463b90e71 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/blkiodev/blkio.go @@ -0,0 +1,23 @@ +package blkiodev // import "github.com/docker/docker/api/types/blkiodev" + +import "fmt" + +// WeightDevice is a structure that holds device:weight pair +type WeightDevice struct { + Path string + Weight uint16 +} + +func (w *WeightDevice) String() string { + return fmt.Sprintf("%s:%d", w.Path, w.Weight) +} + +// ThrottleDevice is a structure that holds device:rate_per_second pair +type ThrottleDevice struct { + Path string + Rate uint64 +} + +func (t *ThrottleDevice) String() string { + return fmt.Sprintf("%s:%d", t.Path, t.Rate) +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/client.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/client.go new file mode 100644 index 000000000000..9c464b73e25d --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/client.go @@ -0,0 +1,419 @@ +package types // import "github.com/docker/docker/api/types" + +import ( + "bufio" + "io" + "net" + + "github.com/docker/docker/api/types/container" + "github.com/docker/docker/api/types/filters" + units "github.com/docker/go-units" +) + +// CheckpointCreateOptions holds parameters to create a checkpoint from a container +type CheckpointCreateOptions struct { + CheckpointID string + CheckpointDir string + Exit bool +} + +// CheckpointListOptions holds parameters to list checkpoints for a container +type CheckpointListOptions struct { + CheckpointDir string +} + +// CheckpointDeleteOptions holds parameters to delete a checkpoint from a container +type CheckpointDeleteOptions struct { + CheckpointID string + CheckpointDir string +} + +// ContainerAttachOptions holds parameters to attach to a container. +type ContainerAttachOptions struct { + Stream bool + Stdin bool + Stdout bool + Stderr bool + DetachKeys string + Logs bool +} + +// ContainerCommitOptions holds parameters to commit changes into a container. +type ContainerCommitOptions struct { + Reference string + Comment string + Author string + Changes []string + Pause bool + Config *container.Config +} + +// ContainerExecInspect holds information returned by exec inspect. +type ContainerExecInspect struct { + ExecID string `json:"ID"` + ContainerID string + Running bool + ExitCode int + Pid int +} + +// ContainerListOptions holds parameters to list containers with. +type ContainerListOptions struct { + Quiet bool + Size bool + All bool + Latest bool + Since string + Before string + Limit int + Filters filters.Args +} + +// ContainerLogsOptions holds parameters to filter logs with. +type ContainerLogsOptions struct { + ShowStdout bool + ShowStderr bool + Since string + Until string + Timestamps bool + Follow bool + Tail string + Details bool +} + +// ContainerRemoveOptions holds parameters to remove containers. +type ContainerRemoveOptions struct { + RemoveVolumes bool + RemoveLinks bool + Force bool +} + +// ContainerStartOptions holds parameters to start containers. +type ContainerStartOptions struct { + CheckpointID string + CheckpointDir string +} + +// CopyToContainerOptions holds information +// about files to copy into a container +type CopyToContainerOptions struct { + AllowOverwriteDirWithFile bool + CopyUIDGID bool +} + +// EventsOptions holds parameters to filter events with. +type EventsOptions struct { + Since string + Until string + Filters filters.Args +} + +// NetworkListOptions holds parameters to filter the list of networks with. +type NetworkListOptions struct { + Filters filters.Args +} + +// HijackedResponse holds connection information for a hijacked request. +type HijackedResponse struct { + Conn net.Conn + Reader *bufio.Reader +} + +// Close closes the hijacked connection and reader. +func (h *HijackedResponse) Close() { + h.Conn.Close() +} + +// CloseWriter is an interface that implements structs +// that close input streams to prevent from writing. +type CloseWriter interface { + CloseWrite() error +} + +// CloseWrite closes a readWriter for writing. +func (h *HijackedResponse) CloseWrite() error { + if conn, ok := h.Conn.(CloseWriter); ok { + return conn.CloseWrite() + } + return nil +} + +// ImageBuildOptions holds the information +// necessary to build images. +type ImageBuildOptions struct { + Tags []string + SuppressOutput bool + RemoteContext string + NoCache bool + Remove bool + ForceRemove bool + PullParent bool + Isolation container.Isolation + CPUSetCPUs string + CPUSetMems string + CPUShares int64 + CPUQuota int64 + CPUPeriod int64 + Memory int64 + MemorySwap int64 + CgroupParent string + NetworkMode string + ShmSize int64 + Dockerfile string + Ulimits []*units.Ulimit + // BuildArgs needs to be a *string instead of just a string so that + // we can tell the difference between "" (empty string) and no value + // at all (nil). See the parsing of buildArgs in + // api/server/router/build/build_routes.go for even more info. + BuildArgs map[string]*string + AuthConfigs map[string]AuthConfig + Context io.Reader + Labels map[string]string + // squash the resulting image's layers to the parent + // preserves the original image and creates a new one from the parent with all + // the changes applied to a single layer + Squash bool + // CacheFrom specifies images that are used for matching cache. Images + // specified here do not need to have a valid parent chain to match cache. + CacheFrom []string + SecurityOpt []string + ExtraHosts []string // List of extra hosts + Target string + SessionID string + Platform string + // Version specifies the version of the unerlying builder to use + Version BuilderVersion + // BuildID is an optional identifier that can be passed together with the + // build request. The same identifier can be used to gracefully cancel the + // build with the cancel request. + BuildID string + // Outputs defines configurations for exporting build results. Only supported + // in BuildKit mode + Outputs []ImageBuildOutput +} + +// ImageBuildOutput defines configuration for exporting a build result +type ImageBuildOutput struct { + Type string + Attrs map[string]string +} + +// BuilderVersion sets the version of underlying builder to use +type BuilderVersion string + +const ( + // BuilderV1 is the first generation builder in docker daemon + BuilderV1 BuilderVersion = "1" + // BuilderBuildKit is builder based on moby/buildkit project + BuilderBuildKit BuilderVersion = "2" +) + +// ImageBuildResponse holds information +// returned by a server after building +// an image. +type ImageBuildResponse struct { + Body io.ReadCloser + OSType string +} + +// ImageCreateOptions holds information to create images. +type ImageCreateOptions struct { + RegistryAuth string // RegistryAuth is the base64 encoded credentials for the registry. + Platform string // Platform is the target platform of the image if it needs to be pulled from the registry. +} + +// ImageImportSource holds source information for ImageImport +type ImageImportSource struct { + Source io.Reader // Source is the data to send to the server to create this image from. You must set SourceName to "-" to leverage this. + SourceName string // SourceName is the name of the image to pull. Set to "-" to leverage the Source attribute. +} + +// ImageImportOptions holds information to import images from the client host. +type ImageImportOptions struct { + Tag string // Tag is the name to tag this image with. This attribute is deprecated. + Message string // Message is the message to tag the image with + Changes []string // Changes are the raw changes to apply to this image + Platform string // Platform is the target platform of the image +} + +// ImageListOptions holds parameters to filter the list of images with. +type ImageListOptions struct { + All bool + Filters filters.Args +} + +// ImageLoadResponse returns information to the client about a load process. +type ImageLoadResponse struct { + // Body must be closed to avoid a resource leak + Body io.ReadCloser + JSON bool +} + +// ImagePullOptions holds information to pull images. +type ImagePullOptions struct { + All bool + RegistryAuth string // RegistryAuth is the base64 encoded credentials for the registry + PrivilegeFunc RequestPrivilegeFunc + Platform string +} + +// RequestPrivilegeFunc is a function interface that +// clients can supply to retry operations after +// getting an authorization error. +// This function returns the registry authentication +// header value in base 64 format, or an error +// if the privilege request fails. +type RequestPrivilegeFunc func() (string, error) + +// ImagePushOptions holds information to push images. +type ImagePushOptions ImagePullOptions + +// ImageRemoveOptions holds parameters to remove images. +type ImageRemoveOptions struct { + Force bool + PruneChildren bool +} + +// ImageSearchOptions holds parameters to search images with. +type ImageSearchOptions struct { + RegistryAuth string + PrivilegeFunc RequestPrivilegeFunc + Filters filters.Args + Limit int +} + +// ResizeOptions holds parameters to resize a tty. +// It can be used to resize container ttys and +// exec process ttys too. +type ResizeOptions struct { + Height uint + Width uint +} + +// NodeListOptions holds parameters to list nodes with. +type NodeListOptions struct { + Filters filters.Args +} + +// NodeRemoveOptions holds parameters to remove nodes with. +type NodeRemoveOptions struct { + Force bool +} + +// ServiceCreateOptions contains the options to use when creating a service. +type ServiceCreateOptions struct { + // EncodedRegistryAuth is the encoded registry authorization credentials to + // use when updating the service. + // + // This field follows the format of the X-Registry-Auth header. + EncodedRegistryAuth string + + // QueryRegistry indicates whether the service update requires + // contacting a registry. A registry may be contacted to retrieve + // the image digest and manifest, which in turn can be used to update + // platform or other information about the service. + QueryRegistry bool +} + +// ServiceCreateResponse contains the information returned to a client +// on the creation of a new service. +type ServiceCreateResponse struct { + // ID is the ID of the created service. + ID string + // Warnings is a set of non-fatal warning messages to pass on to the user. + Warnings []string `json:",omitempty"` +} + +// Values for RegistryAuthFrom in ServiceUpdateOptions +const ( + RegistryAuthFromSpec = "spec" + RegistryAuthFromPreviousSpec = "previous-spec" +) + +// ServiceUpdateOptions contains the options to be used for updating services. +type ServiceUpdateOptions struct { + // EncodedRegistryAuth is the encoded registry authorization credentials to + // use when updating the service. + // + // This field follows the format of the X-Registry-Auth header. + EncodedRegistryAuth string + + // TODO(stevvooe): Consider moving the version parameter of ServiceUpdate + // into this field. While it does open API users up to racy writes, most + // users may not need that level of consistency in practice. + + // RegistryAuthFrom specifies where to find the registry authorization + // credentials if they are not given in EncodedRegistryAuth. Valid + // values are "spec" and "previous-spec". + RegistryAuthFrom string + + // Rollback indicates whether a server-side rollback should be + // performed. When this is set, the provided spec will be ignored. + // The valid values are "previous" and "none". An empty value is the + // same as "none". + Rollback string + + // QueryRegistry indicates whether the service update requires + // contacting a registry. A registry may be contacted to retrieve + // the image digest and manifest, which in turn can be used to update + // platform or other information about the service. + QueryRegistry bool +} + +// ServiceListOptions holds parameters to list services with. +type ServiceListOptions struct { + Filters filters.Args + + // Status indicates whether the server should include the service task + // count of running and desired tasks. + Status bool +} + +// ServiceInspectOptions holds parameters related to the "service inspect" +// operation. +type ServiceInspectOptions struct { + InsertDefaults bool +} + +// TaskListOptions holds parameters to list tasks with. +type TaskListOptions struct { + Filters filters.Args +} + +// PluginRemoveOptions holds parameters to remove plugins. +type PluginRemoveOptions struct { + Force bool +} + +// PluginEnableOptions holds parameters to enable plugins. +type PluginEnableOptions struct { + Timeout int +} + +// PluginDisableOptions holds parameters to disable plugins. +type PluginDisableOptions struct { + Force bool +} + +// PluginInstallOptions holds parameters to install a plugin. +type PluginInstallOptions struct { + Disabled bool + AcceptAllPermissions bool + RegistryAuth string // RegistryAuth is the base64 encoded credentials for the registry + RemoteRef string // RemoteRef is the plugin name on the registry + PrivilegeFunc RequestPrivilegeFunc + AcceptPermissionsFunc func(PluginPrivileges) (bool, error) + Args []string +} + +// SwarmUnlockKeyResponse contains the response for Engine API: +// GET /swarm/unlockkey +type SwarmUnlockKeyResponse struct { + // UnlockKey is the unlock key in ASCII-armored format. + UnlockKey string +} + +// PluginCreateOptions hold all options to plugin create. +type PluginCreateOptions struct { + RepoName string +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/configs.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/configs.go new file mode 100644 index 000000000000..3dd133a3a58a --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/configs.go @@ -0,0 +1,66 @@ +package types // import "github.com/docker/docker/api/types" + +import ( + "github.com/docker/docker/api/types/container" + "github.com/docker/docker/api/types/network" + specs "github.com/opencontainers/image-spec/specs-go/v1" +) + +// configs holds structs used for internal communication between the +// frontend (such as an http server) and the backend (such as the +// docker daemon). + +// ContainerCreateConfig is the parameter set to ContainerCreate() +type ContainerCreateConfig struct { + Name string + Config *container.Config + HostConfig *container.HostConfig + NetworkingConfig *network.NetworkingConfig + Platform *specs.Platform + AdjustCPUShares bool +} + +// ContainerRmConfig holds arguments for the container remove +// operation. This struct is used to tell the backend what operations +// to perform. +type ContainerRmConfig struct { + ForceRemove, RemoveVolume, RemoveLink bool +} + +// ExecConfig is a small subset of the Config struct that holds the configuration +// for the exec feature of docker. +type ExecConfig struct { + User string // User that will run the command + Privileged bool // Is the container in privileged mode + Tty bool // Attach standard streams to a tty. + AttachStdin bool // Attach the standard input, makes possible user interaction + AttachStderr bool // Attach the standard error + AttachStdout bool // Attach the standard output + Detach bool // Execute in detach mode + DetachKeys string // Escape keys for detach + Env []string // Environment variables + WorkingDir string // Working directory + Cmd []string // Execution commands and args +} + +// PluginRmConfig holds arguments for plugin remove. +type PluginRmConfig struct { + ForceRemove bool +} + +// PluginEnableConfig holds arguments for plugin enable +type PluginEnableConfig struct { + Timeout int +} + +// PluginDisableConfig holds arguments for plugin disable. +type PluginDisableConfig struct { + ForceDisable bool +} + +// NetworkListConfig stores the options available for listing networks +type NetworkListConfig struct { + // TODO(@cpuguy83): naming is hard, this is pulled from what was being used in the router before moving here + Detailed bool + Verbose bool +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/config.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/config.go new file mode 100644 index 000000000000..f767195b94b4 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/config.go @@ -0,0 +1,69 @@ +package container // import "github.com/docker/docker/api/types/container" + +import ( + "time" + + "github.com/docker/docker/api/types/strslice" + "github.com/docker/go-connections/nat" +) + +// MinimumDuration puts a minimum on user configured duration. +// This is to prevent API error on time unit. For example, API may +// set 3 as healthcheck interval with intention of 3 seconds, but +// Docker interprets it as 3 nanoseconds. +const MinimumDuration = 1 * time.Millisecond + +// HealthConfig holds configuration settings for the HEALTHCHECK feature. +type HealthConfig struct { + // Test is the test to perform to check that the container is healthy. + // An empty slice means to inherit the default. + // The options are: + // {} : inherit healthcheck + // {"NONE"} : disable healthcheck + // {"CMD", args...} : exec arguments directly + // {"CMD-SHELL", command} : run command with system's default shell + Test []string `json:",omitempty"` + + // Zero means to inherit. Durations are expressed as integer nanoseconds. + Interval time.Duration `json:",omitempty"` // Interval is the time to wait between checks. + Timeout time.Duration `json:",omitempty"` // Timeout is the time to wait before considering the check to have hung. + StartPeriod time.Duration `json:",omitempty"` // The start period for the container to initialize before the retries starts to count down. + + // Retries is the number of consecutive failures needed to consider a container as unhealthy. + // Zero means inherit. + Retries int `json:",omitempty"` +} + +// Config contains the configuration data about a container. +// It should hold only portable information about the container. +// Here, "portable" means "independent from the host we are running on". +// Non-portable information *should* appear in HostConfig. +// All fields added to this struct must be marked `omitempty` to keep getting +// predictable hashes from the old `v1Compatibility` configuration. +type Config struct { + Hostname string // Hostname + Domainname string // Domainname + User string // User that will run the command(s) inside the container, also support user:group + AttachStdin bool // Attach the standard input, makes possible user interaction + AttachStdout bool // Attach the standard output + AttachStderr bool // Attach the standard error + ExposedPorts nat.PortSet `json:",omitempty"` // List of exposed ports + Tty bool // Attach standard streams to a tty, including stdin if it is not closed. + OpenStdin bool // Open stdin + StdinOnce bool // If true, close stdin after the 1 attached client disconnects. + Env []string // List of environment variable to set in the container + Cmd strslice.StrSlice // Command to run when starting the container + Healthcheck *HealthConfig `json:",omitempty"` // Healthcheck describes how to check the container is healthy + ArgsEscaped bool `json:",omitempty"` // True if command is already escaped (meaning treat as a command line) (Windows specific). + Image string // Name of the image as it was passed by the operator (e.g. could be symbolic) + Volumes map[string]struct{} // List of volumes (mounts) used for the container + WorkingDir string // Current directory (PWD) in the command will be launched + Entrypoint strslice.StrSlice // Entrypoint to run when starting the container + NetworkDisabled bool `json:",omitempty"` // Is network disabled + MacAddress string `json:",omitempty"` // Mac Address of the container + OnBuild []string // ONBUILD metadata that were defined on the image Dockerfile + Labels map[string]string // List of labels set to this container + StopSignal string `json:",omitempty"` // Signal to stop a container + StopTimeout *int `json:",omitempty"` // Timeout (in seconds) to stop a container + Shell strslice.StrSlice `json:",omitempty"` // Shell for shell-form of RUN, CMD, ENTRYPOINT +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/container_changes.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/container_changes.go new file mode 100644 index 000000000000..16dd5019eef8 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/container_changes.go @@ -0,0 +1,20 @@ +package container // import "github.com/docker/docker/api/types/container" + +// ---------------------------------------------------------------------------- +// Code generated by `swagger generate operation`. DO NOT EDIT. +// +// See hack/generate-swagger-api.sh +// ---------------------------------------------------------------------------- + +// ContainerChangeResponseItem change item in response to ContainerChanges operation +// swagger:model ContainerChangeResponseItem +type ContainerChangeResponseItem struct { + + // Kind of change + // Required: true + Kind uint8 `json:"Kind"` + + // Path to file that has changed + // Required: true + Path string `json:"Path"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/container_create.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/container_create.go new file mode 100644 index 000000000000..d0c852f84d5c --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/container_create.go @@ -0,0 +1,20 @@ +package container // import "github.com/docker/docker/api/types/container" + +// ---------------------------------------------------------------------------- +// Code generated by `swagger generate operation`. DO NOT EDIT. +// +// See hack/generate-swagger-api.sh +// ---------------------------------------------------------------------------- + +// ContainerCreateCreatedBody OK response to ContainerCreate operation +// swagger:model ContainerCreateCreatedBody +type ContainerCreateCreatedBody struct { + + // The ID of the created container + // Required: true + ID string `json:"Id"` + + // Warnings encountered when creating the container + // Required: true + Warnings []string `json:"Warnings"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/container_top.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/container_top.go new file mode 100644 index 000000000000..63381da36749 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/container_top.go @@ -0,0 +1,22 @@ +package container // import "github.com/docker/docker/api/types/container" + +// ---------------------------------------------------------------------------- +// Code generated by `swagger generate operation`. DO NOT EDIT. +// +// See hack/generate-swagger-api.sh +// ---------------------------------------------------------------------------- + +// ContainerTopOKBody OK response to ContainerTop operation +// swagger:model ContainerTopOKBody +type ContainerTopOKBody struct { + + // Each process running in the container, where each is process + // is an array of values corresponding to the titles. + // + // Required: true + Processes [][]string `json:"Processes"` + + // The ps column titles + // Required: true + Titles []string `json:"Titles"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/container_update.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/container_update.go new file mode 100644 index 000000000000..c10f175ea82f --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/container_update.go @@ -0,0 +1,16 @@ +package container // import "github.com/docker/docker/api/types/container" + +// ---------------------------------------------------------------------------- +// Code generated by `swagger generate operation`. DO NOT EDIT. +// +// See hack/generate-swagger-api.sh +// ---------------------------------------------------------------------------- + +// ContainerUpdateOKBody OK response to ContainerUpdate operation +// swagger:model ContainerUpdateOKBody +type ContainerUpdateOKBody struct { + + // warnings + // Required: true + Warnings []string `json:"Warnings"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/container_wait.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/container_wait.go new file mode 100644 index 000000000000..49e05ae66944 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/container_wait.go @@ -0,0 +1,28 @@ +package container // import "github.com/docker/docker/api/types/container" + +// ---------------------------------------------------------------------------- +// Code generated by `swagger generate operation`. DO NOT EDIT. +// +// See hack/generate-swagger-api.sh +// ---------------------------------------------------------------------------- + +// ContainerWaitOKBodyError container waiting error, if any +// swagger:model ContainerWaitOKBodyError +type ContainerWaitOKBodyError struct { + + // Details of an error + Message string `json:"Message,omitempty"` +} + +// ContainerWaitOKBody OK response to ContainerWait operation +// swagger:model ContainerWaitOKBody +type ContainerWaitOKBody struct { + + // error + // Required: true + Error *ContainerWaitOKBodyError `json:"Error"` + + // Exit code of the container + // Required: true + StatusCode int64 `json:"StatusCode"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/host_config.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/host_config.go new file mode 100644 index 000000000000..2d1cbaa9abd9 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/host_config.go @@ -0,0 +1,447 @@ +package container // import "github.com/docker/docker/api/types/container" + +import ( + "strings" + + "github.com/docker/docker/api/types/blkiodev" + "github.com/docker/docker/api/types/mount" + "github.com/docker/docker/api/types/strslice" + "github.com/docker/go-connections/nat" + units "github.com/docker/go-units" +) + +// CgroupnsMode represents the cgroup namespace mode of the container +type CgroupnsMode string + +// IsPrivate indicates whether the container uses its own private cgroup namespace +func (c CgroupnsMode) IsPrivate() bool { + return c == "private" +} + +// IsHost indicates whether the container shares the host's cgroup namespace +func (c CgroupnsMode) IsHost() bool { + return c == "host" +} + +// IsEmpty indicates whether the container cgroup namespace mode is unset +func (c CgroupnsMode) IsEmpty() bool { + return c == "" +} + +// Valid indicates whether the cgroup namespace mode is valid +func (c CgroupnsMode) Valid() bool { + return c.IsEmpty() || c.IsPrivate() || c.IsHost() +} + +// Isolation represents the isolation technology of a container. The supported +// values are platform specific +type Isolation string + +// IsDefault indicates the default isolation technology of a container. On Linux this +// is the native driver. On Windows, this is a Windows Server Container. +func (i Isolation) IsDefault() bool { + return strings.ToLower(string(i)) == "default" || string(i) == "" +} + +// IsHyperV indicates the use of a Hyper-V partition for isolation +func (i Isolation) IsHyperV() bool { + return strings.ToLower(string(i)) == "hyperv" +} + +// IsProcess indicates the use of process isolation +func (i Isolation) IsProcess() bool { + return strings.ToLower(string(i)) == "process" +} + +const ( + // IsolationEmpty is unspecified (same behavior as default) + IsolationEmpty = Isolation("") + // IsolationDefault is the default isolation mode on current daemon + IsolationDefault = Isolation("default") + // IsolationProcess is process isolation mode + IsolationProcess = Isolation("process") + // IsolationHyperV is HyperV isolation mode + IsolationHyperV = Isolation("hyperv") +) + +// IpcMode represents the container ipc stack. +type IpcMode string + +// IsPrivate indicates whether the container uses its own private ipc namespace which can not be shared. +func (n IpcMode) IsPrivate() bool { + return n == "private" +} + +// IsHost indicates whether the container shares the host's ipc namespace. +func (n IpcMode) IsHost() bool { + return n == "host" +} + +// IsShareable indicates whether the container's ipc namespace can be shared with another container. +func (n IpcMode) IsShareable() bool { + return n == "shareable" +} + +// IsContainer indicates whether the container uses another container's ipc namespace. +func (n IpcMode) IsContainer() bool { + parts := strings.SplitN(string(n), ":", 2) + return len(parts) > 1 && parts[0] == "container" +} + +// IsNone indicates whether container IpcMode is set to "none". +func (n IpcMode) IsNone() bool { + return n == "none" +} + +// IsEmpty indicates whether container IpcMode is empty +func (n IpcMode) IsEmpty() bool { + return n == "" +} + +// Valid indicates whether the ipc mode is valid. +func (n IpcMode) Valid() bool { + return n.IsEmpty() || n.IsNone() || n.IsPrivate() || n.IsHost() || n.IsShareable() || n.IsContainer() +} + +// Container returns the name of the container ipc stack is going to be used. +func (n IpcMode) Container() string { + parts := strings.SplitN(string(n), ":", 2) + if len(parts) > 1 && parts[0] == "container" { + return parts[1] + } + return "" +} + +// NetworkMode represents the container network stack. +type NetworkMode string + +// IsNone indicates whether container isn't using a network stack. +func (n NetworkMode) IsNone() bool { + return n == "none" +} + +// IsDefault indicates whether container uses the default network stack. +func (n NetworkMode) IsDefault() bool { + return n == "default" +} + +// IsPrivate indicates whether container uses its private network stack. +func (n NetworkMode) IsPrivate() bool { + return !(n.IsHost() || n.IsContainer()) +} + +// IsContainer indicates whether container uses a container network stack. +func (n NetworkMode) IsContainer() bool { + parts := strings.SplitN(string(n), ":", 2) + return len(parts) > 1 && parts[0] == "container" +} + +// ConnectedContainer is the id of the container which network this container is connected to. +func (n NetworkMode) ConnectedContainer() string { + parts := strings.SplitN(string(n), ":", 2) + if len(parts) > 1 { + return parts[1] + } + return "" +} + +// UserDefined indicates user-created network +func (n NetworkMode) UserDefined() string { + if n.IsUserDefined() { + return string(n) + } + return "" +} + +// UsernsMode represents userns mode in the container. +type UsernsMode string + +// IsHost indicates whether the container uses the host's userns. +func (n UsernsMode) IsHost() bool { + return n == "host" +} + +// IsPrivate indicates whether the container uses the a private userns. +func (n UsernsMode) IsPrivate() bool { + return !(n.IsHost()) +} + +// Valid indicates whether the userns is valid. +func (n UsernsMode) Valid() bool { + parts := strings.Split(string(n), ":") + switch mode := parts[0]; mode { + case "", "host": + default: + return false + } + return true +} + +// CgroupSpec represents the cgroup to use for the container. +type CgroupSpec string + +// IsContainer indicates whether the container is using another container cgroup +func (c CgroupSpec) IsContainer() bool { + parts := strings.SplitN(string(c), ":", 2) + return len(parts) > 1 && parts[0] == "container" +} + +// Valid indicates whether the cgroup spec is valid. +func (c CgroupSpec) Valid() bool { + return c.IsContainer() || c == "" +} + +// Container returns the name of the container whose cgroup will be used. +func (c CgroupSpec) Container() string { + parts := strings.SplitN(string(c), ":", 2) + if len(parts) > 1 { + return parts[1] + } + return "" +} + +// UTSMode represents the UTS namespace of the container. +type UTSMode string + +// IsPrivate indicates whether the container uses its private UTS namespace. +func (n UTSMode) IsPrivate() bool { + return !(n.IsHost()) +} + +// IsHost indicates whether the container uses the host's UTS namespace. +func (n UTSMode) IsHost() bool { + return n == "host" +} + +// Valid indicates whether the UTS namespace is valid. +func (n UTSMode) Valid() bool { + parts := strings.Split(string(n), ":") + switch mode := parts[0]; mode { + case "", "host": + default: + return false + } + return true +} + +// PidMode represents the pid namespace of the container. +type PidMode string + +// IsPrivate indicates whether the container uses its own new pid namespace. +func (n PidMode) IsPrivate() bool { + return !(n.IsHost() || n.IsContainer()) +} + +// IsHost indicates whether the container uses the host's pid namespace. +func (n PidMode) IsHost() bool { + return n == "host" +} + +// IsContainer indicates whether the container uses a container's pid namespace. +func (n PidMode) IsContainer() bool { + parts := strings.SplitN(string(n), ":", 2) + return len(parts) > 1 && parts[0] == "container" +} + +// Valid indicates whether the pid namespace is valid. +func (n PidMode) Valid() bool { + parts := strings.Split(string(n), ":") + switch mode := parts[0]; mode { + case "", "host": + case "container": + if len(parts) != 2 || parts[1] == "" { + return false + } + default: + return false + } + return true +} + +// Container returns the name of the container whose pid namespace is going to be used. +func (n PidMode) Container() string { + parts := strings.SplitN(string(n), ":", 2) + if len(parts) > 1 { + return parts[1] + } + return "" +} + +// DeviceRequest represents a request for devices from a device driver. +// Used by GPU device drivers. +type DeviceRequest struct { + Driver string // Name of device driver + Count int // Number of devices to request (-1 = All) + DeviceIDs []string // List of device IDs as recognizable by the device driver + Capabilities [][]string // An OR list of AND lists of device capabilities (e.g. "gpu") + Options map[string]string // Options to pass onto the device driver +} + +// DeviceMapping represents the device mapping between the host and the container. +type DeviceMapping struct { + PathOnHost string + PathInContainer string + CgroupPermissions string +} + +// RestartPolicy represents the restart policies of the container. +type RestartPolicy struct { + Name string + MaximumRetryCount int +} + +// IsNone indicates whether the container has the "no" restart policy. +// This means the container will not automatically restart when exiting. +func (rp *RestartPolicy) IsNone() bool { + return rp.Name == "no" || rp.Name == "" +} + +// IsAlways indicates whether the container has the "always" restart policy. +// This means the container will automatically restart regardless of the exit status. +func (rp *RestartPolicy) IsAlways() bool { + return rp.Name == "always" +} + +// IsOnFailure indicates whether the container has the "on-failure" restart policy. +// This means the container will automatically restart of exiting with a non-zero exit status. +func (rp *RestartPolicy) IsOnFailure() bool { + return rp.Name == "on-failure" +} + +// IsUnlessStopped indicates whether the container has the +// "unless-stopped" restart policy. This means the container will +// automatically restart unless user has put it to stopped state. +func (rp *RestartPolicy) IsUnlessStopped() bool { + return rp.Name == "unless-stopped" +} + +// IsSame compares two RestartPolicy to see if they are the same +func (rp *RestartPolicy) IsSame(tp *RestartPolicy) bool { + return rp.Name == tp.Name && rp.MaximumRetryCount == tp.MaximumRetryCount +} + +// LogMode is a type to define the available modes for logging +// These modes affect how logs are handled when log messages start piling up. +type LogMode string + +// Available logging modes +const ( + LogModeUnset = "" + LogModeBlocking LogMode = "blocking" + LogModeNonBlock LogMode = "non-blocking" +) + +// LogConfig represents the logging configuration of the container. +type LogConfig struct { + Type string + Config map[string]string +} + +// Resources contains container's resources (cgroups config, ulimits...) +type Resources struct { + // Applicable to all platforms + CPUShares int64 `json:"CpuShares"` // CPU shares (relative weight vs. other containers) + Memory int64 // Memory limit (in bytes) + NanoCPUs int64 `json:"NanoCpus"` // CPU quota in units of 10-9 CPUs. + + // Applicable to UNIX platforms + CgroupParent string // Parent cgroup. + BlkioWeight uint16 // Block IO weight (relative weight vs. other containers) + BlkioWeightDevice []*blkiodev.WeightDevice + BlkioDeviceReadBps []*blkiodev.ThrottleDevice + BlkioDeviceWriteBps []*blkiodev.ThrottleDevice + BlkioDeviceReadIOps []*blkiodev.ThrottleDevice + BlkioDeviceWriteIOps []*blkiodev.ThrottleDevice + CPUPeriod int64 `json:"CpuPeriod"` // CPU CFS (Completely Fair Scheduler) period + CPUQuota int64 `json:"CpuQuota"` // CPU CFS (Completely Fair Scheduler) quota + CPURealtimePeriod int64 `json:"CpuRealtimePeriod"` // CPU real-time period + CPURealtimeRuntime int64 `json:"CpuRealtimeRuntime"` // CPU real-time runtime + CpusetCpus string // CpusetCpus 0-2, 0,1 + CpusetMems string // CpusetMems 0-2, 0,1 + Devices []DeviceMapping // List of devices to map inside the container + DeviceCgroupRules []string // List of rule to be added to the device cgroup + DeviceRequests []DeviceRequest // List of device requests for device drivers + KernelMemory int64 // Kernel memory limit (in bytes), Deprecated: kernel 5.4 deprecated kmem.limit_in_bytes + KernelMemoryTCP int64 // Hard limit for kernel TCP buffer memory (in bytes) + MemoryReservation int64 // Memory soft limit (in bytes) + MemorySwap int64 // Total memory usage (memory + swap); set `-1` to enable unlimited swap + MemorySwappiness *int64 // Tuning container memory swappiness behaviour + OomKillDisable *bool // Whether to disable OOM Killer or not + PidsLimit *int64 // Setting PIDs limit for a container; Set `0` or `-1` for unlimited, or `null` to not change. + Ulimits []*units.Ulimit // List of ulimits to be set in the container + + // Applicable to Windows + CPUCount int64 `json:"CpuCount"` // CPU count + CPUPercent int64 `json:"CpuPercent"` // CPU percent + IOMaximumIOps uint64 // Maximum IOps for the container system drive + IOMaximumBandwidth uint64 // Maximum IO in bytes per second for the container system drive +} + +// UpdateConfig holds the mutable attributes of a Container. +// Those attributes can be updated at runtime. +type UpdateConfig struct { + // Contains container's resources (cgroups, ulimits) + Resources + RestartPolicy RestartPolicy +} + +// HostConfig the non-portable Config structure of a container. +// Here, "non-portable" means "dependent of the host we are running on". +// Portable information *should* appear in Config. +type HostConfig struct { + // Applicable to all platforms + Binds []string // List of volume bindings for this container + ContainerIDFile string // File (path) where the containerId is written + LogConfig LogConfig // Configuration of the logs for this container + NetworkMode NetworkMode // Network mode to use for the container + PortBindings nat.PortMap // Port mapping between the exposed port (container) and the host + RestartPolicy RestartPolicy // Restart policy to be used for the container + AutoRemove bool // Automatically remove container when it exits + VolumeDriver string // Name of the volume driver used to mount volumes + VolumesFrom []string // List of volumes to take from other container + + // Applicable to UNIX platforms + CapAdd strslice.StrSlice // List of kernel capabilities to add to the container + CapDrop strslice.StrSlice // List of kernel capabilities to remove from the container + CgroupnsMode CgroupnsMode // Cgroup namespace mode to use for the container + DNS []string `json:"Dns"` // List of DNS server to lookup + DNSOptions []string `json:"DnsOptions"` // List of DNSOption to look for + DNSSearch []string `json:"DnsSearch"` // List of DNSSearch to look for + ExtraHosts []string // List of extra hosts + GroupAdd []string // List of additional groups that the container process will run as + IpcMode IpcMode // IPC namespace to use for the container + Cgroup CgroupSpec // Cgroup to use for the container + Links []string // List of links (in the name:alias form) + OomScoreAdj int // Container preference for OOM-killing + PidMode PidMode // PID namespace to use for the container + Privileged bool // Is the container in privileged mode + PublishAllPorts bool // Should docker publish all exposed port for the container + ReadonlyRootfs bool // Is the container root filesystem in read-only + SecurityOpt []string // List of string values to customize labels for MLS systems, such as SELinux. + StorageOpt map[string]string `json:",omitempty"` // Storage driver options per container. + Tmpfs map[string]string `json:",omitempty"` // List of tmpfs (mounts) used for the container + UTSMode UTSMode // UTS namespace to use for the container + UsernsMode UsernsMode // The user namespace to use for the container + ShmSize int64 // Total shm memory usage + Sysctls map[string]string `json:",omitempty"` // List of Namespaced sysctls used for the container + Runtime string `json:",omitempty"` // Runtime to use with this container + + // Applicable to Windows + ConsoleSize [2]uint // Initial console size (height,width) + Isolation Isolation // Isolation technology of the container (e.g. default, hyperv) + + // Contains container's resources (cgroups, ulimits) + Resources + + // Mounts specs used by the container + Mounts []mount.Mount `json:",omitempty"` + + // MaskedPaths is the list of paths to be masked inside the container (this overrides the default set of paths) + MaskedPaths []string + + // ReadonlyPaths is the list of paths to be set as read-only inside the container (this overrides the default set of paths) + ReadonlyPaths []string + + // Run a custom init inside the container, if null, use the daemon's configured settings + Init *bool `json:",omitempty"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/hostconfig_unix.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/hostconfig_unix.go new file mode 100644 index 000000000000..cf6fdf44026c --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/hostconfig_unix.go @@ -0,0 +1,41 @@ +// +build !windows + +package container // import "github.com/docker/docker/api/types/container" + +// IsValid indicates if an isolation technology is valid +func (i Isolation) IsValid() bool { + return i.IsDefault() +} + +// NetworkName returns the name of the network stack. +func (n NetworkMode) NetworkName() string { + if n.IsBridge() { + return "bridge" + } else if n.IsHost() { + return "host" + } else if n.IsContainer() { + return "container" + } else if n.IsNone() { + return "none" + } else if n.IsDefault() { + return "default" + } else if n.IsUserDefined() { + return n.UserDefined() + } + return "" +} + +// IsBridge indicates whether container uses the bridge network stack +func (n NetworkMode) IsBridge() bool { + return n == "bridge" +} + +// IsHost indicates whether container uses the host network stack. +func (n NetworkMode) IsHost() bool { + return n == "host" +} + +// IsUserDefined indicates user-created network +func (n NetworkMode) IsUserDefined() bool { + return !n.IsDefault() && !n.IsBridge() && !n.IsHost() && !n.IsNone() && !n.IsContainer() +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/hostconfig_windows.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/hostconfig_windows.go new file mode 100644 index 000000000000..99f803a5bb17 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/hostconfig_windows.go @@ -0,0 +1,40 @@ +package container // import "github.com/docker/docker/api/types/container" + +// IsBridge indicates whether container uses the bridge network stack +// in windows it is given the name NAT +func (n NetworkMode) IsBridge() bool { + return n == "nat" +} + +// IsHost indicates whether container uses the host network stack. +// returns false as this is not supported by windows +func (n NetworkMode) IsHost() bool { + return false +} + +// IsUserDefined indicates user-created network +func (n NetworkMode) IsUserDefined() bool { + return !n.IsDefault() && !n.IsNone() && !n.IsBridge() && !n.IsContainer() +} + +// IsValid indicates if an isolation technology is valid +func (i Isolation) IsValid() bool { + return i.IsDefault() || i.IsHyperV() || i.IsProcess() +} + +// NetworkName returns the name of the network stack. +func (n NetworkMode) NetworkName() string { + if n.IsDefault() { + return "default" + } else if n.IsBridge() { + return "nat" + } else if n.IsNone() { + return "none" + } else if n.IsContainer() { + return "container" + } else if n.IsUserDefined() { + return n.UserDefined() + } + + return "" +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/waitcondition.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/waitcondition.go new file mode 100644 index 000000000000..cd8311f99cfb --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/container/waitcondition.go @@ -0,0 +1,22 @@ +package container // import "github.com/docker/docker/api/types/container" + +// WaitCondition is a type used to specify a container state for which +// to wait. +type WaitCondition string + +// Possible WaitCondition Values. +// +// WaitConditionNotRunning (default) is used to wait for any of the non-running +// states: "created", "exited", "dead", "removing", or "removed". +// +// WaitConditionNextExit is used to wait for the next time the state changes +// to a non-running state. If the state is currently "created" or "exited", +// this would cause Wait() to block until either the container runs and exits +// or is removed. +// +// WaitConditionRemoved is used to wait for the container to be removed. +const ( + WaitConditionNotRunning WaitCondition = "not-running" + WaitConditionNextExit WaitCondition = "next-exit" + WaitConditionRemoved WaitCondition = "removed" +) diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/error_response.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/error_response.go new file mode 100644 index 000000000000..dc942d9d9efa --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/error_response.go @@ -0,0 +1,13 @@ +package types + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// ErrorResponse Represents an error. +// swagger:model ErrorResponse +type ErrorResponse struct { + + // The error message. + // Required: true + Message string `json:"message"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/error_response_ext.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/error_response_ext.go new file mode 100644 index 000000000000..f84f034cd545 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/error_response_ext.go @@ -0,0 +1,6 @@ +package types + +// Error returns the error message +func (e ErrorResponse) Error() string { + return e.Message +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/events/events.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/events/events.go new file mode 100644 index 000000000000..aa8fba815484 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/events/events.go @@ -0,0 +1,54 @@ +package events // import "github.com/docker/docker/api/types/events" + +const ( + // BuilderEventType is the event type that the builder generates + BuilderEventType = "builder" + // ContainerEventType is the event type that containers generate + ContainerEventType = "container" + // DaemonEventType is the event type that daemon generate + DaemonEventType = "daemon" + // ImageEventType is the event type that images generate + ImageEventType = "image" + // NetworkEventType is the event type that networks generate + NetworkEventType = "network" + // PluginEventType is the event type that plugins generate + PluginEventType = "plugin" + // VolumeEventType is the event type that volumes generate + VolumeEventType = "volume" + // ServiceEventType is the event type that services generate + ServiceEventType = "service" + // NodeEventType is the event type that nodes generate + NodeEventType = "node" + // SecretEventType is the event type that secrets generate + SecretEventType = "secret" + // ConfigEventType is the event type that configs generate + ConfigEventType = "config" +) + +// Actor describes something that generates events, +// like a container, or a network, or a volume. +// It has a defined name and a set or attributes. +// The container attributes are its labels, other actors +// can generate these attributes from other properties. +type Actor struct { + ID string + Attributes map[string]string +} + +// Message represents the information an event contains +type Message struct { + // Deprecated information from JSONMessage. + // With data only in container events. + Status string `json:"status,omitempty"` + ID string `json:"id,omitempty"` + From string `json:"from,omitempty"` + + Type string + Action string + Actor Actor + // Engine events are local scope. Cluster events are swarm scope. + Scope string `json:"scope,omitempty"` + + Time int64 `json:"time,omitempty"` + TimeNano int64 `json:"timeNano,omitempty"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/filters/parse.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/filters/parse.go new file mode 100644 index 000000000000..4bc91cffd6e5 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/filters/parse.go @@ -0,0 +1,324 @@ +/*Package filters provides tools for encoding a mapping of keys to a set of +multiple values. +*/ +package filters // import "github.com/docker/docker/api/types/filters" + +import ( + "encoding/json" + "regexp" + "strings" + + "github.com/docker/docker/api/types/versions" +) + +// Args stores a mapping of keys to a set of multiple values. +type Args struct { + fields map[string]map[string]bool +} + +// KeyValuePair are used to initialize a new Args +type KeyValuePair struct { + Key string + Value string +} + +// Arg creates a new KeyValuePair for initializing Args +func Arg(key, value string) KeyValuePair { + return KeyValuePair{Key: key, Value: value} +} + +// NewArgs returns a new Args populated with the initial args +func NewArgs(initialArgs ...KeyValuePair) Args { + args := Args{fields: map[string]map[string]bool{}} + for _, arg := range initialArgs { + args.Add(arg.Key, arg.Value) + } + return args +} + +// Keys returns all the keys in list of Args +func (args Args) Keys() []string { + keys := make([]string, 0, len(args.fields)) + for k := range args.fields { + keys = append(keys, k) + } + return keys +} + +// MarshalJSON returns a JSON byte representation of the Args +func (args Args) MarshalJSON() ([]byte, error) { + if len(args.fields) == 0 { + return []byte{}, nil + } + return json.Marshal(args.fields) +} + +// ToJSON returns the Args as a JSON encoded string +func ToJSON(a Args) (string, error) { + if a.Len() == 0 { + return "", nil + } + buf, err := json.Marshal(a) + return string(buf), err +} + +// ToParamWithVersion encodes Args as a JSON string. If version is less than 1.22 +// then the encoded format will use an older legacy format where the values are a +// list of strings, instead of a set. +// +// Deprecated: do not use in any new code; use ToJSON instead +func ToParamWithVersion(version string, a Args) (string, error) { + if a.Len() == 0 { + return "", nil + } + + if version != "" && versions.LessThan(version, "1.22") { + buf, err := json.Marshal(convertArgsToSlice(a.fields)) + return string(buf), err + } + + return ToJSON(a) +} + +// FromJSON decodes a JSON encoded string into Args +func FromJSON(p string) (Args, error) { + args := NewArgs() + + if p == "" { + return args, nil + } + + raw := []byte(p) + err := json.Unmarshal(raw, &args) + if err == nil { + return args, nil + } + + // Fallback to parsing arguments in the legacy slice format + deprecated := map[string][]string{} + if legacyErr := json.Unmarshal(raw, &deprecated); legacyErr != nil { + return args, err + } + + args.fields = deprecatedArgs(deprecated) + return args, nil +} + +// UnmarshalJSON populates the Args from JSON encode bytes +func (args Args) UnmarshalJSON(raw []byte) error { + if len(raw) == 0 { + return nil + } + return json.Unmarshal(raw, &args.fields) +} + +// Get returns the list of values associated with the key +func (args Args) Get(key string) []string { + values := args.fields[key] + if values == nil { + return make([]string, 0) + } + slice := make([]string, 0, len(values)) + for key := range values { + slice = append(slice, key) + } + return slice +} + +// Add a new value to the set of values +func (args Args) Add(key, value string) { + if _, ok := args.fields[key]; ok { + args.fields[key][value] = true + } else { + args.fields[key] = map[string]bool{value: true} + } +} + +// Del removes a value from the set +func (args Args) Del(key, value string) { + if _, ok := args.fields[key]; ok { + delete(args.fields[key], value) + if len(args.fields[key]) == 0 { + delete(args.fields, key) + } + } +} + +// Len returns the number of keys in the mapping +func (args Args) Len() int { + return len(args.fields) +} + +// MatchKVList returns true if all the pairs in sources exist as key=value +// pairs in the mapping at key, or if there are no values at key. +func (args Args) MatchKVList(key string, sources map[string]string) bool { + fieldValues := args.fields[key] + + // do not filter if there is no filter set or cannot determine filter + if len(fieldValues) == 0 { + return true + } + + if len(sources) == 0 { + return false + } + + for value := range fieldValues { + testKV := strings.SplitN(value, "=", 2) + + v, ok := sources[testKV[0]] + if !ok { + return false + } + if len(testKV) == 2 && testKV[1] != v { + return false + } + } + + return true +} + +// Match returns true if any of the values at key match the source string +func (args Args) Match(field, source string) bool { + if args.ExactMatch(field, source) { + return true + } + + fieldValues := args.fields[field] + for name2match := range fieldValues { + match, err := regexp.MatchString(name2match, source) + if err != nil { + continue + } + if match { + return true + } + } + return false +} + +// ExactMatch returns true if the source matches exactly one of the values. +func (args Args) ExactMatch(key, source string) bool { + fieldValues, ok := args.fields[key] + // do not filter if there is no filter set or cannot determine filter + if !ok || len(fieldValues) == 0 { + return true + } + + // try to match full name value to avoid O(N) regular expression matching + return fieldValues[source] +} + +// UniqueExactMatch returns true if there is only one value and the source +// matches exactly the value. +func (args Args) UniqueExactMatch(key, source string) bool { + fieldValues := args.fields[key] + // do not filter if there is no filter set or cannot determine filter + if len(fieldValues) == 0 { + return true + } + if len(args.fields[key]) != 1 { + return false + } + + // try to match full name value to avoid O(N) regular expression matching + return fieldValues[source] +} + +// FuzzyMatch returns true if the source matches exactly one value, or the +// source has one of the values as a prefix. +func (args Args) FuzzyMatch(key, source string) bool { + if args.ExactMatch(key, source) { + return true + } + + fieldValues := args.fields[key] + for prefix := range fieldValues { + if strings.HasPrefix(source, prefix) { + return true + } + } + return false +} + +// Contains returns true if the key exists in the mapping +func (args Args) Contains(field string) bool { + _, ok := args.fields[field] + return ok +} + +type invalidFilter string + +func (e invalidFilter) Error() string { + return "Invalid filter '" + string(e) + "'" +} + +func (invalidFilter) InvalidParameter() {} + +// Validate compared the set of accepted keys against the keys in the mapping. +// An error is returned if any mapping keys are not in the accepted set. +func (args Args) Validate(accepted map[string]bool) error { + for name := range args.fields { + if !accepted[name] { + return invalidFilter(name) + } + } + return nil +} + +// WalkValues iterates over the list of values for a key in the mapping and calls +// op() for each value. If op returns an error the iteration stops and the +// error is returned. +func (args Args) WalkValues(field string, op func(value string) error) error { + if _, ok := args.fields[field]; !ok { + return nil + } + for v := range args.fields[field] { + if err := op(v); err != nil { + return err + } + } + return nil +} + +// Clone returns a copy of args. +func (args Args) Clone() (newArgs Args) { + newArgs.fields = make(map[string]map[string]bool, len(args.fields)) + for k, m := range args.fields { + var mm map[string]bool + if m != nil { + mm = make(map[string]bool, len(m)) + for kk, v := range m { + mm[kk] = v + } + } + newArgs.fields[k] = mm + } + return newArgs +} + +func deprecatedArgs(d map[string][]string) map[string]map[string]bool { + m := map[string]map[string]bool{} + for k, v := range d { + values := map[string]bool{} + for _, vv := range v { + values[vv] = true + } + m[k] = values + } + return m +} + +func convertArgsToSlice(f map[string]map[string]bool) map[string][]string { + m := map[string][]string{} + for k, v := range f { + values := []string{} + for kk := range v { + if v[kk] { + values = append(values, kk) + } + } + m[k] = values + } + return m +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/graph_driver_data.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/graph_driver_data.go new file mode 100644 index 000000000000..4d9bf1c62c89 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/graph_driver_data.go @@ -0,0 +1,17 @@ +package types + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// GraphDriverData Information about a container's graph driver. +// swagger:model GraphDriverData +type GraphDriverData struct { + + // data + // Required: true + Data map[string]string `json:"Data"` + + // name + // Required: true + Name string `json:"Name"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/id_response.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/id_response.go new file mode 100644 index 000000000000..7592d2f8b152 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/id_response.go @@ -0,0 +1,13 @@ +package types + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// IDResponse Response to an API call that returns just an Id +// swagger:model IdResponse +type IDResponse struct { + + // The id of the newly created object. + // Required: true + ID string `json:"Id"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/image/image_history.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/image/image_history.go new file mode 100644 index 000000000000..e302bb0aebbe --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/image/image_history.go @@ -0,0 +1,36 @@ +package image // import "github.com/docker/docker/api/types/image" + +// ---------------------------------------------------------------------------- +// Code generated by `swagger generate operation`. DO NOT EDIT. +// +// See hack/generate-swagger-api.sh +// ---------------------------------------------------------------------------- + +// HistoryResponseItem individual image layer information in response to ImageHistory operation +// swagger:model HistoryResponseItem +type HistoryResponseItem struct { + + // comment + // Required: true + Comment string `json:"Comment"` + + // created + // Required: true + Created int64 `json:"Created"` + + // created by + // Required: true + CreatedBy string `json:"CreatedBy"` + + // Id + // Required: true + ID string `json:"Id"` + + // size + // Required: true + Size int64 `json:"Size"` + + // tags + // Required: true + Tags []string `json:"Tags"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/image_delete_response_item.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/image_delete_response_item.go new file mode 100644 index 000000000000..b9a65a0d8e86 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/image_delete_response_item.go @@ -0,0 +1,15 @@ +package types + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// ImageDeleteResponseItem image delete response item +// swagger:model ImageDeleteResponseItem +type ImageDeleteResponseItem struct { + + // The image ID of an image that was deleted + Deleted string `json:"Deleted,omitempty"` + + // The image ID of an image that was untagged + Untagged string `json:"Untagged,omitempty"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/image_summary.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/image_summary.go new file mode 100644 index 000000000000..e145b3dcfcd1 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/image_summary.go @@ -0,0 +1,49 @@ +package types + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// ImageSummary image summary +// swagger:model ImageSummary +type ImageSummary struct { + + // containers + // Required: true + Containers int64 `json:"Containers"` + + // created + // Required: true + Created int64 `json:"Created"` + + // Id + // Required: true + ID string `json:"Id"` + + // labels + // Required: true + Labels map[string]string `json:"Labels"` + + // parent Id + // Required: true + ParentID string `json:"ParentId"` + + // repo digests + // Required: true + RepoDigests []string `json:"RepoDigests"` + + // repo tags + // Required: true + RepoTags []string `json:"RepoTags"` + + // shared size + // Required: true + SharedSize int64 `json:"SharedSize"` + + // size + // Required: true + Size int64 `json:"Size"` + + // virtual size + // Required: true + VirtualSize int64 `json:"VirtualSize"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/mount/mount.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/mount/mount.go new file mode 100644 index 000000000000..443b8d07a9f3 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/mount/mount.go @@ -0,0 +1,131 @@ +package mount // import "github.com/docker/docker/api/types/mount" + +import ( + "os" +) + +// Type represents the type of a mount. +type Type string + +// Type constants +const ( + // TypeBind is the type for mounting host dir + TypeBind Type = "bind" + // TypeVolume is the type for remote storage volumes + TypeVolume Type = "volume" + // TypeTmpfs is the type for mounting tmpfs + TypeTmpfs Type = "tmpfs" + // TypeNamedPipe is the type for mounting Windows named pipes + TypeNamedPipe Type = "npipe" +) + +// Mount represents a mount (volume). +type Mount struct { + Type Type `json:",omitempty"` + // Source specifies the name of the mount. Depending on mount type, this + // may be a volume name or a host path, or even ignored. + // Source is not supported for tmpfs (must be an empty value) + Source string `json:",omitempty"` + Target string `json:",omitempty"` + ReadOnly bool `json:",omitempty"` + Consistency Consistency `json:",omitempty"` + + BindOptions *BindOptions `json:",omitempty"` + VolumeOptions *VolumeOptions `json:",omitempty"` + TmpfsOptions *TmpfsOptions `json:",omitempty"` +} + +// Propagation represents the propagation of a mount. +type Propagation string + +const ( + // PropagationRPrivate RPRIVATE + PropagationRPrivate Propagation = "rprivate" + // PropagationPrivate PRIVATE + PropagationPrivate Propagation = "private" + // PropagationRShared RSHARED + PropagationRShared Propagation = "rshared" + // PropagationShared SHARED + PropagationShared Propagation = "shared" + // PropagationRSlave RSLAVE + PropagationRSlave Propagation = "rslave" + // PropagationSlave SLAVE + PropagationSlave Propagation = "slave" +) + +// Propagations is the list of all valid mount propagations +var Propagations = []Propagation{ + PropagationRPrivate, + PropagationPrivate, + PropagationRShared, + PropagationShared, + PropagationRSlave, + PropagationSlave, +} + +// Consistency represents the consistency requirements of a mount. +type Consistency string + +const ( + // ConsistencyFull guarantees bind mount-like consistency + ConsistencyFull Consistency = "consistent" + // ConsistencyCached mounts can cache read data and FS structure + ConsistencyCached Consistency = "cached" + // ConsistencyDelegated mounts can cache read and written data and structure + ConsistencyDelegated Consistency = "delegated" + // ConsistencyDefault provides "consistent" behavior unless overridden + ConsistencyDefault Consistency = "default" +) + +// BindOptions defines options specific to mounts of type "bind". +type BindOptions struct { + Propagation Propagation `json:",omitempty"` + NonRecursive bool `json:",omitempty"` +} + +// VolumeOptions represents the options for a mount of type volume. +type VolumeOptions struct { + NoCopy bool `json:",omitempty"` + Labels map[string]string `json:",omitempty"` + DriverConfig *Driver `json:",omitempty"` +} + +// Driver represents a volume driver. +type Driver struct { + Name string `json:",omitempty"` + Options map[string]string `json:",omitempty"` +} + +// TmpfsOptions defines options specific to mounts of type "tmpfs". +type TmpfsOptions struct { + // Size sets the size of the tmpfs, in bytes. + // + // This will be converted to an operating system specific value + // depending on the host. For example, on linux, it will be converted to + // use a 'k', 'm' or 'g' syntax. BSD, though not widely supported with + // docker, uses a straight byte value. + // + // Percentages are not supported. + SizeBytes int64 `json:",omitempty"` + // Mode of the tmpfs upon creation + Mode os.FileMode `json:",omitempty"` + + // TODO(stevvooe): There are several more tmpfs flags, specified in the + // daemon, that are accepted. Only the most basic are added for now. + // + // From https://github.com/moby/sys/blob/mount/v0.1.1/mount/flags.go#L47-L56 + // + // var validFlags = map[string]bool{ + // "": true, + // "size": true, X + // "mode": true, X + // "uid": true, + // "gid": true, + // "nr_inodes": true, + // "nr_blocks": true, + // "mpol": true, + // } + // + // Some of these may be straightforward to add, but others, such as + // uid/gid have implications in a clustered system. +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/network/network.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/network/network.go new file mode 100644 index 000000000000..437b184c67b5 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/network/network.go @@ -0,0 +1,126 @@ +package network // import "github.com/docker/docker/api/types/network" +import ( + "github.com/docker/docker/api/types/filters" +) + +// Address represents an IP address +type Address struct { + Addr string + PrefixLen int +} + +// IPAM represents IP Address Management +type IPAM struct { + Driver string + Options map[string]string // Per network IPAM driver options + Config []IPAMConfig +} + +// IPAMConfig represents IPAM configurations +type IPAMConfig struct { + Subnet string `json:",omitempty"` + IPRange string `json:",omitempty"` + Gateway string `json:",omitempty"` + AuxAddress map[string]string `json:"AuxiliaryAddresses,omitempty"` +} + +// EndpointIPAMConfig represents IPAM configurations for the endpoint +type EndpointIPAMConfig struct { + IPv4Address string `json:",omitempty"` + IPv6Address string `json:",omitempty"` + LinkLocalIPs []string `json:",omitempty"` +} + +// Copy makes a copy of the endpoint ipam config +func (cfg *EndpointIPAMConfig) Copy() *EndpointIPAMConfig { + cfgCopy := *cfg + cfgCopy.LinkLocalIPs = make([]string, 0, len(cfg.LinkLocalIPs)) + cfgCopy.LinkLocalIPs = append(cfgCopy.LinkLocalIPs, cfg.LinkLocalIPs...) + return &cfgCopy +} + +// PeerInfo represents one peer of an overlay network +type PeerInfo struct { + Name string + IP string +} + +// EndpointSettings stores the network endpoint details +type EndpointSettings struct { + // Configurations + IPAMConfig *EndpointIPAMConfig + Links []string + Aliases []string + // Operational data + NetworkID string + EndpointID string + Gateway string + IPAddress string + IPPrefixLen int + IPv6Gateway string + GlobalIPv6Address string + GlobalIPv6PrefixLen int + MacAddress string + DriverOpts map[string]string +} + +// Task carries the information about one backend task +type Task struct { + Name string + EndpointID string + EndpointIP string + Info map[string]string +} + +// ServiceInfo represents service parameters with the list of service's tasks +type ServiceInfo struct { + VIP string + Ports []string + LocalLBIndex int + Tasks []Task +} + +// Copy makes a deep copy of `EndpointSettings` +func (es *EndpointSettings) Copy() *EndpointSettings { + epCopy := *es + if es.IPAMConfig != nil { + epCopy.IPAMConfig = es.IPAMConfig.Copy() + } + + if es.Links != nil { + links := make([]string, 0, len(es.Links)) + epCopy.Links = append(links, es.Links...) + } + + if es.Aliases != nil { + aliases := make([]string, 0, len(es.Aliases)) + epCopy.Aliases = append(aliases, es.Aliases...) + } + return &epCopy +} + +// NetworkingConfig represents the container's networking configuration for each of its interfaces +// Carries the networking configs specified in the `docker run` and `docker network connect` commands +type NetworkingConfig struct { + EndpointsConfig map[string]*EndpointSettings // Endpoint configs for each connecting network +} + +// ConfigReference specifies the source which provides a network's configuration +type ConfigReference struct { + Network string +} + +var acceptedFilters = map[string]bool{ + "dangling": true, + "driver": true, + "id": true, + "label": true, + "name": true, + "scope": true, + "type": true, +} + +// ValidateFilters validates the list of filter args with the available filters. +func ValidateFilters(filter filters.Args) error { + return filter.Validate(acceptedFilters) +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/plugin.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/plugin.go new file mode 100644 index 000000000000..abae48b9ab01 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/plugin.go @@ -0,0 +1,203 @@ +package types + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// Plugin A plugin for the Engine API +// swagger:model Plugin +type Plugin struct { + + // config + // Required: true + Config PluginConfig `json:"Config"` + + // True if the plugin is running. False if the plugin is not running, only installed. + // Required: true + Enabled bool `json:"Enabled"` + + // Id + ID string `json:"Id,omitempty"` + + // name + // Required: true + Name string `json:"Name"` + + // plugin remote reference used to push/pull the plugin + PluginReference string `json:"PluginReference,omitempty"` + + // settings + // Required: true + Settings PluginSettings `json:"Settings"` +} + +// PluginConfig The config of a plugin. +// swagger:model PluginConfig +type PluginConfig struct { + + // args + // Required: true + Args PluginConfigArgs `json:"Args"` + + // description + // Required: true + Description string `json:"Description"` + + // Docker Version used to create the plugin + DockerVersion string `json:"DockerVersion,omitempty"` + + // documentation + // Required: true + Documentation string `json:"Documentation"` + + // entrypoint + // Required: true + Entrypoint []string `json:"Entrypoint"` + + // env + // Required: true + Env []PluginEnv `json:"Env"` + + // interface + // Required: true + Interface PluginConfigInterface `json:"Interface"` + + // ipc host + // Required: true + IpcHost bool `json:"IpcHost"` + + // linux + // Required: true + Linux PluginConfigLinux `json:"Linux"` + + // mounts + // Required: true + Mounts []PluginMount `json:"Mounts"` + + // network + // Required: true + Network PluginConfigNetwork `json:"Network"` + + // pid host + // Required: true + PidHost bool `json:"PidHost"` + + // propagated mount + // Required: true + PropagatedMount string `json:"PropagatedMount"` + + // user + User PluginConfigUser `json:"User,omitempty"` + + // work dir + // Required: true + WorkDir string `json:"WorkDir"` + + // rootfs + Rootfs *PluginConfigRootfs `json:"rootfs,omitempty"` +} + +// PluginConfigArgs plugin config args +// swagger:model PluginConfigArgs +type PluginConfigArgs struct { + + // description + // Required: true + Description string `json:"Description"` + + // name + // Required: true + Name string `json:"Name"` + + // settable + // Required: true + Settable []string `json:"Settable"` + + // value + // Required: true + Value []string `json:"Value"` +} + +// PluginConfigInterface The interface between Docker and the plugin +// swagger:model PluginConfigInterface +type PluginConfigInterface struct { + + // Protocol to use for clients connecting to the plugin. + ProtocolScheme string `json:"ProtocolScheme,omitempty"` + + // socket + // Required: true + Socket string `json:"Socket"` + + // types + // Required: true + Types []PluginInterfaceType `json:"Types"` +} + +// PluginConfigLinux plugin config linux +// swagger:model PluginConfigLinux +type PluginConfigLinux struct { + + // allow all devices + // Required: true + AllowAllDevices bool `json:"AllowAllDevices"` + + // capabilities + // Required: true + Capabilities []string `json:"Capabilities"` + + // devices + // Required: true + Devices []PluginDevice `json:"Devices"` +} + +// PluginConfigNetwork plugin config network +// swagger:model PluginConfigNetwork +type PluginConfigNetwork struct { + + // type + // Required: true + Type string `json:"Type"` +} + +// PluginConfigRootfs plugin config rootfs +// swagger:model PluginConfigRootfs +type PluginConfigRootfs struct { + + // diff ids + DiffIds []string `json:"diff_ids"` + + // type + Type string `json:"type,omitempty"` +} + +// PluginConfigUser plugin config user +// swagger:model PluginConfigUser +type PluginConfigUser struct { + + // g ID + GID uint32 `json:"GID,omitempty"` + + // UID + UID uint32 `json:"UID,omitempty"` +} + +// PluginSettings Settings that can be modified by users. +// swagger:model PluginSettings +type PluginSettings struct { + + // args + // Required: true + Args []string `json:"Args"` + + // devices + // Required: true + Devices []PluginDevice `json:"Devices"` + + // env + // Required: true + Env []string `json:"Env"` + + // mounts + // Required: true + Mounts []PluginMount `json:"Mounts"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/plugin_device.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/plugin_device.go new file mode 100644 index 000000000000..569901067559 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/plugin_device.go @@ -0,0 +1,25 @@ +package types + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// PluginDevice plugin device +// swagger:model PluginDevice +type PluginDevice struct { + + // description + // Required: true + Description string `json:"Description"` + + // name + // Required: true + Name string `json:"Name"` + + // path + // Required: true + Path *string `json:"Path"` + + // settable + // Required: true + Settable []string `json:"Settable"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/plugin_env.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/plugin_env.go new file mode 100644 index 000000000000..32962dc2ebea --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/plugin_env.go @@ -0,0 +1,25 @@ +package types + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// PluginEnv plugin env +// swagger:model PluginEnv +type PluginEnv struct { + + // description + // Required: true + Description string `json:"Description"` + + // name + // Required: true + Name string `json:"Name"` + + // settable + // Required: true + Settable []string `json:"Settable"` + + // value + // Required: true + Value *string `json:"Value"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/plugin_interface_type.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/plugin_interface_type.go new file mode 100644 index 000000000000..c82f204e8708 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/plugin_interface_type.go @@ -0,0 +1,21 @@ +package types + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// PluginInterfaceType plugin interface type +// swagger:model PluginInterfaceType +type PluginInterfaceType struct { + + // capability + // Required: true + Capability string `json:"Capability"` + + // prefix + // Required: true + Prefix string `json:"Prefix"` + + // version + // Required: true + Version string `json:"Version"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/plugin_mount.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/plugin_mount.go new file mode 100644 index 000000000000..5c031cf8b5cc --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/plugin_mount.go @@ -0,0 +1,37 @@ +package types + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// PluginMount plugin mount +// swagger:model PluginMount +type PluginMount struct { + + // description + // Required: true + Description string `json:"Description"` + + // destination + // Required: true + Destination string `json:"Destination"` + + // name + // Required: true + Name string `json:"Name"` + + // options + // Required: true + Options []string `json:"Options"` + + // settable + // Required: true + Settable []string `json:"Settable"` + + // source + // Required: true + Source *string `json:"Source"` + + // type + // Required: true + Type string `json:"Type"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/plugin_responses.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/plugin_responses.go new file mode 100644 index 000000000000..60d1fb5ad855 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/plugin_responses.go @@ -0,0 +1,71 @@ +package types // import "github.com/docker/docker/api/types" + +import ( + "encoding/json" + "fmt" + "sort" +) + +// PluginsListResponse contains the response for the Engine API +type PluginsListResponse []*Plugin + +// UnmarshalJSON implements json.Unmarshaler for PluginInterfaceType +func (t *PluginInterfaceType) UnmarshalJSON(p []byte) error { + versionIndex := len(p) + prefixIndex := 0 + if len(p) < 2 || p[0] != '"' || p[len(p)-1] != '"' { + return fmt.Errorf("%q is not a plugin interface type", p) + } + p = p[1 : len(p)-1] +loop: + for i, b := range p { + switch b { + case '.': + prefixIndex = i + case '/': + versionIndex = i + break loop + } + } + t.Prefix = string(p[:prefixIndex]) + t.Capability = string(p[prefixIndex+1 : versionIndex]) + if versionIndex < len(p) { + t.Version = string(p[versionIndex+1:]) + } + return nil +} + +// MarshalJSON implements json.Marshaler for PluginInterfaceType +func (t *PluginInterfaceType) MarshalJSON() ([]byte, error) { + return json.Marshal(t.String()) +} + +// String implements fmt.Stringer for PluginInterfaceType +func (t PluginInterfaceType) String() string { + return fmt.Sprintf("%s.%s/%s", t.Prefix, t.Capability, t.Version) +} + +// PluginPrivilege describes a permission the user has to accept +// upon installing a plugin. +type PluginPrivilege struct { + Name string + Description string + Value []string +} + +// PluginPrivileges is a list of PluginPrivilege +type PluginPrivileges []PluginPrivilege + +func (s PluginPrivileges) Len() int { + return len(s) +} + +func (s PluginPrivileges) Less(i, j int) bool { + return s[i].Name < s[j].Name +} + +func (s PluginPrivileges) Swap(i, j int) { + sort.Strings(s[i].Value) + sort.Strings(s[j].Value) + s[i], s[j] = s[j], s[i] +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/port.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/port.go new file mode 100644 index 000000000000..d91234744c6b --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/port.go @@ -0,0 +1,23 @@ +package types + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// Port An open port on a container +// swagger:model Port +type Port struct { + + // Host IP address that the container's port is mapped to + IP string `json:"IP,omitempty"` + + // Port on the container + // Required: true + PrivatePort uint16 `json:"PrivatePort"` + + // Port exposed on the host + PublicPort uint16 `json:"PublicPort,omitempty"` + + // type + // Required: true + Type string `json:"Type"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/registry/authenticate.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/registry/authenticate.go new file mode 100644 index 000000000000..f0a2113e405a --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/registry/authenticate.go @@ -0,0 +1,21 @@ +package registry // import "github.com/docker/docker/api/types/registry" + +// ---------------------------------------------------------------------------- +// DO NOT EDIT THIS FILE +// This file was generated by `swagger generate operation` +// +// See hack/generate-swagger-api.sh +// ---------------------------------------------------------------------------- + +// AuthenticateOKBody authenticate o k body +// swagger:model AuthenticateOKBody +type AuthenticateOKBody struct { + + // An opaque token used to authenticate a user after a successful login + // Required: true + IdentityToken string `json:"IdentityToken"` + + // The status of the authentication + // Required: true + Status string `json:"Status"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/registry/registry.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/registry/registry.go new file mode 100644 index 000000000000..53e47084c8d5 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/registry/registry.go @@ -0,0 +1,119 @@ +package registry // import "github.com/docker/docker/api/types/registry" + +import ( + "encoding/json" + "net" + + v1 "github.com/opencontainers/image-spec/specs-go/v1" +) + +// ServiceConfig stores daemon registry services configuration. +type ServiceConfig struct { + AllowNondistributableArtifactsCIDRs []*NetIPNet + AllowNondistributableArtifactsHostnames []string + InsecureRegistryCIDRs []*NetIPNet `json:"InsecureRegistryCIDRs"` + IndexConfigs map[string]*IndexInfo `json:"IndexConfigs"` + Mirrors []string +} + +// NetIPNet is the net.IPNet type, which can be marshalled and +// unmarshalled to JSON +type NetIPNet net.IPNet + +// String returns the CIDR notation of ipnet +func (ipnet *NetIPNet) String() string { + return (*net.IPNet)(ipnet).String() +} + +// MarshalJSON returns the JSON representation of the IPNet +func (ipnet *NetIPNet) MarshalJSON() ([]byte, error) { + return json.Marshal((*net.IPNet)(ipnet).String()) +} + +// UnmarshalJSON sets the IPNet from a byte array of JSON +func (ipnet *NetIPNet) UnmarshalJSON(b []byte) (err error) { + var ipnetStr string + if err = json.Unmarshal(b, &ipnetStr); err == nil { + var cidr *net.IPNet + if _, cidr, err = net.ParseCIDR(ipnetStr); err == nil { + *ipnet = NetIPNet(*cidr) + } + } + return +} + +// IndexInfo contains information about a registry +// +// RepositoryInfo Examples: +// { +// "Index" : { +// "Name" : "docker.io", +// "Mirrors" : ["https://registry-2.docker.io/v1/", "https://registry-3.docker.io/v1/"], +// "Secure" : true, +// "Official" : true, +// }, +// "RemoteName" : "library/debian", +// "LocalName" : "debian", +// "CanonicalName" : "docker.io/debian" +// "Official" : true, +// } +// +// { +// "Index" : { +// "Name" : "127.0.0.1:5000", +// "Mirrors" : [], +// "Secure" : false, +// "Official" : false, +// }, +// "RemoteName" : "user/repo", +// "LocalName" : "127.0.0.1:5000/user/repo", +// "CanonicalName" : "127.0.0.1:5000/user/repo", +// "Official" : false, +// } +type IndexInfo struct { + // Name is the name of the registry, such as "docker.io" + Name string + // Mirrors is a list of mirrors, expressed as URIs + Mirrors []string + // Secure is set to false if the registry is part of the list of + // insecure registries. Insecure registries accept HTTP and/or accept + // HTTPS with certificates from unknown CAs. + Secure bool + // Official indicates whether this is an official registry + Official bool +} + +// SearchResult describes a search result returned from a registry +type SearchResult struct { + // StarCount indicates the number of stars this repository has + StarCount int `json:"star_count"` + // IsOfficial is true if the result is from an official repository. + IsOfficial bool `json:"is_official"` + // Name is the name of the repository + Name string `json:"name"` + // IsAutomated indicates whether the result is automated + IsAutomated bool `json:"is_automated"` + // Description is a textual description of the repository + Description string `json:"description"` +} + +// SearchResults lists a collection search results returned from a registry +type SearchResults struct { + // Query contains the query string that generated the search results + Query string `json:"query"` + // NumResults indicates the number of results the query returned + NumResults int `json:"num_results"` + // Results is a slice containing the actual results for the search + Results []SearchResult `json:"results"` +} + +// DistributionInspect describes the result obtained from contacting the +// registry to retrieve image metadata +type DistributionInspect struct { + // Descriptor contains information about the manifest, including + // the content addressable digest + Descriptor v1.Descriptor + // Platforms contains the list of platforms supported by the image, + // obtained by parsing the manifest + Platforms []v1.Platform +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/service_update_response.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/service_update_response.go new file mode 100644 index 000000000000..74ea64b1bb67 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/service_update_response.go @@ -0,0 +1,12 @@ +package types + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// ServiceUpdateResponse service update response +// swagger:model ServiceUpdateResponse +type ServiceUpdateResponse struct { + + // Optional warning messages + Warnings []string `json:"Warnings"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/stats.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/stats.go new file mode 100644 index 000000000000..20daebed14bd --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/stats.go @@ -0,0 +1,181 @@ +// Package types is used for API stability in the types and response to the +// consumers of the API stats endpoint. +package types // import "github.com/docker/docker/api/types" + +import "time" + +// ThrottlingData stores CPU throttling stats of one running container. +// Not used on Windows. +type ThrottlingData struct { + // Number of periods with throttling active + Periods uint64 `json:"periods"` + // Number of periods when the container hits its throttling limit. + ThrottledPeriods uint64 `json:"throttled_periods"` + // Aggregate time the container was throttled for in nanoseconds. + ThrottledTime uint64 `json:"throttled_time"` +} + +// CPUUsage stores All CPU stats aggregated since container inception. +type CPUUsage struct { + // Total CPU time consumed. + // Units: nanoseconds (Linux) + // Units: 100's of nanoseconds (Windows) + TotalUsage uint64 `json:"total_usage"` + + // Total CPU time consumed per core (Linux). Not used on Windows. + // Units: nanoseconds. + PercpuUsage []uint64 `json:"percpu_usage,omitempty"` + + // Time spent by tasks of the cgroup in kernel mode (Linux). + // Time spent by all container processes in kernel mode (Windows). + // Units: nanoseconds (Linux). + // Units: 100's of nanoseconds (Windows). Not populated for Hyper-V Containers. + UsageInKernelmode uint64 `json:"usage_in_kernelmode"` + + // Time spent by tasks of the cgroup in user mode (Linux). + // Time spent by all container processes in user mode (Windows). + // Units: nanoseconds (Linux). + // Units: 100's of nanoseconds (Windows). Not populated for Hyper-V Containers + UsageInUsermode uint64 `json:"usage_in_usermode"` +} + +// CPUStats aggregates and wraps all CPU related info of container +type CPUStats struct { + // CPU Usage. Linux and Windows. + CPUUsage CPUUsage `json:"cpu_usage"` + + // System Usage. Linux only. + SystemUsage uint64 `json:"system_cpu_usage,omitempty"` + + // Online CPUs. Linux only. + OnlineCPUs uint32 `json:"online_cpus,omitempty"` + + // Throttling Data. Linux only. + ThrottlingData ThrottlingData `json:"throttling_data,omitempty"` +} + +// MemoryStats aggregates all memory stats since container inception on Linux. +// Windows returns stats for commit and private working set only. +type MemoryStats struct { + // Linux Memory Stats + + // current res_counter usage for memory + Usage uint64 `json:"usage,omitempty"` + // maximum usage ever recorded. + MaxUsage uint64 `json:"max_usage,omitempty"` + // TODO(vishh): Export these as stronger types. + // all the stats exported via memory.stat. + Stats map[string]uint64 `json:"stats,omitempty"` + // number of times memory usage hits limits. + Failcnt uint64 `json:"failcnt,omitempty"` + Limit uint64 `json:"limit,omitempty"` + + // Windows Memory Stats + // See https://technet.microsoft.com/en-us/magazine/ff382715.aspx + + // committed bytes + Commit uint64 `json:"commitbytes,omitempty"` + // peak committed bytes + CommitPeak uint64 `json:"commitpeakbytes,omitempty"` + // private working set + PrivateWorkingSet uint64 `json:"privateworkingset,omitempty"` +} + +// BlkioStatEntry is one small entity to store a piece of Blkio stats +// Not used on Windows. +type BlkioStatEntry struct { + Major uint64 `json:"major"` + Minor uint64 `json:"minor"` + Op string `json:"op"` + Value uint64 `json:"value"` +} + +// BlkioStats stores All IO service stats for data read and write. +// This is a Linux specific structure as the differences between expressing +// block I/O on Windows and Linux are sufficiently significant to make +// little sense attempting to morph into a combined structure. +type BlkioStats struct { + // number of bytes transferred to and from the block device + IoServiceBytesRecursive []BlkioStatEntry `json:"io_service_bytes_recursive"` + IoServicedRecursive []BlkioStatEntry `json:"io_serviced_recursive"` + IoQueuedRecursive []BlkioStatEntry `json:"io_queue_recursive"` + IoServiceTimeRecursive []BlkioStatEntry `json:"io_service_time_recursive"` + IoWaitTimeRecursive []BlkioStatEntry `json:"io_wait_time_recursive"` + IoMergedRecursive []BlkioStatEntry `json:"io_merged_recursive"` + IoTimeRecursive []BlkioStatEntry `json:"io_time_recursive"` + SectorsRecursive []BlkioStatEntry `json:"sectors_recursive"` +} + +// StorageStats is the disk I/O stats for read/write on Windows. +type StorageStats struct { + ReadCountNormalized uint64 `json:"read_count_normalized,omitempty"` + ReadSizeBytes uint64 `json:"read_size_bytes,omitempty"` + WriteCountNormalized uint64 `json:"write_count_normalized,omitempty"` + WriteSizeBytes uint64 `json:"write_size_bytes,omitempty"` +} + +// NetworkStats aggregates the network stats of one container +type NetworkStats struct { + // Bytes received. Windows and Linux. + RxBytes uint64 `json:"rx_bytes"` + // Packets received. Windows and Linux. + RxPackets uint64 `json:"rx_packets"` + // Received errors. Not used on Windows. Note that we don't `omitempty` this + // field as it is expected in the >=v1.21 API stats structure. + RxErrors uint64 `json:"rx_errors"` + // Incoming packets dropped. Windows and Linux. + RxDropped uint64 `json:"rx_dropped"` + // Bytes sent. Windows and Linux. + TxBytes uint64 `json:"tx_bytes"` + // Packets sent. Windows and Linux. + TxPackets uint64 `json:"tx_packets"` + // Sent errors. Not used on Windows. Note that we don't `omitempty` this + // field as it is expected in the >=v1.21 API stats structure. + TxErrors uint64 `json:"tx_errors"` + // Outgoing packets dropped. Windows and Linux. + TxDropped uint64 `json:"tx_dropped"` + // Endpoint ID. Not used on Linux. + EndpointID string `json:"endpoint_id,omitempty"` + // Instance ID. Not used on Linux. + InstanceID string `json:"instance_id,omitempty"` +} + +// PidsStats contains the stats of a container's pids +type PidsStats struct { + // Current is the number of pids in the cgroup + Current uint64 `json:"current,omitempty"` + // Limit is the hard limit on the number of pids in the cgroup. + // A "Limit" of 0 means that there is no limit. + Limit uint64 `json:"limit,omitempty"` +} + +// Stats is Ultimate struct aggregating all types of stats of one container +type Stats struct { + // Common stats + Read time.Time `json:"read"` + PreRead time.Time `json:"preread"` + + // Linux specific stats, not populated on Windows. + PidsStats PidsStats `json:"pids_stats,omitempty"` + BlkioStats BlkioStats `json:"blkio_stats,omitempty"` + + // Windows specific stats, not populated on Linux. + NumProcs uint32 `json:"num_procs"` + StorageStats StorageStats `json:"storage_stats,omitempty"` + + // Shared stats + CPUStats CPUStats `json:"cpu_stats,omitempty"` + PreCPUStats CPUStats `json:"precpu_stats,omitempty"` // "Pre"="Previous" + MemoryStats MemoryStats `json:"memory_stats,omitempty"` +} + +// StatsJSON is newly used Networks +type StatsJSON struct { + Stats + + Name string `json:"name,omitempty"` + ID string `json:"id,omitempty"` + + // Networks request version >=1.21 + Networks map[string]NetworkStats `json:"networks,omitempty"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/strslice/strslice.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/strslice/strslice.go new file mode 100644 index 000000000000..82921cebc150 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/strslice/strslice.go @@ -0,0 +1,30 @@ +package strslice // import "github.com/docker/docker/api/types/strslice" + +import "encoding/json" + +// StrSlice represents a string or an array of strings. +// We need to override the json decoder to accept both options. +type StrSlice []string + +// UnmarshalJSON decodes the byte slice whether it's a string or an array of +// strings. This method is needed to implement json.Unmarshaler. +func (e *StrSlice) UnmarshalJSON(b []byte) error { + if len(b) == 0 { + // With no input, we preserve the existing value by returning nil and + // leaving the target alone. This allows defining default values for + // the type. + return nil + } + + p := make([]string, 0, 1) + if err := json.Unmarshal(b, &p); err != nil { + var s string + if err := json.Unmarshal(b, &s); err != nil { + return err + } + p = append(p, s) + } + + *e = p + return nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/common.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/common.go new file mode 100644 index 000000000000..ef020f458bd4 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/common.go @@ -0,0 +1,40 @@ +package swarm // import "github.com/docker/docker/api/types/swarm" + +import "time" + +// Version represents the internal object version. +type Version struct { + Index uint64 `json:",omitempty"` +} + +// Meta is a base object inherited by most of the other once. +type Meta struct { + Version Version `json:",omitempty"` + CreatedAt time.Time `json:",omitempty"` + UpdatedAt time.Time `json:",omitempty"` +} + +// Annotations represents how to describe an object. +type Annotations struct { + Name string `json:",omitempty"` + Labels map[string]string `json:"Labels"` +} + +// Driver represents a driver (network, logging, secrets backend). +type Driver struct { + Name string `json:",omitempty"` + Options map[string]string `json:",omitempty"` +} + +// TLSInfo represents the TLS information about what CA certificate is trusted, +// and who the issuer for a TLS certificate is +type TLSInfo struct { + // TrustRoot is the trusted CA root certificate in PEM format + TrustRoot string `json:",omitempty"` + + // CertIssuer is the raw subject bytes of the issuer + CertIssuerSubject []byte `json:",omitempty"` + + // CertIssuerPublicKey is the raw public key bytes of the issuer + CertIssuerPublicKey []byte `json:",omitempty"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/config.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/config.go new file mode 100644 index 000000000000..16202ccce615 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/config.go @@ -0,0 +1,40 @@ +package swarm // import "github.com/docker/docker/api/types/swarm" + +import "os" + +// Config represents a config. +type Config struct { + ID string + Meta + Spec ConfigSpec +} + +// ConfigSpec represents a config specification from a config in swarm +type ConfigSpec struct { + Annotations + Data []byte `json:",omitempty"` + + // Templating controls whether and how to evaluate the config payload as + // a template. If it is not set, no templating is used. + Templating *Driver `json:",omitempty"` +} + +// ConfigReferenceFileTarget is a file target in a config reference +type ConfigReferenceFileTarget struct { + Name string + UID string + GID string + Mode os.FileMode +} + +// ConfigReferenceRuntimeTarget is a target for a config specifying that it +// isn't mounted into the container but instead has some other purpose. +type ConfigReferenceRuntimeTarget struct{} + +// ConfigReference is a reference to a config in swarm +type ConfigReference struct { + File *ConfigReferenceFileTarget `json:",omitempty"` + Runtime *ConfigReferenceRuntimeTarget `json:",omitempty"` + ConfigID string + ConfigName string +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/container.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/container.go new file mode 100644 index 000000000000..af5e1c0bc279 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/container.go @@ -0,0 +1,80 @@ +package swarm // import "github.com/docker/docker/api/types/swarm" + +import ( + "time" + + "github.com/docker/docker/api/types/container" + "github.com/docker/docker/api/types/mount" + "github.com/docker/go-units" +) + +// DNSConfig specifies DNS related configurations in resolver configuration file (resolv.conf) +// Detailed documentation is available in: +// http://man7.org/linux/man-pages/man5/resolv.conf.5.html +// `nameserver`, `search`, `options` have been supported. +// TODO: `domain` is not supported yet. +type DNSConfig struct { + // Nameservers specifies the IP addresses of the name servers + Nameservers []string `json:",omitempty"` + // Search specifies the search list for host-name lookup + Search []string `json:",omitempty"` + // Options allows certain internal resolver variables to be modified + Options []string `json:",omitempty"` +} + +// SELinuxContext contains the SELinux labels of the container. +type SELinuxContext struct { + Disable bool + + User string + Role string + Type string + Level string +} + +// CredentialSpec for managed service account (Windows only) +type CredentialSpec struct { + Config string + File string + Registry string +} + +// Privileges defines the security options for the container. +type Privileges struct { + CredentialSpec *CredentialSpec + SELinuxContext *SELinuxContext +} + +// ContainerSpec represents the spec of a container. +type ContainerSpec struct { + Image string `json:",omitempty"` + Labels map[string]string `json:",omitempty"` + Command []string `json:",omitempty"` + Args []string `json:",omitempty"` + Hostname string `json:",omitempty"` + Env []string `json:",omitempty"` + Dir string `json:",omitempty"` + User string `json:",omitempty"` + Groups []string `json:",omitempty"` + Privileges *Privileges `json:",omitempty"` + Init *bool `json:",omitempty"` + StopSignal string `json:",omitempty"` + TTY bool `json:",omitempty"` + OpenStdin bool `json:",omitempty"` + ReadOnly bool `json:",omitempty"` + Mounts []mount.Mount `json:",omitempty"` + StopGracePeriod *time.Duration `json:",omitempty"` + Healthcheck *container.HealthConfig `json:",omitempty"` + // The format of extra hosts on swarmkit is specified in: + // http://man7.org/linux/man-pages/man5/hosts.5.html + // IP_address canonical_hostname [aliases...] + Hosts []string `json:",omitempty"` + DNSConfig *DNSConfig `json:",omitempty"` + Secrets []*SecretReference `json:",omitempty"` + Configs []*ConfigReference `json:",omitempty"` + Isolation container.Isolation `json:",omitempty"` + Sysctls map[string]string `json:",omitempty"` + CapabilityAdd []string `json:",omitempty"` + CapabilityDrop []string `json:",omitempty"` + Ulimits []*units.Ulimit `json:",omitempty"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/network.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/network.go new file mode 100644 index 000000000000..98ef3284d1da --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/network.go @@ -0,0 +1,121 @@ +package swarm // import "github.com/docker/docker/api/types/swarm" + +import ( + "github.com/docker/docker/api/types/network" +) + +// Endpoint represents an endpoint. +type Endpoint struct { + Spec EndpointSpec `json:",omitempty"` + Ports []PortConfig `json:",omitempty"` + VirtualIPs []EndpointVirtualIP `json:",omitempty"` +} + +// EndpointSpec represents the spec of an endpoint. +type EndpointSpec struct { + Mode ResolutionMode `json:",omitempty"` + Ports []PortConfig `json:",omitempty"` +} + +// ResolutionMode represents a resolution mode. +type ResolutionMode string + +const ( + // ResolutionModeVIP VIP + ResolutionModeVIP ResolutionMode = "vip" + // ResolutionModeDNSRR DNSRR + ResolutionModeDNSRR ResolutionMode = "dnsrr" +) + +// PortConfig represents the config of a port. +type PortConfig struct { + Name string `json:",omitempty"` + Protocol PortConfigProtocol `json:",omitempty"` + // TargetPort is the port inside the container + TargetPort uint32 `json:",omitempty"` + // PublishedPort is the port on the swarm hosts + PublishedPort uint32 `json:",omitempty"` + // PublishMode is the mode in which port is published + PublishMode PortConfigPublishMode `json:",omitempty"` +} + +// PortConfigPublishMode represents the mode in which the port is to +// be published. +type PortConfigPublishMode string + +const ( + // PortConfigPublishModeIngress is used for ports published + // for ingress load balancing using routing mesh. + PortConfigPublishModeIngress PortConfigPublishMode = "ingress" + // PortConfigPublishModeHost is used for ports published + // for direct host level access on the host where the task is running. + PortConfigPublishModeHost PortConfigPublishMode = "host" +) + +// PortConfigProtocol represents the protocol of a port. +type PortConfigProtocol string + +const ( + // TODO(stevvooe): These should be used generally, not just for PortConfig. + + // PortConfigProtocolTCP TCP + PortConfigProtocolTCP PortConfigProtocol = "tcp" + // PortConfigProtocolUDP UDP + PortConfigProtocolUDP PortConfigProtocol = "udp" + // PortConfigProtocolSCTP SCTP + PortConfigProtocolSCTP PortConfigProtocol = "sctp" +) + +// EndpointVirtualIP represents the virtual ip of a port. +type EndpointVirtualIP struct { + NetworkID string `json:",omitempty"` + Addr string `json:",omitempty"` +} + +// Network represents a network. +type Network struct { + ID string + Meta + Spec NetworkSpec `json:",omitempty"` + DriverState Driver `json:",omitempty"` + IPAMOptions *IPAMOptions `json:",omitempty"` +} + +// NetworkSpec represents the spec of a network. +type NetworkSpec struct { + Annotations + DriverConfiguration *Driver `json:",omitempty"` + IPv6Enabled bool `json:",omitempty"` + Internal bool `json:",omitempty"` + Attachable bool `json:",omitempty"` + Ingress bool `json:",omitempty"` + IPAMOptions *IPAMOptions `json:",omitempty"` + ConfigFrom *network.ConfigReference `json:",omitempty"` + Scope string `json:",omitempty"` +} + +// NetworkAttachmentConfig represents the configuration of a network attachment. +type NetworkAttachmentConfig struct { + Target string `json:",omitempty"` + Aliases []string `json:",omitempty"` + DriverOpts map[string]string `json:",omitempty"` +} + +// NetworkAttachment represents a network attachment. +type NetworkAttachment struct { + Network Network `json:",omitempty"` + Addresses []string `json:",omitempty"` +} + +// IPAMOptions represents ipam options. +type IPAMOptions struct { + Driver Driver `json:",omitempty"` + Configs []IPAMConfig `json:",omitempty"` +} + +// IPAMConfig represents ipam configuration. +type IPAMConfig struct { + Subnet string `json:",omitempty"` + Range string `json:",omitempty"` + Gateway string `json:",omitempty"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/node.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/node.go new file mode 100644 index 000000000000..1e30f5fa10dd --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/node.go @@ -0,0 +1,115 @@ +package swarm // import "github.com/docker/docker/api/types/swarm" + +// Node represents a node. +type Node struct { + ID string + Meta + // Spec defines the desired state of the node as specified by the user. + // The system will honor this and will *never* modify it. + Spec NodeSpec `json:",omitempty"` + // Description encapsulates the properties of the Node as reported by the + // agent. + Description NodeDescription `json:",omitempty"` + // Status provides the current status of the node, as seen by the manager. + Status NodeStatus `json:",omitempty"` + // ManagerStatus provides the current status of the node's manager + // component, if the node is a manager. + ManagerStatus *ManagerStatus `json:",omitempty"` +} + +// NodeSpec represents the spec of a node. +type NodeSpec struct { + Annotations + Role NodeRole `json:",omitempty"` + Availability NodeAvailability `json:",omitempty"` +} + +// NodeRole represents the role of a node. +type NodeRole string + +const ( + // NodeRoleWorker WORKER + NodeRoleWorker NodeRole = "worker" + // NodeRoleManager MANAGER + NodeRoleManager NodeRole = "manager" +) + +// NodeAvailability represents the availability of a node. +type NodeAvailability string + +const ( + // NodeAvailabilityActive ACTIVE + NodeAvailabilityActive NodeAvailability = "active" + // NodeAvailabilityPause PAUSE + NodeAvailabilityPause NodeAvailability = "pause" + // NodeAvailabilityDrain DRAIN + NodeAvailabilityDrain NodeAvailability = "drain" +) + +// NodeDescription represents the description of a node. +type NodeDescription struct { + Hostname string `json:",omitempty"` + Platform Platform `json:",omitempty"` + Resources Resources `json:",omitempty"` + Engine EngineDescription `json:",omitempty"` + TLSInfo TLSInfo `json:",omitempty"` +} + +// Platform represents the platform (Arch/OS). +type Platform struct { + Architecture string `json:",omitempty"` + OS string `json:",omitempty"` +} + +// EngineDescription represents the description of an engine. +type EngineDescription struct { + EngineVersion string `json:",omitempty"` + Labels map[string]string `json:",omitempty"` + Plugins []PluginDescription `json:",omitempty"` +} + +// PluginDescription represents the description of an engine plugin. +type PluginDescription struct { + Type string `json:",omitempty"` + Name string `json:",omitempty"` +} + +// NodeStatus represents the status of a node. +type NodeStatus struct { + State NodeState `json:",omitempty"` + Message string `json:",omitempty"` + Addr string `json:",omitempty"` +} + +// Reachability represents the reachability of a node. +type Reachability string + +const ( + // ReachabilityUnknown UNKNOWN + ReachabilityUnknown Reachability = "unknown" + // ReachabilityUnreachable UNREACHABLE + ReachabilityUnreachable Reachability = "unreachable" + // ReachabilityReachable REACHABLE + ReachabilityReachable Reachability = "reachable" +) + +// ManagerStatus represents the status of a manager. +type ManagerStatus struct { + Leader bool `json:",omitempty"` + Reachability Reachability `json:",omitempty"` + Addr string `json:",omitempty"` +} + +// NodeState represents the state of a node. +type NodeState string + +const ( + // NodeStateUnknown UNKNOWN + NodeStateUnknown NodeState = "unknown" + // NodeStateDown DOWN + NodeStateDown NodeState = "down" + // NodeStateReady READY + NodeStateReady NodeState = "ready" + // NodeStateDisconnected DISCONNECTED + NodeStateDisconnected NodeState = "disconnected" +) diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/runtime.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/runtime.go new file mode 100644 index 000000000000..0c77403ccff9 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/runtime.go @@ -0,0 +1,27 @@ +package swarm // import "github.com/docker/docker/api/types/swarm" + +// RuntimeType is the type of runtime used for the TaskSpec +type RuntimeType string + +// RuntimeURL is the proto type url +type RuntimeURL string + +const ( + // RuntimeContainer is the container based runtime + RuntimeContainer RuntimeType = "container" + // RuntimePlugin is the plugin based runtime + RuntimePlugin RuntimeType = "plugin" + // RuntimeNetworkAttachment is the network attachment runtime + RuntimeNetworkAttachment RuntimeType = "attachment" + + // RuntimeURLContainer is the proto url for the container type + RuntimeURLContainer RuntimeURL = "types.docker.com/RuntimeContainer" + // RuntimeURLPlugin is the proto url for the plugin type + RuntimeURLPlugin RuntimeURL = "types.docker.com/RuntimePlugin" +) + +// NetworkAttachmentSpec represents the runtime spec type for network +// attachment tasks +type NetworkAttachmentSpec struct { + ContainerID string +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/runtime/gen.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/runtime/gen.go new file mode 100644 index 000000000000..98c2806c31dc --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/runtime/gen.go @@ -0,0 +1,3 @@ +//go:generate protoc -I . --gogofast_out=import_path=github.com/docker/docker/api/types/swarm/runtime:. plugin.proto + +package runtime // import "github.com/docker/docker/api/types/swarm/runtime" diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/runtime/plugin.pb.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/runtime/plugin.pb.go new file mode 100644 index 000000000000..e45045866a6e --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/runtime/plugin.pb.go @@ -0,0 +1,754 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: plugin.proto + +/* + Package runtime is a generated protocol buffer package. + + It is generated from these files: + plugin.proto + + It has these top-level messages: + PluginSpec + PluginPrivilege +*/ +package runtime + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +// PluginSpec defines the base payload which clients can specify for creating +// a service with the plugin runtime. +type PluginSpec struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Remote string `protobuf:"bytes,2,opt,name=remote,proto3" json:"remote,omitempty"` + Privileges []*PluginPrivilege `protobuf:"bytes,3,rep,name=privileges" json:"privileges,omitempty"` + Disabled bool `protobuf:"varint,4,opt,name=disabled,proto3" json:"disabled,omitempty"` + Env []string `protobuf:"bytes,5,rep,name=env" json:"env,omitempty"` +} + +func (m *PluginSpec) Reset() { *m = PluginSpec{} } +func (m *PluginSpec) String() string { return proto.CompactTextString(m) } +func (*PluginSpec) ProtoMessage() {} +func (*PluginSpec) Descriptor() ([]byte, []int) { return fileDescriptorPlugin, []int{0} } + +func (m *PluginSpec) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *PluginSpec) GetRemote() string { + if m != nil { + return m.Remote + } + return "" +} + +func (m *PluginSpec) GetPrivileges() []*PluginPrivilege { + if m != nil { + return m.Privileges + } + return nil +} + +func (m *PluginSpec) GetDisabled() bool { + if m != nil { + return m.Disabled + } + return false +} + +func (m *PluginSpec) GetEnv() []string { + if m != nil { + return m.Env + } + return nil +} + +// PluginPrivilege describes a permission the user has to accept +// upon installing a plugin. +type PluginPrivilege struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Value []string `protobuf:"bytes,3,rep,name=value" json:"value,omitempty"` +} + +func (m *PluginPrivilege) Reset() { *m = PluginPrivilege{} } +func (m *PluginPrivilege) String() string { return proto.CompactTextString(m) } +func (*PluginPrivilege) ProtoMessage() {} +func (*PluginPrivilege) Descriptor() ([]byte, []int) { return fileDescriptorPlugin, []int{1} } + +func (m *PluginPrivilege) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *PluginPrivilege) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *PluginPrivilege) GetValue() []string { + if m != nil { + return m.Value + } + return nil +} + +func init() { + proto.RegisterType((*PluginSpec)(nil), "PluginSpec") + proto.RegisterType((*PluginPrivilege)(nil), "PluginPrivilege") +} +func (m *PluginSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PluginSpec) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintPlugin(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if len(m.Remote) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintPlugin(dAtA, i, uint64(len(m.Remote))) + i += copy(dAtA[i:], m.Remote) + } + if len(m.Privileges) > 0 { + for _, msg := range m.Privileges { + dAtA[i] = 0x1a + i++ + i = encodeVarintPlugin(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Disabled { + dAtA[i] = 0x20 + i++ + if m.Disabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if len(m.Env) > 0 { + for _, s := range m.Env { + dAtA[i] = 0x2a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + +func (m *PluginPrivilege) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PluginPrivilege) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintPlugin(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if len(m.Description) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintPlugin(dAtA, i, uint64(len(m.Description))) + i += copy(dAtA[i:], m.Description) + } + if len(m.Value) > 0 { + for _, s := range m.Value { + dAtA[i] = 0x1a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + +func encodeVarintPlugin(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *PluginSpec) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovPlugin(uint64(l)) + } + l = len(m.Remote) + if l > 0 { + n += 1 + l + sovPlugin(uint64(l)) + } + if len(m.Privileges) > 0 { + for _, e := range m.Privileges { + l = e.Size() + n += 1 + l + sovPlugin(uint64(l)) + } + } + if m.Disabled { + n += 2 + } + if len(m.Env) > 0 { + for _, s := range m.Env { + l = len(s) + n += 1 + l + sovPlugin(uint64(l)) + } + } + return n +} + +func (m *PluginPrivilege) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovPlugin(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovPlugin(uint64(l)) + } + if len(m.Value) > 0 { + for _, s := range m.Value { + l = len(s) + n += 1 + l + sovPlugin(uint64(l)) + } + } + return n +} + +func sovPlugin(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozPlugin(x uint64) (n int) { + return sovPlugin(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *PluginSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlugin + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PluginSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PluginSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlugin + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPlugin + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Remote", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlugin + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPlugin + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Remote = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Privileges", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlugin + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPlugin + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Privileges = append(m.Privileges, &PluginPrivilege{}) + if err := m.Privileges[len(m.Privileges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Disabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlugin + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Disabled = bool(v != 0) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlugin + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPlugin + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Env = append(m.Env, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPlugin(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPlugin + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PluginPrivilege) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlugin + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PluginPrivilege: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PluginPrivilege: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlugin + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPlugin + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlugin + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPlugin + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlugin + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPlugin + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPlugin(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPlugin + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipPlugin(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPlugin + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPlugin + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPlugin + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthPlugin + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPlugin + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipPlugin(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthPlugin = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPlugin = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("plugin.proto", fileDescriptorPlugin) } + +var fileDescriptorPlugin = []byte{ + // 256 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0x4d, 0x4b, 0xc3, 0x30, + 0x18, 0xc7, 0x89, 0xdd, 0xc6, 0xfa, 0x4c, 0x70, 0x04, 0x91, 0xe2, 0xa1, 0x94, 0x9d, 0x7a, 0x6a, + 0x45, 0x2f, 0x82, 0x37, 0x0f, 0x9e, 0x47, 0xbc, 0x09, 0x1e, 0xd2, 0xf6, 0xa1, 0x06, 0x9b, 0x17, + 0x92, 0xb4, 0xe2, 0x37, 0xf1, 0x23, 0x79, 0xf4, 0x23, 0x48, 0x3f, 0x89, 0x98, 0x75, 0x32, 0x64, + 0xa7, 0xff, 0x4b, 0xc2, 0x9f, 0x1f, 0x0f, 0x9c, 0x9a, 0xae, 0x6f, 0x85, 0x2a, 0x8c, 0xd5, 0x5e, + 0x6f, 0x3e, 0x08, 0xc0, 0x36, 0x14, 0x8f, 0x06, 0x6b, 0x4a, 0x61, 0xa6, 0xb8, 0xc4, 0x84, 0x64, + 0x24, 0x8f, 0x59, 0xf0, 0xf4, 0x02, 0x16, 0x16, 0xa5, 0xf6, 0x98, 0x9c, 0x84, 0x76, 0x4a, 0xf4, + 0x0a, 0xc0, 0x58, 0x31, 0x88, 0x0e, 0x5b, 0x74, 0x49, 0x94, 0x45, 0xf9, 0xea, 0x7a, 0x5d, 0xec, + 0xc6, 0xb6, 0xfb, 0x07, 0x76, 0xf0, 0x87, 0x5e, 0xc2, 0xb2, 0x11, 0x8e, 0x57, 0x1d, 0x36, 0xc9, + 0x2c, 0x23, 0xf9, 0x92, 0xfd, 0x65, 0xba, 0x86, 0x08, 0xd5, 0x90, 0xcc, 0xb3, 0x28, 0x8f, 0xd9, + 0xaf, 0xdd, 0x3c, 0xc3, 0xd9, 0xbf, 0xb1, 0xa3, 0x78, 0x19, 0xac, 0x1a, 0x74, 0xb5, 0x15, 0xc6, + 0x0b, 0xad, 0x26, 0xc6, 0xc3, 0x8a, 0x9e, 0xc3, 0x7c, 0xe0, 0x5d, 0x8f, 0x81, 0x31, 0x66, 0xbb, + 0x70, 0xff, 0xf0, 0x39, 0xa6, 0xe4, 0x6b, 0x4c, 0xc9, 0xf7, 0x98, 0x92, 0xa7, 0xdb, 0x56, 0xf8, + 0x97, 0xbe, 0x2a, 0x6a, 0x2d, 0xcb, 0x46, 0xd7, 0xaf, 0x68, 0xf7, 0xc2, 0x8d, 0x28, 0xfd, 0xbb, + 0x41, 0x57, 0xba, 0x37, 0x6e, 0x65, 0x69, 0x7b, 0xe5, 0x85, 0xc4, 0xbb, 0x49, 0xab, 0x45, 0x38, + 0xe4, 0xcd, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x99, 0xa8, 0xd9, 0x9b, 0x58, 0x01, 0x00, 0x00, +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/runtime/plugin.proto b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/runtime/plugin.proto new file mode 100644 index 000000000000..9ef169046b4f --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/runtime/plugin.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; + +option go_package = "github.com/docker/docker/api/types/swarm/runtime;runtime"; + +// PluginSpec defines the base payload which clients can specify for creating +// a service with the plugin runtime. +message PluginSpec { + string name = 1; + string remote = 2; + repeated PluginPrivilege privileges = 3; + bool disabled = 4; + repeated string env = 5; +} + +// PluginPrivilege describes a permission the user has to accept +// upon installing a plugin. +message PluginPrivilege { + string name = 1; + string description = 2; + repeated string value = 3; +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/secret.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/secret.go new file mode 100644 index 000000000000..d5213ec981c3 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/secret.go @@ -0,0 +1,36 @@ +package swarm // import "github.com/docker/docker/api/types/swarm" + +import "os" + +// Secret represents a secret. +type Secret struct { + ID string + Meta + Spec SecretSpec +} + +// SecretSpec represents a secret specification from a secret in swarm +type SecretSpec struct { + Annotations + Data []byte `json:",omitempty"` + Driver *Driver `json:",omitempty"` // name of the secrets driver used to fetch the secret's value from an external secret store + + // Templating controls whether and how to evaluate the secret payload as + // a template. If it is not set, no templating is used. + Templating *Driver `json:",omitempty"` +} + +// SecretReferenceFileTarget is a file target in a secret reference +type SecretReferenceFileTarget struct { + Name string + UID string + GID string + Mode os.FileMode +} + +// SecretReference is a reference to a secret in swarm +type SecretReference struct { + File *SecretReferenceFileTarget + SecretID string + SecretName string +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/service.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/service.go new file mode 100644 index 000000000000..6eb452d24d12 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/service.go @@ -0,0 +1,202 @@ +package swarm // import "github.com/docker/docker/api/types/swarm" + +import "time" + +// Service represents a service. +type Service struct { + ID string + Meta + Spec ServiceSpec `json:",omitempty"` + PreviousSpec *ServiceSpec `json:",omitempty"` + Endpoint Endpoint `json:",omitempty"` + UpdateStatus *UpdateStatus `json:",omitempty"` + + // ServiceStatus is an optional, extra field indicating the number of + // desired and running tasks. It is provided primarily as a shortcut to + // calculating these values client-side, which otherwise would require + // listing all tasks for a service, an operation that could be + // computation and network expensive. + ServiceStatus *ServiceStatus `json:",omitempty"` + + // JobStatus is the status of a Service which is in one of ReplicatedJob or + // GlobalJob modes. It is absent on Replicated and Global services. + JobStatus *JobStatus `json:",omitempty"` +} + +// ServiceSpec represents the spec of a service. +type ServiceSpec struct { + Annotations + + // TaskTemplate defines how the service should construct new tasks when + // orchestrating this service. + TaskTemplate TaskSpec `json:",omitempty"` + Mode ServiceMode `json:",omitempty"` + UpdateConfig *UpdateConfig `json:",omitempty"` + RollbackConfig *UpdateConfig `json:",omitempty"` + + // Networks field in ServiceSpec is deprecated. The + // same field in TaskSpec should be used instead. + // This field will be removed in a future release. + Networks []NetworkAttachmentConfig `json:",omitempty"` + EndpointSpec *EndpointSpec `json:",omitempty"` +} + +// ServiceMode represents the mode of a service. +type ServiceMode struct { + Replicated *ReplicatedService `json:",omitempty"` + Global *GlobalService `json:",omitempty"` + ReplicatedJob *ReplicatedJob `json:",omitempty"` + GlobalJob *GlobalJob `json:",omitempty"` +} + +// UpdateState is the state of a service update. +type UpdateState string + +const ( + // UpdateStateUpdating is the updating state. + UpdateStateUpdating UpdateState = "updating" + // UpdateStatePaused is the paused state. + UpdateStatePaused UpdateState = "paused" + // UpdateStateCompleted is the completed state. + UpdateStateCompleted UpdateState = "completed" + // UpdateStateRollbackStarted is the state with a rollback in progress. + UpdateStateRollbackStarted UpdateState = "rollback_started" + // UpdateStateRollbackPaused is the state with a rollback in progress. + UpdateStateRollbackPaused UpdateState = "rollback_paused" + // UpdateStateRollbackCompleted is the state with a rollback in progress. + UpdateStateRollbackCompleted UpdateState = "rollback_completed" +) + +// UpdateStatus reports the status of a service update. +type UpdateStatus struct { + State UpdateState `json:",omitempty"` + StartedAt *time.Time `json:",omitempty"` + CompletedAt *time.Time `json:",omitempty"` + Message string `json:",omitempty"` +} + +// ReplicatedService is a kind of ServiceMode. +type ReplicatedService struct { + Replicas *uint64 `json:",omitempty"` +} + +// GlobalService is a kind of ServiceMode. +type GlobalService struct{} + +// ReplicatedJob is the a type of Service which executes a defined Tasks +// in parallel until the specified number of Tasks have succeeded. +type ReplicatedJob struct { + // MaxConcurrent indicates the maximum number of Tasks that should be + // executing simultaneously for this job at any given time. There may be + // fewer Tasks that MaxConcurrent executing simultaneously; for example, if + // there are fewer than MaxConcurrent tasks needed to reach + // TotalCompletions. + // + // If this field is empty, it will default to a max concurrency of 1. + MaxConcurrent *uint64 `json:",omitempty"` + + // TotalCompletions is the total number of Tasks desired to run to + // completion. + // + // If this field is empty, the value of MaxConcurrent will be used. + TotalCompletions *uint64 `json:",omitempty"` +} + +// GlobalJob is the type of a Service which executes a Task on every Node +// matching the Service's placement constraints. These tasks run to completion +// and then exit. +// +// This type is deliberately empty. +type GlobalJob struct{} + +const ( + // UpdateFailureActionPause PAUSE + UpdateFailureActionPause = "pause" + // UpdateFailureActionContinue CONTINUE + UpdateFailureActionContinue = "continue" + // UpdateFailureActionRollback ROLLBACK + UpdateFailureActionRollback = "rollback" + + // UpdateOrderStopFirst STOP_FIRST + UpdateOrderStopFirst = "stop-first" + // UpdateOrderStartFirst START_FIRST + UpdateOrderStartFirst = "start-first" +) + +// UpdateConfig represents the update configuration. +type UpdateConfig struct { + // Maximum number of tasks to be updated in one iteration. + // 0 means unlimited parallelism. + Parallelism uint64 + + // Amount of time between updates. + Delay time.Duration `json:",omitempty"` + + // FailureAction is the action to take when an update failures. + FailureAction string `json:",omitempty"` + + // Monitor indicates how long to monitor a task for failure after it is + // created. If the task fails by ending up in one of the states + // REJECTED, COMPLETED, or FAILED, within Monitor from its creation, + // this counts as a failure. If it fails after Monitor, it does not + // count as a failure. If Monitor is unspecified, a default value will + // be used. + Monitor time.Duration `json:",omitempty"` + + // MaxFailureRatio is the fraction of tasks that may fail during + // an update before the failure action is invoked. Any task created by + // the current update which ends up in one of the states REJECTED, + // COMPLETED or FAILED within Monitor from its creation counts as a + // failure. The number of failures is divided by the number of tasks + // being updated, and if this fraction is greater than + // MaxFailureRatio, the failure action is invoked. + // + // If the failure action is CONTINUE, there is no effect. + // If the failure action is PAUSE, no more tasks will be updated until + // another update is started. + MaxFailureRatio float32 + + // Order indicates the order of operations when rolling out an updated + // task. Either the old task is shut down before the new task is + // started, or the new task is started before the old task is shut down. + Order string +} + +// ServiceStatus represents the number of running tasks in a service and the +// number of tasks desired to be running. +type ServiceStatus struct { + // RunningTasks is the number of tasks for the service actually in the + // Running state + RunningTasks uint64 + + // DesiredTasks is the number of tasks desired to be running by the + // service. For replicated services, this is the replica count. For global + // services, this is computed by taking the number of tasks with desired + // state of not-Shutdown. + DesiredTasks uint64 + + // CompletedTasks is the number of tasks in the state Completed, if this + // service is in ReplicatedJob or GlobalJob mode. This field must be + // cross-referenced with the service type, because the default value of 0 + // may mean that a service is not in a job mode, or it may mean that the + // job has yet to complete any tasks. + CompletedTasks uint64 +} + +// JobStatus is the status of a job-type service. +type JobStatus struct { + // JobIteration is a value increased each time a Job is executed, + // successfully or otherwise. "Executed", in this case, means the job as a + // whole has been started, not that an individual Task has been launched. A + // job is "Executed" when its ServiceSpec is updated. JobIteration can be + // used to disambiguate Tasks belonging to different executions of a job. + // + // Though JobIteration will increase with each subsequent execution, it may + // not necessarily increase by 1, and so JobIteration should not be used to + // keep track of the number of times a job has been executed. + JobIteration Version + + // LastExecution is the time that the job was last executed, as observed by + // Swarm manager. + LastExecution time.Time `json:",omitempty"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/swarm.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/swarm.go new file mode 100644 index 000000000000..b25f9996462e --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/swarm.go @@ -0,0 +1,227 @@ +package swarm // import "github.com/docker/docker/api/types/swarm" + +import ( + "time" +) + +// ClusterInfo represents info about the cluster for outputting in "info" +// it contains the same information as "Swarm", but without the JoinTokens +type ClusterInfo struct { + ID string + Meta + Spec Spec + TLSInfo TLSInfo + RootRotationInProgress bool + DefaultAddrPool []string + SubnetSize uint32 + DataPathPort uint32 +} + +// Swarm represents a swarm. +type Swarm struct { + ClusterInfo + JoinTokens JoinTokens +} + +// JoinTokens contains the tokens workers and managers need to join the swarm. +type JoinTokens struct { + // Worker is the join token workers may use to join the swarm. + Worker string + // Manager is the join token managers may use to join the swarm. + Manager string +} + +// Spec represents the spec of a swarm. +type Spec struct { + Annotations + + Orchestration OrchestrationConfig `json:",omitempty"` + Raft RaftConfig `json:",omitempty"` + Dispatcher DispatcherConfig `json:",omitempty"` + CAConfig CAConfig `json:",omitempty"` + TaskDefaults TaskDefaults `json:",omitempty"` + EncryptionConfig EncryptionConfig `json:",omitempty"` +} + +// OrchestrationConfig represents orchestration configuration. +type OrchestrationConfig struct { + // TaskHistoryRetentionLimit is the number of historic tasks to keep per instance or + // node. If negative, never remove completed or failed tasks. + TaskHistoryRetentionLimit *int64 `json:",omitempty"` +} + +// TaskDefaults parameterizes cluster-level task creation with default values. +type TaskDefaults struct { + // LogDriver selects the log driver to use for tasks created in the + // orchestrator if unspecified by a service. + // + // Updating this value will only have an affect on new tasks. Old tasks + // will continue use their previously configured log driver until + // recreated. + LogDriver *Driver `json:",omitempty"` +} + +// EncryptionConfig controls at-rest encryption of data and keys. +type EncryptionConfig struct { + // AutoLockManagers specifies whether or not managers TLS keys and raft data + // should be encrypted at rest in such a way that they must be unlocked + // before the manager node starts up again. + AutoLockManagers bool +} + +// RaftConfig represents raft configuration. +type RaftConfig struct { + // SnapshotInterval is the number of log entries between snapshots. + SnapshotInterval uint64 `json:",omitempty"` + + // KeepOldSnapshots is the number of snapshots to keep beyond the + // current snapshot. + KeepOldSnapshots *uint64 `json:",omitempty"` + + // LogEntriesForSlowFollowers is the number of log entries to keep + // around to sync up slow followers after a snapshot is created. + LogEntriesForSlowFollowers uint64 `json:",omitempty"` + + // ElectionTick is the number of ticks that a follower will wait for a message + // from the leader before becoming a candidate and starting an election. + // ElectionTick must be greater than HeartbeatTick. + // + // A tick currently defaults to one second, so these translate directly to + // seconds currently, but this is NOT guaranteed. + ElectionTick int + + // HeartbeatTick is the number of ticks between heartbeats. Every + // HeartbeatTick ticks, the leader will send a heartbeat to the + // followers. + // + // A tick currently defaults to one second, so these translate directly to + // seconds currently, but this is NOT guaranteed. + HeartbeatTick int +} + +// DispatcherConfig represents dispatcher configuration. +type DispatcherConfig struct { + // HeartbeatPeriod defines how often agent should send heartbeats to + // dispatcher. + HeartbeatPeriod time.Duration `json:",omitempty"` +} + +// CAConfig represents CA configuration. +type CAConfig struct { + // NodeCertExpiry is the duration certificates should be issued for + NodeCertExpiry time.Duration `json:",omitempty"` + + // ExternalCAs is a list of CAs to which a manager node will make + // certificate signing requests for node certificates. + ExternalCAs []*ExternalCA `json:",omitempty"` + + // SigningCACert and SigningCAKey specify the desired signing root CA and + // root CA key for the swarm. When inspecting the cluster, the key will + // be redacted. + SigningCACert string `json:",omitempty"` + SigningCAKey string `json:",omitempty"` + + // If this value changes, and there is no specified signing cert and key, + // then the swarm is forced to generate a new root certificate ane key. + ForceRotate uint64 `json:",omitempty"` +} + +// ExternalCAProtocol represents type of external CA. +type ExternalCAProtocol string + +// ExternalCAProtocolCFSSL CFSSL +const ExternalCAProtocolCFSSL ExternalCAProtocol = "cfssl" + +// ExternalCA defines external CA to be used by the cluster. +type ExternalCA struct { + // Protocol is the protocol used by this external CA. + Protocol ExternalCAProtocol + + // URL is the URL where the external CA can be reached. + URL string + + // Options is a set of additional key/value pairs whose interpretation + // depends on the specified CA type. + Options map[string]string `json:",omitempty"` + + // CACert specifies which root CA is used by this external CA. This certificate must + // be in PEM format. + CACert string +} + +// InitRequest is the request used to init a swarm. +type InitRequest struct { + ListenAddr string + AdvertiseAddr string + DataPathAddr string + DataPathPort uint32 + ForceNewCluster bool + Spec Spec + AutoLockManagers bool + Availability NodeAvailability + DefaultAddrPool []string + SubnetSize uint32 +} + +// JoinRequest is the request used to join a swarm. +type JoinRequest struct { + ListenAddr string + AdvertiseAddr string + DataPathAddr string + RemoteAddrs []string + JoinToken string // accept by secret + Availability NodeAvailability +} + +// UnlockRequest is the request used to unlock a swarm. +type UnlockRequest struct { + // UnlockKey is the unlock key in ASCII-armored format. + UnlockKey string +} + +// LocalNodeState represents the state of the local node. +type LocalNodeState string + +const ( + // LocalNodeStateInactive INACTIVE + LocalNodeStateInactive LocalNodeState = "inactive" + // LocalNodeStatePending PENDING + LocalNodeStatePending LocalNodeState = "pending" + // LocalNodeStateActive ACTIVE + LocalNodeStateActive LocalNodeState = "active" + // LocalNodeStateError ERROR + LocalNodeStateError LocalNodeState = "error" + // LocalNodeStateLocked LOCKED + LocalNodeStateLocked LocalNodeState = "locked" +) + +// Info represents generic information about swarm. +type Info struct { + NodeID string + NodeAddr string + + LocalNodeState LocalNodeState + ControlAvailable bool + Error string + + RemoteManagers []Peer + Nodes int `json:",omitempty"` + Managers int `json:",omitempty"` + + Cluster *ClusterInfo `json:",omitempty"` + + Warnings []string `json:",omitempty"` +} + +// Peer represents a peer. +type Peer struct { + NodeID string + Addr string +} + +// UpdateFlags contains flags for SwarmUpdate. +type UpdateFlags struct { + RotateWorkerToken bool + RotateManagerToken bool + RotateManagerUnlockKey bool +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/task.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/task.go new file mode 100644 index 000000000000..a6f7ab7b5c79 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/swarm/task.go @@ -0,0 +1,206 @@ +package swarm // import "github.com/docker/docker/api/types/swarm" + +import ( + "time" + + "github.com/docker/docker/api/types/swarm/runtime" +) + +// TaskState represents the state of a task. +type TaskState string + +const ( + // TaskStateNew NEW + TaskStateNew TaskState = "new" + // TaskStateAllocated ALLOCATED + TaskStateAllocated TaskState = "allocated" + // TaskStatePending PENDING + TaskStatePending TaskState = "pending" + // TaskStateAssigned ASSIGNED + TaskStateAssigned TaskState = "assigned" + // TaskStateAccepted ACCEPTED + TaskStateAccepted TaskState = "accepted" + // TaskStatePreparing PREPARING + TaskStatePreparing TaskState = "preparing" + // TaskStateReady READY + TaskStateReady TaskState = "ready" + // TaskStateStarting STARTING + TaskStateStarting TaskState = "starting" + // TaskStateRunning RUNNING + TaskStateRunning TaskState = "running" + // TaskStateComplete COMPLETE + TaskStateComplete TaskState = "complete" + // TaskStateShutdown SHUTDOWN + TaskStateShutdown TaskState = "shutdown" + // TaskStateFailed FAILED + TaskStateFailed TaskState = "failed" + // TaskStateRejected REJECTED + TaskStateRejected TaskState = "rejected" + // TaskStateRemove REMOVE + TaskStateRemove TaskState = "remove" + // TaskStateOrphaned ORPHANED + TaskStateOrphaned TaskState = "orphaned" +) + +// Task represents a task. +type Task struct { + ID string + Meta + Annotations + + Spec TaskSpec `json:",omitempty"` + ServiceID string `json:",omitempty"` + Slot int `json:",omitempty"` + NodeID string `json:",omitempty"` + Status TaskStatus `json:",omitempty"` + DesiredState TaskState `json:",omitempty"` + NetworksAttachments []NetworkAttachment `json:",omitempty"` + GenericResources []GenericResource `json:",omitempty"` + + // JobIteration is the JobIteration of the Service that this Task was + // spawned from, if the Service is a ReplicatedJob or GlobalJob. This is + // used to determine which Tasks belong to which run of the job. This field + // is absent if the Service mode is Replicated or Global. + JobIteration *Version `json:",omitempty"` +} + +// TaskSpec represents the spec of a task. +type TaskSpec struct { + // ContainerSpec, NetworkAttachmentSpec, and PluginSpec are mutually exclusive. + // PluginSpec is only used when the `Runtime` field is set to `plugin` + // NetworkAttachmentSpec is used if the `Runtime` field is set to + // `attachment`. + ContainerSpec *ContainerSpec `json:",omitempty"` + PluginSpec *runtime.PluginSpec `json:",omitempty"` + NetworkAttachmentSpec *NetworkAttachmentSpec `json:",omitempty"` + + Resources *ResourceRequirements `json:",omitempty"` + RestartPolicy *RestartPolicy `json:",omitempty"` + Placement *Placement `json:",omitempty"` + Networks []NetworkAttachmentConfig `json:",omitempty"` + + // LogDriver specifies the LogDriver to use for tasks created from this + // spec. If not present, the one on cluster default on swarm.Spec will be + // used, finally falling back to the engine default if not specified. + LogDriver *Driver `json:",omitempty"` + + // ForceUpdate is a counter that triggers an update even if no relevant + // parameters have been changed. + ForceUpdate uint64 + + Runtime RuntimeType `json:",omitempty"` +} + +// Resources represents resources (CPU/Memory) which can be advertised by a +// node and requested to be reserved for a task. +type Resources struct { + NanoCPUs int64 `json:",omitempty"` + MemoryBytes int64 `json:",omitempty"` + GenericResources []GenericResource `json:",omitempty"` +} + +// Limit describes limits on resources which can be requested by a task. +type Limit struct { + NanoCPUs int64 `json:",omitempty"` + MemoryBytes int64 `json:",omitempty"` + Pids int64 `json:",omitempty"` +} + +// GenericResource represents a "user defined" resource which can +// be either an integer (e.g: SSD=3) or a string (e.g: SSD=sda1) +type GenericResource struct { + NamedResourceSpec *NamedGenericResource `json:",omitempty"` + DiscreteResourceSpec *DiscreteGenericResource `json:",omitempty"` +} + +// NamedGenericResource represents a "user defined" resource which is defined +// as a string. +// "Kind" is used to describe the Kind of a resource (e.g: "GPU", "FPGA", "SSD", ...) +// Value is used to identify the resource (GPU="UUID-1", FPGA="/dev/sdb5", ...) +type NamedGenericResource struct { + Kind string `json:",omitempty"` + Value string `json:",omitempty"` +} + +// DiscreteGenericResource represents a "user defined" resource which is defined +// as an integer +// "Kind" is used to describe the Kind of a resource (e.g: "GPU", "FPGA", "SSD", ...) +// Value is used to count the resource (SSD=5, HDD=3, ...) +type DiscreteGenericResource struct { + Kind string `json:",omitempty"` + Value int64 `json:",omitempty"` +} + +// ResourceRequirements represents resources requirements. +type ResourceRequirements struct { + Limits *Limit `json:",omitempty"` + Reservations *Resources `json:",omitempty"` +} + +// Placement represents orchestration parameters. +type Placement struct { + Constraints []string `json:",omitempty"` + Preferences []PlacementPreference `json:",omitempty"` + MaxReplicas uint64 `json:",omitempty"` + + // Platforms stores all the platforms that the image can run on. + // This field is used in the platform filter for scheduling. If empty, + // then the platform filter is off, meaning there are no scheduling restrictions. + Platforms []Platform `json:",omitempty"` +} + +// PlacementPreference provides a way to make the scheduler aware of factors +// such as topology. +type PlacementPreference struct { + Spread *SpreadOver +} + +// SpreadOver is a scheduling preference that instructs the scheduler to spread +// tasks evenly over groups of nodes identified by labels. +type SpreadOver struct { + // label descriptor, such as engine.labels.az + SpreadDescriptor string +} + +// RestartPolicy represents the restart policy. +type RestartPolicy struct { + Condition RestartPolicyCondition `json:",omitempty"` + Delay *time.Duration `json:",omitempty"` + MaxAttempts *uint64 `json:",omitempty"` + Window *time.Duration `json:",omitempty"` +} + +// RestartPolicyCondition represents when to restart. +type RestartPolicyCondition string + +const ( + // RestartPolicyConditionNone NONE + RestartPolicyConditionNone RestartPolicyCondition = "none" + // RestartPolicyConditionOnFailure ON_FAILURE + RestartPolicyConditionOnFailure RestartPolicyCondition = "on-failure" + // RestartPolicyConditionAny ANY + RestartPolicyConditionAny RestartPolicyCondition = "any" +) + +// TaskStatus represents the status of a task. +type TaskStatus struct { + Timestamp time.Time `json:",omitempty"` + State TaskState `json:",omitempty"` + Message string `json:",omitempty"` + Err string `json:",omitempty"` + ContainerStatus *ContainerStatus `json:",omitempty"` + PortStatus PortStatus `json:",omitempty"` +} + +// ContainerStatus represents the status of a container. +type ContainerStatus struct { + ContainerID string + PID int + ExitCode int +} + +// PortStatus represents the port status of a task's host ports whose +// service has published host ports +type PortStatus struct { + Ports []PortConfig `json:",omitempty"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/time/duration_convert.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/time/duration_convert.go new file mode 100644 index 000000000000..84b6f073224c --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/time/duration_convert.go @@ -0,0 +1,12 @@ +package time // import "github.com/docker/docker/api/types/time" + +import ( + "strconv" + "time" +) + +// DurationToSecondsString converts the specified duration to the number +// seconds it represents, formatted as a string. +func DurationToSecondsString(duration time.Duration) string { + return strconv.FormatFloat(duration.Seconds(), 'f', 0, 64) +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/time/timestamp.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/time/timestamp.go new file mode 100644 index 000000000000..ea3495efeb8a --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/time/timestamp.go @@ -0,0 +1,129 @@ +package time // import "github.com/docker/docker/api/types/time" + +import ( + "fmt" + "math" + "strconv" + "strings" + "time" +) + +// These are additional predefined layouts for use in Time.Format and Time.Parse +// with --since and --until parameters for `docker logs` and `docker events` +const ( + rFC3339Local = "2006-01-02T15:04:05" // RFC3339 with local timezone + rFC3339NanoLocal = "2006-01-02T15:04:05.999999999" // RFC3339Nano with local timezone + dateWithZone = "2006-01-02Z07:00" // RFC3339 with time at 00:00:00 + dateLocal = "2006-01-02" // RFC3339 with local timezone and time at 00:00:00 +) + +// GetTimestamp tries to parse given string as golang duration, +// then RFC3339 time and finally as a Unix timestamp. If +// any of these were successful, it returns a Unix timestamp +// as string otherwise returns the given value back. +// In case of duration input, the returned timestamp is computed +// as the given reference time minus the amount of the duration. +func GetTimestamp(value string, reference time.Time) (string, error) { + if d, err := time.ParseDuration(value); value != "0" && err == nil { + return strconv.FormatInt(reference.Add(-d).Unix(), 10), nil + } + + var format string + // if the string has a Z or a + or three dashes use parse otherwise use parseinlocation + parseInLocation := !(strings.ContainsAny(value, "zZ+") || strings.Count(value, "-") == 3) + + if strings.Contains(value, ".") { + if parseInLocation { + format = rFC3339NanoLocal + } else { + format = time.RFC3339Nano + } + } else if strings.Contains(value, "T") { + // we want the number of colons in the T portion of the timestamp + tcolons := strings.Count(value, ":") + // if parseInLocation is off and we have a +/- zone offset (not Z) then + // there will be an extra colon in the input for the tz offset subtract that + // colon from the tcolons count + if !parseInLocation && !strings.ContainsAny(value, "zZ") && tcolons > 0 { + tcolons-- + } + if parseInLocation { + switch tcolons { + case 0: + format = "2006-01-02T15" + case 1: + format = "2006-01-02T15:04" + default: + format = rFC3339Local + } + } else { + switch tcolons { + case 0: + format = "2006-01-02T15Z07:00" + case 1: + format = "2006-01-02T15:04Z07:00" + default: + format = time.RFC3339 + } + } + } else if parseInLocation { + format = dateLocal + } else { + format = dateWithZone + } + + var t time.Time + var err error + + if parseInLocation { + t, err = time.ParseInLocation(format, value, time.FixedZone(reference.Zone())) + } else { + t, err = time.Parse(format, value) + } + + if err != nil { + // if there is a `-` then it's an RFC3339 like timestamp + if strings.Contains(value, "-") { + return "", err // was probably an RFC3339 like timestamp but the parser failed with an error + } + if _, _, err := parseTimestamp(value); err != nil { + return "", fmt.Errorf("failed to parse value as time or duration: %q", value) + } + return value, nil // unix timestamp in and out case (meaning: the value passed at the command line is already in the right format for passing to the server) + } + + return fmt.Sprintf("%d.%09d", t.Unix(), int64(t.Nanosecond())), nil +} + +// ParseTimestamps returns seconds and nanoseconds from a timestamp that has the +// format "%d.%09d", time.Unix(), int64(time.Nanosecond())) +// if the incoming nanosecond portion is longer or shorter than 9 digits it is +// converted to nanoseconds. The expectation is that the seconds and +// seconds will be used to create a time variable. For example: +// seconds, nanoseconds, err := ParseTimestamp("1136073600.000000001",0) +// if err == nil since := time.Unix(seconds, nanoseconds) +// returns seconds as def(aultSeconds) if value == "" +func ParseTimestamps(value string, def int64) (int64, int64, error) { + if value == "" { + return def, 0, nil + } + return parseTimestamp(value) +} + +func parseTimestamp(value string) (int64, int64, error) { + sa := strings.SplitN(value, ".", 2) + s, err := strconv.ParseInt(sa[0], 10, 64) + if err != nil { + return s, 0, err + } + if len(sa) != 2 { + return s, 0, nil + } + n, err := strconv.ParseInt(sa[1], 10, 64) + if err != nil { + return s, n, err + } + // should already be in nanoseconds but just in case convert n to nanoseconds + n = int64(float64(n) * math.Pow(float64(10), float64(9-len(sa[1])))) + return s, n, nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/types.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/types.go new file mode 100644 index 000000000000..e3a159912e22 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/types.go @@ -0,0 +1,635 @@ +package types // import "github.com/docker/docker/api/types" + +import ( + "errors" + "fmt" + "io" + "os" + "strings" + "time" + + "github.com/docker/docker/api/types/container" + "github.com/docker/docker/api/types/filters" + "github.com/docker/docker/api/types/mount" + "github.com/docker/docker/api/types/network" + "github.com/docker/docker/api/types/registry" + "github.com/docker/docker/api/types/swarm" + "github.com/docker/go-connections/nat" +) + +// RootFS returns Image's RootFS description including the layer IDs. +type RootFS struct { + Type string + Layers []string `json:",omitempty"` + BaseLayer string `json:",omitempty"` +} + +// ImageInspect contains response of Engine API: +// GET "/images/{name:.*}/json" +type ImageInspect struct { + ID string `json:"Id"` + RepoTags []string + RepoDigests []string + Parent string + Comment string + Created string + Container string + ContainerConfig *container.Config + DockerVersion string + Author string + Config *container.Config + Architecture string + Variant string `json:",omitempty"` + Os string + OsVersion string `json:",omitempty"` + Size int64 + VirtualSize int64 + GraphDriver GraphDriverData + RootFS RootFS + Metadata ImageMetadata +} + +// ImageMetadata contains engine-local data about the image +type ImageMetadata struct { + LastTagTime time.Time `json:",omitempty"` +} + +// Container contains response of Engine API: +// GET "/containers/json" +type Container struct { + ID string `json:"Id"` + Names []string + Image string + ImageID string + Command string + Created int64 + Ports []Port + SizeRw int64 `json:",omitempty"` + SizeRootFs int64 `json:",omitempty"` + Labels map[string]string + State string + Status string + HostConfig struct { + NetworkMode string `json:",omitempty"` + } + NetworkSettings *SummaryNetworkSettings + Mounts []MountPoint +} + +// CopyConfig contains request body of Engine API: +// POST "/containers/"+containerID+"/copy" +type CopyConfig struct { + Resource string +} + +// ContainerPathStat is used to encode the header from +// GET "/containers/{name:.*}/archive" +// "Name" is the file or directory name. +type ContainerPathStat struct { + Name string `json:"name"` + Size int64 `json:"size"` + Mode os.FileMode `json:"mode"` + Mtime time.Time `json:"mtime"` + LinkTarget string `json:"linkTarget"` +} + +// ContainerStats contains response of Engine API: +// GET "/stats" +type ContainerStats struct { + Body io.ReadCloser `json:"body"` + OSType string `json:"ostype"` +} + +// Ping contains response of Engine API: +// GET "/_ping" +type Ping struct { + APIVersion string + OSType string + Experimental bool + BuilderVersion BuilderVersion +} + +// ComponentVersion describes the version information for a specific component. +type ComponentVersion struct { + Name string + Version string + Details map[string]string `json:",omitempty"` +} + +// Version contains response of Engine API: +// GET "/version" +type Version struct { + Platform struct{ Name string } `json:",omitempty"` + Components []ComponentVersion `json:",omitempty"` + + // The following fields are deprecated, they relate to the Engine component and are kept for backwards compatibility + + Version string + APIVersion string `json:"ApiVersion"` + MinAPIVersion string `json:"MinAPIVersion,omitempty"` + GitCommit string + GoVersion string + Os string + Arch string + KernelVersion string `json:",omitempty"` + Experimental bool `json:",omitempty"` + BuildTime string `json:",omitempty"` +} + +// Commit holds the Git-commit (SHA1) that a binary was built from, as reported +// in the version-string of external tools, such as containerd, or runC. +type Commit struct { + ID string // ID is the actual commit ID of external tool. + Expected string // Expected is the commit ID of external tool expected by dockerd as set at build time. +} + +// Info contains response of Engine API: +// GET "/info" +type Info struct { + ID string + Containers int + ContainersRunning int + ContainersPaused int + ContainersStopped int + Images int + Driver string + DriverStatus [][2]string + SystemStatus [][2]string `json:",omitempty"` // SystemStatus is only propagated by the Swarm standalone API + Plugins PluginsInfo + MemoryLimit bool + SwapLimit bool + KernelMemory bool // Deprecated: kernel 5.4 deprecated kmem.limit_in_bytes + KernelMemoryTCP bool + CPUCfsPeriod bool `json:"CpuCfsPeriod"` + CPUCfsQuota bool `json:"CpuCfsQuota"` + CPUShares bool + CPUSet bool + PidsLimit bool + IPv4Forwarding bool + BridgeNfIptables bool + BridgeNfIP6tables bool `json:"BridgeNfIp6tables"` + Debug bool + NFd int + OomKillDisable bool + NGoroutines int + SystemTime string + LoggingDriver string + CgroupDriver string + CgroupVersion string `json:",omitempty"` + NEventsListener int + KernelVersion string + OperatingSystem string + OSVersion string + OSType string + Architecture string + IndexServerAddress string + RegistryConfig *registry.ServiceConfig + NCPU int + MemTotal int64 + GenericResources []swarm.GenericResource + DockerRootDir string + HTTPProxy string `json:"HttpProxy"` + HTTPSProxy string `json:"HttpsProxy"` + NoProxy string + Name string + Labels []string + ExperimentalBuild bool + ServerVersion string + ClusterStore string `json:",omitempty"` // Deprecated: host-discovery and overlay networks with external k/v stores are deprecated + ClusterAdvertise string `json:",omitempty"` // Deprecated: host-discovery and overlay networks with external k/v stores are deprecated + Runtimes map[string]Runtime + DefaultRuntime string + Swarm swarm.Info + // LiveRestoreEnabled determines whether containers should be kept + // running when the daemon is shutdown or upon daemon start if + // running containers are detected + LiveRestoreEnabled bool + Isolation container.Isolation + InitBinary string + ContainerdCommit Commit + RuncCommit Commit + InitCommit Commit + SecurityOptions []string + ProductLicense string `json:",omitempty"` + DefaultAddressPools []NetworkAddressPool `json:",omitempty"` + Warnings []string +} + +// KeyValue holds a key/value pair +type KeyValue struct { + Key, Value string +} + +// NetworkAddressPool is a temp struct used by Info struct +type NetworkAddressPool struct { + Base string + Size int +} + +// SecurityOpt contains the name and options of a security option +type SecurityOpt struct { + Name string + Options []KeyValue +} + +// DecodeSecurityOptions decodes a security options string slice to a type safe +// SecurityOpt +func DecodeSecurityOptions(opts []string) ([]SecurityOpt, error) { + so := []SecurityOpt{} + for _, opt := range opts { + // support output from a < 1.13 docker daemon + if !strings.Contains(opt, "=") { + so = append(so, SecurityOpt{Name: opt}) + continue + } + secopt := SecurityOpt{} + split := strings.Split(opt, ",") + for _, s := range split { + kv := strings.SplitN(s, "=", 2) + if len(kv) != 2 { + return nil, fmt.Errorf("invalid security option %q", s) + } + if kv[0] == "" || kv[1] == "" { + return nil, errors.New("invalid empty security option") + } + if kv[0] == "name" { + secopt.Name = kv[1] + continue + } + secopt.Options = append(secopt.Options, KeyValue{Key: kv[0], Value: kv[1]}) + } + so = append(so, secopt) + } + return so, nil +} + +// PluginsInfo is a temp struct holding Plugins name +// registered with docker daemon. It is used by Info struct +type PluginsInfo struct { + // List of Volume plugins registered + Volume []string + // List of Network plugins registered + Network []string + // List of Authorization plugins registered + Authorization []string + // List of Log plugins registered + Log []string +} + +// ExecStartCheck is a temp struct used by execStart +// Config fields is part of ExecConfig in runconfig package +type ExecStartCheck struct { + // ExecStart will first check if it's detached + Detach bool + // Check if there's a tty + Tty bool +} + +// HealthcheckResult stores information about a single run of a healthcheck probe +type HealthcheckResult struct { + Start time.Time // Start is the time this check started + End time.Time // End is the time this check ended + ExitCode int // ExitCode meanings: 0=healthy, 1=unhealthy, 2=reserved (considered unhealthy), else=error running probe + Output string // Output from last check +} + +// Health states +const ( + NoHealthcheck = "none" // Indicates there is no healthcheck + Starting = "starting" // Starting indicates that the container is not yet ready + Healthy = "healthy" // Healthy indicates that the container is running correctly + Unhealthy = "unhealthy" // Unhealthy indicates that the container has a problem +) + +// Health stores information about the container's healthcheck results +type Health struct { + Status string // Status is one of Starting, Healthy or Unhealthy + FailingStreak int // FailingStreak is the number of consecutive failures + Log []*HealthcheckResult // Log contains the last few results (oldest first) +} + +// ContainerState stores container's running state +// it's part of ContainerJSONBase and will return by "inspect" command +type ContainerState struct { + Status string // String representation of the container state. Can be one of "created", "running", "paused", "restarting", "removing", "exited", or "dead" + Running bool + Paused bool + Restarting bool + OOMKilled bool + Dead bool + Pid int + ExitCode int + Error string + StartedAt string + FinishedAt string + Health *Health `json:",omitempty"` +} + +// ContainerNode stores information about the node that a container +// is running on. It's only used by the Docker Swarm standalone API +type ContainerNode struct { + ID string + IPAddress string `json:"IP"` + Addr string + Name string + Cpus int + Memory int64 + Labels map[string]string +} + +// ContainerJSONBase contains response of Engine API: +// GET "/containers/{name:.*}/json" +type ContainerJSONBase struct { + ID string `json:"Id"` + Created string + Path string + Args []string + State *ContainerState + Image string + ResolvConfPath string + HostnamePath string + HostsPath string + LogPath string + Node *ContainerNode `json:",omitempty"` // Node is only propagated by Docker Swarm standalone API + Name string + RestartCount int + Driver string + Platform string + MountLabel string + ProcessLabel string + AppArmorProfile string + ExecIDs []string + HostConfig *container.HostConfig + GraphDriver GraphDriverData + SizeRw *int64 `json:",omitempty"` + SizeRootFs *int64 `json:",omitempty"` +} + +// ContainerJSON is newly used struct along with MountPoint +type ContainerJSON struct { + *ContainerJSONBase + Mounts []MountPoint + Config *container.Config + NetworkSettings *NetworkSettings +} + +// NetworkSettings exposes the network settings in the api +type NetworkSettings struct { + NetworkSettingsBase + DefaultNetworkSettings + Networks map[string]*network.EndpointSettings +} + +// SummaryNetworkSettings provides a summary of container's networks +// in /containers/json +type SummaryNetworkSettings struct { + Networks map[string]*network.EndpointSettings +} + +// NetworkSettingsBase holds basic information about networks +type NetworkSettingsBase struct { + Bridge string // Bridge is the Bridge name the network uses(e.g. `docker0`) + SandboxID string // SandboxID uniquely represents a container's network stack + HairpinMode bool // HairpinMode specifies if hairpin NAT should be enabled on the virtual interface + LinkLocalIPv6Address string // LinkLocalIPv6Address is an IPv6 unicast address using the link-local prefix + LinkLocalIPv6PrefixLen int // LinkLocalIPv6PrefixLen is the prefix length of an IPv6 unicast address + Ports nat.PortMap // Ports is a collection of PortBinding indexed by Port + SandboxKey string // SandboxKey identifies the sandbox + SecondaryIPAddresses []network.Address + SecondaryIPv6Addresses []network.Address +} + +// DefaultNetworkSettings holds network information +// during the 2 release deprecation period. +// It will be removed in Docker 1.11. +type DefaultNetworkSettings struct { + EndpointID string // EndpointID uniquely represents a service endpoint in a Sandbox + Gateway string // Gateway holds the gateway address for the network + GlobalIPv6Address string // GlobalIPv6Address holds network's global IPv6 address + GlobalIPv6PrefixLen int // GlobalIPv6PrefixLen represents mask length of network's global IPv6 address + IPAddress string // IPAddress holds the IPv4 address for the network + IPPrefixLen int // IPPrefixLen represents mask length of network's IPv4 address + IPv6Gateway string // IPv6Gateway holds gateway address specific for IPv6 + MacAddress string // MacAddress holds the MAC address for the network +} + +// MountPoint represents a mount point configuration inside the container. +// This is used for reporting the mountpoints in use by a container. +type MountPoint struct { + Type mount.Type `json:",omitempty"` + Name string `json:",omitempty"` + Source string + Destination string + Driver string `json:",omitempty"` + Mode string + RW bool + Propagation mount.Propagation +} + +// NetworkResource is the body of the "get network" http response message +type NetworkResource struct { + Name string // Name is the requested name of the network + ID string `json:"Id"` // ID uniquely identifies a network on a single machine + Created time.Time // Created is the time the network created + Scope string // Scope describes the level at which the network exists (e.g. `swarm` for cluster-wide or `local` for machine level) + Driver string // Driver is the Driver name used to create the network (e.g. `bridge`, `overlay`) + EnableIPv6 bool // EnableIPv6 represents whether to enable IPv6 + IPAM network.IPAM // IPAM is the network's IP Address Management + Internal bool // Internal represents if the network is used internal only + Attachable bool // Attachable represents if the global scope is manually attachable by regular containers from workers in swarm mode. + Ingress bool // Ingress indicates the network is providing the routing-mesh for the swarm cluster. + ConfigFrom network.ConfigReference // ConfigFrom specifies the source which will provide the configuration for this network. + ConfigOnly bool // ConfigOnly networks are place-holder networks for network configurations to be used by other networks. ConfigOnly networks cannot be used directly to run containers or services. + Containers map[string]EndpointResource // Containers contains endpoints belonging to the network + Options map[string]string // Options holds the network specific options to use for when creating the network + Labels map[string]string // Labels holds metadata specific to the network being created + Peers []network.PeerInfo `json:",omitempty"` // List of peer nodes for an overlay network + Services map[string]network.ServiceInfo `json:",omitempty"` +} + +// EndpointResource contains network resources allocated and used for a container in a network +type EndpointResource struct { + Name string + EndpointID string + MacAddress string + IPv4Address string + IPv6Address string +} + +// NetworkCreate is the expected body of the "create network" http request message +type NetworkCreate struct { + // Check for networks with duplicate names. + // Network is primarily keyed based on a random ID and not on the name. + // Network name is strictly a user-friendly alias to the network + // which is uniquely identified using ID. + // And there is no guaranteed way to check for duplicates. + // Option CheckDuplicate is there to provide a best effort checking of any networks + // which has the same name but it is not guaranteed to catch all name collisions. + CheckDuplicate bool + Driver string + Scope string + EnableIPv6 bool + IPAM *network.IPAM + Internal bool + Attachable bool + Ingress bool + ConfigOnly bool + ConfigFrom *network.ConfigReference + Options map[string]string + Labels map[string]string +} + +// NetworkCreateRequest is the request message sent to the server for network create call. +type NetworkCreateRequest struct { + NetworkCreate + Name string +} + +// NetworkCreateResponse is the response message sent by the server for network create call +type NetworkCreateResponse struct { + ID string `json:"Id"` + Warning string +} + +// NetworkConnect represents the data to be used to connect a container to the network +type NetworkConnect struct { + Container string + EndpointConfig *network.EndpointSettings `json:",omitempty"` +} + +// NetworkDisconnect represents the data to be used to disconnect a container from the network +type NetworkDisconnect struct { + Container string + Force bool +} + +// NetworkInspectOptions holds parameters to inspect network +type NetworkInspectOptions struct { + Scope string + Verbose bool +} + +// Checkpoint represents the details of a checkpoint +type Checkpoint struct { + Name string // Name is the name of the checkpoint +} + +// Runtime describes an OCI runtime +type Runtime struct { + Path string `json:"path"` + Args []string `json:"runtimeArgs,omitempty"` + + // This is exposed here only for internal use + // It is not currently supported to specify custom shim configs + Shim *ShimConfig `json:"-"` +} + +// ShimConfig is used by runtime to configure containerd shims +type ShimConfig struct { + Binary string + Opts interface{} +} + +// DiskUsage contains response of Engine API: +// GET "/system/df" +type DiskUsage struct { + LayersSize int64 + Images []*ImageSummary + Containers []*Container + Volumes []*Volume + BuildCache []*BuildCache + BuilderSize int64 // deprecated +} + +// ContainersPruneReport contains the response for Engine API: +// POST "/containers/prune" +type ContainersPruneReport struct { + ContainersDeleted []string + SpaceReclaimed uint64 +} + +// VolumesPruneReport contains the response for Engine API: +// POST "/volumes/prune" +type VolumesPruneReport struct { + VolumesDeleted []string + SpaceReclaimed uint64 +} + +// ImagesPruneReport contains the response for Engine API: +// POST "/images/prune" +type ImagesPruneReport struct { + ImagesDeleted []ImageDeleteResponseItem + SpaceReclaimed uint64 +} + +// BuildCachePruneReport contains the response for Engine API: +// POST "/build/prune" +type BuildCachePruneReport struct { + CachesDeleted []string + SpaceReclaimed uint64 +} + +// NetworksPruneReport contains the response for Engine API: +// POST "/networks/prune" +type NetworksPruneReport struct { + NetworksDeleted []string +} + +// SecretCreateResponse contains the information returned to a client +// on the creation of a new secret. +type SecretCreateResponse struct { + // ID is the id of the created secret. + ID string +} + +// SecretListOptions holds parameters to list secrets +type SecretListOptions struct { + Filters filters.Args +} + +// ConfigCreateResponse contains the information returned to a client +// on the creation of a new config. +type ConfigCreateResponse struct { + // ID is the id of the created config. + ID string +} + +// ConfigListOptions holds parameters to list configs +type ConfigListOptions struct { + Filters filters.Args +} + +// PushResult contains the tag, manifest digest, and manifest size from the +// push. It's used to signal this information to the trust code in the client +// so it can sign the manifest if necessary. +type PushResult struct { + Tag string + Digest string + Size int +} + +// BuildResult contains the image id of a successful build +type BuildResult struct { + ID string +} + +// BuildCache contains information about a build cache record +type BuildCache struct { + ID string + Parent string + Type string + Description string + InUse bool + Shared bool + Size int64 + CreatedAt time.Time + LastUsedAt *time.Time + UsageCount int +} + +// BuildCachePruneOptions hold parameters to prune the build cache +type BuildCachePruneOptions struct { + All bool + KeepStorage int64 + Filters filters.Args +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/versions/README.md b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/versions/README.md new file mode 100644 index 000000000000..1ef911edb0f9 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/versions/README.md @@ -0,0 +1,14 @@ +# Legacy API type versions + +This package includes types for legacy API versions. The stable version of the API types live in `api/types/*.go`. + +Consider moving a type here when you need to keep backwards compatibility in the API. This legacy types are organized by the latest API version they appear in. For instance, types in the `v1p19` package are valid for API versions below or equal `1.19`. Types in the `v1p20` package are valid for the API version `1.20`, since the versions below that will use the legacy types in `v1p19`. + +## Package name conventions + +The package name convention is to use `v` as a prefix for the version number and `p`(patch) as a separator. We use this nomenclature due to a few restrictions in the Go package name convention: + +1. We cannot use `.` because it's interpreted by the language, think of `v1.20.CallFunction`. +2. We cannot use `_` because golint complains about it. The code is actually valid, but it looks probably more weird: `v1_20.CallFunction`. + +For instance, if you want to modify a type that was available in the version `1.21` of the API but it will have different fields in the version `1.22`, you want to create a new package under `api/types/versions/v1p21`. diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/versions/compare.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/versions/compare.go new file mode 100644 index 000000000000..8ccb0aa92ebe --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/versions/compare.go @@ -0,0 +1,62 @@ +package versions // import "github.com/docker/docker/api/types/versions" + +import ( + "strconv" + "strings" +) + +// compare compares two version strings +// returns -1 if v1 < v2, 1 if v1 > v2, 0 otherwise. +func compare(v1, v2 string) int { + var ( + currTab = strings.Split(v1, ".") + otherTab = strings.Split(v2, ".") + ) + + max := len(currTab) + if len(otherTab) > max { + max = len(otherTab) + } + for i := 0; i < max; i++ { + var currInt, otherInt int + + if len(currTab) > i { + currInt, _ = strconv.Atoi(currTab[i]) + } + if len(otherTab) > i { + otherInt, _ = strconv.Atoi(otherTab[i]) + } + if currInt > otherInt { + return 1 + } + if otherInt > currInt { + return -1 + } + } + return 0 +} + +// LessThan checks if a version is less than another +func LessThan(v, other string) bool { + return compare(v, other) == -1 +} + +// LessThanOrEqualTo checks if a version is less than or equal to another +func LessThanOrEqualTo(v, other string) bool { + return compare(v, other) <= 0 +} + +// GreaterThan checks if a version is greater than another +func GreaterThan(v, other string) bool { + return compare(v, other) == 1 +} + +// GreaterThanOrEqualTo checks if a version is greater than or equal to another +func GreaterThanOrEqualTo(v, other string) bool { + return compare(v, other) >= 0 +} + +// Equal checks if a version is equal to another +func Equal(v, other string) bool { + return compare(v, other) == 0 +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/volume.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/volume.go new file mode 100644 index 000000000000..c69b08448df4 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/volume.go @@ -0,0 +1,72 @@ +package types + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// Volume volume +// swagger:model Volume +type Volume struct { + + // Date/Time the volume was created. + CreatedAt string `json:"CreatedAt,omitempty"` + + // Name of the volume driver used by the volume. + // Required: true + Driver string `json:"Driver"` + + // User-defined key/value metadata. + // Required: true + Labels map[string]string `json:"Labels"` + + // Mount path of the volume on the host. + // Required: true + Mountpoint string `json:"Mountpoint"` + + // Name of the volume. + // Required: true + Name string `json:"Name"` + + // The driver specific options used when creating the volume. + // + // Required: true + Options map[string]string `json:"Options"` + + // The level at which the volume exists. Either `global` for cluster-wide, + // or `local` for machine level. + // + // Required: true + Scope string `json:"Scope"` + + // Low-level details about the volume, provided by the volume driver. + // Details are returned as a map with key/value pairs: + // `{"key":"value","key2":"value2"}`. + // + // The `Status` field is optional, and is omitted if the volume driver + // does not support this feature. + // + Status map[string]interface{} `json:"Status,omitempty"` + + // usage data + UsageData *VolumeUsageData `json:"UsageData,omitempty"` +} + +// VolumeUsageData Usage details about the volume. This information is used by the +// `GET /system/df` endpoint, and omitted in other endpoints. +// +// swagger:model VolumeUsageData +type VolumeUsageData struct { + + // The number of containers referencing this volume. This field + // is set to `-1` if the reference-count is not available. + // + // Required: true + RefCount int64 `json:"RefCount"` + + // Amount of disk space used by the volume (in bytes). This information + // is only available for volumes created with the `"local"` volume + // driver. For volumes created with other volume drivers, this field + // is set to `-1` ("not available") + // + // Required: true + Size int64 `json:"Size"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/volume/volume_create.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/volume/volume_create.go new file mode 100644 index 000000000000..8538078dd663 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/volume/volume_create.go @@ -0,0 +1,31 @@ +package volume // import "github.com/docker/docker/api/types/volume" + +// ---------------------------------------------------------------------------- +// Code generated by `swagger generate operation`. DO NOT EDIT. +// +// See hack/generate-swagger-api.sh +// ---------------------------------------------------------------------------- + +// VolumeCreateBody Volume configuration +// swagger:model VolumeCreateBody +type VolumeCreateBody struct { + + // Name of the volume driver to use. + // Required: true + Driver string `json:"Driver"` + + // A mapping of driver options and values. These options are + // passed directly to the driver and are driver specific. + // + // Required: true + DriverOpts map[string]string `json:"DriverOpts"` + + // User-defined key/value metadata. + // Required: true + Labels map[string]string `json:"Labels"` + + // The new volume's name. If not specified, Docker generates a name. + // + // Required: true + Name string `json:"Name"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/api/types/volume/volume_list.go b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/volume/volume_list.go new file mode 100644 index 000000000000..be06179bf488 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/api/types/volume/volume_list.go @@ -0,0 +1,23 @@ +package volume // import "github.com/docker/docker/api/types/volume" + +// ---------------------------------------------------------------------------- +// Code generated by `swagger generate operation`. DO NOT EDIT. +// +// See hack/generate-swagger-api.sh +// ---------------------------------------------------------------------------- + +import "github.com/docker/docker/api/types" + +// VolumeListOKBody Volume list response +// swagger:model VolumeListOKBody +type VolumeListOKBody struct { + + // List of volumes + // Required: true + Volumes []*types.Volume `json:"Volumes"` + + // Warnings that occurred when fetching the list of volumes. + // + // Required: true + Warnings []string `json:"Warnings"` +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/README.md b/cluster-autoscaler/vendor/github.com/docker/docker/client/README.md new file mode 100644 index 000000000000..992f18117df5 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/README.md @@ -0,0 +1,35 @@ +# Go client for the Docker Engine API + +The `docker` command uses this package to communicate with the daemon. It can also be used by your own Go applications to do anything the command-line interface does – running containers, pulling images, managing swarms, etc. + +For example, to list running containers (the equivalent of `docker ps`): + +```go +package main + +import ( + "context" + "fmt" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/client" +) + +func main() { + cli, err := client.NewClientWithOpts(client.FromEnv) + if err != nil { + panic(err) + } + + containers, err := cli.ContainerList(context.Background(), types.ContainerListOptions{}) + if err != nil { + panic(err) + } + + for _, container := range containers { + fmt.Printf("%s %s\n", container.ID[:10], container.Image) + } +} +``` + +[Full documentation is available on GoDoc.](https://godoc.org/github.com/docker/docker/client) diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/build_cancel.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/build_cancel.go new file mode 100644 index 000000000000..3aae43e3d17e --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/build_cancel.go @@ -0,0 +1,16 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "net/url" +) + +// BuildCancel requests the daemon to cancel ongoing build request +func (cli *Client) BuildCancel(ctx context.Context, id string) error { + query := url.Values{} + query.Set("id", id) + + serverResp, err := cli.post(ctx, "/build/cancel", query, nil, nil) + ensureReaderClosed(serverResp) + return err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/build_prune.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/build_prune.go new file mode 100644 index 000000000000..397d67cdcf1a --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/build_prune.go @@ -0,0 +1,45 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "fmt" + "net/url" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/filters" + "github.com/pkg/errors" +) + +// BuildCachePrune requests the daemon to delete unused cache data +func (cli *Client) BuildCachePrune(ctx context.Context, opts types.BuildCachePruneOptions) (*types.BuildCachePruneReport, error) { + if err := cli.NewVersionError("1.31", "build prune"); err != nil { + return nil, err + } + + report := types.BuildCachePruneReport{} + + query := url.Values{} + if opts.All { + query.Set("all", "1") + } + query.Set("keep-storage", fmt.Sprintf("%d", opts.KeepStorage)) + filters, err := filters.ToJSON(opts.Filters) + if err != nil { + return nil, errors.Wrap(err, "prune could not marshal filters option") + } + query.Set("filters", filters) + + serverResp, err := cli.post(ctx, "/build/prune", query, nil, nil) + defer ensureReaderClosed(serverResp) + + if err != nil { + return nil, err + } + + if err := json.NewDecoder(serverResp.body).Decode(&report); err != nil { + return nil, fmt.Errorf("Error retrieving disk usage: %v", err) + } + + return &report, nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/checkpoint_create.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/checkpoint_create.go new file mode 100644 index 000000000000..921024fe4fb0 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/checkpoint_create.go @@ -0,0 +1,14 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + + "github.com/docker/docker/api/types" +) + +// CheckpointCreate creates a checkpoint from the given container with the given name +func (cli *Client) CheckpointCreate(ctx context.Context, container string, options types.CheckpointCreateOptions) error { + resp, err := cli.post(ctx, "/containers/"+container+"/checkpoints", nil, options, nil) + ensureReaderClosed(resp) + return err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/checkpoint_delete.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/checkpoint_delete.go new file mode 100644 index 000000000000..54f55fa76e6a --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/checkpoint_delete.go @@ -0,0 +1,20 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "net/url" + + "github.com/docker/docker/api/types" +) + +// CheckpointDelete deletes the checkpoint with the given name from the given container +func (cli *Client) CheckpointDelete(ctx context.Context, containerID string, options types.CheckpointDeleteOptions) error { + query := url.Values{} + if options.CheckpointDir != "" { + query.Set("dir", options.CheckpointDir) + } + + resp, err := cli.delete(ctx, "/containers/"+containerID+"/checkpoints/"+options.CheckpointID, query, nil) + ensureReaderClosed(resp) + return err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/checkpoint_list.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/checkpoint_list.go new file mode 100644 index 000000000000..66d46dd161ba --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/checkpoint_list.go @@ -0,0 +1,28 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "net/url" + + "github.com/docker/docker/api/types" +) + +// CheckpointList returns the checkpoints of the given container in the docker host +func (cli *Client) CheckpointList(ctx context.Context, container string, options types.CheckpointListOptions) ([]types.Checkpoint, error) { + var checkpoints []types.Checkpoint + + query := url.Values{} + if options.CheckpointDir != "" { + query.Set("dir", options.CheckpointDir) + } + + resp, err := cli.get(ctx, "/containers/"+container+"/checkpoints", query, nil) + defer ensureReaderClosed(resp) + if err != nil { + return checkpoints, wrapResponseError(err, resp, "container", container) + } + + err = json.NewDecoder(resp.body).Decode(&checkpoints) + return checkpoints, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/client.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/client.go new file mode 100644 index 000000000000..21edf1fa1fc3 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/client.go @@ -0,0 +1,310 @@ +/* +Package client is a Go client for the Docker Engine API. + +For more information about the Engine API, see the documentation: +https://docs.docker.com/engine/api/ + +Usage + +You use the library by creating a client object and calling methods on it. The +client can be created either from environment variables with NewClientWithOpts(client.FromEnv), +or configured manually with NewClient(). + +For example, to list running containers (the equivalent of "docker ps"): + + package main + + import ( + "context" + "fmt" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/client" + ) + + func main() { + cli, err := client.NewClientWithOpts(client.FromEnv) + if err != nil { + panic(err) + } + + containers, err := cli.ContainerList(context.Background(), types.ContainerListOptions{}) + if err != nil { + panic(err) + } + + for _, container := range containers { + fmt.Printf("%s %s\n", container.ID[:10], container.Image) + } + } + +*/ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "fmt" + "net" + "net/http" + "net/url" + "path" + "strings" + + "github.com/docker/docker/api" + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/versions" + "github.com/docker/go-connections/sockets" + "github.com/pkg/errors" +) + +// ErrRedirect is the error returned by checkRedirect when the request is non-GET. +var ErrRedirect = errors.New("unexpected redirect in response") + +// Client is the API client that performs all operations +// against a docker server. +type Client struct { + // scheme sets the scheme for the client + scheme string + // host holds the server address to connect to + host string + // proto holds the client protocol i.e. unix. + proto string + // addr holds the client address. + addr string + // basePath holds the path to prepend to the requests. + basePath string + // client used to send and receive http requests. + client *http.Client + // version of the server to talk to. + version string + // custom http headers configured by users. + customHTTPHeaders map[string]string + // manualOverride is set to true when the version was set by users. + manualOverride bool + + // negotiateVersion indicates if the client should automatically negotiate + // the API version to use when making requests. API version negotiation is + // performed on the first request, after which negotiated is set to "true" + // so that subsequent requests do not re-negotiate. + negotiateVersion bool + + // negotiated indicates that API version negotiation took place + negotiated bool +} + +// CheckRedirect specifies the policy for dealing with redirect responses: +// If the request is non-GET return `ErrRedirect`. Otherwise use the last response. +// +// Go 1.8 changes behavior for HTTP redirects (specifically 301, 307, and 308) in the client . +// The Docker client (and by extension docker API client) can be made to send a request +// like POST /containers//start where what would normally be in the name section of the URL is empty. +// This triggers an HTTP 301 from the daemon. +// In go 1.8 this 301 will be converted to a GET request, and ends up getting a 404 from the daemon. +// This behavior change manifests in the client in that before the 301 was not followed and +// the client did not generate an error, but now results in a message like Error response from daemon: page not found. +func CheckRedirect(req *http.Request, via []*http.Request) error { + if via[0].Method == http.MethodGet { + return http.ErrUseLastResponse + } + return ErrRedirect +} + +// NewClientWithOpts initializes a new API client with default values. It takes functors +// to modify values when creating it, like `NewClientWithOpts(WithVersion(…))` +// It also initializes the custom http headers to add to each request. +// +// It won't send any version information if the version number is empty. It is +// highly recommended that you set a version or your client may break if the +// server is upgraded. +func NewClientWithOpts(ops ...Opt) (*Client, error) { + client, err := defaultHTTPClient(DefaultDockerHost) + if err != nil { + return nil, err + } + c := &Client{ + host: DefaultDockerHost, + version: api.DefaultVersion, + client: client, + proto: defaultProto, + addr: defaultAddr, + } + + for _, op := range ops { + if err := op(c); err != nil { + return nil, err + } + } + + if _, ok := c.client.Transport.(http.RoundTripper); !ok { + return nil, fmt.Errorf("unable to verify TLS configuration, invalid transport %v", c.client.Transport) + } + if c.scheme == "" { + c.scheme = "http" + + tlsConfig := resolveTLSConfig(c.client.Transport) + if tlsConfig != nil { + // TODO(stevvooe): This isn't really the right way to write clients in Go. + // `NewClient` should probably only take an `*http.Client` and work from there. + // Unfortunately, the model of having a host-ish/url-thingy as the connection + // string has us confusing protocol and transport layers. We continue doing + // this to avoid breaking existing clients but this should be addressed. + c.scheme = "https" + } + } + + return c, nil +} + +func defaultHTTPClient(host string) (*http.Client, error) { + url, err := ParseHostURL(host) + if err != nil { + return nil, err + } + transport := new(http.Transport) + sockets.ConfigureTransport(transport, url.Scheme, url.Host) + return &http.Client{ + Transport: transport, + CheckRedirect: CheckRedirect, + }, nil +} + +// Close the transport used by the client +func (cli *Client) Close() error { + if t, ok := cli.client.Transport.(*http.Transport); ok { + t.CloseIdleConnections() + } + return nil +} + +// getAPIPath returns the versioned request path to call the api. +// It appends the query parameters to the path if they are not empty. +func (cli *Client) getAPIPath(ctx context.Context, p string, query url.Values) string { + var apiPath string + if cli.negotiateVersion && !cli.negotiated { + cli.NegotiateAPIVersion(ctx) + } + if cli.version != "" { + v := strings.TrimPrefix(cli.version, "v") + apiPath = path.Join(cli.basePath, "/v"+v, p) + } else { + apiPath = path.Join(cli.basePath, p) + } + return (&url.URL{Path: apiPath, RawQuery: query.Encode()}).String() +} + +// ClientVersion returns the API version used by this client. +func (cli *Client) ClientVersion() string { + return cli.version +} + +// NegotiateAPIVersion queries the API and updates the version to match the +// API version. Any errors are silently ignored. If a manual override is in place, +// either through the `DOCKER_API_VERSION` environment variable, or if the client +// was initialized with a fixed version (`opts.WithVersion(xx)`), no negotiation +// will be performed. +func (cli *Client) NegotiateAPIVersion(ctx context.Context) { + if !cli.manualOverride { + ping, _ := cli.Ping(ctx) + cli.negotiateAPIVersionPing(ping) + } +} + +// NegotiateAPIVersionPing updates the client version to match the Ping.APIVersion +// if the ping version is less than the default version. If a manual override is +// in place, either through the `DOCKER_API_VERSION` environment variable, or if +// the client was initialized with a fixed version (`opts.WithVersion(xx)`), no +// negotiation is performed. +func (cli *Client) NegotiateAPIVersionPing(p types.Ping) { + if !cli.manualOverride { + cli.negotiateAPIVersionPing(p) + } +} + +// negotiateAPIVersionPing queries the API and updates the version to match the +// API version. Any errors are silently ignored. +func (cli *Client) negotiateAPIVersionPing(p types.Ping) { + // try the latest version before versioning headers existed + if p.APIVersion == "" { + p.APIVersion = "1.24" + } + + // if the client is not initialized with a version, start with the latest supported version + if cli.version == "" { + cli.version = api.DefaultVersion + } + + // if server version is lower than the client version, downgrade + if versions.LessThan(p.APIVersion, cli.version) { + cli.version = p.APIVersion + } + + // Store the results, so that automatic API version negotiation (if enabled) + // won't be performed on the next request. + if cli.negotiateVersion { + cli.negotiated = true + } +} + +// DaemonHost returns the host address used by the client +func (cli *Client) DaemonHost() string { + return cli.host +} + +// HTTPClient returns a copy of the HTTP client bound to the server +func (cli *Client) HTTPClient() *http.Client { + c := *cli.client + return &c +} + +// ParseHostURL parses a url string, validates the string is a host url, and +// returns the parsed URL +func ParseHostURL(host string) (*url.URL, error) { + protoAddrParts := strings.SplitN(host, "://", 2) + if len(protoAddrParts) == 1 { + return nil, fmt.Errorf("unable to parse docker host `%s`", host) + } + + var basePath string + proto, addr := protoAddrParts[0], protoAddrParts[1] + if proto == "tcp" { + parsed, err := url.Parse("tcp://" + addr) + if err != nil { + return nil, err + } + addr = parsed.Host + basePath = parsed.Path + } + return &url.URL{ + Scheme: proto, + Host: addr, + Path: basePath, + }, nil +} + +// CustomHTTPHeaders returns the custom http headers stored by the client. +func (cli *Client) CustomHTTPHeaders() map[string]string { + m := make(map[string]string) + for k, v := range cli.customHTTPHeaders { + m[k] = v + } + return m +} + +// SetCustomHTTPHeaders that will be set on every HTTP request made by the client. +// Deprecated: use WithHTTPHeaders when creating the client. +func (cli *Client) SetCustomHTTPHeaders(headers map[string]string) { + cli.customHTTPHeaders = headers +} + +// Dialer returns a dialer for a raw stream connection, with HTTP/1.1 header, that can be used for proxying the daemon connection. +// Used by `docker dial-stdio` (docker/cli#889). +func (cli *Client) Dialer() func(context.Context) (net.Conn, error) { + return func(ctx context.Context) (net.Conn, error) { + if transport, ok := cli.client.Transport.(*http.Transport); ok { + if transport.DialContext != nil && transport.TLSClientConfig == nil { + return transport.DialContext(ctx, cli.proto, cli.addr) + } + } + return fallbackDial(cli.proto, cli.addr, resolveTLSConfig(cli.client.Transport)) + } +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/client_deprecated.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/client_deprecated.go new file mode 100644 index 000000000000..54cdfc29a84b --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/client_deprecated.go @@ -0,0 +1,23 @@ +package client + +import "net/http" + +// NewClient initializes a new API client for the given host and API version. +// It uses the given http client as transport. +// It also initializes the custom http headers to add to each request. +// +// It won't send any version information if the version number is empty. It is +// highly recommended that you set a version or your client may break if the +// server is upgraded. +// Deprecated: use NewClientWithOpts +func NewClient(host string, version string, client *http.Client, httpHeaders map[string]string) (*Client, error) { + return NewClientWithOpts(WithHost(host), WithVersion(version), WithHTTPClient(client), WithHTTPHeaders(httpHeaders)) +} + +// NewEnvClient initializes a new API client based on environment variables. +// See FromEnv for a list of support environment variables. +// +// Deprecated: use NewClientWithOpts(FromEnv) +func NewEnvClient() (*Client, error) { + return NewClientWithOpts(FromEnv) +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/client_unix.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/client_unix.go new file mode 100644 index 000000000000..9d0f0dcbf0ba --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/client_unix.go @@ -0,0 +1,9 @@ +// +build linux freebsd openbsd netbsd darwin solaris illumos dragonfly + +package client // import "github.com/docker/docker/client" + +// DefaultDockerHost defines os specific default if DOCKER_HOST is unset +const DefaultDockerHost = "unix:///var/run/docker.sock" + +const defaultProto = "unix" +const defaultAddr = "/var/run/docker.sock" diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/client_windows.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/client_windows.go new file mode 100644 index 000000000000..c649e54412ce --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/client_windows.go @@ -0,0 +1,7 @@ +package client // import "github.com/docker/docker/client" + +// DefaultDockerHost defines os specific default if DOCKER_HOST is unset +const DefaultDockerHost = "npipe:////./pipe/docker_engine" + +const defaultProto = "npipe" +const defaultAddr = "//./pipe/docker_engine" diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/config_create.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/config_create.go new file mode 100644 index 000000000000..ee7d411df06a --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/config_create.go @@ -0,0 +1,25 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/swarm" +) + +// ConfigCreate creates a new Config. +func (cli *Client) ConfigCreate(ctx context.Context, config swarm.ConfigSpec) (types.ConfigCreateResponse, error) { + var response types.ConfigCreateResponse + if err := cli.NewVersionError("1.30", "config create"); err != nil { + return response, err + } + resp, err := cli.post(ctx, "/configs/create", nil, config, nil) + defer ensureReaderClosed(resp) + if err != nil { + return response, err + } + + err = json.NewDecoder(resp.body).Decode(&response) + return response, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/config_inspect.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/config_inspect.go new file mode 100644 index 000000000000..7d0ce3e11c07 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/config_inspect.go @@ -0,0 +1,36 @@ +package client // import "github.com/docker/docker/client" + +import ( + "bytes" + "context" + "encoding/json" + "io/ioutil" + + "github.com/docker/docker/api/types/swarm" +) + +// ConfigInspectWithRaw returns the config information with raw data +func (cli *Client) ConfigInspectWithRaw(ctx context.Context, id string) (swarm.Config, []byte, error) { + if id == "" { + return swarm.Config{}, nil, objectNotFoundError{object: "config", id: id} + } + if err := cli.NewVersionError("1.30", "config inspect"); err != nil { + return swarm.Config{}, nil, err + } + resp, err := cli.get(ctx, "/configs/"+id, nil, nil) + defer ensureReaderClosed(resp) + if err != nil { + return swarm.Config{}, nil, wrapResponseError(err, resp, "config", id) + } + + body, err := ioutil.ReadAll(resp.body) + if err != nil { + return swarm.Config{}, nil, err + } + + var config swarm.Config + rdr := bytes.NewReader(body) + err = json.NewDecoder(rdr).Decode(&config) + + return config, body, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/config_list.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/config_list.go new file mode 100644 index 000000000000..565acc6e2733 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/config_list.go @@ -0,0 +1,38 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "net/url" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/filters" + "github.com/docker/docker/api/types/swarm" +) + +// ConfigList returns the list of configs. +func (cli *Client) ConfigList(ctx context.Context, options types.ConfigListOptions) ([]swarm.Config, error) { + if err := cli.NewVersionError("1.30", "config list"); err != nil { + return nil, err + } + query := url.Values{} + + if options.Filters.Len() > 0 { + filterJSON, err := filters.ToJSON(options.Filters) + if err != nil { + return nil, err + } + + query.Set("filters", filterJSON) + } + + resp, err := cli.get(ctx, "/configs", query, nil) + defer ensureReaderClosed(resp) + if err != nil { + return nil, err + } + + var configs []swarm.Config + err = json.NewDecoder(resp.body).Decode(&configs) + return configs, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/config_remove.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/config_remove.go new file mode 100644 index 000000000000..a708fcaecfdc --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/config_remove.go @@ -0,0 +1,13 @@ +package client // import "github.com/docker/docker/client" + +import "context" + +// ConfigRemove removes a Config. +func (cli *Client) ConfigRemove(ctx context.Context, id string) error { + if err := cli.NewVersionError("1.30", "config remove"); err != nil { + return err + } + resp, err := cli.delete(ctx, "/configs/"+id, nil, nil) + defer ensureReaderClosed(resp) + return wrapResponseError(err, resp, "config", id) +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/config_update.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/config_update.go new file mode 100644 index 000000000000..39e59cf85890 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/config_update.go @@ -0,0 +1,21 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "net/url" + "strconv" + + "github.com/docker/docker/api/types/swarm" +) + +// ConfigUpdate attempts to update a Config +func (cli *Client) ConfigUpdate(ctx context.Context, id string, version swarm.Version, config swarm.ConfigSpec) error { + if err := cli.NewVersionError("1.30", "config update"); err != nil { + return err + } + query := url.Values{} + query.Set("version", strconv.FormatUint(version.Index, 10)) + resp, err := cli.post(ctx, "/configs/"+id+"/update", query, config, nil) + ensureReaderClosed(resp) + return err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/container_attach.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_attach.go new file mode 100644 index 000000000000..88ba1ef6396d --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_attach.go @@ -0,0 +1,57 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "net/url" + + "github.com/docker/docker/api/types" +) + +// ContainerAttach attaches a connection to a container in the server. +// It returns a types.HijackedConnection with the hijacked connection +// and the a reader to get output. It's up to the called to close +// the hijacked connection by calling types.HijackedResponse.Close. +// +// The stream format on the response will be in one of two formats: +// +// If the container is using a TTY, there is only a single stream (stdout), and +// data is copied directly from the container output stream, no extra +// multiplexing or headers. +// +// If the container is *not* using a TTY, streams for stdout and stderr are +// multiplexed. +// The format of the multiplexed stream is as follows: +// +// [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}[]byte{OUTPUT} +// +// STREAM_TYPE can be 1 for stdout and 2 for stderr +// +// SIZE1, SIZE2, SIZE3, and SIZE4 are four bytes of uint32 encoded as big endian. +// This is the size of OUTPUT. +// +// You can use github.com/docker/docker/pkg/stdcopy.StdCopy to demultiplex this +// stream. +func (cli *Client) ContainerAttach(ctx context.Context, container string, options types.ContainerAttachOptions) (types.HijackedResponse, error) { + query := url.Values{} + if options.Stream { + query.Set("stream", "1") + } + if options.Stdin { + query.Set("stdin", "1") + } + if options.Stdout { + query.Set("stdout", "1") + } + if options.Stderr { + query.Set("stderr", "1") + } + if options.DetachKeys != "" { + query.Set("detachKeys", options.DetachKeys) + } + if options.Logs { + query.Set("logs", "1") + } + + headers := map[string][]string{"Content-Type": {"text/plain"}} + return cli.postHijacked(ctx, "/containers/"+container+"/attach", query, nil, headers) +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/container_commit.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_commit.go new file mode 100644 index 000000000000..2966e88c8eca --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_commit.go @@ -0,0 +1,55 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "errors" + "net/url" + + "github.com/docker/distribution/reference" + "github.com/docker/docker/api/types" +) + +// ContainerCommit applies changes into a container and creates a new tagged image. +func (cli *Client) ContainerCommit(ctx context.Context, container string, options types.ContainerCommitOptions) (types.IDResponse, error) { + var repository, tag string + if options.Reference != "" { + ref, err := reference.ParseNormalizedNamed(options.Reference) + if err != nil { + return types.IDResponse{}, err + } + + if _, isCanonical := ref.(reference.Canonical); isCanonical { + return types.IDResponse{}, errors.New("refusing to create a tag with a digest reference") + } + ref = reference.TagNameOnly(ref) + + if tagged, ok := ref.(reference.Tagged); ok { + tag = tagged.Tag() + } + repository = reference.FamiliarName(ref) + } + + query := url.Values{} + query.Set("container", container) + query.Set("repo", repository) + query.Set("tag", tag) + query.Set("comment", options.Comment) + query.Set("author", options.Author) + for _, change := range options.Changes { + query.Add("changes", change) + } + if !options.Pause { + query.Set("pause", "0") + } + + var response types.IDResponse + resp, err := cli.post(ctx, "/commit", query, options.Config, nil) + defer ensureReaderClosed(resp) + if err != nil { + return response, err + } + + err = json.NewDecoder(resp.body).Decode(&response) + return response, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/container_copy.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_copy.go new file mode 100644 index 000000000000..bb278bf7f324 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_copy.go @@ -0,0 +1,103 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/base64" + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + "path/filepath" + "strings" + + "github.com/docker/docker/api/types" +) + +// ContainerStatPath returns Stat information about a path inside the container filesystem. +func (cli *Client) ContainerStatPath(ctx context.Context, containerID, path string) (types.ContainerPathStat, error) { + query := url.Values{} + query.Set("path", filepath.ToSlash(path)) // Normalize the paths used in the API. + + urlStr := "/containers/" + containerID + "/archive" + response, err := cli.head(ctx, urlStr, query, nil) + defer ensureReaderClosed(response) + if err != nil { + return types.ContainerPathStat{}, wrapResponseError(err, response, "container:path", containerID+":"+path) + } + return getContainerPathStatFromHeader(response.header) +} + +// CopyToContainer copies content into the container filesystem. +// Note that `content` must be a Reader for a TAR archive +func (cli *Client) CopyToContainer(ctx context.Context, containerID, dstPath string, content io.Reader, options types.CopyToContainerOptions) error { + query := url.Values{} + query.Set("path", filepath.ToSlash(dstPath)) // Normalize the paths used in the API. + // Do not allow for an existing directory to be overwritten by a non-directory and vice versa. + if !options.AllowOverwriteDirWithFile { + query.Set("noOverwriteDirNonDir", "true") + } + + if options.CopyUIDGID { + query.Set("copyUIDGID", "true") + } + + apiPath := "/containers/" + containerID + "/archive" + + response, err := cli.putRaw(ctx, apiPath, query, content, nil) + defer ensureReaderClosed(response) + if err != nil { + return wrapResponseError(err, response, "container:path", containerID+":"+dstPath) + } + + // TODO this code converts non-error status-codes (e.g., "204 No Content") into an error; verify if this is the desired behavior + if response.statusCode != http.StatusOK { + return fmt.Errorf("unexpected status code from daemon: %d", response.statusCode) + } + + return nil +} + +// CopyFromContainer gets the content from the container and returns it as a Reader +// for a TAR archive to manipulate it in the host. It's up to the caller to close the reader. +func (cli *Client) CopyFromContainer(ctx context.Context, containerID, srcPath string) (io.ReadCloser, types.ContainerPathStat, error) { + query := make(url.Values, 1) + query.Set("path", filepath.ToSlash(srcPath)) // Normalize the paths used in the API. + + apiPath := "/containers/" + containerID + "/archive" + response, err := cli.get(ctx, apiPath, query, nil) + if err != nil { + return nil, types.ContainerPathStat{}, wrapResponseError(err, response, "container:path", containerID+":"+srcPath) + } + + // TODO this code converts non-error status-codes (e.g., "204 No Content") into an error; verify if this is the desired behavior + if response.statusCode != http.StatusOK { + return nil, types.ContainerPathStat{}, fmt.Errorf("unexpected status code from daemon: %d", response.statusCode) + } + + // In order to get the copy behavior right, we need to know information + // about both the source and the destination. The response headers include + // stat info about the source that we can use in deciding exactly how to + // copy it locally. Along with the stat info about the local destination, + // we have everything we need to handle the multiple possibilities there + // can be when copying a file/dir from one location to another file/dir. + stat, err := getContainerPathStatFromHeader(response.header) + if err != nil { + return nil, stat, fmt.Errorf("unable to get resource stat from response: %s", err) + } + return response.body, stat, err +} + +func getContainerPathStatFromHeader(header http.Header) (types.ContainerPathStat, error) { + var stat types.ContainerPathStat + + encodedStat := header.Get("X-Docker-Container-Path-Stat") + statDecoder := base64.NewDecoder(base64.StdEncoding, strings.NewReader(encodedStat)) + + err := json.NewDecoder(statDecoder).Decode(&stat) + if err != nil { + err = fmt.Errorf("unable to decode container path stat header: %s", err) + } + + return stat, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/container_create.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_create.go new file mode 100644 index 000000000000..b1d5fea5bd50 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_create.go @@ -0,0 +1,63 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "net/url" + + "github.com/containerd/containerd/platforms" + "github.com/docker/docker/api/types/container" + "github.com/docker/docker/api/types/network" + "github.com/docker/docker/api/types/versions" + specs "github.com/opencontainers/image-spec/specs-go/v1" +) + +type configWrapper struct { + *container.Config + HostConfig *container.HostConfig + NetworkingConfig *network.NetworkingConfig + Platform *specs.Platform +} + +// ContainerCreate creates a new container based in the given configuration. +// It can be associated with a name, but it's not mandatory. +func (cli *Client) ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, platform *specs.Platform, containerName string) (container.ContainerCreateCreatedBody, error) { + var response container.ContainerCreateCreatedBody + + if err := cli.NewVersionError("1.25", "stop timeout"); config != nil && config.StopTimeout != nil && err != nil { + return response, err + } + + // When using API 1.24 and under, the client is responsible for removing the container + if hostConfig != nil && versions.LessThan(cli.ClientVersion(), "1.25") { + hostConfig.AutoRemove = false + } + + if err := cli.NewVersionError("1.41", "specify container image platform"); platform != nil && err != nil { + return response, err + } + + query := url.Values{} + if platform != nil { + query.Set("platform", platforms.Format(*platform)) + } + + if containerName != "" { + query.Set("name", containerName) + } + + body := configWrapper{ + Config: config, + HostConfig: hostConfig, + NetworkingConfig: networkingConfig, + } + + serverResp, err := cli.post(ctx, "/containers/create", query, body, nil) + defer ensureReaderClosed(serverResp) + if err != nil { + return response, err + } + + err = json.NewDecoder(serverResp.body).Decode(&response) + return response, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/container_diff.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_diff.go new file mode 100644 index 000000000000..29dac8491df5 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_diff.go @@ -0,0 +1,23 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "net/url" + + "github.com/docker/docker/api/types/container" +) + +// ContainerDiff shows differences in a container filesystem since it was started. +func (cli *Client) ContainerDiff(ctx context.Context, containerID string) ([]container.ContainerChangeResponseItem, error) { + var changes []container.ContainerChangeResponseItem + + serverResp, err := cli.get(ctx, "/containers/"+containerID+"/changes", url.Values{}, nil) + defer ensureReaderClosed(serverResp) + if err != nil { + return changes, err + } + + err = json.NewDecoder(serverResp.body).Decode(&changes) + return changes, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/container_exec.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_exec.go new file mode 100644 index 000000000000..e3ee755b71dc --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_exec.go @@ -0,0 +1,54 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + + "github.com/docker/docker/api/types" +) + +// ContainerExecCreate creates a new exec configuration to run an exec process. +func (cli *Client) ContainerExecCreate(ctx context.Context, container string, config types.ExecConfig) (types.IDResponse, error) { + var response types.IDResponse + + if err := cli.NewVersionError("1.25", "env"); len(config.Env) != 0 && err != nil { + return response, err + } + + resp, err := cli.post(ctx, "/containers/"+container+"/exec", nil, config, nil) + defer ensureReaderClosed(resp) + if err != nil { + return response, err + } + err = json.NewDecoder(resp.body).Decode(&response) + return response, err +} + +// ContainerExecStart starts an exec process already created in the docker host. +func (cli *Client) ContainerExecStart(ctx context.Context, execID string, config types.ExecStartCheck) error { + resp, err := cli.post(ctx, "/exec/"+execID+"/start", nil, config, nil) + ensureReaderClosed(resp) + return err +} + +// ContainerExecAttach attaches a connection to an exec process in the server. +// It returns a types.HijackedConnection with the hijacked connection +// and the a reader to get output. It's up to the called to close +// the hijacked connection by calling types.HijackedResponse.Close. +func (cli *Client) ContainerExecAttach(ctx context.Context, execID string, config types.ExecStartCheck) (types.HijackedResponse, error) { + headers := map[string][]string{"Content-Type": {"application/json"}} + return cli.postHijacked(ctx, "/exec/"+execID+"/start", nil, config, headers) +} + +// ContainerExecInspect returns information about a specific exec process on the docker host. +func (cli *Client) ContainerExecInspect(ctx context.Context, execID string) (types.ContainerExecInspect, error) { + var response types.ContainerExecInspect + resp, err := cli.get(ctx, "/exec/"+execID+"/json", nil, nil) + if err != nil { + return response, err + } + + err = json.NewDecoder(resp.body).Decode(&response) + ensureReaderClosed(resp) + return response, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/container_export.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_export.go new file mode 100644 index 000000000000..d0c0a5cbadfa --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_export.go @@ -0,0 +1,19 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "io" + "net/url" +) + +// ContainerExport retrieves the raw contents of a container +// and returns them as an io.ReadCloser. It's up to the caller +// to close the stream. +func (cli *Client) ContainerExport(ctx context.Context, containerID string) (io.ReadCloser, error) { + serverResp, err := cli.get(ctx, "/containers/"+containerID+"/export", url.Values{}, nil) + if err != nil { + return nil, err + } + + return serverResp.body, nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/container_inspect.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_inspect.go new file mode 100644 index 000000000000..c496bcffea53 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_inspect.go @@ -0,0 +1,53 @@ +package client // import "github.com/docker/docker/client" + +import ( + "bytes" + "context" + "encoding/json" + "io/ioutil" + "net/url" + + "github.com/docker/docker/api/types" +) + +// ContainerInspect returns the container information. +func (cli *Client) ContainerInspect(ctx context.Context, containerID string) (types.ContainerJSON, error) { + if containerID == "" { + return types.ContainerJSON{}, objectNotFoundError{object: "container", id: containerID} + } + serverResp, err := cli.get(ctx, "/containers/"+containerID+"/json", nil, nil) + defer ensureReaderClosed(serverResp) + if err != nil { + return types.ContainerJSON{}, wrapResponseError(err, serverResp, "container", containerID) + } + + var response types.ContainerJSON + err = json.NewDecoder(serverResp.body).Decode(&response) + return response, err +} + +// ContainerInspectWithRaw returns the container information and its raw representation. +func (cli *Client) ContainerInspectWithRaw(ctx context.Context, containerID string, getSize bool) (types.ContainerJSON, []byte, error) { + if containerID == "" { + return types.ContainerJSON{}, nil, objectNotFoundError{object: "container", id: containerID} + } + query := url.Values{} + if getSize { + query.Set("size", "1") + } + serverResp, err := cli.get(ctx, "/containers/"+containerID+"/json", query, nil) + defer ensureReaderClosed(serverResp) + if err != nil { + return types.ContainerJSON{}, nil, wrapResponseError(err, serverResp, "container", containerID) + } + + body, err := ioutil.ReadAll(serverResp.body) + if err != nil { + return types.ContainerJSON{}, nil, err + } + + var response types.ContainerJSON + rdr := bytes.NewReader(body) + err = json.NewDecoder(rdr).Decode(&response) + return response, body, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/container_kill.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_kill.go new file mode 100644 index 000000000000..4d6f1d23da9d --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_kill.go @@ -0,0 +1,16 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "net/url" +) + +// ContainerKill terminates the container process but does not remove the container from the docker host. +func (cli *Client) ContainerKill(ctx context.Context, containerID, signal string) error { + query := url.Values{} + query.Set("signal", signal) + + resp, err := cli.post(ctx, "/containers/"+containerID+"/kill", query, nil, nil) + ensureReaderClosed(resp) + return err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/container_list.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_list.go new file mode 100644 index 000000000000..a973de597fdf --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_list.go @@ -0,0 +1,57 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "net/url" + "strconv" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/filters" +) + +// ContainerList returns the list of containers in the docker host. +func (cli *Client) ContainerList(ctx context.Context, options types.ContainerListOptions) ([]types.Container, error) { + query := url.Values{} + + if options.All { + query.Set("all", "1") + } + + if options.Limit != -1 { + query.Set("limit", strconv.Itoa(options.Limit)) + } + + if options.Since != "" { + query.Set("since", options.Since) + } + + if options.Before != "" { + query.Set("before", options.Before) + } + + if options.Size { + query.Set("size", "1") + } + + if options.Filters.Len() > 0 { + //nolint:staticcheck // ignore SA1019 for old code + filterJSON, err := filters.ToParamWithVersion(cli.version, options.Filters) + + if err != nil { + return nil, err + } + + query.Set("filters", filterJSON) + } + + resp, err := cli.get(ctx, "/containers/json", query, nil) + defer ensureReaderClosed(resp) + if err != nil { + return nil, err + } + + var containers []types.Container + err = json.NewDecoder(resp.body).Decode(&containers) + return containers, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/container_logs.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_logs.go new file mode 100644 index 000000000000..5b6541f03596 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_logs.go @@ -0,0 +1,80 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "io" + "net/url" + "time" + + "github.com/docker/docker/api/types" + timetypes "github.com/docker/docker/api/types/time" + "github.com/pkg/errors" +) + +// ContainerLogs returns the logs generated by a container in an io.ReadCloser. +// It's up to the caller to close the stream. +// +// The stream format on the response will be in one of two formats: +// +// If the container is using a TTY, there is only a single stream (stdout), and +// data is copied directly from the container output stream, no extra +// multiplexing or headers. +// +// If the container is *not* using a TTY, streams for stdout and stderr are +// multiplexed. +// The format of the multiplexed stream is as follows: +// +// [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}[]byte{OUTPUT} +// +// STREAM_TYPE can be 1 for stdout and 2 for stderr +// +// SIZE1, SIZE2, SIZE3, and SIZE4 are four bytes of uint32 encoded as big endian. +// This is the size of OUTPUT. +// +// You can use github.com/docker/docker/pkg/stdcopy.StdCopy to demultiplex this +// stream. +func (cli *Client) ContainerLogs(ctx context.Context, container string, options types.ContainerLogsOptions) (io.ReadCloser, error) { + query := url.Values{} + if options.ShowStdout { + query.Set("stdout", "1") + } + + if options.ShowStderr { + query.Set("stderr", "1") + } + + if options.Since != "" { + ts, err := timetypes.GetTimestamp(options.Since, time.Now()) + if err != nil { + return nil, errors.Wrap(err, `invalid value for "since"`) + } + query.Set("since", ts) + } + + if options.Until != "" { + ts, err := timetypes.GetTimestamp(options.Until, time.Now()) + if err != nil { + return nil, errors.Wrap(err, `invalid value for "until"`) + } + query.Set("until", ts) + } + + if options.Timestamps { + query.Set("timestamps", "1") + } + + if options.Details { + query.Set("details", "1") + } + + if options.Follow { + query.Set("follow", "1") + } + query.Set("tail", options.Tail) + + resp, err := cli.get(ctx, "/containers/"+container+"/logs", query, nil) + if err != nil { + return nil, wrapResponseError(err, resp, "container", container) + } + return resp.body, nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/container_pause.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_pause.go new file mode 100644 index 000000000000..5e7271a371ce --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_pause.go @@ -0,0 +1,10 @@ +package client // import "github.com/docker/docker/client" + +import "context" + +// ContainerPause pauses the main process of a given container without terminating it. +func (cli *Client) ContainerPause(ctx context.Context, containerID string) error { + resp, err := cli.post(ctx, "/containers/"+containerID+"/pause", nil, nil, nil) + ensureReaderClosed(resp) + return err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/container_prune.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_prune.go new file mode 100644 index 000000000000..04383deaaffc --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_prune.go @@ -0,0 +1,36 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "fmt" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/filters" +) + +// ContainersPrune requests the daemon to delete unused data +func (cli *Client) ContainersPrune(ctx context.Context, pruneFilters filters.Args) (types.ContainersPruneReport, error) { + var report types.ContainersPruneReport + + if err := cli.NewVersionError("1.25", "container prune"); err != nil { + return report, err + } + + query, err := getFiltersQuery(pruneFilters) + if err != nil { + return report, err + } + + serverResp, err := cli.post(ctx, "/containers/prune", query, nil, nil) + defer ensureReaderClosed(serverResp) + if err != nil { + return report, err + } + + if err := json.NewDecoder(serverResp.body).Decode(&report); err != nil { + return report, fmt.Errorf("Error retrieving disk usage: %v", err) + } + + return report, nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/container_remove.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_remove.go new file mode 100644 index 000000000000..df81461b889c --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_remove.go @@ -0,0 +1,27 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "net/url" + + "github.com/docker/docker/api/types" +) + +// ContainerRemove kills and removes a container from the docker host. +func (cli *Client) ContainerRemove(ctx context.Context, containerID string, options types.ContainerRemoveOptions) error { + query := url.Values{} + if options.RemoveVolumes { + query.Set("v", "1") + } + if options.RemoveLinks { + query.Set("link", "1") + } + + if options.Force { + query.Set("force", "1") + } + + resp, err := cli.delete(ctx, "/containers/"+containerID, query, nil) + defer ensureReaderClosed(resp) + return wrapResponseError(err, resp, "container", containerID) +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/container_rename.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_rename.go new file mode 100644 index 000000000000..240fdf552b44 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_rename.go @@ -0,0 +1,15 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "net/url" +) + +// ContainerRename changes the name of a given container. +func (cli *Client) ContainerRename(ctx context.Context, containerID, newContainerName string) error { + query := url.Values{} + query.Set("name", newContainerName) + resp, err := cli.post(ctx, "/containers/"+containerID+"/rename", query, nil, nil) + ensureReaderClosed(resp) + return err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/container_resize.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_resize.go new file mode 100644 index 000000000000..a9d4c0c79a0d --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_resize.go @@ -0,0 +1,29 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "net/url" + "strconv" + + "github.com/docker/docker/api/types" +) + +// ContainerResize changes the size of the tty for a container. +func (cli *Client) ContainerResize(ctx context.Context, containerID string, options types.ResizeOptions) error { + return cli.resize(ctx, "/containers/"+containerID, options.Height, options.Width) +} + +// ContainerExecResize changes the size of the tty for an exec process running inside a container. +func (cli *Client) ContainerExecResize(ctx context.Context, execID string, options types.ResizeOptions) error { + return cli.resize(ctx, "/exec/"+execID, options.Height, options.Width) +} + +func (cli *Client) resize(ctx context.Context, basePath string, height, width uint) error { + query := url.Values{} + query.Set("h", strconv.Itoa(int(height))) + query.Set("w", strconv.Itoa(int(width))) + + resp, err := cli.post(ctx, basePath+"/resize", query, nil, nil) + ensureReaderClosed(resp) + return err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/container_restart.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_restart.go new file mode 100644 index 000000000000..41e421969f47 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_restart.go @@ -0,0 +1,22 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "net/url" + "time" + + timetypes "github.com/docker/docker/api/types/time" +) + +// ContainerRestart stops and starts a container again. +// It makes the daemon to wait for the container to be up again for +// a specific amount of time, given the timeout. +func (cli *Client) ContainerRestart(ctx context.Context, containerID string, timeout *time.Duration) error { + query := url.Values{} + if timeout != nil { + query.Set("t", timetypes.DurationToSecondsString(*timeout)) + } + resp, err := cli.post(ctx, "/containers/"+containerID+"/restart", query, nil, nil) + ensureReaderClosed(resp) + return err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/container_start.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_start.go new file mode 100644 index 000000000000..c2e0b15dca8b --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_start.go @@ -0,0 +1,23 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "net/url" + + "github.com/docker/docker/api/types" +) + +// ContainerStart sends a request to the docker daemon to start a container. +func (cli *Client) ContainerStart(ctx context.Context, containerID string, options types.ContainerStartOptions) error { + query := url.Values{} + if len(options.CheckpointID) != 0 { + query.Set("checkpoint", options.CheckpointID) + } + if len(options.CheckpointDir) != 0 { + query.Set("checkpoint-dir", options.CheckpointDir) + } + + resp, err := cli.post(ctx, "/containers/"+containerID+"/start", query, nil, nil) + ensureReaderClosed(resp) + return err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/container_stats.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_stats.go new file mode 100644 index 000000000000..0a6488dde826 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_stats.go @@ -0,0 +1,42 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "net/url" + + "github.com/docker/docker/api/types" +) + +// ContainerStats returns near realtime stats for a given container. +// It's up to the caller to close the io.ReadCloser returned. +func (cli *Client) ContainerStats(ctx context.Context, containerID string, stream bool) (types.ContainerStats, error) { + query := url.Values{} + query.Set("stream", "0") + if stream { + query.Set("stream", "1") + } + + resp, err := cli.get(ctx, "/containers/"+containerID+"/stats", query, nil) + if err != nil { + return types.ContainerStats{}, err + } + + osType := getDockerOS(resp.header.Get("Server")) + return types.ContainerStats{Body: resp.body, OSType: osType}, err +} + +// ContainerStatsOneShot gets a single stat entry from a container. +// It differs from `ContainerStats` in that the API should not wait to prime the stats +func (cli *Client) ContainerStatsOneShot(ctx context.Context, containerID string) (types.ContainerStats, error) { + query := url.Values{} + query.Set("stream", "0") + query.Set("one-shot", "1") + + resp, err := cli.get(ctx, "/containers/"+containerID+"/stats", query, nil) + if err != nil { + return types.ContainerStats{}, err + } + + osType := getDockerOS(resp.header.Get("Server")) + return types.ContainerStats{Body: resp.body, OSType: osType}, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/container_stop.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_stop.go new file mode 100644 index 000000000000..629d7ab64c80 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_stop.go @@ -0,0 +1,26 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "net/url" + "time" + + timetypes "github.com/docker/docker/api/types/time" +) + +// ContainerStop stops a container. In case the container fails to stop +// gracefully within a time frame specified by the timeout argument, +// it is forcefully terminated (killed). +// +// If the timeout is nil, the container's StopTimeout value is used, if set, +// otherwise the engine default. A negative timeout value can be specified, +// meaning no timeout, i.e. no forceful termination is performed. +func (cli *Client) ContainerStop(ctx context.Context, containerID string, timeout *time.Duration) error { + query := url.Values{} + if timeout != nil { + query.Set("t", timetypes.DurationToSecondsString(*timeout)) + } + resp, err := cli.post(ctx, "/containers/"+containerID+"/stop", query, nil, nil) + ensureReaderClosed(resp) + return err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/container_top.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_top.go new file mode 100644 index 000000000000..a5b78999bf0a --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_top.go @@ -0,0 +1,28 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "net/url" + "strings" + + "github.com/docker/docker/api/types/container" +) + +// ContainerTop shows process information from within a container. +func (cli *Client) ContainerTop(ctx context.Context, containerID string, arguments []string) (container.ContainerTopOKBody, error) { + var response container.ContainerTopOKBody + query := url.Values{} + if len(arguments) > 0 { + query.Set("ps_args", strings.Join(arguments, " ")) + } + + resp, err := cli.get(ctx, "/containers/"+containerID+"/top", query, nil) + defer ensureReaderClosed(resp) + if err != nil { + return response, err + } + + err = json.NewDecoder(resp.body).Decode(&response) + return response, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/container_unpause.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_unpause.go new file mode 100644 index 000000000000..1d8f873169b3 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_unpause.go @@ -0,0 +1,10 @@ +package client // import "github.com/docker/docker/client" + +import "context" + +// ContainerUnpause resumes the process execution within a container +func (cli *Client) ContainerUnpause(ctx context.Context, containerID string) error { + resp, err := cli.post(ctx, "/containers/"+containerID+"/unpause", nil, nil, nil) + ensureReaderClosed(resp) + return err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/container_update.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_update.go new file mode 100644 index 000000000000..6917cf9fb36d --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_update.go @@ -0,0 +1,21 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + + "github.com/docker/docker/api/types/container" +) + +// ContainerUpdate updates resources of a container +func (cli *Client) ContainerUpdate(ctx context.Context, containerID string, updateConfig container.UpdateConfig) (container.ContainerUpdateOKBody, error) { + var response container.ContainerUpdateOKBody + serverResp, err := cli.post(ctx, "/containers/"+containerID+"/update", nil, updateConfig, nil) + defer ensureReaderClosed(serverResp) + if err != nil { + return response, err + } + + err = json.NewDecoder(serverResp.body).Decode(&response) + return response, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/container_wait.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_wait.go new file mode 100644 index 000000000000..6ab8c1da96a2 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/container_wait.go @@ -0,0 +1,83 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "net/url" + + "github.com/docker/docker/api/types/container" + "github.com/docker/docker/api/types/versions" +) + +// ContainerWait waits until the specified container is in a certain state +// indicated by the given condition, either "not-running" (default), +// "next-exit", or "removed". +// +// If this client's API version is before 1.30, condition is ignored and +// ContainerWait will return immediately with the two channels, as the server +// will wait as if the condition were "not-running". +// +// If this client's API version is at least 1.30, ContainerWait blocks until +// the request has been acknowledged by the server (with a response header), +// then returns two channels on which the caller can wait for the exit status +// of the container or an error if there was a problem either beginning the +// wait request or in getting the response. This allows the caller to +// synchronize ContainerWait with other calls, such as specifying a +// "next-exit" condition before issuing a ContainerStart request. +func (cli *Client) ContainerWait(ctx context.Context, containerID string, condition container.WaitCondition) (<-chan container.ContainerWaitOKBody, <-chan error) { + if versions.LessThan(cli.ClientVersion(), "1.30") { + return cli.legacyContainerWait(ctx, containerID) + } + + resultC := make(chan container.ContainerWaitOKBody) + errC := make(chan error, 1) + + query := url.Values{} + query.Set("condition", string(condition)) + + resp, err := cli.post(ctx, "/containers/"+containerID+"/wait", query, nil, nil) + if err != nil { + defer ensureReaderClosed(resp) + errC <- err + return resultC, errC + } + + go func() { + defer ensureReaderClosed(resp) + var res container.ContainerWaitOKBody + if err := json.NewDecoder(resp.body).Decode(&res); err != nil { + errC <- err + return + } + + resultC <- res + }() + + return resultC, errC +} + +// legacyContainerWait returns immediately and doesn't have an option to wait +// until the container is removed. +func (cli *Client) legacyContainerWait(ctx context.Context, containerID string) (<-chan container.ContainerWaitOKBody, <-chan error) { + resultC := make(chan container.ContainerWaitOKBody) + errC := make(chan error) + + go func() { + resp, err := cli.post(ctx, "/containers/"+containerID+"/wait", nil, nil, nil) + if err != nil { + errC <- err + return + } + defer ensureReaderClosed(resp) + + var res container.ContainerWaitOKBody + if err := json.NewDecoder(resp.body).Decode(&res); err != nil { + errC <- err + return + } + + resultC <- res + }() + + return resultC, errC +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/disk_usage.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/disk_usage.go new file mode 100644 index 000000000000..354cd36939a8 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/disk_usage.go @@ -0,0 +1,26 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "fmt" + + "github.com/docker/docker/api/types" +) + +// DiskUsage requests the current data usage from the daemon +func (cli *Client) DiskUsage(ctx context.Context) (types.DiskUsage, error) { + var du types.DiskUsage + + serverResp, err := cli.get(ctx, "/system/df", nil, nil) + defer ensureReaderClosed(serverResp) + if err != nil { + return du, err + } + + if err := json.NewDecoder(serverResp.body).Decode(&du); err != nil { + return du, fmt.Errorf("Error retrieving disk usage: %v", err) + } + + return du, nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/distribution_inspect.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/distribution_inspect.go new file mode 100644 index 000000000000..f4e3794cb4c6 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/distribution_inspect.go @@ -0,0 +1,38 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "net/url" + + registrytypes "github.com/docker/docker/api/types/registry" +) + +// DistributionInspect returns the image digest with full Manifest +func (cli *Client) DistributionInspect(ctx context.Context, image, encodedRegistryAuth string) (registrytypes.DistributionInspect, error) { + // Contact the registry to retrieve digest and platform information + var distributionInspect registrytypes.DistributionInspect + if image == "" { + return distributionInspect, objectNotFoundError{object: "distribution", id: image} + } + + if err := cli.NewVersionError("1.30", "distribution inspect"); err != nil { + return distributionInspect, err + } + var headers map[string][]string + + if encodedRegistryAuth != "" { + headers = map[string][]string{ + "X-Registry-Auth": {encodedRegistryAuth}, + } + } + + resp, err := cli.get(ctx, "/distribution/"+image+"/json", url.Values{}, headers) + defer ensureReaderClosed(resp) + if err != nil { + return distributionInspect, err + } + + err = json.NewDecoder(resp.body).Decode(&distributionInspect) + return distributionInspect, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/errors.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/errors.go new file mode 100644 index 000000000000..041bc8d49c44 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/errors.go @@ -0,0 +1,138 @@ +package client // import "github.com/docker/docker/client" + +import ( + "fmt" + "net/http" + + "github.com/docker/docker/api/types/versions" + "github.com/docker/docker/errdefs" + "github.com/pkg/errors" +) + +// errConnectionFailed implements an error returned when connection failed. +type errConnectionFailed struct { + host string +} + +// Error returns a string representation of an errConnectionFailed +func (err errConnectionFailed) Error() string { + if err.host == "" { + return "Cannot connect to the Docker daemon. Is the docker daemon running on this host?" + } + return fmt.Sprintf("Cannot connect to the Docker daemon at %s. Is the docker daemon running?", err.host) +} + +// IsErrConnectionFailed returns true if the error is caused by connection failed. +func IsErrConnectionFailed(err error) bool { + return errors.As(err, &errConnectionFailed{}) +} + +// ErrorConnectionFailed returns an error with host in the error message when connection to docker daemon failed. +func ErrorConnectionFailed(host string) error { + return errConnectionFailed{host: host} +} + +// Deprecated: use the errdefs.NotFound() interface instead. Kept for backward compatibility +type notFound interface { + error + NotFound() bool +} + +// IsErrNotFound returns true if the error is a NotFound error, which is returned +// by the API when some object is not found. +func IsErrNotFound(err error) bool { + var e notFound + if errors.As(err, &e) { + return true + } + return errdefs.IsNotFound(err) +} + +type objectNotFoundError struct { + object string + id string +} + +func (e objectNotFoundError) NotFound() {} + +func (e objectNotFoundError) Error() string { + return fmt.Sprintf("Error: No such %s: %s", e.object, e.id) +} + +func wrapResponseError(err error, resp serverResponse, object, id string) error { + switch { + case err == nil: + return nil + case resp.statusCode == http.StatusNotFound: + return objectNotFoundError{object: object, id: id} + case resp.statusCode == http.StatusNotImplemented: + return errdefs.NotImplemented(err) + default: + return err + } +} + +// unauthorizedError represents an authorization error in a remote registry. +type unauthorizedError struct { + cause error +} + +// Error returns a string representation of an unauthorizedError +func (u unauthorizedError) Error() string { + return u.cause.Error() +} + +// IsErrUnauthorized returns true if the error is caused +// when a remote registry authentication fails +func IsErrUnauthorized(err error) bool { + if _, ok := err.(unauthorizedError); ok { + return ok + } + return errdefs.IsUnauthorized(err) +} + +type pluginPermissionDenied struct { + name string +} + +func (e pluginPermissionDenied) Error() string { + return "Permission denied while installing plugin " + e.name +} + +// IsErrPluginPermissionDenied returns true if the error is caused +// when a user denies a plugin's permissions +func IsErrPluginPermissionDenied(err error) bool { + _, ok := err.(pluginPermissionDenied) + return ok +} + +type notImplementedError struct { + message string +} + +func (e notImplementedError) Error() string { + return e.message +} + +func (e notImplementedError) NotImplemented() bool { + return true +} + +// IsErrNotImplemented returns true if the error is a NotImplemented error. +// This is returned by the API when a requested feature has not been +// implemented. +func IsErrNotImplemented(err error) bool { + if _, ok := err.(notImplementedError); ok { + return ok + } + return errdefs.IsNotImplemented(err) +} + +// NewVersionError returns an error if the APIVersion required +// if less than the current supported version +func (cli *Client) NewVersionError(APIrequired, feature string) error { + if cli.version != "" && versions.LessThan(cli.version, APIrequired) { + return fmt.Errorf("%q requires API version %s, but the Docker daemon API version is %s", feature, APIrequired, cli.version) + } + return nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/events.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/events.go new file mode 100644 index 000000000000..f0dc9d9e12f3 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/events.go @@ -0,0 +1,102 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "net/url" + "time" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/events" + "github.com/docker/docker/api/types/filters" + timetypes "github.com/docker/docker/api/types/time" +) + +// Events returns a stream of events in the daemon. It's up to the caller to close the stream +// by cancelling the context. Once the stream has been completely read an io.EOF error will +// be sent over the error channel. If an error is sent all processing will be stopped. It's up +// to the caller to reopen the stream in the event of an error by reinvoking this method. +func (cli *Client) Events(ctx context.Context, options types.EventsOptions) (<-chan events.Message, <-chan error) { + + messages := make(chan events.Message) + errs := make(chan error, 1) + + started := make(chan struct{}) + go func() { + defer close(errs) + + query, err := buildEventsQueryParams(cli.version, options) + if err != nil { + close(started) + errs <- err + return + } + + resp, err := cli.get(ctx, "/events", query, nil) + if err != nil { + close(started) + errs <- err + return + } + defer resp.body.Close() + + decoder := json.NewDecoder(resp.body) + + close(started) + for { + select { + case <-ctx.Done(): + errs <- ctx.Err() + return + default: + var event events.Message + if err := decoder.Decode(&event); err != nil { + errs <- err + return + } + + select { + case messages <- event: + case <-ctx.Done(): + errs <- ctx.Err() + return + } + } + } + }() + <-started + + return messages, errs +} + +func buildEventsQueryParams(cliVersion string, options types.EventsOptions) (url.Values, error) { + query := url.Values{} + ref := time.Now() + + if options.Since != "" { + ts, err := timetypes.GetTimestamp(options.Since, ref) + if err != nil { + return nil, err + } + query.Set("since", ts) + } + + if options.Until != "" { + ts, err := timetypes.GetTimestamp(options.Until, ref) + if err != nil { + return nil, err + } + query.Set("until", ts) + } + + if options.Filters.Len() > 0 { + //nolint:staticcheck // ignore SA1019 for old code + filterJSON, err := filters.ToParamWithVersion(cliVersion, options.Filters) + if err != nil { + return nil, err + } + query.Set("filters", filterJSON) + } + + return query, nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/hijack.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/hijack.go new file mode 100644 index 000000000000..e1dc49ef0f66 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/hijack.go @@ -0,0 +1,145 @@ +package client // import "github.com/docker/docker/client" + +import ( + "bufio" + "context" + "crypto/tls" + "fmt" + "net" + "net/http" + "net/http/httputil" + "net/url" + "time" + + "github.com/docker/docker/api/types" + "github.com/docker/go-connections/sockets" + "github.com/pkg/errors" +) + +// postHijacked sends a POST request and hijacks the connection. +func (cli *Client) postHijacked(ctx context.Context, path string, query url.Values, body interface{}, headers map[string][]string) (types.HijackedResponse, error) { + bodyEncoded, err := encodeData(body) + if err != nil { + return types.HijackedResponse{}, err + } + + apiPath := cli.getAPIPath(ctx, path, query) + req, err := http.NewRequest(http.MethodPost, apiPath, bodyEncoded) + if err != nil { + return types.HijackedResponse{}, err + } + req = cli.addHeaders(req, headers) + + conn, err := cli.setupHijackConn(ctx, req, "tcp") + if err != nil { + return types.HijackedResponse{}, err + } + + return types.HijackedResponse{Conn: conn, Reader: bufio.NewReader(conn)}, err +} + +// DialHijack returns a hijacked connection with negotiated protocol proto. +func (cli *Client) DialHijack(ctx context.Context, url, proto string, meta map[string][]string) (net.Conn, error) { + req, err := http.NewRequest(http.MethodPost, url, nil) + if err != nil { + return nil, err + } + req = cli.addHeaders(req, meta) + + return cli.setupHijackConn(ctx, req, proto) +} + +// fallbackDial is used when WithDialer() was not called. +// See cli.Dialer(). +func fallbackDial(proto, addr string, tlsConfig *tls.Config) (net.Conn, error) { + if tlsConfig != nil && proto != "unix" && proto != "npipe" { + return tls.Dial(proto, addr, tlsConfig) + } + if proto == "npipe" { + return sockets.DialPipe(addr, 32*time.Second) + } + return net.Dial(proto, addr) +} + +func (cli *Client) setupHijackConn(ctx context.Context, req *http.Request, proto string) (net.Conn, error) { + req.Host = cli.addr + req.Header.Set("Connection", "Upgrade") + req.Header.Set("Upgrade", proto) + + dialer := cli.Dialer() + conn, err := dialer(ctx) + if err != nil { + return nil, errors.Wrap(err, "cannot connect to the Docker daemon. Is 'docker daemon' running on this host?") + } + + // When we set up a TCP connection for hijack, there could be long periods + // of inactivity (a long running command with no output) that in certain + // network setups may cause ECONNTIMEOUT, leaving the client in an unknown + // state. Setting TCP KeepAlive on the socket connection will prohibit + // ECONNTIMEOUT unless the socket connection truly is broken + if tcpConn, ok := conn.(*net.TCPConn); ok { + tcpConn.SetKeepAlive(true) + tcpConn.SetKeepAlivePeriod(30 * time.Second) + } + + clientconn := httputil.NewClientConn(conn, nil) + defer clientconn.Close() + + // Server hijacks the connection, error 'connection closed' expected + resp, err := clientconn.Do(req) + + //nolint:staticcheck // ignore SA1019 for connecting to old (pre go1.8) daemons + if err != httputil.ErrPersistEOF { + if err != nil { + return nil, err + } + if resp.StatusCode != http.StatusSwitchingProtocols { + resp.Body.Close() + return nil, fmt.Errorf("unable to upgrade to %s, received %d", proto, resp.StatusCode) + } + } + + c, br := clientconn.Hijack() + if br.Buffered() > 0 { + // If there is buffered content, wrap the connection. We return an + // object that implements CloseWrite iff the underlying connection + // implements it. + if _, ok := c.(types.CloseWriter); ok { + c = &hijackedConnCloseWriter{&hijackedConn{c, br}} + } else { + c = &hijackedConn{c, br} + } + } else { + br.Reset(nil) + } + + return c, nil +} + +// hijackedConn wraps a net.Conn and is returned by setupHijackConn in the case +// that a) there was already buffered data in the http layer when Hijack() was +// called, and b) the underlying net.Conn does *not* implement CloseWrite(). +// hijackedConn does not implement CloseWrite() either. +type hijackedConn struct { + net.Conn + r *bufio.Reader +} + +func (c *hijackedConn) Read(b []byte) (int, error) { + return c.r.Read(b) +} + +// hijackedConnCloseWriter is a hijackedConn which additionally implements +// CloseWrite(). It is returned by setupHijackConn in the case that a) there +// was already buffered data in the http layer when Hijack() was called, and b) +// the underlying net.Conn *does* implement CloseWrite(). +type hijackedConnCloseWriter struct { + *hijackedConn +} + +var _ types.CloseWriter = &hijackedConnCloseWriter{} + +func (c *hijackedConnCloseWriter) CloseWrite() error { + conn := c.Conn.(types.CloseWriter) + return conn.CloseWrite() +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/image_build.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/image_build.go new file mode 100644 index 000000000000..8fcf995036fb --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/image_build.go @@ -0,0 +1,146 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/base64" + "encoding/json" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/container" +) + +// ImageBuild sends request to the daemon to build images. +// The Body in the response implement an io.ReadCloser and it's up to the caller to +// close it. +func (cli *Client) ImageBuild(ctx context.Context, buildContext io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error) { + query, err := cli.imageBuildOptionsToQuery(options) + if err != nil { + return types.ImageBuildResponse{}, err + } + + headers := http.Header(make(map[string][]string)) + buf, err := json.Marshal(options.AuthConfigs) + if err != nil { + return types.ImageBuildResponse{}, err + } + headers.Add("X-Registry-Config", base64.URLEncoding.EncodeToString(buf)) + + headers.Set("Content-Type", "application/x-tar") + + serverResp, err := cli.postRaw(ctx, "/build", query, buildContext, headers) + if err != nil { + return types.ImageBuildResponse{}, err + } + + osType := getDockerOS(serverResp.header.Get("Server")) + + return types.ImageBuildResponse{ + Body: serverResp.body, + OSType: osType, + }, nil +} + +func (cli *Client) imageBuildOptionsToQuery(options types.ImageBuildOptions) (url.Values, error) { + query := url.Values{ + "t": options.Tags, + "securityopt": options.SecurityOpt, + "extrahosts": options.ExtraHosts, + } + if options.SuppressOutput { + query.Set("q", "1") + } + if options.RemoteContext != "" { + query.Set("remote", options.RemoteContext) + } + if options.NoCache { + query.Set("nocache", "1") + } + if options.Remove { + query.Set("rm", "1") + } else { + query.Set("rm", "0") + } + + if options.ForceRemove { + query.Set("forcerm", "1") + } + + if options.PullParent { + query.Set("pull", "1") + } + + if options.Squash { + if err := cli.NewVersionError("1.25", "squash"); err != nil { + return query, err + } + query.Set("squash", "1") + } + + if !container.Isolation.IsDefault(options.Isolation) { + query.Set("isolation", string(options.Isolation)) + } + + query.Set("cpusetcpus", options.CPUSetCPUs) + query.Set("networkmode", options.NetworkMode) + query.Set("cpusetmems", options.CPUSetMems) + query.Set("cpushares", strconv.FormatInt(options.CPUShares, 10)) + query.Set("cpuquota", strconv.FormatInt(options.CPUQuota, 10)) + query.Set("cpuperiod", strconv.FormatInt(options.CPUPeriod, 10)) + query.Set("memory", strconv.FormatInt(options.Memory, 10)) + query.Set("memswap", strconv.FormatInt(options.MemorySwap, 10)) + query.Set("cgroupparent", options.CgroupParent) + query.Set("shmsize", strconv.FormatInt(options.ShmSize, 10)) + query.Set("dockerfile", options.Dockerfile) + query.Set("target", options.Target) + + ulimitsJSON, err := json.Marshal(options.Ulimits) + if err != nil { + return query, err + } + query.Set("ulimits", string(ulimitsJSON)) + + buildArgsJSON, err := json.Marshal(options.BuildArgs) + if err != nil { + return query, err + } + query.Set("buildargs", string(buildArgsJSON)) + + labelsJSON, err := json.Marshal(options.Labels) + if err != nil { + return query, err + } + query.Set("labels", string(labelsJSON)) + + cacheFromJSON, err := json.Marshal(options.CacheFrom) + if err != nil { + return query, err + } + query.Set("cachefrom", string(cacheFromJSON)) + if options.SessionID != "" { + query.Set("session", options.SessionID) + } + if options.Platform != "" { + if err := cli.NewVersionError("1.32", "platform"); err != nil { + return query, err + } + query.Set("platform", strings.ToLower(options.Platform)) + } + if options.BuildID != "" { + query.Set("buildid", options.BuildID) + } + query.Set("version", string(options.Version)) + + if options.Outputs != nil { + outputsJSON, err := json.Marshal(options.Outputs) + if err != nil { + return query, err + } + query.Set("outputs", string(outputsJSON)) + } + return query, nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/image_create.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/image_create.go new file mode 100644 index 000000000000..239380474e61 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/image_create.go @@ -0,0 +1,37 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "io" + "net/url" + "strings" + + "github.com/docker/distribution/reference" + "github.com/docker/docker/api/types" +) + +// ImageCreate creates a new image based in the parent options. +// It returns the JSON content in the response body. +func (cli *Client) ImageCreate(ctx context.Context, parentReference string, options types.ImageCreateOptions) (io.ReadCloser, error) { + ref, err := reference.ParseNormalizedNamed(parentReference) + if err != nil { + return nil, err + } + + query := url.Values{} + query.Set("fromImage", reference.FamiliarName(ref)) + query.Set("tag", getAPITagFromNamedRef(ref)) + if options.Platform != "" { + query.Set("platform", strings.ToLower(options.Platform)) + } + resp, err := cli.tryImageCreate(ctx, query, options.RegistryAuth) + if err != nil { + return nil, err + } + return resp.body, nil +} + +func (cli *Client) tryImageCreate(ctx context.Context, query url.Values, registryAuth string) (serverResponse, error) { + headers := map[string][]string{"X-Registry-Auth": {registryAuth}} + return cli.post(ctx, "/images/create", query, nil, headers) +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/image_history.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/image_history.go new file mode 100644 index 000000000000..b5bea10d8f63 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/image_history.go @@ -0,0 +1,22 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "net/url" + + "github.com/docker/docker/api/types/image" +) + +// ImageHistory returns the changes in an image in history format. +func (cli *Client) ImageHistory(ctx context.Context, imageID string) ([]image.HistoryResponseItem, error) { + var history []image.HistoryResponseItem + serverResp, err := cli.get(ctx, "/images/"+imageID+"/history", url.Values{}, nil) + defer ensureReaderClosed(serverResp) + if err != nil { + return history, err + } + + err = json.NewDecoder(serverResp.body).Decode(&history) + return history, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/image_import.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/image_import.go new file mode 100644 index 000000000000..d3336d4106a9 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/image_import.go @@ -0,0 +1,40 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "io" + "net/url" + "strings" + + "github.com/docker/distribution/reference" + "github.com/docker/docker/api/types" +) + +// ImageImport creates a new image based in the source options. +// It returns the JSON content in the response body. +func (cli *Client) ImageImport(ctx context.Context, source types.ImageImportSource, ref string, options types.ImageImportOptions) (io.ReadCloser, error) { + if ref != "" { + // Check if the given image name can be resolved + if _, err := reference.ParseNormalizedNamed(ref); err != nil { + return nil, err + } + } + + query := url.Values{} + query.Set("fromSrc", source.SourceName) + query.Set("repo", ref) + query.Set("tag", options.Tag) + query.Set("message", options.Message) + if options.Platform != "" { + query.Set("platform", strings.ToLower(options.Platform)) + } + for _, change := range options.Changes { + query.Add("changes", change) + } + + resp, err := cli.postRaw(ctx, "/images/create", query, source.Source, nil) + if err != nil { + return nil, err + } + return resp.body, nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/image_inspect.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/image_inspect.go new file mode 100644 index 000000000000..1eb8dce02591 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/image_inspect.go @@ -0,0 +1,32 @@ +package client // import "github.com/docker/docker/client" + +import ( + "bytes" + "context" + "encoding/json" + "io/ioutil" + + "github.com/docker/docker/api/types" +) + +// ImageInspectWithRaw returns the image information and its raw representation. +func (cli *Client) ImageInspectWithRaw(ctx context.Context, imageID string) (types.ImageInspect, []byte, error) { + if imageID == "" { + return types.ImageInspect{}, nil, objectNotFoundError{object: "image", id: imageID} + } + serverResp, err := cli.get(ctx, "/images/"+imageID+"/json", nil, nil) + defer ensureReaderClosed(serverResp) + if err != nil { + return types.ImageInspect{}, nil, wrapResponseError(err, serverResp, "image", imageID) + } + + body, err := ioutil.ReadAll(serverResp.body) + if err != nil { + return types.ImageInspect{}, nil, err + } + + var response types.ImageInspect + rdr := bytes.NewReader(body) + err = json.NewDecoder(rdr).Decode(&response) + return response, body, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/image_list.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/image_list.go new file mode 100644 index 000000000000..a4d7505094cd --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/image_list.go @@ -0,0 +1,46 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "net/url" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/filters" + "github.com/docker/docker/api/types/versions" +) + +// ImageList returns a list of images in the docker host. +func (cli *Client) ImageList(ctx context.Context, options types.ImageListOptions) ([]types.ImageSummary, error) { + var images []types.ImageSummary + query := url.Values{} + + optionFilters := options.Filters + referenceFilters := optionFilters.Get("reference") + if versions.LessThan(cli.version, "1.25") && len(referenceFilters) > 0 { + query.Set("filter", referenceFilters[0]) + for _, filterValue := range referenceFilters { + optionFilters.Del("reference", filterValue) + } + } + if optionFilters.Len() > 0 { + //nolint:staticcheck // ignore SA1019 for old code + filterJSON, err := filters.ToParamWithVersion(cli.version, optionFilters) + if err != nil { + return images, err + } + query.Set("filters", filterJSON) + } + if options.All { + query.Set("all", "1") + } + + serverResp, err := cli.get(ctx, "/images/json", query, nil) + defer ensureReaderClosed(serverResp) + if err != nil { + return images, err + } + + err = json.NewDecoder(serverResp.body).Decode(&images) + return images, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/image_load.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/image_load.go new file mode 100644 index 000000000000..91016e493c44 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/image_load.go @@ -0,0 +1,29 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "io" + "net/url" + + "github.com/docker/docker/api/types" +) + +// ImageLoad loads an image in the docker host from the client host. +// It's up to the caller to close the io.ReadCloser in the +// ImageLoadResponse returned by this function. +func (cli *Client) ImageLoad(ctx context.Context, input io.Reader, quiet bool) (types.ImageLoadResponse, error) { + v := url.Values{} + v.Set("quiet", "0") + if quiet { + v.Set("quiet", "1") + } + headers := map[string][]string{"Content-Type": {"application/x-tar"}} + resp, err := cli.postRaw(ctx, "/images/load", v, input, headers) + if err != nil { + return types.ImageLoadResponse{}, err + } + return types.ImageLoadResponse{ + Body: resp.body, + JSON: resp.header.Get("Content-Type") == "application/json", + }, nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/image_prune.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/image_prune.go new file mode 100644 index 000000000000..56af6d7f98f4 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/image_prune.go @@ -0,0 +1,36 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "fmt" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/filters" +) + +// ImagesPrune requests the daemon to delete unused data +func (cli *Client) ImagesPrune(ctx context.Context, pruneFilters filters.Args) (types.ImagesPruneReport, error) { + var report types.ImagesPruneReport + + if err := cli.NewVersionError("1.25", "image prune"); err != nil { + return report, err + } + + query, err := getFiltersQuery(pruneFilters) + if err != nil { + return report, err + } + + serverResp, err := cli.post(ctx, "/images/prune", query, nil, nil) + defer ensureReaderClosed(serverResp) + if err != nil { + return report, err + } + + if err := json.NewDecoder(serverResp.body).Decode(&report); err != nil { + return report, fmt.Errorf("Error retrieving disk usage: %v", err) + } + + return report, nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/image_pull.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/image_pull.go new file mode 100644 index 000000000000..a23975591be2 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/image_pull.go @@ -0,0 +1,64 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "io" + "net/url" + "strings" + + "github.com/docker/distribution/reference" + "github.com/docker/docker/api/types" + "github.com/docker/docker/errdefs" +) + +// ImagePull requests the docker host to pull an image from a remote registry. +// It executes the privileged function if the operation is unauthorized +// and it tries one more time. +// It's up to the caller to handle the io.ReadCloser and close it properly. +// +// FIXME(vdemeester): there is currently used in a few way in docker/docker +// - if not in trusted content, ref is used to pass the whole reference, and tag is empty +// - if in trusted content, ref is used to pass the reference name, and tag for the digest +func (cli *Client) ImagePull(ctx context.Context, refStr string, options types.ImagePullOptions) (io.ReadCloser, error) { + ref, err := reference.ParseNormalizedNamed(refStr) + if err != nil { + return nil, err + } + + query := url.Values{} + query.Set("fromImage", reference.FamiliarName(ref)) + if !options.All { + query.Set("tag", getAPITagFromNamedRef(ref)) + } + if options.Platform != "" { + query.Set("platform", strings.ToLower(options.Platform)) + } + + resp, err := cli.tryImageCreate(ctx, query, options.RegistryAuth) + if errdefs.IsUnauthorized(err) && options.PrivilegeFunc != nil { + newAuthHeader, privilegeErr := options.PrivilegeFunc() + if privilegeErr != nil { + return nil, privilegeErr + } + resp, err = cli.tryImageCreate(ctx, query, newAuthHeader) + } + if err != nil { + return nil, err + } + return resp.body, nil +} + +// getAPITagFromNamedRef returns a tag from the specified reference. +// This function is necessary as long as the docker "server" api expects +// digests to be sent as tags and makes a distinction between the name +// and tag/digest part of a reference. +func getAPITagFromNamedRef(ref reference.Named) string { + if digested, ok := ref.(reference.Digested); ok { + return digested.Digest().String() + } + ref = reference.TagNameOnly(ref) + if tagged, ok := ref.(reference.Tagged); ok { + return tagged.Tag() + } + return "" +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/image_push.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/image_push.go new file mode 100644 index 000000000000..845580d4a4cd --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/image_push.go @@ -0,0 +1,54 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "errors" + "io" + "net/url" + + "github.com/docker/distribution/reference" + "github.com/docker/docker/api/types" + "github.com/docker/docker/errdefs" +) + +// ImagePush requests the docker host to push an image to a remote registry. +// It executes the privileged function if the operation is unauthorized +// and it tries one more time. +// It's up to the caller to handle the io.ReadCloser and close it properly. +func (cli *Client) ImagePush(ctx context.Context, image string, options types.ImagePushOptions) (io.ReadCloser, error) { + ref, err := reference.ParseNormalizedNamed(image) + if err != nil { + return nil, err + } + + if _, isCanonical := ref.(reference.Canonical); isCanonical { + return nil, errors.New("cannot push a digest reference") + } + + name := reference.FamiliarName(ref) + query := url.Values{} + if !options.All { + ref = reference.TagNameOnly(ref) + if tagged, ok := ref.(reference.Tagged); ok { + query.Set("tag", tagged.Tag()) + } + } + + resp, err := cli.tryImagePush(ctx, name, query, options.RegistryAuth) + if errdefs.IsUnauthorized(err) && options.PrivilegeFunc != nil { + newAuthHeader, privilegeErr := options.PrivilegeFunc() + if privilegeErr != nil { + return nil, privilegeErr + } + resp, err = cli.tryImagePush(ctx, name, query, newAuthHeader) + } + if err != nil { + return nil, err + } + return resp.body, nil +} + +func (cli *Client) tryImagePush(ctx context.Context, imageID string, query url.Values, registryAuth string) (serverResponse, error) { + headers := map[string][]string{"X-Registry-Auth": {registryAuth}} + return cli.post(ctx, "/images/"+imageID+"/push", query, nil, headers) +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/image_remove.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/image_remove.go new file mode 100644 index 000000000000..84a41af0f2ca --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/image_remove.go @@ -0,0 +1,31 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "net/url" + + "github.com/docker/docker/api/types" +) + +// ImageRemove removes an image from the docker host. +func (cli *Client) ImageRemove(ctx context.Context, imageID string, options types.ImageRemoveOptions) ([]types.ImageDeleteResponseItem, error) { + query := url.Values{} + + if options.Force { + query.Set("force", "1") + } + if !options.PruneChildren { + query.Set("noprune", "1") + } + + var dels []types.ImageDeleteResponseItem + resp, err := cli.delete(ctx, "/images/"+imageID, query, nil) + defer ensureReaderClosed(resp) + if err != nil { + return dels, wrapResponseError(err, resp, "image", imageID) + } + + err = json.NewDecoder(resp.body).Decode(&dels) + return dels, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/image_save.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/image_save.go new file mode 100644 index 000000000000..d1314e4b22fe --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/image_save.go @@ -0,0 +1,21 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "io" + "net/url" +) + +// ImageSave retrieves one or more images from the docker host as an io.ReadCloser. +// It's up to the caller to store the images and close the stream. +func (cli *Client) ImageSave(ctx context.Context, imageIDs []string) (io.ReadCloser, error) { + query := url.Values{ + "names": imageIDs, + } + + resp, err := cli.get(ctx, "/images/get", query, nil) + if err != nil { + return nil, err + } + return resp.body, nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/image_search.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/image_search.go new file mode 100644 index 000000000000..82955a74775b --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/image_search.go @@ -0,0 +1,51 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "fmt" + "net/url" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/filters" + "github.com/docker/docker/api/types/registry" + "github.com/docker/docker/errdefs" +) + +// ImageSearch makes the docker host to search by a term in a remote registry. +// The list of results is not sorted in any fashion. +func (cli *Client) ImageSearch(ctx context.Context, term string, options types.ImageSearchOptions) ([]registry.SearchResult, error) { + var results []registry.SearchResult + query := url.Values{} + query.Set("term", term) + query.Set("limit", fmt.Sprintf("%d", options.Limit)) + + if options.Filters.Len() > 0 { + filterJSON, err := filters.ToJSON(options.Filters) + if err != nil { + return results, err + } + query.Set("filters", filterJSON) + } + + resp, err := cli.tryImageSearch(ctx, query, options.RegistryAuth) + defer ensureReaderClosed(resp) + if errdefs.IsUnauthorized(err) && options.PrivilegeFunc != nil { + newAuthHeader, privilegeErr := options.PrivilegeFunc() + if privilegeErr != nil { + return results, privilegeErr + } + resp, err = cli.tryImageSearch(ctx, query, newAuthHeader) + } + if err != nil { + return results, err + } + + err = json.NewDecoder(resp.body).Decode(&results) + return results, err +} + +func (cli *Client) tryImageSearch(ctx context.Context, query url.Values, registryAuth string) (serverResponse, error) { + headers := map[string][]string{"X-Registry-Auth": {registryAuth}} + return cli.get(ctx, "/images/search", query, headers) +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/image_tag.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/image_tag.go new file mode 100644 index 000000000000..5652bfc252bb --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/image_tag.go @@ -0,0 +1,37 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "net/url" + + "github.com/docker/distribution/reference" + "github.com/pkg/errors" +) + +// ImageTag tags an image in the docker host +func (cli *Client) ImageTag(ctx context.Context, source, target string) error { + if _, err := reference.ParseAnyReference(source); err != nil { + return errors.Wrapf(err, "Error parsing reference: %q is not a valid repository/tag", source) + } + + ref, err := reference.ParseNormalizedNamed(target) + if err != nil { + return errors.Wrapf(err, "Error parsing reference: %q is not a valid repository/tag", target) + } + + if _, isCanonical := ref.(reference.Canonical); isCanonical { + return errors.New("refusing to create a tag with a digest reference") + } + + ref = reference.TagNameOnly(ref) + + query := url.Values{} + query.Set("repo", reference.FamiliarName(ref)) + if tagged, ok := ref.(reference.Tagged); ok { + query.Set("tag", tagged.Tag()) + } + + resp, err := cli.post(ctx, "/images/"+source+"/tag", query, nil, nil) + ensureReaderClosed(resp) + return err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/info.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/info.go new file mode 100644 index 000000000000..c856704e23f4 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/info.go @@ -0,0 +1,26 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "fmt" + "net/url" + + "github.com/docker/docker/api/types" +) + +// Info returns information about the docker server. +func (cli *Client) Info(ctx context.Context) (types.Info, error) { + var info types.Info + serverResp, err := cli.get(ctx, "/info", url.Values{}, nil) + defer ensureReaderClosed(serverResp) + if err != nil { + return info, err + } + + if err := json.NewDecoder(serverResp.body).Decode(&info); err != nil { + return info, fmt.Errorf("Error reading remote info: %v", err) + } + + return info, nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/interface.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/interface.go new file mode 100644 index 000000000000..aabad4a91105 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/interface.go @@ -0,0 +1,201 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "io" + "net" + "net/http" + "time" + + "github.com/docker/docker/api/types" + containertypes "github.com/docker/docker/api/types/container" + "github.com/docker/docker/api/types/events" + "github.com/docker/docker/api/types/filters" + "github.com/docker/docker/api/types/image" + networktypes "github.com/docker/docker/api/types/network" + "github.com/docker/docker/api/types/registry" + "github.com/docker/docker/api/types/swarm" + volumetypes "github.com/docker/docker/api/types/volume" + specs "github.com/opencontainers/image-spec/specs-go/v1" +) + +// CommonAPIClient is the common methods between stable and experimental versions of APIClient. +type CommonAPIClient interface { + ConfigAPIClient + ContainerAPIClient + DistributionAPIClient + ImageAPIClient + NodeAPIClient + NetworkAPIClient + PluginAPIClient + ServiceAPIClient + SwarmAPIClient + SecretAPIClient + SystemAPIClient + VolumeAPIClient + ClientVersion() string + DaemonHost() string + HTTPClient() *http.Client + ServerVersion(ctx context.Context) (types.Version, error) + NegotiateAPIVersion(ctx context.Context) + NegotiateAPIVersionPing(types.Ping) + DialHijack(ctx context.Context, url, proto string, meta map[string][]string) (net.Conn, error) + Dialer() func(context.Context) (net.Conn, error) + Close() error +} + +// ContainerAPIClient defines API client methods for the containers +type ContainerAPIClient interface { + ContainerAttach(ctx context.Context, container string, options types.ContainerAttachOptions) (types.HijackedResponse, error) + ContainerCommit(ctx context.Context, container string, options types.ContainerCommitOptions) (types.IDResponse, error) + ContainerCreate(ctx context.Context, config *containertypes.Config, hostConfig *containertypes.HostConfig, networkingConfig *networktypes.NetworkingConfig, platform *specs.Platform, containerName string) (containertypes.ContainerCreateCreatedBody, error) + ContainerDiff(ctx context.Context, container string) ([]containertypes.ContainerChangeResponseItem, error) + ContainerExecAttach(ctx context.Context, execID string, config types.ExecStartCheck) (types.HijackedResponse, error) + ContainerExecCreate(ctx context.Context, container string, config types.ExecConfig) (types.IDResponse, error) + ContainerExecInspect(ctx context.Context, execID string) (types.ContainerExecInspect, error) + ContainerExecResize(ctx context.Context, execID string, options types.ResizeOptions) error + ContainerExecStart(ctx context.Context, execID string, config types.ExecStartCheck) error + ContainerExport(ctx context.Context, container string) (io.ReadCloser, error) + ContainerInspect(ctx context.Context, container string) (types.ContainerJSON, error) + ContainerInspectWithRaw(ctx context.Context, container string, getSize bool) (types.ContainerJSON, []byte, error) + ContainerKill(ctx context.Context, container, signal string) error + ContainerList(ctx context.Context, options types.ContainerListOptions) ([]types.Container, error) + ContainerLogs(ctx context.Context, container string, options types.ContainerLogsOptions) (io.ReadCloser, error) + ContainerPause(ctx context.Context, container string) error + ContainerRemove(ctx context.Context, container string, options types.ContainerRemoveOptions) error + ContainerRename(ctx context.Context, container, newContainerName string) error + ContainerResize(ctx context.Context, container string, options types.ResizeOptions) error + ContainerRestart(ctx context.Context, container string, timeout *time.Duration) error + ContainerStatPath(ctx context.Context, container, path string) (types.ContainerPathStat, error) + ContainerStats(ctx context.Context, container string, stream bool) (types.ContainerStats, error) + ContainerStatsOneShot(ctx context.Context, container string) (types.ContainerStats, error) + ContainerStart(ctx context.Context, container string, options types.ContainerStartOptions) error + ContainerStop(ctx context.Context, container string, timeout *time.Duration) error + ContainerTop(ctx context.Context, container string, arguments []string) (containertypes.ContainerTopOKBody, error) + ContainerUnpause(ctx context.Context, container string) error + ContainerUpdate(ctx context.Context, container string, updateConfig containertypes.UpdateConfig) (containertypes.ContainerUpdateOKBody, error) + ContainerWait(ctx context.Context, container string, condition containertypes.WaitCondition) (<-chan containertypes.ContainerWaitOKBody, <-chan error) + CopyFromContainer(ctx context.Context, container, srcPath string) (io.ReadCloser, types.ContainerPathStat, error) + CopyToContainer(ctx context.Context, container, path string, content io.Reader, options types.CopyToContainerOptions) error + ContainersPrune(ctx context.Context, pruneFilters filters.Args) (types.ContainersPruneReport, error) +} + +// DistributionAPIClient defines API client methods for the registry +type DistributionAPIClient interface { + DistributionInspect(ctx context.Context, image, encodedRegistryAuth string) (registry.DistributionInspect, error) +} + +// ImageAPIClient defines API client methods for the images +type ImageAPIClient interface { + ImageBuild(ctx context.Context, context io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error) + BuildCachePrune(ctx context.Context, opts types.BuildCachePruneOptions) (*types.BuildCachePruneReport, error) + BuildCancel(ctx context.Context, id string) error + ImageCreate(ctx context.Context, parentReference string, options types.ImageCreateOptions) (io.ReadCloser, error) + ImageHistory(ctx context.Context, image string) ([]image.HistoryResponseItem, error) + ImageImport(ctx context.Context, source types.ImageImportSource, ref string, options types.ImageImportOptions) (io.ReadCloser, error) + ImageInspectWithRaw(ctx context.Context, image string) (types.ImageInspect, []byte, error) + ImageList(ctx context.Context, options types.ImageListOptions) ([]types.ImageSummary, error) + ImageLoad(ctx context.Context, input io.Reader, quiet bool) (types.ImageLoadResponse, error) + ImagePull(ctx context.Context, ref string, options types.ImagePullOptions) (io.ReadCloser, error) + ImagePush(ctx context.Context, ref string, options types.ImagePushOptions) (io.ReadCloser, error) + ImageRemove(ctx context.Context, image string, options types.ImageRemoveOptions) ([]types.ImageDeleteResponseItem, error) + ImageSearch(ctx context.Context, term string, options types.ImageSearchOptions) ([]registry.SearchResult, error) + ImageSave(ctx context.Context, images []string) (io.ReadCloser, error) + ImageTag(ctx context.Context, image, ref string) error + ImagesPrune(ctx context.Context, pruneFilter filters.Args) (types.ImagesPruneReport, error) +} + +// NetworkAPIClient defines API client methods for the networks +type NetworkAPIClient interface { + NetworkConnect(ctx context.Context, network, container string, config *networktypes.EndpointSettings) error + NetworkCreate(ctx context.Context, name string, options types.NetworkCreate) (types.NetworkCreateResponse, error) + NetworkDisconnect(ctx context.Context, network, container string, force bool) error + NetworkInspect(ctx context.Context, network string, options types.NetworkInspectOptions) (types.NetworkResource, error) + NetworkInspectWithRaw(ctx context.Context, network string, options types.NetworkInspectOptions) (types.NetworkResource, []byte, error) + NetworkList(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error) + NetworkRemove(ctx context.Context, network string) error + NetworksPrune(ctx context.Context, pruneFilter filters.Args) (types.NetworksPruneReport, error) +} + +// NodeAPIClient defines API client methods for the nodes +type NodeAPIClient interface { + NodeInspectWithRaw(ctx context.Context, nodeID string) (swarm.Node, []byte, error) + NodeList(ctx context.Context, options types.NodeListOptions) ([]swarm.Node, error) + NodeRemove(ctx context.Context, nodeID string, options types.NodeRemoveOptions) error + NodeUpdate(ctx context.Context, nodeID string, version swarm.Version, node swarm.NodeSpec) error +} + +// PluginAPIClient defines API client methods for the plugins +type PluginAPIClient interface { + PluginList(ctx context.Context, filter filters.Args) (types.PluginsListResponse, error) + PluginRemove(ctx context.Context, name string, options types.PluginRemoveOptions) error + PluginEnable(ctx context.Context, name string, options types.PluginEnableOptions) error + PluginDisable(ctx context.Context, name string, options types.PluginDisableOptions) error + PluginInstall(ctx context.Context, name string, options types.PluginInstallOptions) (io.ReadCloser, error) + PluginUpgrade(ctx context.Context, name string, options types.PluginInstallOptions) (io.ReadCloser, error) + PluginPush(ctx context.Context, name string, registryAuth string) (io.ReadCloser, error) + PluginSet(ctx context.Context, name string, args []string) error + PluginInspectWithRaw(ctx context.Context, name string) (*types.Plugin, []byte, error) + PluginCreate(ctx context.Context, createContext io.Reader, options types.PluginCreateOptions) error +} + +// ServiceAPIClient defines API client methods for the services +type ServiceAPIClient interface { + ServiceCreate(ctx context.Context, service swarm.ServiceSpec, options types.ServiceCreateOptions) (types.ServiceCreateResponse, error) + ServiceInspectWithRaw(ctx context.Context, serviceID string, options types.ServiceInspectOptions) (swarm.Service, []byte, error) + ServiceList(ctx context.Context, options types.ServiceListOptions) ([]swarm.Service, error) + ServiceRemove(ctx context.Context, serviceID string) error + ServiceUpdate(ctx context.Context, serviceID string, version swarm.Version, service swarm.ServiceSpec, options types.ServiceUpdateOptions) (types.ServiceUpdateResponse, error) + ServiceLogs(ctx context.Context, serviceID string, options types.ContainerLogsOptions) (io.ReadCloser, error) + TaskLogs(ctx context.Context, taskID string, options types.ContainerLogsOptions) (io.ReadCloser, error) + TaskInspectWithRaw(ctx context.Context, taskID string) (swarm.Task, []byte, error) + TaskList(ctx context.Context, options types.TaskListOptions) ([]swarm.Task, error) +} + +// SwarmAPIClient defines API client methods for the swarm +type SwarmAPIClient interface { + SwarmInit(ctx context.Context, req swarm.InitRequest) (string, error) + SwarmJoin(ctx context.Context, req swarm.JoinRequest) error + SwarmGetUnlockKey(ctx context.Context) (types.SwarmUnlockKeyResponse, error) + SwarmUnlock(ctx context.Context, req swarm.UnlockRequest) error + SwarmLeave(ctx context.Context, force bool) error + SwarmInspect(ctx context.Context) (swarm.Swarm, error) + SwarmUpdate(ctx context.Context, version swarm.Version, swarm swarm.Spec, flags swarm.UpdateFlags) error +} + +// SystemAPIClient defines API client methods for the system +type SystemAPIClient interface { + Events(ctx context.Context, options types.EventsOptions) (<-chan events.Message, <-chan error) + Info(ctx context.Context) (types.Info, error) + RegistryLogin(ctx context.Context, auth types.AuthConfig) (registry.AuthenticateOKBody, error) + DiskUsage(ctx context.Context) (types.DiskUsage, error) + Ping(ctx context.Context) (types.Ping, error) +} + +// VolumeAPIClient defines API client methods for the volumes +type VolumeAPIClient interface { + VolumeCreate(ctx context.Context, options volumetypes.VolumeCreateBody) (types.Volume, error) + VolumeInspect(ctx context.Context, volumeID string) (types.Volume, error) + VolumeInspectWithRaw(ctx context.Context, volumeID string) (types.Volume, []byte, error) + VolumeList(ctx context.Context, filter filters.Args) (volumetypes.VolumeListOKBody, error) + VolumeRemove(ctx context.Context, volumeID string, force bool) error + VolumesPrune(ctx context.Context, pruneFilter filters.Args) (types.VolumesPruneReport, error) +} + +// SecretAPIClient defines API client methods for secrets +type SecretAPIClient interface { + SecretList(ctx context.Context, options types.SecretListOptions) ([]swarm.Secret, error) + SecretCreate(ctx context.Context, secret swarm.SecretSpec) (types.SecretCreateResponse, error) + SecretRemove(ctx context.Context, id string) error + SecretInspectWithRaw(ctx context.Context, name string) (swarm.Secret, []byte, error) + SecretUpdate(ctx context.Context, id string, version swarm.Version, secret swarm.SecretSpec) error +} + +// ConfigAPIClient defines API client methods for configs +type ConfigAPIClient interface { + ConfigList(ctx context.Context, options types.ConfigListOptions) ([]swarm.Config, error) + ConfigCreate(ctx context.Context, config swarm.ConfigSpec) (types.ConfigCreateResponse, error) + ConfigRemove(ctx context.Context, id string) error + ConfigInspectWithRaw(ctx context.Context, name string) (swarm.Config, []byte, error) + ConfigUpdate(ctx context.Context, id string, version swarm.Version, config swarm.ConfigSpec) error +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/interface_experimental.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/interface_experimental.go new file mode 100644 index 000000000000..402ffb512cd0 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/interface_experimental.go @@ -0,0 +1,18 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + + "github.com/docker/docker/api/types" +) + +type apiClientExperimental interface { + CheckpointAPIClient +} + +// CheckpointAPIClient defines API client methods for the checkpoints +type CheckpointAPIClient interface { + CheckpointCreate(ctx context.Context, container string, options types.CheckpointCreateOptions) error + CheckpointDelete(ctx context.Context, container string, options types.CheckpointDeleteOptions) error + CheckpointList(ctx context.Context, container string, options types.CheckpointListOptions) ([]types.Checkpoint, error) +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/interface_stable.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/interface_stable.go new file mode 100644 index 000000000000..5502cd742661 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/interface_stable.go @@ -0,0 +1,10 @@ +package client // import "github.com/docker/docker/client" + +// APIClient is an interface that clients that talk with a docker server must implement. +type APIClient interface { + CommonAPIClient + apiClientExperimental +} + +// Ensure that Client always implements APIClient. +var _ APIClient = &Client{} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/login.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/login.go new file mode 100644 index 000000000000..f05852063823 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/login.go @@ -0,0 +1,25 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "net/url" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/registry" +) + +// RegistryLogin authenticates the docker server with a given docker registry. +// It returns unauthorizedError when the authentication fails. +func (cli *Client) RegistryLogin(ctx context.Context, auth types.AuthConfig) (registry.AuthenticateOKBody, error) { + resp, err := cli.post(ctx, "/auth", url.Values{}, auth, nil) + defer ensureReaderClosed(resp) + + if err != nil { + return registry.AuthenticateOKBody{}, err + } + + var response registry.AuthenticateOKBody + err = json.NewDecoder(resp.body).Decode(&response) + return response, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/network_connect.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/network_connect.go new file mode 100644 index 000000000000..571894613419 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/network_connect.go @@ -0,0 +1,19 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/network" +) + +// NetworkConnect connects a container to an existent network in the docker host. +func (cli *Client) NetworkConnect(ctx context.Context, networkID, containerID string, config *network.EndpointSettings) error { + nc := types.NetworkConnect{ + Container: containerID, + EndpointConfig: config, + } + resp, err := cli.post(ctx, "/networks/"+networkID+"/connect", nil, nc, nil) + ensureReaderClosed(resp) + return err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/network_create.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/network_create.go new file mode 100644 index 000000000000..278d9383a86b --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/network_create.go @@ -0,0 +1,25 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + + "github.com/docker/docker/api/types" +) + +// NetworkCreate creates a new network in the docker host. +func (cli *Client) NetworkCreate(ctx context.Context, name string, options types.NetworkCreate) (types.NetworkCreateResponse, error) { + networkCreateRequest := types.NetworkCreateRequest{ + NetworkCreate: options, + Name: name, + } + var response types.NetworkCreateResponse + serverResp, err := cli.post(ctx, "/networks/create", nil, networkCreateRequest, nil) + defer ensureReaderClosed(serverResp) + if err != nil { + return response, err + } + + err = json.NewDecoder(serverResp.body).Decode(&response) + return response, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/network_disconnect.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/network_disconnect.go new file mode 100644 index 000000000000..dd1567665665 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/network_disconnect.go @@ -0,0 +1,15 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + + "github.com/docker/docker/api/types" +) + +// NetworkDisconnect disconnects a container from an existent network in the docker host. +func (cli *Client) NetworkDisconnect(ctx context.Context, networkID, containerID string, force bool) error { + nd := types.NetworkDisconnect{Container: containerID, Force: force} + resp, err := cli.post(ctx, "/networks/"+networkID+"/disconnect", nil, nd, nil) + ensureReaderClosed(resp) + return err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/network_inspect.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/network_inspect.go new file mode 100644 index 000000000000..89a05b3021a4 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/network_inspect.go @@ -0,0 +1,49 @@ +package client // import "github.com/docker/docker/client" + +import ( + "bytes" + "context" + "encoding/json" + "io/ioutil" + "net/url" + + "github.com/docker/docker/api/types" +) + +// NetworkInspect returns the information for a specific network configured in the docker host. +func (cli *Client) NetworkInspect(ctx context.Context, networkID string, options types.NetworkInspectOptions) (types.NetworkResource, error) { + networkResource, _, err := cli.NetworkInspectWithRaw(ctx, networkID, options) + return networkResource, err +} + +// NetworkInspectWithRaw returns the information for a specific network configured in the docker host and its raw representation. +func (cli *Client) NetworkInspectWithRaw(ctx context.Context, networkID string, options types.NetworkInspectOptions) (types.NetworkResource, []byte, error) { + if networkID == "" { + return types.NetworkResource{}, nil, objectNotFoundError{object: "network", id: networkID} + } + var ( + networkResource types.NetworkResource + resp serverResponse + err error + ) + query := url.Values{} + if options.Verbose { + query.Set("verbose", "true") + } + if options.Scope != "" { + query.Set("scope", options.Scope) + } + resp, err = cli.get(ctx, "/networks/"+networkID, query, nil) + defer ensureReaderClosed(resp) + if err != nil { + return networkResource, nil, wrapResponseError(err, resp, "network", networkID) + } + + body, err := ioutil.ReadAll(resp.body) + if err != nil { + return networkResource, nil, err + } + rdr := bytes.NewReader(body) + err = json.NewDecoder(rdr).Decode(&networkResource) + return networkResource, body, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/network_list.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/network_list.go new file mode 100644 index 000000000000..ed2acb55711d --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/network_list.go @@ -0,0 +1,32 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "net/url" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/filters" +) + +// NetworkList returns the list of networks configured in the docker host. +func (cli *Client) NetworkList(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error) { + query := url.Values{} + if options.Filters.Len() > 0 { + //nolint:staticcheck // ignore SA1019 for old code + filterJSON, err := filters.ToParamWithVersion(cli.version, options.Filters) + if err != nil { + return nil, err + } + + query.Set("filters", filterJSON) + } + var networkResources []types.NetworkResource + resp, err := cli.get(ctx, "/networks", query, nil) + defer ensureReaderClosed(resp) + if err != nil { + return networkResources, err + } + err = json.NewDecoder(resp.body).Decode(&networkResources) + return networkResources, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/network_prune.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/network_prune.go new file mode 100644 index 000000000000..cebb18821925 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/network_prune.go @@ -0,0 +1,36 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "fmt" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/filters" +) + +// NetworksPrune requests the daemon to delete unused networks +func (cli *Client) NetworksPrune(ctx context.Context, pruneFilters filters.Args) (types.NetworksPruneReport, error) { + var report types.NetworksPruneReport + + if err := cli.NewVersionError("1.25", "network prune"); err != nil { + return report, err + } + + query, err := getFiltersQuery(pruneFilters) + if err != nil { + return report, err + } + + serverResp, err := cli.post(ctx, "/networks/prune", query, nil, nil) + defer ensureReaderClosed(serverResp) + if err != nil { + return report, err + } + + if err := json.NewDecoder(serverResp.body).Decode(&report); err != nil { + return report, fmt.Errorf("Error retrieving network prune report: %v", err) + } + + return report, nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/network_remove.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/network_remove.go new file mode 100644 index 000000000000..e71b16d86929 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/network_remove.go @@ -0,0 +1,10 @@ +package client // import "github.com/docker/docker/client" + +import "context" + +// NetworkRemove removes an existent network from the docker host. +func (cli *Client) NetworkRemove(ctx context.Context, networkID string) error { + resp, err := cli.delete(ctx, "/networks/"+networkID, nil, nil) + defer ensureReaderClosed(resp) + return wrapResponseError(err, resp, "network", networkID) +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/node_inspect.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/node_inspect.go new file mode 100644 index 000000000000..d296c9fdde38 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/node_inspect.go @@ -0,0 +1,32 @@ +package client // import "github.com/docker/docker/client" + +import ( + "bytes" + "context" + "encoding/json" + "io/ioutil" + + "github.com/docker/docker/api/types/swarm" +) + +// NodeInspectWithRaw returns the node information. +func (cli *Client) NodeInspectWithRaw(ctx context.Context, nodeID string) (swarm.Node, []byte, error) { + if nodeID == "" { + return swarm.Node{}, nil, objectNotFoundError{object: "node", id: nodeID} + } + serverResp, err := cli.get(ctx, "/nodes/"+nodeID, nil, nil) + defer ensureReaderClosed(serverResp) + if err != nil { + return swarm.Node{}, nil, wrapResponseError(err, serverResp, "node", nodeID) + } + + body, err := ioutil.ReadAll(serverResp.body) + if err != nil { + return swarm.Node{}, nil, err + } + + var response swarm.Node + rdr := bytes.NewReader(body) + err = json.NewDecoder(rdr).Decode(&response) + return response, body, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/node_list.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/node_list.go new file mode 100644 index 000000000000..c212906bc718 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/node_list.go @@ -0,0 +1,36 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "net/url" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/filters" + "github.com/docker/docker/api/types/swarm" +) + +// NodeList returns the list of nodes. +func (cli *Client) NodeList(ctx context.Context, options types.NodeListOptions) ([]swarm.Node, error) { + query := url.Values{} + + if options.Filters.Len() > 0 { + filterJSON, err := filters.ToJSON(options.Filters) + + if err != nil { + return nil, err + } + + query.Set("filters", filterJSON) + } + + resp, err := cli.get(ctx, "/nodes", query, nil) + defer ensureReaderClosed(resp) + if err != nil { + return nil, err + } + + var nodes []swarm.Node + err = json.NewDecoder(resp.body).Decode(&nodes) + return nodes, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/node_remove.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/node_remove.go new file mode 100644 index 000000000000..03ab87809741 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/node_remove.go @@ -0,0 +1,20 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "net/url" + + "github.com/docker/docker/api/types" +) + +// NodeRemove removes a Node. +func (cli *Client) NodeRemove(ctx context.Context, nodeID string, options types.NodeRemoveOptions) error { + query := url.Values{} + if options.Force { + query.Set("force", "1") + } + + resp, err := cli.delete(ctx, "/nodes/"+nodeID, query, nil) + defer ensureReaderClosed(resp) + return wrapResponseError(err, resp, "node", nodeID) +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/node_update.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/node_update.go new file mode 100644 index 000000000000..de32a617fb01 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/node_update.go @@ -0,0 +1,18 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "net/url" + "strconv" + + "github.com/docker/docker/api/types/swarm" +) + +// NodeUpdate updates a Node. +func (cli *Client) NodeUpdate(ctx context.Context, nodeID string, version swarm.Version, node swarm.NodeSpec) error { + query := url.Values{} + query.Set("version", strconv.FormatUint(version.Index, 10)) + resp, err := cli.post(ctx, "/nodes/"+nodeID+"/update", query, node, nil) + ensureReaderClosed(resp) + return err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/options.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/options.go new file mode 100644 index 000000000000..6f77f0955f69 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/options.go @@ -0,0 +1,172 @@ +package client + +import ( + "context" + "net" + "net/http" + "os" + "path/filepath" + "time" + + "github.com/docker/go-connections/sockets" + "github.com/docker/go-connections/tlsconfig" + "github.com/pkg/errors" +) + +// Opt is a configuration option to initialize a client +type Opt func(*Client) error + +// FromEnv configures the client with values from environment variables. +// +// Supported environment variables: +// DOCKER_HOST to set the url to the docker server. +// DOCKER_API_VERSION to set the version of the API to reach, leave empty for latest. +// DOCKER_CERT_PATH to load the TLS certificates from. +// DOCKER_TLS_VERIFY to enable or disable TLS verification, off by default. +func FromEnv(c *Client) error { + if dockerCertPath := os.Getenv("DOCKER_CERT_PATH"); dockerCertPath != "" { + options := tlsconfig.Options{ + CAFile: filepath.Join(dockerCertPath, "ca.pem"), + CertFile: filepath.Join(dockerCertPath, "cert.pem"), + KeyFile: filepath.Join(dockerCertPath, "key.pem"), + InsecureSkipVerify: os.Getenv("DOCKER_TLS_VERIFY") == "", + } + tlsc, err := tlsconfig.Client(options) + if err != nil { + return err + } + + c.client = &http.Client{ + Transport: &http.Transport{TLSClientConfig: tlsc}, + CheckRedirect: CheckRedirect, + } + } + + if host := os.Getenv("DOCKER_HOST"); host != "" { + if err := WithHost(host)(c); err != nil { + return err + } + } + + if version := os.Getenv("DOCKER_API_VERSION"); version != "" { + if err := WithVersion(version)(c); err != nil { + return err + } + } + return nil +} + +// WithDialer applies the dialer.DialContext to the client transport. This can be +// used to set the Timeout and KeepAlive settings of the client. +// Deprecated: use WithDialContext +func WithDialer(dialer *net.Dialer) Opt { + return WithDialContext(dialer.DialContext) +} + +// WithDialContext applies the dialer to the client transport. This can be +// used to set the Timeout and KeepAlive settings of the client. +func WithDialContext(dialContext func(ctx context.Context, network, addr string) (net.Conn, error)) Opt { + return func(c *Client) error { + if transport, ok := c.client.Transport.(*http.Transport); ok { + transport.DialContext = dialContext + return nil + } + return errors.Errorf("cannot apply dialer to transport: %T", c.client.Transport) + } +} + +// WithHost overrides the client host with the specified one. +func WithHost(host string) Opt { + return func(c *Client) error { + hostURL, err := ParseHostURL(host) + if err != nil { + return err + } + c.host = host + c.proto = hostURL.Scheme + c.addr = hostURL.Host + c.basePath = hostURL.Path + if transport, ok := c.client.Transport.(*http.Transport); ok { + return sockets.ConfigureTransport(transport, c.proto, c.addr) + } + return errors.Errorf("cannot apply host to transport: %T", c.client.Transport) + } +} + +// WithHTTPClient overrides the client http client with the specified one +func WithHTTPClient(client *http.Client) Opt { + return func(c *Client) error { + if client != nil { + c.client = client + } + return nil + } +} + +// WithTimeout configures the time limit for requests made by the HTTP client +func WithTimeout(timeout time.Duration) Opt { + return func(c *Client) error { + c.client.Timeout = timeout + return nil + } +} + +// WithHTTPHeaders overrides the client default http headers +func WithHTTPHeaders(headers map[string]string) Opt { + return func(c *Client) error { + c.customHTTPHeaders = headers + return nil + } +} + +// WithScheme overrides the client scheme with the specified one +func WithScheme(scheme string) Opt { + return func(c *Client) error { + c.scheme = scheme + return nil + } +} + +// WithTLSClientConfig applies a tls config to the client transport. +func WithTLSClientConfig(cacertPath, certPath, keyPath string) Opt { + return func(c *Client) error { + opts := tlsconfig.Options{ + CAFile: cacertPath, + CertFile: certPath, + KeyFile: keyPath, + ExclusiveRootPools: true, + } + config, err := tlsconfig.Client(opts) + if err != nil { + return errors.Wrap(err, "failed to create tls config") + } + if transport, ok := c.client.Transport.(*http.Transport); ok { + transport.TLSClientConfig = config + return nil + } + return errors.Errorf("cannot apply tls config to transport: %T", c.client.Transport) + } +} + +// WithVersion overrides the client version with the specified one. If an empty +// version is specified, the value will be ignored to allow version negotiation. +func WithVersion(version string) Opt { + return func(c *Client) error { + if version != "" { + c.version = version + c.manualOverride = true + } + return nil + } +} + +// WithAPIVersionNegotiation enables automatic API version negotiation for the client. +// With this option enabled, the client automatically negotiates the API version +// to use when making requests. API version negotiation is performed on the first +// request; subsequent requests will not re-negotiate. +func WithAPIVersionNegotiation() Opt { + return func(c *Client) error { + c.negotiateVersion = true + return nil + } +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/ping.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/ping.go new file mode 100644 index 000000000000..a9af001ef46b --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/ping.go @@ -0,0 +1,66 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "net/http" + "path" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/errdefs" +) + +// Ping pings the server and returns the value of the "Docker-Experimental", +// "Builder-Version", "OS-Type" & "API-Version" headers. It attempts to use +// a HEAD request on the endpoint, but falls back to GET if HEAD is not supported +// by the daemon. +func (cli *Client) Ping(ctx context.Context) (types.Ping, error) { + var ping types.Ping + + // Using cli.buildRequest() + cli.doRequest() instead of cli.sendRequest() + // because ping requests are used during API version negotiation, so we want + // to hit the non-versioned /_ping endpoint, not /v1.xx/_ping + req, err := cli.buildRequest(http.MethodHead, path.Join(cli.basePath, "/_ping"), nil, nil) + if err != nil { + return ping, err + } + serverResp, err := cli.doRequest(ctx, req) + if err == nil { + defer ensureReaderClosed(serverResp) + switch serverResp.statusCode { + case http.StatusOK, http.StatusInternalServerError: + // Server handled the request, so parse the response + return parsePingResponse(cli, serverResp) + } + } else if IsErrConnectionFailed(err) { + return ping, err + } + + req, err = cli.buildRequest(http.MethodGet, path.Join(cli.basePath, "/_ping"), nil, nil) + if err != nil { + return ping, err + } + serverResp, err = cli.doRequest(ctx, req) + defer ensureReaderClosed(serverResp) + if err != nil { + return ping, err + } + return parsePingResponse(cli, serverResp) +} + +func parsePingResponse(cli *Client, resp serverResponse) (types.Ping, error) { + var ping types.Ping + if resp.header == nil { + err := cli.checkResponseErr(resp) + return ping, errdefs.FromStatusCode(err, resp.statusCode) + } + ping.APIVersion = resp.header.Get("API-Version") + ping.OSType = resp.header.Get("OSType") + if resp.header.Get("Docker-Experimental") == "true" { + ping.Experimental = true + } + if bv := resp.header.Get("Builder-Version"); bv != "" { + ping.BuilderVersion = types.BuilderVersion(bv) + } + err := cli.checkResponseErr(resp) + return ping, errdefs.FromStatusCode(err, resp.statusCode) +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_create.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_create.go new file mode 100644 index 000000000000..b95dbaf68633 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_create.go @@ -0,0 +1,23 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "io" + "net/http" + "net/url" + + "github.com/docker/docker/api/types" +) + +// PluginCreate creates a plugin +func (cli *Client) PluginCreate(ctx context.Context, createContext io.Reader, createOptions types.PluginCreateOptions) error { + headers := http.Header(make(map[string][]string)) + headers.Set("Content-Type", "application/x-tar") + + query := url.Values{} + query.Set("name", createOptions.RepoName) + + resp, err := cli.postRaw(ctx, "/plugins/create", query, createContext, headers) + ensureReaderClosed(resp) + return err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_disable.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_disable.go new file mode 100644 index 000000000000..01f6574f9529 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_disable.go @@ -0,0 +1,19 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "net/url" + + "github.com/docker/docker/api/types" +) + +// PluginDisable disables a plugin +func (cli *Client) PluginDisable(ctx context.Context, name string, options types.PluginDisableOptions) error { + query := url.Values{} + if options.Force { + query.Set("force", "1") + } + resp, err := cli.post(ctx, "/plugins/"+name+"/disable", query, nil, nil) + ensureReaderClosed(resp) + return err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_enable.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_enable.go new file mode 100644 index 000000000000..736da48bd101 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_enable.go @@ -0,0 +1,19 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "net/url" + "strconv" + + "github.com/docker/docker/api/types" +) + +// PluginEnable enables a plugin +func (cli *Client) PluginEnable(ctx context.Context, name string, options types.PluginEnableOptions) error { + query := url.Values{} + query.Set("timeout", strconv.Itoa(options.Timeout)) + + resp, err := cli.post(ctx, "/plugins/"+name+"/enable", query, nil, nil) + ensureReaderClosed(resp) + return err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_inspect.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_inspect.go new file mode 100644 index 000000000000..81b89732b03a --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_inspect.go @@ -0,0 +1,31 @@ +package client // import "github.com/docker/docker/client" + +import ( + "bytes" + "context" + "encoding/json" + "io/ioutil" + + "github.com/docker/docker/api/types" +) + +// PluginInspectWithRaw inspects an existing plugin +func (cli *Client) PluginInspectWithRaw(ctx context.Context, name string) (*types.Plugin, []byte, error) { + if name == "" { + return nil, nil, objectNotFoundError{object: "plugin", id: name} + } + resp, err := cli.get(ctx, "/plugins/"+name+"/json", nil, nil) + defer ensureReaderClosed(resp) + if err != nil { + return nil, nil, wrapResponseError(err, resp, "plugin", name) + } + + body, err := ioutil.ReadAll(resp.body) + if err != nil { + return nil, nil, err + } + var p types.Plugin + rdr := bytes.NewReader(body) + err = json.NewDecoder(rdr).Decode(&p) + return &p, body, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_install.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_install.go new file mode 100644 index 000000000000..012afe61cacf --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_install.go @@ -0,0 +1,113 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "io" + "net/url" + + "github.com/docker/distribution/reference" + "github.com/docker/docker/api/types" + "github.com/docker/docker/errdefs" + "github.com/pkg/errors" +) + +// PluginInstall installs a plugin +func (cli *Client) PluginInstall(ctx context.Context, name string, options types.PluginInstallOptions) (rc io.ReadCloser, err error) { + query := url.Values{} + if _, err := reference.ParseNormalizedNamed(options.RemoteRef); err != nil { + return nil, errors.Wrap(err, "invalid remote reference") + } + query.Set("remote", options.RemoteRef) + + privileges, err := cli.checkPluginPermissions(ctx, query, options) + if err != nil { + return nil, err + } + + // set name for plugin pull, if empty should default to remote reference + query.Set("name", name) + + resp, err := cli.tryPluginPull(ctx, query, privileges, options.RegistryAuth) + if err != nil { + return nil, err + } + + name = resp.header.Get("Docker-Plugin-Name") + + pr, pw := io.Pipe() + go func() { // todo: the client should probably be designed more around the actual api + _, err := io.Copy(pw, resp.body) + if err != nil { + pw.CloseWithError(err) + return + } + defer func() { + if err != nil { + delResp, _ := cli.delete(ctx, "/plugins/"+name, nil, nil) + ensureReaderClosed(delResp) + } + }() + if len(options.Args) > 0 { + if err := cli.PluginSet(ctx, name, options.Args); err != nil { + pw.CloseWithError(err) + return + } + } + + if options.Disabled { + pw.Close() + return + } + + enableErr := cli.PluginEnable(ctx, name, types.PluginEnableOptions{Timeout: 0}) + pw.CloseWithError(enableErr) + }() + return pr, nil +} + +func (cli *Client) tryPluginPrivileges(ctx context.Context, query url.Values, registryAuth string) (serverResponse, error) { + headers := map[string][]string{"X-Registry-Auth": {registryAuth}} + return cli.get(ctx, "/plugins/privileges", query, headers) +} + +func (cli *Client) tryPluginPull(ctx context.Context, query url.Values, privileges types.PluginPrivileges, registryAuth string) (serverResponse, error) { + headers := map[string][]string{"X-Registry-Auth": {registryAuth}} + return cli.post(ctx, "/plugins/pull", query, privileges, headers) +} + +func (cli *Client) checkPluginPermissions(ctx context.Context, query url.Values, options types.PluginInstallOptions) (types.PluginPrivileges, error) { + resp, err := cli.tryPluginPrivileges(ctx, query, options.RegistryAuth) + if errdefs.IsUnauthorized(err) && options.PrivilegeFunc != nil { + // todo: do inspect before to check existing name before checking privileges + newAuthHeader, privilegeErr := options.PrivilegeFunc() + if privilegeErr != nil { + ensureReaderClosed(resp) + return nil, privilegeErr + } + options.RegistryAuth = newAuthHeader + resp, err = cli.tryPluginPrivileges(ctx, query, options.RegistryAuth) + } + if err != nil { + ensureReaderClosed(resp) + return nil, err + } + + var privileges types.PluginPrivileges + if err := json.NewDecoder(resp.body).Decode(&privileges); err != nil { + ensureReaderClosed(resp) + return nil, err + } + ensureReaderClosed(resp) + + if !options.AcceptAllPermissions && options.AcceptPermissionsFunc != nil && len(privileges) > 0 { + accept, err := options.AcceptPermissionsFunc(privileges) + if err != nil { + return nil, err + } + if !accept { + return nil, pluginPermissionDenied{options.RemoteRef} + } + } + return privileges, nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_list.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_list.go new file mode 100644 index 000000000000..cf1935e2f5ee --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_list.go @@ -0,0 +1,33 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "net/url" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/filters" +) + +// PluginList returns the installed plugins +func (cli *Client) PluginList(ctx context.Context, filter filters.Args) (types.PluginsListResponse, error) { + var plugins types.PluginsListResponse + query := url.Values{} + + if filter.Len() > 0 { + //nolint:staticcheck // ignore SA1019 for old code + filterJSON, err := filters.ToParamWithVersion(cli.version, filter) + if err != nil { + return plugins, err + } + query.Set("filters", filterJSON) + } + resp, err := cli.get(ctx, "/plugins", query, nil) + defer ensureReaderClosed(resp) + if err != nil { + return plugins, wrapResponseError(err, resp, "plugin", "") + } + + err = json.NewDecoder(resp.body).Decode(&plugins) + return plugins, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_push.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_push.go new file mode 100644 index 000000000000..d20bfe844790 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_push.go @@ -0,0 +1,16 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "io" +) + +// PluginPush pushes a plugin to a registry +func (cli *Client) PluginPush(ctx context.Context, name string, registryAuth string) (io.ReadCloser, error) { + headers := map[string][]string{"X-Registry-Auth": {registryAuth}} + resp, err := cli.post(ctx, "/plugins/"+name+"/push", nil, nil, headers) + if err != nil { + return nil, err + } + return resp.body, nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_remove.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_remove.go new file mode 100644 index 000000000000..51ca1040d6d2 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_remove.go @@ -0,0 +1,20 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "net/url" + + "github.com/docker/docker/api/types" +) + +// PluginRemove removes a plugin +func (cli *Client) PluginRemove(ctx context.Context, name string, options types.PluginRemoveOptions) error { + query := url.Values{} + if options.Force { + query.Set("force", "1") + } + + resp, err := cli.delete(ctx, "/plugins/"+name, query, nil) + defer ensureReaderClosed(resp) + return wrapResponseError(err, resp, "plugin", name) +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_set.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_set.go new file mode 100644 index 000000000000..dcf5752ca2b1 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_set.go @@ -0,0 +1,12 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" +) + +// PluginSet modifies settings for an existing plugin +func (cli *Client) PluginSet(ctx context.Context, name string, args []string) error { + resp, err := cli.post(ctx, "/plugins/"+name+"/set", nil, args, nil) + ensureReaderClosed(resp) + return err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_upgrade.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_upgrade.go new file mode 100644 index 000000000000..115cea945ba8 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/plugin_upgrade.go @@ -0,0 +1,39 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "io" + "net/url" + + "github.com/docker/distribution/reference" + "github.com/docker/docker/api/types" + "github.com/pkg/errors" +) + +// PluginUpgrade upgrades a plugin +func (cli *Client) PluginUpgrade(ctx context.Context, name string, options types.PluginInstallOptions) (rc io.ReadCloser, err error) { + if err := cli.NewVersionError("1.26", "plugin upgrade"); err != nil { + return nil, err + } + query := url.Values{} + if _, err := reference.ParseNormalizedNamed(options.RemoteRef); err != nil { + return nil, errors.Wrap(err, "invalid remote reference") + } + query.Set("remote", options.RemoteRef) + + privileges, err := cli.checkPluginPermissions(ctx, query, options) + if err != nil { + return nil, err + } + + resp, err := cli.tryPluginUpgrade(ctx, query, privileges, name, options.RegistryAuth) + if err != nil { + return nil, err + } + return resp.body, nil +} + +func (cli *Client) tryPluginUpgrade(ctx context.Context, query url.Values, privileges types.PluginPrivileges, name, registryAuth string) (serverResponse, error) { + headers := map[string][]string{"X-Registry-Auth": {registryAuth}} + return cli.post(ctx, "/plugins/"+name+"/upgrade", query, privileges, headers) +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/request.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/request.go new file mode 100644 index 000000000000..813eac2c9e0c --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/request.go @@ -0,0 +1,269 @@ +package client // import "github.com/docker/docker/client" + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "io/ioutil" + "net" + "net/http" + "net/url" + "os" + "strings" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/versions" + "github.com/docker/docker/errdefs" + "github.com/pkg/errors" +) + +// serverResponse is a wrapper for http API responses. +type serverResponse struct { + body io.ReadCloser + header http.Header + statusCode int + reqURL *url.URL +} + +// head sends an http request to the docker API using the method HEAD. +func (cli *Client) head(ctx context.Context, path string, query url.Values, headers map[string][]string) (serverResponse, error) { + return cli.sendRequest(ctx, http.MethodHead, path, query, nil, headers) +} + +// get sends an http request to the docker API using the method GET with a specific Go context. +func (cli *Client) get(ctx context.Context, path string, query url.Values, headers map[string][]string) (serverResponse, error) { + return cli.sendRequest(ctx, http.MethodGet, path, query, nil, headers) +} + +// post sends an http request to the docker API using the method POST with a specific Go context. +func (cli *Client) post(ctx context.Context, path string, query url.Values, obj interface{}, headers map[string][]string) (serverResponse, error) { + body, headers, err := encodeBody(obj, headers) + if err != nil { + return serverResponse{}, err + } + return cli.sendRequest(ctx, http.MethodPost, path, query, body, headers) +} + +func (cli *Client) postRaw(ctx context.Context, path string, query url.Values, body io.Reader, headers map[string][]string) (serverResponse, error) { + return cli.sendRequest(ctx, http.MethodPost, path, query, body, headers) +} + +// putRaw sends an http request to the docker API using the method PUT. +func (cli *Client) putRaw(ctx context.Context, path string, query url.Values, body io.Reader, headers map[string][]string) (serverResponse, error) { + return cli.sendRequest(ctx, http.MethodPut, path, query, body, headers) +} + +// delete sends an http request to the docker API using the method DELETE. +func (cli *Client) delete(ctx context.Context, path string, query url.Values, headers map[string][]string) (serverResponse, error) { + return cli.sendRequest(ctx, http.MethodDelete, path, query, nil, headers) +} + +type headers map[string][]string + +func encodeBody(obj interface{}, headers headers) (io.Reader, headers, error) { + if obj == nil { + return nil, headers, nil + } + + body, err := encodeData(obj) + if err != nil { + return nil, headers, err + } + if headers == nil { + headers = make(map[string][]string) + } + headers["Content-Type"] = []string{"application/json"} + return body, headers, nil +} + +func (cli *Client) buildRequest(method, path string, body io.Reader, headers headers) (*http.Request, error) { + expectedPayload := (method == http.MethodPost || method == http.MethodPut) + if expectedPayload && body == nil { + body = bytes.NewReader([]byte{}) + } + + req, err := http.NewRequest(method, path, body) + if err != nil { + return nil, err + } + req = cli.addHeaders(req, headers) + + if cli.proto == "unix" || cli.proto == "npipe" { + // For local communications, it doesn't matter what the host is. We just + // need a valid and meaningful host name. (See #189) + req.Host = "docker" + } + + req.URL.Host = cli.addr + req.URL.Scheme = cli.scheme + + if expectedPayload && req.Header.Get("Content-Type") == "" { + req.Header.Set("Content-Type", "text/plain") + } + return req, nil +} + +func (cli *Client) sendRequest(ctx context.Context, method, path string, query url.Values, body io.Reader, headers headers) (serverResponse, error) { + req, err := cli.buildRequest(method, cli.getAPIPath(ctx, path, query), body, headers) + if err != nil { + return serverResponse{}, err + } + resp, err := cli.doRequest(ctx, req) + if err != nil { + return resp, errdefs.FromStatusCode(err, resp.statusCode) + } + err = cli.checkResponseErr(resp) + return resp, errdefs.FromStatusCode(err, resp.statusCode) +} + +func (cli *Client) doRequest(ctx context.Context, req *http.Request) (serverResponse, error) { + serverResp := serverResponse{statusCode: -1, reqURL: req.URL} + + req = req.WithContext(ctx) + resp, err := cli.client.Do(req) + if err != nil { + if cli.scheme != "https" && strings.Contains(err.Error(), "malformed HTTP response") { + return serverResp, fmt.Errorf("%v.\n* Are you trying to connect to a TLS-enabled daemon without TLS?", err) + } + + if cli.scheme == "https" && strings.Contains(err.Error(), "bad certificate") { + return serverResp, errors.Wrap(err, "The server probably has client authentication (--tlsverify) enabled. Please check your TLS client certification settings") + } + + // Don't decorate context sentinel errors; users may be comparing to + // them directly. + if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) { + return serverResp, err + } + + if nErr, ok := err.(*url.Error); ok { + if nErr, ok := nErr.Err.(*net.OpError); ok { + if os.IsPermission(nErr.Err) { + return serverResp, errors.Wrapf(err, "Got permission denied while trying to connect to the Docker daemon socket at %v", cli.host) + } + } + } + + if err, ok := err.(net.Error); ok { + if err.Timeout() { + return serverResp, ErrorConnectionFailed(cli.host) + } + if !err.Temporary() { + if strings.Contains(err.Error(), "connection refused") || strings.Contains(err.Error(), "dial unix") { + return serverResp, ErrorConnectionFailed(cli.host) + } + } + } + + // Although there's not a strongly typed error for this in go-winio, + // lots of people are using the default configuration for the docker + // daemon on Windows where the daemon is listening on a named pipe + // `//./pipe/docker_engine, and the client must be running elevated. + // Give users a clue rather than the not-overly useful message + // such as `error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.26/info: + // open //./pipe/docker_engine: The system cannot find the file specified.`. + // Note we can't string compare "The system cannot find the file specified" as + // this is localised - for example in French the error would be + // `open //./pipe/docker_engine: Le fichier spécifié est introuvable.` + if strings.Contains(err.Error(), `open //./pipe/docker_engine`) { + // Checks if client is running with elevated privileges + if f, elevatedErr := os.Open("\\\\.\\PHYSICALDRIVE0"); elevatedErr == nil { + err = errors.Wrap(err, "In the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect.") + } else { + f.Close() + err = errors.Wrap(err, "This error may indicate that the docker daemon is not running.") + } + } + + return serverResp, errors.Wrap(err, "error during connect") + } + + if resp != nil { + serverResp.statusCode = resp.StatusCode + serverResp.body = resp.Body + serverResp.header = resp.Header + } + return serverResp, nil +} + +func (cli *Client) checkResponseErr(serverResp serverResponse) error { + if serverResp.statusCode >= 200 && serverResp.statusCode < 400 { + return nil + } + + var body []byte + var err error + if serverResp.body != nil { + bodyMax := 1 * 1024 * 1024 // 1 MiB + bodyR := &io.LimitedReader{ + R: serverResp.body, + N: int64(bodyMax), + } + body, err = ioutil.ReadAll(bodyR) + if err != nil { + return err + } + if bodyR.N == 0 { + return fmt.Errorf("request returned %s with a message (> %d bytes) for API route and version %s, check if the server supports the requested API version", http.StatusText(serverResp.statusCode), bodyMax, serverResp.reqURL) + } + } + if len(body) == 0 { + return fmt.Errorf("request returned %s for API route and version %s, check if the server supports the requested API version", http.StatusText(serverResp.statusCode), serverResp.reqURL) + } + + var ct string + if serverResp.header != nil { + ct = serverResp.header.Get("Content-Type") + } + + var errorMessage string + if (cli.version == "" || versions.GreaterThan(cli.version, "1.23")) && ct == "application/json" { + var errorResponse types.ErrorResponse + if err := json.Unmarshal(body, &errorResponse); err != nil { + return errors.Wrap(err, "Error reading JSON") + } + errorMessage = strings.TrimSpace(errorResponse.Message) + } else { + errorMessage = strings.TrimSpace(string(body)) + } + + return errors.Wrap(errors.New(errorMessage), "Error response from daemon") +} + +func (cli *Client) addHeaders(req *http.Request, headers headers) *http.Request { + // Add CLI Config's HTTP Headers BEFORE we set the Docker headers + // then the user can't change OUR headers + for k, v := range cli.customHTTPHeaders { + if versions.LessThan(cli.version, "1.25") && k == "User-Agent" { + continue + } + req.Header.Set(k, v) + } + + if headers != nil { + for k, v := range headers { + req.Header[k] = v + } + } + return req +} + +func encodeData(data interface{}) (*bytes.Buffer, error) { + params := bytes.NewBuffer(nil) + if data != nil { + if err := json.NewEncoder(params).Encode(data); err != nil { + return nil, err + } + } + return params, nil +} + +func ensureReaderClosed(response serverResponse) { + if response.body != nil { + // Drain up to 512 bytes and close the body to let the Transport reuse the connection + io.CopyN(ioutil.Discard, response.body, 512) + response.body.Close() + } +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/secret_create.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/secret_create.go new file mode 100644 index 000000000000..fd5b914136c3 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/secret_create.go @@ -0,0 +1,25 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/swarm" +) + +// SecretCreate creates a new Secret. +func (cli *Client) SecretCreate(ctx context.Context, secret swarm.SecretSpec) (types.SecretCreateResponse, error) { + var response types.SecretCreateResponse + if err := cli.NewVersionError("1.25", "secret create"); err != nil { + return response, err + } + resp, err := cli.post(ctx, "/secrets/create", nil, secret, nil) + defer ensureReaderClosed(resp) + if err != nil { + return response, err + } + + err = json.NewDecoder(resp.body).Decode(&response) + return response, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/secret_inspect.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/secret_inspect.go new file mode 100644 index 000000000000..d093916c9a46 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/secret_inspect.go @@ -0,0 +1,36 @@ +package client // import "github.com/docker/docker/client" + +import ( + "bytes" + "context" + "encoding/json" + "io/ioutil" + + "github.com/docker/docker/api/types/swarm" +) + +// SecretInspectWithRaw returns the secret information with raw data +func (cli *Client) SecretInspectWithRaw(ctx context.Context, id string) (swarm.Secret, []byte, error) { + if err := cli.NewVersionError("1.25", "secret inspect"); err != nil { + return swarm.Secret{}, nil, err + } + if id == "" { + return swarm.Secret{}, nil, objectNotFoundError{object: "secret", id: id} + } + resp, err := cli.get(ctx, "/secrets/"+id, nil, nil) + defer ensureReaderClosed(resp) + if err != nil { + return swarm.Secret{}, nil, wrapResponseError(err, resp, "secret", id) + } + + body, err := ioutil.ReadAll(resp.body) + if err != nil { + return swarm.Secret{}, nil, err + } + + var secret swarm.Secret + rdr := bytes.NewReader(body) + err = json.NewDecoder(rdr).Decode(&secret) + + return secret, body, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/secret_list.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/secret_list.go new file mode 100644 index 000000000000..a0289c9f440f --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/secret_list.go @@ -0,0 +1,38 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "net/url" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/filters" + "github.com/docker/docker/api/types/swarm" +) + +// SecretList returns the list of secrets. +func (cli *Client) SecretList(ctx context.Context, options types.SecretListOptions) ([]swarm.Secret, error) { + if err := cli.NewVersionError("1.25", "secret list"); err != nil { + return nil, err + } + query := url.Values{} + + if options.Filters.Len() > 0 { + filterJSON, err := filters.ToJSON(options.Filters) + if err != nil { + return nil, err + } + + query.Set("filters", filterJSON) + } + + resp, err := cli.get(ctx, "/secrets", query, nil) + defer ensureReaderClosed(resp) + if err != nil { + return nil, err + } + + var secrets []swarm.Secret + err = json.NewDecoder(resp.body).Decode(&secrets) + return secrets, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/secret_remove.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/secret_remove.go new file mode 100644 index 000000000000..c16f55580416 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/secret_remove.go @@ -0,0 +1,13 @@ +package client // import "github.com/docker/docker/client" + +import "context" + +// SecretRemove removes a Secret. +func (cli *Client) SecretRemove(ctx context.Context, id string) error { + if err := cli.NewVersionError("1.25", "secret remove"); err != nil { + return err + } + resp, err := cli.delete(ctx, "/secrets/"+id, nil, nil) + defer ensureReaderClosed(resp) + return wrapResponseError(err, resp, "secret", id) +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/secret_update.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/secret_update.go new file mode 100644 index 000000000000..164256bbc15b --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/secret_update.go @@ -0,0 +1,21 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "net/url" + "strconv" + + "github.com/docker/docker/api/types/swarm" +) + +// SecretUpdate attempts to update a Secret +func (cli *Client) SecretUpdate(ctx context.Context, id string, version swarm.Version, secret swarm.SecretSpec) error { + if err := cli.NewVersionError("1.25", "secret update"); err != nil { + return err + } + query := url.Values{} + query.Set("version", strconv.FormatUint(version.Index, 10)) + resp, err := cli.post(ctx, "/secrets/"+id+"/update", query, secret, nil) + ensureReaderClosed(resp) + return err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/service_create.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/service_create.go new file mode 100644 index 000000000000..e0428bf98b3c --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/service_create.go @@ -0,0 +1,178 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "fmt" + "strings" + + "github.com/docker/distribution/reference" + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/swarm" + digest "github.com/opencontainers/go-digest" + "github.com/pkg/errors" +) + +// ServiceCreate creates a new Service. +func (cli *Client) ServiceCreate(ctx context.Context, service swarm.ServiceSpec, options types.ServiceCreateOptions) (types.ServiceCreateResponse, error) { + var response types.ServiceCreateResponse + headers := map[string][]string{ + "version": {cli.version}, + } + + if options.EncodedRegistryAuth != "" { + headers["X-Registry-Auth"] = []string{options.EncodedRegistryAuth} + } + + // Make sure containerSpec is not nil when no runtime is set or the runtime is set to container + if service.TaskTemplate.ContainerSpec == nil && (service.TaskTemplate.Runtime == "" || service.TaskTemplate.Runtime == swarm.RuntimeContainer) { + service.TaskTemplate.ContainerSpec = &swarm.ContainerSpec{} + } + + if err := validateServiceSpec(service); err != nil { + return response, err + } + + // ensure that the image is tagged + var resolveWarning string + switch { + case service.TaskTemplate.ContainerSpec != nil: + if taggedImg := imageWithTagString(service.TaskTemplate.ContainerSpec.Image); taggedImg != "" { + service.TaskTemplate.ContainerSpec.Image = taggedImg + } + if options.QueryRegistry { + resolveWarning = resolveContainerSpecImage(ctx, cli, &service.TaskTemplate, options.EncodedRegistryAuth) + } + case service.TaskTemplate.PluginSpec != nil: + if taggedImg := imageWithTagString(service.TaskTemplate.PluginSpec.Remote); taggedImg != "" { + service.TaskTemplate.PluginSpec.Remote = taggedImg + } + if options.QueryRegistry { + resolveWarning = resolvePluginSpecRemote(ctx, cli, &service.TaskTemplate, options.EncodedRegistryAuth) + } + } + + resp, err := cli.post(ctx, "/services/create", nil, service, headers) + defer ensureReaderClosed(resp) + if err != nil { + return response, err + } + + err = json.NewDecoder(resp.body).Decode(&response) + if resolveWarning != "" { + response.Warnings = append(response.Warnings, resolveWarning) + } + + return response, err +} + +func resolveContainerSpecImage(ctx context.Context, cli DistributionAPIClient, taskSpec *swarm.TaskSpec, encodedAuth string) string { + var warning string + if img, imgPlatforms, err := imageDigestAndPlatforms(ctx, cli, taskSpec.ContainerSpec.Image, encodedAuth); err != nil { + warning = digestWarning(taskSpec.ContainerSpec.Image) + } else { + taskSpec.ContainerSpec.Image = img + if len(imgPlatforms) > 0 { + if taskSpec.Placement == nil { + taskSpec.Placement = &swarm.Placement{} + } + taskSpec.Placement.Platforms = imgPlatforms + } + } + return warning +} + +func resolvePluginSpecRemote(ctx context.Context, cli DistributionAPIClient, taskSpec *swarm.TaskSpec, encodedAuth string) string { + var warning string + if img, imgPlatforms, err := imageDigestAndPlatforms(ctx, cli, taskSpec.PluginSpec.Remote, encodedAuth); err != nil { + warning = digestWarning(taskSpec.PluginSpec.Remote) + } else { + taskSpec.PluginSpec.Remote = img + if len(imgPlatforms) > 0 { + if taskSpec.Placement == nil { + taskSpec.Placement = &swarm.Placement{} + } + taskSpec.Placement.Platforms = imgPlatforms + } + } + return warning +} + +func imageDigestAndPlatforms(ctx context.Context, cli DistributionAPIClient, image, encodedAuth string) (string, []swarm.Platform, error) { + distributionInspect, err := cli.DistributionInspect(ctx, image, encodedAuth) + var platforms []swarm.Platform + if err != nil { + return "", nil, err + } + + imageWithDigest := imageWithDigestString(image, distributionInspect.Descriptor.Digest) + + if len(distributionInspect.Platforms) > 0 { + platforms = make([]swarm.Platform, 0, len(distributionInspect.Platforms)) + for _, p := range distributionInspect.Platforms { + // clear architecture field for arm. This is a temporary patch to address + // https://github.com/docker/swarmkit/issues/2294. The issue is that while + // image manifests report "arm" as the architecture, the node reports + // something like "armv7l" (includes the variant), which causes arm images + // to stop working with swarm mode. This patch removes the architecture + // constraint for arm images to ensure tasks get scheduled. + arch := p.Architecture + if strings.ToLower(arch) == "arm" { + arch = "" + } + platforms = append(platforms, swarm.Platform{ + Architecture: arch, + OS: p.OS, + }) + } + } + return imageWithDigest, platforms, err +} + +// imageWithDigestString takes an image string and a digest, and updates +// the image string if it didn't originally contain a digest. It returns +// image unmodified in other situations. +func imageWithDigestString(image string, dgst digest.Digest) string { + namedRef, err := reference.ParseNormalizedNamed(image) + if err == nil { + if _, isCanonical := namedRef.(reference.Canonical); !isCanonical { + // ensure that image gets a default tag if none is provided + img, err := reference.WithDigest(namedRef, dgst) + if err == nil { + return reference.FamiliarString(img) + } + } + } + return image +} + +// imageWithTagString takes an image string, and returns a tagged image +// string, adding a 'latest' tag if one was not provided. It returns an +// empty string if a canonical reference was provided +func imageWithTagString(image string) string { + namedRef, err := reference.ParseNormalizedNamed(image) + if err == nil { + return reference.FamiliarString(reference.TagNameOnly(namedRef)) + } + return "" +} + +// digestWarning constructs a formatted warning string using the +// image name that could not be pinned by digest. The formatting +// is hardcoded, but could me made smarter in the future +func digestWarning(image string) string { + return fmt.Sprintf("image %s could not be accessed on a registry to record\nits digest. Each node will access %s independently,\npossibly leading to different nodes running different\nversions of the image.\n", image, image) +} + +func validateServiceSpec(s swarm.ServiceSpec) error { + if s.TaskTemplate.ContainerSpec != nil && s.TaskTemplate.PluginSpec != nil { + return errors.New("must not specify both a container spec and a plugin spec in the task template") + } + if s.TaskTemplate.PluginSpec != nil && s.TaskTemplate.Runtime != swarm.RuntimePlugin { + return errors.New("mismatched runtime with plugin spec") + } + if s.TaskTemplate.ContainerSpec != nil && (s.TaskTemplate.Runtime != "" && s.TaskTemplate.Runtime != swarm.RuntimeContainer) { + return errors.New("mismatched runtime with container spec") + } + return nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/service_inspect.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/service_inspect.go new file mode 100644 index 000000000000..2801483b80f5 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/service_inspect.go @@ -0,0 +1,37 @@ +package client // import "github.com/docker/docker/client" + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io/ioutil" + "net/url" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/swarm" +) + +// ServiceInspectWithRaw returns the service information and the raw data. +func (cli *Client) ServiceInspectWithRaw(ctx context.Context, serviceID string, opts types.ServiceInspectOptions) (swarm.Service, []byte, error) { + if serviceID == "" { + return swarm.Service{}, nil, objectNotFoundError{object: "service", id: serviceID} + } + query := url.Values{} + query.Set("insertDefaults", fmt.Sprintf("%v", opts.InsertDefaults)) + serverResp, err := cli.get(ctx, "/services/"+serviceID, query, nil) + defer ensureReaderClosed(serverResp) + if err != nil { + return swarm.Service{}, nil, wrapResponseError(err, serverResp, "service", serviceID) + } + + body, err := ioutil.ReadAll(serverResp.body) + if err != nil { + return swarm.Service{}, nil, err + } + + var response swarm.Service + rdr := bytes.NewReader(body) + err = json.NewDecoder(rdr).Decode(&response) + return response, body, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/service_list.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/service_list.go new file mode 100644 index 000000000000..f97ec75a5cb7 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/service_list.go @@ -0,0 +1,39 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "net/url" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/filters" + "github.com/docker/docker/api/types/swarm" +) + +// ServiceList returns the list of services. +func (cli *Client) ServiceList(ctx context.Context, options types.ServiceListOptions) ([]swarm.Service, error) { + query := url.Values{} + + if options.Filters.Len() > 0 { + filterJSON, err := filters.ToJSON(options.Filters) + if err != nil { + return nil, err + } + + query.Set("filters", filterJSON) + } + + if options.Status { + query.Set("status", "true") + } + + resp, err := cli.get(ctx, "/services", query, nil) + defer ensureReaderClosed(resp) + if err != nil { + return nil, err + } + + var services []swarm.Service + err = json.NewDecoder(resp.body).Decode(&services) + return services, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/service_logs.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/service_logs.go new file mode 100644 index 000000000000..906fd4059e6a --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/service_logs.go @@ -0,0 +1,52 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "io" + "net/url" + "time" + + "github.com/docker/docker/api/types" + timetypes "github.com/docker/docker/api/types/time" + "github.com/pkg/errors" +) + +// ServiceLogs returns the logs generated by a service in an io.ReadCloser. +// It's up to the caller to close the stream. +func (cli *Client) ServiceLogs(ctx context.Context, serviceID string, options types.ContainerLogsOptions) (io.ReadCloser, error) { + query := url.Values{} + if options.ShowStdout { + query.Set("stdout", "1") + } + + if options.ShowStderr { + query.Set("stderr", "1") + } + + if options.Since != "" { + ts, err := timetypes.GetTimestamp(options.Since, time.Now()) + if err != nil { + return nil, errors.Wrap(err, `invalid value for "since"`) + } + query.Set("since", ts) + } + + if options.Timestamps { + query.Set("timestamps", "1") + } + + if options.Details { + query.Set("details", "1") + } + + if options.Follow { + query.Set("follow", "1") + } + query.Set("tail", options.Tail) + + resp, err := cli.get(ctx, "/services/"+serviceID+"/logs", query, nil) + if err != nil { + return nil, err + } + return resp.body, nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/service_remove.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/service_remove.go new file mode 100644 index 000000000000..953a2adf5aec --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/service_remove.go @@ -0,0 +1,10 @@ +package client // import "github.com/docker/docker/client" + +import "context" + +// ServiceRemove kills and removes a service. +func (cli *Client) ServiceRemove(ctx context.Context, serviceID string) error { + resp, err := cli.delete(ctx, "/services/"+serviceID, nil, nil) + defer ensureReaderClosed(resp) + return wrapResponseError(err, resp, "service", serviceID) +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/service_update.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/service_update.go new file mode 100644 index 000000000000..c63895f74f25 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/service_update.go @@ -0,0 +1,75 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "net/url" + "strconv" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/swarm" +) + +// ServiceUpdate updates a Service. The version number is required to avoid conflicting writes. +// It should be the value as set *before* the update. You can find this value in the Meta field +// of swarm.Service, which can be found using ServiceInspectWithRaw. +func (cli *Client) ServiceUpdate(ctx context.Context, serviceID string, version swarm.Version, service swarm.ServiceSpec, options types.ServiceUpdateOptions) (types.ServiceUpdateResponse, error) { + var ( + query = url.Values{} + response = types.ServiceUpdateResponse{} + ) + + headers := map[string][]string{ + "version": {cli.version}, + } + + if options.EncodedRegistryAuth != "" { + headers["X-Registry-Auth"] = []string{options.EncodedRegistryAuth} + } + + if options.RegistryAuthFrom != "" { + query.Set("registryAuthFrom", options.RegistryAuthFrom) + } + + if options.Rollback != "" { + query.Set("rollback", options.Rollback) + } + + query.Set("version", strconv.FormatUint(version.Index, 10)) + + if err := validateServiceSpec(service); err != nil { + return response, err + } + + // ensure that the image is tagged + var resolveWarning string + switch { + case service.TaskTemplate.ContainerSpec != nil: + if taggedImg := imageWithTagString(service.TaskTemplate.ContainerSpec.Image); taggedImg != "" { + service.TaskTemplate.ContainerSpec.Image = taggedImg + } + if options.QueryRegistry { + resolveWarning = resolveContainerSpecImage(ctx, cli, &service.TaskTemplate, options.EncodedRegistryAuth) + } + case service.TaskTemplate.PluginSpec != nil: + if taggedImg := imageWithTagString(service.TaskTemplate.PluginSpec.Remote); taggedImg != "" { + service.TaskTemplate.PluginSpec.Remote = taggedImg + } + if options.QueryRegistry { + resolveWarning = resolvePluginSpecRemote(ctx, cli, &service.TaskTemplate, options.EncodedRegistryAuth) + } + } + + resp, err := cli.post(ctx, "/services/"+serviceID+"/update", query, service, headers) + defer ensureReaderClosed(resp) + if err != nil { + return response, err + } + + err = json.NewDecoder(resp.body).Decode(&response) + if resolveWarning != "" { + response.Warnings = append(response.Warnings, resolveWarning) + } + + return response, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/swarm_get_unlock_key.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/swarm_get_unlock_key.go new file mode 100644 index 000000000000..19f59dd582a9 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/swarm_get_unlock_key.go @@ -0,0 +1,21 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + + "github.com/docker/docker/api/types" +) + +// SwarmGetUnlockKey retrieves the swarm's unlock key. +func (cli *Client) SwarmGetUnlockKey(ctx context.Context) (types.SwarmUnlockKeyResponse, error) { + serverResp, err := cli.get(ctx, "/swarm/unlockkey", nil, nil) + defer ensureReaderClosed(serverResp) + if err != nil { + return types.SwarmUnlockKeyResponse{}, err + } + + var response types.SwarmUnlockKeyResponse + err = json.NewDecoder(serverResp.body).Decode(&response) + return response, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/swarm_init.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/swarm_init.go new file mode 100644 index 000000000000..da3c1637ef04 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/swarm_init.go @@ -0,0 +1,21 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + + "github.com/docker/docker/api/types/swarm" +) + +// SwarmInit initializes the swarm. +func (cli *Client) SwarmInit(ctx context.Context, req swarm.InitRequest) (string, error) { + serverResp, err := cli.post(ctx, "/swarm/init", nil, req, nil) + defer ensureReaderClosed(serverResp) + if err != nil { + return "", err + } + + var response string + err = json.NewDecoder(serverResp.body).Decode(&response) + return response, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/swarm_inspect.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/swarm_inspect.go new file mode 100644 index 000000000000..b52b67a8849b --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/swarm_inspect.go @@ -0,0 +1,21 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + + "github.com/docker/docker/api/types/swarm" +) + +// SwarmInspect inspects the swarm. +func (cli *Client) SwarmInspect(ctx context.Context) (swarm.Swarm, error) { + serverResp, err := cli.get(ctx, "/swarm", nil, nil) + defer ensureReaderClosed(serverResp) + if err != nil { + return swarm.Swarm{}, err + } + + var response swarm.Swarm + err = json.NewDecoder(serverResp.body).Decode(&response) + return response, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/swarm_join.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/swarm_join.go new file mode 100644 index 000000000000..a1cf0455d2b9 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/swarm_join.go @@ -0,0 +1,14 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + + "github.com/docker/docker/api/types/swarm" +) + +// SwarmJoin joins the swarm. +func (cli *Client) SwarmJoin(ctx context.Context, req swarm.JoinRequest) error { + resp, err := cli.post(ctx, "/swarm/join", nil, req, nil) + ensureReaderClosed(resp) + return err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/swarm_leave.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/swarm_leave.go new file mode 100644 index 000000000000..90ca84b363ba --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/swarm_leave.go @@ -0,0 +1,17 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "net/url" +) + +// SwarmLeave leaves the swarm. +func (cli *Client) SwarmLeave(ctx context.Context, force bool) error { + query := url.Values{} + if force { + query.Set("force", "1") + } + resp, err := cli.post(ctx, "/swarm/leave", query, nil, nil) + ensureReaderClosed(resp) + return err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/swarm_unlock.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/swarm_unlock.go new file mode 100644 index 000000000000..d2412f7d441d --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/swarm_unlock.go @@ -0,0 +1,14 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + + "github.com/docker/docker/api/types/swarm" +) + +// SwarmUnlock unlocks locked swarm. +func (cli *Client) SwarmUnlock(ctx context.Context, req swarm.UnlockRequest) error { + serverResp, err := cli.post(ctx, "/swarm/unlock", nil, req, nil) + ensureReaderClosed(serverResp) + return err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/swarm_update.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/swarm_update.go new file mode 100644 index 000000000000..56a5bea761e6 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/swarm_update.go @@ -0,0 +1,22 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "fmt" + "net/url" + "strconv" + + "github.com/docker/docker/api/types/swarm" +) + +// SwarmUpdate updates the swarm. +func (cli *Client) SwarmUpdate(ctx context.Context, version swarm.Version, swarm swarm.Spec, flags swarm.UpdateFlags) error { + query := url.Values{} + query.Set("version", strconv.FormatUint(version.Index, 10)) + query.Set("rotateWorkerToken", fmt.Sprintf("%v", flags.RotateWorkerToken)) + query.Set("rotateManagerToken", fmt.Sprintf("%v", flags.RotateManagerToken)) + query.Set("rotateManagerUnlockKey", fmt.Sprintf("%v", flags.RotateManagerUnlockKey)) + resp, err := cli.post(ctx, "/swarm/update", query, swarm, nil) + ensureReaderClosed(resp) + return err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/task_inspect.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/task_inspect.go new file mode 100644 index 000000000000..44d40ba5ae83 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/task_inspect.go @@ -0,0 +1,32 @@ +package client // import "github.com/docker/docker/client" + +import ( + "bytes" + "context" + "encoding/json" + "io/ioutil" + + "github.com/docker/docker/api/types/swarm" +) + +// TaskInspectWithRaw returns the task information and its raw representation.. +func (cli *Client) TaskInspectWithRaw(ctx context.Context, taskID string) (swarm.Task, []byte, error) { + if taskID == "" { + return swarm.Task{}, nil, objectNotFoundError{object: "task", id: taskID} + } + serverResp, err := cli.get(ctx, "/tasks/"+taskID, nil, nil) + defer ensureReaderClosed(serverResp) + if err != nil { + return swarm.Task{}, nil, wrapResponseError(err, serverResp, "task", taskID) + } + + body, err := ioutil.ReadAll(serverResp.body) + if err != nil { + return swarm.Task{}, nil, err + } + + var response swarm.Task + rdr := bytes.NewReader(body) + err = json.NewDecoder(rdr).Decode(&response) + return response, body, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/task_list.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/task_list.go new file mode 100644 index 000000000000..4869b44493b1 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/task_list.go @@ -0,0 +1,35 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "net/url" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/filters" + "github.com/docker/docker/api/types/swarm" +) + +// TaskList returns the list of tasks. +func (cli *Client) TaskList(ctx context.Context, options types.TaskListOptions) ([]swarm.Task, error) { + query := url.Values{} + + if options.Filters.Len() > 0 { + filterJSON, err := filters.ToJSON(options.Filters) + if err != nil { + return nil, err + } + + query.Set("filters", filterJSON) + } + + resp, err := cli.get(ctx, "/tasks", query, nil) + defer ensureReaderClosed(resp) + if err != nil { + return nil, err + } + + var tasks []swarm.Task + err = json.NewDecoder(resp.body).Decode(&tasks) + return tasks, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/task_logs.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/task_logs.go new file mode 100644 index 000000000000..6222fab577d1 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/task_logs.go @@ -0,0 +1,51 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "io" + "net/url" + "time" + + "github.com/docker/docker/api/types" + timetypes "github.com/docker/docker/api/types/time" +) + +// TaskLogs returns the logs generated by a task in an io.ReadCloser. +// It's up to the caller to close the stream. +func (cli *Client) TaskLogs(ctx context.Context, taskID string, options types.ContainerLogsOptions) (io.ReadCloser, error) { + query := url.Values{} + if options.ShowStdout { + query.Set("stdout", "1") + } + + if options.ShowStderr { + query.Set("stderr", "1") + } + + if options.Since != "" { + ts, err := timetypes.GetTimestamp(options.Since, time.Now()) + if err != nil { + return nil, err + } + query.Set("since", ts) + } + + if options.Timestamps { + query.Set("timestamps", "1") + } + + if options.Details { + query.Set("details", "1") + } + + if options.Follow { + query.Set("follow", "1") + } + query.Set("tail", options.Tail) + + resp, err := cli.get(ctx, "/tasks/"+taskID+"/logs", query, nil) + if err != nil { + return nil, err + } + return resp.body, nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/transport.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/transport.go new file mode 100644 index 000000000000..5541344366b6 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/transport.go @@ -0,0 +1,17 @@ +package client // import "github.com/docker/docker/client" + +import ( + "crypto/tls" + "net/http" +) + +// resolveTLSConfig attempts to resolve the TLS configuration from the +// RoundTripper. +func resolveTLSConfig(transport http.RoundTripper) *tls.Config { + switch tr := transport.(type) { + case *http.Transport: + return tr.TLSClientConfig + default: + return nil + } +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/utils.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/utils.go new file mode 100644 index 000000000000..7f3ff44eb80b --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/utils.go @@ -0,0 +1,34 @@ +package client // import "github.com/docker/docker/client" + +import ( + "net/url" + "regexp" + + "github.com/docker/docker/api/types/filters" +) + +var headerRegexp = regexp.MustCompile(`\ADocker/.+\s\((.+)\)\z`) + +// getDockerOS returns the operating system based on the server header from the daemon. +func getDockerOS(serverHeader string) string { + var osType string + matches := headerRegexp.FindStringSubmatch(serverHeader) + if len(matches) > 0 { + osType = matches[1] + } + return osType +} + +// getFiltersQuery returns a url query with "filters" query term, based on the +// filters provided. +func getFiltersQuery(f filters.Args) (url.Values, error) { + query := url.Values{} + if f.Len() > 0 { + filterJSON, err := filters.ToJSON(f) + if err != nil { + return query, err + } + query.Set("filters", filterJSON) + } + return query, nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/version.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/version.go new file mode 100644 index 000000000000..8f17ff4e87af --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/version.go @@ -0,0 +1,21 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + + "github.com/docker/docker/api/types" +) + +// ServerVersion returns information of the docker client and server host. +func (cli *Client) ServerVersion(ctx context.Context) (types.Version, error) { + resp, err := cli.get(ctx, "/version", nil, nil) + defer ensureReaderClosed(resp) + if err != nil { + return types.Version{}, err + } + + var server types.Version + err = json.NewDecoder(resp.body).Decode(&server) + return server, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/volume_create.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/volume_create.go new file mode 100644 index 000000000000..92761b3c639e --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/volume_create.go @@ -0,0 +1,21 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + + "github.com/docker/docker/api/types" + volumetypes "github.com/docker/docker/api/types/volume" +) + +// VolumeCreate creates a volume in the docker host. +func (cli *Client) VolumeCreate(ctx context.Context, options volumetypes.VolumeCreateBody) (types.Volume, error) { + var volume types.Volume + resp, err := cli.post(ctx, "/volumes/create", nil, options, nil) + defer ensureReaderClosed(resp) + if err != nil { + return volume, err + } + err = json.NewDecoder(resp.body).Decode(&volume) + return volume, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/volume_inspect.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/volume_inspect.go new file mode 100644 index 000000000000..e20b2c67c7a1 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/volume_inspect.go @@ -0,0 +1,38 @@ +package client // import "github.com/docker/docker/client" + +import ( + "bytes" + "context" + "encoding/json" + "io/ioutil" + + "github.com/docker/docker/api/types" +) + +// VolumeInspect returns the information about a specific volume in the docker host. +func (cli *Client) VolumeInspect(ctx context.Context, volumeID string) (types.Volume, error) { + volume, _, err := cli.VolumeInspectWithRaw(ctx, volumeID) + return volume, err +} + +// VolumeInspectWithRaw returns the information about a specific volume in the docker host and its raw representation +func (cli *Client) VolumeInspectWithRaw(ctx context.Context, volumeID string) (types.Volume, []byte, error) { + if volumeID == "" { + return types.Volume{}, nil, objectNotFoundError{object: "volume", id: volumeID} + } + + var volume types.Volume + resp, err := cli.get(ctx, "/volumes/"+volumeID, nil, nil) + defer ensureReaderClosed(resp) + if err != nil { + return volume, nil, wrapResponseError(err, resp, "volume", volumeID) + } + + body, err := ioutil.ReadAll(resp.body) + if err != nil { + return volume, nil, err + } + rdr := bytes.NewReader(body) + err = json.NewDecoder(rdr).Decode(&volume) + return volume, body, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/volume_list.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/volume_list.go new file mode 100644 index 000000000000..942498dde2c7 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/volume_list.go @@ -0,0 +1,33 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "net/url" + + "github.com/docker/docker/api/types/filters" + volumetypes "github.com/docker/docker/api/types/volume" +) + +// VolumeList returns the volumes configured in the docker host. +func (cli *Client) VolumeList(ctx context.Context, filter filters.Args) (volumetypes.VolumeListOKBody, error) { + var volumes volumetypes.VolumeListOKBody + query := url.Values{} + + if filter.Len() > 0 { + //nolint:staticcheck // ignore SA1019 for old code + filterJSON, err := filters.ToParamWithVersion(cli.version, filter) + if err != nil { + return volumes, err + } + query.Set("filters", filterJSON) + } + resp, err := cli.get(ctx, "/volumes", query, nil) + defer ensureReaderClosed(resp) + if err != nil { + return volumes, err + } + + err = json.NewDecoder(resp.body).Decode(&volumes) + return volumes, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/volume_prune.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/volume_prune.go new file mode 100644 index 000000000000..6e324708f2b1 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/volume_prune.go @@ -0,0 +1,36 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "encoding/json" + "fmt" + + "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/filters" +) + +// VolumesPrune requests the daemon to delete unused data +func (cli *Client) VolumesPrune(ctx context.Context, pruneFilters filters.Args) (types.VolumesPruneReport, error) { + var report types.VolumesPruneReport + + if err := cli.NewVersionError("1.25", "volume prune"); err != nil { + return report, err + } + + query, err := getFiltersQuery(pruneFilters) + if err != nil { + return report, err + } + + serverResp, err := cli.post(ctx, "/volumes/prune", query, nil, nil) + defer ensureReaderClosed(serverResp) + if err != nil { + return report, err + } + + if err := json.NewDecoder(serverResp.body).Decode(&report); err != nil { + return report, fmt.Errorf("Error retrieving volume prune report: %v", err) + } + + return report, nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/client/volume_remove.go b/cluster-autoscaler/vendor/github.com/docker/docker/client/volume_remove.go new file mode 100644 index 000000000000..79decdafab88 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/client/volume_remove.go @@ -0,0 +1,21 @@ +package client // import "github.com/docker/docker/client" + +import ( + "context" + "net/url" + + "github.com/docker/docker/api/types/versions" +) + +// VolumeRemove removes a volume from the docker host. +func (cli *Client) VolumeRemove(ctx context.Context, volumeID string, force bool) error { + query := url.Values{} + if versions.GreaterThanOrEqualTo(cli.version, "1.25") { + if force { + query.Set("force", "1") + } + } + resp, err := cli.delete(ctx, "/volumes/"+volumeID, query, nil) + defer ensureReaderClosed(resp) + return wrapResponseError(err, resp, "volume", volumeID) +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/errdefs/defs.go b/cluster-autoscaler/vendor/github.com/docker/docker/errdefs/defs.go new file mode 100644 index 000000000000..61e7456b4ebf --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/errdefs/defs.go @@ -0,0 +1,69 @@ +package errdefs // import "github.com/docker/docker/errdefs" + +// ErrNotFound signals that the requested object doesn't exist +type ErrNotFound interface { + NotFound() +} + +// ErrInvalidParameter signals that the user input is invalid +type ErrInvalidParameter interface { + InvalidParameter() +} + +// ErrConflict signals that some internal state conflicts with the requested action and can't be performed. +// A change in state should be able to clear this error. +type ErrConflict interface { + Conflict() +} + +// ErrUnauthorized is used to signify that the user is not authorized to perform a specific action +type ErrUnauthorized interface { + Unauthorized() +} + +// ErrUnavailable signals that the requested action/subsystem is not available. +type ErrUnavailable interface { + Unavailable() +} + +// ErrForbidden signals that the requested action cannot be performed under any circumstances. +// When a ErrForbidden is returned, the caller should never retry the action. +type ErrForbidden interface { + Forbidden() +} + +// ErrSystem signals that some internal error occurred. +// An example of this would be a failed mount request. +type ErrSystem interface { + System() +} + +// ErrNotModified signals that an action can't be performed because it's already in the desired state +type ErrNotModified interface { + NotModified() +} + +// ErrNotImplemented signals that the requested action/feature is not implemented on the system as configured. +type ErrNotImplemented interface { + NotImplemented() +} + +// ErrUnknown signals that the kind of error that occurred is not known. +type ErrUnknown interface { + Unknown() +} + +// ErrCancelled signals that the action was cancelled. +type ErrCancelled interface { + Cancelled() +} + +// ErrDeadline signals that the deadline was reached before the action completed. +type ErrDeadline interface { + DeadlineExceeded() +} + +// ErrDataLoss indicates that data was lost or there is data corruption. +type ErrDataLoss interface { + DataLoss() +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/errdefs/doc.go b/cluster-autoscaler/vendor/github.com/docker/docker/errdefs/doc.go new file mode 100644 index 000000000000..c211f174fc11 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/errdefs/doc.go @@ -0,0 +1,8 @@ +// Package errdefs defines a set of error interfaces that packages should use for communicating classes of errors. +// Errors that cross the package boundary should implement one (and only one) of these interfaces. +// +// Packages should not reference these interfaces directly, only implement them. +// To check if a particular error implements one of these interfaces, there are helper +// functions provided (e.g. `Is`) which can be used rather than asserting the interfaces directly. +// If you must assert on these interfaces, be sure to check the causal chain (`err.Cause()`). +package errdefs // import "github.com/docker/docker/errdefs" diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/errdefs/helpers.go b/cluster-autoscaler/vendor/github.com/docker/docker/errdefs/helpers.go new file mode 100644 index 000000000000..fe06fb6f703b --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/errdefs/helpers.go @@ -0,0 +1,279 @@ +package errdefs // import "github.com/docker/docker/errdefs" + +import "context" + +type errNotFound struct{ error } + +func (errNotFound) NotFound() {} + +func (e errNotFound) Cause() error { + return e.error +} + +func (e errNotFound) Unwrap() error { + return e.error +} + +// NotFound is a helper to create an error of the class with the same name from any error type +func NotFound(err error) error { + if err == nil || IsNotFound(err) { + return err + } + return errNotFound{err} +} + +type errInvalidParameter struct{ error } + +func (errInvalidParameter) InvalidParameter() {} + +func (e errInvalidParameter) Cause() error { + return e.error +} + +func (e errInvalidParameter) Unwrap() error { + return e.error +} + +// InvalidParameter is a helper to create an error of the class with the same name from any error type +func InvalidParameter(err error) error { + if err == nil || IsInvalidParameter(err) { + return err + } + return errInvalidParameter{err} +} + +type errConflict struct{ error } + +func (errConflict) Conflict() {} + +func (e errConflict) Cause() error { + return e.error +} + +func (e errConflict) Unwrap() error { + return e.error +} + +// Conflict is a helper to create an error of the class with the same name from any error type +func Conflict(err error) error { + if err == nil || IsConflict(err) { + return err + } + return errConflict{err} +} + +type errUnauthorized struct{ error } + +func (errUnauthorized) Unauthorized() {} + +func (e errUnauthorized) Cause() error { + return e.error +} + +func (e errUnauthorized) Unwrap() error { + return e.error +} + +// Unauthorized is a helper to create an error of the class with the same name from any error type +func Unauthorized(err error) error { + if err == nil || IsUnauthorized(err) { + return err + } + return errUnauthorized{err} +} + +type errUnavailable struct{ error } + +func (errUnavailable) Unavailable() {} + +func (e errUnavailable) Cause() error { + return e.error +} + +func (e errUnavailable) Unwrap() error { + return e.error +} + +// Unavailable is a helper to create an error of the class with the same name from any error type +func Unavailable(err error) error { + if err == nil || IsUnavailable(err) { + return err + } + return errUnavailable{err} +} + +type errForbidden struct{ error } + +func (errForbidden) Forbidden() {} + +func (e errForbidden) Cause() error { + return e.error +} + +func (e errForbidden) Unwrap() error { + return e.error +} + +// Forbidden is a helper to create an error of the class with the same name from any error type +func Forbidden(err error) error { + if err == nil || IsForbidden(err) { + return err + } + return errForbidden{err} +} + +type errSystem struct{ error } + +func (errSystem) System() {} + +func (e errSystem) Cause() error { + return e.error +} + +func (e errSystem) Unwrap() error { + return e.error +} + +// System is a helper to create an error of the class with the same name from any error type +func System(err error) error { + if err == nil || IsSystem(err) { + return err + } + return errSystem{err} +} + +type errNotModified struct{ error } + +func (errNotModified) NotModified() {} + +func (e errNotModified) Cause() error { + return e.error +} + +func (e errNotModified) Unwrap() error { + return e.error +} + +// NotModified is a helper to create an error of the class with the same name from any error type +func NotModified(err error) error { + if err == nil || IsNotModified(err) { + return err + } + return errNotModified{err} +} + +type errNotImplemented struct{ error } + +func (errNotImplemented) NotImplemented() {} + +func (e errNotImplemented) Cause() error { + return e.error +} + +func (e errNotImplemented) Unwrap() error { + return e.error +} + +// NotImplemented is a helper to create an error of the class with the same name from any error type +func NotImplemented(err error) error { + if err == nil || IsNotImplemented(err) { + return err + } + return errNotImplemented{err} +} + +type errUnknown struct{ error } + +func (errUnknown) Unknown() {} + +func (e errUnknown) Cause() error { + return e.error +} + +func (e errUnknown) Unwrap() error { + return e.error +} + +// Unknown is a helper to create an error of the class with the same name from any error type +func Unknown(err error) error { + if err == nil || IsUnknown(err) { + return err + } + return errUnknown{err} +} + +type errCancelled struct{ error } + +func (errCancelled) Cancelled() {} + +func (e errCancelled) Cause() error { + return e.error +} + +func (e errCancelled) Unwrap() error { + return e.error +} + +// Cancelled is a helper to create an error of the class with the same name from any error type +func Cancelled(err error) error { + if err == nil || IsCancelled(err) { + return err + } + return errCancelled{err} +} + +type errDeadline struct{ error } + +func (errDeadline) DeadlineExceeded() {} + +func (e errDeadline) Cause() error { + return e.error +} + +func (e errDeadline) Unwrap() error { + return e.error +} + +// Deadline is a helper to create an error of the class with the same name from any error type +func Deadline(err error) error { + if err == nil || IsDeadline(err) { + return err + } + return errDeadline{err} +} + +type errDataLoss struct{ error } + +func (errDataLoss) DataLoss() {} + +func (e errDataLoss) Cause() error { + return e.error +} + +func (e errDataLoss) Unwrap() error { + return e.error +} + +// DataLoss is a helper to create an error of the class with the same name from any error type +func DataLoss(err error) error { + if err == nil || IsDataLoss(err) { + return err + } + return errDataLoss{err} +} + +// FromContext returns the error class from the passed in context +func FromContext(ctx context.Context) error { + e := ctx.Err() + if e == nil { + return nil + } + + if e == context.Canceled { + return Cancelled(e) + } + if e == context.DeadlineExceeded { + return Deadline(e) + } + return Unknown(e) +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/errdefs/http_helpers.go b/cluster-autoscaler/vendor/github.com/docker/docker/errdefs/http_helpers.go new file mode 100644 index 000000000000..07552f1cc1dd --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/errdefs/http_helpers.go @@ -0,0 +1,191 @@ +package errdefs // import "github.com/docker/docker/errdefs" + +import ( + "fmt" + "net/http" + + containerderrors "github.com/containerd/containerd/errdefs" + "github.com/docker/distribution/registry/api/errcode" + "github.com/sirupsen/logrus" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +// GetHTTPErrorStatusCode retrieves status code from error message. +func GetHTTPErrorStatusCode(err error) int { + if err == nil { + logrus.WithFields(logrus.Fields{"error": err}).Error("unexpected HTTP error handling") + return http.StatusInternalServerError + } + + var statusCode int + + // Stop right there + // Are you sure you should be adding a new error class here? Do one of the existing ones work? + + // Note that the below functions are already checking the error causal chain for matches. + switch { + case IsNotFound(err): + statusCode = http.StatusNotFound + case IsInvalidParameter(err): + statusCode = http.StatusBadRequest + case IsConflict(err): + statusCode = http.StatusConflict + case IsUnauthorized(err): + statusCode = http.StatusUnauthorized + case IsUnavailable(err): + statusCode = http.StatusServiceUnavailable + case IsForbidden(err): + statusCode = http.StatusForbidden + case IsNotModified(err): + statusCode = http.StatusNotModified + case IsNotImplemented(err): + statusCode = http.StatusNotImplemented + case IsSystem(err) || IsUnknown(err) || IsDataLoss(err) || IsDeadline(err) || IsCancelled(err): + statusCode = http.StatusInternalServerError + default: + statusCode = statusCodeFromGRPCError(err) + if statusCode != http.StatusInternalServerError { + return statusCode + } + statusCode = statusCodeFromContainerdError(err) + if statusCode != http.StatusInternalServerError { + return statusCode + } + statusCode = statusCodeFromDistributionError(err) + if statusCode != http.StatusInternalServerError { + return statusCode + } + if e, ok := err.(causer); ok { + return GetHTTPErrorStatusCode(e.Cause()) + } + + logrus.WithFields(logrus.Fields{ + "module": "api", + "error_type": fmt.Sprintf("%T", err), + }).Debugf("FIXME: Got an API for which error does not match any expected type!!!: %+v", err) + } + + if statusCode == 0 { + statusCode = http.StatusInternalServerError + } + + return statusCode +} + +// FromStatusCode creates an errdef error, based on the provided HTTP status-code +func FromStatusCode(err error, statusCode int) error { + if err == nil { + return err + } + switch statusCode { + case http.StatusNotFound: + err = NotFound(err) + case http.StatusBadRequest: + err = InvalidParameter(err) + case http.StatusConflict: + err = Conflict(err) + case http.StatusUnauthorized: + err = Unauthorized(err) + case http.StatusServiceUnavailable: + err = Unavailable(err) + case http.StatusForbidden: + err = Forbidden(err) + case http.StatusNotModified: + err = NotModified(err) + case http.StatusNotImplemented: + err = NotImplemented(err) + case http.StatusInternalServerError: + if !IsSystem(err) && !IsUnknown(err) && !IsDataLoss(err) && !IsDeadline(err) && !IsCancelled(err) { + err = System(err) + } + default: + logrus.WithFields(logrus.Fields{ + "module": "api", + "status_code": fmt.Sprintf("%d", statusCode), + }).Debugf("FIXME: Got an status-code for which error does not match any expected type!!!: %d", statusCode) + + switch { + case statusCode >= 200 && statusCode < 400: + // it's a client error + case statusCode >= 400 && statusCode < 500: + err = InvalidParameter(err) + case statusCode >= 500 && statusCode < 600: + err = System(err) + default: + err = Unknown(err) + } + } + return err +} + +// statusCodeFromGRPCError returns status code according to gRPC error +func statusCodeFromGRPCError(err error) int { + switch status.Code(err) { + case codes.InvalidArgument: // code 3 + return http.StatusBadRequest + case codes.NotFound: // code 5 + return http.StatusNotFound + case codes.AlreadyExists: // code 6 + return http.StatusConflict + case codes.PermissionDenied: // code 7 + return http.StatusForbidden + case codes.FailedPrecondition: // code 9 + return http.StatusBadRequest + case codes.Unauthenticated: // code 16 + return http.StatusUnauthorized + case codes.OutOfRange: // code 11 + return http.StatusBadRequest + case codes.Unimplemented: // code 12 + return http.StatusNotImplemented + case codes.Unavailable: // code 14 + return http.StatusServiceUnavailable + default: + // codes.Canceled(1) + // codes.Unknown(2) + // codes.DeadlineExceeded(4) + // codes.ResourceExhausted(8) + // codes.Aborted(10) + // codes.Internal(13) + // codes.DataLoss(15) + return http.StatusInternalServerError + } +} + +// statusCodeFromDistributionError returns status code according to registry errcode +// code is loosely based on errcode.ServeJSON() in docker/distribution +func statusCodeFromDistributionError(err error) int { + switch errs := err.(type) { + case errcode.Errors: + if len(errs) < 1 { + return http.StatusInternalServerError + } + if _, ok := errs[0].(errcode.ErrorCoder); ok { + return statusCodeFromDistributionError(errs[0]) + } + case errcode.ErrorCoder: + return errs.ErrorCode().Descriptor().HTTPStatusCode + } + return http.StatusInternalServerError +} + +// statusCodeFromContainerdError returns status code for containerd errors when +// consumed directly (not through gRPC) +func statusCodeFromContainerdError(err error) int { + switch { + case containerderrors.IsInvalidArgument(err): + return http.StatusBadRequest + case containerderrors.IsNotFound(err): + return http.StatusNotFound + case containerderrors.IsAlreadyExists(err): + return http.StatusConflict + case containerderrors.IsFailedPrecondition(err): + return http.StatusPreconditionFailed + case containerderrors.IsUnavailable(err): + return http.StatusServiceUnavailable + case containerderrors.IsNotImplemented(err): + return http.StatusNotImplemented + default: + return http.StatusInternalServerError + } +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/errdefs/is.go b/cluster-autoscaler/vendor/github.com/docker/docker/errdefs/is.go new file mode 100644 index 000000000000..3abf07d0c357 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/errdefs/is.go @@ -0,0 +1,107 @@ +package errdefs // import "github.com/docker/docker/errdefs" + +type causer interface { + Cause() error +} + +func getImplementer(err error) error { + switch e := err.(type) { + case + ErrNotFound, + ErrInvalidParameter, + ErrConflict, + ErrUnauthorized, + ErrUnavailable, + ErrForbidden, + ErrSystem, + ErrNotModified, + ErrNotImplemented, + ErrCancelled, + ErrDeadline, + ErrDataLoss, + ErrUnknown: + return err + case causer: + return getImplementer(e.Cause()) + default: + return err + } +} + +// IsNotFound returns if the passed in error is an ErrNotFound +func IsNotFound(err error) bool { + _, ok := getImplementer(err).(ErrNotFound) + return ok +} + +// IsInvalidParameter returns if the passed in error is an ErrInvalidParameter +func IsInvalidParameter(err error) bool { + _, ok := getImplementer(err).(ErrInvalidParameter) + return ok +} + +// IsConflict returns if the passed in error is an ErrConflict +func IsConflict(err error) bool { + _, ok := getImplementer(err).(ErrConflict) + return ok +} + +// IsUnauthorized returns if the passed in error is an ErrUnauthorized +func IsUnauthorized(err error) bool { + _, ok := getImplementer(err).(ErrUnauthorized) + return ok +} + +// IsUnavailable returns if the passed in error is an ErrUnavailable +func IsUnavailable(err error) bool { + _, ok := getImplementer(err).(ErrUnavailable) + return ok +} + +// IsForbidden returns if the passed in error is an ErrForbidden +func IsForbidden(err error) bool { + _, ok := getImplementer(err).(ErrForbidden) + return ok +} + +// IsSystem returns if the passed in error is an ErrSystem +func IsSystem(err error) bool { + _, ok := getImplementer(err).(ErrSystem) + return ok +} + +// IsNotModified returns if the passed in error is a NotModified error +func IsNotModified(err error) bool { + _, ok := getImplementer(err).(ErrNotModified) + return ok +} + +// IsNotImplemented returns if the passed in error is an ErrNotImplemented +func IsNotImplemented(err error) bool { + _, ok := getImplementer(err).(ErrNotImplemented) + return ok +} + +// IsUnknown returns if the passed in error is an ErrUnknown +func IsUnknown(err error) bool { + _, ok := getImplementer(err).(ErrUnknown) + return ok +} + +// IsCancelled returns if the passed in error is an ErrCancelled +func IsCancelled(err error) bool { + _, ok := getImplementer(err).(ErrCancelled) + return ok +} + +// IsDeadline returns if the passed in error is an ErrDeadline +func IsDeadline(err error) bool { + _, ok := getImplementer(err).(ErrDeadline) + return ok +} + +// IsDataLoss returns if the passed in error is an ErrDataLoss +func IsDataLoss(err error) bool { + _, ok := getImplementer(err).(ErrDataLoss) + return ok +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/pkg/jsonmessage/jsonmessage.go b/cluster-autoscaler/vendor/github.com/docker/docker/pkg/jsonmessage/jsonmessage.go new file mode 100644 index 000000000000..cf8d04b1b201 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/pkg/jsonmessage/jsonmessage.go @@ -0,0 +1,283 @@ +package jsonmessage // import "github.com/docker/docker/pkg/jsonmessage" + +import ( + "encoding/json" + "fmt" + "io" + "strings" + "time" + + units "github.com/docker/go-units" + "github.com/moby/term" + "github.com/morikuni/aec" +) + +// RFC3339NanoFixed is time.RFC3339Nano with nanoseconds padded using zeros to +// ensure the formatted time isalways the same number of characters. +const RFC3339NanoFixed = "2006-01-02T15:04:05.000000000Z07:00" + +// JSONError wraps a concrete Code and Message, `Code` is +// is an integer error code, `Message` is the error message. +type JSONError struct { + Code int `json:"code,omitempty"` + Message string `json:"message,omitempty"` +} + +func (e *JSONError) Error() string { + return e.Message +} + +// JSONProgress describes a Progress. terminalFd is the fd of the current terminal, +// Start is the initial value for the operation. Current is the current status and +// value of the progress made towards Total. Total is the end value describing when +// we made 100% progress for an operation. +type JSONProgress struct { + terminalFd uintptr + Current int64 `json:"current,omitempty"` + Total int64 `json:"total,omitempty"` + Start int64 `json:"start,omitempty"` + // If true, don't show xB/yB + HideCounts bool `json:"hidecounts,omitempty"` + Units string `json:"units,omitempty"` + nowFunc func() time.Time + winSize int +} + +func (p *JSONProgress) String() string { + var ( + width = p.width() + pbBox string + numbersBox string + timeLeftBox string + ) + if p.Current <= 0 && p.Total <= 0 { + return "" + } + if p.Total <= 0 { + switch p.Units { + case "": + current := units.HumanSize(float64(p.Current)) + return fmt.Sprintf("%8v", current) + default: + return fmt.Sprintf("%d %s", p.Current, p.Units) + } + } + + percentage := int(float64(p.Current)/float64(p.Total)*100) / 2 + if percentage > 50 { + percentage = 50 + } + if width > 110 { + // this number can't be negative gh#7136 + numSpaces := 0 + if 50-percentage > 0 { + numSpaces = 50 - percentage + } + pbBox = fmt.Sprintf("[%s>%s] ", strings.Repeat("=", percentage), strings.Repeat(" ", numSpaces)) + } + + switch { + case p.HideCounts: + case p.Units == "": // no units, use bytes + current := units.HumanSize(float64(p.Current)) + total := units.HumanSize(float64(p.Total)) + + numbersBox = fmt.Sprintf("%8v/%v", current, total) + + if p.Current > p.Total { + // remove total display if the reported current is wonky. + numbersBox = fmt.Sprintf("%8v", current) + } + default: + numbersBox = fmt.Sprintf("%d/%d %s", p.Current, p.Total, p.Units) + + if p.Current > p.Total { + // remove total display if the reported current is wonky. + numbersBox = fmt.Sprintf("%d %s", p.Current, p.Units) + } + } + + if p.Current > 0 && p.Start > 0 && percentage < 50 { + fromStart := p.now().Sub(time.Unix(p.Start, 0)) + perEntry := fromStart / time.Duration(p.Current) + left := time.Duration(p.Total-p.Current) * perEntry + left = (left / time.Second) * time.Second + + if width > 50 { + timeLeftBox = " " + left.String() + } + } + return pbBox + numbersBox + timeLeftBox +} + +// shim for testing +func (p *JSONProgress) now() time.Time { + if p.nowFunc == nil { + p.nowFunc = func() time.Time { + return time.Now().UTC() + } + } + return p.nowFunc() +} + +// shim for testing +func (p *JSONProgress) width() int { + if p.winSize != 0 { + return p.winSize + } + ws, err := term.GetWinsize(p.terminalFd) + if err == nil { + return int(ws.Width) + } + return 200 +} + +// JSONMessage defines a message struct. It describes +// the created time, where it from, status, ID of the +// message. It's used for docker events. +type JSONMessage struct { + Stream string `json:"stream,omitempty"` + Status string `json:"status,omitempty"` + Progress *JSONProgress `json:"progressDetail,omitempty"` + ProgressMessage string `json:"progress,omitempty"` // deprecated + ID string `json:"id,omitempty"` + From string `json:"from,omitempty"` + Time int64 `json:"time,omitempty"` + TimeNano int64 `json:"timeNano,omitempty"` + Error *JSONError `json:"errorDetail,omitempty"` + ErrorMessage string `json:"error,omitempty"` // deprecated + // Aux contains out-of-band data, such as digests for push signing and image id after building. + Aux *json.RawMessage `json:"aux,omitempty"` +} + +func clearLine(out io.Writer) { + eraseMode := aec.EraseModes.All + cl := aec.EraseLine(eraseMode) + fmt.Fprint(out, cl) +} + +func cursorUp(out io.Writer, l uint) { + fmt.Fprint(out, aec.Up(l)) +} + +func cursorDown(out io.Writer, l uint) { + fmt.Fprint(out, aec.Down(l)) +} + +// Display displays the JSONMessage to `out`. If `isTerminal` is true, it will erase the +// entire current line when displaying the progressbar. +func (jm *JSONMessage) Display(out io.Writer, isTerminal bool) error { + if jm.Error != nil { + if jm.Error.Code == 401 { + return fmt.Errorf("authentication is required") + } + return jm.Error + } + var endl string + if isTerminal && jm.Stream == "" && jm.Progress != nil { + clearLine(out) + endl = "\r" + fmt.Fprint(out, endl) + } else if jm.Progress != nil && jm.Progress.String() != "" { // disable progressbar in non-terminal + return nil + } + if jm.TimeNano != 0 { + fmt.Fprintf(out, "%s ", time.Unix(0, jm.TimeNano).Format(RFC3339NanoFixed)) + } else if jm.Time != 0 { + fmt.Fprintf(out, "%s ", time.Unix(jm.Time, 0).Format(RFC3339NanoFixed)) + } + if jm.ID != "" { + fmt.Fprintf(out, "%s: ", jm.ID) + } + if jm.From != "" { + fmt.Fprintf(out, "(from %s) ", jm.From) + } + if jm.Progress != nil && isTerminal { + fmt.Fprintf(out, "%s %s%s", jm.Status, jm.Progress.String(), endl) + } else if jm.ProgressMessage != "" { // deprecated + fmt.Fprintf(out, "%s %s%s", jm.Status, jm.ProgressMessage, endl) + } else if jm.Stream != "" { + fmt.Fprintf(out, "%s%s", jm.Stream, endl) + } else { + fmt.Fprintf(out, "%s%s\n", jm.Status, endl) + } + return nil +} + +// DisplayJSONMessagesStream displays a json message stream from `in` to `out`, `isTerminal` +// describes if `out` is a terminal. If this is the case, it will print `\n` at the end of +// each line and move the cursor while displaying. +func DisplayJSONMessagesStream(in io.Reader, out io.Writer, terminalFd uintptr, isTerminal bool, auxCallback func(JSONMessage)) error { + var ( + dec = json.NewDecoder(in) + ids = make(map[string]uint) + ) + + for { + var diff uint + var jm JSONMessage + if err := dec.Decode(&jm); err != nil { + if err == io.EOF { + break + } + return err + } + + if jm.Aux != nil { + if auxCallback != nil { + auxCallback(jm) + } + continue + } + + if jm.Progress != nil { + jm.Progress.terminalFd = terminalFd + } + if jm.ID != "" && (jm.Progress != nil || jm.ProgressMessage != "") { + line, ok := ids[jm.ID] + if !ok { + // NOTE: This approach of using len(id) to + // figure out the number of lines of history + // only works as long as we clear the history + // when we output something that's not + // accounted for in the map, such as a line + // with no ID. + line = uint(len(ids)) + ids[jm.ID] = line + if isTerminal { + fmt.Fprintf(out, "\n") + } + } + diff = uint(len(ids)) - line + if isTerminal { + cursorUp(out, diff) + } + } else { + // When outputting something that isn't progress + // output, clear the history of previous lines. We + // don't want progress entries from some previous + // operation to be updated (for example, pull -a + // with multiple tags). + ids = make(map[string]uint) + } + err := jm.Display(out, isTerminal) + if jm.ID != "" && isTerminal { + cursorDown(out, diff) + } + if err != nil { + return err + } + } + return nil +} + +type stream interface { + io.Writer + FD() uintptr + IsTerminal() bool +} + +// DisplayJSONMessagesToStream prints json messages to the output stream +func DisplayJSONMessagesToStream(in io.Reader, stream stream, auxCallback func(JSONMessage)) error { + return DisplayJSONMessagesStream(in, stream, stream.FD(), stream.IsTerminal(), auxCallback) +} diff --git a/cluster-autoscaler/vendor/github.com/docker/docker/pkg/stdcopy/stdcopy.go b/cluster-autoscaler/vendor/github.com/docker/docker/pkg/stdcopy/stdcopy.go new file mode 100644 index 000000000000..8f6e0a737aa6 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/docker/pkg/stdcopy/stdcopy.go @@ -0,0 +1,190 @@ +package stdcopy // import "github.com/docker/docker/pkg/stdcopy" + +import ( + "bytes" + "encoding/binary" + "errors" + "fmt" + "io" + "sync" +) + +// StdType is the type of standard stream +// a writer can multiplex to. +type StdType byte + +const ( + // Stdin represents standard input stream type. + Stdin StdType = iota + // Stdout represents standard output stream type. + Stdout + // Stderr represents standard error steam type. + Stderr + // Systemerr represents errors originating from the system that make it + // into the multiplexed stream. + Systemerr + + stdWriterPrefixLen = 8 + stdWriterFdIndex = 0 + stdWriterSizeIndex = 4 + + startingBufLen = 32*1024 + stdWriterPrefixLen + 1 +) + +var bufPool = &sync.Pool{New: func() interface{} { return bytes.NewBuffer(nil) }} + +// stdWriter is wrapper of io.Writer with extra customized info. +type stdWriter struct { + io.Writer + prefix byte +} + +// Write sends the buffer to the underneath writer. +// It inserts the prefix header before the buffer, +// so stdcopy.StdCopy knows where to multiplex the output. +// It makes stdWriter to implement io.Writer. +func (w *stdWriter) Write(p []byte) (n int, err error) { + if w == nil || w.Writer == nil { + return 0, errors.New("Writer not instantiated") + } + if p == nil { + return 0, nil + } + + header := [stdWriterPrefixLen]byte{stdWriterFdIndex: w.prefix} + binary.BigEndian.PutUint32(header[stdWriterSizeIndex:], uint32(len(p))) + buf := bufPool.Get().(*bytes.Buffer) + buf.Write(header[:]) + buf.Write(p) + + n, err = w.Writer.Write(buf.Bytes()) + n -= stdWriterPrefixLen + if n < 0 { + n = 0 + } + + buf.Reset() + bufPool.Put(buf) + return +} + +// NewStdWriter instantiates a new Writer. +// Everything written to it will be encapsulated using a custom format, +// and written to the underlying `w` stream. +// This allows multiple write streams (e.g. stdout and stderr) to be muxed into a single connection. +// `t` indicates the id of the stream to encapsulate. +// It can be stdcopy.Stdin, stdcopy.Stdout, stdcopy.Stderr. +func NewStdWriter(w io.Writer, t StdType) io.Writer { + return &stdWriter{ + Writer: w, + prefix: byte(t), + } +} + +// StdCopy is a modified version of io.Copy. +// +// StdCopy will demultiplex `src`, assuming that it contains two streams, +// previously multiplexed together using a StdWriter instance. +// As it reads from `src`, StdCopy will write to `dstout` and `dsterr`. +// +// StdCopy will read until it hits EOF on `src`. It will then return a nil error. +// In other words: if `err` is non nil, it indicates a real underlying error. +// +// `written` will hold the total number of bytes written to `dstout` and `dsterr`. +func StdCopy(dstout, dsterr io.Writer, src io.Reader) (written int64, err error) { + var ( + buf = make([]byte, startingBufLen) + bufLen = len(buf) + nr, nw int + er, ew error + out io.Writer + frameSize int + ) + + for { + // Make sure we have at least a full header + for nr < stdWriterPrefixLen { + var nr2 int + nr2, er = src.Read(buf[nr:]) + nr += nr2 + if er == io.EOF { + if nr < stdWriterPrefixLen { + return written, nil + } + break + } + if er != nil { + return 0, er + } + } + + stream := StdType(buf[stdWriterFdIndex]) + // Check the first byte to know where to write + switch stream { + case Stdin: + fallthrough + case Stdout: + // Write on stdout + out = dstout + case Stderr: + // Write on stderr + out = dsterr + case Systemerr: + // If we're on Systemerr, we won't write anywhere. + // NB: if this code changes later, make sure you don't try to write + // to outstream if Systemerr is the stream + out = nil + default: + return 0, fmt.Errorf("Unrecognized input header: %d", buf[stdWriterFdIndex]) + } + + // Retrieve the size of the frame + frameSize = int(binary.BigEndian.Uint32(buf[stdWriterSizeIndex : stdWriterSizeIndex+4])) + + // Check if the buffer is big enough to read the frame. + // Extend it if necessary. + if frameSize+stdWriterPrefixLen > bufLen { + buf = append(buf, make([]byte, frameSize+stdWriterPrefixLen-bufLen+1)...) + bufLen = len(buf) + } + + // While the amount of bytes read is less than the size of the frame + header, we keep reading + for nr < frameSize+stdWriterPrefixLen { + var nr2 int + nr2, er = src.Read(buf[nr:]) + nr += nr2 + if er == io.EOF { + if nr < frameSize+stdWriterPrefixLen { + return written, nil + } + break + } + if er != nil { + return 0, er + } + } + + // we might have an error from the source mixed up in our multiplexed + // stream. if we do, return it. + if stream == Systemerr { + return written, fmt.Errorf("error from daemon in stream: %s", string(buf[stdWriterPrefixLen:frameSize+stdWriterPrefixLen])) + } + + // Write the retrieved frame (without header) + nw, ew = out.Write(buf[stdWriterPrefixLen : frameSize+stdWriterPrefixLen]) + if ew != nil { + return 0, ew + } + + // If the frame has not been fully written: error + if nw != frameSize { + return 0, io.ErrShortWrite + } + written += int64(nw) + + // Move the rest of the buffer to the beginning + copy(buf, buf[frameSize+stdWriterPrefixLen:]) + // Move the index + nr -= frameSize + stdWriterPrefixLen + } +} diff --git a/cluster-autoscaler/vendor/github.com/docker/go-connections/LICENSE b/cluster-autoscaler/vendor/github.com/docker/go-connections/LICENSE new file mode 100644 index 000000000000..b55b37bc3162 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/go-connections/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2015 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/cluster-autoscaler/vendor/github.com/docker/go-connections/nat/nat.go b/cluster-autoscaler/vendor/github.com/docker/go-connections/nat/nat.go new file mode 100644 index 000000000000..bb7e4e336950 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/go-connections/nat/nat.go @@ -0,0 +1,242 @@ +// Package nat is a convenience package for manipulation of strings describing network ports. +package nat + +import ( + "fmt" + "net" + "strconv" + "strings" +) + +const ( + // portSpecTemplate is the expected format for port specifications + portSpecTemplate = "ip:hostPort:containerPort" +) + +// PortBinding represents a binding between a Host IP address and a Host Port +type PortBinding struct { + // HostIP is the host IP Address + HostIP string `json:"HostIp"` + // HostPort is the host port number + HostPort string +} + +// PortMap is a collection of PortBinding indexed by Port +type PortMap map[Port][]PortBinding + +// PortSet is a collection of structs indexed by Port +type PortSet map[Port]struct{} + +// Port is a string containing port number and protocol in the format "80/tcp" +type Port string + +// NewPort creates a new instance of a Port given a protocol and port number or port range +func NewPort(proto, port string) (Port, error) { + // Check for parsing issues on "port" now so we can avoid having + // to check it later on. + + portStartInt, portEndInt, err := ParsePortRangeToInt(port) + if err != nil { + return "", err + } + + if portStartInt == portEndInt { + return Port(fmt.Sprintf("%d/%s", portStartInt, proto)), nil + } + return Port(fmt.Sprintf("%d-%d/%s", portStartInt, portEndInt, proto)), nil +} + +// ParsePort parses the port number string and returns an int +func ParsePort(rawPort string) (int, error) { + if len(rawPort) == 0 { + return 0, nil + } + port, err := strconv.ParseUint(rawPort, 10, 16) + if err != nil { + return 0, err + } + return int(port), nil +} + +// ParsePortRangeToInt parses the port range string and returns start/end ints +func ParsePortRangeToInt(rawPort string) (int, int, error) { + if len(rawPort) == 0 { + return 0, 0, nil + } + start, end, err := ParsePortRange(rawPort) + if err != nil { + return 0, 0, err + } + return int(start), int(end), nil +} + +// Proto returns the protocol of a Port +func (p Port) Proto() string { + proto, _ := SplitProtoPort(string(p)) + return proto +} + +// Port returns the port number of a Port +func (p Port) Port() string { + _, port := SplitProtoPort(string(p)) + return port +} + +// Int returns the port number of a Port as an int +func (p Port) Int() int { + portStr := p.Port() + // We don't need to check for an error because we're going to + // assume that any error would have been found, and reported, in NewPort() + port, _ := ParsePort(portStr) + return port +} + +// Range returns the start/end port numbers of a Port range as ints +func (p Port) Range() (int, int, error) { + return ParsePortRangeToInt(p.Port()) +} + +// SplitProtoPort splits a port in the format of proto/port +func SplitProtoPort(rawPort string) (string, string) { + parts := strings.Split(rawPort, "/") + l := len(parts) + if len(rawPort) == 0 || l == 0 || len(parts[0]) == 0 { + return "", "" + } + if l == 1 { + return "tcp", rawPort + } + if len(parts[1]) == 0 { + return "tcp", parts[0] + } + return parts[1], parts[0] +} + +func validateProto(proto string) bool { + for _, availableProto := range []string{"tcp", "udp", "sctp"} { + if availableProto == proto { + return true + } + } + return false +} + +// ParsePortSpecs receives port specs in the format of ip:public:private/proto and parses +// these in to the internal types +func ParsePortSpecs(ports []string) (map[Port]struct{}, map[Port][]PortBinding, error) { + var ( + exposedPorts = make(map[Port]struct{}, len(ports)) + bindings = make(map[Port][]PortBinding) + ) + for _, rawPort := range ports { + portMappings, err := ParsePortSpec(rawPort) + if err != nil { + return nil, nil, err + } + + for _, portMapping := range portMappings { + port := portMapping.Port + if _, exists := exposedPorts[port]; !exists { + exposedPorts[port] = struct{}{} + } + bslice, exists := bindings[port] + if !exists { + bslice = []PortBinding{} + } + bindings[port] = append(bslice, portMapping.Binding) + } + } + return exposedPorts, bindings, nil +} + +// PortMapping is a data object mapping a Port to a PortBinding +type PortMapping struct { + Port Port + Binding PortBinding +} + +func splitParts(rawport string) (string, string, string) { + parts := strings.Split(rawport, ":") + n := len(parts) + containerport := parts[n-1] + + switch n { + case 1: + return "", "", containerport + case 2: + return "", parts[0], containerport + case 3: + return parts[0], parts[1], containerport + default: + return strings.Join(parts[:n-2], ":"), parts[n-2], containerport + } +} + +// ParsePortSpec parses a port specification string into a slice of PortMappings +func ParsePortSpec(rawPort string) ([]PortMapping, error) { + var proto string + rawIP, hostPort, containerPort := splitParts(rawPort) + proto, containerPort = SplitProtoPort(containerPort) + + // Strip [] from IPV6 addresses + ip, _, err := net.SplitHostPort(rawIP + ":") + if err != nil { + return nil, fmt.Errorf("Invalid ip address %v: %s", rawIP, err) + } + if ip != "" && net.ParseIP(ip) == nil { + return nil, fmt.Errorf("Invalid ip address: %s", ip) + } + if containerPort == "" { + return nil, fmt.Errorf("No port specified: %s", rawPort) + } + + startPort, endPort, err := ParsePortRange(containerPort) + if err != nil { + return nil, fmt.Errorf("Invalid containerPort: %s", containerPort) + } + + var startHostPort, endHostPort uint64 = 0, 0 + if len(hostPort) > 0 { + startHostPort, endHostPort, err = ParsePortRange(hostPort) + if err != nil { + return nil, fmt.Errorf("Invalid hostPort: %s", hostPort) + } + } + + if hostPort != "" && (endPort-startPort) != (endHostPort-startHostPort) { + // Allow host port range iff containerPort is not a range. + // In this case, use the host port range as the dynamic + // host port range to allocate into. + if endPort != startPort { + return nil, fmt.Errorf("Invalid ranges specified for container and host Ports: %s and %s", containerPort, hostPort) + } + } + + if !validateProto(strings.ToLower(proto)) { + return nil, fmt.Errorf("Invalid proto: %s", proto) + } + + ports := []PortMapping{} + for i := uint64(0); i <= (endPort - startPort); i++ { + containerPort = strconv.FormatUint(startPort+i, 10) + if len(hostPort) > 0 { + hostPort = strconv.FormatUint(startHostPort+i, 10) + } + // Set hostPort to a range only if there is a single container port + // and a dynamic host port. + if startPort == endPort && startHostPort != endHostPort { + hostPort = fmt.Sprintf("%s-%s", hostPort, strconv.FormatUint(endHostPort, 10)) + } + port, err := NewPort(strings.ToLower(proto), containerPort) + if err != nil { + return nil, err + } + + binding := PortBinding{ + HostIP: ip, + HostPort: hostPort, + } + ports = append(ports, PortMapping{Port: port, Binding: binding}) + } + return ports, nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/go-connections/nat/parse.go b/cluster-autoscaler/vendor/github.com/docker/go-connections/nat/parse.go new file mode 100644 index 000000000000..892adf8c6673 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/go-connections/nat/parse.go @@ -0,0 +1,57 @@ +package nat + +import ( + "fmt" + "strconv" + "strings" +) + +// PartParser parses and validates the specified string (data) using the specified template +// e.g. ip:public:private -> 192.168.0.1:80:8000 +// DEPRECATED: do not use, this function may be removed in a future version +func PartParser(template, data string) (map[string]string, error) { + // ip:public:private + var ( + templateParts = strings.Split(template, ":") + parts = strings.Split(data, ":") + out = make(map[string]string, len(templateParts)) + ) + if len(parts) != len(templateParts) { + return nil, fmt.Errorf("Invalid format to parse. %s should match template %s", data, template) + } + + for i, t := range templateParts { + value := "" + if len(parts) > i { + value = parts[i] + } + out[t] = value + } + return out, nil +} + +// ParsePortRange parses and validates the specified string as a port-range (8000-9000) +func ParsePortRange(ports string) (uint64, uint64, error) { + if ports == "" { + return 0, 0, fmt.Errorf("Empty string specified for ports.") + } + if !strings.Contains(ports, "-") { + start, err := strconv.ParseUint(ports, 10, 16) + end := start + return start, end, err + } + + parts := strings.Split(ports, "-") + start, err := strconv.ParseUint(parts[0], 10, 16) + if err != nil { + return 0, 0, err + } + end, err := strconv.ParseUint(parts[1], 10, 16) + if err != nil { + return 0, 0, err + } + if end < start { + return 0, 0, fmt.Errorf("Invalid range specified for the Port: %s", ports) + } + return start, end, nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/go-connections/nat/sort.go b/cluster-autoscaler/vendor/github.com/docker/go-connections/nat/sort.go new file mode 100644 index 000000000000..ce950171e315 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/go-connections/nat/sort.go @@ -0,0 +1,96 @@ +package nat + +import ( + "sort" + "strings" +) + +type portSorter struct { + ports []Port + by func(i, j Port) bool +} + +func (s *portSorter) Len() int { + return len(s.ports) +} + +func (s *portSorter) Swap(i, j int) { + s.ports[i], s.ports[j] = s.ports[j], s.ports[i] +} + +func (s *portSorter) Less(i, j int) bool { + ip := s.ports[i] + jp := s.ports[j] + + return s.by(ip, jp) +} + +// Sort sorts a list of ports using the provided predicate +// This function should compare `i` and `j`, returning true if `i` is +// considered to be less than `j` +func Sort(ports []Port, predicate func(i, j Port) bool) { + s := &portSorter{ports, predicate} + sort.Sort(s) +} + +type portMapEntry struct { + port Port + binding PortBinding +} + +type portMapSorter []portMapEntry + +func (s portMapSorter) Len() int { return len(s) } +func (s portMapSorter) Swap(i, j int) { s[i], s[j] = s[j], s[i] } + +// sort the port so that the order is: +// 1. port with larger specified bindings +// 2. larger port +// 3. port with tcp protocol +func (s portMapSorter) Less(i, j int) bool { + pi, pj := s[i].port, s[j].port + hpi, hpj := toInt(s[i].binding.HostPort), toInt(s[j].binding.HostPort) + return hpi > hpj || pi.Int() > pj.Int() || (pi.Int() == pj.Int() && strings.ToLower(pi.Proto()) == "tcp") +} + +// SortPortMap sorts the list of ports and their respected mapping. The ports +// will explicit HostPort will be placed first. +func SortPortMap(ports []Port, bindings PortMap) { + s := portMapSorter{} + for _, p := range ports { + if binding, ok := bindings[p]; ok { + for _, b := range binding { + s = append(s, portMapEntry{port: p, binding: b}) + } + bindings[p] = []PortBinding{} + } else { + s = append(s, portMapEntry{port: p}) + } + } + + sort.Sort(s) + var ( + i int + pm = make(map[Port]struct{}) + ) + // reorder ports + for _, entry := range s { + if _, ok := pm[entry.port]; !ok { + ports[i] = entry.port + pm[entry.port] = struct{}{} + i++ + } + // reorder bindings for this port + if _, ok := bindings[entry.port]; ok { + bindings[entry.port] = append(bindings[entry.port], entry.binding) + } + } +} + +func toInt(s string) uint64 { + i, _, err := ParsePortRange(s) + if err != nil { + i = 0 + } + return i +} diff --git a/cluster-autoscaler/vendor/github.com/docker/go-connections/sockets/README.md b/cluster-autoscaler/vendor/github.com/docker/go-connections/sockets/README.md new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/cluster-autoscaler/vendor/github.com/docker/go-connections/sockets/inmem_socket.go b/cluster-autoscaler/vendor/github.com/docker/go-connections/sockets/inmem_socket.go new file mode 100644 index 000000000000..99846ffddb1a --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/go-connections/sockets/inmem_socket.go @@ -0,0 +1,81 @@ +package sockets + +import ( + "errors" + "net" + "sync" +) + +var errClosed = errors.New("use of closed network connection") + +// InmemSocket implements net.Listener using in-memory only connections. +type InmemSocket struct { + chConn chan net.Conn + chClose chan struct{} + addr string + mu sync.Mutex +} + +// dummyAddr is used to satisfy net.Addr for the in-mem socket +// it is just stored as a string and returns the string for all calls +type dummyAddr string + +// NewInmemSocket creates an in-memory only net.Listener +// The addr argument can be any string, but is used to satisfy the `Addr()` part +// of the net.Listener interface +func NewInmemSocket(addr string, bufSize int) *InmemSocket { + return &InmemSocket{ + chConn: make(chan net.Conn, bufSize), + chClose: make(chan struct{}), + addr: addr, + } +} + +// Addr returns the socket's addr string to satisfy net.Listener +func (s *InmemSocket) Addr() net.Addr { + return dummyAddr(s.addr) +} + +// Accept implements the Accept method in the Listener interface; it waits for the next call and returns a generic Conn. +func (s *InmemSocket) Accept() (net.Conn, error) { + select { + case conn := <-s.chConn: + return conn, nil + case <-s.chClose: + return nil, errClosed + } +} + +// Close closes the listener. It will be unavailable for use once closed. +func (s *InmemSocket) Close() error { + s.mu.Lock() + defer s.mu.Unlock() + select { + case <-s.chClose: + default: + close(s.chClose) + } + return nil +} + +// Dial is used to establish a connection with the in-mem server +func (s *InmemSocket) Dial(network, addr string) (net.Conn, error) { + srvConn, clientConn := net.Pipe() + select { + case s.chConn <- srvConn: + case <-s.chClose: + return nil, errClosed + } + + return clientConn, nil +} + +// Network returns the addr string, satisfies net.Addr +func (a dummyAddr) Network() string { + return string(a) +} + +// String returns the string form +func (a dummyAddr) String() string { + return string(a) +} diff --git a/cluster-autoscaler/vendor/github.com/docker/go-connections/sockets/proxy.go b/cluster-autoscaler/vendor/github.com/docker/go-connections/sockets/proxy.go new file mode 100644 index 000000000000..98e9a1dc61b5 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/go-connections/sockets/proxy.go @@ -0,0 +1,51 @@ +package sockets + +import ( + "net" + "net/url" + "os" + "strings" + + "golang.org/x/net/proxy" +) + +// GetProxyEnv allows access to the uppercase and the lowercase forms of +// proxy-related variables. See the Go specification for details on these +// variables. https://golang.org/pkg/net/http/ +func GetProxyEnv(key string) string { + proxyValue := os.Getenv(strings.ToUpper(key)) + if proxyValue == "" { + return os.Getenv(strings.ToLower(key)) + } + return proxyValue +} + +// DialerFromEnvironment takes in a "direct" *net.Dialer and returns a +// proxy.Dialer which will route the connections through the proxy using the +// given dialer. +func DialerFromEnvironment(direct *net.Dialer) (proxy.Dialer, error) { + allProxy := GetProxyEnv("all_proxy") + if len(allProxy) == 0 { + return direct, nil + } + + proxyURL, err := url.Parse(allProxy) + if err != nil { + return direct, err + } + + proxyFromURL, err := proxy.FromURL(proxyURL, direct) + if err != nil { + return direct, err + } + + noProxy := GetProxyEnv("no_proxy") + if len(noProxy) == 0 { + return proxyFromURL, nil + } + + perHost := proxy.NewPerHost(proxyFromURL, direct) + perHost.AddFromString(noProxy) + + return perHost, nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/go-connections/sockets/sockets.go b/cluster-autoscaler/vendor/github.com/docker/go-connections/sockets/sockets.go new file mode 100644 index 000000000000..a1d7beb4d805 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/go-connections/sockets/sockets.go @@ -0,0 +1,38 @@ +// Package sockets provides helper functions to create and configure Unix or TCP sockets. +package sockets + +import ( + "errors" + "net" + "net/http" + "time" +) + +// Why 32? See https://github.com/docker/docker/pull/8035. +const defaultTimeout = 32 * time.Second + +// ErrProtocolNotAvailable is returned when a given transport protocol is not provided by the operating system. +var ErrProtocolNotAvailable = errors.New("protocol not available") + +// ConfigureTransport configures the specified Transport according to the +// specified proto and addr. +// If the proto is unix (using a unix socket to communicate) or npipe the +// compression is disabled. +func ConfigureTransport(tr *http.Transport, proto, addr string) error { + switch proto { + case "unix": + return configureUnixTransport(tr, proto, addr) + case "npipe": + return configureNpipeTransport(tr, proto, addr) + default: + tr.Proxy = http.ProxyFromEnvironment + dialer, err := DialerFromEnvironment(&net.Dialer{ + Timeout: defaultTimeout, + }) + if err != nil { + return err + } + tr.Dial = dialer.Dial + } + return nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/go-connections/sockets/sockets_unix.go b/cluster-autoscaler/vendor/github.com/docker/go-connections/sockets/sockets_unix.go new file mode 100644 index 000000000000..386cf0dbbdec --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/go-connections/sockets/sockets_unix.go @@ -0,0 +1,35 @@ +// +build !windows + +package sockets + +import ( + "fmt" + "net" + "net/http" + "syscall" + "time" +) + +const maxUnixSocketPathSize = len(syscall.RawSockaddrUnix{}.Path) + +func configureUnixTransport(tr *http.Transport, proto, addr string) error { + if len(addr) > maxUnixSocketPathSize { + return fmt.Errorf("Unix socket path %q is too long", addr) + } + // No need for compression in local communications. + tr.DisableCompression = true + tr.Dial = func(_, _ string) (net.Conn, error) { + return net.DialTimeout(proto, addr, defaultTimeout) + } + return nil +} + +func configureNpipeTransport(tr *http.Transport, proto, addr string) error { + return ErrProtocolNotAvailable +} + +// DialPipe connects to a Windows named pipe. +// This is not supported on other OSes. +func DialPipe(_ string, _ time.Duration) (net.Conn, error) { + return nil, syscall.EAFNOSUPPORT +} diff --git a/cluster-autoscaler/vendor/github.com/docker/go-connections/sockets/sockets_windows.go b/cluster-autoscaler/vendor/github.com/docker/go-connections/sockets/sockets_windows.go new file mode 100644 index 000000000000..5c21644e1fe7 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/go-connections/sockets/sockets_windows.go @@ -0,0 +1,27 @@ +package sockets + +import ( + "net" + "net/http" + "time" + + "github.com/Microsoft/go-winio" +) + +func configureUnixTransport(tr *http.Transport, proto, addr string) error { + return ErrProtocolNotAvailable +} + +func configureNpipeTransport(tr *http.Transport, proto, addr string) error { + // No need for compression in local communications. + tr.DisableCompression = true + tr.Dial = func(_, _ string) (net.Conn, error) { + return DialPipe(addr, defaultTimeout) + } + return nil +} + +// DialPipe connects to a Windows named pipe. +func DialPipe(addr string, timeout time.Duration) (net.Conn, error) { + return winio.DialPipe(addr, &timeout) +} diff --git a/cluster-autoscaler/vendor/github.com/docker/go-connections/sockets/tcp_socket.go b/cluster-autoscaler/vendor/github.com/docker/go-connections/sockets/tcp_socket.go new file mode 100644 index 000000000000..53cbb6c79e47 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/go-connections/sockets/tcp_socket.go @@ -0,0 +1,22 @@ +// Package sockets provides helper functions to create and configure Unix or TCP sockets. +package sockets + +import ( + "crypto/tls" + "net" +) + +// NewTCPSocket creates a TCP socket listener with the specified address and +// the specified tls configuration. If TLSConfig is set, will encapsulate the +// TCP listener inside a TLS one. +func NewTCPSocket(addr string, tlsConfig *tls.Config) (net.Listener, error) { + l, err := net.Listen("tcp", addr) + if err != nil { + return nil, err + } + if tlsConfig != nil { + tlsConfig.NextProtos = []string{"http/1.1"} + l = tls.NewListener(l, tlsConfig) + } + return l, nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/go-connections/sockets/unix_socket.go b/cluster-autoscaler/vendor/github.com/docker/go-connections/sockets/unix_socket.go new file mode 100644 index 000000000000..a8b5dbb6fdc0 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/go-connections/sockets/unix_socket.go @@ -0,0 +1,32 @@ +// +build !windows + +package sockets + +import ( + "net" + "os" + "syscall" +) + +// NewUnixSocket creates a unix socket with the specified path and group. +func NewUnixSocket(path string, gid int) (net.Listener, error) { + if err := syscall.Unlink(path); err != nil && !os.IsNotExist(err) { + return nil, err + } + mask := syscall.Umask(0777) + defer syscall.Umask(mask) + + l, err := net.Listen("unix", path) + if err != nil { + return nil, err + } + if err := os.Chown(path, 0, gid); err != nil { + l.Close() + return nil, err + } + if err := os.Chmod(path, 0660); err != nil { + l.Close() + return nil, err + } + return l, nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/go-connections/tlsconfig/certpool_go17.go b/cluster-autoscaler/vendor/github.com/docker/go-connections/tlsconfig/certpool_go17.go new file mode 100644 index 000000000000..1ca0965e06ea --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/go-connections/tlsconfig/certpool_go17.go @@ -0,0 +1,18 @@ +// +build go1.7 + +package tlsconfig + +import ( + "crypto/x509" + "runtime" +) + +// SystemCertPool returns a copy of the system cert pool, +// returns an error if failed to load or empty pool on windows. +func SystemCertPool() (*x509.CertPool, error) { + certpool, err := x509.SystemCertPool() + if err != nil && runtime.GOOS == "windows" { + return x509.NewCertPool(), nil + } + return certpool, err +} diff --git a/cluster-autoscaler/vendor/github.com/docker/go-connections/tlsconfig/certpool_other.go b/cluster-autoscaler/vendor/github.com/docker/go-connections/tlsconfig/certpool_other.go new file mode 100644 index 000000000000..1ff81c333c36 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/go-connections/tlsconfig/certpool_other.go @@ -0,0 +1,13 @@ +// +build !go1.7 + +package tlsconfig + +import ( + "crypto/x509" +) + +// SystemCertPool returns an new empty cert pool, +// accessing system cert pool is supported in go 1.7 +func SystemCertPool() (*x509.CertPool, error) { + return x509.NewCertPool(), nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/go-connections/tlsconfig/config.go b/cluster-autoscaler/vendor/github.com/docker/go-connections/tlsconfig/config.go new file mode 100644 index 000000000000..0ef3fdcb4690 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/go-connections/tlsconfig/config.go @@ -0,0 +1,254 @@ +// Package tlsconfig provides primitives to retrieve secure-enough TLS configurations for both clients and servers. +// +// As a reminder from https://golang.org/pkg/crypto/tls/#Config: +// A Config structure is used to configure a TLS client or server. After one has been passed to a TLS function it must not be modified. +// A Config may be reused; the tls package will also not modify it. +package tlsconfig + +import ( + "crypto/tls" + "crypto/x509" + "encoding/pem" + "fmt" + "io/ioutil" + "os" + + "github.com/pkg/errors" +) + +// Options represents the information needed to create client and server TLS configurations. +type Options struct { + CAFile string + + // If either CertFile or KeyFile is empty, Client() will not load them + // preventing the client from authenticating to the server. + // However, Server() requires them and will error out if they are empty. + CertFile string + KeyFile string + + // client-only option + InsecureSkipVerify bool + // server-only option + ClientAuth tls.ClientAuthType + // If ExclusiveRootPools is set, then if a CA file is provided, the root pool used for TLS + // creds will include exclusively the roots in that CA file. If no CA file is provided, + // the system pool will be used. + ExclusiveRootPools bool + MinVersion uint16 + // If Passphrase is set, it will be used to decrypt a TLS private key + // if the key is encrypted + Passphrase string +} + +// Extra (server-side) accepted CBC cipher suites - will phase out in the future +var acceptedCBCCiphers = []uint16{ + tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, + tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, + tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, + tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, +} + +// DefaultServerAcceptedCiphers should be uses by code which already has a crypto/tls +// options struct but wants to use a commonly accepted set of TLS cipher suites, with +// known weak algorithms removed. +var DefaultServerAcceptedCiphers = append(clientCipherSuites, acceptedCBCCiphers...) + +// allTLSVersions lists all the TLS versions and is used by the code that validates +// a uint16 value as a TLS version. +var allTLSVersions = map[uint16]struct{}{ + tls.VersionSSL30: {}, + tls.VersionTLS10: {}, + tls.VersionTLS11: {}, + tls.VersionTLS12: {}, +} + +// ServerDefault returns a secure-enough TLS configuration for the server TLS configuration. +func ServerDefault(ops ...func(*tls.Config)) *tls.Config { + tlsconfig := &tls.Config{ + // Avoid fallback by default to SSL protocols < TLS1.2 + MinVersion: tls.VersionTLS12, + PreferServerCipherSuites: true, + CipherSuites: DefaultServerAcceptedCiphers, + } + + for _, op := range ops { + op(tlsconfig) + } + + return tlsconfig +} + +// ClientDefault returns a secure-enough TLS configuration for the client TLS configuration. +func ClientDefault(ops ...func(*tls.Config)) *tls.Config { + tlsconfig := &tls.Config{ + // Prefer TLS1.2 as the client minimum + MinVersion: tls.VersionTLS12, + CipherSuites: clientCipherSuites, + } + + for _, op := range ops { + op(tlsconfig) + } + + return tlsconfig +} + +// certPool returns an X.509 certificate pool from `caFile`, the certificate file. +func certPool(caFile string, exclusivePool bool) (*x509.CertPool, error) { + // If we should verify the server, we need to load a trusted ca + var ( + certPool *x509.CertPool + err error + ) + if exclusivePool { + certPool = x509.NewCertPool() + } else { + certPool, err = SystemCertPool() + if err != nil { + return nil, fmt.Errorf("failed to read system certificates: %v", err) + } + } + pem, err := ioutil.ReadFile(caFile) + if err != nil { + return nil, fmt.Errorf("could not read CA certificate %q: %v", caFile, err) + } + if !certPool.AppendCertsFromPEM(pem) { + return nil, fmt.Errorf("failed to append certificates from PEM file: %q", caFile) + } + return certPool, nil +} + +// isValidMinVersion checks that the input value is a valid tls minimum version +func isValidMinVersion(version uint16) bool { + _, ok := allTLSVersions[version] + return ok +} + +// adjustMinVersion sets the MinVersion on `config`, the input configuration. +// It assumes the current MinVersion on the `config` is the lowest allowed. +func adjustMinVersion(options Options, config *tls.Config) error { + if options.MinVersion > 0 { + if !isValidMinVersion(options.MinVersion) { + return fmt.Errorf("Invalid minimum TLS version: %x", options.MinVersion) + } + if options.MinVersion < config.MinVersion { + return fmt.Errorf("Requested minimum TLS version is too low. Should be at-least: %x", config.MinVersion) + } + config.MinVersion = options.MinVersion + } + + return nil +} + +// IsErrEncryptedKey returns true if the 'err' is an error of incorrect +// password when tryin to decrypt a TLS private key +func IsErrEncryptedKey(err error) bool { + return errors.Cause(err) == x509.IncorrectPasswordError +} + +// getPrivateKey returns the private key in 'keyBytes', in PEM-encoded format. +// If the private key is encrypted, 'passphrase' is used to decrypted the +// private key. +func getPrivateKey(keyBytes []byte, passphrase string) ([]byte, error) { + // this section makes some small changes to code from notary/tuf/utils/x509.go + pemBlock, _ := pem.Decode(keyBytes) + if pemBlock == nil { + return nil, fmt.Errorf("no valid private key found") + } + + var err error + if x509.IsEncryptedPEMBlock(pemBlock) { + keyBytes, err = x509.DecryptPEMBlock(pemBlock, []byte(passphrase)) + if err != nil { + return nil, errors.Wrap(err, "private key is encrypted, but could not decrypt it") + } + keyBytes = pem.EncodeToMemory(&pem.Block{Type: pemBlock.Type, Bytes: keyBytes}) + } + + return keyBytes, nil +} + +// getCert returns a Certificate from the CertFile and KeyFile in 'options', +// if the key is encrypted, the Passphrase in 'options' will be used to +// decrypt it. +func getCert(options Options) ([]tls.Certificate, error) { + if options.CertFile == "" && options.KeyFile == "" { + return nil, nil + } + + errMessage := "Could not load X509 key pair" + + cert, err := ioutil.ReadFile(options.CertFile) + if err != nil { + return nil, errors.Wrap(err, errMessage) + } + + prKeyBytes, err := ioutil.ReadFile(options.KeyFile) + if err != nil { + return nil, errors.Wrap(err, errMessage) + } + + prKeyBytes, err = getPrivateKey(prKeyBytes, options.Passphrase) + if err != nil { + return nil, errors.Wrap(err, errMessage) + } + + tlsCert, err := tls.X509KeyPair(cert, prKeyBytes) + if err != nil { + return nil, errors.Wrap(err, errMessage) + } + + return []tls.Certificate{tlsCert}, nil +} + +// Client returns a TLS configuration meant to be used by a client. +func Client(options Options) (*tls.Config, error) { + tlsConfig := ClientDefault() + tlsConfig.InsecureSkipVerify = options.InsecureSkipVerify + if !options.InsecureSkipVerify && options.CAFile != "" { + CAs, err := certPool(options.CAFile, options.ExclusiveRootPools) + if err != nil { + return nil, err + } + tlsConfig.RootCAs = CAs + } + + tlsCerts, err := getCert(options) + if err != nil { + return nil, err + } + tlsConfig.Certificates = tlsCerts + + if err := adjustMinVersion(options, tlsConfig); err != nil { + return nil, err + } + + return tlsConfig, nil +} + +// Server returns a TLS configuration meant to be used by a server. +func Server(options Options) (*tls.Config, error) { + tlsConfig := ServerDefault() + tlsConfig.ClientAuth = options.ClientAuth + tlsCert, err := tls.LoadX509KeyPair(options.CertFile, options.KeyFile) + if err != nil { + if os.IsNotExist(err) { + return nil, fmt.Errorf("Could not load X509 key pair (cert: %q, key: %q): %v", options.CertFile, options.KeyFile, err) + } + return nil, fmt.Errorf("Error reading X509 key pair (cert: %q, key: %q): %v. Make sure the key is not encrypted.", options.CertFile, options.KeyFile, err) + } + tlsConfig.Certificates = []tls.Certificate{tlsCert} + if options.ClientAuth >= tls.VerifyClientCertIfGiven && options.CAFile != "" { + CAs, err := certPool(options.CAFile, options.ExclusiveRootPools) + if err != nil { + return nil, err + } + tlsConfig.ClientCAs = CAs + } + + if err := adjustMinVersion(options, tlsConfig); err != nil { + return nil, err + } + + return tlsConfig, nil +} diff --git a/cluster-autoscaler/vendor/github.com/docker/go-connections/tlsconfig/config_client_ciphers.go b/cluster-autoscaler/vendor/github.com/docker/go-connections/tlsconfig/config_client_ciphers.go new file mode 100644 index 000000000000..6b4c6a7c0d06 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/go-connections/tlsconfig/config_client_ciphers.go @@ -0,0 +1,17 @@ +// +build go1.5 + +// Package tlsconfig provides primitives to retrieve secure-enough TLS configurations for both clients and servers. +// +package tlsconfig + +import ( + "crypto/tls" +) + +// Client TLS cipher suites (dropping CBC ciphers for client preferred suite set) +var clientCipherSuites = []uint16{ + tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, + tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, + tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, + tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, +} diff --git a/cluster-autoscaler/vendor/github.com/docker/go-connections/tlsconfig/config_legacy_client_ciphers.go b/cluster-autoscaler/vendor/github.com/docker/go-connections/tlsconfig/config_legacy_client_ciphers.go new file mode 100644 index 000000000000..ee22df47cb29 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/docker/go-connections/tlsconfig/config_legacy_client_ciphers.go @@ -0,0 +1,15 @@ +// +build !go1.5 + +// Package tlsconfig provides primitives to retrieve secure-enough TLS configurations for both clients and servers. +// +package tlsconfig + +import ( + "crypto/tls" +) + +// Client TLS cipher suites (dropping CBC ciphers for client preferred suite set) +var clientCipherSuites = []uint16{ + tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, + tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, +} diff --git a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/.mailmap b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/.mailmap deleted file mode 100644 index a04f2907fed3..000000000000 --- a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/.mailmap +++ /dev/null @@ -1,2 +0,0 @@ -Chris Howey -Nathan Youngman <4566+nathany@users.noreply.github.com> diff --git a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/.travis.yml b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/.travis.yml new file mode 100644 index 000000000000..a9c30165cddf --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/.travis.yml @@ -0,0 +1,36 @@ +sudo: false +language: go + +go: + - "stable" + - "1.11.x" + - "1.10.x" + - "1.9.x" + +matrix: + include: + - go: "stable" + env: GOLINT=true + allow_failures: + - go: tip + fast_finish: true + + +before_install: + - if [ ! -z "${GOLINT}" ]; then go get -u golang.org/x/lint/golint; fi + +script: + - go test --race ./... + +after_script: + - test -z "$(gofmt -s -l -w . | tee /dev/stderr)" + - if [ ! -z "${GOLINT}" ]; then echo running golint; golint --set_exit_status ./...; else echo skipping golint; fi + - go vet ./... + +os: + - linux + - osx + - windows + +notifications: + email: false diff --git a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/AUTHORS b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/AUTHORS index 6cbabe5ef50b..5ab5d41c5472 100644 --- a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/AUTHORS +++ b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/AUTHORS @@ -4,44 +4,35 @@ # You can update this list using the following command: # -# $ (head -n10 AUTHORS && git shortlog -se | sed -E 's/^\s+[0-9]+\t//') | tee AUTHORS +# $ git shortlog -se | awk '{print $2 " " $3 " " $4}' # Please keep the list sorted. Aaron L Adrien Bustany -Alexey Kazakov Amit Krishnan Anmol Sethi Bjørn Erik Pedersen -Brian Goff Bruno Bigras Caleb Spare Case Nelson -Chris Howey +Chris Howey Christoffer Buchholz Daniel Wagner-Hall Dave Cheney -Eric Lin Evan Phoenix Francisco Souza -Gautam Dey Hari haran -Ichinose Shogo -Johannes Ebke -John C Barstow +John C Barstow Kelvin Fo Ken-ichirou MATSUZAWA Matt Layher -Matthias Stone Nathan Youngman Nickolai Zeldovich -Oliver Bristow Patrick Paul Hammond Pawel Knap Pieter Droogendijk -Pratik Shinde Pursuit92 Riku Voipio Rob Figueiredo @@ -50,7 +41,6 @@ Slawek Ligus Soge Zhang Tiffany Jernigan Tilak Sharma -Tobias Klauser Tom Payne Travis Cline Tudor Golubenco diff --git a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md index a438fe4b4a54..be4d7ea2c145 100644 --- a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md +++ b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md @@ -1,28 +1,6 @@ # Changelog -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [Unreleased] - -## [1.5.1] - 2021-08-24 - -* Revert Add AddRaw to not follow symlinks - -## [1.5.0] - 2021-08-20 - -* Go: Increase minimum required version to Go 1.12 [#381](https://github.com/fsnotify/fsnotify/pull/381) -* Feature: Add AddRaw method which does not follow symlinks when adding a watch [#289](https://github.com/fsnotify/fsnotify/pull/298) -* Windows: Follow symlinks by default like on all other systems [#289](https://github.com/fsnotify/fsnotify/pull/289) -* CI: Use GitHub Actions for CI and cover go 1.12-1.17 - [#378](https://github.com/fsnotify/fsnotify/pull/378) - [#381](https://github.com/fsnotify/fsnotify/pull/381) - [#385](https://github.com/fsnotify/fsnotify/pull/385) -* Go 1.14+: Fix unsafe pointer conversion [#325](https://github.com/fsnotify/fsnotify/pull/325) - -## [1.4.7] - 2018-01-09 +## v1.4.7 / 2018-01-09 * BSD/macOS: Fix possible deadlock on closing the watcher on kqueue (thanks @nhooyr and @glycerine) * Tests: Fix missing verb on format string (thanks @rchiossi) @@ -32,62 +10,62 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Linux: Properly handle inotify's IN_Q_OVERFLOW event (thanks @zeldovich) * Docs: replace references to OS X with macOS -## [1.4.2] - 2016-10-10 +## v1.4.2 / 2016-10-10 * Linux: use InotifyInit1 with IN_CLOEXEC to stop leaking a file descriptor to a child process when using fork/exec [#178](https://github.com/fsnotify/fsnotify/pull/178) (thanks @pattyshack) -## [1.4.1] - 2016-10-04 +## v1.4.1 / 2016-10-04 * Fix flaky inotify stress test on Linux [#177](https://github.com/fsnotify/fsnotify/pull/177) (thanks @pattyshack) -## [1.4.0] - 2016-10-01 +## v1.4.0 / 2016-10-01 * add a String() method to Event.Op [#165](https://github.com/fsnotify/fsnotify/pull/165) (thanks @oozie) -## [1.3.1] - 2016-06-28 +## v1.3.1 / 2016-06-28 * Windows: fix for double backslash when watching the root of a drive [#151](https://github.com/fsnotify/fsnotify/issues/151) (thanks @brunoqc) -## [1.3.0] - 2016-04-19 +## v1.3.0 / 2016-04-19 * Support linux/arm64 by [patching](https://go-review.googlesource.com/#/c/21971/) x/sys/unix and switching to to it from syscall (thanks @suihkulokki) [#135](https://github.com/fsnotify/fsnotify/pull/135) -## [1.2.10] - 2016-03-02 +## v1.2.10 / 2016-03-02 * Fix golint errors in windows.go [#121](https://github.com/fsnotify/fsnotify/pull/121) (thanks @tiffanyfj) -## [1.2.9] - 2016-01-13 +## v1.2.9 / 2016-01-13 kqueue: Fix logic for CREATE after REMOVE [#111](https://github.com/fsnotify/fsnotify/pull/111) (thanks @bep) -## [1.2.8] - 2015-12-17 +## v1.2.8 / 2015-12-17 * kqueue: fix race condition in Close [#105](https://github.com/fsnotify/fsnotify/pull/105) (thanks @djui for reporting the issue and @ppknap for writing a failing test) * inotify: fix race in test * enable race detection for continuous integration (Linux, Mac, Windows) -## [1.2.5] - 2015-10-17 +## v1.2.5 / 2015-10-17 * inotify: use epoll_create1 for arm64 support (requires Linux 2.6.27 or later) [#100](https://github.com/fsnotify/fsnotify/pull/100) (thanks @suihkulokki) * inotify: fix path leaks [#73](https://github.com/fsnotify/fsnotify/pull/73) (thanks @chamaken) * kqueue: watch for rename events on subdirectories [#83](https://github.com/fsnotify/fsnotify/pull/83) (thanks @guotie) * kqueue: avoid infinite loops from symlinks cycles [#101](https://github.com/fsnotify/fsnotify/pull/101) (thanks @illicitonion) -## [1.2.1] - 2015-10-14 +## v1.2.1 / 2015-10-14 * kqueue: don't watch named pipes [#98](https://github.com/fsnotify/fsnotify/pull/98) (thanks @evanphx) -## [1.2.0] - 2015-02-08 +## v1.2.0 / 2015-02-08 * inotify: use epoll to wake up readEvents [#66](https://github.com/fsnotify/fsnotify/pull/66) (thanks @PieterD) * inotify: closing watcher should now always shut down goroutine [#63](https://github.com/fsnotify/fsnotify/pull/63) (thanks @PieterD) * kqueue: close kqueue after removing watches, fixes [#59](https://github.com/fsnotify/fsnotify/issues/59) -## [1.1.1] - 2015-02-05 +## v1.1.1 / 2015-02-05 * inotify: Retry read on EINTR [#61](https://github.com/fsnotify/fsnotify/issues/61) (thanks @PieterD) -## [1.1.0] - 2014-12-12 +## v1.1.0 / 2014-12-12 * kqueue: rework internals [#43](https://github.com/fsnotify/fsnotify/pull/43) * add low-level functions @@ -99,22 +77,22 @@ kqueue: Fix logic for CREATE after REMOVE [#111](https://github.com/fsnotify/fsn * kqueue: fix regression in rework causing subdirectories to be watched [#48](https://github.com/fsnotify/fsnotify/issues/48) * kqueue: cleanup internal watch before sending remove event [#51](https://github.com/fsnotify/fsnotify/issues/51) -## [1.0.4] - 2014-09-07 +## v1.0.4 / 2014-09-07 * kqueue: add dragonfly to the build tags. * Rename source code files, rearrange code so exported APIs are at the top. * Add done channel to example code. [#37](https://github.com/fsnotify/fsnotify/pull/37) (thanks @chenyukang) -## [1.0.3] - 2014-08-19 +## v1.0.3 / 2014-08-19 * [Fix] Windows MOVED_TO now translates to Create like on BSD and Linux. [#36](https://github.com/fsnotify/fsnotify/issues/36) -## [1.0.2] - 2014-08-17 +## v1.0.2 / 2014-08-17 * [Fix] Missing create events on macOS. [#14](https://github.com/fsnotify/fsnotify/issues/14) (thanks @zhsso) * [Fix] Make ./path and path equivalent. (thanks @zhsso) -## [1.0.0] - 2014-08-15 +## v1.0.0 / 2014-08-15 * [API] Remove AddWatch on Windows, use Add. * Improve documentation for exported identifiers. [#30](https://github.com/fsnotify/fsnotify/issues/30) @@ -168,51 +146,51 @@ kqueue: Fix logic for CREATE after REMOVE [#111](https://github.com/fsnotify/fsn * no tests for the current implementation * not fully implemented on Windows [#93](https://github.com/howeyc/fsnotify/issues/93#issuecomment-39285195) -## [0.9.3] - 2014-12-31 +## v0.9.3 / 2014-12-31 * kqueue: cleanup internal watch before sending remove event [#51](https://github.com/fsnotify/fsnotify/issues/51) -## [0.9.2] - 2014-08-17 +## v0.9.2 / 2014-08-17 * [Backport] Fix missing create events on macOS. [#14](https://github.com/fsnotify/fsnotify/issues/14) (thanks @zhsso) -## [0.9.1] - 2014-06-12 +## v0.9.1 / 2014-06-12 * Fix data race on kevent buffer (thanks @tilaks) [#98](https://github.com/howeyc/fsnotify/pull/98) -## [0.9.0] - 2014-01-17 +## v0.9.0 / 2014-01-17 * IsAttrib() for events that only concern a file's metadata [#79][] (thanks @abustany) * [Fix] kqueue: fix deadlock [#77][] (thanks @cespare) * [NOTICE] Development has moved to `code.google.com/p/go.exp/fsnotify` in preparation for inclusion in the Go standard library. -## [0.8.12] - 2013-11-13 +## v0.8.12 / 2013-11-13 * [API] Remove FD_SET and friends from Linux adapter -## [0.8.11] - 2013-11-02 +## v0.8.11 / 2013-11-02 * [Doc] Add Changelog [#72][] (thanks @nathany) * [Doc] Spotlight and double modify events on macOS [#62][] (reported by @paulhammond) -## [0.8.10] - 2013-10-19 +## v0.8.10 / 2013-10-19 * [Fix] kqueue: remove file watches when parent directory is removed [#71][] (reported by @mdwhatcott) * [Fix] kqueue: race between Close and readEvents [#70][] (reported by @bernerdschaefer) * [Doc] specify OS-specific limits in README (thanks @debrando) -## [0.8.9] - 2013-09-08 +## v0.8.9 / 2013-09-08 * [Doc] Contributing (thanks @nathany) * [Doc] update package path in example code [#63][] (thanks @paulhammond) * [Doc] GoCI badge in README (Linux only) [#60][] * [Doc] Cross-platform testing with Vagrant [#59][] (thanks @nathany) -## [0.8.8] - 2013-06-17 +## v0.8.8 / 2013-06-17 * [Fix] Windows: handle `ERROR_MORE_DATA` on Windows [#49][] (thanks @jbowtie) -## [0.8.7] - 2013-06-03 +## v0.8.7 / 2013-06-03 * [API] Make syscall flags internal * [Fix] inotify: ignore event changes @@ -220,74 +198,74 @@ kqueue: Fix logic for CREATE after REMOVE [#111](https://github.com/fsnotify/fsn * [Fix] tests on Windows * lower case error messages -## [0.8.6] - 2013-05-23 +## v0.8.6 / 2013-05-23 * kqueue: Use EVT_ONLY flag on Darwin * [Doc] Update README with full example -## [0.8.5] - 2013-05-09 +## v0.8.5 / 2013-05-09 * [Fix] inotify: allow monitoring of "broken" symlinks (thanks @tsg) -## [0.8.4] - 2013-04-07 +## v0.8.4 / 2013-04-07 * [Fix] kqueue: watch all file events [#40][] (thanks @ChrisBuchholz) -## [0.8.3] - 2013-03-13 +## v0.8.3 / 2013-03-13 * [Fix] inoitfy/kqueue memory leak [#36][] (reported by @nbkolchin) * [Fix] kqueue: use fsnFlags for watching a directory [#33][] (reported by @nbkolchin) -## [0.8.2] - 2013-02-07 +## v0.8.2 / 2013-02-07 * [Doc] add Authors * [Fix] fix data races for map access [#29][] (thanks @fsouza) -## [0.8.1] - 2013-01-09 +## v0.8.1 / 2013-01-09 * [Fix] Windows path separators * [Doc] BSD License -## [0.8.0] - 2012-11-09 +## v0.8.0 / 2012-11-09 * kqueue: directory watching improvements (thanks @vmirage) * inotify: add `IN_MOVED_TO` [#25][] (requested by @cpisto) * [Fix] kqueue: deleting watched directory [#24][] (reported by @jakerr) -## [0.7.4] - 2012-10-09 +## v0.7.4 / 2012-10-09 * [Fix] inotify: fixes from https://codereview.appspot.com/5418045/ (ugorji) * [Fix] kqueue: preserve watch flags when watching for delete [#21][] (reported by @robfig) * [Fix] kqueue: watch the directory even if it isn't a new watch (thanks @robfig) * [Fix] kqueue: modify after recreation of file -## [0.7.3] - 2012-09-27 +## v0.7.3 / 2012-09-27 * [Fix] kqueue: watch with an existing folder inside the watched folder (thanks @vmirage) * [Fix] kqueue: no longer get duplicate CREATE events -## [0.7.2] - 2012-09-01 +## v0.7.2 / 2012-09-01 * kqueue: events for created directories -## [0.7.1] - 2012-07-14 +## v0.7.1 / 2012-07-14 * [Fix] for renaming files -## [0.7.0] - 2012-07-02 +## v0.7.0 / 2012-07-02 * [Feature] FSNotify flags * [Fix] inotify: Added file name back to event path -## [0.6.0] - 2012-06-06 +## v0.6.0 / 2012-06-06 * kqueue: watch files after directory created (thanks @tmc) -## [0.5.1] - 2012-05-22 +## v0.5.1 / 2012-05-22 * [Fix] inotify: remove all watches before Close() -## [0.5.0] - 2012-05-03 +## v0.5.0 / 2012-05-03 * [API] kqueue: return errors during watch instead of sending over channel * kqueue: match symlink behavior on Linux @@ -295,22 +273,22 @@ kqueue: Fix logic for CREATE after REMOVE [#111](https://github.com/fsnotify/fsn * [Fix] kqueue: handle EINTR (reported by @robfig) * [Doc] Godoc example [#1][] (thanks @davecheney) -## [0.4.0] - 2012-03-30 +## v0.4.0 / 2012-03-30 * Go 1 released: build with go tool * [Feature] Windows support using winfsnotify * Windows does not have attribute change notifications * Roll attribute notifications into IsModify -## [0.3.0] - 2012-02-19 +## v0.3.0 / 2012-02-19 * kqueue: add files when watch directory -## [0.2.0] - 2011-12-30 +## v0.2.0 / 2011-12-30 * update to latest Go weekly code -## [0.1.0] - 2011-10-19 +## v0.1.0 / 2011-10-19 * kqueue: add watch on file creation to match inotify * kqueue: create file event diff --git a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/README.md b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/README.md index df57b1b282c6..b2629e5229ca 100644 --- a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/README.md +++ b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/README.md @@ -12,9 +12,9 @@ Cross platform: Windows, Linux, BSD and macOS. | Adapter | OS | Status | | --------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -| inotify | Linux 2.6.27 or later, Android\* | Supported | -| kqueue | BSD, macOS, iOS\* | Supported | -| ReadDirectoryChangesW | Windows | Supported | +| inotify | Linux 2.6.27 or later, Android\* | Supported [![Build Status](https://travis-ci.org/fsnotify/fsnotify.svg?branch=master)](https://travis-ci.org/fsnotify/fsnotify) | +| kqueue | BSD, macOS, iOS\* | Supported [![Build Status](https://travis-ci.org/fsnotify/fsnotify.svg?branch=master)](https://travis-ci.org/fsnotify/fsnotify) | +| ReadDirectoryChangesW | Windows | Supported [![Build Status](https://travis-ci.org/fsnotify/fsnotify.svg?branch=master)](https://travis-ci.org/fsnotify/fsnotify) | | FSEvents | macOS | [Planned](https://github.com/fsnotify/fsnotify/issues/11) | | FEN | Solaris 11 | [In Progress](https://github.com/fsnotify/fsnotify/issues/12) | | fanotify | Linux 2.6.37+ | [Planned](https://github.com/fsnotify/fsnotify/issues/114) | diff --git a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/fen.go b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/fen.go index b3ac3d8f55fa..ced39cb881e6 100644 --- a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/fen.go +++ b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/fen.go @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build solaris // +build solaris package fsnotify diff --git a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/fsnotify.go b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/fsnotify.go index 0f4ee52e8aa2..89cab046d124 100644 --- a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/fsnotify.go +++ b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/fsnotify.go @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build !plan9 // +build !plan9 // Package fsnotify provides a platform-independent interface for file system notifications. diff --git a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/go.mod b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/go.mod index 54089e48b7bd..ff11e13f2240 100644 --- a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/go.mod +++ b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/go.mod @@ -2,6 +2,4 @@ module github.com/fsnotify/fsnotify go 1.13 -require golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c - -retract v1.5.0 +require golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9 diff --git a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/go.sum b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/go.sum index 0f478630ca06..f60af9855da7 100644 --- a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/go.sum +++ b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/go.sum @@ -1,2 +1,2 @@ -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9 h1:L2auWcuQIvxz9xSEqzESnV/QN/gNRXNApHi3fYwl2w0= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/inotify.go b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/inotify.go index eb87699b5b4c..d9fd1b88a05f 100644 --- a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/inotify.go +++ b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/inotify.go @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build linux // +build linux package fsnotify @@ -273,7 +272,7 @@ func (w *Watcher) readEvents() { if nameLen > 0 { // Point "bytes" at the first byte of the filename - bytes := (*[unix.PathMax]byte)(unsafe.Pointer(&buf[offset+unix.SizeofInotifyEvent]))[:nameLen:nameLen] + bytes := (*[unix.PathMax]byte)(unsafe.Pointer(&buf[offset+unix.SizeofInotifyEvent])) // The filename is padded with NULL bytes. TrimRight() gets rid of those. name += "/" + strings.TrimRight(string(bytes[0:nameLen]), "\000") } diff --git a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/inotify_poller.go b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/inotify_poller.go index e9ff9439f7f0..b33f2b4d4b79 100644 --- a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/inotify_poller.go +++ b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/inotify_poller.go @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build linux // +build linux package fsnotify diff --git a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/kqueue.go b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/kqueue.go index 368f5b790d4d..86e76a3d6768 100644 --- a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/kqueue.go +++ b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/kqueue.go @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build freebsd || openbsd || netbsd || dragonfly || darwin // +build freebsd openbsd netbsd dragonfly darwin package fsnotify diff --git a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go index 36cc3845b6e7..2306c4620bf6 100644 --- a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go +++ b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build freebsd || openbsd || netbsd || dragonfly // +build freebsd openbsd netbsd dragonfly package fsnotify diff --git a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go index 98cd8476ffb8..870c4d6d1845 100644 --- a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go +++ b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build darwin // +build darwin package fsnotify diff --git a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/windows.go b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/windows.go index c02b75f7c374..09436f31d821 100644 --- a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/windows.go +++ b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/windows.go @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build windows // +build windows package fsnotify diff --git a/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/README.md b/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/README.markdown similarity index 81% rename from cluster-autoscaler/vendor/github.com/godbus/dbus/v5/README.md rename to cluster-autoscaler/vendor/github.com/godbus/dbus/v5/README.markdown index 5c24125838d2..1fb2eacaa15a 100644 --- a/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/README.md +++ b/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/README.markdown @@ -14,12 +14,14 @@ D-Bus message bus system. ### Installation -This packages requires Go 1.12 or later. It can be installed by running the command below: +This packages requires Go 1.7. If you installed it and set up your GOPATH, just run: ``` -go get github.com/godbus/dbus/v5 +go get github.com/godbus/dbus ``` +If you want to use the subpackages, you can install them the same way. + ### Usage The complete package documentation and some simple examples are available at @@ -28,12 +30,10 @@ The complete package documentation and some simple examples are available at gives a short overview over the basic usage. #### Projects using godbus -- [fyne](https://github.com/fyne-io/fyne) a cross platform GUI in Go inspired by Material Design. -- [fynedesk](https://github.com/fyne-io/fynedesk) a full desktop environment for Linux/Unix using Fyne. -- [go-bluetooth](https://github.com/muka/go-bluetooth) provides a bluetooth client over bluez dbus API. -- [iwd](https://github.com/shibumi/iwd) go bindings for the internet wireless daemon "iwd". - [notify](https://github.com/esiqveland/notify) provides desktop notifications over dbus into a library. +- [go-bluetooth](https://github.com/muka/go-bluetooth) provides a bluetooth client over bluez dbus API. - [playerbm](https://github.com/altdesktop/playerbm) a bookmark utility for media players. +- [iwd](https://github.com/shibumi/iwd) go bindings for the internet wireless daemon "iwd". Please note that the API is considered unstable for now and may change without further notice. diff --git a/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/auth.go b/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/auth.go index a59b4c0eb765..283487a0e313 100644 --- a/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/auth.go +++ b/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/auth.go @@ -53,7 +53,7 @@ type Auth interface { // bus. Auth must not be called on shared connections. func (conn *Conn) Auth(methods []Auth) error { if methods == nil { - uid := strconv.Itoa(os.Geteuid()) + uid := strconv.Itoa(os.Getuid()) methods = []Auth{AuthExternal(uid), AuthCookieSha1(uid, getHomeDir())} } in := bufio.NewReader(conn.transport) @@ -75,9 +75,9 @@ func (conn *Conn) Auth(methods []Auth) error { s = s[1:] for _, v := range s { for _, m := range methods { - if name, _, status := m.FirstData(); bytes.Equal(v, name) { + if name, data, status := m.FirstData(); bytes.Equal(v, name) { var ok bool - err = authWriteLine(conn.transport, []byte("AUTH"), v) + err = authWriteLine(conn.transport, []byte("AUTH"), v, data) if err != nil { return err } @@ -194,14 +194,11 @@ func (conn *Conn) tryAuth(m Auth, state authState, in *bufio.Reader) (error, boo } conn.uuid = string(s[1]) return nil, true - case state == waitingForOk && string(s[0]) == "DATA": - err = authWriteLine(conn.transport, []byte("DATA")) - if err != nil { - return err, false - } case state == waitingForOk && string(s[0]) == "REJECTED": return nil, false - case state == waitingForOk && string(s[0]) == "ERROR": + case state == waitingForOk && (string(s[0]) == "DATA" || + string(s[0]) == "ERROR"): + err = authWriteLine(conn.transport, []byte("CANCEL")) if err != nil { return err, false diff --git a/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/conn.go b/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/conn.go index 76fc5cde3d26..29fe018ad823 100644 --- a/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/conn.go +++ b/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/conn.go @@ -73,7 +73,7 @@ func SessionBus() (conn *Conn, err error) { return } -func getSessionBusAddress(autolaunch bool) (string, error) { +func getSessionBusAddress() (string, error) { if address := os.Getenv("DBUS_SESSION_BUS_ADDRESS"); address != "" && address != "autolaunch:" { return address, nil @@ -81,26 +81,12 @@ func getSessionBusAddress(autolaunch bool) (string, error) { os.Setenv("DBUS_SESSION_BUS_ADDRESS", address) return address, nil } - if !autolaunch { - return "", errors.New("dbus: couldn't determine address of session bus") - } return getSessionBusPlatformAddress() } // SessionBusPrivate returns a new private connection to the session bus. func SessionBusPrivate(opts ...ConnOption) (*Conn, error) { - address, err := getSessionBusAddress(true) - if err != nil { - return nil, err - } - - return Dial(address, opts...) -} - -// SessionBusPrivate returns a new private connection to the session bus. If -// the session bus is not already open, do not attempt to launch it. -func SessionBusPrivateNoAutoStartup(opts ...ConnOption) (*Conn, error) { - address, err := getSessionBusAddress(false) + address, err := getSessionBusAddress() if err != nil { return nil, err } @@ -135,7 +121,7 @@ func SystemBus() (conn *Conn, err error) { // ConnectSessionBus connects to the session bus. func ConnectSessionBus(opts ...ConnOption) (*Conn, error) { - address, err := getSessionBusAddress(true) + address, err := getSessionBusAddress() if err != nil { return nil, err } @@ -194,7 +180,7 @@ func Dial(address string, opts ...ConnOption) (*Conn, error) { // // Deprecated: use Dial with options instead. func DialHandler(address string, handler Handler, signalHandler SignalHandler) (*Conn, error) { - return Dial(address, WithHandler(handler), WithSignalHandler(signalHandler)) + return Dial(address, WithSignalHandler(signalHandler)) } // ConnOption is a connection option. @@ -492,24 +478,14 @@ func (conn *Conn) sendMessageAndIfClosed(msg *Message, ifClosed func()) { conn.outInt(msg) } err := conn.outHandler.sendAndIfClosed(msg, ifClosed) + conn.calls.handleSendError(msg, err) if err != nil { - conn.handleSendError(msg, err) + conn.serialGen.RetireSerial(msg.serial) } else if msg.Type != TypeMethodCall { conn.serialGen.RetireSerial(msg.serial) } } -func (conn *Conn) handleSendError(msg *Message, err error) { - if msg.Type == TypeMethodCall { - conn.calls.handleSendError(msg, err) - } else if msg.Type == TypeMethodReply { - if _, ok := err.(FormatError); ok { - conn.sendError(err, msg.Headers[FieldDestination].value.(string), msg.Headers[FieldReplySerial].value.(uint32)) - } - } - conn.serialGen.RetireSerial(msg.serial) -} - // Send sends the given message to the message bus. You usually don't need to // use this; use the higher-level equivalents (Call / Go, Emit and Export) // instead. If msg is a method call and NoReplyExpected is not set, a non-nil diff --git a/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/decoder.go b/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/decoder.go index 89bfed9d1a1c..ede91575b3e8 100644 --- a/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/decoder.go +++ b/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/decoder.go @@ -10,16 +10,14 @@ type decoder struct { in io.Reader order binary.ByteOrder pos int - fds []int } // newDecoder returns a new decoder that reads values from in. The input is // expected to be in the given byte order. -func newDecoder(in io.Reader, order binary.ByteOrder, fds []int) *decoder { +func newDecoder(in io.Reader, order binary.ByteOrder) *decoder { dec := new(decoder) dec.in = in dec.order = order - dec.fds = fds return dec } @@ -55,7 +53,7 @@ func (dec *decoder) Decode(sig Signature) (vs []interface{}, err error) { vs = make([]interface{}, 0) s := sig.str for s != "" { - err, rem := validSingle(s, &depthCounter{}) + err, rem := validSingle(s, 0) if err != nil { return nil, err } @@ -152,7 +150,7 @@ func (dec *decoder) decode(s string, depth int) interface{} { if len(sig.str) == 0 { panic(FormatError("variant signature is empty")) } - err, rem := validSingle(sig.str, &depthCounter{}) + err, rem := validSingle(sig.str, 0) if err != nil { panic(err) } @@ -163,11 +161,7 @@ func (dec *decoder) decode(s string, depth int) interface{} { variant.value = dec.decode(sig.str, depth+1) return variant case 'h': - idx := dec.decode("u", depth).(uint32) - if int(idx) < len(dec.fds) { - return UnixFD(dec.fds[idx]) - } - return UnixFDIndex(idx) + return UnixFDIndex(dec.decode("u", depth).(uint32)) case 'a': if len(s) > 1 && s[1] == '{' { ksig := s[2:3] @@ -225,7 +219,7 @@ func (dec *decoder) decode(s string, depth int) interface{} { v := make([]interface{}, 0) s = s[1 : len(s)-1] for s != "" { - err, rem := validSingle(s, &depthCounter{}) + err, rem := validSingle(s, 0) if err != nil { panic(err) } diff --git a/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/encoder.go b/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/encoder.go index 015b26cd5c49..adfbb75c5595 100644 --- a/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/encoder.go +++ b/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/encoder.go @@ -5,33 +5,28 @@ import ( "encoding/binary" "io" "reflect" - "strings" - "unicode/utf8" ) // An encoder encodes values to the D-Bus wire format. type encoder struct { out io.Writer - fds []int order binary.ByteOrder pos int } // NewEncoder returns a new encoder that writes to out in the given byte order. -func newEncoder(out io.Writer, order binary.ByteOrder, fds []int) *encoder { - enc := newEncoderAtOffset(out, 0, order, fds) - return enc +func newEncoder(out io.Writer, order binary.ByteOrder) *encoder { + return newEncoderAtOffset(out, 0, order) } // newEncoderAtOffset returns a new encoder that writes to out in the given // byte order. Specify the offset to initialize pos for proper alignment // computation. -func newEncoderAtOffset(out io.Writer, offset int, order binary.ByteOrder, fds []int) *encoder { +func newEncoderAtOffset(out io.Writer, offset int, order binary.ByteOrder) *encoder { enc := new(encoder) enc.out = out enc.order = order enc.pos = offset - enc.fds = fds return enc } @@ -80,9 +75,6 @@ func (enc *encoder) Encode(vs ...interface{}) (err error) { // encode encodes the given value to the writer and panics on error. depth holds // the depth of the container nesting. func (enc *encoder) encode(v reflect.Value, depth int) { - if depth > 64 { - panic(FormatError("input exceeds depth limitation")) - } enc.align(alignment(v.Type())) switch v.Kind() { case reflect.Uint8: @@ -105,14 +97,7 @@ func (enc *encoder) encode(v reflect.Value, depth int) { enc.binwrite(uint16(v.Uint())) enc.pos += 2 case reflect.Int, reflect.Int32: - if v.Type() == unixFDType { - fd := v.Int() - idx := len(enc.fds) - enc.fds = append(enc.fds, int(fd)) - enc.binwrite(uint32(idx)) - } else { - enc.binwrite(int32(v.Int())) - } + enc.binwrite(int32(v.Int())) enc.pos += 4 case reflect.Uint, reflect.Uint32: enc.binwrite(uint32(v.Uint())) @@ -127,21 +112,9 @@ func (enc *encoder) encode(v reflect.Value, depth int) { enc.binwrite(v.Float()) enc.pos += 8 case reflect.String: - str := v.String() - if !utf8.ValidString(str) { - panic(FormatError("input has a not-utf8 char in string")) - } - if strings.IndexByte(str, byte(0)) != -1 { - panic(FormatError("input has a null char('\\000') in string")) - } - if v.Type() == objectPathType { - if !ObjectPath(str).IsValid() { - panic(FormatError("invalid object path")) - } - } - enc.encode(reflect.ValueOf(uint32(len(str))), depth) + enc.encode(reflect.ValueOf(uint32(len(v.String()))), depth) b := make([]byte, v.Len()+1) - copy(b, str) + copy(b, v.String()) b[len(b)-1] = 0 n, err := enc.out.Write(b) if err != nil { @@ -151,23 +124,20 @@ func (enc *encoder) encode(v reflect.Value, depth int) { case reflect.Ptr: enc.encode(v.Elem(), depth) case reflect.Slice, reflect.Array: + if depth >= 64 { + panic(FormatError("input exceeds container depth limit")) + } // Lookahead offset: 4 bytes for uint32 length (with alignment), // plus alignment for elements. n := enc.padding(0, 4) + 4 offset := enc.pos + n + enc.padding(n, alignment(v.Type().Elem())) var buf bytes.Buffer - bufenc := newEncoderAtOffset(&buf, offset, enc.order, enc.fds) + bufenc := newEncoderAtOffset(&buf, offset, enc.order) for i := 0; i < v.Len(); i++ { bufenc.encode(v.Index(i), depth+1) } - - if buf.Len() > 1<<26 { - panic(FormatError("input exceeds array size limitation")) - } - - enc.fds = bufenc.fds enc.encode(reflect.ValueOf(uint32(buf.Len())), depth) length := buf.Len() enc.align(alignment(v.Type().Elem())) @@ -176,10 +146,13 @@ func (enc *encoder) encode(v reflect.Value, depth int) { } enc.pos += length case reflect.Struct: + if depth >= 64 && v.Type() != signatureType { + panic(FormatError("input exceeds container depth limit")) + } switch t := v.Type(); t { case signatureType: str := v.Field(0) - enc.encode(reflect.ValueOf(byte(str.Len())), depth) + enc.encode(reflect.ValueOf(byte(str.Len())), depth+1) b := make([]byte, str.Len()+1) copy(b, str.String()) b[len(b)-1] = 0 @@ -203,6 +176,9 @@ func (enc *encoder) encode(v reflect.Value, depth int) { case reflect.Map: // Maps are arrays of structures, so they actually increase the depth by // 2. + if depth >= 63 { + panic(FormatError("input exceeds container depth limit")) + } if !isKeyType(v.Type().Key()) { panic(InvalidTypeError{v.Type()}) } @@ -213,13 +189,12 @@ func (enc *encoder) encode(v reflect.Value, depth int) { offset := enc.pos + n + enc.padding(n, 8) var buf bytes.Buffer - bufenc := newEncoderAtOffset(&buf, offset, enc.order, enc.fds) + bufenc := newEncoderAtOffset(&buf, offset, enc.order) for _, k := range keys { bufenc.align(8) bufenc.encode(k, depth+2) bufenc.encode(v.MapIndex(k), depth+2) } - enc.fds = bufenc.fds enc.encode(reflect.ValueOf(uint32(buf.Len())), depth) length := buf.Len() enc.align(8) diff --git a/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/export.go b/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/export.go index 522334715b60..2447b51d469d 100644 --- a/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/export.go +++ b/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/export.go @@ -26,27 +26,6 @@ var ( } ) -func MakeNoObjectError(path ObjectPath) Error { - return Error{ - "org.freedesktop.DBus.Error.NoSuchObject", - []interface{}{fmt.Sprintf("No such object '%s'", string(path))}, - } -} - -func MakeUnknownMethodError(methodName string) Error { - return Error{ - "org.freedesktop.DBus.Error.UnknownMethod", - []interface{}{fmt.Sprintf("Unknown / invalid method '%s'", methodName)}, - } -} - -func MakeUnknownInterfaceError(ifaceName string) Error { - return Error{ - "org.freedesktop.DBus.Error.UnknownInterface", - []interface{}{fmt.Sprintf("Object does not implement the interface '%s'", ifaceName)}, - } -} - func MakeFailedError(err error) *Error { return &Error{ "org.freedesktop.DBus.Error.Failed", @@ -149,11 +128,6 @@ func (conn *Conn) handleCall(msg *Message) { ifaceName, _ := msg.Headers[FieldInterface].value.(string) sender, hasSender := msg.Headers[FieldSender].value.(string) serial := msg.serial - - if len(name) == 0 { - conn.sendError(ErrMsgUnknownMethod, sender, serial) - } - if ifaceName == "org.freedesktop.DBus.Peer" { switch name { case "Ping": @@ -161,26 +135,29 @@ func (conn *Conn) handleCall(msg *Message) { case "GetMachineId": conn.sendReply(sender, serial, conn.uuid) default: - conn.sendError(MakeUnknownMethodError(name), sender, serial) + conn.sendError(ErrMsgUnknownMethod, sender, serial) } return } + if len(name) == 0 { + conn.sendError(ErrMsgUnknownMethod, sender, serial) + } object, ok := conn.handler.LookupObject(path) if !ok { - conn.sendError(MakeNoObjectError(path), sender, serial) + conn.sendError(ErrMsgNoObject, sender, serial) return } iface, exists := object.LookupInterface(ifaceName) if !exists { - conn.sendError(MakeUnknownInterfaceError(ifaceName), sender, serial) + conn.sendError(ErrMsgUnknownInterface, sender, serial) return } m, exists := iface.LookupMethod(name) if !exists { - conn.sendError(MakeUnknownMethodError(name), sender, serial) + conn.sendError(ErrMsgUnknownMethod, sender, serial) return } args, err := conn.decodeArguments(m, sender, msg) diff --git a/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/message.go b/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/message.go index 16693eb3017e..6a925367ebe9 100644 --- a/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/message.go +++ b/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/message.go @@ -118,7 +118,11 @@ type header struct { Variant } -func DecodeMessageWithFDs(rd io.Reader, fds []int) (msg *Message, err error) { +// DecodeMessage tries to decode a single message in the D-Bus wire format +// from the given reader. The byte order is figured out from the first byte. +// The possibly returned error can be an error of the underlying reader, an +// InvalidMessageError or a FormatError. +func DecodeMessage(rd io.Reader) (msg *Message, err error) { var order binary.ByteOrder var hlength, length uint32 var typ, flags, proto byte @@ -138,7 +142,7 @@ func DecodeMessageWithFDs(rd io.Reader, fds []int) (msg *Message, err error) { return nil, InvalidMessageError("invalid byte order") } - dec := newDecoder(rd, order, fds) + dec := newDecoder(rd, order) dec.pos = 1 msg = new(Message) @@ -162,7 +166,7 @@ func DecodeMessageWithFDs(rd io.Reader, fds []int) (msg *Message, err error) { if hlength+length+16 > 1<<27 { return nil, InvalidMessageError("message is too long") } - dec = newDecoder(io.MultiReader(bytes.NewBuffer(b), rd), order, fds) + dec = newDecoder(io.MultiReader(bytes.NewBuffer(b), rd), order) dec.pos = 12 vs, err = dec.Decode(Signature{"a(yv)"}) if err != nil { @@ -192,7 +196,7 @@ func DecodeMessageWithFDs(rd io.Reader, fds []int) (msg *Message, err error) { sig, _ := msg.Headers[FieldSignature].value.(Signature) if sig.str != "" { buf := bytes.NewBuffer(body) - dec = newDecoder(buf, order, fds) + dec = newDecoder(buf, order) vs, err := dec.Decode(sig) if err != nil { return nil, err @@ -203,32 +207,12 @@ func DecodeMessageWithFDs(rd io.Reader, fds []int) (msg *Message, err error) { return } -// DecodeMessage tries to decode a single message in the D-Bus wire format -// from the given reader. The byte order is figured out from the first byte. -// The possibly returned error can be an error of the underlying reader, an -// InvalidMessageError or a FormatError. -func DecodeMessage(rd io.Reader) (msg *Message, err error) { - return DecodeMessageWithFDs(rd, make([]int, 0)); -} - -type nullwriter struct{} - -func (nullwriter) Write(p []byte) (cnt int, err error) { - return len(p), nil -} - -func (msg *Message) CountFds() (int, error) { - if len(msg.Body) == 0 { - return 0, nil - } - enc := newEncoder(nullwriter{}, nativeEndian, make([]int, 0)) - err := enc.Encode(msg.Body...) - return len(enc.fds), err -} - -func (msg *Message) EncodeToWithFDs(out io.Writer, order binary.ByteOrder) (fds []int, err error) { +// EncodeTo encodes and sends a message to the given writer. The byte order must +// be either binary.LittleEndian or binary.BigEndian. If the message is not +// valid or an error occurs when writing, an error is returned. +func (msg *Message) EncodeTo(out io.Writer, order binary.ByteOrder) error { if err := msg.IsValid(); err != nil { - return make([]int, 0), err + return err } var vs [7]interface{} switch order { @@ -237,16 +221,12 @@ func (msg *Message) EncodeToWithFDs(out io.Writer, order binary.ByteOrder) (fds case binary.BigEndian: vs[0] = byte('B') default: - return make([]int, 0), errors.New("dbus: invalid byte order") + return errors.New("dbus: invalid byte order") } body := new(bytes.Buffer) - fds = make([]int, 0) - enc := newEncoder(body, order, fds) + enc := newEncoder(body, order) if len(msg.Body) != 0 { - err = enc.Encode(msg.Body...) - if err != nil { - return - } + enc.Encode(msg.Body...) } vs[1] = msg.Type vs[2] = msg.Flags @@ -259,28 +239,17 @@ func (msg *Message) EncodeToWithFDs(out io.Writer, order binary.ByteOrder) (fds } vs[6] = headers var buf bytes.Buffer - enc = newEncoder(&buf, order, enc.fds) - err = enc.Encode(vs[:]...) - if err != nil { - return - } + enc = newEncoder(&buf, order) + enc.Encode(vs[:]...) enc.align(8) body.WriteTo(&buf) if buf.Len() > 1<<27 { - return make([]int, 0), InvalidMessageError("message is too long") + return InvalidMessageError("message is too long") } if _, err := buf.WriteTo(out); err != nil { - return make([]int, 0), err + return err } - return enc.fds, nil -} - -// EncodeTo encodes and sends a message to the given writer. The byte order must -// be either binary.LittleEndian or binary.BigEndian. If the message is not -// valid or an error occurs when writing, an error is returned. -func (msg *Message) EncodeTo(out io.Writer, order binary.ByteOrder) (err error) { - _, err = msg.EncodeToWithFDs(out, order) - return err + return nil } // IsValid checks whether msg is a valid message and returns an diff --git a/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/sig.go b/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/sig.go index 41a0398129d2..2d326cebc0d8 100644 --- a/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/sig.go +++ b/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/sig.go @@ -34,7 +34,7 @@ type Signature struct { func SignatureOf(vs ...interface{}) Signature { var s string for _, v := range vs { - s += getSignature(reflect.TypeOf(v), &depthCounter{}) + s += getSignature(reflect.TypeOf(v)) } return Signature{s} } @@ -42,19 +42,11 @@ func SignatureOf(vs ...interface{}) Signature { // SignatureOfType returns the signature of the given type. It panics if the // type is not representable in D-Bus. func SignatureOfType(t reflect.Type) Signature { - return Signature{getSignature(t, &depthCounter{})} + return Signature{getSignature(t)} } // getSignature returns the signature of the given type and panics on unknown types. -func getSignature(t reflect.Type, depth *depthCounter) (sig string) { - if !depth.Valid() { - panic("container nesting too deep") - } - defer func() { - if len(sig) > 255 { - panic("signature exceeds the length limitation") - } - }() +func getSignature(t reflect.Type) string { // handle simple types first switch t.Kind() { case reflect.Uint8: @@ -82,7 +74,7 @@ func getSignature(t reflect.Type, depth *depthCounter) (sig string) { case reflect.Float64: return "d" case reflect.Ptr: - return getSignature(t.Elem(), depth) + return getSignature(t.Elem()) case reflect.String: if t == objectPathType { return "o" @@ -98,20 +90,17 @@ func getSignature(t reflect.Type, depth *depthCounter) (sig string) { for i := 0; i < t.NumField(); i++ { field := t.Field(i) if field.PkgPath == "" && field.Tag.Get("dbus") != "-" { - s += getSignature(t.Field(i).Type, depth.EnterStruct()) + s += getSignature(t.Field(i).Type) } } - if len(s) == 0 { - panic("empty struct") - } return "(" + s + ")" case reflect.Array, reflect.Slice: - return "a" + getSignature(t.Elem(), depth.EnterArray()) + return "a" + getSignature(t.Elem()) case reflect.Map: if !isKeyType(t.Key()) { panic(InvalidTypeError{t}) } - return "a{" + getSignature(t.Key(), depth.EnterArray().EnterDictEntry()) + getSignature(t.Elem(), depth.EnterArray().EnterDictEntry()) + "}" + return "a{" + getSignature(t.Key()) + getSignature(t.Elem()) + "}" case reflect.Interface: return "v" } @@ -129,7 +118,7 @@ func ParseSignature(s string) (sig Signature, err error) { } sig.str = s for err == nil && len(s) != 0 { - err, s = validSingle(s, &depthCounter{}) + err, s = validSingle(s, 0) } if err != nil { sig = Signature{""} @@ -155,7 +144,7 @@ func (s Signature) Empty() bool { // Single returns whether the signature represents a single, complete type. func (s Signature) Single() bool { - err, r := validSingle(s.str, &depthCounter{}) + err, r := validSingle(s.str, 0) return err != nil && r == "" } @@ -175,38 +164,15 @@ func (e SignatureError) Error() string { return fmt.Sprintf("dbus: invalid signature: %q (%s)", e.Sig, e.Reason) } -type depthCounter struct { - arrayDepth, structDepth, dictEntryDepth int -} - -func (cnt *depthCounter) Valid() bool { - return cnt.arrayDepth <= 32 && cnt.structDepth <= 32 && cnt.dictEntryDepth <= 32 -} - -func (cnt depthCounter) EnterArray() *depthCounter { - cnt.arrayDepth++ - return &cnt -} - -func (cnt depthCounter) EnterStruct() *depthCounter { - cnt.structDepth++ - return &cnt -} - -func (cnt depthCounter) EnterDictEntry() *depthCounter { - cnt.dictEntryDepth++ - return &cnt -} - // Try to read a single type from this string. If it was successful, err is nil // and rem is the remaining unparsed part. Otherwise, err is a non-nil // SignatureError and rem is "". depth is the current recursion depth which may // not be greater than 64 and should be given as 0 on the first call. -func validSingle(s string, depth *depthCounter) (err error, rem string) { +func validSingle(s string, depth int) (err error, rem string) { if s == "" { return SignatureError{Sig: s, Reason: "empty signature"}, "" } - if !depth.Valid() { + if depth > 64 { return SignatureError{Sig: s, Reason: "container nesting too deep"}, "" } switch s[0] { @@ -221,10 +187,10 @@ func validSingle(s string, depth *depthCounter) (err error, rem string) { i++ rem = s[i+1:] s = s[2:i] - if err, _ = validSingle(s[:1], depth.EnterArray().EnterDictEntry()); err != nil { + if err, _ = validSingle(s[:1], depth+1); err != nil { return err, "" } - err, nr := validSingle(s[1:], depth.EnterArray().EnterDictEntry()) + err, nr := validSingle(s[1:], depth+1) if err != nil { return err, "" } @@ -233,7 +199,7 @@ func validSingle(s string, depth *depthCounter) (err error, rem string) { } return nil, rem } - return validSingle(s[1:], depth.EnterArray()) + return validSingle(s[1:], depth+1) case '(': i := findMatching(s, '(', ')') if i == -1 { @@ -242,7 +208,7 @@ func validSingle(s string, depth *depthCounter) (err error, rem string) { rem = s[i+1:] s = s[1:i] for err == nil && s != "" { - err, s = validSingle(s, depth.EnterStruct()) + err, s = validSingle(s, depth+1) } if err != nil { rem = "" @@ -270,7 +236,7 @@ func findMatching(s string, left, right rune) int { // typeFor returns the type of the given signature. It ignores any left over // characters and panics if s doesn't start with a valid type signature. func typeFor(s string) (t reflect.Type) { - err, _ := validSingle(s, &depthCounter{}) + err, _ := validSingle(s, 0) if err != nil { panic(err) } diff --git a/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/transport_generic.go b/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/transport_generic.go index a08e2813ca53..718a1ff0219a 100644 --- a/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/transport_generic.go +++ b/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/transport_generic.go @@ -41,12 +41,10 @@ func (t genericTransport) ReadMessage() (*Message, error) { } func (t genericTransport) SendMessage(msg *Message) error { - fds, err := msg.CountFds() - if err != nil { - return err - } - if fds != 0 { - return errors.New("dbus: unix fd passing not enabled") + for _, v := range msg.Body { + if _, ok := v.(UnixFD); ok { + return errors.New("dbus: unix fd passing not enabled") + } } return msg.EncodeTo(t, nativeEndian) } diff --git a/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/transport_unix.go b/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/transport_unix.go index 2212e7fa7f2d..c7cd02f97fdf 100644 --- a/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/transport_unix.go +++ b/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/transport_unix.go @@ -113,7 +113,7 @@ func (t *unixTransport) ReadMessage() (*Message, error) { if _, err := io.ReadFull(t.rdr, headerdata[4:]); err != nil { return nil, err } - dec := newDecoder(bytes.NewBuffer(headerdata), order, make([]int, 0)) + dec := newDecoder(bytes.NewBuffer(headerdata), order) dec.pos = 12 vs, err := dec.Decode(Signature{"a(yv)"}) if err != nil { @@ -147,7 +147,7 @@ func (t *unixTransport) ReadMessage() (*Message, error) { if err != nil { return nil, err } - msg, err := DecodeMessageWithFDs(bytes.NewBuffer(all), fds) + msg, err := DecodeMessage(bytes.NewBuffer(all)) if err != nil { return nil, err } @@ -179,21 +179,21 @@ func (t *unixTransport) ReadMessage() (*Message, error) { } func (t *unixTransport) SendMessage(msg *Message) error { - fdcnt, err := msg.CountFds() - if err != nil { - return err + fds := make([]int, 0) + for i, v := range msg.Body { + if fd, ok := v.(UnixFD); ok { + msg.Body[i] = UnixFDIndex(len(fds)) + fds = append(fds, int(fd)) + } } - if fdcnt != 0 { + if len(fds) != 0 { if !t.hasUnixFDs { return errors.New("dbus: unix fd passing not enabled") } - msg.Headers[FieldUnixFDs] = MakeVariant(uint32(fdcnt)) - buf := new(bytes.Buffer) - fds, err := msg.EncodeToWithFDs(buf, nativeEndian) - if err != nil { - return err - } + msg.Headers[FieldUnixFDs] = MakeVariant(uint32(len(fds))) oob := syscall.UnixRights(fds...) + buf := new(bytes.Buffer) + msg.EncodeTo(buf, nativeEndian) n, oobn, err := t.UnixConn.WriteMsgUnix(buf.Bytes(), oob, nil) if err != nil { return err diff --git a/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/transport_unixcred_netbsd.go b/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/transport_unixcred_netbsd.go deleted file mode 100644 index af7bafdf953b..000000000000 --- a/cluster-autoscaler/vendor/github.com/godbus/dbus/v5/transport_unixcred_netbsd.go +++ /dev/null @@ -1,14 +0,0 @@ -package dbus - -import "io" - -func (t *unixTransport) SendNullByte() error { - n, _, err := t.UnixConn.WriteMsgUnix([]byte{0}, nil, nil) - if err != nil { - return err - } - if n != 1 { - return io.ErrShortWrite - } - return nil -} diff --git a/cluster-autoscaler/vendor/github.com/google/cadvisor/container/common/helpers.go b/cluster-autoscaler/vendor/github.com/google/cadvisor/container/common/helpers.go index 2b232f6ac555..03d055f93b9f 100644 --- a/cluster-autoscaler/vendor/github.com/google/cadvisor/container/common/helpers.go +++ b/cluster-autoscaler/vendor/github.com/google/cadvisor/container/common/helpers.go @@ -105,7 +105,7 @@ func getSpecInternal(cgroupPaths map[string]string, machineInfoFactory info.Mach } // CPU. - cpuRoot, ok := GetControllerPath(cgroupPaths, "cpu", cgroup2UnifiedMode) + cpuRoot, ok := getControllerPath(cgroupPaths, "cpu", cgroup2UnifiedMode) if ok { if utils.FileExists(cpuRoot) { if cgroup2UnifiedMode { @@ -152,7 +152,7 @@ func getSpecInternal(cgroupPaths map[string]string, machineInfoFactory info.Mach // Cpu Mask. // This will fail for non-unified hierarchies. We'll return the whole machine mask in that case. - cpusetRoot, ok := GetControllerPath(cgroupPaths, "cpuset", cgroup2UnifiedMode) + cpusetRoot, ok := getControllerPath(cgroupPaths, "cpuset", cgroup2UnifiedMode) if ok { if utils.FileExists(cpusetRoot) { spec.HasCpu = true @@ -167,7 +167,7 @@ func getSpecInternal(cgroupPaths map[string]string, machineInfoFactory info.Mach } // Memory - memoryRoot, ok := GetControllerPath(cgroupPaths, "memory", cgroup2UnifiedMode) + memoryRoot, ok := getControllerPath(cgroupPaths, "memory", cgroup2UnifiedMode) if ok { if cgroup2UnifiedMode { if utils.FileExists(path.Join(memoryRoot, "memory.max")) { @@ -195,7 +195,7 @@ func getSpecInternal(cgroupPaths map[string]string, machineInfoFactory info.Mach } // Processes, read it's value from pids path directly - pidsRoot, ok := GetControllerPath(cgroupPaths, "pids", cgroup2UnifiedMode) + pidsRoot, ok := getControllerPath(cgroupPaths, "pids", cgroup2UnifiedMode) if ok { if utils.FileExists(pidsRoot) { spec.HasProcesses = true @@ -217,7 +217,7 @@ func getSpecInternal(cgroupPaths map[string]string, machineInfoFactory info.Mach return spec, nil } -func GetControllerPath(cgroupPaths map[string]string, controllerName string, cgroup2UnifiedMode bool) (string, bool) { +func getControllerPath(cgroupPaths map[string]string, controllerName string, cgroup2UnifiedMode bool) (string, bool) { ok := false path := "" diff --git a/cluster-autoscaler/vendor/github.com/google/cadvisor/container/containerd/client.go b/cluster-autoscaler/vendor/github.com/google/cadvisor/container/containerd/client.go index c4921a5b7a5c..02fd8ce782d2 100644 --- a/cluster-autoscaler/vendor/github.com/google/cadvisor/container/containerd/client.go +++ b/cluster-autoscaler/vendor/github.com/google/cadvisor/container/containerd/client.go @@ -16,7 +16,6 @@ package containerd import ( "context" - "errors" "fmt" "net" "sync" @@ -25,7 +24,6 @@ import ( containersapi "github.com/containerd/containerd/api/services/containers/v1" tasksapi "github.com/containerd/containerd/api/services/tasks/v1" versionapi "github.com/containerd/containerd/api/services/version/v1" - tasktypes "github.com/containerd/containerd/api/types/task" ptypes "github.com/gogo/protobuf/types" "github.com/google/cadvisor/container/containerd/containers" "github.com/google/cadvisor/container/containerd/errdefs" @@ -46,10 +44,6 @@ type ContainerdClient interface { Version(ctx context.Context) (string, error) } -var ( - ErrTaskIsInUnknownState = errors.New("containerd task is in unknown state") // used when process reported in containerd task is in Unknown State -) - var once sync.Once var ctrdClient ContainerdClient = nil @@ -120,9 +114,6 @@ func (c *client) TaskPid(ctx context.Context, id string) (uint32, error) { if err != nil { return 0, errdefs.FromGRPC(err) } - if response.Process.Status == tasktypes.StatusUnknown { - return 0, ErrTaskIsInUnknownState - } return response.Process.Pid, nil } diff --git a/cluster-autoscaler/vendor/github.com/google/cadvisor/container/containerd/handler.go b/cluster-autoscaler/vendor/github.com/google/cadvisor/container/containerd/handler.go index 848550ec6ebe..0fc880354203 100644 --- a/cluster-autoscaler/vendor/github.com/google/cadvisor/container/containerd/handler.go +++ b/cluster-autoscaler/vendor/github.com/google/cadvisor/container/containerd/handler.go @@ -17,7 +17,6 @@ package containerd import ( "encoding/json" - "errors" "fmt" "strings" "time" @@ -102,14 +101,10 @@ func newContainerdContainerHandler( if err == nil { break } - - // Retry when task is not created yet or task is in unknown state (likely in process of initializing) - isRetriableError := errdefs.IsNotFound(err) || errors.Is(err, ErrTaskIsInUnknownState) - if !isRetriableError || retry == 0 { + retry-- + if !errdefs.IsNotFound(err) || retry == 0 { return nil, err } - - retry-- time.Sleep(backoff) backoff *= 2 } diff --git a/cluster-autoscaler/vendor/github.com/google/cadvisor/container/docker/client.go b/cluster-autoscaler/vendor/github.com/google/cadvisor/container/docker/client.go new file mode 100644 index 000000000000..295e647cd740 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/google/cadvisor/container/docker/client.go @@ -0,0 +1,61 @@ +// Copyright 2015 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Handler for /validate content. +// Validates cadvisor dependencies - kernel, os, docker setup. + +package docker + +import ( + "net/http" + "sync" + + dclient "github.com/docker/docker/client" + "github.com/docker/go-connections/tlsconfig" +) + +var ( + dockerClient *dclient.Client + dockerClientErr error + dockerClientOnce sync.Once +) + +// Client creates a Docker API client based on the given Docker flags +func Client() (*dclient.Client, error) { + dockerClientOnce.Do(func() { + var client *http.Client + if *ArgDockerTLS { + client = &http.Client{} + options := tlsconfig.Options{ + CAFile: *ArgDockerCA, + CertFile: *ArgDockerCert, + KeyFile: *ArgDockerKey, + InsecureSkipVerify: false, + } + tlsc, err := tlsconfig.Client(options) + if err != nil { + dockerClientErr = err + return + } + client.Transport = &http.Transport{ + TLSClientConfig: tlsc, + } + } + dockerClient, dockerClientErr = dclient.NewClientWithOpts( + dclient.WithHost(*ArgDockerEndpoint), + dclient.WithHTTPClient(client), + dclient.WithAPIVersionNegotiation()) + }) + return dockerClient, dockerClientErr +} diff --git a/cluster-autoscaler/vendor/github.com/google/cadvisor/container/docker/docker.go b/cluster-autoscaler/vendor/github.com/google/cadvisor/container/docker/docker.go new file mode 100644 index 000000000000..05934bf97059 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/google/cadvisor/container/docker/docker.go @@ -0,0 +1,200 @@ +// Copyright 2016 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Provides global docker information. +package docker + +import ( + "fmt" + "regexp" + "strconv" + + dockertypes "github.com/docker/docker/api/types" + "golang.org/x/net/context" + + "time" + + v1 "github.com/google/cadvisor/info/v1" + "github.com/google/cadvisor/machine" +) + +var dockerTimeout = 10 * time.Second + +func defaultContext() context.Context { + ctx, _ := context.WithTimeout(context.Background(), dockerTimeout) + return ctx +} + +func SetTimeout(timeout time.Duration) { + dockerTimeout = timeout +} + +func Status() (v1.DockerStatus, error) { + return StatusWithContext(defaultContext()) +} + +func StatusWithContext(ctx context.Context) (v1.DockerStatus, error) { + client, err := Client() + if err != nil { + return v1.DockerStatus{}, fmt.Errorf("unable to communicate with docker daemon: %v", err) + } + dockerInfo, err := client.Info(ctx) + if err != nil { + return v1.DockerStatus{}, err + } + return StatusFromDockerInfo(dockerInfo) +} + +func StatusFromDockerInfo(dockerInfo dockertypes.Info) (v1.DockerStatus, error) { + out := v1.DockerStatus{} + out.KernelVersion = machine.KernelVersion() + out.OS = dockerInfo.OperatingSystem + out.Hostname = dockerInfo.Name + out.RootDir = dockerInfo.DockerRootDir + out.Driver = dockerInfo.Driver + out.NumImages = dockerInfo.Images + out.NumContainers = dockerInfo.Containers + out.DriverStatus = make(map[string]string, len(dockerInfo.DriverStatus)) + for _, v := range dockerInfo.DriverStatus { + out.DriverStatus[v[0]] = v[1] + } + var err error + ver, err := VersionString() + if err != nil { + return out, err + } + out.Version = ver + ver, err = APIVersionString() + if err != nil { + return out, err + } + out.APIVersion = ver + return out, nil +} + +func Images() ([]v1.DockerImage, error) { + client, err := Client() + if err != nil { + return nil, fmt.Errorf("unable to communicate with docker daemon: %v", err) + } + images, err := client.ImageList(defaultContext(), dockertypes.ImageListOptions{All: false}) + if err != nil { + return nil, err + } + + out := []v1.DockerImage{} + const unknownTag = ":" + for _, image := range images { + if len(image.RepoTags) == 1 && image.RepoTags[0] == unknownTag { + // images with repo or tags are uninteresting. + continue + } + di := v1.DockerImage{ + ID: image.ID, + RepoTags: image.RepoTags, + Created: image.Created, + VirtualSize: image.VirtualSize, + Size: image.Size, + } + out = append(out, di) + } + return out, nil + +} + +// Checks whether the dockerInfo reflects a valid docker setup, and returns it if it does, or an +// error otherwise. +func ValidateInfo() (*dockertypes.Info, error) { + client, err := Client() + if err != nil { + return nil, fmt.Errorf("unable to communicate with docker daemon: %v", err) + } + + dockerInfo, err := client.Info(defaultContext()) + if err != nil { + return nil, fmt.Errorf("failed to detect Docker info: %v", err) + } + + // Fall back to version API if ServerVersion is not set in info. + if dockerInfo.ServerVersion == "" { + version, err := client.ServerVersion(defaultContext()) + if err != nil { + return nil, fmt.Errorf("unable to get docker version: %v", err) + } + dockerInfo.ServerVersion = version.Version + } + version, err := parseVersion(dockerInfo.ServerVersion, versionRe, 3) + if err != nil { + return nil, err + } + + if version[0] < 1 { + return nil, fmt.Errorf("cAdvisor requires docker version %v or above but we have found version %v reported as %q", []int{1, 0, 0}, version, dockerInfo.ServerVersion) + } + + if dockerInfo.Driver == "" { + return nil, fmt.Errorf("failed to find docker storage driver") + } + + return &dockerInfo, nil +} + +func APIVersion() ([]int, error) { + ver, err := APIVersionString() + if err != nil { + return nil, err + } + return parseVersion(ver, apiVersionRe, 2) +} + +func VersionString() (string, error) { + dockerVersion := "Unknown" + client, err := Client() + if err == nil { + version, err := client.ServerVersion(defaultContext()) + if err == nil { + dockerVersion = version.Version + } + } + return dockerVersion, err +} + +func APIVersionString() (string, error) { + apiVersion := "Unknown" + client, err := Client() + if err == nil { + version, err := client.ServerVersion(defaultContext()) + if err == nil { + apiVersion = version.APIVersion + } + } + return apiVersion, err +} + +func parseVersion(versionString string, regex *regexp.Regexp, length int) ([]int, error) { + matches := regex.FindAllStringSubmatch(versionString, -1) + if len(matches) != 1 { + return nil, fmt.Errorf("version string \"%v\" doesn't match expected regular expression: \"%v\"", versionString, regex.String()) + } + versionStringArray := matches[0][1:] + versionArray := make([]int, length) + for index, versionStr := range versionStringArray { + version, err := strconv.Atoi(versionStr) + if err != nil { + return nil, fmt.Errorf("error while parsing \"%v\" in \"%v\"", versionStr, versionString) + } + versionArray[index] = version + } + return versionArray, nil +} diff --git a/cluster-autoscaler/vendor/github.com/google/cadvisor/container/docker/factory.go b/cluster-autoscaler/vendor/github.com/google/cadvisor/container/docker/factory.go new file mode 100644 index 000000000000..287563dac4dd --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/google/cadvisor/container/docker/factory.go @@ -0,0 +1,396 @@ +// Copyright 2014 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package docker + +import ( + "flag" + "fmt" + "path" + "regexp" + "strconv" + "strings" + "sync" + "time" + + "github.com/blang/semver" + dockertypes "github.com/docker/docker/api/types" + + "github.com/google/cadvisor/container" + dockerutil "github.com/google/cadvisor/container/docker/utils" + "github.com/google/cadvisor/container/libcontainer" + "github.com/google/cadvisor/devicemapper" + "github.com/google/cadvisor/fs" + info "github.com/google/cadvisor/info/v1" + "github.com/google/cadvisor/machine" + "github.com/google/cadvisor/watcher" + "github.com/google/cadvisor/zfs" + + docker "github.com/docker/docker/client" + "golang.org/x/net/context" + "k8s.io/klog/v2" +) + +var ArgDockerEndpoint = flag.String("docker", "unix:///var/run/docker.sock", "docker endpoint") +var ArgDockerTLS = flag.Bool("docker-tls", false, "use TLS to connect to docker") +var ArgDockerCert = flag.String("docker-tls-cert", "cert.pem", "path to client certificate") +var ArgDockerKey = flag.String("docker-tls-key", "key.pem", "path to private key") +var ArgDockerCA = flag.String("docker-tls-ca", "ca.pem", "path to trusted CA") + +var dockerEnvMetadataWhiteList = flag.String("docker_env_metadata_whitelist", "", "DEPRECATED: this flag will be removed, please use `env_metadata_whitelist`. A comma-separated list of environment variable keys matched with specified prefix that needs to be collected for docker containers") + +// The namespace under which Docker aliases are unique. +const DockerNamespace = "docker" + +// The retry times for getting docker root dir +const rootDirRetries = 5 + +// The retry period for getting docker root dir, Millisecond +const rootDirRetryPeriod time.Duration = 1000 * time.Millisecond + +// Regexp that identifies docker cgroups, containers started with +// --cgroup-parent have another prefix than 'docker' +var dockerCgroupRegexp = regexp.MustCompile(`([a-z0-9]{64})`) + +var ( + // Basepath to all container specific information that libcontainer stores. + dockerRootDir string + + dockerRootDirFlag = flag.String("docker_root", "/var/lib/docker", "DEPRECATED: docker root is read from docker info (this is a fallback, default: /var/lib/docker)") + + dockerRootDirOnce sync.Once + + // flag that controls globally disabling thin_ls pending future enhancements. + // in production, it has been found that thin_ls makes excessive use of iops. + // in an iops restricted environment, usage of thin_ls must be controlled via blkio. + // pending that enhancement, disable its usage. + disableThinLs = true +) + +func RootDir() string { + dockerRootDirOnce.Do(func() { + for i := 0; i < rootDirRetries; i++ { + status, err := Status() + if err == nil && status.RootDir != "" { + dockerRootDir = status.RootDir + break + } else { + time.Sleep(rootDirRetryPeriod) + } + } + if dockerRootDir == "" { + dockerRootDir = *dockerRootDirFlag + } + }) + return dockerRootDir +} + +type storageDriver string + +const ( + devicemapperStorageDriver storageDriver = "devicemapper" + aufsStorageDriver storageDriver = "aufs" + overlayStorageDriver storageDriver = "overlay" + overlay2StorageDriver storageDriver = "overlay2" + zfsStorageDriver storageDriver = "zfs" + vfsStorageDriver storageDriver = "vfs" +) + +type dockerFactory struct { + machineInfoFactory info.MachineInfoFactory + + storageDriver storageDriver + storageDir string + + client *docker.Client + + // Information about the mounted cgroup subsystems. + cgroupSubsystems map[string]string + + // Information about mounted filesystems. + fsInfo fs.FsInfo + + dockerVersion []int + + dockerAPIVersion []int + + includedMetrics container.MetricSet + + thinPoolName string + thinPoolWatcher *devicemapper.ThinPoolWatcher + + zfsWatcher *zfs.ZfsWatcher +} + +func (f *dockerFactory) String() string { + return DockerNamespace +} + +func (f *dockerFactory) NewContainerHandler(name string, metadataEnvAllowList []string, inHostNamespace bool) (handler container.ContainerHandler, err error) { + client, err := Client() + if err != nil { + return + } + + dockerMetadataEnvAllowList := strings.Split(*dockerEnvMetadataWhiteList, ",") + + // prefer using the unified metadataEnvAllowList + if len(metadataEnvAllowList) != 0 { + dockerMetadataEnvAllowList = metadataEnvAllowList + } + + handler, err = newDockerContainerHandler( + client, + name, + f.machineInfoFactory, + f.fsInfo, + f.storageDriver, + f.storageDir, + f.cgroupSubsystems, + inHostNamespace, + dockerMetadataEnvAllowList, + f.dockerVersion, + f.includedMetrics, + f.thinPoolName, + f.thinPoolWatcher, + f.zfsWatcher, + ) + return +} + +// Returns the Docker ID from the full container name. +func ContainerNameToDockerId(name string) string { + id := path.Base(name) + + if matches := dockerCgroupRegexp.FindStringSubmatch(id); matches != nil { + return matches[1] + } + + return id +} + +// isContainerName returns true if the cgroup with associated name +// corresponds to a docker container. +func isContainerName(name string) bool { + // always ignore .mount cgroup even if associated with docker and delegate to systemd + if strings.HasSuffix(name, ".mount") { + return false + } + return dockerCgroupRegexp.MatchString(path.Base(name)) +} + +// Docker handles all containers under /docker +func (f *dockerFactory) CanHandleAndAccept(name string) (bool, bool, error) { + // if the container is not associated with docker, we can't handle it or accept it. + if !isContainerName(name) { + return false, false, nil + } + + // Check if the container is known to docker and it is active. + id := ContainerNameToDockerId(name) + + // We assume that if Inspect fails then the container is not known to docker. + ctnr, err := f.client.ContainerInspect(context.Background(), id) + if err != nil || !ctnr.State.Running { + return false, true, fmt.Errorf("error inspecting container: %v", err) + } + + return true, true, nil +} + +func (f *dockerFactory) DebugInfo() map[string][]string { + return map[string][]string{} +} + +var ( + versionRegexpString = `(\d+)\.(\d+)\.(\d+)` + versionRe = regexp.MustCompile(versionRegexpString) + apiVersionRegexpString = `(\d+)\.(\d+)` + apiVersionRe = regexp.MustCompile(apiVersionRegexpString) +) + +func startThinPoolWatcher(dockerInfo *dockertypes.Info) (*devicemapper.ThinPoolWatcher, error) { + _, err := devicemapper.ThinLsBinaryPresent() + if err != nil { + return nil, err + } + + if err := ensureThinLsKernelVersion(machine.KernelVersion()); err != nil { + return nil, err + } + + if disableThinLs { + return nil, fmt.Errorf("usage of thin_ls is disabled to preserve iops") + } + + dockerThinPoolName, err := dockerutil.DockerThinPoolName(*dockerInfo) + if err != nil { + return nil, err + } + + dockerMetadataDevice, err := dockerutil.DockerMetadataDevice(*dockerInfo) + if err != nil { + return nil, err + } + + thinPoolWatcher, err := devicemapper.NewThinPoolWatcher(dockerThinPoolName, dockerMetadataDevice) + if err != nil { + return nil, err + } + + go thinPoolWatcher.Start() + return thinPoolWatcher, nil +} + +func startZfsWatcher(dockerInfo *dockertypes.Info) (*zfs.ZfsWatcher, error) { + filesystem, err := dockerutil.DockerZfsFilesystem(*dockerInfo) + if err != nil { + return nil, err + } + + zfsWatcher, err := zfs.NewZfsWatcher(filesystem) + if err != nil { + return nil, err + } + + go zfsWatcher.Start() + return zfsWatcher, nil +} + +func ensureThinLsKernelVersion(kernelVersion string) error { + // kernel 4.4.0 has the proper bug fixes to allow thin_ls to work without corrupting the thin pool + minKernelVersion := semver.MustParse("4.4.0") + // RHEL 7 kernel 3.10.0 release >= 366 has the proper bug fixes backported from 4.4.0 to allow + // thin_ls to work without corrupting the thin pool + minRhel7KernelVersion := semver.MustParse("3.10.0") + + matches := versionRe.FindStringSubmatch(kernelVersion) + if len(matches) < 4 { + return fmt.Errorf("error parsing kernel version: %q is not a semver", kernelVersion) + } + + sem, err := semver.Make(matches[0]) + if err != nil { + return err + } + + if sem.GTE(minKernelVersion) { + // kernel 4.4+ - good + return nil + } + + // Certain RHEL/Centos 7.x kernels have a backport to fix the corruption bug + if !strings.Contains(kernelVersion, ".el7") { + // not a RHEL 7.x kernel - won't work + return fmt.Errorf("kernel version 4.4.0 or later is required to use thin_ls - you have %q", kernelVersion) + } + + // RHEL/Centos 7.x from here on + if sem.Major != 3 { + // only 3.x kernels *may* work correctly + return fmt.Errorf("RHEL/Centos 7.x kernel version 3.10.0-366 or later is required to use thin_ls - you have %q", kernelVersion) + } + + if sem.GT(minRhel7KernelVersion) { + // 3.10.1+ - good + return nil + } + + if sem.EQ(minRhel7KernelVersion) { + // need to check release + releaseRE := regexp.MustCompile(`^[^-]+-([0-9]+)\.`) + releaseMatches := releaseRE.FindStringSubmatch(kernelVersion) + if len(releaseMatches) != 2 { + return fmt.Errorf("unable to determine RHEL/Centos 7.x kernel release from %q", kernelVersion) + } + + release, err := strconv.Atoi(releaseMatches[1]) + if err != nil { + return fmt.Errorf("error parsing release %q: %v", releaseMatches[1], err) + } + + if release >= 366 { + return nil + } + } + + return fmt.Errorf("RHEL/Centos 7.x kernel version 3.10.0-366 or later is required to use thin_ls - you have %q", kernelVersion) +} + +// Register root container before running this function! +func Register(factory info.MachineInfoFactory, fsInfo fs.FsInfo, includedMetrics container.MetricSet) error { + client, err := Client() + if err != nil { + return fmt.Errorf("unable to communicate with docker daemon: %v", err) + } + + dockerInfo, err := ValidateInfo() + if err != nil { + return fmt.Errorf("failed to validate Docker info: %v", err) + } + + // Version already validated above, assume no error here. + dockerVersion, _ := parseVersion(dockerInfo.ServerVersion, versionRe, 3) + + dockerAPIVersion, _ := APIVersion() + + cgroupSubsystems, err := libcontainer.GetCgroupSubsystems(includedMetrics) + if err != nil { + return fmt.Errorf("failed to get cgroup subsystems: %v", err) + } + + var ( + thinPoolWatcher *devicemapper.ThinPoolWatcher + thinPoolName string + zfsWatcher *zfs.ZfsWatcher + ) + if includedMetrics.Has(container.DiskUsageMetrics) { + if storageDriver(dockerInfo.Driver) == devicemapperStorageDriver { + thinPoolWatcher, err = startThinPoolWatcher(dockerInfo) + if err != nil { + klog.Errorf("devicemapper filesystem stats will not be reported: %v", err) + } + + // Safe to ignore error - driver status should always be populated. + status, _ := StatusFromDockerInfo(*dockerInfo) + thinPoolName = status.DriverStatus[dockerutil.DriverStatusPoolName] + } + + if storageDriver(dockerInfo.Driver) == zfsStorageDriver { + zfsWatcher, err = startZfsWatcher(dockerInfo) + if err != nil { + klog.Errorf("zfs filesystem stats will not be reported: %v", err) + } + } + } + + klog.V(1).Infof("Registering Docker factory") + f := &dockerFactory{ + cgroupSubsystems: cgroupSubsystems, + client: client, + dockerVersion: dockerVersion, + dockerAPIVersion: dockerAPIVersion, + fsInfo: fsInfo, + machineInfoFactory: factory, + storageDriver: storageDriver(dockerInfo.Driver), + storageDir: RootDir(), + includedMetrics: includedMetrics, + thinPoolName: thinPoolName, + thinPoolWatcher: thinPoolWatcher, + zfsWatcher: zfsWatcher, + } + + container.RegisterContainerHandlerFactory(f, []watcher.ContainerWatchSource{watcher.Raw}) + return nil +} diff --git a/cluster-autoscaler/vendor/github.com/google/cadvisor/container/docker/handler.go b/cluster-autoscaler/vendor/github.com/google/cadvisor/container/docker/handler.go new file mode 100644 index 000000000000..bfb8e381659c --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/google/cadvisor/container/docker/handler.go @@ -0,0 +1,517 @@ +// Copyright 2014 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Handler for Docker containers. +package docker + +import ( + "fmt" + "io/ioutil" + "path" + "strconv" + "strings" + "time" + + "github.com/google/cadvisor/container" + "github.com/google/cadvisor/container/common" + dockerutil "github.com/google/cadvisor/container/docker/utils" + containerlibcontainer "github.com/google/cadvisor/container/libcontainer" + "github.com/google/cadvisor/devicemapper" + "github.com/google/cadvisor/fs" + info "github.com/google/cadvisor/info/v1" + "github.com/google/cadvisor/zfs" + "github.com/opencontainers/runc/libcontainer/cgroups" + + dockercontainer "github.com/docker/docker/api/types/container" + docker "github.com/docker/docker/client" + "golang.org/x/net/context" + "k8s.io/klog/v2" +) + +const ( + // The read write layers exist here. + aufsRWLayer = "diff" + overlayRWLayer = "upper" + overlay2RWLayer = "diff" + + // Path to the directory where docker stores log files if the json logging driver is enabled. + pathToContainersDir = "containers" +) + +type dockerContainerHandler struct { + // machineInfoFactory provides info.MachineInfo + machineInfoFactory info.MachineInfoFactory + + // Absolute path to the cgroup hierarchies of this container. + // (e.g.: "cpu" -> "/sys/fs/cgroup/cpu/test") + cgroupPaths map[string]string + + // the docker storage driver + storageDriver storageDriver + fsInfo fs.FsInfo + rootfsStorageDir string + + // Time at which this container was created. + creationTime time.Time + + // Metadata associated with the container. + envs map[string]string + labels map[string]string + + // Image name used for this container. + image string + + // The network mode of the container + networkMode dockercontainer.NetworkMode + + // Filesystem handler. + fsHandler common.FsHandler + + // The IP address of the container + ipAddress string + + includedMetrics container.MetricSet + + // the devicemapper poolname + poolName string + + // zfsParent is the parent for docker zfs + zfsParent string + + // Reference to the container + reference info.ContainerReference + + libcontainerHandler *containerlibcontainer.Handler +} + +var _ container.ContainerHandler = &dockerContainerHandler{} + +func getRwLayerID(containerID, storageDir string, sd storageDriver, dockerVersion []int) (string, error) { + const ( + // Docker version >=1.10.0 have a randomized ID for the root fs of a container. + randomizedRWLayerMinorVersion = 10 + rwLayerIDFile = "mount-id" + ) + if (dockerVersion[0] <= 1) && (dockerVersion[1] < randomizedRWLayerMinorVersion) { + return containerID, nil + } + + bytes, err := ioutil.ReadFile(path.Join(storageDir, "image", string(sd), "layerdb", "mounts", containerID, rwLayerIDFile)) + if err != nil { + return "", fmt.Errorf("failed to identify the read-write layer ID for container %q. - %v", containerID, err) + } + return string(bytes), err +} + +// newDockerContainerHandler returns a new container.ContainerHandler +func newDockerContainerHandler( + client *docker.Client, + name string, + machineInfoFactory info.MachineInfoFactory, + fsInfo fs.FsInfo, + storageDriver storageDriver, + storageDir string, + cgroupSubsystems map[string]string, + inHostNamespace bool, + metadataEnvAllowList []string, + dockerVersion []int, + includedMetrics container.MetricSet, + thinPoolName string, + thinPoolWatcher *devicemapper.ThinPoolWatcher, + zfsWatcher *zfs.ZfsWatcher, +) (container.ContainerHandler, error) { + // Create the cgroup paths. + cgroupPaths := common.MakeCgroupPaths(cgroupSubsystems, name) + + // Generate the equivalent cgroup manager for this container. + cgroupManager, err := containerlibcontainer.NewCgroupManager(name, cgroupPaths) + if err != nil { + return nil, err + } + + rootFs := "/" + if !inHostNamespace { + rootFs = "/rootfs" + storageDir = path.Join(rootFs, storageDir) + } + + id := ContainerNameToDockerId(name) + + // Add the Containers dir where the log files are stored. + // FIXME: Give `otherStorageDir` a more descriptive name. + otherStorageDir := path.Join(storageDir, pathToContainersDir, id) + + rwLayerID, err := getRwLayerID(id, storageDir, storageDriver, dockerVersion) + if err != nil { + return nil, err + } + + // Determine the rootfs storage dir OR the pool name to determine the device. + // For devicemapper, we only need the thin pool name, and that is passed in to this call + var ( + rootfsStorageDir string + zfsFilesystem string + zfsParent string + ) + switch storageDriver { + case aufsStorageDriver: + rootfsStorageDir = path.Join(storageDir, string(aufsStorageDriver), aufsRWLayer, rwLayerID) + case overlayStorageDriver: + rootfsStorageDir = path.Join(storageDir, string(storageDriver), rwLayerID, overlayRWLayer) + case overlay2StorageDriver: + rootfsStorageDir = path.Join(storageDir, string(storageDriver), rwLayerID, overlay2RWLayer) + case vfsStorageDriver: + rootfsStorageDir = path.Join(storageDir) + case zfsStorageDriver: + status, err := Status() + if err != nil { + return nil, fmt.Errorf("unable to determine docker status: %v", err) + } + zfsParent = status.DriverStatus[dockerutil.DriverStatusParentDataset] + zfsFilesystem = path.Join(zfsParent, rwLayerID) + } + + // We assume that if Inspect fails then the container is not known to docker. + ctnr, err := client.ContainerInspect(context.Background(), id) + if err != nil { + return nil, fmt.Errorf("failed to inspect container %q: %v", id, err) + } + + // TODO: extract object mother method + handler := &dockerContainerHandler{ + machineInfoFactory: machineInfoFactory, + cgroupPaths: cgroupPaths, + fsInfo: fsInfo, + storageDriver: storageDriver, + poolName: thinPoolName, + rootfsStorageDir: rootfsStorageDir, + envs: make(map[string]string), + labels: ctnr.Config.Labels, + includedMetrics: includedMetrics, + zfsParent: zfsParent, + } + // Timestamp returned by Docker is in time.RFC3339Nano format. + handler.creationTime, err = time.Parse(time.RFC3339Nano, ctnr.Created) + if err != nil { + // This should not happen, report the error just in case + return nil, fmt.Errorf("failed to parse the create timestamp %q for container %q: %v", ctnr.Created, id, err) + } + handler.libcontainerHandler = containerlibcontainer.NewHandler(cgroupManager, rootFs, ctnr.State.Pid, includedMetrics) + + // Add the name and bare ID as aliases of the container. + handler.reference = info.ContainerReference{ + Id: id, + Name: name, + Aliases: []string{strings.TrimPrefix(ctnr.Name, "/"), id}, + Namespace: DockerNamespace, + } + handler.image = ctnr.Config.Image + handler.networkMode = ctnr.HostConfig.NetworkMode + // Only adds restartcount label if it's greater than 0 + if ctnr.RestartCount > 0 { + handler.labels["restartcount"] = strconv.Itoa(ctnr.RestartCount) + } + + // Obtain the IP address for the container. + // If the NetworkMode starts with 'container:' then we need to use the IP address of the container specified. + // This happens in cases such as kubernetes where the containers doesn't have an IP address itself and we need to use the pod's address + ipAddress := ctnr.NetworkSettings.IPAddress + networkMode := string(ctnr.HostConfig.NetworkMode) + if ipAddress == "" && strings.HasPrefix(networkMode, "container:") { + containerID := strings.TrimPrefix(networkMode, "container:") + c, err := client.ContainerInspect(context.Background(), containerID) + if err != nil { + return nil, fmt.Errorf("failed to inspect container %q: %v", id, err) + } + ipAddress = c.NetworkSettings.IPAddress + } + + handler.ipAddress = ipAddress + + if includedMetrics.Has(container.DiskUsageMetrics) { + handler.fsHandler = &dockerFsHandler{ + fsHandler: common.NewFsHandler(common.DefaultPeriod, rootfsStorageDir, otherStorageDir, fsInfo), + thinPoolWatcher: thinPoolWatcher, + zfsWatcher: zfsWatcher, + deviceID: ctnr.GraphDriver.Data["DeviceId"], + zfsFilesystem: zfsFilesystem, + } + } + + // split env vars to get metadata map. + for _, exposedEnv := range metadataEnvAllowList { + if exposedEnv == "" { + // if no dockerEnvWhitelist provided, len(metadataEnvAllowList) == 1, metadataEnvAllowList[0] == "" + continue + } + + for _, envVar := range ctnr.Config.Env { + if envVar != "" { + splits := strings.SplitN(envVar, "=", 2) + if len(splits) == 2 && strings.HasPrefix(splits[0], exposedEnv) { + handler.envs[strings.ToLower(splits[0])] = splits[1] + } + } + } + } + + return handler, nil +} + +// dockerFsHandler is a composite FsHandler implementation the incorporates +// the common fs handler, a devicemapper ThinPoolWatcher, and a zfsWatcher +type dockerFsHandler struct { + fsHandler common.FsHandler + + // thinPoolWatcher is the devicemapper thin pool watcher + thinPoolWatcher *devicemapper.ThinPoolWatcher + // deviceID is the id of the container's fs device + deviceID string + + // zfsWatcher is the zfs filesystem watcher + zfsWatcher *zfs.ZfsWatcher + // zfsFilesystem is the docker zfs filesystem + zfsFilesystem string +} + +var _ common.FsHandler = &dockerFsHandler{} + +func (h *dockerFsHandler) Start() { + h.fsHandler.Start() +} + +func (h *dockerFsHandler) Stop() { + h.fsHandler.Stop() +} + +func (h *dockerFsHandler) Usage() common.FsUsage { + usage := h.fsHandler.Usage() + + // When devicemapper is the storage driver, the base usage of the container comes from the thin pool. + // We still need the result of the fsHandler for any extra storage associated with the container. + // To correctly factor in the thin pool usage, we should: + // * Usage the thin pool usage as the base usage + // * Calculate the overall usage by adding the overall usage from the fs handler to the thin pool usage + if h.thinPoolWatcher != nil { + thinPoolUsage, err := h.thinPoolWatcher.GetUsage(h.deviceID) + if err != nil { + // TODO: ideally we should keep track of how many times we failed to get the usage for this + // device vs how many refreshes of the cache there have been, and display an error e.g. if we've + // had at least 1 refresh and we still can't find the device. + klog.V(5).Infof("unable to get fs usage from thin pool for device %s: %v", h.deviceID, err) + } else { + usage.BaseUsageBytes = thinPoolUsage + usage.TotalUsageBytes += thinPoolUsage + } + } + + if h.zfsWatcher != nil { + zfsUsage, err := h.zfsWatcher.GetUsage(h.zfsFilesystem) + if err != nil { + klog.V(5).Infof("unable to get fs usage from zfs for filesystem %s: %v", h.zfsFilesystem, err) + } else { + usage.BaseUsageBytes = zfsUsage + usage.TotalUsageBytes += zfsUsage + } + } + return usage +} + +func (h *dockerContainerHandler) Start() { + if h.fsHandler != nil { + h.fsHandler.Start() + } +} + +func (h *dockerContainerHandler) Cleanup() { + if h.fsHandler != nil { + h.fsHandler.Stop() + } +} + +func (h *dockerContainerHandler) ContainerReference() (info.ContainerReference, error) { + return h.reference, nil +} + +func (h *dockerContainerHandler) needNet() bool { + if h.includedMetrics.Has(container.NetworkUsageMetrics) { + return !h.networkMode.IsContainer() + } + return false +} + +func (h *dockerContainerHandler) GetSpec() (info.ContainerSpec, error) { + hasFilesystem := h.includedMetrics.Has(container.DiskUsageMetrics) + spec, err := common.GetSpec(h.cgroupPaths, h.machineInfoFactory, h.needNet(), hasFilesystem) + + spec.Labels = h.labels + spec.Envs = h.envs + spec.Image = h.image + spec.CreationTime = h.creationTime + + return spec, err +} + +func (h *dockerContainerHandler) getFsStats(stats *info.ContainerStats) error { + mi, err := h.machineInfoFactory.GetMachineInfo() + if err != nil { + return err + } + + if h.includedMetrics.Has(container.DiskIOMetrics) { + common.AssignDeviceNamesToDiskStats((*common.MachineInfoNamer)(mi), &stats.DiskIo) + } + + if !h.includedMetrics.Has(container.DiskUsageMetrics) { + return nil + } + var device string + switch h.storageDriver { + case devicemapperStorageDriver: + // Device has to be the pool name to correlate with the device name as + // set in the machine info filesystems. + device = h.poolName + case aufsStorageDriver, overlayStorageDriver, overlay2StorageDriver, vfsStorageDriver: + deviceInfo, err := h.fsInfo.GetDirFsDevice(h.rootfsStorageDir) + if err != nil { + return fmt.Errorf("unable to determine device info for dir: %v: %v", h.rootfsStorageDir, err) + } + device = deviceInfo.Device + case zfsStorageDriver: + device = h.zfsParent + default: + return nil + } + + var ( + limit uint64 + fsType string + ) + + var fsInfo *info.FsInfo + + // Docker does not impose any filesystem limits for containers. So use capacity as limit. + for _, fs := range mi.Filesystems { + if fs.Device == device { + limit = fs.Capacity + fsType = fs.Type + fsInfo = &fs + break + } + } + + fsStat := info.FsStats{Device: device, Type: fsType, Limit: limit} + usage := h.fsHandler.Usage() + fsStat.BaseUsage = usage.BaseUsageBytes + fsStat.Usage = usage.TotalUsageBytes + fsStat.Inodes = usage.InodeUsage + + if fsInfo != nil { + fileSystems, err := h.fsInfo.GetGlobalFsInfo() + + if err == nil { + addDiskStats(fileSystems, fsInfo, &fsStat) + } else { + klog.Errorf("Unable to obtain diskstats for filesystem %s: %v", fsStat.Device, err) + } + } + + stats.Filesystem = append(stats.Filesystem, fsStat) + + return nil +} + +func addDiskStats(fileSystems []fs.Fs, fsInfo *info.FsInfo, fsStats *info.FsStats) { + if fsInfo == nil { + return + } + + for _, fileSys := range fileSystems { + if fsInfo.DeviceMajor == fileSys.DiskStats.Major && + fsInfo.DeviceMinor == fileSys.DiskStats.Minor { + fsStats.ReadsCompleted = fileSys.DiskStats.ReadsCompleted + fsStats.ReadsMerged = fileSys.DiskStats.ReadsMerged + fsStats.SectorsRead = fileSys.DiskStats.SectorsRead + fsStats.ReadTime = fileSys.DiskStats.ReadTime + fsStats.WritesCompleted = fileSys.DiskStats.WritesCompleted + fsStats.WritesMerged = fileSys.DiskStats.WritesMerged + fsStats.SectorsWritten = fileSys.DiskStats.SectorsWritten + fsStats.WriteTime = fileSys.DiskStats.WriteTime + fsStats.IoInProgress = fileSys.DiskStats.IoInProgress + fsStats.IoTime = fileSys.DiskStats.IoTime + fsStats.WeightedIoTime = fileSys.DiskStats.WeightedIoTime + break + } + } +} + +// TODO(vmarmol): Get from libcontainer API instead of cgroup manager when we don't have to support older Dockers. +func (h *dockerContainerHandler) GetStats() (*info.ContainerStats, error) { + stats, err := h.libcontainerHandler.GetStats() + if err != nil { + return stats, err + } + // Clean up stats for containers that don't have their own network - this + // includes containers running in Kubernetes pods that use the network of the + // infrastructure container. This stops metrics being reported multiple times + // for each container in a pod. + if !h.needNet() { + stats.Network = info.NetworkStats{} + } + + // Get filesystem stats. + err = h.getFsStats(stats) + if err != nil { + return stats, err + } + + return stats, nil +} + +func (h *dockerContainerHandler) ListContainers(listType container.ListType) ([]info.ContainerReference, error) { + // No-op for Docker driver. + return []info.ContainerReference{}, nil +} + +func (h *dockerContainerHandler) GetCgroupPath(resource string) (string, error) { + var res string + if !cgroups.IsCgroup2UnifiedMode() { + res = resource + } + path, ok := h.cgroupPaths[res] + if !ok { + return "", fmt.Errorf("could not find path for resource %q for container %q", resource, h.reference.Name) + } + return path, nil +} + +func (h *dockerContainerHandler) GetContainerLabels() map[string]string { + return h.labels +} + +func (h *dockerContainerHandler) GetContainerIPAddress() string { + return h.ipAddress +} + +func (h *dockerContainerHandler) ListProcesses(listType container.ListType) ([]int, error) { + return h.libcontainerHandler.GetProcesses() +} + +func (h *dockerContainerHandler) Exists() bool { + return common.CgroupExists(h.cgroupPaths) +} + +func (h *dockerContainerHandler) Type() container.ContainerType { + return container.ContainerTypeDocker +} diff --git a/cluster-autoscaler/vendor/github.com/google/cadvisor/container/docker/install/install.go b/cluster-autoscaler/vendor/github.com/google/cadvisor/container/docker/install/install.go new file mode 100644 index 000000000000..81346f68806c --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/google/cadvisor/container/docker/install/install.go @@ -0,0 +1,30 @@ +// Copyright 2019 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// The install package registers docker.NewPlugin() as the "docker" container provider when imported +package install + +import ( + "k8s.io/klog/v2" + + "github.com/google/cadvisor/container" + "github.com/google/cadvisor/container/docker" +) + +func init() { + err := container.RegisterPlugin("docker", docker.NewPlugin()) + if err != nil { + klog.Fatalf("Failed to register docker plugin: %v", err) + } +} diff --git a/cluster-autoscaler/vendor/github.com/google/cadvisor/container/docker/plugin.go b/cluster-autoscaler/vendor/github.com/google/cadvisor/container/docker/plugin.go new file mode 100644 index 000000000000..07e471a732f8 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/google/cadvisor/container/docker/plugin.go @@ -0,0 +1,78 @@ +// Copyright 2019 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package docker + +import ( + "time" + + "golang.org/x/net/context" + "k8s.io/klog/v2" + + "github.com/google/cadvisor/container" + "github.com/google/cadvisor/fs" + info "github.com/google/cadvisor/info/v1" + "github.com/google/cadvisor/watcher" +) + +const dockerClientTimeout = 10 * time.Second + +// NewPlugin returns an implementation of container.Plugin suitable for passing to container.RegisterPlugin() +func NewPlugin() container.Plugin { + return &plugin{} +} + +type plugin struct{} + +func (p *plugin) InitializeFSContext(context *fs.Context) error { + SetTimeout(dockerClientTimeout) + // Try to connect to docker indefinitely on startup. + dockerStatus := retryDockerStatus() + context.Docker = fs.DockerContext{ + Root: RootDir(), + Driver: dockerStatus.Driver, + DriverStatus: dockerStatus.DriverStatus, + } + return nil +} + +func (p *plugin) Register(factory info.MachineInfoFactory, fsInfo fs.FsInfo, includedMetrics container.MetricSet) (watcher.ContainerWatcher, error) { + err := Register(factory, fsInfo, includedMetrics) + return nil, err +} + +func retryDockerStatus() info.DockerStatus { + startupTimeout := dockerClientTimeout + maxTimeout := 4 * startupTimeout + for { + ctx, _ := context.WithTimeout(context.Background(), startupTimeout) + dockerStatus, err := StatusWithContext(ctx) + if err == nil { + return dockerStatus + } + + switch err { + case context.DeadlineExceeded: + klog.Warningf("Timeout trying to communicate with docker during initialization, will retry") + default: + klog.V(5).Infof("Docker not connected: %v", err) + return info.DockerStatus{} + } + + startupTimeout = 2 * startupTimeout + if startupTimeout > maxTimeout { + startupTimeout = maxTimeout + } + } +} diff --git a/cluster-autoscaler/vendor/github.com/google/cadvisor/container/docker/utils/docker.go b/cluster-autoscaler/vendor/github.com/google/cadvisor/container/docker/utils/docker.go new file mode 100644 index 000000000000..658607f73686 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/google/cadvisor/container/docker/utils/docker.go @@ -0,0 +1,77 @@ +// Copyright 2016 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package utils + +import ( + "fmt" + "os" + "strings" + + dockertypes "github.com/docker/docker/api/types" +) + +const ( + DriverStatusPoolName = "Pool Name" + DriverStatusMetadataFile = "Metadata file" + DriverStatusParentDataset = "Parent Dataset" +) + +func DriverStatusValue(status [][2]string, target string) string { + for _, v := range status { + if strings.EqualFold(v[0], target) { + return v[1] + } + } + + return "" +} + +func DockerThinPoolName(info dockertypes.Info) (string, error) { + poolName := DriverStatusValue(info.DriverStatus, DriverStatusPoolName) + if len(poolName) == 0 { + return "", fmt.Errorf("Could not get devicemapper pool name") + } + + return poolName, nil +} + +func DockerMetadataDevice(info dockertypes.Info) (string, error) { + metadataDevice := DriverStatusValue(info.DriverStatus, DriverStatusMetadataFile) + if len(metadataDevice) != 0 { + return metadataDevice, nil + } + + poolName, err := DockerThinPoolName(info) + if err != nil { + return "", err + } + + metadataDevice = fmt.Sprintf("/dev/mapper/%s_tmeta", poolName) + + if _, err := os.Stat(metadataDevice); err != nil { + return "", err + } + + return metadataDevice, nil +} + +func DockerZfsFilesystem(info dockertypes.Info) (string, error) { + filesystem := DriverStatusValue(info.DriverStatus, DriverStatusParentDataset) + if len(filesystem) == 0 { + return "", fmt.Errorf("Could not get zfs filesystem") + } + + return filesystem, nil +} diff --git a/cluster-autoscaler/vendor/github.com/google/cadvisor/container/libcontainer/handler.go b/cluster-autoscaler/vendor/github.com/google/cadvisor/container/libcontainer/handler.go index ed4c1ae8535b..e599029386da 100644 --- a/cluster-autoscaler/vendor/github.com/google/cadvisor/container/libcontainer/handler.go +++ b/cluster-autoscaler/vendor/github.com/google/cadvisor/container/libcontainer/handler.go @@ -35,7 +35,6 @@ import ( "k8s.io/klog/v2" "github.com/google/cadvisor/container" - "github.com/google/cadvisor/container/common" info "github.com/google/cadvisor/info/v1" ) @@ -170,7 +169,8 @@ func (h *Handler) GetStats() (*info.ContainerStats, error) { // file descriptors etc.) and not required a proper container's // root PID (systemd services don't have the root PID atm) if h.includedMetrics.Has(container.ProcessMetrics) { - path, ok := common.GetControllerPath(h.cgroupManager.GetPaths(), "cpu", cgroups.IsCgroup2UnifiedMode()) + paths := h.cgroupManager.GetPaths() + path, ok := paths["cpu"] if !ok { klog.V(4).Infof("Could not find cgroups CPU for container %d", h.pid) } else { diff --git a/cluster-autoscaler/vendor/github.com/google/cadvisor/container/libcontainer/helpers.go b/cluster-autoscaler/vendor/github.com/google/cadvisor/container/libcontainer/helpers.go index e535ad64c46b..e0d7718c876d 100644 --- a/cluster-autoscaler/vendor/github.com/google/cadvisor/container/libcontainer/helpers.go +++ b/cluster-autoscaler/vendor/github.com/google/cadvisor/container/libcontainer/helpers.go @@ -157,14 +157,13 @@ func diskStatsCopy(blkioStats []cgroups.BlkioStatEntry) (stat []info.PerDiskStat } func NewCgroupManager(name string, paths map[string]string) (cgroups.Manager, error) { - config := &configs.Cgroup{ - Name: name, - Resources: &configs.Resources{}, - } if cgroups.IsCgroup2UnifiedMode() { path := paths[""] - return fs2.NewManager(config, path) + return fs2.NewManager(nil, path, false) } - return fs.NewManager(config, paths) + config := configs.Cgroup{ + Name: name, + } + return fs.NewManager(&config, paths, false), nil } diff --git a/cluster-autoscaler/vendor/github.com/google/cadvisor/fs/fs.go b/cluster-autoscaler/vendor/github.com/google/cadvisor/fs/fs.go index e1a1bc41e27e..f5d4e49ada91 100644 --- a/cluster-autoscaler/vendor/github.com/google/cadvisor/fs/fs.go +++ b/cluster-autoscaler/vendor/github.com/google/cadvisor/fs/fs.go @@ -20,6 +20,7 @@ package fs import ( "bufio" + "errors" "fmt" "io/ioutil" "os" @@ -58,6 +59,9 @@ const ( // A pool for restricting the number of consecutive `du` and `find` tasks running. var pool = make(chan struct{}, maxConcurrentOps) +// ErrDeviceNotInPartitionsMap is the error resulting if a device could not be found in the partitions map. +var ErrDeviceNotInPartitionsMap = errors.New("could not find device in cached partitions map") + func init() { for i := 0; i < maxConcurrentOps; i++ { releaseToken() diff --git a/cluster-autoscaler/vendor/github.com/google/cadvisor/fs/types.go b/cluster-autoscaler/vendor/github.com/google/cadvisor/fs/types.go index 35268ace984e..0445a17adbe3 100644 --- a/cluster-autoscaler/vendor/github.com/google/cadvisor/fs/types.go +++ b/cluster-autoscaler/vendor/github.com/google/cadvisor/fs/types.go @@ -86,13 +86,8 @@ type UsageInfo struct { Inodes uint64 } -var ( - // ErrNoSuchDevice is the error indicating the requested device does not exist. - ErrNoSuchDevice = errors.New("cadvisor: no such device") - - // ErrDeviceNotInPartitionsMap is the error resulting if a device could not be found in the partitions map. - ErrDeviceNotInPartitionsMap = errors.New("could not find device in cached partitions map") -) +// ErrNoSuchDevice is the error indicating the requested device does not exist. +var ErrNoSuchDevice = errors.New("cadvisor: no such device") type FsInfo interface { // Returns capacity and free space, in bytes, of all the ext2, ext3, ext4 filesystems on the host. diff --git a/cluster-autoscaler/vendor/github.com/google/cadvisor/manager/container.go b/cluster-autoscaler/vendor/github.com/google/cadvisor/manager/container.go index a5f2040a6fa1..db2e2b113b18 100644 --- a/cluster-autoscaler/vendor/github.com/google/cadvisor/manager/container.go +++ b/cluster-autoscaler/vendor/github.com/google/cadvisor/manager/container.go @@ -64,7 +64,6 @@ type containerInfo struct { } type containerData struct { - oomEvents uint64 handler container.ContainerHandler info containerInfo memoryCache *memory.InMemoryCache @@ -104,6 +103,8 @@ type containerData struct { // resctrlCollector updates stats for resctrl controller. resctrlCollector stats.Collector + + oomEvents uint64 } // jitter returns a time.Duration between duration and duration + maxFactor * duration, diff --git a/cluster-autoscaler/vendor/github.com/google/cadvisor/manager/manager.go b/cluster-autoscaler/vendor/github.com/google/cadvisor/manager/manager.go index 5ef1dff8fea2..ca55537c5beb 100644 --- a/cluster-autoscaler/vendor/github.com/google/cadvisor/manager/manager.go +++ b/cluster-autoscaler/vendor/github.com/google/cadvisor/manager/manager.go @@ -158,7 +158,7 @@ func New(memoryCache *memory.InMemoryCache, sysfs sysfs.SysFs, houskeepingConfig if cgroups.IsCgroup2UnifiedMode() { klog.Warningf("Cannot detect current cgroup on cgroup v2") } else { - selfContainer, err = cgroups.GetOwnCgroup("cpu") + selfContainer, err := cgroups.GetOwnCgroupPath("cpu") if err != nil { return nil, err } diff --git a/cluster-autoscaler/vendor/github.com/google/cadvisor/resctrl/utils.go b/cluster-autoscaler/vendor/github.com/google/cadvisor/resctrl/utils.go index e28216740753..f7931d22ebfa 100644 --- a/cluster-autoscaler/vendor/github.com/google/cadvisor/resctrl/utils.go +++ b/cluster-autoscaler/vendor/github.com/google/cadvisor/resctrl/utils.go @@ -77,7 +77,7 @@ var ( func Setup() error { var err error - rootResctrl, err = intelrdt.Root() + rootResctrl, err = intelrdt.GetIntelRdtPath(rootContainer) if err != nil { return fmt.Errorf("unable to initialize resctrl: %v", err) } diff --git a/cluster-autoscaler/vendor/github.com/google/cadvisor/zfs/watcher.go b/cluster-autoscaler/vendor/github.com/google/cadvisor/zfs/watcher.go new file mode 100644 index 000000000000..ace428538572 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/google/cadvisor/zfs/watcher.go @@ -0,0 +1,113 @@ +// Copyright 2016 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +package zfs + +import ( + "fmt" + "sync" + "time" + + zfs "github.com/mistifyio/go-zfs" + "k8s.io/klog/v2" +) + +// zfsWatcher maintains a cache of filesystem -> usage stats for a +// zfs filesystem +type ZfsWatcher struct { + filesystem string + lock *sync.RWMutex + cache map[string]uint64 + period time.Duration + stopChan chan struct{} +} + +// NewThinPoolWatcher returns a new ThinPoolWatcher for the given devicemapper +// thin pool name and metadata device or an error. +func NewZfsWatcher(filesystem string) (*ZfsWatcher, error) { + + return &ZfsWatcher{ + filesystem: filesystem, + lock: &sync.RWMutex{}, + cache: make(map[string]uint64), + period: 15 * time.Second, + stopChan: make(chan struct{}), + }, nil +} + +// Start starts the ZfsWatcher. +func (w *ZfsWatcher) Start() { + err := w.Refresh() + if err != nil { + klog.Errorf("encountered error refreshing zfs watcher: %v", err) + } + + for { + select { + case <-w.stopChan: + return + case <-time.After(w.period): + start := time.Now() + err = w.Refresh() + if err != nil { + klog.Errorf("encountered error refreshing zfs watcher: %v", err) + } + + // print latency for refresh + duration := time.Since(start) + klog.V(5).Infof("zfs(%d) took %s", start.Unix(), duration) + } + } +} + +// Stop stops the ZfsWatcher. +func (w *ZfsWatcher) Stop() { + close(w.stopChan) +} + +// GetUsage gets the cached usage value of the given filesystem. +func (w *ZfsWatcher) GetUsage(filesystem string) (uint64, error) { + w.lock.RLock() + defer w.lock.RUnlock() + + v, ok := w.cache[filesystem] + if !ok { + return 0, fmt.Errorf("no cached value for usage of filesystem %v", filesystem) + } + + return v, nil +} + +// Refresh performs a zfs get +func (w *ZfsWatcher) Refresh() error { + w.lock.Lock() + defer w.lock.Unlock() + newCache := make(map[string]uint64) + parent, err := zfs.GetDataset(w.filesystem) + if err != nil { + klog.Errorf("encountered error getting zfs filesystem: %s: %v", w.filesystem, err) + return err + } + children, err := parent.Children(0) + if err != nil { + klog.Errorf("encountered error getting children of zfs filesystem: %s: %v", w.filesystem, err) + return err + } + + for _, ds := range children { + newCache[ds.Name] = ds.Used + } + + w.cache = newCache + return nil +} diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/LICENSE b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/LICENSE similarity index 100% rename from cluster-autoscaler/vendor/github.com/google/gnostic/LICENSE rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/LICENSE diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/compiler/README.md b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/compiler/README.md similarity index 100% rename from cluster-autoscaler/vendor/github.com/google/gnostic/compiler/README.md rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/compiler/README.md diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/compiler/context.go b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/compiler/context.go similarity index 100% rename from cluster-autoscaler/vendor/github.com/google/gnostic/compiler/context.go rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/compiler/context.go diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/compiler/error.go b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/compiler/error.go similarity index 100% rename from cluster-autoscaler/vendor/github.com/google/gnostic/compiler/error.go rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/compiler/error.go diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/compiler/extensions.go b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/compiler/extensions.go similarity index 97% rename from cluster-autoscaler/vendor/github.com/google/gnostic/compiler/extensions.go rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/compiler/extensions.go index 5b5a916d2ece..20848a0a1636 100644 --- a/cluster-autoscaler/vendor/github.com/google/gnostic/compiler/extensions.go +++ b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/compiler/extensions.go @@ -22,9 +22,8 @@ import ( "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes/any" + extensions "github.com/googleapis/gnostic/extensions" yaml "gopkg.in/yaml.v3" - - extensions "github.com/google/gnostic/extensions" ) // ExtensionHandler describes a binary that is called by the compiler to handle specification extensions. diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/compiler/helpers.go b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/compiler/helpers.go similarity index 99% rename from cluster-autoscaler/vendor/github.com/google/gnostic/compiler/helpers.go rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/compiler/helpers.go index 97ffaa5131ae..48f02f3950ec 100644 --- a/cluster-autoscaler/vendor/github.com/google/gnostic/compiler/helpers.go +++ b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/compiler/helpers.go @@ -20,9 +20,8 @@ import ( "sort" "strconv" + "github.com/googleapis/gnostic/jsonschema" "gopkg.in/yaml.v3" - - "github.com/google/gnostic/jsonschema" ) // compiler helper functions, usually called from generated code diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/compiler/main.go b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/compiler/main.go similarity index 100% rename from cluster-autoscaler/vendor/github.com/google/gnostic/compiler/main.go rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/compiler/main.go diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/compiler/reader.go b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/compiler/reader.go similarity index 100% rename from cluster-autoscaler/vendor/github.com/google/gnostic/compiler/reader.go rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/compiler/reader.go diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/extensions/README.md b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/extensions/README.md similarity index 100% rename from cluster-autoscaler/vendor/github.com/google/gnostic/extensions/README.md rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/extensions/README.md diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/extensions/extension.pb.go b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/extensions/extension.pb.go similarity index 99% rename from cluster-autoscaler/vendor/github.com/google/gnostic/extensions/extension.pb.go rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/extensions/extension.pb.go index a6a4ccca6cf6..5aab58ebfbe4 100644 --- a/cluster-autoscaler/vendor/github.com/google/gnostic/extensions/extension.pb.go +++ b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/extensions/extension.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.18.1 +// protoc v3.15.5 // source: extensions/extension.proto package gnostic_extension_v1 diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/extensions/extension.proto b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/extensions/extension.proto similarity index 100% rename from cluster-autoscaler/vendor/github.com/google/gnostic/extensions/extension.proto rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/extensions/extension.proto diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/extensions/extensions.go b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/extensions/extensions.go similarity index 100% rename from cluster-autoscaler/vendor/github.com/google/gnostic/extensions/extensions.go rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/extensions/extensions.go diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/jsonschema/README.md b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/jsonschema/README.md similarity index 100% rename from cluster-autoscaler/vendor/github.com/google/gnostic/jsonschema/README.md rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/jsonschema/README.md diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/jsonschema/base.go b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/jsonschema/base.go similarity index 100% rename from cluster-autoscaler/vendor/github.com/google/gnostic/jsonschema/base.go rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/jsonschema/base.go diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/jsonschema/display.go b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/jsonschema/display.go similarity index 100% rename from cluster-autoscaler/vendor/github.com/google/gnostic/jsonschema/display.go rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/jsonschema/display.go diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/jsonschema/models.go b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/jsonschema/models.go similarity index 100% rename from cluster-autoscaler/vendor/github.com/google/gnostic/jsonschema/models.go rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/jsonschema/models.go diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/jsonschema/operations.go b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/jsonschema/operations.go similarity index 100% rename from cluster-autoscaler/vendor/github.com/google/gnostic/jsonschema/operations.go rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/jsonschema/operations.go diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/jsonschema/reader.go b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/jsonschema/reader.go similarity index 100% rename from cluster-autoscaler/vendor/github.com/google/gnostic/jsonschema/reader.go rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/jsonschema/reader.go diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/jsonschema/schema.json b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/jsonschema/schema.json similarity index 100% rename from cluster-autoscaler/vendor/github.com/google/gnostic/jsonschema/schema.json rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/jsonschema/schema.json diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/jsonschema/writer.go b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/jsonschema/writer.go similarity index 100% rename from cluster-autoscaler/vendor/github.com/google/gnostic/jsonschema/writer.go rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/jsonschema/writer.go diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/openapiv2/OpenAPIv2.go b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv2/OpenAPIv2.go similarity index 99% rename from cluster-autoscaler/vendor/github.com/google/gnostic/openapiv2/OpenAPIv2.go rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv2/OpenAPIv2.go index 0f17907667bd..727d7f4ad525 100644 --- a/cluster-autoscaler/vendor/github.com/google/gnostic/openapiv2/OpenAPIv2.go +++ b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv2/OpenAPIv2.go @@ -18,12 +18,10 @@ package openapi_v2 import ( "fmt" + "github.com/googleapis/gnostic/compiler" + "gopkg.in/yaml.v3" "regexp" "strings" - - "gopkg.in/yaml.v3" - - "github.com/google/gnostic/compiler" ) // Version returns the package name (and OpenAPI version). diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/openapiv2/OpenAPIv2.pb.go b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv2/OpenAPIv2.pb.go similarity index 99% rename from cluster-autoscaler/vendor/github.com/google/gnostic/openapiv2/OpenAPIv2.pb.go rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv2/OpenAPIv2.pb.go index 06b60157c144..8a5f302f337a 100644 --- a/cluster-autoscaler/vendor/github.com/google/gnostic/openapiv2/OpenAPIv2.pb.go +++ b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv2/OpenAPIv2.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.18.1 +// protoc v3.15.5 // source: openapiv2/OpenAPIv2.proto package openapi_v2 diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/openapiv2/OpenAPIv2.proto b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv2/OpenAPIv2.proto similarity index 100% rename from cluster-autoscaler/vendor/github.com/google/gnostic/openapiv2/OpenAPIv2.proto rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv2/OpenAPIv2.proto diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/openapiv2/README.md b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv2/README.md similarity index 100% rename from cluster-autoscaler/vendor/github.com/google/gnostic/openapiv2/README.md rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv2/README.md diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/openapiv2/document.go b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv2/document.go similarity index 96% rename from cluster-autoscaler/vendor/github.com/google/gnostic/openapiv2/document.go rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv2/document.go index 0021ae871a6f..56e5966b4cbe 100644 --- a/cluster-autoscaler/vendor/github.com/google/gnostic/openapiv2/document.go +++ b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv2/document.go @@ -15,9 +15,8 @@ package openapi_v2 import ( + "github.com/googleapis/gnostic/compiler" "gopkg.in/yaml.v3" - - "github.com/google/gnostic/compiler" ) // ParseDocument reads an OpenAPI v2 description from a YAML/JSON representation. diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/openapiv2/openapi-2.0.json b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv2/openapi-2.0.json similarity index 100% rename from cluster-autoscaler/vendor/github.com/google/gnostic/openapiv2/openapi-2.0.json rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv2/openapi-2.0.json diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/openapiv3/OpenAPIv3.go b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv3/OpenAPIv3.go similarity index 99% rename from cluster-autoscaler/vendor/github.com/google/gnostic/openapiv3/OpenAPIv3.go rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv3/OpenAPIv3.go index 5f4a7025ea9a..607e33c74f63 100644 --- a/cluster-autoscaler/vendor/github.com/google/gnostic/openapiv3/OpenAPIv3.go +++ b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv3/OpenAPIv3.go @@ -18,12 +18,10 @@ package openapi_v3 import ( "fmt" + "github.com/googleapis/gnostic/compiler" + "gopkg.in/yaml.v3" "regexp" "strings" - - "gopkg.in/yaml.v3" - - "github.com/google/gnostic/compiler" ) // Version returns the package name (and OpenAPI version). @@ -3433,24 +3431,6 @@ func NewReference(in *yaml.Node, context *compiler.Context) (*Reference, error) errors = append(errors, compiler.NewError(context, message)) } } - // string summary = 2; - v2 := compiler.MapValueForKey(m, "summary") - if v2 != nil { - x.Summary, ok = compiler.StringForScalarNode(v2) - if !ok { - message := fmt.Sprintf("has unexpected value for summary: %s", compiler.Display(v2)) - errors = append(errors, compiler.NewError(context, message)) - } - } - // string description = 3; - v3 := compiler.MapValueForKey(m, "description") - if v3 != nil { - x.Description, ok = compiler.StringForScalarNode(v3) - if !ok { - message := fmt.Sprintf("has unexpected value for description: %s", compiler.Display(v3)) - errors = append(errors, compiler.NewError(context, message)) - } - } } return x, compiler.NewErrorGroupOrNil(errors) } @@ -6207,13 +6187,6 @@ func (m *Reference) ResolveReferences(root string) (*yaml.Node, error) { if err != nil { return nil, err } - if info != nil { - replacement, err := NewReference(info, nil) - if err == nil { - *m = *replacement - return m.ResolveReferences(root) - } - } return info, nil } return nil, compiler.NewErrorGroupOrNil(errors) @@ -8004,14 +7977,6 @@ func (m *Reference) ToRawInfo() *yaml.Node { // always include this required field. info.Content = append(info.Content, compiler.NewScalarNodeForString("$ref")) info.Content = append(info.Content, compiler.NewScalarNodeForString(m.XRef)) - if m.Summary != "" { - info.Content = append(info.Content, compiler.NewScalarNodeForString("summary")) - info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Summary)) - } - if m.Description != "" { - info.Content = append(info.Content, compiler.NewScalarNodeForString("description")) - info.Content = append(info.Content, compiler.NewScalarNodeForString(m.Description)) - } return info } diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/openapiv3/OpenAPIv3.pb.go b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv3/OpenAPIv3.pb.go similarity index 91% rename from cluster-autoscaler/vendor/github.com/google/gnostic/openapiv3/OpenAPIv3.pb.go rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv3/OpenAPIv3.pb.go index 499e7f932d79..720fca23a550 100644 --- a/cluster-autoscaler/vendor/github.com/google/gnostic/openapiv3/OpenAPIv3.pb.go +++ b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv3/OpenAPIv3.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.18.1 +// protoc v3.15.5 // source: openapiv3/OpenAPIv3.proto package openapi_v3 @@ -3995,9 +3995,7 @@ type Reference struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - XRef string `protobuf:"bytes,1,opt,name=_ref,json=Ref,proto3" json:"_ref,omitempty"` - Summary string `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"` - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + XRef string `protobuf:"bytes,1,opt,name=_ref,json=Ref,proto3" json:"_ref,omitempty"` } func (x *Reference) Reset() { @@ -4039,20 +4037,6 @@ func (x *Reference) GetXRef() string { return "" } -func (x *Reference) GetSummary() string { - if x != nil { - return x.Summary - } - return "" -} - -func (x *Reference) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - type RequestBodiesOrReferences struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -6451,321 +6435,317 @@ var file_openapiv3_OpenAPIv3_proto_rawDesc = []byte{ 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, - 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x5a, 0x0a, 0x09, 0x52, 0x65, 0x66, 0x65, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x1e, 0x0a, 0x09, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x11, 0x0a, 0x04, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x52, 0x65, 0x66, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, - 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, - 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x79, 0x0a, 0x19, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, - 0x6f, 0x64, 0x69, 0x65, 0x73, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, - 0x73, 0x12, 0x5c, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, - 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, - 0x6d, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x4f, 0x72, - 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, - 0xcc, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x12, - 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x30, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, - 0x4d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, - 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, - 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x96, - 0x01, 0x0a, 0x16, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x4f, 0x72, - 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x3c, 0x0a, 0x0c, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x35, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x52, 0x65, 0x66, 0x22, 0x79, 0x0a, 0x19, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x69, 0x65, 0x73, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, + 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x5c, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, + 0x64, 0x79, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x14, 0x61, + 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x69, 0x65, 0x73, 0x22, 0xcc, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, + 0x6f, 0x64, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x07, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, + 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, + 0x72, 0x65, 0x64, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x22, 0x96, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, + 0x64, 0x79, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x3c, 0x0a, + 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, + 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x48, 0x00, 0x52, 0x0b, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x35, 0x0a, 0x09, 0x72, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x9d, 0x02, 0x0a, 0x08, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x07, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x07, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x30, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x07, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x05, 0x6c, 0x69, 0x6e, 0x6b, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, + 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x05, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x12, 0x4d, 0x0a, 0x17, + 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, + 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x89, 0x01, 0x0a, 0x13, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x08, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x07, - 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x9d, 0x02, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4f, 0x72, 0x52, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x12, 0x30, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, - 0x4d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x05, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, - 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, - 0x73, 0x52, 0x05, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, - 0x16, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x89, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, - 0x32, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, - 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x6f, 0x6e, - 0x65, 0x6f, 0x66, 0x22, 0xef, 0x01, 0x0a, 0x09, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x73, 0x12, 0x39, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x58, 0x0a, 0x15, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x66, 0x65, - 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x70, - 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, - 0x65, 0x52, 0x13, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4f, 0x72, 0x52, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x72, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x73, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x59, - 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, - 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, - 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xaf, 0x0b, 0x0a, 0x06, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, - 0x12, 0x3f, 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, - 0x6f, 0x72, 0x52, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, - 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x1d, - 0x0a, 0x0a, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x09, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x21, 0x0a, - 0x03, 0x78, 0x6d, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65, - 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x58, 0x6d, 0x6c, 0x52, 0x03, 0x78, 0x6d, 0x6c, - 0x12, 0x3d, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, - 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, - 0x73, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x12, - 0x29, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0xef, 0x01, 0x0a, 0x09, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4f, 0x72, 0x52, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x12, 0x58, 0x0a, 0x15, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6f, 0x72, 0x5f, + 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, + 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x13, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4f, + 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, + 0x79, 0x52, 0x16, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x72, 0x0a, 0x15, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x73, 0x12, 0x59, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, + 0x61, 0x6d, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4f, 0x72, 0x52, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xaf, 0x0b, + 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x75, 0x6c, 0x6c, + 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e, 0x75, 0x6c, 0x6c, + 0x61, 0x62, 0x6c, 0x65, 0x12, 0x3f, 0x0a, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, + 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, + 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, + 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, + 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, + 0x6c, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x6e, 0x6c, + 0x79, 0x12, 0x21, 0x0a, 0x03, 0x78, 0x6d, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, + 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x58, 0x6d, 0x6c, 0x52, + 0x03, 0x78, 0x6d, 0x6c, 0x12, 0x3d, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, + 0x6f, 0x63, 0x73, 0x12, 0x29, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x33, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x1e, + 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x14, + 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, + 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, + 0x5f, 0x6f, 0x66, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, + 0x70, 0x6c, 0x65, 0x4f, 0x66, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, + 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x61, 0x78, + 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, + 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, + 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, + 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, + 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0e, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x69, 0x6e, 0x69, + 0x6d, 0x75, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x11, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, + 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, + 0x6d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, + 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x69, 0x6e, + 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x5f, + 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x6e, 0x69, + 0x71, 0x75, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, + 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, + 0x25, 0x0a, 0x0e, 0x6d, 0x69, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, + 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6d, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, + 0x65, 0x64, 0x18, 0x17, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, + 0x65, 0x64, 0x12, 0x23, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x18, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x6e, - 0x79, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, - 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, - 0x74, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, - 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x6f, 0x66, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x4f, - 0x66, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, - 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, - 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, - 0x65, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x69, - 0x6d, 0x75, 0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, - 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, - 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, - 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, - 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0f, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1d, - 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x10, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x18, 0x0a, - 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69, - 0x74, 0x65, 0x6d, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x49, - 0x74, 0x65, 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, - 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, - 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d, - 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, - 0x74, 0x65, 0x6d, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x6f, 0x70, - 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6d, 0x61, - 0x78, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, - 0x69, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x16, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6d, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, - 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x17, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x23, - 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x18, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x04, 0x65, - 0x6e, 0x75, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x19, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x61, 0x6c, 0x6c, 0x5f, 0x6f, - 0x66, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x79, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x19, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x61, + 0x6c, 0x6c, 0x5f, 0x6f, 0x66, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, + 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x61, 0x6c, 0x6c, 0x4f, + 0x66, 0x12, 0x34, 0x0a, 0x06, 0x6f, 0x6e, 0x65, 0x5f, 0x6f, 0x66, 0x18, 0x1b, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x52, 0x05, 0x6f, 0x6e, 0x65, 0x4f, 0x66, 0x12, 0x34, 0x0a, 0x06, 0x61, 0x6e, 0x79, 0x5f, 0x6f, + 0x66, 0x18, 0x1c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x72, 0x52, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x61, 0x6c, 0x6c, 0x4f, 0x66, 0x12, 0x34, 0x0a, - 0x06, 0x6f, 0x6e, 0x65, 0x5f, 0x6f, 0x66, 0x18, 0x1b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, - 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x6f, 0x6e, - 0x65, 0x4f, 0x66, 0x12, 0x34, 0x0a, 0x06, 0x61, 0x6e, 0x79, 0x5f, 0x6f, 0x66, 0x18, 0x1c, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, - 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x52, 0x05, 0x61, 0x6e, 0x79, 0x4f, 0x66, 0x12, 0x24, 0x0a, 0x03, 0x6e, 0x6f, 0x74, - 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x03, 0x6e, 0x6f, 0x74, 0x12, - 0x2b, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x74, 0x65, 0x6d, - 0x73, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x0a, - 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, - 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x69, 0x65, 0x73, 0x12, 0x59, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x20, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, - 0x2e, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, - 0x72, 0x74, 0x69, 0x65, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, - 0x31, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x22, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x23, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x4d, 0x0a, 0x17, - 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x24, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, - 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x81, 0x01, 0x0a, 0x11, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, - 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x48, 0x00, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, - 0x35, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x61, 0x6e, 0x79, 0x4f, 0x66, 0x12, 0x24, 0x0a, + 0x03, 0x6e, 0x6f, 0x74, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x03, + 0x6e, 0x6f, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, - 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, 0x09, 0x72, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, - 0x6e, 0x0a, 0x13, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, - 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x57, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x72, - 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, - 0x68, 0x0a, 0x13, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, - 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x51, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x41, 0x72, - 0x72, 0x61, 0x79, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xd3, 0x02, 0x0a, 0x0e, 0x53, 0x65, - 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x23, - 0x0a, 0x0d, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x46, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x12, 0x2c, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, - 0x4f, 0x61, 0x75, 0x74, 0x68, 0x46, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x05, 0x66, 0x6c, 0x6f, 0x77, - 0x73, 0x12, 0x2d, 0x0a, 0x13, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x69, 0x64, 0x5f, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, - 0x6f, 0x70, 0x65, 0x6e, 0x49, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x55, 0x72, 0x6c, - 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, - 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, - 0xa2, 0x01, 0x0a, 0x19, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x65, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x45, 0x0a, - 0x0f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x00, - 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x6f, - 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x7e, 0x0a, 0x1b, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x73, 0x12, 0x5f, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, - 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, - 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x65, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x14, - 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x69, 0x65, 0x73, 0x22, 0xc6, 0x01, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, - 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, - 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, - 0x6c, 0x65, 0x73, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x4d, - 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, - 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xaf, 0x01, - 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, - 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x20, - 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x74, 0x65, 0x6d, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x12, 0x36, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x1f, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x52, 0x0a, 0x70, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x59, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, + 0x73, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x14, 0x61, + 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x69, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x21, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x33, 0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x64, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x22, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x18, 0x23, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x24, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, - 0x67, 0x0a, 0x0f, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, - 0x65, 0x73, 0x12, 0x54, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, - 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, - 0x61, 0x6d, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, - 0x6c, 0x65, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, - 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x71, 0x0a, 0x16, 0x53, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x01, 0x48, 0x00, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x07, - 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, - 0x07, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x12, 0x18, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x42, 0x07, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x23, 0x0a, 0x0b, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x22, 0x57, 0x0a, 0x07, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x4c, 0x0a, 0x15, 0x61, - 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x70, 0x65, - 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xc9, 0x01, 0x0a, 0x03, 0x54, 0x61, - 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x81, 0x01, 0x0a, 0x11, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x33, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x48, 0x00, 0x52, 0x06, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x12, 0x35, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, + 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x6f, 0x6e, + 0x65, 0x6f, 0x66, 0x22, 0x6e, 0x0a, 0x13, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x4f, 0x72, + 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x57, 0x0a, 0x15, 0x61, 0x64, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x14, 0x61, + 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x69, 0x65, 0x73, 0x22, 0x68, 0x0a, 0x13, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x51, 0x0a, 0x15, 0x61, 0x64, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x41, 0x72, 0x72, 0x61, 0x79, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xd3, 0x02, + 0x0a, 0x0e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, + 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x5f, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x65, 0x61, 0x72, 0x65, + 0x72, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x2c, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x77, 0x73, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x46, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x05, + 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, 0x2d, 0x0a, 0x13, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x69, 0x64, + 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x10, 0x6f, 0x70, 0x65, 0x6e, 0x49, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x55, 0x72, 0x6c, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x22, 0xa2, 0x01, 0x0a, 0x19, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x12, 0x45, 0x0a, 0x0f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, + 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x48, 0x00, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, + 0x07, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x7e, 0x0a, 0x1b, 0x53, 0x65, 0x63, 0x75, + 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x4f, 0x72, 0x52, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x5f, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x4f, 0x72, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xc6, 0x01, 0x0a, 0x06, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, - 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x78, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xd6, 0x01, 0x0a, 0x03, 0x58, 0x6d, 0x6c, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x61, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x12, - 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, - 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x3e, - 0x0a, 0x0e, 0x6f, 0x72, 0x67, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x33, - 0x42, 0x0c, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x50, 0x49, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x16, 0x2e, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x33, 0x3b, 0x6f, 0x70, - 0x65, 0x6e, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x33, 0xa2, 0x02, 0x03, 0x4f, 0x41, 0x53, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, + 0x62, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, + 0x65, 0x73, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, + 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x22, 0xaf, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x56, 0x61, 0x72, 0x69, + 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x22, 0x67, 0x0a, 0x0f, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x56, 0x61, 0x72, + 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x54, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x56, 0x61, + 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x71, 0x0a, 0x16, + 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x12, 0x1a, 0x0a, 0x07, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x48, 0x00, 0x52, 0x07, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x12, 0x18, 0x0a, 0x06, + 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, + 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x07, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, + 0x23, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0x57, 0x0a, 0x07, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x12, + 0x4c, 0x0a, 0x15, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, + 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x14, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0xc9, 0x01, + 0x0a, 0x03, 0x54, 0x61, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x0d, 0x65, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, + 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x52, 0x0c, 0x65, 0x78, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, + 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, + 0x79, 0x52, 0x16, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xd6, 0x01, 0x0a, 0x03, 0x58, 0x6d, + 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x1c, 0x0a, 0x09, 0x61, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, + 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x72, 0x61, + 0x70, 0x70, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x77, 0x72, 0x61, 0x70, + 0x70, 0x65, 0x64, 0x12, 0x4d, 0x0a, 0x17, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x33, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x41, 0x6e, 0x79, 0x52, 0x16, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x42, 0x3e, 0x0a, 0x0e, 0x6f, 0x72, 0x67, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x5f, 0x76, 0x33, 0x42, 0x0c, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x50, 0x49, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x16, 0x2e, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x33, 0x3b, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x33, 0xa2, 0x02, 0x03, 0x4f, + 0x41, 0x53, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/openapiv3/OpenAPIv3.proto b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv3/OpenAPIv3.proto similarity index 99% rename from cluster-autoscaler/vendor/github.com/google/gnostic/openapiv3/OpenAPIv3.proto rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv3/OpenAPIv3.proto index 1be335b89ba0..cb4b133f90e5 100644 --- a/cluster-autoscaler/vendor/github.com/google/gnostic/openapiv3/OpenAPIv3.proto +++ b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv3/OpenAPIv3.proto @@ -485,8 +485,6 @@ message Properties { // A simple object to allow referencing other components in the specification, internally and externally. The Reference Object is defined by JSON Reference and follows the same structure, behavior and rules. For this specification, reference resolution is accomplished as defined by the JSON Reference specification and not by the JSON Schema specification. message Reference { string _ref = 1; - string summary = 2; - string description = 3; } message RequestBodiesOrReferences { diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/openapiv3/README.md b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv3/README.md similarity index 100% rename from cluster-autoscaler/vendor/github.com/google/gnostic/openapiv3/README.md rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv3/README.md diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/openapiv3/document.go b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv3/document.go similarity index 96% rename from cluster-autoscaler/vendor/github.com/google/gnostic/openapiv3/document.go rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv3/document.go index ef10d1d90964..999f7fd29602 100644 --- a/cluster-autoscaler/vendor/github.com/google/gnostic/openapiv3/document.go +++ b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv3/document.go @@ -15,9 +15,8 @@ package openapi_v3 import ( + "github.com/googleapis/gnostic/compiler" "gopkg.in/yaml.v3" - - "github.com/google/gnostic/compiler" ) // ParseDocument reads an OpenAPI v3 description from a YAML/JSON representation. diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/openapiv3/openapi-3.0.json b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv3/openapi-3.0.json similarity index 99% rename from cluster-autoscaler/vendor/github.com/google/gnostic/openapiv3/openapi-3.0.json rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv3/openapi-3.0.json index d5caed162d8f..aad0d1b65e44 100644 --- a/cluster-autoscaler/vendor/github.com/google/gnostic/openapiv3/openapi-3.0.json +++ b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv3/openapi-3.0.json @@ -704,12 +704,6 @@ "properties": { "$ref": { "type": "string" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" } } }, diff --git a/cluster-autoscaler/vendor/github.com/google/gnostic/openapiv3/openapi-3.1.json b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv3/openapi-3.1.json similarity index 99% rename from cluster-autoscaler/vendor/github.com/google/gnostic/openapiv3/openapi-3.1.json rename to cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv3/openapi-3.1.json index ed0b83adf4dc..9af27be66864 100644 --- a/cluster-autoscaler/vendor/github.com/google/gnostic/openapiv3/openapi-3.1.json +++ b/cluster-autoscaler/vendor/github.com/googleapis/gnostic/openapiv3/openapi-3.1.json @@ -88,7 +88,7 @@ }, "summary": { "type": "string" - } + }, } }, "contact": { @@ -707,12 +707,6 @@ "properties": { "$ref": { "type": "string" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" } } }, diff --git a/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/go.mod b/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/go.mod index 1cc3efcf7482..9749ea96d9d5 100644 --- a/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/go.mod +++ b/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/go.mod @@ -1,5 +1,5 @@ module github.com/moby/sys/mountinfo -go 1.16 +go 1.14 -require golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359 +require golang.org/x/sys v0.0.0-20200909081042-eff7692f9009 diff --git a/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/go.sum b/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/go.sum index c257a6a29d54..2a5be7ea8438 100644 --- a/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/go.sum +++ b/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/go.sum @@ -1,2 +1,2 @@ -golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359 h1:2B5p2L5IfGiD7+b9BOoRMC6DgObAVZV+Fsp050NqXik= -golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20200909081042-eff7692f9009 h1:W0lCpv29Hv0UaM1LXb9QlBHLNP8UFfcKjblhVCWftOM= +golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/mounted_linux.go b/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/mounted_linux.go index bf221e687f17..bc9f6b2ad3d7 100644 --- a/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/mounted_linux.go +++ b/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/mounted_linux.go @@ -7,34 +7,6 @@ import ( "golang.org/x/sys/unix" ) -// MountedFast is a method of detecting a mount point without reading -// mountinfo from procfs. A caller can only trust the result if no error -// and sure == true are returned. Otherwise, other methods (e.g. parsing -// /proc/mounts) have to be used. If unsure, use Mounted instead (which -// uses MountedFast, but falls back to parsing mountinfo if needed). -// -// If a non-existent path is specified, an appropriate error is returned. -// In case the caller is not interested in this particular error, it should -// be handled separately using e.g. errors.Is(err, os.ErrNotExist). -// -// This function is only available on Linux. When available (since kernel -// v5.6), openat2(2) syscall is used to reliably detect all mounts. Otherwise, -// the implementation falls back to using stat(2), which can reliably detect -// normal (but not bind) mounts. -func MountedFast(path string) (mounted, sure bool, err error) { - // Root is always mounted. - if path == string(os.PathSeparator) { - return true, true, nil - } - - path, err = normalizePath(path) - if err != nil { - return false, false, err - } - mounted, sure, err = mountedFast(path) - return -} - // mountedByOpenat2 is a method of detecting a mount that works for all kinds // of mounts (incl. bind mounts), but requires a recent (v5.6+) linux kernel. func mountedByOpenat2(path string) (bool, error) { @@ -44,6 +16,9 @@ func mountedByOpenat2(path string) (bool, error) { Flags: unix.O_PATH | unix.O_CLOEXEC, }) if err != nil { + if err == unix.ENOENT { // not a mount + return false, nil + } return false, &os.PathError{Op: "openat2", Path: dir, Err: err} } fd, err := unix.Openat2(dirfd, last, &unix.OpenHow{ @@ -51,51 +26,33 @@ func mountedByOpenat2(path string) (bool, error) { Resolve: unix.RESOLVE_NO_XDEV, }) _ = unix.Close(dirfd) - switch err { //nolint:errorlint // unix errors are bare + switch err { case nil: // definitely not a mount _ = unix.Close(fd) return false, nil case unix.EXDEV: // definitely a mount return true, nil + case unix.ENOENT: // not a mount + return false, nil } // not sure return false, &os.PathError{Op: "openat2", Path: path, Err: err} } -// mountedFast is similar to MountedFast, except it expects a normalized path. -func mountedFast(path string) (mounted, sure bool, err error) { - // Root is always mounted. - if path == string(os.PathSeparator) { - return true, true, nil - } - +func mounted(path string) (bool, error) { // Try a fast path, using openat2() with RESOLVE_NO_XDEV. - mounted, err = mountedByOpenat2(path) + mounted, err := mountedByOpenat2(path) if err == nil { - return mounted, true, nil + return mounted, nil } - // Another fast path: compare st.st_dev fields. mounted, err = mountedByStat(path) // This does not work for bind mounts, so false negative // is possible, therefore only trust if return is true. if mounted && err == nil { - return true, true, nil - } - - return -} - -func mounted(path string) (bool, error) { - path, err := normalizePath(path) - if err != nil { - return false, err - } - mounted, sure, err := mountedFast(path) - if sure && err == nil { return mounted, nil } - // Fallback to parsing mountinfo. + // Fallback to parsing mountinfo return mountedByMountinfo(path) } diff --git a/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/mounted_unix.go b/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/mounted_unix.go index 45ddad236f34..efb03978b1e3 100644 --- a/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/mounted_unix.go +++ b/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/mounted_unix.go @@ -1,9 +1,9 @@ -//go:build linux || (freebsd && cgo) || (openbsd && cgo) || (darwin && cgo) -// +build linux freebsd,cgo openbsd,cgo darwin,cgo +// +build linux freebsd,cgo openbsd,cgo package mountinfo import ( + "errors" "fmt" "os" "path/filepath" @@ -15,6 +15,10 @@ func mountedByStat(path string) (bool, error) { var st unix.Stat_t if err := unix.Lstat(path, &st); err != nil { + if err == unix.ENOENT { + // Treat ENOENT as "not mounted". + return false, nil + } return false, &os.PathError{Op: "stat", Path: path, Err: err} } dev := st.Dev @@ -45,6 +49,14 @@ func normalizePath(path string) (realPath string, err error) { } func mountedByMountinfo(path string) (bool, error) { + path, err := normalizePath(path) + if err != nil { + if errors.Is(err, unix.ENOENT) { + // treat ENOENT as "not mounted" + return false, nil + } + return false, err + } entries, err := GetMounts(SingleEntryFilter(path)) if err != nil { return false, err diff --git a/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/mountinfo.go b/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/mountinfo.go index c7e5cb42aca3..403a893310b4 100644 --- a/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/mountinfo.go +++ b/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/mountinfo.go @@ -10,12 +10,11 @@ func GetMounts(f FilterFunc) ([]*Info, error) { return parseMountTable(f) } -// Mounted determines if a specified path is a mount point. In case of any -// error, false (and an error) is returned. +// Mounted determines if a specified path is a mount point. // -// If a non-existent path is specified, an appropriate error is returned. -// In case the caller is not interested in this particular error, it should -// be handled separately using e.g. errors.Is(err, os.ErrNotExist). +// The argument must be an absolute path, with all symlinks resolved, and clean. +// One way to ensure it is to process the path using filepath.Abs followed by +// filepath.EvalSymlinks before calling this function. func Mounted(path string) (bool, error) { // root is always mounted if path == string(os.PathSeparator) { diff --git a/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/mountinfo_bsd.go b/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/mountinfo_bsd.go index d5513a26d2fa..b1c12d02b51e 100644 --- a/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/mountinfo_bsd.go +++ b/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/mountinfo_bsd.go @@ -1,5 +1,4 @@ -//go:build (freebsd && cgo) || (openbsd && cgo) || (darwin && cgo) -// +build freebsd,cgo openbsd,cgo darwin,cgo +// +build freebsd,cgo openbsd,cgo package mountinfo @@ -22,7 +21,7 @@ func parseMountTable(filter FilterFunc) ([]*Info, error) { count := int(C.getmntinfo(&rawEntries, C.MNT_WAIT)) if count == 0 { - return nil, fmt.Errorf("failed to call getmntinfo") + return nil, fmt.Errorf("Failed to call getmntinfo") } var entries []C.struct_statfs @@ -56,10 +55,6 @@ func parseMountTable(filter FilterFunc) ([]*Info, error) { } func mounted(path string) (bool, error) { - path, err := normalizePath(path) - if err != nil { - return false, err - } // Fast path: compare st.st_dev fields. // This should always work for FreeBSD and OpenBSD. mounted, err := mountedByStat(path) diff --git a/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/mountinfo_linux.go b/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/mountinfo_linux.go index 59332b07bf4b..f09a70fa0d9d 100644 --- a/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/mountinfo_linux.go +++ b/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/mountinfo_linux.go @@ -52,7 +52,7 @@ func GetMountsFromReader(r io.Reader, filter FilterFunc) ([]*Info, error) { numFields := len(fields) if numFields < 10 { // should be at least 10 fields - return nil, fmt.Errorf("parsing '%s' failed: not enough fields (%d)", text, numFields) + return nil, fmt.Errorf("Parsing '%s' failed: not enough fields (%d)", text, numFields) } // separator field @@ -67,7 +67,7 @@ func GetMountsFromReader(r io.Reader, filter FilterFunc) ([]*Info, error) { for fields[sepIdx] != "-" { sepIdx-- if sepIdx == 5 { - return nil, fmt.Errorf("parsing '%s' failed: missing - separator", text) + return nil, fmt.Errorf("Parsing '%s' failed: missing - separator", text) } } @@ -75,39 +75,46 @@ func GetMountsFromReader(r io.Reader, filter FilterFunc) ([]*Info, error) { p.Mountpoint, err = unescape(fields[4]) if err != nil { - return nil, fmt.Errorf("parsing '%s' failed: mount point: %w", fields[4], err) + return nil, fmt.Errorf("Parsing '%s' failed: mount point: %w", fields[4], err) } p.FSType, err = unescape(fields[sepIdx+1]) if err != nil { - return nil, fmt.Errorf("parsing '%s' failed: fstype: %w", fields[sepIdx+1], err) + return nil, fmt.Errorf("Parsing '%s' failed: fstype: %w", fields[sepIdx+1], err) } p.Source, err = unescape(fields[sepIdx+2]) if err != nil { - return nil, fmt.Errorf("parsing '%s' failed: source: %w", fields[sepIdx+2], err) + return nil, fmt.Errorf("Parsing '%s' failed: source: %w", fields[sepIdx+2], err) } p.VFSOptions = fields[sepIdx+3] // ignore any numbers parsing errors, as there should not be any p.ID, _ = strconv.Atoi(fields[0]) p.Parent, _ = strconv.Atoi(fields[1]) - mm := strings.SplitN(fields[2], ":", 3) + mm := strings.Split(fields[2], ":") if len(mm) != 2 { - return nil, fmt.Errorf("parsing '%s' failed: unexpected major:minor pair %s", text, mm) + return nil, fmt.Errorf("Parsing '%s' failed: unexpected minor:major pair %s", text, mm) } p.Major, _ = strconv.Atoi(mm[0]) p.Minor, _ = strconv.Atoi(mm[1]) p.Root, err = unescape(fields[3]) if err != nil { - return nil, fmt.Errorf("parsing '%s' failed: root: %w", fields[3], err) + return nil, fmt.Errorf("Parsing '%s' failed: root: %w", fields[3], err) } p.Options = fields[5] // zero or more optional fields - p.Optional = strings.Join(fields[6:sepIdx], " ") + switch { + case sepIdx == 6: + // zero, do nothing + case sepIdx == 7: + p.Optional = fields[6] + default: + p.Optional = strings.Join(fields[6:sepIdx-1], " ") + } - // Run the filter after parsing all fields. + // Run the filter after parsing all of the fields. var skip, stop bool if filter != nil { skip, stop = filter(p) diff --git a/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/mountinfo_unsupported.go b/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/mountinfo_unsupported.go index 95769a76dadb..d33ebca09688 100644 --- a/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/mountinfo_unsupported.go +++ b/cluster-autoscaler/vendor/github.com/moby/sys/mountinfo/mountinfo_unsupported.go @@ -1,5 +1,4 @@ -//go:build (!windows && !linux && !freebsd && !openbsd && !darwin) || (freebsd && !cgo) || (openbsd && !cgo) || (darwin && !cgo) -// +build !windows,!linux,!freebsd,!openbsd,!darwin freebsd,!cgo openbsd,!cgo darwin,!cgo +// +build !windows,!linux,!freebsd,!openbsd freebsd,!cgo openbsd,!cgo package mountinfo diff --git a/cluster-autoscaler/vendor/github.com/moby/term/.gitignore b/cluster-autoscaler/vendor/github.com/moby/term/.gitignore new file mode 100644 index 000000000000..b0747ff010a7 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/moby/term/.gitignore @@ -0,0 +1,8 @@ +# if you want to ignore files created by your editor/tools, consider using a +# global .gitignore or .git/info/exclude see https://help.github.com/articles/ignoring-files +.* +!.github +!.gitignore +profile.out +# support running go modules in vendor mode for local development +vendor/ diff --git a/cluster-autoscaler/vendor/github.com/moby/term/LICENSE b/cluster-autoscaler/vendor/github.com/moby/term/LICENSE new file mode 100644 index 000000000000..6d8d58fb676b --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/moby/term/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2013-2018 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/cluster-autoscaler/vendor/github.com/moby/term/README.md b/cluster-autoscaler/vendor/github.com/moby/term/README.md new file mode 100644 index 000000000000..0ce92cc33980 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/moby/term/README.md @@ -0,0 +1,36 @@ +# term - utilities for dealing with terminals + +![Test](https://github.com/moby/term/workflows/Test/badge.svg) [![GoDoc](https://godoc.org/github.com/moby/term?status.svg)](https://godoc.org/github.com/moby/term) [![Go Report Card](https://goreportcard.com/badge/github.com/moby/term)](https://goreportcard.com/report/github.com/moby/term) + +term provides structures and helper functions to work with terminal (state, sizes). + +#### Using term + +```go +package main + +import ( + "log" + "os" + + "github.com/moby/term" +) + +func main() { + fd := os.Stdin.Fd() + if term.IsTerminal(fd) { + ws, err := term.GetWinsize(fd) + if err != nil { + log.Fatalf("term.GetWinsize: %s", err) + } + log.Printf("%d:%d\n", ws.Height, ws.Width) + } +} +``` + +## Contributing + +Want to hack on term? [Docker's contributions guidelines](https://github.com/docker/docker/blob/master/CONTRIBUTING.md) apply. + +## Copyright and license +Code and documentation copyright 2015 Docker, inc. Code released under the Apache 2.0 license. Docs released under Creative commons. diff --git a/cluster-autoscaler/vendor/github.com/moby/term/ascii.go b/cluster-autoscaler/vendor/github.com/moby/term/ascii.go new file mode 100644 index 000000000000..55873c0556c9 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/moby/term/ascii.go @@ -0,0 +1,66 @@ +package term + +import ( + "fmt" + "strings" +) + +// ASCII list the possible supported ASCII key sequence +var ASCII = []string{ + "ctrl-@", + "ctrl-a", + "ctrl-b", + "ctrl-c", + "ctrl-d", + "ctrl-e", + "ctrl-f", + "ctrl-g", + "ctrl-h", + "ctrl-i", + "ctrl-j", + "ctrl-k", + "ctrl-l", + "ctrl-m", + "ctrl-n", + "ctrl-o", + "ctrl-p", + "ctrl-q", + "ctrl-r", + "ctrl-s", + "ctrl-t", + "ctrl-u", + "ctrl-v", + "ctrl-w", + "ctrl-x", + "ctrl-y", + "ctrl-z", + "ctrl-[", + "ctrl-\\", + "ctrl-]", + "ctrl-^", + "ctrl-_", +} + +// ToBytes converts a string representing a suite of key-sequence to the corresponding ASCII code. +func ToBytes(keys string) ([]byte, error) { + codes := []byte{} +next: + for _, key := range strings.Split(keys, ",") { + if len(key) != 1 { + for code, ctrl := range ASCII { + if ctrl == key { + codes = append(codes, byte(code)) + continue next + } + } + if key == "DEL" { + codes = append(codes, 127) + } else { + return nil, fmt.Errorf("Unknown character: '%s'", key) + } + } else { + codes = append(codes, key[0]) + } + } + return codes, nil +} diff --git a/cluster-autoscaler/vendor/github.com/moby/term/go.mod b/cluster-autoscaler/vendor/github.com/moby/term/go.mod new file mode 100644 index 000000000000..25cef43781a4 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/moby/term/go.mod @@ -0,0 +1,12 @@ +module github.com/moby/term + +go 1.13 + +require ( + github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795 + github.com/creack/pty v1.1.11 + github.com/google/go-cmp v0.4.0 + github.com/pkg/errors v0.9.1 // indirect + golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a + gotest.tools/v3 v3.0.2 +) diff --git a/cluster-autoscaler/vendor/github.com/moby/term/go.sum b/cluster-autoscaler/vendor/github.com/moby/term/go.sum new file mode 100644 index 000000000000..deeff00ee7a3 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/moby/term/go.sum @@ -0,0 +1,23 @@ +github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795 h1:q4kDoSrHgRoD6okimjwWJOVKyxEUNS2JIuwt+EqcIqQ= +github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= +github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a h1:i47hUS795cOydZI4AwJQCKXOr4BvxzvikwDoDtHhP2Y= +golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gotest.tools/v3 v3.0.2 h1:kG1BFyqVHuQoVQiR1bWGnfz/fmHvvuiSPIV7rvl360E= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= diff --git a/cluster-autoscaler/vendor/github.com/moby/term/proxy.go b/cluster-autoscaler/vendor/github.com/moby/term/proxy.go new file mode 100644 index 000000000000..c47756b89a9c --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/moby/term/proxy.go @@ -0,0 +1,88 @@ +package term + +import ( + "io" +) + +// EscapeError is special error which returned by a TTY proxy reader's Read() +// method in case its detach escape sequence is read. +type EscapeError struct{} + +func (EscapeError) Error() string { + return "read escape sequence" +} + +// escapeProxy is used only for attaches with a TTY. It is used to proxy +// stdin keypresses from the underlying reader and look for the passed in +// escape key sequence to signal a detach. +type escapeProxy struct { + escapeKeys []byte + escapeKeyPos int + r io.Reader + buf []byte +} + +// NewEscapeProxy returns a new TTY proxy reader which wraps the given reader +// and detects when the specified escape keys are read, in which case the Read +// method will return an error of type EscapeError. +func NewEscapeProxy(r io.Reader, escapeKeys []byte) io.Reader { + return &escapeProxy{ + escapeKeys: escapeKeys, + r: r, + } +} + +func (r *escapeProxy) Read(buf []byte) (n int, err error) { + if len(r.escapeKeys) > 0 && r.escapeKeyPos == len(r.escapeKeys) { + return 0, EscapeError{} + } + + if len(r.buf) > 0 { + n = copy(buf, r.buf) + r.buf = r.buf[n:] + } + + nr, err := r.r.Read(buf[n:]) + n += nr + if len(r.escapeKeys) == 0 { + return n, err + } + + for i := 0; i < n; i++ { + if buf[i] == r.escapeKeys[r.escapeKeyPos] { + r.escapeKeyPos++ + + // Check if the full escape sequence is matched. + if r.escapeKeyPos == len(r.escapeKeys) { + n = i + 1 - r.escapeKeyPos + if n < 0 { + n = 0 + } + return n, EscapeError{} + } + continue + } + + // If we need to prepend a partial escape sequence from the previous + // read, make sure the new buffer size doesn't exceed len(buf). + // Otherwise, preserve any extra data in a buffer for the next read. + if i < r.escapeKeyPos { + preserve := make([]byte, 0, r.escapeKeyPos+n) + preserve = append(preserve, r.escapeKeys[:r.escapeKeyPos]...) + preserve = append(preserve, buf[:n]...) + n = copy(buf, preserve) + i += r.escapeKeyPos + r.buf = append(r.buf, preserve[n:]...) + } + r.escapeKeyPos = 0 + } + + // If we're in the middle of reading an escape sequence, make sure we don't + // let the caller read it. If later on we find that this is not the escape + // sequence, we'll prepend it back to buf. + n -= r.escapeKeyPos + if n < 0 { + n = 0 + } + return n, err +} diff --git a/cluster-autoscaler/vendor/github.com/moby/term/tc.go b/cluster-autoscaler/vendor/github.com/moby/term/tc.go new file mode 100644 index 000000000000..65556027a6d3 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/moby/term/tc.go @@ -0,0 +1,19 @@ +// +build !windows + +package term + +import ( + "golang.org/x/sys/unix" +) + +func tcget(fd uintptr) (*Termios, error) { + p, err := unix.IoctlGetTermios(int(fd), getTermios) + if err != nil { + return nil, err + } + return p, nil +} + +func tcset(fd uintptr, p *Termios) error { + return unix.IoctlSetTermios(int(fd), setTermios, p) +} diff --git a/cluster-autoscaler/vendor/github.com/moby/term/term.go b/cluster-autoscaler/vendor/github.com/moby/term/term.go new file mode 100644 index 000000000000..29c6acf1c7ef --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/moby/term/term.go @@ -0,0 +1,120 @@ +// +build !windows + +// Package term provides structures and helper functions to work with +// terminal (state, sizes). +package term + +import ( + "errors" + "fmt" + "io" + "os" + "os/signal" + + "golang.org/x/sys/unix" +) + +var ( + // ErrInvalidState is returned if the state of the terminal is invalid. + ErrInvalidState = errors.New("Invalid terminal state") +) + +// State represents the state of the terminal. +type State struct { + termios Termios +} + +// Winsize represents the size of the terminal window. +type Winsize struct { + Height uint16 + Width uint16 + x uint16 + y uint16 +} + +// StdStreams returns the standard streams (stdin, stdout, stderr). +func StdStreams() (stdIn io.ReadCloser, stdOut, stdErr io.Writer) { + return os.Stdin, os.Stdout, os.Stderr +} + +// GetFdInfo returns the file descriptor for an os.File and indicates whether the file represents a terminal. +func GetFdInfo(in interface{}) (uintptr, bool) { + var inFd uintptr + var isTerminalIn bool + if file, ok := in.(*os.File); ok { + inFd = file.Fd() + isTerminalIn = IsTerminal(inFd) + } + return inFd, isTerminalIn +} + +// IsTerminal returns true if the given file descriptor is a terminal. +func IsTerminal(fd uintptr) bool { + _, err := tcget(fd) + return err == nil +} + +// RestoreTerminal restores the terminal connected to the given file descriptor +// to a previous state. +func RestoreTerminal(fd uintptr, state *State) error { + if state == nil { + return ErrInvalidState + } + return tcset(fd, &state.termios) +} + +// SaveState saves the state of the terminal connected to the given file descriptor. +func SaveState(fd uintptr) (*State, error) { + termios, err := tcget(fd) + if err != nil { + return nil, err + } + return &State{termios: *termios}, nil +} + +// DisableEcho applies the specified state to the terminal connected to the file +// descriptor, with echo disabled. +func DisableEcho(fd uintptr, state *State) error { + newState := state.termios + newState.Lflag &^= unix.ECHO + + if err := tcset(fd, &newState); err != nil { + return err + } + handleInterrupt(fd, state) + return nil +} + +// SetRawTerminal puts the terminal connected to the given file descriptor into +// raw mode and returns the previous state. On UNIX, this puts both the input +// and output into raw mode. On Windows, it only puts the input into raw mode. +func SetRawTerminal(fd uintptr) (*State, error) { + oldState, err := MakeRaw(fd) + if err != nil { + return nil, err + } + handleInterrupt(fd, oldState) + return oldState, err +} + +// SetRawTerminalOutput puts the output of terminal connected to the given file +// descriptor into raw mode. On UNIX, this does nothing and returns nil for the +// state. On Windows, it disables LF -> CRLF translation. +func SetRawTerminalOutput(fd uintptr) (*State, error) { + return nil, nil +} + +func handleInterrupt(fd uintptr, state *State) { + sigchan := make(chan os.Signal, 1) + signal.Notify(sigchan, os.Interrupt) + go func() { + for range sigchan { + // quit cleanly and the new terminal item is on a new line + fmt.Println() + signal.Stop(sigchan) + close(sigchan) + RestoreTerminal(fd, state) + os.Exit(1) + } + }() +} diff --git a/cluster-autoscaler/vendor/github.com/moby/term/term_windows.go b/cluster-autoscaler/vendor/github.com/moby/term/term_windows.go new file mode 100644 index 000000000000..ba82960d4a6d --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/moby/term/term_windows.go @@ -0,0 +1,231 @@ +package term + +import ( + "io" + "os" + "os/signal" + + windowsconsole "github.com/moby/term/windows" + "golang.org/x/sys/windows" +) + +// State holds the console mode for the terminal. +type State struct { + mode uint32 +} + +// Winsize is used for window size. +type Winsize struct { + Height uint16 + Width uint16 +} + +// vtInputSupported is true if winterm.ENABLE_VIRTUAL_TERMINAL_INPUT is supported by the console +var vtInputSupported bool + +// StdStreams returns the standard streams (stdin, stdout, stderr). +func StdStreams() (stdIn io.ReadCloser, stdOut, stdErr io.Writer) { + // Turn on VT handling on all std handles, if possible. This might + // fail, in which case we will fall back to terminal emulation. + var ( + emulateStdin, emulateStdout, emulateStderr bool + + mode uint32 + ) + + fd := windows.Handle(os.Stdin.Fd()) + if err := windows.GetConsoleMode(fd, &mode); err == nil { + // Validate that winterm.ENABLE_VIRTUAL_TERMINAL_INPUT is supported, but do not set it. + if err = windows.SetConsoleMode(fd, mode|windows.ENABLE_VIRTUAL_TERMINAL_INPUT); err != nil { + emulateStdin = true + } else { + vtInputSupported = true + } + // Unconditionally set the console mode back even on failure because SetConsoleMode + // remembers invalid bits on input handles. + _ = windows.SetConsoleMode(fd, mode) + } + + fd = windows.Handle(os.Stdout.Fd()) + if err := windows.GetConsoleMode(fd, &mode); err == nil { + // Validate winterm.DISABLE_NEWLINE_AUTO_RETURN is supported, but do not set it. + if err = windows.SetConsoleMode(fd, mode|windows.ENABLE_VIRTUAL_TERMINAL_PROCESSING|windows.DISABLE_NEWLINE_AUTO_RETURN); err != nil { + emulateStdout = true + } else { + _ = windows.SetConsoleMode(fd, mode|windows.ENABLE_VIRTUAL_TERMINAL_PROCESSING) + } + } + + fd = windows.Handle(os.Stderr.Fd()) + if err := windows.GetConsoleMode(fd, &mode); err == nil { + // Validate winterm.DISABLE_NEWLINE_AUTO_RETURN is supported, but do not set it. + if err = windows.SetConsoleMode(fd, mode|windows.ENABLE_VIRTUAL_TERMINAL_PROCESSING|windows.DISABLE_NEWLINE_AUTO_RETURN); err != nil { + emulateStderr = true + } else { + _ = windows.SetConsoleMode(fd, mode|windows.ENABLE_VIRTUAL_TERMINAL_PROCESSING) + } + } + + // Temporarily use STD_INPUT_HANDLE, STD_OUTPUT_HANDLE and + // STD_ERROR_HANDLE from syscall rather than x/sys/windows as long as + // go-ansiterm hasn't switch to x/sys/windows. + // TODO: switch back to x/sys/windows once go-ansiterm has switched + if emulateStdin { + h := uint32(windows.STD_INPUT_HANDLE) + stdIn = windowsconsole.NewAnsiReader(int(h)) + } else { + stdIn = os.Stdin + } + + if emulateStdout { + h := uint32(windows.STD_OUTPUT_HANDLE) + stdOut = windowsconsole.NewAnsiWriter(int(h)) + } else { + stdOut = os.Stdout + } + + if emulateStderr { + h := uint32(windows.STD_ERROR_HANDLE) + stdErr = windowsconsole.NewAnsiWriter(int(h)) + } else { + stdErr = os.Stderr + } + + return +} + +// GetFdInfo returns the file descriptor for an os.File and indicates whether the file represents a terminal. +func GetFdInfo(in interface{}) (uintptr, bool) { + return windowsconsole.GetHandleInfo(in) +} + +// GetWinsize returns the window size based on the specified file descriptor. +func GetWinsize(fd uintptr) (*Winsize, error) { + var info windows.ConsoleScreenBufferInfo + if err := windows.GetConsoleScreenBufferInfo(windows.Handle(fd), &info); err != nil { + return nil, err + } + + winsize := &Winsize{ + Width: uint16(info.Window.Right - info.Window.Left + 1), + Height: uint16(info.Window.Bottom - info.Window.Top + 1), + } + + return winsize, nil +} + +// IsTerminal returns true if the given file descriptor is a terminal. +func IsTerminal(fd uintptr) bool { + var mode uint32 + err := windows.GetConsoleMode(windows.Handle(fd), &mode) + return err == nil +} + +// RestoreTerminal restores the terminal connected to the given file descriptor +// to a previous state. +func RestoreTerminal(fd uintptr, state *State) error { + return windows.SetConsoleMode(windows.Handle(fd), state.mode) +} + +// SaveState saves the state of the terminal connected to the given file descriptor. +func SaveState(fd uintptr) (*State, error) { + var mode uint32 + + if err := windows.GetConsoleMode(windows.Handle(fd), &mode); err != nil { + return nil, err + } + + return &State{mode: mode}, nil +} + +// DisableEcho disables echo for the terminal connected to the given file descriptor. +// -- See https://msdn.microsoft.com/en-us/library/windows/desktop/ms683462(v=vs.85).aspx +func DisableEcho(fd uintptr, state *State) error { + mode := state.mode + mode &^= windows.ENABLE_ECHO_INPUT + mode |= windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT + err := windows.SetConsoleMode(windows.Handle(fd), mode) + if err != nil { + return err + } + + // Register an interrupt handler to catch and restore prior state + restoreAtInterrupt(fd, state) + return nil +} + +// SetRawTerminal puts the terminal connected to the given file descriptor into +// raw mode and returns the previous state. On UNIX, this puts both the input +// and output into raw mode. On Windows, it only puts the input into raw mode. +func SetRawTerminal(fd uintptr) (*State, error) { + state, err := MakeRaw(fd) + if err != nil { + return nil, err + } + + // Register an interrupt handler to catch and restore prior state + restoreAtInterrupt(fd, state) + return state, err +} + +// SetRawTerminalOutput puts the output of terminal connected to the given file +// descriptor into raw mode. On UNIX, this does nothing and returns nil for the +// state. On Windows, it disables LF -> CRLF translation. +func SetRawTerminalOutput(fd uintptr) (*State, error) { + state, err := SaveState(fd) + if err != nil { + return nil, err + } + + // Ignore failures, since winterm.DISABLE_NEWLINE_AUTO_RETURN might not be supported on this + // version of Windows. + _ = windows.SetConsoleMode(windows.Handle(fd), state.mode|windows.DISABLE_NEWLINE_AUTO_RETURN) + return state, err +} + +// MakeRaw puts the terminal (Windows Console) connected to the given file descriptor into raw +// mode and returns the previous state of the terminal so that it can be restored. +func MakeRaw(fd uintptr) (*State, error) { + state, err := SaveState(fd) + if err != nil { + return nil, err + } + + mode := state.mode + + // See + // -- https://msdn.microsoft.com/en-us/library/windows/desktop/ms686033(v=vs.85).aspx + // -- https://msdn.microsoft.com/en-us/library/windows/desktop/ms683462(v=vs.85).aspx + + // Disable these modes + mode &^= windows.ENABLE_ECHO_INPUT + mode &^= windows.ENABLE_LINE_INPUT + mode &^= windows.ENABLE_MOUSE_INPUT + mode &^= windows.ENABLE_WINDOW_INPUT + mode &^= windows.ENABLE_PROCESSED_INPUT + + // Enable these modes + mode |= windows.ENABLE_EXTENDED_FLAGS + mode |= windows.ENABLE_INSERT_MODE + mode |= windows.ENABLE_QUICK_EDIT_MODE + if vtInputSupported { + mode |= windows.ENABLE_VIRTUAL_TERMINAL_INPUT + } + + err = windows.SetConsoleMode(windows.Handle(fd), mode) + if err != nil { + return nil, err + } + return state, nil +} + +func restoreAtInterrupt(fd uintptr, state *State) { + sigchan := make(chan os.Signal, 1) + signal.Notify(sigchan, os.Interrupt) + + go func() { + _ = <-sigchan + _ = RestoreTerminal(fd, state) + os.Exit(0) + }() +} diff --git a/cluster-autoscaler/vendor/github.com/moby/term/termios.go b/cluster-autoscaler/vendor/github.com/moby/term/termios.go new file mode 100644 index 000000000000..0f028e2273ac --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/moby/term/termios.go @@ -0,0 +1,35 @@ +// +build !windows + +package term + +import ( + "golang.org/x/sys/unix" +) + +// Termios is the Unix API for terminal I/O. +type Termios = unix.Termios + +// MakeRaw puts the terminal connected to the given file descriptor into raw +// mode and returns the previous state of the terminal so that it can be +// restored. +func MakeRaw(fd uintptr) (*State, error) { + termios, err := tcget(fd) + if err != nil { + return nil, err + } + + oldState := State{termios: *termios} + + termios.Iflag &^= (unix.IGNBRK | unix.BRKINT | unix.PARMRK | unix.ISTRIP | unix.INLCR | unix.IGNCR | unix.ICRNL | unix.IXON) + termios.Oflag &^= unix.OPOST + termios.Lflag &^= (unix.ECHO | unix.ECHONL | unix.ICANON | unix.ISIG | unix.IEXTEN) + termios.Cflag &^= (unix.CSIZE | unix.PARENB) + termios.Cflag |= unix.CS8 + termios.Cc[unix.VMIN] = 1 + termios.Cc[unix.VTIME] = 0 + + if err := tcset(fd, termios); err != nil { + return nil, err + } + return &oldState, nil +} diff --git a/cluster-autoscaler/vendor/github.com/moby/term/termios_bsd.go b/cluster-autoscaler/vendor/github.com/moby/term/termios_bsd.go new file mode 100644 index 000000000000..922dd4baab04 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/moby/term/termios_bsd.go @@ -0,0 +1,12 @@ +// +build darwin freebsd openbsd netbsd + +package term + +import ( + "golang.org/x/sys/unix" +) + +const ( + getTermios = unix.TIOCGETA + setTermios = unix.TIOCSETA +) diff --git a/cluster-autoscaler/vendor/github.com/moby/term/termios_nonbsd.go b/cluster-autoscaler/vendor/github.com/moby/term/termios_nonbsd.go new file mode 100644 index 000000000000..038fd61ba1eb --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/moby/term/termios_nonbsd.go @@ -0,0 +1,12 @@ +//+build !darwin,!freebsd,!netbsd,!openbsd,!windows + +package term + +import ( + "golang.org/x/sys/unix" +) + +const ( + getTermios = unix.TCGETS + setTermios = unix.TCSETS +) diff --git a/cluster-autoscaler/vendor/github.com/moby/term/windows/ansi_reader.go b/cluster-autoscaler/vendor/github.com/moby/term/windows/ansi_reader.go new file mode 100644 index 000000000000..155251521b09 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/moby/term/windows/ansi_reader.go @@ -0,0 +1,252 @@ +// +build windows + +package windowsconsole + +import ( + "bytes" + "errors" + "fmt" + "io" + "os" + "strings" + "unsafe" + + ansiterm "github.com/Azure/go-ansiterm" + "github.com/Azure/go-ansiterm/winterm" +) + +const ( + escapeSequence = ansiterm.KEY_ESC_CSI +) + +// ansiReader wraps a standard input file (e.g., os.Stdin) providing ANSI sequence translation. +type ansiReader struct { + file *os.File + fd uintptr + buffer []byte + cbBuffer int + command []byte +} + +// NewAnsiReader returns an io.ReadCloser that provides VT100 terminal emulation on top of a +// Windows console input handle. +func NewAnsiReader(nFile int) io.ReadCloser { + file, fd := winterm.GetStdFile(nFile) + return &ansiReader{ + file: file, + fd: fd, + command: make([]byte, 0, ansiterm.ANSI_MAX_CMD_LENGTH), + buffer: make([]byte, 0), + } +} + +// Close closes the wrapped file. +func (ar *ansiReader) Close() (err error) { + return ar.file.Close() +} + +// Fd returns the file descriptor of the wrapped file. +func (ar *ansiReader) Fd() uintptr { + return ar.fd +} + +// Read reads up to len(p) bytes of translated input events into p. +func (ar *ansiReader) Read(p []byte) (int, error) { + if len(p) == 0 { + return 0, nil + } + + // Previously read bytes exist, read as much as we can and return + if len(ar.buffer) > 0 { + originalLength := len(ar.buffer) + copiedLength := copy(p, ar.buffer) + + if copiedLength == originalLength { + ar.buffer = make([]byte, 0, len(p)) + } else { + ar.buffer = ar.buffer[copiedLength:] + } + + return copiedLength, nil + } + + // Read and translate key events + events, err := readInputEvents(ar, len(p)) + if err != nil { + return 0, err + } else if len(events) == 0 { + return 0, nil + } + + keyBytes := translateKeyEvents(events, []byte(escapeSequence)) + + // Save excess bytes and right-size keyBytes + if len(keyBytes) > len(p) { + ar.buffer = keyBytes[len(p):] + keyBytes = keyBytes[:len(p)] + } else if len(keyBytes) == 0 { + return 0, nil + } + + copiedLength := copy(p, keyBytes) + if copiedLength != len(keyBytes) { + return 0, errors.New("unexpected copy length encountered") + } + + return copiedLength, nil +} + +// readInputEvents polls until at least one event is available. +func readInputEvents(ar *ansiReader, maxBytes int) ([]winterm.INPUT_RECORD, error) { + // Determine the maximum number of records to retrieve + // -- Cast around the type system to obtain the size of a single INPUT_RECORD. + // unsafe.Sizeof requires an expression vs. a type-reference; the casting + // tricks the type system into believing it has such an expression. + recordSize := int(unsafe.Sizeof(*((*winterm.INPUT_RECORD)(unsafe.Pointer(&maxBytes))))) + countRecords := maxBytes / recordSize + if countRecords > ansiterm.MAX_INPUT_EVENTS { + countRecords = ansiterm.MAX_INPUT_EVENTS + } else if countRecords == 0 { + countRecords = 1 + } + + // Wait for and read input events + events := make([]winterm.INPUT_RECORD, countRecords) + nEvents := uint32(0) + eventsExist, err := winterm.WaitForSingleObject(ar.fd, winterm.WAIT_INFINITE) + if err != nil { + return nil, err + } + + if eventsExist { + err = winterm.ReadConsoleInput(ar.fd, events, &nEvents) + if err != nil { + return nil, err + } + } + + // Return a slice restricted to the number of returned records + return events[:nEvents], nil +} + +// KeyEvent Translation Helpers + +var arrowKeyMapPrefix = map[uint16]string{ + winterm.VK_UP: "%s%sA", + winterm.VK_DOWN: "%s%sB", + winterm.VK_RIGHT: "%s%sC", + winterm.VK_LEFT: "%s%sD", +} + +var keyMapPrefix = map[uint16]string{ + winterm.VK_UP: "\x1B[%sA", + winterm.VK_DOWN: "\x1B[%sB", + winterm.VK_RIGHT: "\x1B[%sC", + winterm.VK_LEFT: "\x1B[%sD", + winterm.VK_HOME: "\x1B[1%s~", // showkey shows ^[[1 + winterm.VK_END: "\x1B[4%s~", // showkey shows ^[[4 + winterm.VK_INSERT: "\x1B[2%s~", + winterm.VK_DELETE: "\x1B[3%s~", + winterm.VK_PRIOR: "\x1B[5%s~", + winterm.VK_NEXT: "\x1B[6%s~", + winterm.VK_F1: "", + winterm.VK_F2: "", + winterm.VK_F3: "\x1B[13%s~", + winterm.VK_F4: "\x1B[14%s~", + winterm.VK_F5: "\x1B[15%s~", + winterm.VK_F6: "\x1B[17%s~", + winterm.VK_F7: "\x1B[18%s~", + winterm.VK_F8: "\x1B[19%s~", + winterm.VK_F9: "\x1B[20%s~", + winterm.VK_F10: "\x1B[21%s~", + winterm.VK_F11: "\x1B[23%s~", + winterm.VK_F12: "\x1B[24%s~", +} + +// translateKeyEvents converts the input events into the appropriate ANSI string. +func translateKeyEvents(events []winterm.INPUT_RECORD, escapeSequence []byte) []byte { + var buffer bytes.Buffer + for _, event := range events { + if event.EventType == winterm.KEY_EVENT && event.KeyEvent.KeyDown != 0 { + buffer.WriteString(keyToString(&event.KeyEvent, escapeSequence)) + } + } + + return buffer.Bytes() +} + +// keyToString maps the given input event record to the corresponding string. +func keyToString(keyEvent *winterm.KEY_EVENT_RECORD, escapeSequence []byte) string { + if keyEvent.UnicodeChar == 0 { + return formatVirtualKey(keyEvent.VirtualKeyCode, keyEvent.ControlKeyState, escapeSequence) + } + + _, alt, control := getControlKeys(keyEvent.ControlKeyState) + if control { + // TODO(azlinux): Implement following control sequences + // -D Signals the end of input from the keyboard; also exits current shell. + // -H Deletes the first character to the left of the cursor. Also called the ERASE key. + // -Q Restarts printing after it has been stopped with -s. + // -S Suspends printing on the screen (does not stop the program). + // -U Deletes all characters on the current line. Also called the KILL key. + // -E Quits current command and creates a core + + } + + // +Key generates ESC N Key + if !control && alt { + return ansiterm.KEY_ESC_N + strings.ToLower(string(keyEvent.UnicodeChar)) + } + + return string(keyEvent.UnicodeChar) +} + +// formatVirtualKey converts a virtual key (e.g., up arrow) into the appropriate ANSI string. +func formatVirtualKey(key uint16, controlState uint32, escapeSequence []byte) string { + shift, alt, control := getControlKeys(controlState) + modifier := getControlKeysModifier(shift, alt, control) + + if format, ok := arrowKeyMapPrefix[key]; ok { + return fmt.Sprintf(format, escapeSequence, modifier) + } + + if format, ok := keyMapPrefix[key]; ok { + return fmt.Sprintf(format, modifier) + } + + return "" +} + +// getControlKeys extracts the shift, alt, and ctrl key states. +func getControlKeys(controlState uint32) (shift, alt, control bool) { + shift = 0 != (controlState & winterm.SHIFT_PRESSED) + alt = 0 != (controlState & (winterm.LEFT_ALT_PRESSED | winterm.RIGHT_ALT_PRESSED)) + control = 0 != (controlState & (winterm.LEFT_CTRL_PRESSED | winterm.RIGHT_CTRL_PRESSED)) + return shift, alt, control +} + +// getControlKeysModifier returns the ANSI modifier for the given combination of control keys. +func getControlKeysModifier(shift, alt, control bool) string { + if shift && alt && control { + return ansiterm.KEY_CONTROL_PARAM_8 + } + if alt && control { + return ansiterm.KEY_CONTROL_PARAM_7 + } + if shift && control { + return ansiterm.KEY_CONTROL_PARAM_6 + } + if control { + return ansiterm.KEY_CONTROL_PARAM_5 + } + if shift && alt { + return ansiterm.KEY_CONTROL_PARAM_4 + } + if alt { + return ansiterm.KEY_CONTROL_PARAM_3 + } + if shift { + return ansiterm.KEY_CONTROL_PARAM_2 + } + return "" +} diff --git a/cluster-autoscaler/vendor/github.com/moby/term/windows/ansi_writer.go b/cluster-autoscaler/vendor/github.com/moby/term/windows/ansi_writer.go new file mode 100644 index 000000000000..ccb5ef07757f --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/moby/term/windows/ansi_writer.go @@ -0,0 +1,56 @@ +// +build windows + +package windowsconsole + +import ( + "io" + "os" + + ansiterm "github.com/Azure/go-ansiterm" + "github.com/Azure/go-ansiterm/winterm" +) + +// ansiWriter wraps a standard output file (e.g., os.Stdout) providing ANSI sequence translation. +type ansiWriter struct { + file *os.File + fd uintptr + infoReset *winterm.CONSOLE_SCREEN_BUFFER_INFO + command []byte + escapeSequence []byte + inAnsiSequence bool + parser *ansiterm.AnsiParser +} + +// NewAnsiWriter returns an io.Writer that provides VT100 terminal emulation on top of a +// Windows console output handle. +func NewAnsiWriter(nFile int) io.Writer { + file, fd := winterm.GetStdFile(nFile) + info, err := winterm.GetConsoleScreenBufferInfo(fd) + if err != nil { + return nil + } + + parser := ansiterm.CreateParser("Ground", winterm.CreateWinEventHandler(fd, file)) + + return &ansiWriter{ + file: file, + fd: fd, + infoReset: info, + command: make([]byte, 0, ansiterm.ANSI_MAX_CMD_LENGTH), + escapeSequence: []byte(ansiterm.KEY_ESC_CSI), + parser: parser, + } +} + +func (aw *ansiWriter) Fd() uintptr { + return aw.fd +} + +// Write writes len(p) bytes from p to the underlying data stream. +func (aw *ansiWriter) Write(p []byte) (total int, err error) { + if len(p) == 0 { + return 0, nil + } + + return aw.parser.Parse(p) +} diff --git a/cluster-autoscaler/vendor/github.com/moby/term/windows/console.go b/cluster-autoscaler/vendor/github.com/moby/term/windows/console.go new file mode 100644 index 000000000000..993694ddcd99 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/moby/term/windows/console.go @@ -0,0 +1,39 @@ +// +build windows + +package windowsconsole + +import ( + "os" + + "golang.org/x/sys/windows" +) + +// GetHandleInfo returns file descriptor and bool indicating whether the file is a console. +func GetHandleInfo(in interface{}) (uintptr, bool) { + switch t := in.(type) { + case *ansiReader: + return t.Fd(), true + case *ansiWriter: + return t.Fd(), true + } + + var inFd uintptr + var isTerminal bool + + if file, ok := in.(*os.File); ok { + inFd = file.Fd() + isTerminal = isConsole(inFd) + } + return inFd, isTerminal +} + +// IsConsole returns true if the given file descriptor is a Windows Console. +// The code assumes that GetConsoleMode will return an error for file descriptors that are not a console. +// Deprecated: use golang.org/x/sys/windows.GetConsoleMode() or golang.org/x/term.IsTerminal() +var IsConsole = isConsole + +func isConsole(fd uintptr) bool { + var mode uint32 + err := windows.GetConsoleMode(windows.Handle(fd), &mode) + return err == nil +} diff --git a/cluster-autoscaler/vendor/github.com/moby/term/windows/doc.go b/cluster-autoscaler/vendor/github.com/moby/term/windows/doc.go new file mode 100644 index 000000000000..54265fffaffd --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/moby/term/windows/doc.go @@ -0,0 +1,5 @@ +// These files implement ANSI-aware input and output streams for use by the Docker Windows client. +// When asked for the set of standard streams (e.g., stdin, stdout, stderr), the code will create +// and return pseudo-streams that convert ANSI sequences to / from Windows Console API calls. + +package windowsconsole diff --git a/cluster-autoscaler/vendor/github.com/moby/term/winsize.go b/cluster-autoscaler/vendor/github.com/moby/term/winsize.go new file mode 100644 index 000000000000..1ef98d59961e --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/moby/term/winsize.go @@ -0,0 +1,20 @@ +// +build !windows + +package term + +import ( + "golang.org/x/sys/unix" +) + +// GetWinsize returns the window size based on the specified file descriptor. +func GetWinsize(fd uintptr) (*Winsize, error) { + uws, err := unix.IoctlGetWinsize(int(fd), unix.TIOCGWINSZ) + ws := &Winsize{Height: uws.Row, Width: uws.Col, x: uws.Xpixel, y: uws.Ypixel} + return ws, err +} + +// SetWinsize tries to set the specified window size for the specified file descriptor. +func SetWinsize(fd uintptr, ws *Winsize) error { + uws := &unix.Winsize{Row: ws.Height, Col: ws.Width, Xpixel: ws.x, Ypixel: ws.y} + return unix.IoctlSetWinsize(int(fd), unix.TIOCSWINSZ, uws) +} diff --git a/cluster-autoscaler/vendor/github.com/morikuni/aec/LICENSE b/cluster-autoscaler/vendor/github.com/morikuni/aec/LICENSE new file mode 100644 index 000000000000..1c2640164192 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/morikuni/aec/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Taihei Morikuni + +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. diff --git a/cluster-autoscaler/vendor/github.com/morikuni/aec/README.md b/cluster-autoscaler/vendor/github.com/morikuni/aec/README.md new file mode 100644 index 000000000000..3cbc4343ee26 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/morikuni/aec/README.md @@ -0,0 +1,178 @@ +# aec + +[![GoDoc](https://godoc.org/github.com/morikuni/aec?status.svg)](https://godoc.org/github.com/morikuni/aec) + +Go wrapper for ANSI escape code. + +## Install + +```bash +go get github.com/morikuni/aec +``` + +## Features + +ANSI escape codes depend on terminal environment. +Some of these features may not work. +Check supported Font-Style/Font-Color features with [checkansi](./checkansi). + +[Wikipedia](https://en.wikipedia.org/wiki/ANSI_escape_code) for more detail. + +### Cursor + +- `Up(n)` +- `Down(n)` +- `Right(n)` +- `Left(n)` +- `NextLine(n)` +- `PreviousLine(n)` +- `Column(col)` +- `Position(row, col)` +- `Save` +- `Restore` +- `Hide` +- `Show` +- `Report` + +### Erase + +- `EraseDisplay(mode)` +- `EraseLine(mode)` + +### Scroll + +- `ScrollUp(n)` +- `ScrollDown(n)` + +### Font Style + +- `Bold` +- `Faint` +- `Italic` +- `Underline` +- `BlinkSlow` +- `BlinkRapid` +- `Inverse` +- `Conceal` +- `CrossOut` +- `Frame` +- `Encircle` +- `Overline` + +### Font Color + +Foreground color. + +- `DefaultF` +- `BlackF` +- `RedF` +- `GreenF` +- `YellowF` +- `BlueF` +- `MagentaF` +- `CyanF` +- `WhiteF` +- `LightBlackF` +- `LightRedF` +- `LightGreenF` +- `LightYellowF` +- `LightBlueF` +- `LightMagentaF` +- `LightCyanF` +- `LightWhiteF` +- `Color3BitF(color)` +- `Color8BitF(color)` +- `FullColorF(r, g, b)` + +Background color. + +- `DefaultB` +- `BlackB` +- `RedB` +- `GreenB` +- `YellowB` +- `BlueB` +- `MagentaB` +- `CyanB` +- `WhiteB` +- `LightBlackB` +- `LightRedB` +- `LightGreenB` +- `LightYellowB` +- `LightBlueB` +- `LightMagentaB` +- `LightCyanB` +- `LightWhiteB` +- `Color3BitB(color)` +- `Color8BitB(color)` +- `FullColorB(r, g, b)` + +### Color Converter + +24bit RGB color to ANSI color. + +- `NewRGB3Bit(r, g, b)` +- `NewRGB8Bit(r, g, b)` + +### Builder + +To mix these features. + +```go +custom := aec.EmptyBuilder.Right(2).RGB8BitF(128, 255, 64).RedB().ANSI +custom.Apply("Hello World") +``` + +## Usage + +1. Create ANSI by `aec.XXX().With(aec.YYY())` or `aec.EmptyBuilder.XXX().YYY().ANSI` +2. Print ANSI by `fmt.Print(ansi, "some string", aec.Reset)` or `fmt.Print(ansi.Apply("some string"))` + +`aec.Reset` should be added when using font style or font color features. + +## Example + +Simple progressbar. + +![sample](./sample.gif) + +```go +package main + +import ( + "fmt" + "strings" + "time" + + "github.com/morikuni/aec" +) + +func main() { + const n = 20 + builder := aec.EmptyBuilder + + up2 := aec.Up(2) + col := aec.Column(n + 2) + bar := aec.Color8BitF(aec.NewRGB8Bit(64, 255, 64)) + label := builder.LightRedF().Underline().With(col).Right(1).ANSI + + // for up2 + fmt.Println() + fmt.Println() + + for i := 0; i <= n; i++ { + fmt.Print(up2) + fmt.Println(label.Apply(fmt.Sprint(i, "/", n))) + fmt.Print("[") + fmt.Print(bar.Apply(strings.Repeat("=", i))) + fmt.Println(col.Apply("]")) + time.Sleep(100 * time.Millisecond) + } +} +``` + +## License + +[MIT](./LICENSE) + + diff --git a/cluster-autoscaler/vendor/github.com/morikuni/aec/aec.go b/cluster-autoscaler/vendor/github.com/morikuni/aec/aec.go new file mode 100644 index 000000000000..566be6eb1ef5 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/morikuni/aec/aec.go @@ -0,0 +1,137 @@ +package aec + +import "fmt" + +// EraseMode is listed in a variable EraseModes. +type EraseMode uint + +var ( + // EraseModes is a list of EraseMode. + EraseModes struct { + // All erase all. + All EraseMode + + // Head erase to head. + Head EraseMode + + // Tail erase to tail. + Tail EraseMode + } + + // Save saves the cursor position. + Save ANSI + + // Restore restores the cursor position. + Restore ANSI + + // Hide hides the cursor. + Hide ANSI + + // Show shows the cursor. + Show ANSI + + // Report reports the cursor position. + Report ANSI +) + +// Up moves up the cursor. +func Up(n uint) ANSI { + if n == 0 { + return empty + } + return newAnsi(fmt.Sprintf(esc+"%dA", n)) +} + +// Down moves down the cursor. +func Down(n uint) ANSI { + if n == 0 { + return empty + } + return newAnsi(fmt.Sprintf(esc+"%dB", n)) +} + +// Right moves right the cursor. +func Right(n uint) ANSI { + if n == 0 { + return empty + } + return newAnsi(fmt.Sprintf(esc+"%dC", n)) +} + +// Left moves left the cursor. +func Left(n uint) ANSI { + if n == 0 { + return empty + } + return newAnsi(fmt.Sprintf(esc+"%dD", n)) +} + +// NextLine moves down the cursor to head of a line. +func NextLine(n uint) ANSI { + if n == 0 { + return empty + } + return newAnsi(fmt.Sprintf(esc+"%dE", n)) +} + +// PreviousLine moves up the cursor to head of a line. +func PreviousLine(n uint) ANSI { + if n == 0 { + return empty + } + return newAnsi(fmt.Sprintf(esc+"%dF", n)) +} + +// Column set the cursor position to a given column. +func Column(col uint) ANSI { + return newAnsi(fmt.Sprintf(esc+"%dG", col)) +} + +// Position set the cursor position to a given absolute position. +func Position(row, col uint) ANSI { + return newAnsi(fmt.Sprintf(esc+"%d;%dH", row, col)) +} + +// EraseDisplay erases display by given EraseMode. +func EraseDisplay(m EraseMode) ANSI { + return newAnsi(fmt.Sprintf(esc+"%dJ", m)) +} + +// EraseLine erases lines by given EraseMode. +func EraseLine(m EraseMode) ANSI { + return newAnsi(fmt.Sprintf(esc+"%dK", m)) +} + +// ScrollUp scrolls up the page. +func ScrollUp(n int) ANSI { + if n == 0 { + return empty + } + return newAnsi(fmt.Sprintf(esc+"%dS", n)) +} + +// ScrollDown scrolls down the page. +func ScrollDown(n int) ANSI { + if n == 0 { + return empty + } + return newAnsi(fmt.Sprintf(esc+"%dT", n)) +} + +func init() { + EraseModes = struct { + All EraseMode + Head EraseMode + Tail EraseMode + }{ + Tail: 0, + Head: 1, + All: 2, + } + + Save = newAnsi(esc + "s") + Restore = newAnsi(esc + "u") + Hide = newAnsi(esc + "?25l") + Show = newAnsi(esc + "?25h") + Report = newAnsi(esc + "6n") +} diff --git a/cluster-autoscaler/vendor/github.com/morikuni/aec/ansi.go b/cluster-autoscaler/vendor/github.com/morikuni/aec/ansi.go new file mode 100644 index 000000000000..e60722e6e60b --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/morikuni/aec/ansi.go @@ -0,0 +1,59 @@ +package aec + +import ( + "fmt" + "strings" +) + +const esc = "\x1b[" + +// Reset resets SGR effect. +const Reset string = "\x1b[0m" + +var empty = newAnsi("") + +// ANSI represents ANSI escape code. +type ANSI interface { + fmt.Stringer + + // With adapts given ANSIs. + With(...ANSI) ANSI + + // Apply wraps given string in ANSI. + Apply(string) string +} + +type ansiImpl string + +func newAnsi(s string) *ansiImpl { + r := ansiImpl(s) + return &r +} + +func (a *ansiImpl) With(ansi ...ANSI) ANSI { + return concat(append([]ANSI{a}, ansi...)) +} + +func (a *ansiImpl) Apply(s string) string { + return a.String() + s + Reset +} + +func (a *ansiImpl) String() string { + return string(*a) +} + +// Apply wraps given string in ANSIs. +func Apply(s string, ansi ...ANSI) string { + if len(ansi) == 0 { + return s + } + return concat(ansi).Apply(s) +} + +func concat(ansi []ANSI) ANSI { + strs := make([]string, 0, len(ansi)) + for _, p := range ansi { + strs = append(strs, p.String()) + } + return newAnsi(strings.Join(strs, "")) +} diff --git a/cluster-autoscaler/vendor/github.com/morikuni/aec/builder.go b/cluster-autoscaler/vendor/github.com/morikuni/aec/builder.go new file mode 100644 index 000000000000..13bd002d4e30 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/morikuni/aec/builder.go @@ -0,0 +1,388 @@ +package aec + +// Builder is a lightweight syntax to construct customized ANSI. +type Builder struct { + ANSI ANSI +} + +// EmptyBuilder is an initialized Builder. +var EmptyBuilder *Builder + +// NewBuilder creates a Builder from existing ANSI. +func NewBuilder(a ...ANSI) *Builder { + return &Builder{concat(a)} +} + +// With is a syntax for With. +func (builder *Builder) With(a ...ANSI) *Builder { + return NewBuilder(builder.ANSI.With(a...)) +} + +// Up is a syntax for Up. +func (builder *Builder) Up(n uint) *Builder { + return builder.With(Up(n)) +} + +// Down is a syntax for Down. +func (builder *Builder) Down(n uint) *Builder { + return builder.With(Down(n)) +} + +// Right is a syntax for Right. +func (builder *Builder) Right(n uint) *Builder { + return builder.With(Right(n)) +} + +// Left is a syntax for Left. +func (builder *Builder) Left(n uint) *Builder { + return builder.With(Left(n)) +} + +// NextLine is a syntax for NextLine. +func (builder *Builder) NextLine(n uint) *Builder { + return builder.With(NextLine(n)) +} + +// PreviousLine is a syntax for PreviousLine. +func (builder *Builder) PreviousLine(n uint) *Builder { + return builder.With(PreviousLine(n)) +} + +// Column is a syntax for Column. +func (builder *Builder) Column(col uint) *Builder { + return builder.With(Column(col)) +} + +// Position is a syntax for Position. +func (builder *Builder) Position(row, col uint) *Builder { + return builder.With(Position(row, col)) +} + +// EraseDisplay is a syntax for EraseDisplay. +func (builder *Builder) EraseDisplay(m EraseMode) *Builder { + return builder.With(EraseDisplay(m)) +} + +// EraseLine is a syntax for EraseLine. +func (builder *Builder) EraseLine(m EraseMode) *Builder { + return builder.With(EraseLine(m)) +} + +// ScrollUp is a syntax for ScrollUp. +func (builder *Builder) ScrollUp(n int) *Builder { + return builder.With(ScrollUp(n)) +} + +// ScrollDown is a syntax for ScrollDown. +func (builder *Builder) ScrollDown(n int) *Builder { + return builder.With(ScrollDown(n)) +} + +// Save is a syntax for Save. +func (builder *Builder) Save() *Builder { + return builder.With(Save) +} + +// Restore is a syntax for Restore. +func (builder *Builder) Restore() *Builder { + return builder.With(Restore) +} + +// Hide is a syntax for Hide. +func (builder *Builder) Hide() *Builder { + return builder.With(Hide) +} + +// Show is a syntax for Show. +func (builder *Builder) Show() *Builder { + return builder.With(Show) +} + +// Report is a syntax for Report. +func (builder *Builder) Report() *Builder { + return builder.With(Report) +} + +// Bold is a syntax for Bold. +func (builder *Builder) Bold() *Builder { + return builder.With(Bold) +} + +// Faint is a syntax for Faint. +func (builder *Builder) Faint() *Builder { + return builder.With(Faint) +} + +// Italic is a syntax for Italic. +func (builder *Builder) Italic() *Builder { + return builder.With(Italic) +} + +// Underline is a syntax for Underline. +func (builder *Builder) Underline() *Builder { + return builder.With(Underline) +} + +// BlinkSlow is a syntax for BlinkSlow. +func (builder *Builder) BlinkSlow() *Builder { + return builder.With(BlinkSlow) +} + +// BlinkRapid is a syntax for BlinkRapid. +func (builder *Builder) BlinkRapid() *Builder { + return builder.With(BlinkRapid) +} + +// Inverse is a syntax for Inverse. +func (builder *Builder) Inverse() *Builder { + return builder.With(Inverse) +} + +// Conceal is a syntax for Conceal. +func (builder *Builder) Conceal() *Builder { + return builder.With(Conceal) +} + +// CrossOut is a syntax for CrossOut. +func (builder *Builder) CrossOut() *Builder { + return builder.With(CrossOut) +} + +// BlackF is a syntax for BlackF. +func (builder *Builder) BlackF() *Builder { + return builder.With(BlackF) +} + +// RedF is a syntax for RedF. +func (builder *Builder) RedF() *Builder { + return builder.With(RedF) +} + +// GreenF is a syntax for GreenF. +func (builder *Builder) GreenF() *Builder { + return builder.With(GreenF) +} + +// YellowF is a syntax for YellowF. +func (builder *Builder) YellowF() *Builder { + return builder.With(YellowF) +} + +// BlueF is a syntax for BlueF. +func (builder *Builder) BlueF() *Builder { + return builder.With(BlueF) +} + +// MagentaF is a syntax for MagentaF. +func (builder *Builder) MagentaF() *Builder { + return builder.With(MagentaF) +} + +// CyanF is a syntax for CyanF. +func (builder *Builder) CyanF() *Builder { + return builder.With(CyanF) +} + +// WhiteF is a syntax for WhiteF. +func (builder *Builder) WhiteF() *Builder { + return builder.With(WhiteF) +} + +// DefaultF is a syntax for DefaultF. +func (builder *Builder) DefaultF() *Builder { + return builder.With(DefaultF) +} + +// BlackB is a syntax for BlackB. +func (builder *Builder) BlackB() *Builder { + return builder.With(BlackB) +} + +// RedB is a syntax for RedB. +func (builder *Builder) RedB() *Builder { + return builder.With(RedB) +} + +// GreenB is a syntax for GreenB. +func (builder *Builder) GreenB() *Builder { + return builder.With(GreenB) +} + +// YellowB is a syntax for YellowB. +func (builder *Builder) YellowB() *Builder { + return builder.With(YellowB) +} + +// BlueB is a syntax for BlueB. +func (builder *Builder) BlueB() *Builder { + return builder.With(BlueB) +} + +// MagentaB is a syntax for MagentaB. +func (builder *Builder) MagentaB() *Builder { + return builder.With(MagentaB) +} + +// CyanB is a syntax for CyanB. +func (builder *Builder) CyanB() *Builder { + return builder.With(CyanB) +} + +// WhiteB is a syntax for WhiteB. +func (builder *Builder) WhiteB() *Builder { + return builder.With(WhiteB) +} + +// DefaultB is a syntax for DefaultB. +func (builder *Builder) DefaultB() *Builder { + return builder.With(DefaultB) +} + +// Frame is a syntax for Frame. +func (builder *Builder) Frame() *Builder { + return builder.With(Frame) +} + +// Encircle is a syntax for Encircle. +func (builder *Builder) Encircle() *Builder { + return builder.With(Encircle) +} + +// Overline is a syntax for Overline. +func (builder *Builder) Overline() *Builder { + return builder.With(Overline) +} + +// LightBlackF is a syntax for LightBlueF. +func (builder *Builder) LightBlackF() *Builder { + return builder.With(LightBlackF) +} + +// LightRedF is a syntax for LightRedF. +func (builder *Builder) LightRedF() *Builder { + return builder.With(LightRedF) +} + +// LightGreenF is a syntax for LightGreenF. +func (builder *Builder) LightGreenF() *Builder { + return builder.With(LightGreenF) +} + +// LightYellowF is a syntax for LightYellowF. +func (builder *Builder) LightYellowF() *Builder { + return builder.With(LightYellowF) +} + +// LightBlueF is a syntax for LightBlueF. +func (builder *Builder) LightBlueF() *Builder { + return builder.With(LightBlueF) +} + +// LightMagentaF is a syntax for LightMagentaF. +func (builder *Builder) LightMagentaF() *Builder { + return builder.With(LightMagentaF) +} + +// LightCyanF is a syntax for LightCyanF. +func (builder *Builder) LightCyanF() *Builder { + return builder.With(LightCyanF) +} + +// LightWhiteF is a syntax for LightWhiteF. +func (builder *Builder) LightWhiteF() *Builder { + return builder.With(LightWhiteF) +} + +// LightBlackB is a syntax for LightBlackB. +func (builder *Builder) LightBlackB() *Builder { + return builder.With(LightBlackB) +} + +// LightRedB is a syntax for LightRedB. +func (builder *Builder) LightRedB() *Builder { + return builder.With(LightRedB) +} + +// LightGreenB is a syntax for LightGreenB. +func (builder *Builder) LightGreenB() *Builder { + return builder.With(LightGreenB) +} + +// LightYellowB is a syntax for LightYellowB. +func (builder *Builder) LightYellowB() *Builder { + return builder.With(LightYellowB) +} + +// LightBlueB is a syntax for LightBlueB. +func (builder *Builder) LightBlueB() *Builder { + return builder.With(LightBlueB) +} + +// LightMagentaB is a syntax for LightMagentaB. +func (builder *Builder) LightMagentaB() *Builder { + return builder.With(LightMagentaB) +} + +// LightCyanB is a syntax for LightCyanB. +func (builder *Builder) LightCyanB() *Builder { + return builder.With(LightCyanB) +} + +// LightWhiteB is a syntax for LightWhiteB. +func (builder *Builder) LightWhiteB() *Builder { + return builder.With(LightWhiteB) +} + +// Color3BitF is a syntax for Color3BitF. +func (builder *Builder) Color3BitF(c RGB3Bit) *Builder { + return builder.With(Color3BitF(c)) +} + +// Color3BitB is a syntax for Color3BitB. +func (builder *Builder) Color3BitB(c RGB3Bit) *Builder { + return builder.With(Color3BitB(c)) +} + +// Color8BitF is a syntax for Color8BitF. +func (builder *Builder) Color8BitF(c RGB8Bit) *Builder { + return builder.With(Color8BitF(c)) +} + +// Color8BitB is a syntax for Color8BitB. +func (builder *Builder) Color8BitB(c RGB8Bit) *Builder { + return builder.With(Color8BitB(c)) +} + +// FullColorF is a syntax for FullColorF. +func (builder *Builder) FullColorF(r, g, b uint8) *Builder { + return builder.With(FullColorF(r, g, b)) +} + +// FullColorB is a syntax for FullColorB. +func (builder *Builder) FullColorB(r, g, b uint8) *Builder { + return builder.With(FullColorB(r, g, b)) +} + +// RGB3BitF is a syntax for Color3BitF with NewRGB3Bit. +func (builder *Builder) RGB3BitF(r, g, b uint8) *Builder { + return builder.Color3BitF(NewRGB3Bit(r, g, b)) +} + +// RGB3BitB is a syntax for Color3BitB with NewRGB3Bit. +func (builder *Builder) RGB3BitB(r, g, b uint8) *Builder { + return builder.Color3BitB(NewRGB3Bit(r, g, b)) +} + +// RGB8BitF is a syntax for Color8BitF with NewRGB8Bit. +func (builder *Builder) RGB8BitF(r, g, b uint8) *Builder { + return builder.Color8BitF(NewRGB8Bit(r, g, b)) +} + +// RGB8BitB is a syntax for Color8BitB with NewRGB8Bit. +func (builder *Builder) RGB8BitB(r, g, b uint8) *Builder { + return builder.Color8BitB(NewRGB8Bit(r, g, b)) +} + +func init() { + EmptyBuilder = &Builder{empty} +} diff --git a/cluster-autoscaler/vendor/github.com/morikuni/aec/sample.gif b/cluster-autoscaler/vendor/github.com/morikuni/aec/sample.gif new file mode 100644 index 000000000000..c6c613bb7064 Binary files /dev/null and b/cluster-autoscaler/vendor/github.com/morikuni/aec/sample.gif differ diff --git a/cluster-autoscaler/vendor/github.com/morikuni/aec/sgr.go b/cluster-autoscaler/vendor/github.com/morikuni/aec/sgr.go new file mode 100644 index 000000000000..0ba3464e6dbd --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/morikuni/aec/sgr.go @@ -0,0 +1,202 @@ +package aec + +import ( + "fmt" +) + +// RGB3Bit is a 3bit RGB color. +type RGB3Bit uint8 + +// RGB8Bit is a 8bit RGB color. +type RGB8Bit uint8 + +func newSGR(n uint) ANSI { + return newAnsi(fmt.Sprintf(esc+"%dm", n)) +} + +// NewRGB3Bit create a RGB3Bit from given RGB. +func NewRGB3Bit(r, g, b uint8) RGB3Bit { + return RGB3Bit((r >> 7) | ((g >> 6) & 0x2) | ((b >> 5) & 0x4)) +} + +// NewRGB8Bit create a RGB8Bit from given RGB. +func NewRGB8Bit(r, g, b uint8) RGB8Bit { + return RGB8Bit(16 + 36*(r/43) + 6*(g/43) + b/43) +} + +// Color3BitF set the foreground color of text. +func Color3BitF(c RGB3Bit) ANSI { + return newAnsi(fmt.Sprintf(esc+"%dm", c+30)) +} + +// Color3BitB set the background color of text. +func Color3BitB(c RGB3Bit) ANSI { + return newAnsi(fmt.Sprintf(esc+"%dm", c+40)) +} + +// Color8BitF set the foreground color of text. +func Color8BitF(c RGB8Bit) ANSI { + return newAnsi(fmt.Sprintf(esc+"38;5;%dm", c)) +} + +// Color8BitB set the background color of text. +func Color8BitB(c RGB8Bit) ANSI { + return newAnsi(fmt.Sprintf(esc+"48;5;%dm", c)) +} + +// FullColorF set the foreground color of text. +func FullColorF(r, g, b uint8) ANSI { + return newAnsi(fmt.Sprintf(esc+"38;2;%d;%d;%dm", r, g, b)) +} + +// FullColorB set the foreground color of text. +func FullColorB(r, g, b uint8) ANSI { + return newAnsi(fmt.Sprintf(esc+"48;2;%d;%d;%dm", r, g, b)) +} + +// Style +var ( + // Bold set the text style to bold or increased intensity. + Bold ANSI + + // Faint set the text style to faint. + Faint ANSI + + // Italic set the text style to italic. + Italic ANSI + + // Underline set the text style to underline. + Underline ANSI + + // BlinkSlow set the text style to slow blink. + BlinkSlow ANSI + + // BlinkRapid set the text style to rapid blink. + BlinkRapid ANSI + + // Inverse swap the foreground color and background color. + Inverse ANSI + + // Conceal set the text style to conceal. + Conceal ANSI + + // CrossOut set the text style to crossed out. + CrossOut ANSI + + // Frame set the text style to framed. + Frame ANSI + + // Encircle set the text style to encircled. + Encircle ANSI + + // Overline set the text style to overlined. + Overline ANSI +) + +// Foreground color of text. +var ( + // DefaultF is the default color of foreground. + DefaultF ANSI + + // Normal color + BlackF ANSI + RedF ANSI + GreenF ANSI + YellowF ANSI + BlueF ANSI + MagentaF ANSI + CyanF ANSI + WhiteF ANSI + + // Light color + LightBlackF ANSI + LightRedF ANSI + LightGreenF ANSI + LightYellowF ANSI + LightBlueF ANSI + LightMagentaF ANSI + LightCyanF ANSI + LightWhiteF ANSI +) + +// Background color of text. +var ( + // DefaultB is the default color of background. + DefaultB ANSI + + // Normal color + BlackB ANSI + RedB ANSI + GreenB ANSI + YellowB ANSI + BlueB ANSI + MagentaB ANSI + CyanB ANSI + WhiteB ANSI + + // Light color + LightBlackB ANSI + LightRedB ANSI + LightGreenB ANSI + LightYellowB ANSI + LightBlueB ANSI + LightMagentaB ANSI + LightCyanB ANSI + LightWhiteB ANSI +) + +func init() { + Bold = newSGR(1) + Faint = newSGR(2) + Italic = newSGR(3) + Underline = newSGR(4) + BlinkSlow = newSGR(5) + BlinkRapid = newSGR(6) + Inverse = newSGR(7) + Conceal = newSGR(8) + CrossOut = newSGR(9) + + BlackF = newSGR(30) + RedF = newSGR(31) + GreenF = newSGR(32) + YellowF = newSGR(33) + BlueF = newSGR(34) + MagentaF = newSGR(35) + CyanF = newSGR(36) + WhiteF = newSGR(37) + + DefaultF = newSGR(39) + + BlackB = newSGR(40) + RedB = newSGR(41) + GreenB = newSGR(42) + YellowB = newSGR(43) + BlueB = newSGR(44) + MagentaB = newSGR(45) + CyanB = newSGR(46) + WhiteB = newSGR(47) + + DefaultB = newSGR(49) + + Frame = newSGR(51) + Encircle = newSGR(52) + Overline = newSGR(53) + + LightBlackF = newSGR(90) + LightRedF = newSGR(91) + LightGreenF = newSGR(92) + LightYellowF = newSGR(93) + LightBlueF = newSGR(94) + LightMagentaF = newSGR(95) + LightCyanF = newSGR(96) + LightWhiteF = newSGR(97) + + LightBlackB = newSGR(100) + LightRedB = newSGR(101) + LightGreenB = newSGR(102) + LightYellowB = newSGR(103) + LightBlueB = newSGR(104) + LightMagentaB = newSGR(105) + LightCyanB = newSGR(106) + LightWhiteB = newSGR(107) +} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/LICENSE b/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/LICENSE new file mode 100644 index 000000000000..9fdc20fdb6a8 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2016 The Linux Foundation. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/specs-go/v1/annotations.go b/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/specs-go/v1/annotations.go new file mode 100644 index 000000000000..35d8108958ff --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/specs-go/v1/annotations.go @@ -0,0 +1,56 @@ +// Copyright 2016 The Linux Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1 + +const ( + // AnnotationCreated is the annotation key for the date and time on which the image was built (date-time string as defined by RFC 3339). + AnnotationCreated = "org.opencontainers.image.created" + + // AnnotationAuthors is the annotation key for the contact details of the people or organization responsible for the image (freeform string). + AnnotationAuthors = "org.opencontainers.image.authors" + + // AnnotationURL is the annotation key for the URL to find more information on the image. + AnnotationURL = "org.opencontainers.image.url" + + // AnnotationDocumentation is the annotation key for the URL to get documentation on the image. + AnnotationDocumentation = "org.opencontainers.image.documentation" + + // AnnotationSource is the annotation key for the URL to get source code for building the image. + AnnotationSource = "org.opencontainers.image.source" + + // AnnotationVersion is the annotation key for the version of the packaged software. + // The version MAY match a label or tag in the source code repository. + // The version MAY be Semantic versioning-compatible. + AnnotationVersion = "org.opencontainers.image.version" + + // AnnotationRevision is the annotation key for the source control revision identifier for the packaged software. + AnnotationRevision = "org.opencontainers.image.revision" + + // AnnotationVendor is the annotation key for the name of the distributing entity, organization or individual. + AnnotationVendor = "org.opencontainers.image.vendor" + + // AnnotationLicenses is the annotation key for the license(s) under which contained software is distributed as an SPDX License Expression. + AnnotationLicenses = "org.opencontainers.image.licenses" + + // AnnotationRefName is the annotation key for the name of the reference for a target. + // SHOULD only be considered valid when on descriptors on `index.json` within image layout. + AnnotationRefName = "org.opencontainers.image.ref.name" + + // AnnotationTitle is the annotation key for the human-readable title of the image. + AnnotationTitle = "org.opencontainers.image.title" + + // AnnotationDescription is the annotation key for the human-readable description of the software packaged in the image. + AnnotationDescription = "org.opencontainers.image.description" +) diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/specs-go/v1/config.go b/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/specs-go/v1/config.go new file mode 100644 index 000000000000..fe799bd698c7 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/specs-go/v1/config.go @@ -0,0 +1,103 @@ +// Copyright 2016 The Linux Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1 + +import ( + "time" + + digest "github.com/opencontainers/go-digest" +) + +// ImageConfig defines the execution parameters which should be used as a base when running a container using an image. +type ImageConfig struct { + // User defines the username or UID which the process in the container should run as. + User string `json:"User,omitempty"` + + // ExposedPorts a set of ports to expose from a container running this image. + ExposedPorts map[string]struct{} `json:"ExposedPorts,omitempty"` + + // Env is a list of environment variables to be used in a container. + Env []string `json:"Env,omitempty"` + + // Entrypoint defines a list of arguments to use as the command to execute when the container starts. + Entrypoint []string `json:"Entrypoint,omitempty"` + + // Cmd defines the default arguments to the entrypoint of the container. + Cmd []string `json:"Cmd,omitempty"` + + // Volumes is a set of directories describing where the process is likely write data specific to a container instance. + Volumes map[string]struct{} `json:"Volumes,omitempty"` + + // WorkingDir sets the current working directory of the entrypoint process in the container. + WorkingDir string `json:"WorkingDir,omitempty"` + + // Labels contains arbitrary metadata for the container. + Labels map[string]string `json:"Labels,omitempty"` + + // StopSignal contains the system call signal that will be sent to the container to exit. + StopSignal string `json:"StopSignal,omitempty"` +} + +// RootFS describes a layer content addresses +type RootFS struct { + // Type is the type of the rootfs. + Type string `json:"type"` + + // DiffIDs is an array of layer content hashes (DiffIDs), in order from bottom-most to top-most. + DiffIDs []digest.Digest `json:"diff_ids"` +} + +// History describes the history of a layer. +type History struct { + // Created is the combined date and time at which the layer was created, formatted as defined by RFC 3339, section 5.6. + Created *time.Time `json:"created,omitempty"` + + // CreatedBy is the command which created the layer. + CreatedBy string `json:"created_by,omitempty"` + + // Author is the author of the build point. + Author string `json:"author,omitempty"` + + // Comment is a custom message set when creating the layer. + Comment string `json:"comment,omitempty"` + + // EmptyLayer is used to mark if the history item created a filesystem diff. + EmptyLayer bool `json:"empty_layer,omitempty"` +} + +// Image is the JSON structure which describes some basic information about the image. +// This provides the `application/vnd.oci.image.config.v1+json` mediatype when marshalled to JSON. +type Image struct { + // Created is the combined date and time at which the image was created, formatted as defined by RFC 3339, section 5.6. + Created *time.Time `json:"created,omitempty"` + + // Author defines the name and/or email address of the person or entity which created and is responsible for maintaining the image. + Author string `json:"author,omitempty"` + + // Architecture is the CPU architecture which the binaries in this image are built to run on. + Architecture string `json:"architecture"` + + // OS is the name of the operating system which the image is built to run on. + OS string `json:"os"` + + // Config defines the execution parameters which should be used as a base when running a container using the image. + Config ImageConfig `json:"config,omitempty"` + + // RootFS references the layer content addresses used by the image. + RootFS RootFS `json:"rootfs"` + + // History describes the history of each layer. + History []History `json:"history,omitempty"` +} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/specs-go/v1/descriptor.go b/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/specs-go/v1/descriptor.go new file mode 100644 index 000000000000..6e442a0853f4 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/specs-go/v1/descriptor.go @@ -0,0 +1,64 @@ +// Copyright 2016 The Linux Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1 + +import digest "github.com/opencontainers/go-digest" + +// Descriptor describes the disposition of targeted content. +// This structure provides `application/vnd.oci.descriptor.v1+json` mediatype +// when marshalled to JSON. +type Descriptor struct { + // MediaType is the media type of the object this schema refers to. + MediaType string `json:"mediaType,omitempty"` + + // Digest is the digest of the targeted content. + Digest digest.Digest `json:"digest"` + + // Size specifies the size in bytes of the blob. + Size int64 `json:"size"` + + // URLs specifies a list of URLs from which this object MAY be downloaded + URLs []string `json:"urls,omitempty"` + + // Annotations contains arbitrary metadata relating to the targeted content. + Annotations map[string]string `json:"annotations,omitempty"` + + // Platform describes the platform which the image in the manifest runs on. + // + // This should only be used when referring to a manifest. + Platform *Platform `json:"platform,omitempty"` +} + +// Platform describes the platform which the image in the manifest runs on. +type Platform struct { + // Architecture field specifies the CPU architecture, for example + // `amd64` or `ppc64`. + Architecture string `json:"architecture"` + + // OS specifies the operating system, for example `linux` or `windows`. + OS string `json:"os"` + + // OSVersion is an optional field specifying the operating system + // version, for example on Windows `10.0.14393.1066`. + OSVersion string `json:"os.version,omitempty"` + + // OSFeatures is an optional field specifying an array of strings, + // each listing a required OS feature (for example on Windows `win32k`). + OSFeatures []string `json:"os.features,omitempty"` + + // Variant is an optional field specifying a variant of the CPU, for + // example `v7` to specify ARMv7 when architecture is `arm`. + Variant string `json:"variant,omitempty"` +} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/specs-go/v1/index.go b/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/specs-go/v1/index.go new file mode 100644 index 000000000000..4e6c4b236237 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/specs-go/v1/index.go @@ -0,0 +1,29 @@ +// Copyright 2016 The Linux Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1 + +import "github.com/opencontainers/image-spec/specs-go" + +// Index references manifests for various platforms. +// This structure provides `application/vnd.oci.image.index.v1+json` mediatype when marshalled to JSON. +type Index struct { + specs.Versioned + + // Manifests references platform specific manifests. + Manifests []Descriptor `json:"manifests"` + + // Annotations contains arbitrary metadata for the image index. + Annotations map[string]string `json:"annotations,omitempty"` +} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/specs-go/v1/layout.go b/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/specs-go/v1/layout.go new file mode 100644 index 000000000000..fc79e9e0d140 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/specs-go/v1/layout.go @@ -0,0 +1,28 @@ +// Copyright 2016 The Linux Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1 + +const ( + // ImageLayoutFile is the file name of oci image layout file + ImageLayoutFile = "oci-layout" + // ImageLayoutVersion is the version of ImageLayout + ImageLayoutVersion = "1.0.0" +) + +// ImageLayout is the structure in the "oci-layout" file, found in the root +// of an OCI Image-layout directory. +type ImageLayout struct { + Version string `json:"imageLayoutVersion"` +} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go b/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go new file mode 100644 index 000000000000..7ff32c40ba30 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go @@ -0,0 +1,32 @@ +// Copyright 2016 The Linux Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1 + +import "github.com/opencontainers/image-spec/specs-go" + +// Manifest provides `application/vnd.oci.image.manifest.v1+json` mediatype structure when marshalled to JSON. +type Manifest struct { + specs.Versioned + + // Config references a configuration object for a container, by digest. + // The referenced configuration object is a JSON blob that the runtime uses to set up the container. + Config Descriptor `json:"config"` + + // Layers is an indexed list of layers referenced by the manifest. + Layers []Descriptor `json:"layers"` + + // Annotations contains arbitrary metadata for the image manifest. + Annotations map[string]string `json:"annotations,omitempty"` +} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/specs-go/v1/mediatype.go b/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/specs-go/v1/mediatype.go new file mode 100644 index 000000000000..bad7bb97f473 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/specs-go/v1/mediatype.go @@ -0,0 +1,48 @@ +// Copyright 2016 The Linux Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1 + +const ( + // MediaTypeDescriptor specifies the media type for a content descriptor. + MediaTypeDescriptor = "application/vnd.oci.descriptor.v1+json" + + // MediaTypeLayoutHeader specifies the media type for the oci-layout. + MediaTypeLayoutHeader = "application/vnd.oci.layout.header.v1+json" + + // MediaTypeImageManifest specifies the media type for an image manifest. + MediaTypeImageManifest = "application/vnd.oci.image.manifest.v1+json" + + // MediaTypeImageIndex specifies the media type for an image index. + MediaTypeImageIndex = "application/vnd.oci.image.index.v1+json" + + // MediaTypeImageLayer is the media type used for layers referenced by the manifest. + MediaTypeImageLayer = "application/vnd.oci.image.layer.v1.tar" + + // MediaTypeImageLayerGzip is the media type used for gzipped layers + // referenced by the manifest. + MediaTypeImageLayerGzip = "application/vnd.oci.image.layer.v1.tar+gzip" + + // MediaTypeImageLayerNonDistributable is the media type for layers referenced by + // the manifest but with distribution restrictions. + MediaTypeImageLayerNonDistributable = "application/vnd.oci.image.layer.nondistributable.v1.tar" + + // MediaTypeImageLayerNonDistributableGzip is the media type for + // gzipped layers referenced by the manifest but with distribution + // restrictions. + MediaTypeImageLayerNonDistributableGzip = "application/vnd.oci.image.layer.nondistributable.v1.tar+gzip" + + // MediaTypeImageConfig specifies the media type for the image configuration. + MediaTypeImageConfig = "application/vnd.oci.image.config.v1+json" +) diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/specs-go/version.go b/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/specs-go/version.go new file mode 100644 index 000000000000..5d493df23300 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/specs-go/version.go @@ -0,0 +1,32 @@ +// Copyright 2016 The Linux Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package specs + +import "fmt" + +const ( + // VersionMajor is for an API incompatible changes + VersionMajor = 1 + // VersionMinor is for functionality in a backwards-compatible manner + VersionMinor = 0 + // VersionPatch is for backwards-compatible bug fixes + VersionPatch = 1 + + // VersionDev indicates development branch. Releases will be empty string. + VersionDev = "" +) + +// Version is the specification version that the package types support. +var Version = fmt.Sprintf("%d.%d.%d%s", VersionMajor, VersionMinor, VersionPatch, VersionDev) diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/specs-go/versioned.go b/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/specs-go/versioned.go new file mode 100644 index 000000000000..58a1510f33e9 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/opencontainers/image-spec/specs-go/versioned.go @@ -0,0 +1,23 @@ +// Copyright 2016 The Linux Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package specs + +// Versioned provides a struct with the manifest schemaVersion and mediaType. +// Incoming content with unknown schema version can be decoded against this +// struct to check the version. +type Versioned struct { + // SchemaVersion is the image manifest schema that this image follows + SchemaVersion int `json:"schemaVersion"` +} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/README.md b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/README.md index 0d91fb71d54d..13eee49d4b97 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/README.md +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/README.md @@ -1,6 +1,6 @@ # libcontainer -[![Go Reference](https://pkg.go.dev/badge/github.com/opencontainers/runc/libcontainer.svg)](https://pkg.go.dev/github.com/opencontainers/runc/libcontainer) +[![GoDoc](https://godoc.org/github.com/opencontainers/runc/libcontainer?status.svg)](https://godoc.org/github.com/opencontainers/runc/libcontainer) Libcontainer provides a native Go implementation for creating containers with namespaces, cgroups, capabilities, and filesystem access controls. diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/apparmor/apparmor_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/apparmor/apparmor_linux.go index 8b1483c7de77..744d4e57054d 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/apparmor/apparmor_linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/apparmor/apparmor_linux.go @@ -3,6 +3,7 @@ package apparmor import ( "errors" "fmt" + "io/ioutil" "os" "sync" @@ -18,7 +19,7 @@ var ( func isEnabled() bool { checkAppArmor.Do(func() { if _, err := os.Stat("/sys/kernel/security/apparmor"); err == nil { - buf, err := os.ReadFile("/sys/module/apparmor/parameters/enabled") + buf, err := ioutil.ReadFile("/sys/module/apparmor/parameters/enabled") appArmorEnabled = err == nil && len(buf) > 1 && buf[0] == 'Y' } }) @@ -51,7 +52,7 @@ func setProcAttr(attr, value string) error { // changeOnExec reimplements aa_change_onexec from libapparmor in Go func changeOnExec(name string) error { if err := setProcAttr("exec", "exec "+name); err != nil { - return fmt.Errorf("apparmor failed to apply profile: %w", err) + return fmt.Errorf("apparmor failed to apply profile: %s", err) } return nil } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/apparmor/apparmor_unsupported.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/apparmor/apparmor_unsupported.go index 684248f2559e..1adadafec8ec 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/apparmor/apparmor_unsupported.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/apparmor/apparmor_unsupported.go @@ -1,4 +1,3 @@ -//go:build !linux // +build !linux package apparmor diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/capabilities/capabilities.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/capabilities/capabilities.go index d38b8a7cd89a..1099d32b1460 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/capabilities/capabilities.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/capabilities/capabilities.go @@ -1,4 +1,3 @@ -//go:build linux // +build linux package capabilities @@ -35,17 +34,6 @@ func init() { } } -// KnownCapabilities returns the list of the known capabilities. -// Used by `runc features`. -func KnownCapabilities() []string { - list := capability.List() - res := make([]string, len(list)) - for i, c := range list { - res[i] = "CAP_" + strings.ToUpper(c.String()) - } - return res -} - // New creates a new Caps from the given Capabilities config. Unknown Capabilities // or Capabilities that are unavailable in the current environment are ignored, // printing a warning instead. diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/capabilities/capabilities_unsupported.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/capabilities/capabilities_unsupported.go index 0eafa4f2c2c7..a3e82ac1fd4d 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/capabilities/capabilities_unsupported.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/capabilities/capabilities_unsupported.go @@ -1,4 +1,3 @@ -//go:build !linux // +build !linux package capabilities diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/cgroups.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/cgroups.go index ba2b2266c9d0..68a346ca531a 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/cgroups.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/cgroups.go @@ -1,3 +1,5 @@ +// +build linux + package cgroups import ( diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/cgroups_unsupported.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/cgroups_unsupported.go new file mode 100644 index 000000000000..278d507e288e --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/cgroups_unsupported.go @@ -0,0 +1,3 @@ +// +build !linux + +package cgroups diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/devices/devices_emulator.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/devices/devices_emulator.go index 6c61ee4c0330..c08477cbb354 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/devices/devices_emulator.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/devices/devices_emulator.go @@ -1,3 +1,5 @@ +// +build linux + // SPDX-License-Identifier: Apache-2.0 /* * Copyright (C) 2020 Aleksa Sarai @@ -20,13 +22,14 @@ package devices import ( "bufio" - "fmt" "io" + "regexp" "sort" "strconv" - "strings" "github.com/opencontainers/runc/libcontainer/devices" + + "github.com/pkg/errors" ) // deviceMeta is a Rule without the Allow or Permissions fields, and no @@ -76,21 +79,19 @@ func (e *Emulator) IsAllowAll() bool { return e.IsBlacklist() && len(e.rules) == 0 } +var devicesListRegexp = regexp.MustCompile(`^([abc])\s+(\d+|\*):(\d+|\*)\s+([rwm]+)$`) + func parseLine(line string) (*deviceRule, error) { - // Input: node major:minor perms. - fields := strings.FieldsFunc(line, func(r rune) bool { - return r == ' ' || r == ':' - }) - if len(fields) != 4 { - return nil, fmt.Errorf("malformed devices.list rule %s", line) + matches := devicesListRegexp.FindStringSubmatch(line) + if matches == nil { + return nil, errors.Errorf("line doesn't match devices.list format") } - var ( rule deviceRule - node = fields[0] - major = fields[1] - minor = fields[2] - perms = fields[3] + node = matches[1] + major = matches[2] + minor = matches[3] + perms = matches[4] ) // Parse the node type. @@ -106,7 +107,8 @@ func parseLine(line string) (*deviceRule, error) { case "c": rule.meta.node = devices.CharDevice default: - return nil, fmt.Errorf("unknown device type %q", node) + // Should never happen! + return nil, errors.Errorf("unknown device type %q", node) } // Parse the major number. @@ -115,7 +117,7 @@ func parseLine(line string) (*deviceRule, error) { } else { val, err := strconv.ParseUint(major, 10, 32) if err != nil { - return nil, fmt.Errorf("invalid major number: %w", err) + return nil, errors.Wrap(err, "parse major number") } rule.meta.major = int64(val) } @@ -126,7 +128,7 @@ func parseLine(line string) (*deviceRule, error) { } else { val, err := strconv.ParseUint(minor, 10, 32) if err != nil { - return nil, fmt.Errorf("invalid minor number: %w", err) + return nil, errors.Wrap(err, "parse minor number") } rule.meta.minor = int64(val) } @@ -134,12 +136,13 @@ func parseLine(line string) (*deviceRule, error) { // Parse the access permissions. rule.perms = devices.Permissions(perms) if !rule.perms.IsValid() || rule.perms.IsEmpty() { - return nil, fmt.Errorf("parse access mode: contained unknown modes or is empty: %q", perms) + // Should never happen! + return nil, errors.Errorf("parse access mode: contained unknown modes or is empty: %q", perms) } return &rule, nil } -func (e *Emulator) addRule(rule deviceRule) error { //nolint:unparam +func (e *Emulator) addRule(rule deviceRule) error { if e.rules == nil { e.rules = make(map[deviceMeta]devices.Permissions) } @@ -177,7 +180,7 @@ func (e *Emulator) rmRule(rule deviceRule) error { // Only give an error if the set of permissions overlap. partialPerms := e.rules[partialMeta] if !partialPerms.Intersection(rule.perms).IsEmpty() { - return fmt.Errorf("requested rule [%v %v] not supported by devices cgroupv1 (cannot punch hole in existing wildcard rule [%v %v])", rule.meta, rule.perms, partialMeta, partialPerms) + return errors.Errorf("requested rule [%v %v] not supported by devices cgroupv1 (cannot punch hole in existing wildcard rule [%v %v])", rule.meta, rule.perms, partialMeta, partialPerms) } } @@ -209,9 +212,9 @@ func (e *Emulator) allow(rule *deviceRule) error { var err error if e.defaultAllow { - err = wrapErr(e.rmRule(*rule), "unable to remove 'deny' exception") + err = errors.Wrap(e.rmRule(*rule), "remove 'deny' exception") } else { - err = wrapErr(e.addRule(*rule), "unable to add 'allow' exception") + err = errors.Wrap(e.addRule(*rule), "add 'allow' exception") } return err } @@ -229,16 +232,16 @@ func (e *Emulator) deny(rule *deviceRule) error { var err error if e.defaultAllow { - err = wrapErr(e.addRule(*rule), "unable to add 'deny' exception") + err = errors.Wrap(e.addRule(*rule), "add 'deny' exception") } else { - err = wrapErr(e.rmRule(*rule), "unable to remove 'allow' exception") + err = errors.Wrap(e.rmRule(*rule), "remove 'allow' exception") } return err } func (e *Emulator) Apply(rule devices.Rule) error { if !rule.Type.CanCgroup() { - return fmt.Errorf("cannot add rule [%#v] with non-cgroup type %q", rule, rule.Type) + return errors.Errorf("cannot add rule [%#v] with non-cgroup type %q", rule, rule.Type) } innerRule := &deviceRule{ @@ -280,17 +283,17 @@ func EmulatorFromList(list io.Reader) (*Emulator, error) { line := s.Text() deviceRule, err := parseLine(line) if err != nil { - return nil, fmt.Errorf("error parsing line %q: %w", line, err) + return nil, errors.Wrapf(err, "parsing line %q", line) } // "devices.list" is an allow list. Note that this means that in // black-list mode, we have no idea what rules are in play. As a // result, we need to be very careful in Transition(). if err := e.allow(deviceRule); err != nil { - return nil, fmt.Errorf("error adding devices.list rule: %w", err) + return nil, errors.Wrapf(err, "adding devices.list rule") } } if err := s.Err(); err != nil { - return nil, fmt.Errorf("error reading devices.list lines: %w", err) + return nil, errors.Wrap(err, "reading devices.list lines") } return e, nil } @@ -302,7 +305,7 @@ func EmulatorFromList(list io.Reader) (*Emulator, error) { // necessary. // // This function is the sole reason for all of Emulator -- to allow us -// to figure out how to update a containers' cgroups without causing spurious +// to figure out how to update a containers' cgroups without causing spurrious // device errors (if possible). func (source *Emulator) Transition(target *Emulator) ([]*devices.Rule, error) { var transitionRules []*devices.Rule @@ -377,10 +380,3 @@ func (e *Emulator) Rules() ([]*devices.Rule, error) { defaultCgroup := &Emulator{defaultAllow: false} return defaultCgroup.Transition(e) } - -func wrapErr(err error, text string) error { - if err == nil { - return nil - } - return fmt.Errorf(text+": %w", err) -} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/ebpf/devicefilter/devicefilter.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/ebpf/devicefilter/devicefilter.go index 4e69b35bcdaa..96cbca3916e5 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/ebpf/devicefilter/devicefilter.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/ebpf/devicefilter/devicefilter.go @@ -7,14 +7,13 @@ package devicefilter import ( - "errors" - "fmt" "math" "strconv" "github.com/cilium/ebpf/asm" devicesemulator "github.com/opencontainers/runc/libcontainer/cgroups/devices" "github.com/opencontainers/runc/libcontainer/devices" + "github.com/pkg/errors" "golang.org/x/sys/unix" ) @@ -52,20 +51,21 @@ func DeviceFilter(rules []*devices.Rule) (asm.Instructions, string, error) { // only be one (at most) at the very start to instruct cgroupv1 to // go into allow-list mode. However we do double-check this here. if idx != 0 || rule.Allow != emu.IsBlacklist() { - return nil, "", fmt.Errorf("[internal error] emulated cgroupv2 devices ruleset had bad wildcard at idx %v (%s)", idx, rule.CgroupString()) + return nil, "", errors.Errorf("[internal error] emulated cgroupv2 devices ruleset had bad wildcard at idx %v (%s)", idx, rule.CgroupString()) } continue } if rule.Allow == p.defaultAllow { // There should be no rules which have an action equal to the // default action, the emulator removes those. - return nil, "", fmt.Errorf("[internal error] emulated cgroupv2 devices ruleset had no-op rule at idx %v (%s)", idx, rule.CgroupString()) + return nil, "", errors.Errorf("[internal error] emulated cgroupv2 devices ruleset had no-op rule at idx %v (%s)", idx, rule.CgroupString()) } if err := p.appendRule(rule); err != nil { return nil, "", err } } - return p.finalize(), license, nil + insts, err := p.finalize() + return insts, license, err } type program struct { @@ -118,13 +118,13 @@ func (p *program) appendRule(rule *devices.Rule) error { bpfType = int32(unix.BPF_DEVCG_DEV_BLOCK) default: // We do not permit 'a', nor any other types we don't know about. - return fmt.Errorf("invalid type %q", string(rule.Type)) + return errors.Errorf("invalid type %q", string(rule.Type)) } if rule.Major > math.MaxUint32 { - return fmt.Errorf("invalid major %d", rule.Major) + return errors.Errorf("invalid major %d", rule.Major) } if rule.Minor > math.MaxUint32 { - return fmt.Errorf("invalid minor %d", rule.Major) + return errors.Errorf("invalid minor %d", rule.Major) } hasMajor := rule.Major >= 0 // if not specified in OCI json, major is set to -1 hasMinor := rule.Minor >= 0 @@ -138,7 +138,7 @@ func (p *program) appendRule(rule *devices.Rule) error { case 'm': bpfAccess |= unix.BPF_DEVCG_ACC_MKNOD default: - return fmt.Errorf("unknown device access %v", r) + return errors.Errorf("unknown device access %v", r) } } // If the access is rwm, skip the check. @@ -180,7 +180,7 @@ func (p *program) appendRule(rule *devices.Rule) error { return nil } -func (p *program) finalize() asm.Instructions { +func (p *program) finalize() (asm.Instructions, error) { var v int32 if p.defaultAllow { v = 1 @@ -192,7 +192,7 @@ func (p *program) finalize() asm.Instructions { asm.Return(), ) p.blockID = -1 - return p.insts + return p.insts, nil } func acceptBlock(accept bool) asm.Instructions { diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/ebpf/ebpf_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/ebpf/ebpf_linux.go index 104c74a890f8..6c8de80dd865 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/ebpf/ebpf_linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/ebpf/ebpf_linux.go @@ -1,7 +1,6 @@ package ebpf import ( - "errors" "fmt" "os" "runtime" @@ -11,6 +10,7 @@ import ( "github.com/cilium/ebpf" "github.com/cilium/ebpf/asm" "github.com/cilium/ebpf/link" + "github.com/pkg/errors" "github.com/sirupsen/logrus" "golang.org/x/sys/unix" ) @@ -134,7 +134,7 @@ func haveBpfProgReplace() bool { // not supported return } - // attach_flags test succeeded. + // attach_flags test succeded. if !errors.Is(err, unix.EBADF) { logrus.Debugf("checking for BPF_F_REPLACE: got unexpected (not EBADF or EINVAL) error: %v", err) } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/file.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/file.go index 0cdaf747849f..5f6ab9fd6999 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/file.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/file.go @@ -2,27 +2,20 @@ package cgroups import ( "bytes" - "errors" - "fmt" "os" - "path" - "strconv" "strings" "sync" + "github.com/pkg/errors" "github.com/sirupsen/logrus" "golang.org/x/sys/unix" ) // OpenFile opens a cgroup file in a given dir with given flags. -// It is supposed to be used for cgroup files only, and returns -// an error if the file is not a cgroup file. -// -// Arguments dir and file are joined together to form an absolute path -// to a file being opened. +// It is supposed to be used for cgroup files only. func OpenFile(dir, file string, flags int) (*os.File, error) { if dir == "" { - return nil, fmt.Errorf("no directory specified for %s", file) + return nil, errors.Errorf("no directory specified for %s", file) } return openFile(dir, file, flags) } @@ -50,8 +43,7 @@ func WriteFile(dir, file, data string) error { } defer fd.Close() if err := retryingWriteFile(fd, data); err != nil { - // Having data in the error message helps in debugging. - return fmt.Errorf("failed to write %q: %w", data, err) + return errors.Wrapf(err, "failed to write %q", data) } return nil } @@ -89,7 +81,7 @@ func prepareOpenat2() error { }) if err != nil { prepErr = &os.PathError{Op: "openat2", Path: cgroupfsDir, Err: err} - if err != unix.ENOSYS { //nolint:errorlint // unix errors are bare + if err != unix.ENOSYS { logrus.Warnf("falling back to securejoin: %s", prepErr) } else { logrus.Debug("openat2 not available, falling back to securejoin") @@ -115,6 +107,8 @@ func prepareOpenat2() error { return prepErr } +// OpenFile opens a cgroup file in a given dir with given flags. +// It is supposed to be used for cgroup files only. func openFile(dir, file string, flags int) (*os.File, error) { mode := os.FileMode(0) if TestMode && flags&os.O_WRONLY != 0 { @@ -122,52 +116,34 @@ func openFile(dir, file string, flags int) (*os.File, error) { flags |= os.O_TRUNC | os.O_CREATE mode = 0o600 } - path := path.Join(dir, file) if prepareOpenat2() != nil { - return openFallback(path, flags, mode) + return openFallback(dir, file, flags, mode) } - relPath := strings.TrimPrefix(path, cgroupfsPrefix) - if len(relPath) == len(path) { // non-standard path, old system? - return openFallback(path, flags, mode) + reldir := strings.TrimPrefix(dir, cgroupfsPrefix) + if len(reldir) == len(dir) { // non-standard path, old system? + return openFallback(dir, file, flags, mode) } - fd, err := unix.Openat2(cgroupFd, relPath, + relname := reldir + "/" + file + fd, err := unix.Openat2(cgroupFd, relname, &unix.OpenHow{ Resolve: resolveFlags, Flags: uint64(flags) | unix.O_CLOEXEC, Mode: uint64(mode), }) if err != nil { - err = &os.PathError{Op: "openat2", Path: path, Err: err} - // Check if cgroupFd is still opened to cgroupfsDir - // (happens when this package is incorrectly used - // across the chroot/pivot_root/mntns boundary, or - // when /sys/fs/cgroup is remounted). - // - // TODO: if such usage will ever be common, amend this - // to reopen cgroupFd and retry openat2. - fdStr := strconv.Itoa(cgroupFd) - fdDest, _ := os.Readlink("/proc/self/fd/" + fdStr) - if fdDest != cgroupfsDir { - // Wrap the error so it is clear that cgroupFd - // is opened to an unexpected/wrong directory. - err = fmt.Errorf("cgroupFd %s unexpectedly opened to %s != %s: %w", - fdStr, fdDest, cgroupfsDir, err) - } - return nil, err + return nil, &os.PathError{Op: "openat2", Path: dir + "/" + file, Err: err} } - return os.NewFile(uintptr(fd), path), nil + return os.NewFile(uintptr(fd), cgroupfsPrefix+relname), nil } var errNotCgroupfs = errors.New("not a cgroup file") -// Can be changed by unit tests. -var openFallback = openAndCheck - -// openAndCheck is used when openat2(2) is not available. It checks the opened +// openFallback is used when openat2(2) is not available. It checks the opened // file is on cgroupfs, returning an error otherwise. -func openAndCheck(path string, flags int, mode os.FileMode) (*os.File, error) { +func openFallback(dir, file string, flags int, mode os.FileMode) (*os.File, error) { + path := dir + "/" + file fd, err := os.OpenFile(path, flags, mode) if err != nil { return nil, err diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/blkio.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/blkio.go index c81b6562ac50..88012a2f5f18 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/blkio.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/blkio.go @@ -1,7 +1,10 @@ +// +build linux + package fs import ( "bufio" + "fmt" "os" "path/filepath" "strconv" @@ -20,8 +23,8 @@ func (s *BlkioGroup) Name() string { return "blkio" } -func (s *BlkioGroup) Apply(path string, _ *configs.Resources, pid int) error { - return apply(path, pid) +func (s *BlkioGroup) Apply(path string, d *cgroupData) error { + return join(path, d.pid) } func (s *BlkioGroup) Set(path string, r *configs.Resources) error { @@ -128,19 +131,19 @@ func getBlkioStat(dir, file string) ([]cgroups.BlkioStatEntry, error) { // skip total line continue } else { - return nil, malformedLine(dir, file, sc.Text()) + return nil, fmt.Errorf("Invalid line found while parsing %s/%s: %s", dir, file, sc.Text()) } } v, err := strconv.ParseUint(fields[0], 10, 64) if err != nil { - return nil, &parseError{Path: dir, File: file, Err: err} + return nil, err } major := v v, err = strconv.ParseUint(fields[1], 10, 64) if err != nil { - return nil, &parseError{Path: dir, File: file, Err: err} + return nil, err } minor := v @@ -152,13 +155,10 @@ func getBlkioStat(dir, file string) ([]cgroups.BlkioStatEntry, error) { } v, err = strconv.ParseUint(fields[valueField], 10, 64) if err != nil { - return nil, &parseError{Path: dir, File: file, Err: err} + return nil, err } blkioStats = append(blkioStats, cgroups.BlkioStatEntry{Major: major, Minor: minor, Op: op, Value: v}) } - if err := sc.Err(); err != nil { - return nil, &parseError{Path: dir, File: file, Err: err} - } return blkioStats, nil } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/cpu.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/cpu.go index 6c79f899b484..7ca8b8a8d408 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/cpu.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/cpu.go @@ -1,3 +1,5 @@ +// +build linux + package fs import ( @@ -19,19 +21,24 @@ func (s *CpuGroup) Name() string { return "cpu" } -func (s *CpuGroup) Apply(path string, r *configs.Resources, pid int) error { +func (s *CpuGroup) Apply(path string, d *cgroupData) error { + // This might happen if we have no cpu cgroup mounted. + // Just do nothing and don't fail. + if path == "" { + return nil + } if err := os.MkdirAll(path, 0o755); err != nil { return err } // We should set the real-Time group scheduling settings before moving // in the process because if the process is already in SCHED_RR mode // and no RT bandwidth is set, adding it will fail. - if err := s.SetRtSched(path, r); err != nil { + if err := s.SetRtSched(path, d.config.Resources); err != nil { return err } - // Since we are not using apply(), we need to place the pid - // into the procs file. - return cgroups.WriteCgroupProc(path, pid) + // Since we are not using join(), we need to place the pid + // into the procs file unlike other subsystems. + return cgroups.WriteCgroupProc(path, d.pid) } func (s *CpuGroup) SetRtSched(path string, r *configs.Resources) error { @@ -98,8 +105,7 @@ func (s *CpuGroup) Set(path string, r *configs.Resources) error { } func (s *CpuGroup) GetStats(path string, stats *cgroups.Stats) error { - const file = "cpu.stat" - f, err := cgroups.OpenFile(path, file, os.O_RDONLY) + f, err := cgroups.OpenFile(path, "cpu.stat", os.O_RDONLY) if err != nil { if os.IsNotExist(err) { return nil @@ -112,7 +118,7 @@ func (s *CpuGroup) GetStats(path string, stats *cgroups.Stats) error { for sc.Scan() { t, v, err := fscommon.ParseKeyValue(sc.Text()) if err != nil { - return &parseError{Path: path, File: file, Err: err} + return err } switch t { case "nr_periods": diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/cpuacct.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/cpuacct.go index d3bd7e111c7d..4fbf078494c2 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/cpuacct.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/cpuacct.go @@ -1,8 +1,12 @@ +// +build linux + package fs import ( "bufio" + "fmt" "os" + "path/filepath" "strconv" "strings" @@ -34,8 +38,8 @@ func (s *CpuacctGroup) Name() string { return "cpuacct" } -func (s *CpuacctGroup) Apply(path string, _ *configs.Resources, pid int) error { - return apply(path, pid) +func (s *CpuacctGroup) Apply(path string, d *cgroupData) error { + return join(path, d.pid) } func (s *CpuacctGroup) Set(_ string, _ *configs.Resources) error { @@ -81,43 +85,45 @@ func getCpuUsageBreakdown(path string) (uint64, uint64, error) { const ( userField = "user" systemField = "system" - file = cgroupCpuacctStat ) // Expected format: // user // system - data, err := cgroups.ReadFile(path, file) + data, err := cgroups.ReadFile(path, cgroupCpuacctStat) if err != nil { return 0, 0, err } - // TODO: use strings.SplitN instead. fields := strings.Fields(data) - if len(fields) < 4 || fields[0] != userField || fields[2] != systemField { - return 0, 0, malformedLine(path, file, data) + if len(fields) < 4 { + return 0, 0, fmt.Errorf("failure - %s is expected to have at least 4 fields", filepath.Join(path, cgroupCpuacctStat)) + } + if fields[0] != userField { + return 0, 0, fmt.Errorf("unexpected field %q in %q, expected %q", fields[0], cgroupCpuacctStat, userField) + } + if fields[2] != systemField { + return 0, 0, fmt.Errorf("unexpected field %q in %q, expected %q", fields[2], cgroupCpuacctStat, systemField) } if userModeUsage, err = strconv.ParseUint(fields[1], 10, 64); err != nil { - return 0, 0, &parseError{Path: path, File: file, Err: err} + return 0, 0, err } if kernelModeUsage, err = strconv.ParseUint(fields[3], 10, 64); err != nil { - return 0, 0, &parseError{Path: path, File: file, Err: err} + return 0, 0, err } return (userModeUsage * nanosecondsInSecond) / clockTicks, (kernelModeUsage * nanosecondsInSecond) / clockTicks, nil } func getPercpuUsage(path string) ([]uint64, error) { - const file = "cpuacct.usage_percpu" percpuUsage := []uint64{} - data, err := cgroups.ReadFile(path, file) + data, err := cgroups.ReadFile(path, "cpuacct.usage_percpu") if err != nil { return percpuUsage, err } - // TODO: use strings.SplitN instead. for _, value := range strings.Fields(data) { value, err := strconv.ParseUint(value, 10, 64) if err != nil { - return percpuUsage, &parseError{Path: path, File: file, Err: err} + return percpuUsage, fmt.Errorf("Unable to convert param value to uint64: %s", err) } percpuUsage = append(percpuUsage, value) } @@ -127,17 +133,16 @@ func getPercpuUsage(path string) ([]uint64, error) { func getPercpuUsageInModes(path string) ([]uint64, []uint64, error) { usageKernelMode := []uint64{} usageUserMode := []uint64{} - const file = cgroupCpuacctUsageAll - fd, err := cgroups.OpenFile(path, file, os.O_RDONLY) + file, err := cgroups.OpenFile(path, cgroupCpuacctUsageAll, os.O_RDONLY) if os.IsNotExist(err) { return usageKernelMode, usageUserMode, nil } else if err != nil { return nil, nil, err } - defer fd.Close() + defer file.Close() - scanner := bufio.NewScanner(fd) + scanner := bufio.NewScanner(file) scanner.Scan() // skipping header line for scanner.Scan() { @@ -148,18 +153,19 @@ func getPercpuUsageInModes(path string) ([]uint64, []uint64, error) { usageInKernelMode, err := strconv.ParseUint(lineFields[kernelModeColumn], 10, 64) if err != nil { - return nil, nil, &parseError{Path: path, File: file, Err: err} + return nil, nil, fmt.Errorf("Unable to convert CPU usage in kernel mode to uint64: %s", err) } usageKernelMode = append(usageKernelMode, usageInKernelMode) usageInUserMode, err := strconv.ParseUint(lineFields[userModeColumn], 10, 64) if err != nil { - return nil, nil, &parseError{Path: path, File: file, Err: err} + return nil, nil, fmt.Errorf("Unable to convert CPU usage in user mode to uint64: %s", err) } usageUserMode = append(usageUserMode, usageInUserMode) } + if err := scanner.Err(); err != nil { - return nil, nil, &parseError{Path: path, File: file, Err: err} + return nil, nil, fmt.Errorf("Problem in reading %s line by line, %s", cgroupCpuacctUsageAll, err) } return usageKernelMode, usageUserMode, nil diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/cpuset.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/cpuset.go index 550baa427565..58a0f0406444 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/cpuset.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/cpuset.go @@ -1,17 +1,19 @@ +// +build linux + package fs import ( - "errors" + "fmt" "os" "path/filepath" "strconv" "strings" - "golang.org/x/sys/unix" - "github.com/opencontainers/runc/libcontainer/cgroups" "github.com/opencontainers/runc/libcontainer/cgroups/fscommon" "github.com/opencontainers/runc/libcontainer/configs" + "github.com/pkg/errors" + "golang.org/x/sys/unix" ) type CpusetGroup struct{} @@ -20,8 +22,8 @@ func (s *CpusetGroup) Name() string { return "cpuset" } -func (s *CpusetGroup) Apply(path string, r *configs.Resources, pid int) error { - return s.ApplyDir(path, r, pid) +func (s *CpusetGroup) Apply(path string, d *cgroupData) error { + return s.ApplyDir(path, d.config.Resources, d.pid) } func (s *CpusetGroup) Set(path string, r *configs.Resources) error { @@ -38,32 +40,32 @@ func (s *CpusetGroup) Set(path string, r *configs.Resources) error { return nil } -func getCpusetStat(path string, file string) ([]uint16, error) { +func getCpusetStat(path string, filename string) ([]uint16, error) { var extracted []uint16 - fileContent, err := fscommon.GetCgroupParamString(path, file) + fileContent, err := fscommon.GetCgroupParamString(path, filename) if err != nil { return extracted, err } if len(fileContent) == 0 { - return extracted, &parseError{Path: path, File: file, Err: errors.New("empty file")} + return extracted, fmt.Errorf("%s found to be empty", filepath.Join(path, filename)) } for _, s := range strings.Split(fileContent, ",") { - sp := strings.SplitN(s, "-", 3) - switch len(sp) { + splitted := strings.SplitN(s, "-", 3) + switch len(splitted) { case 3: - return extracted, &parseError{Path: path, File: file, Err: errors.New("extra dash")} + return extracted, fmt.Errorf("invalid values in %s", filepath.Join(path, filename)) case 2: - min, err := strconv.ParseUint(sp[0], 10, 16) + min, err := strconv.ParseUint(splitted[0], 10, 16) if err != nil { - return extracted, &parseError{Path: path, File: file, Err: err} + return extracted, err } - max, err := strconv.ParseUint(sp[1], 10, 16) + max, err := strconv.ParseUint(splitted[1], 10, 16) if err != nil { - return extracted, &parseError{Path: path, File: file, Err: err} + return extracted, err } if min > max { - return extracted, &parseError{Path: path, File: file, Err: errors.New("invalid values, min > max")} + return extracted, fmt.Errorf("invalid values in %s", filepath.Join(path, filename)) } for i := min; i <= max; i++ { extracted = append(extracted, uint16(i)) @@ -71,7 +73,7 @@ func getCpusetStat(path string, file string) ([]uint16, error) { case 1: value, err := strconv.ParseUint(s, 10, 16) if err != nil { - return extracted, &parseError{Path: path, File: file, Err: err} + return extracted, err } extracted = append(extracted, uint16(value)) } @@ -166,8 +168,9 @@ func (s *CpusetGroup) ApplyDir(dir string, r *configs.Resources, pid int) error if err := s.ensureCpusAndMems(dir, r); err != nil { return err } - // Since we are not using apply(), we need to place the pid - // into the procs file. + + // because we are not using d.join we need to place the pid into the procs file + // unlike the other subsystems return cgroups.WriteCgroupProc(dir, pid) } @@ -195,7 +198,7 @@ func cpusetEnsureParent(current string) error { } // Treat non-existing directory as cgroupfs as it will be created, // and the root cpuset directory obviously exists. - if err != nil && err != unix.ENOENT { //nolint:errorlint // unix errors are bare + if err != nil && err != unix.ENOENT { return &os.PathError{Op: "statfs", Path: parent, Err: err} } @@ -221,12 +224,12 @@ func cpusetCopyIfNeeded(current, parent string) error { } if isEmptyCpuset(currentCpus) { - if err := cgroups.WriteFile(current, "cpuset.cpus", parentCpus); err != nil { + if err := cgroups.WriteFile(current, "cpuset.cpus", string(parentCpus)); err != nil { return err } } if isEmptyCpuset(currentMems) { - if err := cgroups.WriteFile(current, "cpuset.mems", parentMems); err != nil { + if err := cgroups.WriteFile(current, "cpuset.mems", string(parentMems)); err != nil { return err } } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/devices.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/devices.go index 4527a70ebfcd..dcf69ce13e73 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/devices.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/devices.go @@ -1,3 +1,5 @@ +// +build linux + package fs import ( @@ -13,15 +15,15 @@ import ( ) type DevicesGroup struct { - TestingSkipFinalCheck bool + testingSkipFinalCheck bool } func (s *DevicesGroup) Name() string { return "devices" } -func (s *DevicesGroup) Apply(path string, r *configs.Resources, pid int) error { - if r.SkipDevices { +func (s *DevicesGroup) Apply(path string, d *cgroupData) error { + if d.config.SkipDevices { return nil } if path == "" { @@ -29,8 +31,7 @@ func (s *DevicesGroup) Apply(path string, r *configs.Resources, pid int) error { // is a hard requirement for container's security. return errSubsystemDoesNotExist } - - return apply(path, pid) + return join(path, d.pid) } func loadEmulator(path string) (*cgroupdevices.Emulator, error) { @@ -90,7 +91,7 @@ func (s *DevicesGroup) Set(path string, r *configs.Resources) error { // // This safety-check is skipped for the unit tests because we cannot // currently mock devices.list correctly. - if !s.TestingSkipFinalCheck { + if !s.testingSkipFinalCheck { currentAfter, err := loadEmulator(path) if err != nil { return err diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/error.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/error.go deleted file mode 100644 index f2ab6f130e31..000000000000 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/error.go +++ /dev/null @@ -1,15 +0,0 @@ -package fs - -import ( - "fmt" - - "github.com/opencontainers/runc/libcontainer/cgroups/fscommon" -) - -type parseError = fscommon.ParseError - -// malformedLine is used by all cgroupfs file parsers that expect a line -// in a particular format but get some garbage instead. -func malformedLine(path, file, line string) error { - return &parseError{Path: path, File: file, Err: fmt.Errorf("malformed line: %s", line)} -} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/freezer.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/freezer.go index 987f1bf5e742..4baa2798ac9c 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/freezer.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/freezer.go @@ -1,3 +1,5 @@ +// +build linux + package fs import ( @@ -19,8 +21,8 @@ func (s *FreezerGroup) Name() string { return "freezer" } -func (s *FreezerGroup) Apply(path string, _ *configs.Resources, pid int) error { - return apply(path, pid) +func (s *FreezerGroup) Apply(path string, d *cgroupData) error { + return join(path, d.pid) } func (s *FreezerGroup) Set(path string, r *configs.Resources) (Err error) { diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/fs.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/fs.go index fb4fcc7f75bb..777b94f03569 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/fs.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/fs.go @@ -1,86 +1,165 @@ +// +build linux + package fs import ( - "errors" "fmt" "os" + "path/filepath" "sync" - "golang.org/x/sys/unix" - "github.com/opencontainers/runc/libcontainer/cgroups" "github.com/opencontainers/runc/libcontainer/cgroups/fscommon" "github.com/opencontainers/runc/libcontainer/configs" + libcontainerUtils "github.com/opencontainers/runc/libcontainer/utils" + "github.com/pkg/errors" + "golang.org/x/sys/unix" ) -var subsystems = []subsystem{ - &CpusetGroup{}, - &DevicesGroup{}, - &MemoryGroup{}, - &CpuGroup{}, - &CpuacctGroup{}, - &PidsGroup{}, - &BlkioGroup{}, - &HugetlbGroup{}, - &NetClsGroup{}, - &NetPrioGroup{}, - &PerfEventGroup{}, - &FreezerGroup{}, - &RdmaGroup{}, - &NameGroup{GroupName: "name=systemd", Join: true}, -} +var ( + subsystems = []subsystem{ + &CpusetGroup{}, + &DevicesGroup{}, + &MemoryGroup{}, + &CpuGroup{}, + &CpuacctGroup{}, + &PidsGroup{}, + &BlkioGroup{}, + &HugetlbGroup{}, + &NetClsGroup{}, + &NetPrioGroup{}, + &PerfEventGroup{}, + &FreezerGroup{}, + &NameGroup{GroupName: "name=systemd", Join: true}, + } + HugePageSizes, _ = cgroups.GetHugePageSize() +) var errSubsystemDoesNotExist = errors.New("cgroup: subsystem does not exist") -func init() { - // If using cgroups-hybrid mode then add a "" controller indicating - // it should join the cgroups v2. - if cgroups.IsCgroup2HybridMode() { - subsystems = append(subsystems, &NameGroup{GroupName: "", Join: true}) - } -} - type subsystem interface { // Name returns the name of the subsystem. Name() string - // GetStats fills in the stats for the subsystem. + // Returns the stats, as 'stats', corresponding to the cgroup under 'path'. GetStats(path string, stats *cgroups.Stats) error - // Apply creates and joins a cgroup, adding pid into it. Some - // subsystems use resources to pre-configure the cgroup parents - // before creating or joining it. - Apply(path string, r *configs.Resources, pid int) error + // Creates and joins the cgroup represented by 'cgroupData'. + Apply(path string, c *cgroupData) error // Set sets the cgroup resources. Set(path string, r *configs.Resources) error } type manager struct { - mu sync.Mutex - cgroups *configs.Cgroup - paths map[string]string + mu sync.Mutex + cgroups *configs.Cgroup + rootless bool // ignore permission-related errors + paths map[string]string +} + +func NewManager(cg *configs.Cgroup, paths map[string]string, rootless bool) cgroups.Manager { + return &manager{ + cgroups: cg, + paths: paths, + rootless: rootless, + } } -func NewManager(cg *configs.Cgroup, paths map[string]string) (cgroups.Manager, error) { - // Some v1 controllers (cpu, cpuset, and devices) expect - // cgroups.Resources to not be nil in Apply. - if cg.Resources == nil { - return nil, errors.New("cgroup v1 manager needs configs.Resources to be set during manager creation") +// The absolute path to the root of the cgroup hierarchies. +var ( + cgroupRootLock sync.Mutex + cgroupRoot string +) + +const defaultCgroupRoot = "/sys/fs/cgroup" + +func tryDefaultCgroupRoot() string { + var st, pst unix.Stat_t + + // (1) it should be a directory... + err := unix.Lstat(defaultCgroupRoot, &st) + if err != nil || st.Mode&unix.S_IFDIR == 0 { + return "" } - if cg.Resources.Unified != nil { - return nil, cgroups.ErrV1NoUnified + + // (2) ... and a mount point ... + err = unix.Lstat(filepath.Dir(defaultCgroupRoot), &pst) + if err != nil { + return "" } - if paths == nil { - var err error - paths, err = initPaths(cg) - if err != nil { - return nil, err - } + if st.Dev == pst.Dev { + // parent dir has the same dev -- not a mount point + return "" } - return &manager{ - cgroups: cg, - paths: paths, - }, nil + // (3) ... of 'tmpfs' fs type. + var fst unix.Statfs_t + err = unix.Statfs(defaultCgroupRoot, &fst) + if err != nil || fst.Type != unix.TMPFS_MAGIC { + return "" + } + + // (4) it should have at least 1 entry ... + dir, err := os.Open(defaultCgroupRoot) + if err != nil { + return "" + } + names, err := dir.Readdirnames(1) + if err != nil { + return "" + } + if len(names) < 1 { + return "" + } + // ... which is a cgroup mount point. + err = unix.Statfs(filepath.Join(defaultCgroupRoot, names[0]), &fst) + if err != nil || fst.Type != unix.CGROUP_SUPER_MAGIC { + return "" + } + + return defaultCgroupRoot +} + +// Gets the cgroupRoot. +func getCgroupRoot() (string, error) { + cgroupRootLock.Lock() + defer cgroupRootLock.Unlock() + + if cgroupRoot != "" { + return cgroupRoot, nil + } + + // fast path + cgroupRoot = tryDefaultCgroupRoot() + if cgroupRoot != "" { + return cgroupRoot, nil + } + + // slow path: parse mountinfo + mi, err := cgroups.GetCgroupMounts(false) + if err != nil { + return "", err + } + if len(mi) < 1 { + return "", errors.New("no cgroup mount found in mountinfo") + } + + // Get the first cgroup mount (e.g. "/sys/fs/cgroup/memory"), + // use its parent directory. + root := filepath.Dir(mi[0].Mountpoint) + + if _, err := os.Stat(root); err != nil { + return "", err + } + + cgroupRoot = root + return cgroupRoot, nil +} + +type cgroupData struct { + root string + innerPath string + config *configs.Cgroup + pid int } // isIgnorableError returns whether err is a permission error (in the loose @@ -92,6 +171,8 @@ func isIgnorableError(rootless bool, err error) bool { if !rootless { return false } + // TODO: rm errors.Cause once we switch to %w everywhere + err = errors.Cause(err) // Is it an ordinary EPERM? if errors.Is(err, os.ErrPermission) { return true @@ -105,30 +186,56 @@ func isIgnorableError(rootless bool, err error) bool { } func (m *manager) Apply(pid int) (err error) { + if m.cgroups == nil { + return nil + } m.mu.Lock() defer m.mu.Unlock() c := m.cgroups + if c.Resources.Unified != nil { + return cgroups.ErrV1NoUnified + } + + m.paths = make(map[string]string) + if c.Paths != nil { + cgMap, err := cgroups.ParseCgroupFile("/proc/self/cgroup") + if err != nil { + return err + } + for name, path := range c.Paths { + // XXX(kolyshkin@): why this check is needed? + if _, ok := cgMap[name]; ok { + m.paths[name] = path + } + } + return cgroups.EnterPid(m.paths, pid) + } + + d, err := getCgroupData(m.cgroups, pid) + if err != nil { + return err + } for _, sys := range subsystems { - name := sys.Name() - p, ok := m.paths[name] - if !ok { - continue + p, err := d.path(sys.Name()) + if err != nil { + // The non-presence of the devices subsystem is + // considered fatal for security reasons. + if cgroups.IsNotFound(err) && (c.SkipDevices || sys.Name() != "devices") { + continue + } + return err } + m.paths[sys.Name()] = p - if err := sys.Apply(p, c.Resources, pid); err != nil { + if err := sys.Apply(p, d); err != nil { // In the case of rootless (including euid=0 in userns), where an // explicit cgroup path hasn't been set, we don't bail on error in - // case of permission problems here, but do delete the path from - // the m.paths map, since it is either non-existent and could not - // be created, or the pid could not be added to it. - // - // Cases where limits for the subsystem have been set are handled - // later by Set, which fails with a friendly error (see - // if path == "" in Set). - if isIgnorableError(c.Rootless, err) && c.Path == "" { - delete(m.paths, name) + // case of permission problems. Cases where limits have been set + // (and we couldn't create our own cgroup) are handled by Set. + if isIgnorableError(m.rootless, err) && m.cgroups.Path == "" { + delete(m.paths, sys.Name()) continue } return err @@ -139,6 +246,9 @@ func (m *manager) Apply(pid int) (err error) { } func (m *manager) Destroy() error { + if m.cgroups == nil || m.cgroups.Paths != nil { + return nil + } m.mu.Lock() defer m.mu.Unlock() return cgroups.RemovePaths(m.paths) @@ -171,6 +281,11 @@ func (m *manager) Set(r *configs.Resources) error { return nil } + // If Paths are set, then we are just joining cgroups paths + // and there is no need to set any values. + if m.cgroups != nil && m.cgroups.Paths != nil { + return nil + } if r.Unified != nil { return cgroups.ErrV1NoUnified } @@ -180,11 +295,10 @@ func (m *manager) Set(r *configs.Resources) error { for _, sys := range subsystems { path := m.paths[sys.Name()] if err := sys.Set(path, r); err != nil { - // When rootless is true, errors from the device subsystem - // are ignored, as it is really not expected to work. - if m.cgroups.Rootless && sys.Name() == "devices" { + if m.rootless && sys.Name() == "devices" { continue } + // When m.rootless is true, errors from the device subsystem are ignored because it is really not expected to work. // However, errors from other subsystems are not ignored. // see @test "runc create (rootless + limits + no cgrouppath + no permission) fails with informative error" if path == "" { @@ -203,7 +317,7 @@ func (m *manager) Set(r *configs.Resources) error { // provided func (m *manager) Freeze(state configs.FreezerState) error { path := m.Path("freezer") - if path == "" { + if m.cgroups == nil || path == "" { return errors.New("cannot toggle freezer: cgroups not configured for container") } @@ -225,6 +339,68 @@ func (m *manager) GetAllPids() ([]int, error) { return cgroups.GetAllPids(m.Path("devices")) } +func getCgroupData(c *configs.Cgroup, pid int) (*cgroupData, error) { + root, err := getCgroupRoot() + if err != nil { + return nil, err + } + + if (c.Name != "" || c.Parent != "") && c.Path != "" { + return nil, errors.New("cgroup: either Path or Name and Parent should be used") + } + + // XXX: Do not remove this code. Path safety is important! -- cyphar + cgPath := libcontainerUtils.CleanPath(c.Path) + cgParent := libcontainerUtils.CleanPath(c.Parent) + cgName := libcontainerUtils.CleanPath(c.Name) + + innerPath := cgPath + if innerPath == "" { + innerPath = filepath.Join(cgParent, cgName) + } + + return &cgroupData{ + root: root, + innerPath: innerPath, + config: c, + pid: pid, + }, nil +} + +func (raw *cgroupData) path(subsystem string) (string, error) { + // If the cgroup name/path is absolute do not look relative to the cgroup of the init process. + if filepath.IsAbs(raw.innerPath) { + mnt, err := cgroups.FindCgroupMountpoint(raw.root, subsystem) + // If we didn't mount the subsystem, there is no point we make the path. + if err != nil { + return "", err + } + + // Sometimes subsystems can be mounted together as 'cpu,cpuacct'. + return filepath.Join(raw.root, filepath.Base(mnt), raw.innerPath), nil + } + + // Use GetOwnCgroupPath instead of GetInitCgroupPath, because the creating + // process could in container and shared pid namespace with host, and + // /proc/1/cgroup could point to whole other world of cgroups. + parentPath, err := cgroups.GetOwnCgroupPath(subsystem) + if err != nil { + return "", err + } + + return filepath.Join(parentPath, raw.innerPath), nil +} + +func join(path string, pid int) error { + if path == "" { + return nil + } + if err := os.MkdirAll(path, 0o755); err != nil { + return err + } + return cgroups.WriteCgroupProc(path, pid) +} + func (m *manager) GetPaths() map[string]string { m.mu.Lock() defer m.mu.Unlock() @@ -256,7 +432,7 @@ func OOMKillCount(path string) (uint64, error) { func (m *manager) OOMKillCount() (uint64, error) { c, err := OOMKillCount(m.Path("memory")) // Ignore ENOENT when rootless as it couldn't create cgroup. - if err != nil && m.cgroups.Rootless && os.IsNotExist(err) { + if err != nil && m.rootless && os.IsNotExist(err) { err = nil } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/hugetlb.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/hugetlb.go index 8ddd6fdd8370..3cafc5399eed 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/hugetlb.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/hugetlb.go @@ -1,6 +1,9 @@ +// +build linux + package fs import ( + "fmt" "strconv" "github.com/opencontainers/runc/libcontainer/cgroups" @@ -14,8 +17,8 @@ func (s *HugetlbGroup) Name() string { return "hugetlb" } -func (s *HugetlbGroup) Apply(path string, _ *configs.Resources, pid int) error { - return apply(path, pid) +func (s *HugetlbGroup) Apply(path string, d *cgroupData) error { + return join(path, d.pid) } func (s *HugetlbGroup) Set(path string, r *configs.Resources) error { @@ -29,29 +32,29 @@ func (s *HugetlbGroup) Set(path string, r *configs.Resources) error { } func (s *HugetlbGroup) GetStats(path string, stats *cgroups.Stats) error { + hugetlbStats := cgroups.HugetlbStats{} if !cgroups.PathExists(path) { return nil } - hugetlbStats := cgroups.HugetlbStats{} - for _, pageSize := range cgroups.HugePageSizes() { + for _, pageSize := range HugePageSizes { usage := "hugetlb." + pageSize + ".usage_in_bytes" value, err := fscommon.GetCgroupParamUint(path, usage) if err != nil { - return err + return fmt.Errorf("failed to parse %s - %v", usage, err) } hugetlbStats.Usage = value maxUsage := "hugetlb." + pageSize + ".max_usage_in_bytes" value, err = fscommon.GetCgroupParamUint(path, maxUsage) if err != nil { - return err + return fmt.Errorf("failed to parse %s - %v", maxUsage, err) } hugetlbStats.MaxUsage = value failcnt := "hugetlb." + pageSize + ".failcnt" value, err = fscommon.GetCgroupParamUint(path, failcnt) if err != nil { - return err + return fmt.Errorf("failed to parse %s - %v", failcnt, err) } hugetlbStats.Failcnt = value diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/memory.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/memory.go index b7c75f941385..33946726f150 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/memory.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/memory.go @@ -1,8 +1,9 @@ +// +build linux + package fs import ( "bufio" - "errors" "fmt" "math" "os" @@ -10,11 +11,11 @@ import ( "strconv" "strings" - "golang.org/x/sys/unix" - "github.com/opencontainers/runc/libcontainer/cgroups" "github.com/opencontainers/runc/libcontainer/cgroups/fscommon" "github.com/opencontainers/runc/libcontainer/configs" + "github.com/pkg/errors" + "golang.org/x/sys/unix" ) const ( @@ -30,8 +31,8 @@ func (s *MemoryGroup) Name() string { return "memory" } -func (s *MemoryGroup) Apply(path string, _ *configs.Resources, pid int) error { - return apply(path, pid) +func (s *MemoryGroup) Apply(path string, d *cgroupData) (err error) { + return join(path, d.pid) } func setMemory(path string, val int64) error { @@ -55,7 +56,7 @@ func setMemory(path string, val int64) error { return err } - return fmt.Errorf("unable to set memory limit to %d (current usage: %d, peak usage: %d)", val, usage, max) + return errors.Errorf("unable to set memory limit to %d (current usage: %d, peak usage: %d)", val, usage, max) } func setSwap(path string, val int64) error { @@ -133,15 +134,15 @@ func (s *MemoryGroup) Set(path string, r *configs.Resources) error { return err } } else { - return fmt.Errorf("invalid memory swappiness value: %d (valid range is 0-100)", *r.MemorySwappiness) + return fmt.Errorf("invalid value:%d. valid memory swappiness range is 0-100", *r.MemorySwappiness) } return nil } func (s *MemoryGroup) GetStats(path string, stats *cgroups.Stats) error { - const file = "memory.stat" - statsFile, err := cgroups.OpenFile(path, file, os.O_RDONLY) + // Set stats from memory.stat. + statsFile, err := cgroups.OpenFile(path, "memory.stat", os.O_RDONLY) if err != nil { if os.IsNotExist(err) { return nil @@ -154,7 +155,7 @@ func (s *MemoryGroup) GetStats(path string, stats *cgroups.Stats) error { for sc.Scan() { t, v, err := fscommon.ParseKeyValue(sc.Text()) if err != nil { - return &parseError{Path: path, File: file, Err: err} + return fmt.Errorf("failed to parse memory.stat (%q) - %v", sc.Text(), err) } stats.MemoryStats.Stats[t] = v } @@ -219,42 +220,42 @@ func getMemoryData(path, name string) (cgroups.MemoryData, error) { // are optional in the kernel. return cgroups.MemoryData{}, nil } - return cgroups.MemoryData{}, err + return cgroups.MemoryData{}, fmt.Errorf("failed to parse %s - %v", usage, err) } memoryData.Usage = value value, err = fscommon.GetCgroupParamUint(path, maxUsage) if err != nil { - return cgroups.MemoryData{}, err + return cgroups.MemoryData{}, fmt.Errorf("failed to parse %s - %v", maxUsage, err) } memoryData.MaxUsage = value value, err = fscommon.GetCgroupParamUint(path, failcnt) if err != nil { - return cgroups.MemoryData{}, err + return cgroups.MemoryData{}, fmt.Errorf("failed to parse %s - %v", failcnt, err) } memoryData.Failcnt = value value, err = fscommon.GetCgroupParamUint(path, limit) if err != nil { - return cgroups.MemoryData{}, err + return cgroups.MemoryData{}, fmt.Errorf("failed to parse %s - %v", limit, err) } memoryData.Limit = value return memoryData, nil } -func getPageUsageByNUMA(path string) (cgroups.PageUsageByNUMA, error) { +func getPageUsageByNUMA(cgroupPath string) (cgroups.PageUsageByNUMA, error) { const ( maxColumns = math.MaxUint8 + 1 - file = "memory.numa_stat" + filename = "memory.numa_stat" ) stats := cgroups.PageUsageByNUMA{} - fd, err := cgroups.OpenFile(path, file, os.O_RDONLY) + file, err := cgroups.OpenFile(cgroupPath, filename, os.O_RDONLY) if os.IsNotExist(err) { return stats, nil } else if err != nil { return stats, err } - defer fd.Close() + defer file.Close() // File format is documented in linux/Documentation/cgroup-v1/memory.txt // and it looks like this: @@ -265,7 +266,7 @@ func getPageUsageByNUMA(path string) (cgroups.PageUsageByNUMA, error) { // unevictable= N0= N1= ... // hierarchical_= N0= N1= ... - scanner := bufio.NewScanner(fd) + scanner := bufio.NewScanner(file) for scanner.Scan() { var field *cgroups.PageStats @@ -283,7 +284,8 @@ func getPageUsageByNUMA(path string) (cgroups.PageUsageByNUMA, error) { } else { // The first column was already validated, // so be strict to the rest. - return stats, malformedLine(path, file, line) + return stats, fmt.Errorf("malformed line %q in %s", + line, filename) } } key, val := byNode[0], byNode[1] @@ -294,23 +296,24 @@ func getPageUsageByNUMA(path string) (cgroups.PageUsageByNUMA, error) { } field.Total, err = strconv.ParseUint(val, 0, 64) if err != nil { - return stats, &parseError{Path: path, File: file, Err: err} + return stats, err } field.Nodes = map[uint8]uint64{} } else { // Subsequent columns: key is N, val is usage. if len(key) < 2 || key[0] != 'N' { // This is definitely an error. - return stats, malformedLine(path, file, line) + return stats, fmt.Errorf("malformed line %q in %s", + line, filename) } n, err := strconv.ParseUint(key[1:], 10, 8) if err != nil { - return stats, &parseError{Path: path, File: file, Err: err} + return cgroups.PageUsageByNUMA{}, err } usage, err := strconv.ParseUint(val, 10, 64) if err != nil { - return stats, &parseError{Path: path, File: file, Err: err} + return cgroups.PageUsageByNUMA{}, err } field.Nodes[uint8(n)] = usage @@ -318,8 +321,9 @@ func getPageUsageByNUMA(path string) (cgroups.PageUsageByNUMA, error) { } } - if err := scanner.Err(); err != nil { - return cgroups.PageUsageByNUMA{}, &parseError{Path: path, File: file, Err: err} + err = scanner.Err() + if err != nil { + return cgroups.PageUsageByNUMA{}, err } return stats, nil diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/name.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/name.go index b8d5d849c520..94a94b5e8d00 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/name.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/name.go @@ -1,3 +1,5 @@ +// +build linux + package fs import ( @@ -14,10 +16,10 @@ func (s *NameGroup) Name() string { return s.GroupName } -func (s *NameGroup) Apply(path string, _ *configs.Resources, pid int) error { +func (s *NameGroup) Apply(path string, d *cgroupData) error { if s.Join { - // Ignore errors if the named cgroup does not exist. - _ = apply(path, pid) + // ignore errors if the named cgroup does not exist + _ = join(path, d.pid) } return nil } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/net_cls.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/net_cls.go index abfd09ce83ac..f2617aa44425 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/net_cls.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/net_cls.go @@ -1,3 +1,5 @@ +// +build linux + package fs import ( @@ -13,8 +15,8 @@ func (s *NetClsGroup) Name() string { return "net_cls" } -func (s *NetClsGroup) Apply(path string, _ *configs.Resources, pid int) error { - return apply(path, pid) +func (s *NetClsGroup) Apply(path string, d *cgroupData) error { + return join(path, d.pid) } func (s *NetClsGroup) Set(path string, r *configs.Resources) error { diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/net_prio.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/net_prio.go index da74d3779899..d0ac5e66bbbb 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/net_prio.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/net_prio.go @@ -1,3 +1,5 @@ +// +build linux + package fs import ( @@ -11,8 +13,8 @@ func (s *NetPrioGroup) Name() string { return "net_prio" } -func (s *NetPrioGroup) Apply(path string, _ *configs.Resources, pid int) error { - return apply(path, pid) +func (s *NetPrioGroup) Apply(path string, d *cgroupData) error { + return join(path, d.pid) } func (s *NetPrioGroup) Set(path string, r *configs.Resources) error { diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/paths.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/paths.go deleted file mode 100644 index 1092331b25d8..000000000000 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/paths.go +++ /dev/null @@ -1,186 +0,0 @@ -package fs - -import ( - "errors" - "os" - "path/filepath" - "sync" - - "golang.org/x/sys/unix" - - "github.com/opencontainers/runc/libcontainer/cgroups" - "github.com/opencontainers/runc/libcontainer/configs" - "github.com/opencontainers/runc/libcontainer/utils" -) - -// The absolute path to the root of the cgroup hierarchies. -var ( - cgroupRootLock sync.Mutex - cgroupRoot string -) - -const defaultCgroupRoot = "/sys/fs/cgroup" - -func initPaths(cg *configs.Cgroup) (map[string]string, error) { - root, err := rootPath() - if err != nil { - return nil, err - } - - inner, err := innerPath(cg) - if err != nil { - return nil, err - } - - paths := make(map[string]string) - for _, sys := range subsystems { - name := sys.Name() - path, err := subsysPath(root, inner, name) - if err != nil { - // The non-presence of the devices subsystem - // is considered fatal for security reasons. - if cgroups.IsNotFound(err) && (cg.SkipDevices || name != "devices") { - continue - } - - return nil, err - } - paths[name] = path - } - - return paths, nil -} - -func tryDefaultCgroupRoot() string { - var st, pst unix.Stat_t - - // (1) it should be a directory... - err := unix.Lstat(defaultCgroupRoot, &st) - if err != nil || st.Mode&unix.S_IFDIR == 0 { - return "" - } - - // (2) ... and a mount point ... - err = unix.Lstat(filepath.Dir(defaultCgroupRoot), &pst) - if err != nil { - return "" - } - - if st.Dev == pst.Dev { - // parent dir has the same dev -- not a mount point - return "" - } - - // (3) ... of 'tmpfs' fs type. - var fst unix.Statfs_t - err = unix.Statfs(defaultCgroupRoot, &fst) - if err != nil || fst.Type != unix.TMPFS_MAGIC { - return "" - } - - // (4) it should have at least 1 entry ... - dir, err := os.Open(defaultCgroupRoot) - if err != nil { - return "" - } - names, err := dir.Readdirnames(1) - if err != nil { - return "" - } - if len(names) < 1 { - return "" - } - // ... which is a cgroup mount point. - err = unix.Statfs(filepath.Join(defaultCgroupRoot, names[0]), &fst) - if err != nil || fst.Type != unix.CGROUP_SUPER_MAGIC { - return "" - } - - return defaultCgroupRoot -} - -// rootPath finds and returns path to the root of the cgroup hierarchies. -func rootPath() (string, error) { - cgroupRootLock.Lock() - defer cgroupRootLock.Unlock() - - if cgroupRoot != "" { - return cgroupRoot, nil - } - - // fast path - cgroupRoot = tryDefaultCgroupRoot() - if cgroupRoot != "" { - return cgroupRoot, nil - } - - // slow path: parse mountinfo - mi, err := cgroups.GetCgroupMounts(false) - if err != nil { - return "", err - } - if len(mi) < 1 { - return "", errors.New("no cgroup mount found in mountinfo") - } - - // Get the first cgroup mount (e.g. "/sys/fs/cgroup/memory"), - // use its parent directory. - root := filepath.Dir(mi[0].Mountpoint) - - if _, err := os.Stat(root); err != nil { - return "", err - } - - cgroupRoot = root - return cgroupRoot, nil -} - -func innerPath(c *configs.Cgroup) (string, error) { - if (c.Name != "" || c.Parent != "") && c.Path != "" { - return "", errors.New("cgroup: either Path or Name and Parent should be used") - } - - // XXX: Do not remove CleanPath. Path safety is important! -- cyphar - innerPath := utils.CleanPath(c.Path) - if innerPath == "" { - cgParent := utils.CleanPath(c.Parent) - cgName := utils.CleanPath(c.Name) - innerPath = filepath.Join(cgParent, cgName) - } - - return innerPath, nil -} - -func subsysPath(root, inner, subsystem string) (string, error) { - // If the cgroup name/path is absolute do not look relative to the cgroup of the init process. - if filepath.IsAbs(inner) { - mnt, err := cgroups.FindCgroupMountpoint(root, subsystem) - // If we didn't mount the subsystem, there is no point we make the path. - if err != nil { - return "", err - } - - // Sometimes subsystems can be mounted together as 'cpu,cpuacct'. - return filepath.Join(root, filepath.Base(mnt), inner), nil - } - - // Use GetOwnCgroupPath instead of GetInitCgroupPath, because the creating - // process could in container and shared pid namespace with host, and - // /proc/1/cgroup could point to whole other world of cgroups. - parentPath, err := cgroups.GetOwnCgroupPath(subsystem) - if err != nil { - return "", err - } - - return filepath.Join(parentPath, inner), nil -} - -func apply(path string, pid int) error { - if path == "" { - return nil - } - if err := os.MkdirAll(path, 0o755); err != nil { - return err - } - return cgroups.WriteCgroupProc(path, pid) -} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/perf_event.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/perf_event.go index b86955c8f31b..1a306fbe3f75 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/perf_event.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/perf_event.go @@ -1,3 +1,5 @@ +// +build linux + package fs import ( @@ -11,8 +13,8 @@ func (s *PerfEventGroup) Name() string { return "perf_event" } -func (s *PerfEventGroup) Apply(path string, _ *configs.Resources, pid int) error { - return apply(path, pid) +func (s *PerfEventGroup) Apply(path string, d *cgroupData) error { + return join(path, d.pid) } func (s *PerfEventGroup) Set(_ string, _ *configs.Resources) error { diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/pids.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/pids.go index 1f13532a5ad2..1b08433c4502 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/pids.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/pids.go @@ -1,7 +1,10 @@ +// +build linux + package fs import ( - "math" + "fmt" + "path/filepath" "strconv" "github.com/opencontainers/runc/libcontainer/cgroups" @@ -15,8 +18,8 @@ func (s *PidsGroup) Name() string { return "pids" } -func (s *PidsGroup) Apply(path string, _ *configs.Resources, pid int) error { - return apply(path, pid) +func (s *PidsGroup) Apply(path string, d *cgroupData) error { + return join(path, d.pid) } func (s *PidsGroup) Set(path string, r *configs.Resources) error { @@ -42,18 +45,21 @@ func (s *PidsGroup) GetStats(path string, stats *cgroups.Stats) error { } current, err := fscommon.GetCgroupParamUint(path, "pids.current") if err != nil { - return err + return fmt.Errorf("failed to parse pids.current - %s", err) } - max, err := fscommon.GetCgroupParamUint(path, "pids.max") + maxString, err := fscommon.GetCgroupParamString(path, "pids.max") if err != nil { - return err + return fmt.Errorf("failed to parse pids.max - %s", err) } - // If no limit is set, read from pids.max returns "max", which is - // converted to MaxUint64 by GetCgroupParamUint. Historically, we - // represent "no limit" for pids as 0, thus this conversion. - if max == math.MaxUint64 { - max = 0 + + // Default if pids.max == "max" is 0 -- which represents "no limit". + var max uint64 + if maxString != "max" { + max, err = fscommon.ParseUint(maxString, 10, 64) + if err != nil { + return fmt.Errorf("failed to parse pids.max - unable to parse %q as a uint from Cgroup file %q", maxString, filepath.Join(path, "pids.max")) + } } stats.PidsStats.Current = current diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/rdma.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/rdma.go deleted file mode 100644 index 5bbe0f35f813..000000000000 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/rdma.go +++ /dev/null @@ -1,25 +0,0 @@ -package fs - -import ( - "github.com/opencontainers/runc/libcontainer/cgroups" - "github.com/opencontainers/runc/libcontainer/cgroups/fscommon" - "github.com/opencontainers/runc/libcontainer/configs" -) - -type RdmaGroup struct{} - -func (s *RdmaGroup) Name() string { - return "rdma" -} - -func (s *RdmaGroup) Apply(path string, _ *configs.Resources, pid int) error { - return apply(path, pid) -} - -func (s *RdmaGroup) Set(path string, r *configs.Resources) error { - return fscommon.RdmaSet(path, r) -} - -func (s *RdmaGroup) GetStats(path string, stats *cgroups.Stats) error { - return fscommon.RdmaGetStats(path, stats) -} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/unsupported.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/unsupported.go new file mode 100644 index 000000000000..3ef9e031586e --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/unsupported.go @@ -0,0 +1,3 @@ +// +build !linux + +package fs diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/cpu.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/cpu.go index bbbae4d58c4a..25c47c9617e7 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/cpu.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/cpu.go @@ -1,3 +1,5 @@ +// +build linux + package fs2 import ( @@ -47,8 +49,7 @@ func setCpu(dirPath string, r *configs.Resources) error { } func statCpu(dirPath string, stats *cgroups.Stats) error { - const file = "cpu.stat" - f, err := cgroups.OpenFile(dirPath, file, os.O_RDONLY) + f, err := cgroups.OpenFile(dirPath, "cpu.stat", os.O_RDONLY) if err != nil { return err } @@ -58,7 +59,7 @@ func statCpu(dirPath string, stats *cgroups.Stats) error { for sc.Scan() { t, v, err := fscommon.ParseKeyValue(sc.Text()) if err != nil { - return &parseError{Path: dirPath, File: file, Err: err} + return err } switch t { case "usage_usec": @@ -80,8 +81,5 @@ func statCpu(dirPath string, stats *cgroups.Stats) error { stats.CpuStats.ThrottlingData.ThrottledTime = v * 1000 } } - if err := sc.Err(); err != nil { - return &parseError{Path: dirPath, File: file, Err: err} - } return nil } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/cpuset.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/cpuset.go index 16c45bad8f08..da29d7f2bbb5 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/cpuset.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/cpuset.go @@ -1,3 +1,5 @@ +// +build linux + package fs2 import ( diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/defaultpath.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/defaultpath.go index 9c949c91f084..ba81ce0b41be 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/defaultpath.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/defaultpath.go @@ -18,37 +18,41 @@ package fs2 import ( "bufio" - "errors" - "fmt" "io" "os" "path/filepath" "strings" "github.com/opencontainers/runc/libcontainer/configs" - "github.com/opencontainers/runc/libcontainer/utils" + libcontainerUtils "github.com/opencontainers/runc/libcontainer/utils" + "github.com/pkg/errors" ) const UnifiedMountpoint = "/sys/fs/cgroup" func defaultDirPath(c *configs.Cgroup) (string, error) { if (c.Name != "" || c.Parent != "") && c.Path != "" { - return "", fmt.Errorf("cgroup: either Path or Name and Parent should be used, got %+v", c) + return "", errors.Errorf("cgroup: either Path or Name and Parent should be used, got %+v", c) } + if len(c.Paths) != 0 { + // never set by specconv + return "", errors.Errorf("cgroup: Paths is unsupported, use Path, got %+v", c) + } + + // XXX: Do not remove this code. Path safety is important! -- cyphar + cgPath := libcontainerUtils.CleanPath(c.Path) + cgParent := libcontainerUtils.CleanPath(c.Parent) + cgName := libcontainerUtils.CleanPath(c.Name) - return _defaultDirPath(UnifiedMountpoint, c.Path, c.Parent, c.Name) + return _defaultDirPath(UnifiedMountpoint, cgPath, cgParent, cgName) } func _defaultDirPath(root, cgPath, cgParent, cgName string) (string, error) { if (cgName != "" || cgParent != "") && cgPath != "" { return "", errors.New("cgroup: either Path or Name and Parent should be used") } - - // XXX: Do not remove CleanPath. Path safety is important! -- cyphar - innerPath := utils.CleanPath(cgPath) + innerPath := cgPath if innerPath == "" { - cgParent := utils.CleanPath(cgParent) - cgName := utils.CleanPath(cgName) innerPath = filepath.Join(cgParent, cgName) } if filepath.IsAbs(innerPath) { @@ -85,7 +89,7 @@ func parseCgroupFromReader(r io.Reader) (string, error) { parts = strings.SplitN(text, ":", 3) ) if len(parts) < 3 { - return "", fmt.Errorf("invalid cgroup entry: %q", text) + return "", errors.Errorf("invalid cgroup entry: %q", text) } // text is like "0::/user.slice/user-1001.slice/session-1.scope" if parts[0] == "0" && parts[1] == "" { diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/devices.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/devices.go index 0d23456072ca..7c501cad8a63 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/devices.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/devices.go @@ -1,15 +1,16 @@ +// +build linux + package fs2 import ( - "fmt" - - "golang.org/x/sys/unix" - "github.com/opencontainers/runc/libcontainer/cgroups/ebpf" "github.com/opencontainers/runc/libcontainer/cgroups/ebpf/devicefilter" "github.com/opencontainers/runc/libcontainer/configs" "github.com/opencontainers/runc/libcontainer/devices" "github.com/opencontainers/runc/libcontainer/userns" + + "github.com/pkg/errors" + "golang.org/x/sys/unix" ) func isRWM(perms devices.Permissions) bool { @@ -63,7 +64,7 @@ func setDevices(dirPath string, r *configs.Resources) error { } dirFD, err := unix.Open(dirPath, unix.O_DIRECTORY|unix.O_RDONLY, 0o600) if err != nil { - return fmt.Errorf("cannot get dir FD for %s", dirPath) + return errors.Errorf("cannot get dir FD for %s", dirPath) } defer unix.Close(dirFD) if _, err := ebpf.LoadAttachCgroupDeviceFilter(insts, license, dirFD); err != nil { diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/freezer.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/freezer.go index 8917a6411d68..e901f7a07b1d 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/freezer.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/freezer.go @@ -1,17 +1,19 @@ +// +build linux + package fs2 import ( "bufio" - "errors" + stdErrors "errors" "fmt" "os" "strings" "time" - "golang.org/x/sys/unix" - "github.com/opencontainers/runc/libcontainer/cgroups" "github.com/opencontainers/runc/libcontainer/configs" + "github.com/pkg/errors" + "golang.org/x/sys/unix" ) func setFreezer(dirPath string, state configs.FreezerState) error { @@ -24,7 +26,7 @@ func setFreezer(dirPath string, state configs.FreezerState) error { case configs.Thawed: stateStr = "0" default: - return fmt.Errorf("invalid freezer state %q requested", state) + return errors.Errorf("invalid freezer state %q requested", state) } fd, err := cgroups.OpenFile(dirPath, "cgroup.freeze", unix.O_RDWR) @@ -35,7 +37,7 @@ func setFreezer(dirPath string, state configs.FreezerState) error { if state != configs.Frozen { return nil } - return fmt.Errorf("freezer not supported: %w", err) + return errors.Wrap(err, "freezer not supported") } defer fd.Close() @@ -46,7 +48,7 @@ func setFreezer(dirPath string, state configs.FreezerState) error { if actualState, err := readFreezer(dirPath, fd); err != nil { return err } else if actualState != state { - return fmt.Errorf(`expected "cgroup.freeze" to be in state %q but was in %q`, state, actualState) + return errors.Errorf(`expected "cgroup.freeze" to be in state %q but was in %q`, state, actualState) } return nil } @@ -56,7 +58,7 @@ func getFreezer(dirPath string) (configs.FreezerState, error) { if err != nil { // If the kernel is too old, then we just treat the freezer as being in // an "undefined" state. - if os.IsNotExist(err) || errors.Is(err, unix.ENODEV) { + if os.IsNotExist(err) || stdErrors.Is(err, unix.ENODEV) { err = nil } return configs.Undefined, err @@ -80,7 +82,7 @@ func readFreezer(dirPath string, fd *os.File) (configs.FreezerState, error) { case "1\n": return waitFrozen(dirPath) default: - return configs.Undefined, fmt.Errorf(`unknown "cgroup.freeze" state: %q`, state) + return configs.Undefined, errors.Errorf(`unknown "cgroup.freeze" state: %q`, state) } } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/fs2.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/fs2.go index 492778e31051..afba0ab1c88d 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/fs2.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/fs2.go @@ -1,7 +1,8 @@ +// +build linux + package fs2 import ( - "errors" "fmt" "os" "strings" @@ -9,10 +10,9 @@ import ( "github.com/opencontainers/runc/libcontainer/cgroups" "github.com/opencontainers/runc/libcontainer/cgroups/fscommon" "github.com/opencontainers/runc/libcontainer/configs" + "github.com/pkg/errors" ) -type parseError = fscommon.ParseError - type manager struct { config *configs.Cgroup // dirPath is like "/sys/fs/cgroup/user.slice/user-1001.slice/session-1.scope" @@ -20,12 +20,16 @@ type manager struct { // controllers is content of "cgroup.controllers" file. // excludes pseudo-controllers ("devices" and "freezer"). controllers map[string]struct{} + rootless bool } // NewManager creates a manager for cgroup v2 unified hierarchy. // dirPath is like "/sys/fs/cgroup/user.slice/user-1001.slice/session-1.scope". // If dirPath is empty, it is automatically set using config. -func NewManager(config *configs.Cgroup, dirPath string) (cgroups.Manager, error) { +func NewManager(config *configs.Cgroup, dirPath string, rootless bool) (cgroups.Manager, error) { + if config == nil { + config = &configs.Cgroup{} + } if dirPath == "" { var err error dirPath, err = defaultDirPath(config) @@ -35,8 +39,9 @@ func NewManager(config *configs.Cgroup, dirPath string) (cgroups.Manager, error) } m := &manager{ - config: config, - dirPath: dirPath, + config: config, + dirPath: dirPath, + rootless: rootless, } return m, nil } @@ -48,7 +53,7 @@ func (m *manager) getControllers() error { data, err := cgroups.ReadFile(m.dirPath, "cgroup.controllers") if err != nil { - if m.config.Rootless && m.config.Path == "" { + if m.rootless && m.config.Path == "" { return nil } return err @@ -68,12 +73,12 @@ func (m *manager) Apply(pid int) error { // - "runc create (no limits + no cgrouppath + no permission) succeeds" // - "runc create (rootless + no limits + cgrouppath + no permission) fails with permission error" // - "runc create (rootless + limits + no cgrouppath + no permission) fails with informative error" - if m.config.Rootless { + if m.rootless { if m.config.Path == "" { if blNeed, nErr := needAnyControllers(m.config.Resources); nErr == nil && !blNeed { return nil } - return fmt.Errorf("rootless needs no limits + no cgrouppath when no permission is granted for cgroups: %w", err) + return errors.Wrap(err, "rootless needs no limits + no cgrouppath when no permission is granted for cgroups") } } return err @@ -118,20 +123,13 @@ func (m *manager) GetStats() (*cgroups.Stats, error) { if err := statHugeTlb(m.dirPath, st); err != nil && !os.IsNotExist(err) { errs = append(errs, err) } - // rdma (since kernel 4.11) - if err := fscommon.RdmaGetStats(m.dirPath, st); err != nil && !os.IsNotExist(err) { - errs = append(errs, err) - } - if len(errs) > 0 && !m.config.Rootless { - return st, fmt.Errorf("error while statting cgroup v2: %+v", errs) + if len(errs) > 0 && !m.rootless { + return st, errors.Errorf("error while statting cgroup v2: %+v", errs) } return st, nil } func (m *manager) Freeze(state configs.FreezerState) error { - if m.config.Resources == nil { - return errors.New("cannot toggle freezer: cgroups not configured for container") - } if err := setFreezer(m.dirPath, state); err != nil { return err } @@ -148,9 +146,6 @@ func (m *manager) Path(_ string) string { } func (m *manager) Set(r *configs.Resources) error { - if r == nil { - return nil - } if err := m.getControllers(); err != nil { return err } @@ -172,10 +167,10 @@ func (m *manager) Set(r *configs.Resources) error { } // devices (since kernel 4.15, pseudo-controller) // - // When rootless is true, errors from the device subsystem are ignored because it is really not expected to work. + // When m.rootless is true, errors from the device subsystem are ignored because it is really not expected to work. // However, errors from other subsystems are not ignored. // see @test "runc create (rootless + limits + no cgrouppath + no permission) fails with informative error" - if err := setDevices(m.dirPath, r); err != nil && !m.config.Rootless { + if err := setDevices(m.dirPath, r); err != nil && !m.rootless { return err } // cpuset (since kernel 5.0) @@ -186,10 +181,6 @@ func (m *manager) Set(r *configs.Resources) error { if err := setHugeTlb(m.dirPath, r); err != nil { return err } - // rdma (since kernel 4.11) - if err := fscommon.RdmaSet(m.dirPath, r); err != nil { - return err - } // freezer (since kernel 5.2, pseudo-controller) if err := setFreezer(m.dirPath, r.Freezer); err != nil { return err @@ -207,8 +198,9 @@ func (m *manager) setUnified(res map[string]string) error { return fmt.Errorf("unified resource %q must be a file name (no slashes)", k) } if err := cgroups.WriteFile(m.dirPath, k, v); err != nil { + errC := errors.Cause(err) // Check for both EPERM and ENOENT since O_CREAT is used by WriteFile. - if errors.Is(err, os.ErrPermission) || errors.Is(err, os.ErrNotExist) { + if errors.Is(errC, os.ErrPermission) || errors.Is(errC, os.ErrNotExist) { // Check if a controller is available, // to give more specific error if not. sk := strings.SplitN(k, ".", 2) @@ -220,7 +212,7 @@ func (m *manager) setUnified(res map[string]string) error { return fmt.Errorf("unified resource %q can't be set: controller %q not available", k, c) } } - return fmt.Errorf("unable to set unified resource %q: %w", k, err) + return errors.Wrapf(err, "can't set unified resource %q", k) } } @@ -251,7 +243,7 @@ func OOMKillCount(path string) (uint64, error) { func (m *manager) OOMKillCount() (uint64, error) { c, err := OOMKillCount(m.dirPath) - if err != nil && m.config.Rootless && os.IsNotExist(err) { + if err != nil && m.rootless && os.IsNotExist(err) { err = nil } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/hugetlb.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/hugetlb.go index c92a7e64af02..3f513975bd30 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/hugetlb.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/hugetlb.go @@ -1,8 +1,12 @@ +// +build linux + package fs2 import ( "strconv" + "github.com/pkg/errors" + "github.com/opencontainers/runc/libcontainer/cgroups" "github.com/opencontainers/runc/libcontainer/cgroups/fscommon" "github.com/opencontainers/runc/libcontainer/configs" @@ -26,8 +30,13 @@ func setHugeTlb(dirPath string, r *configs.Resources) error { } func statHugeTlb(dirPath string, stats *cgroups.Stats) error { + hugePageSizes, err := cgroups.GetHugePageSize() + if err != nil { + return errors.Wrap(err, "failed to fetch hugetlb info") + } hugetlbStats := cgroups.HugetlbStats{} - for _, pagesize := range cgroups.HugePageSizes() { + + for _, pagesize := range hugePageSizes { value, err := fscommon.GetCgroupParamUint(dirPath, "hugetlb."+pagesize+".current") if err != nil { return err @@ -37,7 +46,7 @@ func statHugeTlb(dirPath string, stats *cgroups.Stats) error { fileName := "hugetlb." + pagesize + ".events" value, err = fscommon.GetValueByKey(dirPath, fileName, "max") if err != nil { - return err + return errors.Wrap(err, "failed to read stats") } hugetlbStats.Failcnt = value diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/io.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/io.go index b2ff7d340868..fd3f0993ea0c 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/io.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/io.go @@ -1,3 +1,5 @@ +// +build linux + package fs2 import ( @@ -115,14 +117,13 @@ func readCgroup2MapFile(dirPath string, name string) (map[string][]string, error ret[parts[0]] = parts[1:] } if err := scanner.Err(); err != nil { - return nil, &parseError{Path: dirPath, File: name, Err: err} + return nil, err } return ret, nil } func statIo(dirPath string, stats *cgroups.Stats) error { - const file = "io.stat" - values, err := readCgroup2MapFile(dirPath, file) + values, err := readCgroup2MapFile(dirPath, "io.stat") if err != nil { return err } @@ -135,11 +136,11 @@ func statIo(dirPath string, stats *cgroups.Stats) error { } major, err := strconv.ParseUint(d[0], 10, 64) if err != nil { - return &parseError{Path: dirPath, File: file, Err: err} + return err } minor, err := strconv.ParseUint(d[1], 10, 64) if err != nil { - return &parseError{Path: dirPath, File: file, Err: err} + return err } for _, item := range v { @@ -176,7 +177,7 @@ func statIo(dirPath string, stats *cgroups.Stats) error { value, err := strconv.ParseUint(d[1], 10, 64) if err != nil { - return &parseError{Path: dirPath, File: file, Err: err} + return err } entry := cgroups.BlkioStatEntry{ diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/memory.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/memory.go index adbc4b23086a..53e8f1e93498 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/memory.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/memory.go @@ -1,18 +1,19 @@ +// +build linux + package fs2 import ( "bufio" - "errors" "math" "os" "strconv" "strings" - "golang.org/x/sys/unix" - "github.com/opencontainers/runc/libcontainer/cgroups" "github.com/opencontainers/runc/libcontainer/cgroups/fscommon" "github.com/opencontainers/runc/libcontainer/configs" + "github.com/pkg/errors" + "golang.org/x/sys/unix" ) // numToStr converts an int64 value to a string for writing to a @@ -74,8 +75,8 @@ func setMemory(dirPath string, r *configs.Resources) error { } func statMemory(dirPath string, stats *cgroups.Stats) error { - const file = "memory.stat" - statsFile, err := cgroups.OpenFile(dirPath, file, os.O_RDONLY) + // Set stats from memory.stat. + statsFile, err := cgroups.OpenFile(dirPath, "memory.stat", os.O_RDONLY) if err != nil { return err } @@ -85,13 +86,10 @@ func statMemory(dirPath string, stats *cgroups.Stats) error { for sc.Scan() { t, v, err := fscommon.ParseKeyValue(sc.Text()) if err != nil { - return &parseError{Path: dirPath, File: file, Err: err} + return errors.Wrapf(err, "failed to parse memory.stat (%q)", sc.Text()) } stats.MemoryStats.Stats[t] = v } - if err := sc.Err(); err != nil { - return &parseError{Path: dirPath, File: file, Err: err} - } stats.MemoryStats.Cache = stats.MemoryStats.Stats["file"] // Unlike cgroup v1 which has memory.use_hierarchy binary knob, // cgroup v2 is always hierarchical. @@ -141,13 +139,13 @@ func getMemoryDataV2(path, name string) (cgroups.MemoryData, error) { // swapaccount=0 kernel boot parameter is given. return cgroups.MemoryData{}, nil } - return cgroups.MemoryData{}, err + return cgroups.MemoryData{}, errors.Wrapf(err, "failed to parse %s", usage) } memoryData.Usage = value value, err = fscommon.GetCgroupParamUint(path, limit) if err != nil { - return cgroups.MemoryData{}, err + return cgroups.MemoryData{}, errors.Wrapf(err, "failed to parse %s", limit) } memoryData.Limit = value @@ -155,8 +153,7 @@ func getMemoryDataV2(path, name string) (cgroups.MemoryData, error) { } func statsFromMeminfo(stats *cgroups.Stats) error { - const file = "/proc/meminfo" - f, err := os.Open(file) + f, err := os.Open("/proc/meminfo") if err != nil { return err } @@ -193,7 +190,7 @@ func statsFromMeminfo(stats *cgroups.Stats) error { vStr := strings.TrimSpace(strings.TrimSuffix(parts[1], " kB")) *p, err = strconv.ParseUint(vStr, 10, 64) if err != nil { - return &parseError{File: file, Err: errors.New("bad value for " + k)} + return errors.Wrap(err, "parsing /proc/meminfo "+k) } found++ @@ -202,8 +199,8 @@ func statsFromMeminfo(stats *cgroups.Stats) error { break } } - if err := sc.Err(); err != nil { - return &parseError{Path: "", File: file, Err: err} + if sc.Err() != nil { + return sc.Err() } stats.MemoryStats.SwapUsage.Usage = (swap_total - swap_free) * 1024 diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/pids.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/pids.go index c8c4a365894a..e2050002d0e5 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/pids.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/pids.go @@ -1,16 +1,17 @@ +// +build linux + package fs2 import ( - "errors" - "math" "os" + "path/filepath" "strings" - "golang.org/x/sys/unix" - "github.com/opencontainers/runc/libcontainer/cgroups" "github.com/opencontainers/runc/libcontainer/cgroups/fscommon" "github.com/opencontainers/runc/libcontainer/configs" + "github.com/pkg/errors" + "golang.org/x/sys/unix" ) func isPidsSet(r *configs.Resources) bool { @@ -52,18 +53,22 @@ func statPids(dirPath string, stats *cgroups.Stats) error { if os.IsNotExist(err) { return statPidsFromCgroupProcs(dirPath, stats) } - return err + return errors.Wrap(err, "failed to parse pids.current") } - max, err := fscommon.GetCgroupParamUint(dirPath, "pids.max") + maxString, err := fscommon.GetCgroupParamString(dirPath, "pids.max") if err != nil { - return err + return errors.Wrap(err, "failed to parse pids.max") } - // If no limit is set, read from pids.max returns "max", which is - // converted to MaxUint64 by GetCgroupParamUint. Historically, we - // represent "no limit" for pids as 0, thus this conversion. - if max == math.MaxUint64 { - max = 0 + + // Default if pids.max == "max" is 0 -- which represents "no limit". + var max uint64 + if maxString != "max" { + max, err = fscommon.ParseUint(maxString, 10, 64) + if err != nil { + return errors.Wrapf(err, "failed to parse pids.max - unable to parse %q as a uint from Cgroup file %q", + maxString, filepath.Join(dirPath, "pids.max")) + } } stats.PidsStats.Current = current diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fscommon/rdma.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fscommon/rdma.go deleted file mode 100644 index d463d15ee4e4..000000000000 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fscommon/rdma.go +++ /dev/null @@ -1,121 +0,0 @@ -package fscommon - -import ( - "bufio" - "errors" - "math" - "os" - "strconv" - "strings" - - "github.com/opencontainers/runc/libcontainer/cgroups" - "github.com/opencontainers/runc/libcontainer/configs" - "golang.org/x/sys/unix" -) - -// parseRdmaKV parses raw string to RdmaEntry. -func parseRdmaKV(raw string, entry *cgroups.RdmaEntry) error { - var value uint32 - - parts := strings.SplitN(raw, "=", 3) - - if len(parts) != 2 { - return errors.New("Unable to parse RDMA entry") - } - - k, v := parts[0], parts[1] - - if v == "max" { - value = math.MaxUint32 - } else { - val64, err := strconv.ParseUint(v, 10, 32) - if err != nil { - return err - } - value = uint32(val64) - } - if k == "hca_handle" { - entry.HcaHandles = value - } else if k == "hca_object" { - entry.HcaObjects = value - } - - return nil -} - -// readRdmaEntries reads and converts array of rawstrings to RdmaEntries from file. -// example entry: mlx4_0 hca_handle=2 hca_object=2000 -func readRdmaEntries(dir, file string) ([]cgroups.RdmaEntry, error) { - rdmaEntries := make([]cgroups.RdmaEntry, 0) - fd, err := cgroups.OpenFile(dir, file, unix.O_RDONLY) - if err != nil { - return nil, err - } - defer fd.Close() //nolint:errorlint - scanner := bufio.NewScanner(fd) - for scanner.Scan() { - parts := strings.SplitN(scanner.Text(), " ", 4) - if len(parts) == 3 { - entry := new(cgroups.RdmaEntry) - entry.Device = parts[0] - err = parseRdmaKV(parts[1], entry) - if err != nil { - continue - } - err = parseRdmaKV(parts[2], entry) - if err != nil { - continue - } - - rdmaEntries = append(rdmaEntries, *entry) - } - } - return rdmaEntries, scanner.Err() -} - -// RdmaGetStats returns rdma stats such as totalLimit and current entries. -func RdmaGetStats(path string, stats *cgroups.Stats) error { - currentEntries, err := readRdmaEntries(path, "rdma.current") - if err != nil { - if errors.Is(err, os.ErrNotExist) { - err = nil - } - return err - } - maxEntries, err := readRdmaEntries(path, "rdma.max") - if err != nil { - return err - } - // If device got removed between reading two files, ignore returning stats. - if len(currentEntries) != len(maxEntries) { - return nil - } - - stats.RdmaStats = cgroups.RdmaStats{ - RdmaLimit: maxEntries, - RdmaCurrent: currentEntries, - } - - return nil -} - -func createCmdString(device string, limits configs.LinuxRdma) string { - cmdString := device - if limits.HcaHandles != nil { - cmdString += " hca_handle=" + strconv.FormatUint(uint64(*limits.HcaHandles), 10) - } - if limits.HcaObjects != nil { - cmdString += " hca_object=" + strconv.FormatUint(uint64(*limits.HcaObjects), 10) - } - return cmdString -} - -// RdmaSet sets RDMA resources. -func RdmaSet(path string, r *configs.Resources) error { - for device, limits := range r.Rdma { - if err := cgroups.WriteFile(path, "rdma.max", createCmdString(device, limits)); err != nil { - return err - } - } - return nil -} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fscommon/utils.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fscommon/utils.go index f4a51c9e56fd..e31146ae9dfc 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fscommon/utils.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fscommon/utils.go @@ -1,10 +1,11 @@ +// +build linux + package fscommon import ( "errors" "fmt" "math" - "path" "strconv" "strings" @@ -12,6 +13,8 @@ import ( ) var ( + ErrNotValidFormat = errors.New("line is not a valid key value format") + // Deprecated: use cgroups.OpenFile instead. OpenFile = cgroups.OpenFile // Deprecated: use cgroups.ReadFile instead. @@ -20,19 +23,6 @@ var ( WriteFile = cgroups.WriteFile ) -// ParseError records a parse error details, including the file path. -type ParseError struct { - Path string - File string - Err error -} - -func (e *ParseError) Error() string { - return "unable to parse " + path.Join(e.Path, e.File) + ": " + e.Err.Error() -} - -func (e *ParseError) Unwrap() error { return e.Err } - // ParseUint converts a string to an uint64 integer. // Negative values are returned at zero as, due to kernel bugs, // some of the memory cgroup stats can be negative. @@ -44,7 +34,7 @@ func ParseUint(s string, base, bitSize int) (uint64, error) { // 2. Handle negative values lesser than MinInt64 if intErr == nil && intValue < 0 { return 0, nil - } else if errors.Is(intErr, strconv.ErrRange) && intValue < 0 { + } else if intErr != nil && intErr.(*strconv.NumError).Err == strconv.ErrRange && intValue < 0 { return 0, nil } @@ -66,7 +56,7 @@ func ParseKeyValue(t string) (string, uint64, error) { value, err := ParseUint(parts[1], 10, 64) if err != nil { - return "", 0, err + return "", 0, fmt.Errorf("unable to convert to uint64: %v", err) } return parts[0], value, nil @@ -81,15 +71,11 @@ func GetValueByKey(path, file, key string) (uint64, error) { return 0, err } - lines := strings.Split(content, "\n") + lines := strings.Split(string(content), "\n") for _, line := range lines { arr := strings.Split(line, " ") if len(arr) == 2 && arr[0] == key { - val, err := ParseUint(arr[1], 10, 64) - if err != nil { - err = &ParseError{Path: path, File: file, Err: err} - } - return val, err + return ParseUint(arr[1], 10, 64) } } @@ -110,7 +96,7 @@ func GetCgroupParamUint(path, file string) (uint64, error) { res, err := ParseUint(contents, 10, 64) if err != nil { - return res, &ParseError{Path: path, File: file, Err: err} + return res, fmt.Errorf("unable to parse file %q", path+"/"+file) } return res, nil } @@ -129,7 +115,7 @@ func GetCgroupParamInt(path, file string) (int64, error) { res, err := strconv.ParseInt(contents, 10, 64) if err != nil { - return res, &ParseError{Path: path, File: file, Err: err} + return res, fmt.Errorf("unable to parse %q as a int from Cgroup file %q", contents, path+"/"+file) } return res, nil } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/getallpids.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/getallpids.go deleted file mode 100644 index 1355a5101055..000000000000 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/getallpids.go +++ /dev/null @@ -1,27 +0,0 @@ -package cgroups - -import ( - "io/fs" - "path/filepath" -) - -// GetAllPids returns all pids from the cgroup identified by path, and all its -// sub-cgroups. -func GetAllPids(path string) ([]int, error) { - var pids []int - err := filepath.WalkDir(path, func(p string, d fs.DirEntry, iErr error) error { - if iErr != nil { - return iErr - } - if !d.IsDir() { - return nil - } - cPids, err := readProcsFile(p) - if err != nil { - return err - } - pids = append(pids, cPids...) - return nil - }) - return pids, err -} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/manager/new.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/manager/new.go deleted file mode 100644 index 5df120d0f09f..000000000000 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/manager/new.go +++ /dev/null @@ -1,78 +0,0 @@ -package manager - -import ( - "errors" - "fmt" - "path/filepath" - - "github.com/opencontainers/runc/libcontainer/cgroups" - "github.com/opencontainers/runc/libcontainer/cgroups/fs" - "github.com/opencontainers/runc/libcontainer/cgroups/fs2" - "github.com/opencontainers/runc/libcontainer/cgroups/systemd" - "github.com/opencontainers/runc/libcontainer/configs" -) - -// New returns the instance of a cgroup manager, which is chosen -// based on the local environment (whether cgroup v1 or v2 is used) -// and the config (whether config.Systemd is set or not). -func New(config *configs.Cgroup) (cgroups.Manager, error) { - return NewWithPaths(config, nil) -} - -// NewWithPaths is similar to New, and can be used in case cgroup paths -// are already well known, which can save some resources. -// -// For cgroup v1, the keys are controller/subsystem name, and the values -// are absolute filesystem paths to the appropriate cgroups. -// -// For cgroup v2, the only key allowed is "" (empty string), and the value -// is the unified cgroup path. -func NewWithPaths(config *configs.Cgroup, paths map[string]string) (cgroups.Manager, error) { - if config == nil { - return nil, errors.New("cgroups/manager.New: config must not be nil") - } - if config.Systemd && !systemd.IsRunningSystemd() { - return nil, errors.New("systemd not running on this host, cannot use systemd cgroups manager") - } - - // Cgroup v2 aka unified hierarchy. - if cgroups.IsCgroup2UnifiedMode() { - path, err := getUnifiedPath(paths) - if err != nil { - return nil, fmt.Errorf("manager.NewWithPaths: inconsistent paths: %w", err) - } - if config.Systemd { - return systemd.NewUnifiedManager(config, path) - } - return fs2.NewManager(config, path) - } - - // Cgroup v1. - if config.Systemd { - return systemd.NewLegacyManager(config, paths) - } - - return fs.NewManager(config, paths) -} - -// getUnifiedPath is an implementation detail of libcontainer factory. -// Historically, it saves cgroup paths as per-subsystem path map (as returned -// by cm.GetPaths(""), but with v2 we only have one single unified path -// (with "" as a key). -// -// This function converts from that map to string (using "" as a key), -// and also checks that the map itself is sane. -func getUnifiedPath(paths map[string]string) (string, error) { - if len(paths) > 1 { - return "", fmt.Errorf("expected a single path, got %+v", paths) - } - path := paths[""] - // can be empty - if path != "" { - if filepath.Clean(path) != path || !filepath.IsAbs(path) { - return "", fmt.Errorf("invalid path: %q", path) - } - } - - return path, nil -} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/stats.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/stats.go index 40a81dd5a860..e7f9c462635c 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/stats.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/stats.go @@ -1,3 +1,5 @@ +// +build linux + package cgroups type ThrottlingData struct { @@ -124,7 +126,7 @@ type BlkioStatEntry struct { } type BlkioStats struct { - // number of bytes transferred to and from the block device + // number of bytes tranferred to and from the block device IoServiceBytesRecursive []BlkioStatEntry `json:"io_service_bytes_recursive,omitempty"` IoServicedRecursive []BlkioStatEntry `json:"io_serviced_recursive,omitempty"` IoQueuedRecursive []BlkioStatEntry `json:"io_queue_recursive,omitempty"` @@ -144,17 +146,6 @@ type HugetlbStats struct { Failcnt uint64 `json:"failcnt"` } -type RdmaEntry struct { - Device string `json:"device,omitempty"` - HcaHandles uint32 `json:"hca_handles,omitempty"` - HcaObjects uint32 `json:"hca_objects,omitempty"` -} - -type RdmaStats struct { - RdmaLimit []RdmaEntry `json:"rdma_limit,omitempty"` - RdmaCurrent []RdmaEntry `json:"rdma_current,omitempty"` -} - type Stats struct { CpuStats CpuStats `json:"cpu_stats,omitempty"` CPUSetStats CPUSetStats `json:"cpuset_stats,omitempty"` @@ -163,7 +154,6 @@ type Stats struct { BlkioStats BlkioStats `json:"blkio_stats,omitempty"` // the map is in the format "size of hugepage: stats of the hugepage" HugetlbStats map[string]HugetlbStats `json:"hugetlb_stats,omitempty"` - RdmaStats RdmaStats `json:"rdma_stats,omitempty"` } func NewStats() *Stats { diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/common.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/common.go index 98ccc51655cb..06c6c2e95a66 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/common.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/common.go @@ -3,7 +3,6 @@ package systemd import ( "bufio" "context" - "errors" "fmt" "math" "os" @@ -15,11 +14,11 @@ import ( systemdDbus "github.com/coreos/go-systemd/v22/dbus" dbus "github.com/godbus/dbus/v5" - "github.com/sirupsen/logrus" - cgroupdevices "github.com/opencontainers/runc/libcontainer/cgroups/devices" "github.com/opencontainers/runc/libcontainer/configs" "github.com/opencontainers/runc/libcontainer/devices" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" ) const ( @@ -93,7 +92,7 @@ func groupPrefix(ruleType devices.Type) (string, error) { case devices.CharDevice: return "char-", nil default: - return "", fmt.Errorf("device type %v has no group prefix", ruleType) + return "", errors.Errorf("device type %v has no group prefix", ruleType) } } @@ -143,9 +142,9 @@ func findDeviceGroup(ruleType devices.Type, ruleMajor int64) (string, error) { ) if n, err := fmt.Sscanf(line, "%d %s", &currMajor, &currName); err != nil || n != 2 { if err == nil { - err = errors.New("wrong number of fields") + err = errors.Errorf("wrong number of fields") } - return "", fmt.Errorf("scan /proc/devices line %q: %w", line, err) + return "", errors.Wrapf(err, "scan /proc/devices line %q", line) } if currMajor == ruleMajor { @@ -153,7 +152,7 @@ func findDeviceGroup(ruleType devices.Type, ruleMajor int64) (string, error) { } } if err := scanner.Err(); err != nil { - return "", fmt.Errorf("reading /proc/devices: %w", err) + return "", errors.Wrap(err, "reading /proc/devices") } // Couldn't find the device group. return "", nil @@ -193,12 +192,12 @@ func generateDeviceProperties(r *configs.Resources) ([]systemdDbus.Property, err configEmu := &cgroupdevices.Emulator{} for _, rule := range r.Devices { if err := configEmu.Apply(*rule); err != nil { - return nil, fmt.Errorf("unable to apply rule for systemd: %w", err) + return nil, errors.Wrap(err, "apply rule for systemd") } } // systemd doesn't support blacklists. So we log a warning, and tell // systemd to act as a deny-all whitelist. This ruleset will be replaced - // with our normal fallback code. This may result in spurious errors, but + // with our normal fallback code. This may result in spurrious errors, but // the only other option is to error out here. if configEmu.IsBlacklist() { // However, if we're dealing with an allow-all rule then we can do it. @@ -214,19 +213,19 @@ func generateDeviceProperties(r *configs.Resources) ([]systemdDbus.Property, err // whitelist which is the default for devices.Emulator. finalRules, err := configEmu.Rules() if err != nil { - return nil, fmt.Errorf("unable to get simplified rules for systemd: %w", err) + return nil, errors.Wrap(err, "get simplified rules for systemd") } var deviceAllowList []deviceAllowEntry for _, rule := range finalRules { if !rule.Allow { // Should never happen. - return nil, fmt.Errorf("[internal error] cannot add deny rule to systemd DeviceAllow list: %v", *rule) + return nil, errors.Errorf("[internal error] cannot add deny rule to systemd DeviceAllow list: %v", *rule) } switch rule.Type { case devices.BlockDevice, devices.CharDevice: default: // Should never happen. - return nil, fmt.Errorf("invalid device type for DeviceAllow: %v", rule.Type) + return nil, errors.Errorf("invalid device type for DeviceAllow: %v", rule.Type) } entry := deviceAllowEntry{ @@ -272,7 +271,7 @@ func generateDeviceProperties(r *configs.Resources) ([]systemdDbus.Property, err // "_ n:* _" rules require a device group from /proc/devices. group, err := findDeviceGroup(rule.Type, rule.Major) if err != nil { - return nil, fmt.Errorf("unable to find device '%v/%d': %w", rule.Type, rule.Major, err) + return nil, errors.Wrapf(err, "find device '%v/%d'", rule.Type, rule.Major) } if group == "" { // Couldn't find a group. @@ -351,7 +350,7 @@ func startUnit(cm *dbusConnManager, unitName string, properties []systemdDbus.Pr // Please refer to https://pkg.go.dev/github.com/coreos/go-systemd/v22/dbus#Conn.StartUnit if s != "done" { resetFailedUnit(cm, unitName) - return fmt.Errorf("error creating systemd unit `%s`: got `%s`", unitName, s) + return errors.Errorf("error creating systemd unit `%s`: got `%s`", unitName, s) } case <-timeout.C: resetFailedUnit(cm, unitName) @@ -450,13 +449,10 @@ func systemdVersionAtoi(verStr string) (int, error) { re := regexp.MustCompile(`v?([0-9]+)`) matches := re.FindStringSubmatch(verStr) if len(matches) < 2 { - return 0, fmt.Errorf("can't parse version %s: incorrect number of matches %v", verStr, matches) + return 0, errors.Errorf("can't parse version %s: incorrect number of matches %v", verStr, matches) } ver, err := strconv.Atoi(matches[1]) - if err != nil { - return -1, fmt.Errorf("can't parse version: %w", err) - } - return ver, nil + return ver, errors.Wrapf(err, "can't parse version %s", verStr) } func addCpuQuota(cm *dbusConnManager, properties *[]systemdDbus.Property, quota int64, period uint64) { diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/cpuset.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/cpuset.go index 83d10dd705fd..642a04e7dd94 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/cpuset.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/cpuset.go @@ -1,10 +1,12 @@ package systemd import ( - "errors" - "math/big" + "encoding/binary" "strconv" "strings" + + "github.com/bits-and-blooms/bitset" + "github.com/pkg/errors" ) // RangeToBits converts a text representation of a CPU mask (as written to @@ -12,7 +14,7 @@ import ( // with the corresponding bits set (as consumed by systemd over dbus as // AllowedCPUs/AllowedMemoryNodes unit property value). func RangeToBits(str string) ([]byte, error) { - bits := new(big.Int) + bits := &bitset.BitSet{} for _, r := range strings.Split(str, ",") { // allow extra spaces around @@ -34,22 +36,32 @@ func RangeToBits(str string) ([]byte, error) { if start > end { return nil, errors.New("invalid range: " + r) } - for i := start; i <= end; i++ { - bits.SetBit(bits, int(i), 1) + for i := uint(start); i <= uint(end); i++ { + bits.Set(i) } } else { val, err := strconv.ParseUint(ranges[0], 10, 32) if err != nil { return nil, err } - bits.SetBit(bits, int(val), 1) + bits.Set(uint(val)) } } - ret := bits.Bytes() - if len(ret) == 0 { + val := bits.Bytes() + if len(val) == 0 { // do not allow empty values return nil, errors.New("empty value") } + ret := make([]byte, len(val)*8) + for i := range val { + // bitset uses BigEndian internally + binary.BigEndian.PutUint64(ret[i*8:], val[len(val)-1-i]) + } + // remove upper all-zero bytes + for ret[0] == 0 { + ret = ret[1:] + } + return ret, nil } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/dbus.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/dbus.go index 3e547e282b57..a70a9df43e8d 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/dbus.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/dbus.go @@ -1,8 +1,9 @@ +// +build linux + package systemd import ( "context" - "fmt" "sync" systemdDbus "github.com/coreos/go-systemd/v22/dbus" @@ -53,10 +54,7 @@ func (d *dbusConnManager) getConnection() (*systemdDbus.Conn, error) { conn, err := d.newConnection() if err != nil { - // When dbus-user-session is not installed, we can't detect whether we should try to connect to user dbus or system dbus, so d.dbusRootless is set to false. - // This may fail with a cryptic error "read unix @->/run/systemd/private: read: connection reset by peer: unknown." - // https://github.com/moby/moby/issues/42793 - return nil, fmt.Errorf("failed to connect to dbus (hint: for rootless containers, maybe you need to install dbus-user-session package, see https://github.com/opencontainers/runc/blob/master/docs/cgroup-v2.md): %w", err) + return nil, err } dbusC = conn return conn, nil diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/unsupported.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/unsupported.go new file mode 100644 index 000000000000..cb4d00c88b35 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/unsupported.go @@ -0,0 +1,71 @@ +// +build !linux + +package systemd + +import ( + "errors" + + "github.com/opencontainers/runc/libcontainer/cgroups" + "github.com/opencontainers/runc/libcontainer/configs" +) + +type Manager struct { + Cgroups *configs.Cgroup + Paths map[string]string +} + +func IsRunningSystemd() bool { + return false +} + +func NewSystemdCgroupsManager() (func(config *configs.Cgroup, paths map[string]string) cgroups.Manager, error) { + return nil, errors.New("Systemd not supported") +} + +func (m *Manager) Apply(pid int) error { + return errors.New("Systemd not supported") +} + +func (m *Manager) GetPids() ([]int, error) { + return nil, errors.New("Systemd not supported") +} + +func (m *Manager) GetAllPids() ([]int, error) { + return nil, errors.New("Systemd not supported") +} + +func (m *Manager) Destroy() error { + return errors.New("Systemd not supported") +} + +func (m *Manager) GetPaths() map[string]string { + return nil +} + +func (m *Manager) Path(_ string) string { + return "" +} + +func (m *Manager) GetStats() (*cgroups.Stats, error) { + return nil, errors.New("Systemd not supported") +} + +func (m *Manager) Set(container *configs.Config) error { + return errors.New("Systemd not supported") +} + +func (m *Manager) Freeze(state configs.FreezerState) error { + return errors.New("Systemd not supported") +} + +func Freeze(c *configs.Cgroup, state configs.FreezerState) error { + return errors.New("Systemd not supported") +} + +func (m *Manager) GetCgroups() (*configs.Cgroup, error) { + return nil, errors.New("Systemd not supported") +} + +func (m *Manager) Exists() bool { + return false +} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/user.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/user.go index 0f50f76eee4d..ddeaf6642638 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/user.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/user.go @@ -1,10 +1,10 @@ +// +build linux + package systemd import ( "bufio" "bytes" - "errors" - "fmt" "os" "os/exec" "path/filepath" @@ -13,8 +13,8 @@ import ( systemdDbus "github.com/coreos/go-systemd/v22/dbus" dbus "github.com/godbus/dbus/v5" - "github.com/opencontainers/runc/libcontainer/userns" + "github.com/pkg/errors" ) // newUserSystemdDbus creates a connection for systemd user-instance. @@ -31,17 +31,17 @@ func newUserSystemdDbus() (*systemdDbus.Conn, error) { return systemdDbus.NewConnection(func() (*dbus.Conn, error) { conn, err := dbus.Dial(addr) if err != nil { - return nil, fmt.Errorf("error while dialing %q: %w", addr, err) + return nil, errors.Wrapf(err, "error while dialing %q", addr) } methods := []dbus.Auth{dbus.AuthExternal(strconv.Itoa(uid))} err = conn.Auth(methods) if err != nil { conn.Close() - return nil, fmt.Errorf("error while authenticating connection (address=%q, UID=%d): %w", addr, uid, err) + return nil, errors.Wrapf(err, "error while authenticating connection, address=%q, UID=%d", addr, uid) } if err = conn.Hello(); err != nil { conn.Close() - return nil, fmt.Errorf("error while sending Hello message (address=%q, UID=%d): %w", addr, uid, err) + return nil, errors.Wrapf(err, "error while sending Hello message, address=%q, UID=%d", addr, uid) } return conn, nil }) @@ -57,7 +57,7 @@ func DetectUID() (int, error) { } b, err := exec.Command("busctl", "--user", "--no-pager", "status").CombinedOutput() if err != nil { - return -1, fmt.Errorf("could not execute `busctl --user --no-pager status` (output: %q): %w", string(b), err) + return -1, errors.Wrapf(err, "could not execute `busctl --user --no-pager status`: %q", string(b)) } scanner := bufio.NewScanner(bytes.NewReader(b)) for scanner.Scan() { @@ -66,7 +66,7 @@ func DetectUID() (int, error) { uidStr := strings.TrimPrefix(s, "OwnerUID=") i, err := strconv.Atoi(uidStr) if err != nil { - return -1, fmt.Errorf("could not detect the OwnerUID: %w", err) + return -1, errors.Wrapf(err, "could not detect the OwnerUID: %s", s) } return i, nil } @@ -93,7 +93,7 @@ func DetectUserDbusSessionBusAddress() (string, error) { } b, err := exec.Command("systemctl", "--user", "--no-pager", "show-environment").CombinedOutput() if err != nil { - return "", fmt.Errorf("could not execute `systemctl --user --no-pager show-environment` (output=%q): %w", string(b), err) + return "", errors.Wrapf(err, "could not execute `systemctl --user --no-pager show-environment`, output=%q", string(b)) } scanner := bufio.NewScanner(bytes.NewReader(b)) for scanner.Scan() { diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/v1.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/v1.go index a74a05a5cd05..cd4720c5d447 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/v1.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/v1.go @@ -1,3 +1,5 @@ +// +build linux + package systemd import ( @@ -24,25 +26,12 @@ type legacyManager struct { dbus *dbusConnManager } -func NewLegacyManager(cg *configs.Cgroup, paths map[string]string) (cgroups.Manager, error) { - if cg.Rootless { - return nil, errors.New("cannot use rootless systemd cgroups manager on cgroup v1") - } - if cg.Resources != nil && cg.Resources.Unified != nil { - return nil, cgroups.ErrV1NoUnified - } - if paths == nil { - var err error - paths, err = initPaths(cg) - if err != nil { - return nil, err - } - } +func NewLegacyManager(cg *configs.Cgroup, paths map[string]string) cgroups.Manager { return &legacyManager{ cgroups: cg, paths: paths, dbus: newDbusConnManager(false), - }, nil + } } type subsystem interface { @@ -70,7 +59,6 @@ var legacySubsystems = []subsystem{ &fs.NetPrioGroup{}, &fs.NetClsGroup{}, &fs.NameGroup{GroupName: "name=systemd"}, - &fs.RdmaGroup{}, } func genV1ResourcesProperties(r *configs.Resources, cm *dbusConnManager) ([]systemdDbus.Property, error) { @@ -112,53 +100,6 @@ func genV1ResourcesProperties(r *configs.Resources, cm *dbusConnManager) ([]syst return properties, nil } -// initPaths figures out and returns paths to cgroups. -func initPaths(c *configs.Cgroup) (map[string]string, error) { - slice := "system.slice" - if c.Parent != "" { - var err error - slice, err = ExpandSlice(c.Parent) - if err != nil { - return nil, err - } - } - - unit := getUnitName(c) - - paths := make(map[string]string) - for _, s := range legacySubsystems { - subsystemPath, err := getSubsystemPath(slice, unit, s.Name()) - if err != nil { - // Even if it's `not found` error, we'll return err - // because devices cgroup is hard requirement for - // container security. - if s.Name() == "devices" { - return nil, err - } - // Don't fail if a cgroup hierarchy was not found, just skip this subsystem - if cgroups.IsNotFound(err) { - continue - } - return nil, err - } - paths[s.Name()] = subsystemPath - } - - // If systemd is using cgroups-hybrid mode then add the slice path of - // this container to the paths so the following process executed with - // "runc exec" joins that cgroup as well. - if cgroups.IsCgroup2HybridMode() { - // "" means cgroup-hybrid path - cgroupsHybridPath, err := getSubsystemPath(slice, unit, "") - if err != nil && cgroups.IsNotFound(err) { - return nil, err - } - paths[""] = cgroupsHybridPath - } - - return paths, nil -} - func (m *legacyManager) Apply(pid int) error { var ( c = m.cgroups @@ -167,8 +108,27 @@ func (m *legacyManager) Apply(pid int) error { properties []systemdDbus.Property ) + if c.Resources.Unified != nil { + return cgroups.ErrV1NoUnified + } + m.mu.Lock() defer m.mu.Unlock() + if c.Paths != nil { + paths := make(map[string]string) + cgMap, err := cgroups.ParseCgroupFile("/proc/self/cgroup") + if err != nil { + return err + } + // XXX(kolyshkin@): why this check is needed? + for name, path := range c.Paths { + if _, ok := cgMap[name]; ok { + paths[name] = path + } + } + m.paths = paths + return cgroups.EnterPid(m.paths, pid) + } if c.Parent != "" { slice = c.Parent @@ -176,14 +136,12 @@ func (m *legacyManager) Apply(pid int) error { properties = append(properties, systemdDbus.PropDescription("libcontainer container "+c.Name)) + // if we create a slice, the parent is defined via a Wants= if strings.HasSuffix(unitName, ".slice") { - // If we create a slice, the parent is defined via a Wants=. properties = append(properties, systemdDbus.PropWants(slice)) } else { - // Otherwise it's a scope, which we put into a Slice=. + // otherwise, we use Slice= properties = append(properties, systemdDbus.PropSlice(slice)) - // Assume scopes always support delegation (supported since systemd v218). - properties = append(properties, newProp("Delegate", true)) } // only add pid if its valid, -1 is used w/ general slice creation. @@ -191,6 +149,12 @@ func (m *legacyManager) Apply(pid int) error { properties = append(properties, newProp("PIDs", []uint32{uint32(pid)})) } + // Check if we can delegate. This is only supported on systemd versions 218 and above. + if !strings.HasSuffix(unitName, ".slice") { + // Assume scopes always support delegation. + properties = append(properties, newProp("Delegate", true)) + } + // Always enable accounting, this gets us the same behaviour as the fs implementation, // plus the kernel has some problems with joining the memory cgroup at a later time. properties = append(properties, @@ -210,6 +174,26 @@ func (m *legacyManager) Apply(pid int) error { return err } + paths := make(map[string]string) + for _, s := range legacySubsystems { + subsystemPath, err := getSubsystemPath(m.cgroups, s.Name()) + if err != nil { + // Even if it's `not found` error, we'll return err + // because devices cgroup is hard requirement for + // container security. + if s.Name() == "devices" { + return err + } + // Don't fail if a cgroup hierarchy was not found, just skip this subsystem + if cgroups.IsNotFound(err) { + continue + } + return err + } + paths[s.Name()] = subsystemPath + } + m.paths = paths + if err := m.joinCgroups(pid); err != nil { return err } @@ -218,6 +202,9 @@ func (m *legacyManager) Apply(pid int) error { } func (m *legacyManager) Destroy() error { + if m.cgroups.Paths != nil { + return nil + } m.mu.Lock() defer m.mu.Unlock() @@ -267,7 +254,7 @@ func (m *legacyManager) joinCgroups(pid int) error { return nil } -func getSubsystemPath(slice, unit, subsystem string) (string, error) { +func getSubsystemPath(c *configs.Cgroup, subsystem string) (string, error) { mountpoint, err := cgroups.FindCgroupMountpoint("", subsystem) if err != nil { return "", err @@ -280,7 +267,17 @@ func getSubsystemPath(slice, unit, subsystem string) (string, error) { // if pid 1 is systemd 226 or later, it will be in init.scope, not the root initPath = strings.TrimSuffix(filepath.Clean(initPath), "init.scope") - return filepath.Join(mountpoint, initPath, slice, unit), nil + slice := "system.slice" + if c.Parent != "" { + slice = c.Parent + } + + slice, err = ExpandSlice(slice) + if err != nil { + return "", err + } + + return filepath.Join(mountpoint, initPath, slice, getUnitName(c)), nil } func (m *legacyManager) Freeze(state configs.FreezerState) error { @@ -402,7 +399,9 @@ func (m *legacyManager) freezeBeforeSet(unitName string, r *configs.Resources) ( } func (m *legacyManager) Set(r *configs.Resources) error { - if r == nil { + // If Paths are set, then we are just joining cgroups paths + // and there is no need to set any values. + if m.cgroups.Paths != nil { return nil } if r.Unified != nil { diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/v2.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/v2.go index de0cb974d460..8176ce5b2ebf 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/v2.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/v2.go @@ -1,8 +1,8 @@ +// +build linux + package systemd import ( - "bufio" - "errors" "fmt" "math" "os" @@ -13,39 +13,29 @@ import ( systemdDbus "github.com/coreos/go-systemd/v22/dbus" securejoin "github.com/cyphar/filepath-securejoin" - "github.com/sirupsen/logrus" - "github.com/opencontainers/runc/libcontainer/cgroups" "github.com/opencontainers/runc/libcontainer/cgroups/fs2" "github.com/opencontainers/runc/libcontainer/configs" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" ) type unifiedManager struct { mu sync.Mutex cgroups *configs.Cgroup // path is like "/sys/fs/cgroup/user.slice/user-1001.slice/session-1.scope" - path string - dbus *dbusConnManager - fsMgr cgroups.Manager + path string + rootless bool + dbus *dbusConnManager } -func NewUnifiedManager(config *configs.Cgroup, path string) (cgroups.Manager, error) { - m := &unifiedManager{ - cgroups: config, - path: path, - dbus: newDbusConnManager(config.Rootless), - } - if err := m.initPath(); err != nil { - return nil, err - } - - fsMgr, err := fs2.NewManager(config, m.path) - if err != nil { - return nil, err +func NewUnifiedManager(config *configs.Cgroup, path string, rootless bool) cgroups.Manager { + return &unifiedManager{ + cgroups: config, + path: path, + rootless: rootless, + dbus: newDbusConnManager(rootless), } - m.fsMgr = fsMgr - - return m, nil } // unifiedResToSystemdProps tries to convert from Cgroup.Resources.Unified @@ -244,8 +234,12 @@ func (m *unifiedManager) Apply(pid int) error { properties []systemdDbus.Property ) + if c.Paths != nil { + return cgroups.WriteCgroupProc(m.path, pid) + } + slice := "system.slice" - if m.cgroups.Rootless { + if m.rootless { slice = "user.slice" } if c.Parent != "" { @@ -254,14 +248,12 @@ func (m *unifiedManager) Apply(pid int) error { properties = append(properties, systemdDbus.PropDescription("libcontainer container "+c.Name)) + // if we create a slice, the parent is defined via a Wants= if strings.HasSuffix(unitName, ".slice") { - // If we create a slice, the parent is defined via a Wants=. properties = append(properties, systemdDbus.PropWants(slice)) } else { - // Otherwise it's a scope, which we put into a Slice=. + // otherwise, we use Slice= properties = append(properties, systemdDbus.PropSlice(slice)) - // Assume scopes always support delegation (supported since systemd v218). - properties = append(properties, newProp("Delegate", true)) } // only add pid if its valid, -1 is used w/ general slice creation. @@ -269,6 +261,12 @@ func (m *unifiedManager) Apply(pid int) error { properties = append(properties, newProp("PIDs", []uint32{uint32(pid)})) } + // Check if we can delegate. This is only supported on systemd versions 218 and above. + if !strings.HasSuffix(unitName, ".slice") { + // Assume scopes always support delegation. + properties = append(properties, newProp("Delegate", true)) + } + // Always enable accounting, this gets us the same behaviour as the fs implementation, // plus the kernel has some problems with joining the memory cgroup at a later time. properties = append(properties, @@ -285,62 +283,22 @@ func (m *unifiedManager) Apply(pid int) error { properties = append(properties, c.SystemdProps...) if err := startUnit(m.dbus, unitName, properties); err != nil { - return fmt.Errorf("unable to start unit %q (properties %+v): %w", unitName, properties, err) + return errors.Wrapf(err, "error while starting unit %q with properties %+v", unitName, properties) } - if err := fs2.CreateCgroupPath(m.path, m.cgroups); err != nil { + if err := m.initPath(); err != nil { return err } - - if c.OwnerUID != nil { - // The directory itself must be chowned. - err := os.Chown(m.path, *c.OwnerUID, -1) - if err != nil { - return err - } - - filesToChown, err := cgroupFilesToChown() - if err != nil { - return err - } - - for _, v := range filesToChown { - err := os.Chown(m.path+"/"+v, *c.OwnerUID, -1) - // Some files might not be present. - if err != nil && !errors.Is(err, os.ErrNotExist) { - return err - } - } + if err := fs2.CreateCgroupPath(m.path, m.cgroups); err != nil { + return err } - return nil } -// The kernel exposes a list of files that should be chowned to the delegate -// uid in /sys/kernel/cgroup/delegate. If the file is not present -// (Linux < 4.15), use the initial values mentioned in cgroups(7). -func cgroupFilesToChown() ([]string, error) { - const cgroupDelegateFile = "/sys/kernel/cgroup/delegate" - - f, err := os.Open(cgroupDelegateFile) - if err != nil { - return []string{"cgroup.procs", "cgroup.subtree_control", "cgroup.threads"}, nil - } - defer f.Close() - - filesToChown := []string{} - scanner := bufio.NewScanner(f) - for scanner.Scan() { - filesToChown = append(filesToChown, scanner.Text()) - } - if err := scanner.Err(); err != nil { - return nil, fmt.Errorf("error reading %s: %w", cgroupDelegateFile, err) - } - - return filesToChown, nil -} - func (m *unifiedManager) Destroy() error { + if m.cgroups.Paths != nil { + return nil + } m.mu.Lock() defer m.mu.Unlock() @@ -349,10 +307,9 @@ func (m *unifiedManager) Destroy() error { return err } - // systemd 239 do not remove sub-cgroups. - err := m.fsMgr.Destroy() - // fsMgr.Destroy has handled ErrNotExist - if err != nil { + // XXX this is probably not needed, systemd should handle it + err := os.Remove(m.path) + if err != nil && !os.IsNotExist(err) { return err } @@ -360,6 +317,7 @@ func (m *unifiedManager) Destroy() error { } func (m *unifiedManager) Path(_ string) string { + _ = m.initPath() return m.path } @@ -368,7 +326,7 @@ func (m *unifiedManager) Path(_ string) string { func (m *unifiedManager) getSliceFull() (string, error) { c := m.cgroups slice := "system.slice" - if c.Rootless { + if m.rootless { slice = "user.slice" } if c.Parent != "" { @@ -379,7 +337,7 @@ func (m *unifiedManager) getSliceFull() (string, error) { } } - if c.Rootless { + if m.rootless { // managerCG is typically "/user.slice/user-${uid}.slice/user@${uid}.service". managerCG, err := getManagerProperty(m.dbus, "ControlGroup") if err != nil { @@ -417,36 +375,58 @@ func (m *unifiedManager) initPath() error { return nil } +func (m *unifiedManager) fsManager() (cgroups.Manager, error) { + if err := m.initPath(); err != nil { + return nil, err + } + return fs2.NewManager(m.cgroups, m.path, m.rootless) +} + func (m *unifiedManager) Freeze(state configs.FreezerState) error { - return m.fsMgr.Freeze(state) + fsMgr, err := m.fsManager() + if err != nil { + return err + } + return fsMgr.Freeze(state) } func (m *unifiedManager) GetPids() ([]int, error) { + if err := m.initPath(); err != nil { + return nil, err + } return cgroups.GetPids(m.path) } func (m *unifiedManager) GetAllPids() ([]int, error) { + if err := m.initPath(); err != nil { + return nil, err + } return cgroups.GetAllPids(m.path) } func (m *unifiedManager) GetStats() (*cgroups.Stats, error) { - return m.fsMgr.GetStats() + fsMgr, err := m.fsManager() + if err != nil { + return nil, err + } + return fsMgr.GetStats() } func (m *unifiedManager) Set(r *configs.Resources) error { - if r == nil { - return nil - } properties, err := genV2ResourcesProperties(r, m.dbus) if err != nil { return err } if err := setUnitProperties(m.dbus, getUnitName(m.cgroups), properties...); err != nil { - return fmt.Errorf("unable to set unit properties: %w", err) + return errors.Wrap(err, "error while setting unit properties") } - return m.fsMgr.Set(r) + fsMgr, err := m.fsManager() + if err != nil { + return err + } + return fsMgr.Set(r) } func (m *unifiedManager) GetPaths() map[string]string { @@ -460,7 +440,11 @@ func (m *unifiedManager) GetCgroups() (*configs.Cgroup, error) { } func (m *unifiedManager) GetFreezerState() (configs.FreezerState, error) { - return m.fsMgr.GetFreezerState() + fsMgr, err := m.fsManager() + if err != nil { + return configs.Undefined, err + } + return fsMgr.GetFreezerState() } func (m *unifiedManager) Exists() bool { @@ -468,5 +452,9 @@ func (m *unifiedManager) Exists() bool { } func (m *unifiedManager) OOMKillCount() (uint64, error) { - return m.fsMgr.OOMKillCount() + fsMgr, err := m.fsManager() + if err != nil { + return 0, err + } + return fsMgr.OOMKillCount() } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/utils.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/utils.go index b32af4ee5302..92606525b4d7 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/utils.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/utils.go @@ -1,3 +1,5 @@ +// +build linux + package cgroups import ( @@ -5,6 +7,7 @@ import ( "errors" "fmt" "io" + "io/ioutil" "os" "path/filepath" "strconv" @@ -20,14 +23,11 @@ import ( const ( CgroupProcesses = "cgroup.procs" unifiedMountpoint = "/sys/fs/cgroup" - hybridMountpoint = "/sys/fs/cgroup/unified" ) var ( isUnifiedOnce sync.Once isUnified bool - isHybridOnce sync.Once - isHybrid bool ) // IsCgroup2UnifiedMode returns whether we are running in cgroup v2 unified mode. @@ -49,24 +49,6 @@ func IsCgroup2UnifiedMode() bool { return isUnified } -// IsCgroup2HybridMode returns whether we are running in cgroup v2 hybrid mode. -func IsCgroup2HybridMode() bool { - isHybridOnce.Do(func() { - var st unix.Statfs_t - err := unix.Statfs(hybridMountpoint, &st) - if err != nil { - isHybrid = false - if !os.IsNotExist(err) { - // Report unexpected errors. - logrus.WithError(err).Debugf("statfs(%q) failed", hybridMountpoint) - } - return - } - isHybrid = st.Type == unix.CGROUP2_SUPER_MAGIC - }) - return isHybrid -} - type Mount struct { Mountpoint string Root string @@ -136,8 +118,8 @@ func GetAllSubsystems() ([]string, error) { return subsystems, nil } -func readProcsFile(dir string) ([]int, error) { - f, err := OpenFile(dir, CgroupProcesses, os.O_RDONLY) +func readProcsFile(file string) ([]int, error) { + f, err := os.Open(file) if err != nil { return nil, err } @@ -228,7 +210,7 @@ func EnterPid(cgroupPaths map[string]string, pid int) error { func rmdir(path string) error { err := unix.Rmdir(path) - if err == nil || err == unix.ENOENT { //nolint:errorlint // unix errors are bare + if err == nil || err == unix.ENOENT { return nil } return &os.PathError{Op: "rmdir", Path: path, Err: err} @@ -242,7 +224,7 @@ func RemovePath(path string) error { return nil } - infos, err := os.ReadDir(path) + infos, err := ioutil.ReadDir(path) if err != nil { if os.IsNotExist(err) { err = nil @@ -302,61 +284,40 @@ func RemovePaths(paths map[string]string) (err error) { return fmt.Errorf("Failed to remove paths: %v", paths) } -var ( - hugePageSizes []string - initHPSOnce sync.Once -) - -func HugePageSizes() []string { - initHPSOnce.Do(func() { - dir, err := os.OpenFile("/sys/kernel/mm/hugepages", unix.O_DIRECTORY|unix.O_RDONLY, 0) - if err != nil { - return - } - files, err := dir.Readdirnames(0) - dir.Close() - if err != nil { - return - } - - hugePageSizes, err = getHugePageSizeFromFilenames(files) - if err != nil { - logrus.Warn("HugePageSizes: ", err) - } - }) +func GetHugePageSize() ([]string, error) { + dir, err := os.OpenFile("/sys/kernel/mm/hugepages", unix.O_DIRECTORY|unix.O_RDONLY, 0) + if err != nil { + return nil, err + } + files, err := dir.Readdirnames(0) + dir.Close() + if err != nil { + return nil, err + } - return hugePageSizes + return getHugePageSizeFromFilenames(files) } func getHugePageSizeFromFilenames(fileNames []string) ([]string, error) { pageSizes := make([]string, 0, len(fileNames)) - var warn error for _, file := range fileNames { // example: hugepages-1048576kB val := strings.TrimPrefix(file, "hugepages-") if len(val) == len(file) { - // Unexpected file name: no prefix found, ignore it. + // unexpected file name: no prefix found continue } - // The suffix is always "kB" (as of Linux 5.13). If we find - // something else, produce an error but keep going. + // The suffix is always "kB" (as of Linux 5.9) eLen := len(val) - 2 val = strings.TrimSuffix(val, "kB") if len(val) != eLen { - // Highly unlikely. - if warn == nil { - warn = errors.New(file + `: invalid suffix (expected "kB")`) - } + logrus.Warnf("GetHugePageSize: %s: invalid filename suffix (expected \"kB\")", file) continue } size, err := strconv.Atoi(val) if err != nil { - // Highly unlikely. - if warn == nil { - warn = fmt.Errorf("%s: %w", file, err) - } - continue + return nil, err } // Model after https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/mm/hugetlb_cgroup.c?id=eff48ddeab782e35e58ccc8853f7386bbae9dec4#n574 // but in our case the size is in KB already. @@ -370,12 +331,34 @@ func getHugePageSizeFromFilenames(fileNames []string) ([]string, error) { pageSizes = append(pageSizes, val) } - return pageSizes, warn + return pageSizes, nil } // GetPids returns all pids, that were added to cgroup at path. func GetPids(dir string) ([]int, error) { - return readProcsFile(dir) + return readProcsFile(filepath.Join(dir, CgroupProcesses)) +} + +// GetAllPids returns all pids, that were added to cgroup at path and to all its +// subcgroups. +func GetAllPids(path string) ([]int, error) { + var pids []int + // collect pids from all sub-cgroups + err := filepath.Walk(path, func(p string, info os.FileInfo, iErr error) error { + if iErr != nil { + return iErr + } + if info.IsDir() || info.Name() != CgroupProcesses { + return nil + } + cPids, err := readProcsFile(p) + if err != nil { + return err + } + pids = append(pids, cPids...) + return nil + }) + return pids, err } // WriteCgroupProc writes the specified pid into the cgroup's cgroup.procs file @@ -393,7 +376,7 @@ func WriteCgroupProc(dir string, pid int) error { file, err := OpenFile(dir, CgroupProcesses, os.O_WRONLY) if err != nil { - return fmt.Errorf("failed to write %v: %w", pid, err) + return fmt.Errorf("failed to write %v to %v: %v", pid, CgroupProcesses, err) } defer file.Close() @@ -410,7 +393,7 @@ func WriteCgroupProc(dir string, pid int) error { continue } - return fmt.Errorf("failed to write %v: %w", pid, err) + return fmt.Errorf("failed to write %v to %v: %v", pid, CgroupProcesses, err) } return err } @@ -463,5 +446,5 @@ func ConvertBlkIOToIOWeightValue(blkIoWeight uint16) uint64 { if blkIoWeight == 0 { return 0 } - return 1 + (uint64(blkIoWeight)-10)*9999/990 + return uint64(1 + (uint64(blkIoWeight)-10)*9999/990) } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/v1_utils.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/v1_utils.go index 47c75f22b422..95ec9dff0284 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/v1_utils.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/cgroups/v1_utils.go @@ -46,8 +46,11 @@ func NewNotFoundError(sub string) error { } func IsNotFound(err error) bool { - var nfErr *NotFoundError - return errors.As(err, &nfErr) + if err == nil { + return false + } + _, ok := err.(*NotFoundError) + return ok } func tryDefaultPath(cgroupPath, subsystem string) string { @@ -113,11 +116,6 @@ func FindCgroupMountpoint(cgroupPath, subsystem string) (string, error) { return "", errUnified } - // If subsystem is empty, we look for the cgroupv2 hybrid path. - if len(subsystem) == 0 { - return hybridMountpoint, nil - } - // Avoid parsing mountinfo by trying the default path first, if possible. if path := tryDefaultPath(cgroupPath, subsystem); path != "" { return path, nil @@ -156,7 +154,7 @@ func findCgroupMountpointAndRootFromMI(mounts []*mountinfo.Info, cgroupPath, sub func (m Mount) GetOwnCgroup(cgroups map[string]string) (string, error) { if len(m.Subsystems) == 0 { - return "", errors.New("no subsystem for mount") + return "", fmt.Errorf("no subsystem for mount") } return getControllerPath(m.Subsystems[0], cgroups) @@ -228,11 +226,6 @@ func GetOwnCgroupPath(subsystem string) (string, error) { return "", err } - // If subsystem is empty, we look for the cgroupv2 hybrid path. - if len(subsystem) == 0 { - return hybridMountpoint, nil - } - return getCgroupPathHelper(subsystem, cgroup) } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/cgroup_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/cgroup_linux.go index 2d4a8987109a..5ea9d940cef6 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/cgroup_linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/cgroup_linux.go @@ -28,26 +28,17 @@ type Cgroup struct { // ScopePrefix describes prefix for the scope name ScopePrefix string `json:"scope_prefix"` + // Paths represent the absolute cgroups paths to join. + // This takes precedence over Path. + Paths map[string]string + // Resources contains various cgroups settings to apply *Resources - // Systemd tells if systemd should be used to manage cgroups. - Systemd bool - // SystemdProps are any additional properties for systemd, // derived from org.systemd.property.xxx annotations. // Ignored unless systemd is used for managing cgroups. SystemdProps []systemdDbus.Property `json:"-"` - - // Rootless tells if rootless cgroups should be used. - Rootless bool - - // The host UID that should own the cgroup, or nil to accept - // the default ownership. This should only be set when the - // cgroupfs is to be mounted read/write. - // Not all cgroup manager implementations support changing - // the ownership. - OwnerUID *int `json:"owner_uid,omitempty"` } type Resources struct { @@ -126,9 +117,6 @@ type Resources struct { // Set class identifier for container's network packets NetClsClassid uint32 `json:"net_cls_classid_u"` - // Rdma resource restriction configuration - Rdma map[string]LinuxRdma `json:"rdma"` - // Used on cgroups v2: // CpuWeight sets a proportional bandwidth limit. diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/cgroup_unsupported.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/cgroup_unsupported.go index 7e383020f4cd..2a519f582d2a 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/cgroup_unsupported.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/cgroup_unsupported.go @@ -1,4 +1,3 @@ -//go:build !linux // +build !linux package configs diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/config.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/config.go index c1b4a0041c20..4281593f0b75 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/config.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/config.go @@ -7,10 +7,10 @@ import ( "os/exec" "time" - "github.com/sirupsen/logrus" - "github.com/opencontainers/runc/libcontainer/devices" "github.com/opencontainers/runtime-spec/specs-go" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" ) type Rlimit struct { @@ -31,12 +31,10 @@ type IDMap struct { // for syscalls. Additional architectures can be added by specifying them in // Architectures. type Seccomp struct { - DefaultAction Action `json:"default_action"` - Architectures []string `json:"architectures"` - Syscalls []*Syscall `json:"syscalls"` - DefaultErrnoRet *uint `json:"default_errno_ret"` - ListenerPath string `json:"listener_path,omitempty"` - ListenerMetadata string `json:"listener_metadata,omitempty"` + DefaultAction Action `json:"default_action"` + Architectures []string `json:"architectures"` + Syscalls []*Syscall `json:"syscalls"` + DefaultErrnoRet *uint `json:"default_errno_ret"` } // Action is taken upon rule match in Seccomp @@ -49,9 +47,6 @@ const ( Allow Trace Log - Notify - KillThread - KillProcess ) // Operator is a comparison operator to be used when matching syscall arguments in Seccomp @@ -251,19 +246,6 @@ const ( Poststop HookName = "poststop" ) -// KnownHookNames returns the known hook names. -// Used by `runc features`. -func KnownHookNames() []string { - return []string{ - string(Prestart), // deprecated - string(CreateRuntime), - string(CreateContainer), - string(StartContainer), - string(Poststart), - string(Poststop), - } -} - type Capabilities struct { // Bounding is the set of capabilities checked by the kernel. Bounding []string @@ -280,7 +262,7 @@ type Capabilities struct { func (hooks HookList) RunHooks(state *specs.State) error { for i, h := range hooks { if err := h.Run(state); err != nil { - return fmt.Errorf("error running hook #%d: %w", i, err) + return errors.Wrapf(err, "Running hook #%d:", i) } } @@ -393,7 +375,7 @@ func (c Command) Run(s *specs.State) error { go func() { err := cmd.Wait() if err != nil { - err = fmt.Errorf("error running hook: %w, stdout: %s, stderr: %s", err, stdout.String(), stderr.String()) + err = fmt.Errorf("error running hook: %v, stdout: %s, stderr: %s", err, stdout.String(), stderr.String()) } errC <- err }() diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/config_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/config_linux.go index 8c02848b70ab..07da10804540 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/config_linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/config_linux.go @@ -1,24 +1,17 @@ package configs -import "errors" - -var ( - errNoUIDMap = errors.New("User namespaces enabled, but no uid mappings found.") - errNoUserMap = errors.New("User namespaces enabled, but no user mapping found.") - errNoGIDMap = errors.New("User namespaces enabled, but no gid mappings found.") - errNoGroupMap = errors.New("User namespaces enabled, but no group mapping found.") -) +import "fmt" // HostUID gets the translated uid for the process on host which could be // different when user namespaces are enabled. func (c Config) HostUID(containerId int) (int, error) { if c.Namespaces.Contains(NEWUSER) { if c.UidMappings == nil { - return -1, errNoUIDMap + return -1, fmt.Errorf("User namespaces enabled, but no uid mappings found.") } id, found := c.hostIDFromMapping(containerId, c.UidMappings) if !found { - return -1, errNoUserMap + return -1, fmt.Errorf("User namespaces enabled, but no user mapping found.") } return id, nil } @@ -37,11 +30,11 @@ func (c Config) HostRootUID() (int, error) { func (c Config) HostGID(containerId int) (int, error) { if c.Namespaces.Contains(NEWUSER) { if c.GidMappings == nil { - return -1, errNoGIDMap + return -1, fmt.Errorf("User namespaces enabled, but no gid mappings found.") } id, found := c.hostIDFromMapping(containerId, c.GidMappings) if !found { - return -1, errNoGroupMap + return -1, fmt.Errorf("User namespaces enabled, but no group mapping found.") } return id, nil } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/configs_fuzzer.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/configs_fuzzer.go index bce829e290ad..93bf41c8defc 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/configs_fuzzer.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/configs_fuzzer.go @@ -1,4 +1,3 @@ -//go:build gofuzz // +build gofuzz package configs diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/intelrdt.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/intelrdt.go index f8d951ab8b9d..57e9f037d979 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/intelrdt.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/intelrdt.go @@ -1,9 +1,6 @@ package configs type IntelRdt struct { - // The identity for RDT Class of Service - ClosID string `json:"closID,omitempty"` - // The schema for L3 cache id and capacity bitmask (CBM) // Format: "L3:=;=;..." L3CacheSchema string `json:"l3_cache_schema,omitempty"` diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/mount.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/mount.go index 784c6182051e..a75ff10ec9dd 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/mount.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/mount.go @@ -1,7 +1,5 @@ package configs -import "golang.org/x/sys/unix" - const ( // EXT_COPYUP is a directive to copy up the contents of a directory when // a tmpfs is mounted over it. @@ -30,9 +28,6 @@ type Mount struct { // Relabel source if set, "z" indicates shared, "Z" indicates unshared. Relabel string `json:"relabel"` - // RecAttr represents mount properties to be applied recursively (AT_RECURSIVE), see mount_setattr(2). - RecAttr *unix.MountAttr `json:"rec_attr"` - // Extensions are additional flags that are specific to runc. Extensions int `json:"extensions"` @@ -42,7 +37,3 @@ type Mount struct { // Optional Command to be run after Source is mounted. PostmountCmds []Command `json:"postmount_cmds"` } - -func (m *Mount) IsBind() bool { - return m.Flags&unix.MS_BIND != 0 -} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/namespaces_syscall.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/namespaces_syscall.go index 0516dba8d09b..2dc7adfc9660 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/namespaces_syscall.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/namespaces_syscall.go @@ -1,4 +1,3 @@ -//go:build linux // +build linux package configs diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/namespaces_syscall_unsupported.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/namespaces_syscall_unsupported.go index fbb0d49071e2..5d9a5c81f3fd 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/namespaces_syscall_unsupported.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/namespaces_syscall_unsupported.go @@ -1,4 +1,3 @@ -//go:build !linux && !windows // +build !linux,!windows package configs diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/namespaces_unsupported.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/namespaces_unsupported.go index 946db30a549a..cc76e2f586ad 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/namespaces_unsupported.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/namespaces_unsupported.go @@ -1,4 +1,3 @@ -//go:build !linux // +build !linux package configs diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/rdma.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/rdma.go deleted file mode 100644 index c69f2c8024bc..000000000000 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/rdma.go +++ /dev/null @@ -1,9 +0,0 @@ -package configs - -// LinuxRdma for Linux cgroup 'rdma' resource management (Linux 4.11) -type LinuxRdma struct { - // Maximum number of HCA handles that can be opened. Default is "no limit". - HcaHandles *uint32 `json:"hca_handles,omitempty"` - // Maximum number of HCA objects that can be created. Default is "no limit". - HcaObjects *uint32 `json:"hca_objects,omitempty"` -} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/validate/validator.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/validate/validator.go index 627621a58d86..b0254600244b 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/validate/validator.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/configs/validate/validator.go @@ -52,7 +52,7 @@ func (v *ConfigValidator) Validate(config *configs.Config) error { } for _, c := range warns { if err := c(config); err != nil { - logrus.WithError(err).Warn("invalid configuration") + logrus.WithError(err).Warnf("invalid configuration") } } return nil @@ -62,17 +62,20 @@ func (v *ConfigValidator) Validate(config *configs.Config) error { // to the container's root filesystem. func (v *ConfigValidator) rootfs(config *configs.Config) error { if _, err := os.Stat(config.Rootfs); err != nil { - return fmt.Errorf("invalid rootfs: %w", err) + if os.IsNotExist(err) { + return fmt.Errorf("rootfs (%s) does not exist", config.Rootfs) + } + return err } cleaned, err := filepath.Abs(config.Rootfs) if err != nil { - return fmt.Errorf("invalid rootfs: %w", err) + return err } if cleaned, err = filepath.EvalSymlinks(cleaned); err != nil { - return fmt.Errorf("invalid rootfs: %w", err) + return err } if filepath.Clean(config.Rootfs) != cleaned { - return errors.New("invalid rootfs: not an absolute path, or a symlink") + return fmt.Errorf("%s is not an absolute path or is a symlink", config.Rootfs) } return nil } @@ -128,36 +131,6 @@ func (v *ConfigValidator) cgroupnamespace(config *configs.Config) error { return nil } -// convertSysctlVariableToDotsSeparator can return sysctl variables in dots separator format. -// The '/' separator is also accepted in place of a '.'. -// Convert the sysctl variables to dots separator format for validation. -// More info: -// https://man7.org/linux/man-pages/man8/sysctl.8.html -// https://man7.org/linux/man-pages/man5/sysctl.d.5.html -// For example: -// Input sysctl variable "net/ipv4/conf/eno2.100.rp_filter" -// will return the converted value "net.ipv4.conf.eno2/100.rp_filter" -func convertSysctlVariableToDotsSeparator(val string) string { - if val == "" { - return val - } - firstSepIndex := strings.IndexAny(val, "./") - if firstSepIndex == -1 || val[firstSepIndex] == '.' { - return val - } - - f := func(r rune) rune { - switch r { - case '.': - return '/' - case '/': - return '.' - } - return r - } - return strings.Map(f, val) -} - // sysctl validates that the specified sysctl keys are valid or not. // /proc/sys isn't completely namespaced and depending on which namespaces // are specified, a subset of sysctls are permitted. @@ -180,7 +153,6 @@ func (v *ConfigValidator) sysctl(config *configs.Config) error { ) for s := range config.Sysctl { - s := convertSysctlVariableToDotsSeparator(s) if validSysctlMap[s] || strings.HasPrefix(s, "fs.mqueue.") { if config.Namespaces.Contains(configs.NEWIPC) { continue @@ -204,7 +176,7 @@ func (v *ConfigValidator) sysctl(config *configs.Config) error { hostnet, hostnetErr = isHostNetNS(path) }) if hostnetErr != nil { - return fmt.Errorf("invalid netns path: %w", hostnetErr) + return hostnetErr } if hostnet { return fmt.Errorf("sysctl %q not allowed in host network namespace", s) @@ -229,8 +201,8 @@ func (v *ConfigValidator) sysctl(config *configs.Config) error { func (v *ConfigValidator) intelrdt(config *configs.Config) error { if config.IntelRdt != nil { - if config.IntelRdt.ClosID == "." || config.IntelRdt.ClosID == ".." || strings.Contains(config.IntelRdt.ClosID, "/") { - return fmt.Errorf("invalid intelRdt.ClosID %q", config.IntelRdt.ClosID) + if !intelrdt.IsCATEnabled() && !intelrdt.IsMBAEnabled() { + return errors.New("intelRdt is specified in config, but Intel RDT is not supported or enabled") } if !intelrdt.IsCATEnabled() && config.IntelRdt.L3CacheSchema != "" { @@ -239,6 +211,13 @@ func (v *ConfigValidator) intelrdt(config *configs.Config) error { if !intelrdt.IsMBAEnabled() && config.IntelRdt.MemBwSchema != "" { return errors.New("intelRdt.memBwSchema is specified in config, but Intel RDT/MBA is not enabled") } + + if intelrdt.IsCATEnabled() && config.IntelRdt.L3CacheSchema == "" { + return errors.New("Intel RDT/CAT is enabled and intelRdt is specified in config, but intelRdt.l3CacheSchema is empty") + } + if intelrdt.IsMBAEnabled() && config.IntelRdt.MemBwSchema == "" { + return errors.New("Intel RDT/MBA is enabled and intelRdt is specified in config, but intelRdt.memBwSchema is empty") + } } return nil @@ -289,10 +268,10 @@ func isHostNetNS(path string) (bool, error) { var st1, st2 unix.Stat_t if err := unix.Stat(currentProcessNetns, &st1); err != nil { - return false, &os.PathError{Op: "stat", Path: currentProcessNetns, Err: err} + return false, fmt.Errorf("unable to stat %q: %s", currentProcessNetns, err) } if err := unix.Stat(path, &st2); err != nil { - return false, &os.PathError{Op: "stat", Path: path, Err: err} + return false, fmt.Errorf("unable to stat %q: %s", path, err) } return (st1.Dev == st2.Dev) && (st1.Ino == st2.Ino), nil diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/console_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/console_linux.go index 29b9c3b0897a..7bfff026ac8e 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/console_linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/console_linux.go @@ -18,7 +18,7 @@ func mountConsole(slavePath string) error { if f != nil { f.Close() } - return mount(slavePath, "/dev/console", "", "bind", unix.MS_BIND, "") + return unix.Mount(slavePath, "/dev/console", "bind", unix.MS_BIND, "") } // dupStdio opens the slavePath for the console and dups the fds to the current diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/container.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/container.go index 300c9526cf97..ba7541c5fd68 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/container.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/container.go @@ -74,12 +74,22 @@ type BaseContainer interface { ID() string // Returns the current status of the container. + // + // errors: + // ContainerNotExists - Container no longer exists, + // Systemerror - System error. Status() (Status, error) // State returns the current container's state information. + // + // errors: + // SystemError - System error. State() (*State, error) // OCIState returns the current container's state information. + // + // errors: + // SystemError - System error. OCIState() (*specs.State, error) // Returns the current config of the container. @@ -87,26 +97,48 @@ type BaseContainer interface { // Returns the PIDs inside this container. The PIDs are in the namespace of the calling process. // + // errors: + // ContainerNotExists - Container no longer exists, + // Systemerror - System error. + // // Some of the returned PIDs may no longer refer to processes in the Container, unless // the Container state is PAUSED in which case every PID in the slice is valid. Processes() ([]int, error) // Returns statistics for the container. + // + // errors: + // ContainerNotExists - Container no longer exists, + // Systemerror - System error. Stats() (*Stats, error) // Set resources of container as configured // // We can use this to change resources when containers are running. // + // errors: + // SystemError - System error. Set(config configs.Config) error // Start a process inside the container. Returns error if process fails to // start. You can track process lifecycle with passed Process structure. + // + // errors: + // ContainerNotExists - Container no longer exists, + // ConfigInvalid - config is invalid, + // ContainerPaused - Container is paused, + // SystemError - System error. Start(process *Process) (err error) // Run immediately starts the process inside the container. Returns error if process // fails to start. It does not block waiting for the exec fifo after start returns but // opens the fifo after start returns. + // + // errors: + // ContainerNotExists - Container no longer exists, + // ConfigInvalid - config is invalid, + // ContainerPaused - Container is paused, + // SystemError - System error. Run(process *Process) (err error) // Destroys the container, if its in a valid state, after killing any @@ -117,14 +149,25 @@ type BaseContainer interface { // // Running containers must first be stopped using Signal(..). // Paused containers must first be resumed using Resume(..). + // + // errors: + // ContainerNotStopped - Container is still running, + // ContainerPaused - Container is paused, + // SystemError - System error. Destroy() error // Signal sends the provided signal code to the container's initial process. // // If all is specified the signal is sent to all processes in the container // including the initial process. + // + // errors: + // SystemError - System error. Signal(s os.Signal, all bool) error // Exec signals the container to exec the users process at the end of the init. + // + // errors: + // SystemError - System error. Exec() error } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/container_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/container_linux.go index 9df830d8cdbb..6ce1854f6878 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/container_linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/container_linux.go @@ -1,3 +1,5 @@ +// +build linux + package libcontainer import ( @@ -6,10 +8,10 @@ import ( "errors" "fmt" "io" + "io/ioutil" "net" "os" "os/exec" - "path" "path/filepath" "reflect" "strconv" @@ -17,20 +19,21 @@ import ( "sync" "time" - "github.com/checkpoint-restore/go-criu/v5" - criurpc "github.com/checkpoint-restore/go-criu/v5/rpc" securejoin "github.com/cyphar/filepath-securejoin" - "github.com/opencontainers/runtime-spec/specs-go" - "github.com/sirupsen/logrus" - "github.com/vishvananda/netlink/nl" - "golang.org/x/sys/unix" - "google.golang.org/protobuf/proto" - "github.com/opencontainers/runc/libcontainer/cgroups" "github.com/opencontainers/runc/libcontainer/configs" "github.com/opencontainers/runc/libcontainer/intelrdt" "github.com/opencontainers/runc/libcontainer/system" "github.com/opencontainers/runc/libcontainer/utils" + "github.com/opencontainers/runtime-spec/specs-go" + + "github.com/checkpoint-restore/go-criu/v5" + criurpc "github.com/checkpoint-restore/go-criu/v5/rpc" + errorsf "github.com/pkg/errors" + "github.com/sirupsen/logrus" + "github.com/vishvananda/netlink/nl" + "golang.org/x/sys/unix" + "google.golang.org/protobuf/proto" ) const stdioFdCount = 3 @@ -95,26 +98,48 @@ type Container interface { // Methods below here are platform specific // Checkpoint checkpoints the running container's state to disk using the criu(8) utility. + // + // errors: + // Systemerror - System error. Checkpoint(criuOpts *CriuOpts) error // Restore restores the checkpointed container to a running state using the criu(8) utility. + // + // errors: + // Systemerror - System error. Restore(process *Process, criuOpts *CriuOpts) error // If the Container state is RUNNING or CREATED, sets the Container state to PAUSING and pauses // the execution of any user processes. Asynchronously, when the container finished being paused the // state is changed to PAUSED. // If the Container state is PAUSED, do nothing. + // + // errors: + // ContainerNotExists - Container no longer exists, + // ContainerNotRunning - Container not running or created, + // Systemerror - System error. Pause() error // If the Container state is PAUSED, resumes the execution of any user processes in the // Container before setting the Container state to RUNNING. // If the Container state is RUNNING, do nothing. + // + // errors: + // ContainerNotExists - Container no longer exists, + // ContainerNotPaused - Container is not paused, + // Systemerror - System error. Resume() error // NotifyOOM returns a read-only channel signaling when the container receives an OOM notification. + // + // errors: + // Systemerror - System error. NotifyOOM() (<-chan struct{}, error) // NotifyMemoryPressure returns a read-only channel signaling when the container reaches a given pressure level + // + // errors: + // Systemerror - System error. NotifyMemoryPressure(level PressureLevel) (<-chan struct{}, error) } @@ -159,7 +184,7 @@ func (c *linuxContainer) Processes() ([]int, error) { pids, err = c.cgroupManager.GetAllPids() if err != nil { - return nil, fmt.Errorf("unable to get all container pids: %w", err) + return nil, newSystemErrorWithCause(err, "getting all container pids from cgroups") } return pids, nil } @@ -170,11 +195,11 @@ func (c *linuxContainer) Stats() (*Stats, error) { stats = &Stats{} ) if stats.CgroupStats, err = c.cgroupManager.GetStats(); err != nil { - return stats, fmt.Errorf("unable to get container cgroup stats: %w", err) + return stats, newSystemErrorWithCause(err, "getting container stats from cgroups") } if c.intelRdtManager != nil { if stats.IntelRdtStats, err = c.intelRdtManager.GetStats(); err != nil { - return stats, fmt.Errorf("unable to get container Intel RDT stats: %w", err) + return stats, newSystemErrorWithCause(err, "getting container's Intel RDT stats") } } for _, iface := range c.config.Networks { @@ -182,7 +207,7 @@ func (c *linuxContainer) Stats() (*Stats, error) { case "veth": istats, err := getNetworkInterfaceStats(iface.HostInterfaceName) if err != nil { - return stats, fmt.Errorf("unable to get network stats for interface %q: %w", iface.HostInterfaceName, err) + return stats, newSystemErrorWithCausef(err, "getting network stats for interface %q", iface.HostInterfaceName) } stats.Interfaces = append(stats.Interfaces, istats) } @@ -198,7 +223,7 @@ func (c *linuxContainer) Set(config configs.Config) error { return err } if status == Stopped { - return ErrNotRunning + return newGenericError(errors.New("container not running"), ContainerNotRunning) } if err := c.cgroupManager.Set(config.Cgroups.Resources); err != nil { // Set configs back @@ -229,7 +254,7 @@ func (c *linuxContainer) Start(process *Process) error { c.m.Lock() defer c.m.Unlock() if c.config.Cgroups.Resources.SkipDevices { - return errors.New("can't start container with SkipDevices set") + return newGenericError(errors.New("can't start container with SkipDevices set"), ConfigInvalid) } if process.Init { if err := c.createExecFifo(); err != nil { @@ -285,7 +310,7 @@ func (c *linuxContainer) exec() error { } func readFromExecFifo(execFifo io.Reader) error { - data, err := io.ReadAll(execFifo) + data, err := ioutil.ReadAll(execFifo) if err != nil { return err } @@ -311,7 +336,7 @@ func fifoOpen(path string, block bool) openResult { } f, err := os.OpenFile(path, flags, 0) if err != nil { - return openResult{err: fmt.Errorf("exec fifo: %w", err)} + return openResult{err: newSystemErrorWithCause(err, "open exec fifo for reading")} } return openResult{file: f} } @@ -336,7 +361,7 @@ type openResult struct { func (c *linuxContainer) start(process *Process) (retErr error) { parent, err := c.newParentProcess(process) if err != nil { - return fmt.Errorf("unable to create new parent process: %w", err) + return newSystemErrorWithCause(err, "creating new parent process") } logsDone := parent.forwardChildLogs() @@ -346,13 +371,13 @@ func (c *linuxContainer) start(process *Process) (retErr error) { // runc init closing the _LIBCONTAINER_LOGPIPE log fd. err := <-logsDone if err != nil && retErr == nil { - retErr = fmt.Errorf("unable to forward init logs: %w", err) + retErr = newSystemErrorWithCause(err, "forwarding init logs") } }() } if err := parent.start(); err != nil { - return fmt.Errorf("unable to start container process: %w", err) + return newSystemErrorWithCause(err, "starting container process") } if process.Init { @@ -365,7 +390,7 @@ func (c *linuxContainer) start(process *Process) (retErr error) { if err := c.config.Hooks[configs.Poststart].RunHooks(s); err != nil { if err := ignoreTerminateErrors(parent.terminate()); err != nil { - logrus.Warn(fmt.Errorf("error running poststart hook: %w", err)) + logrus.Warn(errorsf.Wrapf(err, "Running Poststart hook")) } return err } @@ -391,19 +416,11 @@ func (c *linuxContainer) Signal(s os.Signal, all bool) error { // to avoid a PID reuse attack if status == Running || status == Created || status == Paused { if err := c.initProcess.signal(s); err != nil { - return fmt.Errorf("unable to signal init: %w", err) - } - if status == Paused { - // For cgroup v1, killing a process in a frozen cgroup - // does nothing until it's thawed. Only thaw the cgroup - // for SIGKILL. - if s, ok := s.(unix.Signal); ok && s == unix.SIGKILL { - _ = c.cgroupManager.Freeze(configs.Thawed) - } + return newSystemErrorWithCause(err, "signaling init process") } return nil } - return ErrNotRunning + return newGenericError(errors.New("container not running"), ContainerNotRunning) } func (c *linuxContainer) createExecFifo() error { @@ -455,13 +472,13 @@ func (c *linuxContainer) includeExecFifo(cmd *exec.Cmd) error { func (c *linuxContainer) newParentProcess(p *Process) (parentProcess, error) { parentInitPipe, childInitPipe, err := utils.NewSockPair("init") if err != nil { - return nil, fmt.Errorf("unable to create init pipe: %w", err) + return nil, newSystemErrorWithCause(err, "creating new init pipe") } messageSockPair := filePair{parentInitPipe, childInitPipe} parentLogPipe, childLogPipe, err := os.Pipe() if err != nil { - return nil, fmt.Errorf("unable to create log pipe: %w", err) + return nil, fmt.Errorf("Unable to create the log pipe: %s", err) } logFilePair := filePair{parentLogPipe, childLogPipe} @@ -476,7 +493,7 @@ func (c *linuxContainer) newParentProcess(p *Process) (parentProcess, error) { // that problem), but we no longer do that. However, there's no need to do // this for `runc exec` so we just keep it this way to be safe. if err := c.includeExecFifo(cmd); err != nil { - return nil, fmt.Errorf("unable to setup exec fifo: %w", err) + return nil, newSystemErrorWithCause(err, "including execfifo in cmd.Exec setup") } return c.newInitProcess(p, cmd, messageSockPair, logFilePair) } @@ -520,33 +537,6 @@ func (c *linuxContainer) commandTemplate(p *Process, childInitPipe *os.File, chi return cmd } -// shouldSendMountSources says whether the child process must setup bind mounts with -// the source pre-opened (O_PATH) in the host user namespace. -// See https://github.com/opencontainers/runc/issues/2484 -func (c *linuxContainer) shouldSendMountSources() bool { - // Passing the mount sources via SCM_RIGHTS is only necessary when - // both userns and mntns are active. - if !c.config.Namespaces.Contains(configs.NEWUSER) || - !c.config.Namespaces.Contains(configs.NEWNS) { - return false - } - - // nsexec.c send_mountsources() requires setns(mntns) capabilities - // CAP_SYS_CHROOT and CAP_SYS_ADMIN. - if c.config.RootlessEUID { - return false - } - - // We need to send sources if there are bind-mounts. - for _, m := range c.config.Mounts { - if m.IsBind() { - return true - } - } - - return false -} - func (c *linuxContainer) newInitProcess(p *Process, cmd *exec.Cmd, messageSockPair, logFilePair filePair) (*initProcess, error) { cmd.Env = append(cmd.Env, "_LIBCONTAINER_INITTYPE="+string(initStandard)) nsMaps := make(map[configs.NamespaceType]string) @@ -556,40 +546,10 @@ func (c *linuxContainer) newInitProcess(p *Process, cmd *exec.Cmd, messageSockPa } } _, sharePidns := nsMaps[configs.NEWPID] - data, err := c.bootstrapData(c.config.Namespaces.CloneFlags(), nsMaps, initStandard) + data, err := c.bootstrapData(c.config.Namespaces.CloneFlags(), nsMaps) if err != nil { return nil, err } - - if c.shouldSendMountSources() { - // Elements on this slice will be paired with mounts (see StartInitialization() and - // prepareRootfs()). This slice MUST have the same size as c.config.Mounts. - mountFds := make([]int, len(c.config.Mounts)) - for i, m := range c.config.Mounts { - if !m.IsBind() { - // Non bind-mounts do not use an fd. - mountFds[i] = -1 - continue - } - - // The fd passed here will not be used: nsexec.c will overwrite it with dup3(). We just need - // to allocate a fd so that we know the number to pass in the environment variable. The fd - // must not be closed before cmd.Start(), so we reuse messageSockPair.child because the - // lifecycle of that fd is already taken care of. - cmd.ExtraFiles = append(cmd.ExtraFiles, messageSockPair.child) - mountFds[i] = stdioFdCount + len(cmd.ExtraFiles) - 1 - } - - mountFdsJson, err := json.Marshal(mountFds) - if err != nil { - return nil, fmt.Errorf("Error creating _LIBCONTAINER_MOUNT_FDS: %w", err) - } - - cmd.Env = append(cmd.Env, - "_LIBCONTAINER_MOUNT_FDS="+string(mountFdsJson), - ) - } - init := &initProcess{ cmd: cmd, messageSockPair: messageSockPair, @@ -610,15 +570,15 @@ func (c *linuxContainer) newSetnsProcess(p *Process, cmd *exec.Cmd, messageSockP cmd.Env = append(cmd.Env, "_LIBCONTAINER_INITTYPE="+string(initSetns)) state, err := c.currentState() if err != nil { - return nil, fmt.Errorf("unable to get container state: %w", err) + return nil, newSystemErrorWithCause(err, "getting container's current state") } // for setns process, we don't have to set cloneflags as the process namespaces // will only be set via setns syscall - data, err := c.bootstrapData(0, state.NamespacePaths, initSetns) + data, err := c.bootstrapData(0, state.NamespacePaths) if err != nil { return nil, err } - proc := &setnsProcess{ + return &setnsProcess{ cmd: cmd, cgroupPaths: state.CgroupPaths, rootlessCgroups: c.config.RootlessCgroups, @@ -630,37 +590,7 @@ func (c *linuxContainer) newSetnsProcess(p *Process, cmd *exec.Cmd, messageSockP process: p, bootstrapData: data, initProcessPid: state.InitProcessPid, - } - if len(p.SubCgroupPaths) > 0 { - if add, ok := p.SubCgroupPaths[""]; ok { - // cgroup v1: using the same path for all controllers. - // cgroup v2: the only possible way. - for k := range proc.cgroupPaths { - subPath := path.Join(proc.cgroupPaths[k], add) - if !strings.HasPrefix(subPath, proc.cgroupPaths[k]) { - return nil, fmt.Errorf("%s is not a sub cgroup path", add) - } - proc.cgroupPaths[k] = subPath - } - // cgroup v2: do not try to join init process's cgroup - // as a fallback (see (*setnsProcess).start). - proc.initProcessPid = 0 - } else { - // Per-controller paths. - for ctrl, add := range p.SubCgroupPaths { - if val, ok := proc.cgroupPaths[ctrl]; ok { - subPath := path.Join(val, add) - if !strings.HasPrefix(subPath, val) { - return nil, fmt.Errorf("%s is not a sub cgroup path", add) - } - proc.cgroupPaths[ctrl] = subPath - } else { - return nil, fmt.Errorf("unknown controller %s in SubCgroupPaths", ctrl) - } - } - } - } - return proc, nil + }, nil } func (c *linuxContainer) newInitConfig(process *Process) *initConfig { @@ -725,7 +655,7 @@ func (c *linuxContainer) Pause() error { c: c, }) } - return ErrNotRunning + return newGenericError(fmt.Errorf("container not running or created: %s", status), ContainerNotRunning) } func (c *linuxContainer) Resume() error { @@ -736,7 +666,7 @@ func (c *linuxContainer) Resume() error { return err } if status != Paused { - return ErrNotPaused + return newGenericError(fmt.Errorf("container not paused"), ContainerNotPaused) } if err := c.cgroupManager.Freeze(configs.Thawed); err != nil { return err @@ -841,7 +771,7 @@ func (c *linuxContainer) checkCriuVersion(minVersion int) error { var err error c.criuVersion, err = criu.GetCriuVersion() if err != nil { - return fmt.Errorf("CRIU version check failed: %w", err) + return fmt.Errorf("CRIU version check failed: %s", err) } return compareCriuVersion(c.criuVersion, minVersion) @@ -851,9 +781,6 @@ const descriptorsFilename = "descriptors.json" func (c *linuxContainer) addCriuDumpMount(req *criurpc.CriuReq, m *configs.Mount) { mountDest := strings.TrimPrefix(m.Destination, c.config.Rootfs) - if dest, err := securejoin.SecureJoin(c.config.Rootfs, mountDest); err == nil { - mountDest = dest[len(c.config.Rootfs):] - } extMnt := &criurpc.ExtMountMap{ Key: proto.String(mountDest), Val: proto.String(mountDest), @@ -1045,6 +972,20 @@ func (c *linuxContainer) Checkpoint(criuOpts *CriuOpts) error { return err } + if criuOpts.WorkDirectory == "" { + criuOpts.WorkDirectory = filepath.Join(c.root, "criu.work") + } + + if err := os.Mkdir(criuOpts.WorkDirectory, 0o700); err != nil && !os.IsExist(err) { + return err + } + + workDir, err := os.Open(criuOpts.WorkDirectory) + if err != nil { + return err + } + defer workDir.Close() + imageDir, err := os.Open(criuOpts.ImagesDirectory) if err != nil { return err @@ -1053,6 +994,7 @@ func (c *linuxContainer) Checkpoint(criuOpts *CriuOpts) error { rpcOpts := criurpc.CriuOpts{ ImagesDirFd: proto.Int32(int32(imageDir.Fd())), + WorkDirFd: proto.Int32(int32(workDir.Fd())), LogLevel: proto.Int32(4), LogFile: proto.String("dump.log"), Root: proto.String(c.config.Rootfs), @@ -1070,19 +1012,6 @@ func (c *linuxContainer) Checkpoint(criuOpts *CriuOpts) error { LazyPages: proto.Bool(criuOpts.LazyPages), } - // if criuOpts.WorkDirectory is not set, criu default is used. - if criuOpts.WorkDirectory != "" { - if err := os.Mkdir(criuOpts.WorkDirectory, 0o700); err != nil && !os.IsExist(err) { - return err - } - workDir, err := os.Open(criuOpts.WorkDirectory) - if err != nil { - return err - } - defer workDir.Close() - rpcOpts.WorkDirFd = proto.Int32(int32(workDir.Fd())) - } - c.handleCriuConfigurationFile(&rpcOpts) // If the container is running in a network namespace and has @@ -1125,7 +1054,7 @@ func (c *linuxContainer) Checkpoint(criuOpts *CriuOpts) error { // append optional manage cgroups mode if criuOpts.ManageCgroupsMode != 0 { - mode := criuOpts.ManageCgroupsMode + mode := criurpc.CriuCgMode(criuOpts.ManageCgroupsMode) rpcOpts.ManageCgroupsMode = &mode } @@ -1215,7 +1144,7 @@ func (c *linuxContainer) Checkpoint(criuOpts *CriuOpts) error { return err } - err = os.WriteFile(filepath.Join(criuOpts.ImagesDirectory, descriptorsFilename), fdsJSON, 0o600) + err = ioutil.WriteFile(filepath.Join(criuOpts.ImagesDirectory, descriptorsFilename), fdsJSON, 0o600) if err != nil { return err } @@ -1230,9 +1159,6 @@ func (c *linuxContainer) Checkpoint(criuOpts *CriuOpts) error { func (c *linuxContainer) addCriuRestoreMount(req *criurpc.CriuReq, m *configs.Mount) { mountDest := strings.TrimPrefix(m.Destination, c.config.Rootfs) - if dest, err := securejoin.SecureJoin(c.config.Rootfs, mountDest); err == nil { - mountDest = dest[len(c.config.Rootfs):] - } extMnt := &criurpc.ExtMountMap{ Key: proto.String(mountDest), Val: proto.String(m.Source), @@ -1277,9 +1203,7 @@ func (c *linuxContainer) makeCriuRestoreMountpoints(m *configs.Mount) error { case "bind": // The prepareBindMount() function checks if source // exists. So it cannot be used for other filesystem types. - // TODO: pass something else than nil? Not sure if criu is - // impacted by issue #2484 - if err := prepareBindMount(m, c.config.Rootfs, nil); err != nil { + if err := prepareBindMount(m, c.config.Rootfs); err != nil { return err } default: @@ -1332,7 +1256,7 @@ func (c *linuxContainer) prepareCriuRestoreMounts(mounts []*configs.Mount) error for _, u := range umounts { _ = utils.WithProcfd(c.config.Rootfs, u, func(procfd string) error { if e := unix.Unmount(procfd, unix.MNT_DETACH); e != nil { - if e != unix.EINVAL { //nolint:errorlint // unix errors are bare + if e != unix.EINVAL { // Ignore EINVAL as it means 'target is not a mount point.' // It probably has already been unmounted. logrus.Warnf("Error during cleanup unmounting of %s (%s): %v", procfd, u, e) @@ -1358,8 +1282,8 @@ func (c *linuxContainer) prepareCriuRestoreMounts(mounts []*configs.Mount) error // set up in the order they are configured. if m.Device == "bind" { if err := utils.WithProcfd(c.config.Rootfs, m.Destination, func(procfd string) error { - if err := mount(m.Source, m.Destination, procfd, "", unix.MS_BIND|unix.MS_REC, ""); err != nil { - return err + if err := unix.Mount(m.Source, procfd, "", unix.MS_BIND|unix.MS_REC, ""); err != nil { + return errorsf.Wrapf(err, "unable to bind mount %q to %q (through %q)", m.Source, m.Destination, procfd) } return nil }); err != nil { @@ -1387,6 +1311,19 @@ func (c *linuxContainer) Restore(process *Process, criuOpts *CriuOpts) error { if err := c.checkCriuVersion(30000); err != nil { return err } + if criuOpts.WorkDirectory == "" { + criuOpts.WorkDirectory = filepath.Join(c.root, "criu.work") + } + // Since a container can be C/R'ed multiple times, + // the work directory may already exist. + if err := os.Mkdir(criuOpts.WorkDirectory, 0o700); err != nil && !os.IsExist(err) { + return err + } + workDir, err := os.Open(criuOpts.WorkDirectory) + if err != nil { + return err + } + defer workDir.Close() if criuOpts.ImagesDirectory == "" { return errors.New("invalid directory to restore checkpoint") } @@ -1409,7 +1346,7 @@ func (c *linuxContainer) Restore(process *Process, criuOpts *CriuOpts) error { if err != nil { return err } - err = mount(c.config.Rootfs, root, "", "", unix.MS_BIND|unix.MS_REC, "") + err = unix.Mount(c.config.Rootfs, root, "", unix.MS_BIND|unix.MS_REC, "") if err != nil { return err } @@ -1419,6 +1356,7 @@ func (c *linuxContainer) Restore(process *Process, criuOpts *CriuOpts) error { Type: &t, Opts: &criurpc.CriuOpts{ ImagesDirFd: proto.Int32(int32(imageDir.Fd())), + WorkDirFd: proto.Int32(int32(workDir.Fd())), EvasiveDevices: proto.Bool(true), LogLevel: proto.Int32(4), LogFile: proto.String("restore.log"), @@ -1445,26 +1383,7 @@ func (c *linuxContainer) Restore(process *Process, criuOpts *CriuOpts) error { } req.Opts.LsmProfile = proto.String(criuOpts.LsmProfile) } - if criuOpts.LsmMountContext != "" { - if err := c.checkCriuVersion(31600); err != nil { - return errors.New("--lsm-mount-context requires at least CRIU 3.16") - } - req.Opts.LsmMountContext = proto.String(criuOpts.LsmMountContext) - } - if criuOpts.WorkDirectory != "" { - // Since a container can be C/R'ed multiple times, - // the work directory may already exist. - if err := os.Mkdir(criuOpts.WorkDirectory, 0o700); err != nil && !os.IsExist(err) { - return err - } - workDir, err := os.Open(criuOpts.WorkDirectory) - if err != nil { - return err - } - defer workDir.Close() - req.Opts.WorkDirFd = proto.Int32(int32(workDir.Fd())) - } c.handleCriuConfigurationFile(req.Opts) if err := c.handleRestoringNamespaces(req.Opts, &extraFiles); err != nil { @@ -1513,7 +1432,7 @@ func (c *linuxContainer) Restore(process *Process, criuOpts *CriuOpts) error { // append optional manage cgroups mode if criuOpts.ManageCgroupsMode != 0 { - mode := criuOpts.ManageCgroupsMode + mode := criurpc.CriuCgMode(criuOpts.ManageCgroupsMode) req.Opts.ManageCgroupsMode = &mode } @@ -1521,7 +1440,7 @@ func (c *linuxContainer) Restore(process *Process, criuOpts *CriuOpts) error { fds []string fdJSON []byte ) - if fdJSON, err = os.ReadFile(filepath.Join(criuOpts.ImagesDirectory, descriptorsFilename)); err != nil { + if fdJSON, err = ioutil.ReadFile(filepath.Join(criuOpts.ImagesDirectory, descriptorsFilename)); err != nil { return err } @@ -1558,7 +1477,7 @@ func (c *linuxContainer) criuApplyCgroups(pid int, req *criurpc.CriuReq) error { } if err := c.cgroupManager.Set(c.config.Cgroups.Resources); err != nil { - return err + return newSystemError(err) } if cgroups.IsCgroup2UnifiedMode() { @@ -1916,7 +1835,7 @@ func (c *linuxContainer) updateState(process parentProcess) (*State, error) { } func (c *linuxContainer) saveState(s *State) (retErr error) { - tmpFile, err := os.CreateTemp(c.root, "state-") + tmpFile, err := ioutil.TempFile(c.root, "state-") if err != nil { return err } @@ -2009,10 +1928,9 @@ func (c *linuxContainer) currentState() (*State, error) { startTime, _ = c.initProcess.startTime() externalDescriptors = c.initProcess.externalDescriptors() } - - intelRdtPath := "" - if c.intelRdtManager != nil { - intelRdtPath = c.intelRdtManager.GetPath() + intelRdtPath, err := intelrdt.GetIntelRdtPath(c.ID()) + if err != nil { + intelRdtPath = "" } state := &State{ BaseState: BaseState{ @@ -2080,16 +1998,16 @@ func (c *linuxContainer) orderNamespacePaths(namespaces map[configs.NamespaceTyp if p, ok := namespaces[ns]; ok && p != "" { // check if the requested namespace is supported if !configs.IsNamespaceSupported(ns) { - return nil, fmt.Errorf("namespace %s is not supported", ns) + return nil, newSystemError(fmt.Errorf("namespace %s is not supported", ns)) } // only set to join this namespace if it exists if _, err := os.Lstat(p); err != nil { - return nil, fmt.Errorf("namespace path: %w", err) + return nil, newSystemErrorWithCausef(err, "running lstat on namespace path %q", p) } // do not allow namespace path with comma as we use it to separate // the namespace paths if strings.ContainsRune(p, ',') { - return nil, fmt.Errorf("invalid namespace path %s", p) + return nil, newSystemError(fmt.Errorf("invalid path %s", p)) } paths = append(paths, fmt.Sprintf("%s:%s", configs.NsName(ns), p)) } @@ -2110,34 +2028,16 @@ func encodeIDMapping(idMap []configs.IDMap) ([]byte, error) { return data.Bytes(), nil } -// netlinkError is an error wrapper type for use by custom netlink message -// types. Panics with errors are wrapped in netlinkError so that the recover -// in bootstrapData can distinguish intentional panics. -type netlinkError struct{ error } - // bootstrapData encodes the necessary data in netlink binary format // as a io.Reader. // Consumer can write the data to a bootstrap program // such as one that uses nsenter package to bootstrap the container's // init process correctly, i.e. with correct namespaces, uid/gid // mapping etc. -func (c *linuxContainer) bootstrapData(cloneFlags uintptr, nsMaps map[configs.NamespaceType]string, it initType) (_ io.Reader, Err error) { +func (c *linuxContainer) bootstrapData(cloneFlags uintptr, nsMaps map[configs.NamespaceType]string) (io.Reader, error) { // create the netlink message r := nl.NewNetlinkRequest(int(InitMsg), 0) - // Our custom messages cannot bubble up an error using returns, instead - // they will panic with the specific error type, netlinkError. In that - // case, recover from the panic and return that as an error. - defer func() { - if r := recover(); r != nil { - if e, ok := r.(netlinkError); ok { - Err = e.error - } else { - panic(r) - } - } - }() - // write cloneFlags r.AddData(&Int32msg{ Type: CloneFlagsAttr, @@ -2216,25 +2116,6 @@ func (c *linuxContainer) bootstrapData(cloneFlags uintptr, nsMaps map[configs.Na Value: c.config.RootlessEUID, }) - // Bind mount source to open. - if it == initStandard && c.shouldSendMountSources() { - var mounts []byte - for _, m := range c.config.Mounts { - if m.IsBind() { - if strings.IndexByte(m.Source, 0) >= 0 { - return nil, fmt.Errorf("mount source string contains null byte: %q", m.Source) - } - mounts = append(mounts, []byte(m.Source)...) - } - mounts = append(mounts, byte(0)) - } - - r.AddData(&Bytemsg{ - Type: MountSourcesAttr, - Value: mounts, - }) - } - return bytes.NewReader(r.Serialize()), nil } @@ -2245,7 +2126,7 @@ func ignoreTerminateErrors(err error) error { if err == nil { return nil } - // terminate() might return an error from either Kill or Wait. + // terminate() might return an error from ether Kill or Wait. // The (*Cmd).Wait documentation says: "If the command fails to run // or doesn't complete successfully, the error is of type *ExitError". // Filter out such errors (like "exit status 1" or "signal: killed"). @@ -2253,11 +2134,13 @@ func ignoreTerminateErrors(err error) error { if errors.As(err, &exitErr) { return nil } - if errors.Is(err, os.ErrProcessDone) { - return nil - } + // TODO: use errors.Is(err, os.ErrProcessDone) here and + // remove "process already finished" string comparison below + // once go 1.16 is minimally supported version. + s := err.Error() - if strings.Contains(s, "Wait was already called") { + if strings.Contains(s, "process already finished") || + strings.Contains(s, "Wait was already called") { return nil } return err diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/criu_opts_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/criu_opts_linux.go index b39476ef352e..0db43e74e8aa 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/criu_opts_linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/criu_opts_linux.go @@ -30,5 +30,4 @@ type CriuOpts struct { LazyPages bool // restore memory pages lazily using userfaultfd StatusFd int // fd for feedback when lazy server is ready LsmProfile string // LSM profile used to restore the container - LsmMountContext string // LSM mount context value to use during restore } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/devices/device_unix.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/devices/device_unix.go index 7d8e9fc31044..6d5b3d09df3b 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/devices/device_unix.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/devices/device_unix.go @@ -1,10 +1,10 @@ -//go:build !windows // +build !windows package devices import ( "errors" + "io/ioutil" "os" "path/filepath" @@ -16,8 +16,8 @@ var ErrNotADevice = errors.New("not a device node") // Testing dependencies var ( - unixLstat = unix.Lstat - osReadDir = os.ReadDir + unixLstat = unix.Lstat + ioutilReadDir = ioutil.ReadDir ) func mkDev(d *Rule) (uint64, error) { @@ -40,7 +40,7 @@ func DeviceFromPath(path, permissions string) (*Device, error) { var ( devType Type mode = stat.Mode - devNumber = uint64(stat.Rdev) //nolint:unconvert // Rdev is uint32 on e.g. MIPS. + devNumber = uint64(stat.Rdev) major = unix.Major(devNumber) minor = unix.Minor(devNumber) ) @@ -76,7 +76,7 @@ func HostDevices() ([]*Device, error) { // GetDevices recursively traverses a directory specified by path // and returns all devices found there. func GetDevices(path string) ([]*Device, error) { - files, err := osReadDir(path) + files, err := ioutilReadDir(path) if err != nil { return nil, err } @@ -103,7 +103,7 @@ func GetDevices(path string) ([]*Device, error) { } device, err := DeviceFromPath(filepath.Join(path, f.Name()), "rwm") if err != nil { - if errors.Is(err, ErrNotADevice) { + if err == ErrNotADevice { continue } if os.IsNotExist(err) { diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/error.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/error.go index 510c072264f6..21a3789ba18d 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/error.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/error.go @@ -1,13 +1,70 @@ package libcontainer -import "errors" - -var ( - ErrExist = errors.New("container with given ID already exists") - ErrInvalidID = errors.New("invalid container ID format") - ErrNotExist = errors.New("container does not exist") - ErrPaused = errors.New("container paused") - ErrRunning = errors.New("container still running") - ErrNotRunning = errors.New("container not running") - ErrNotPaused = errors.New("container not paused") +import "io" + +// ErrorCode is the API error code type. +type ErrorCode int + +// API error codes. +const ( + // Factory errors + IdInUse ErrorCode = iota + InvalidIdFormat + + // Container errors + ContainerNotExists + ContainerPaused + ContainerNotStopped + ContainerNotRunning + ContainerNotPaused + + // Process errors + NoProcessOps + + // Common errors + ConfigInvalid + ConsoleExists + SystemError ) + +func (c ErrorCode) String() string { + switch c { + case IdInUse: + return "Id already in use" + case InvalidIdFormat: + return "Invalid format" + case ContainerPaused: + return "Container paused" + case ConfigInvalid: + return "Invalid configuration" + case SystemError: + return "System error" + case ContainerNotExists: + return "Container does not exist" + case ContainerNotStopped: + return "Container is not stopped" + case ContainerNotRunning: + return "Container is not running" + case ConsoleExists: + return "Console exists for process" + case ContainerNotPaused: + return "Container is not paused" + case NoProcessOps: + return "No process operations" + default: + return "Unknown error" + } +} + +// Error is the API error type. +type Error interface { + error + + // Returns an error if it failed to write the detail of the Error to w. + // The detail of the Error may include the error message and a + // representation of the stack trace. + Detail(w io.Writer) error + + // Returns the error code for this error. + Code() ErrorCode +} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/factory.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/factory.go index 9f9e8fc583cc..0986cd77e3fe 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/factory.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/factory.go @@ -14,15 +14,29 @@ type Factory interface { // // Returns the new container with a running process. // + // errors: + // IdInUse - id is already in use by a container + // InvalidIdFormat - id has incorrect format + // ConfigInvalid - config is invalid + // Systemerror - System error + // // On error, any partially created container parts are cleaned up (the operation is atomic). Create(id string, config *configs.Config) (Container, error) // Load takes an ID for an existing container and returns the container information // from the state. This presents a read only view of the container. + // + // errors: + // Path does not exist + // System error Load(id string) (Container, error) // StartInitialization is an internal API to libcontainer used during the reexec of the // container. + // + // Errors: + // Pipe connection error + // System error StartInitialization() error // Type returns info string about factory type (e.g. lxc, libcontainer...) diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/factory_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/factory_linux.go index 023d623f3709..dbd410b88f98 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/factory_linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/factory_linux.go @@ -1,8 +1,9 @@ +// +build linux + package libcontainer import ( "encoding/json" - "errors" "fmt" "os" "path/filepath" @@ -12,14 +13,17 @@ import ( securejoin "github.com/cyphar/filepath-securejoin" "github.com/moby/sys/mountinfo" - "golang.org/x/sys/unix" - - "github.com/opencontainers/runc/libcontainer/cgroups/manager" + "github.com/opencontainers/runc/libcontainer/cgroups" + "github.com/opencontainers/runc/libcontainer/cgroups/fs" + "github.com/opencontainers/runc/libcontainer/cgroups/fs2" + "github.com/opencontainers/runc/libcontainer/cgroups/systemd" "github.com/opencontainers/runc/libcontainer/configs" "github.com/opencontainers/runc/libcontainer/configs/validate" "github.com/opencontainers/runc/libcontainer/intelrdt" "github.com/opencontainers/runc/libcontainer/utils" - "github.com/sirupsen/logrus" + "github.com/pkg/errors" + + "golang.org/x/sys/unix" ) const ( @@ -37,9 +41,7 @@ func InitArgs(args ...string) func(*LinuxFactory) error { // Resolve relative paths to ensure that its available // after directory changes. if args[0], err = filepath.Abs(args[0]); err != nil { - // The only error returned from filepath.Abs is - // the one from os.Getwd, i.e. a system error. - return err + return newGenericError(err, ConfigInvalid) } } @@ -48,6 +50,100 @@ func InitArgs(args ...string) func(*LinuxFactory) error { } } +func getUnifiedPath(paths map[string]string) string { + path := "" + for k, v := range paths { + if path == "" { + path = v + } else if v != path { + panic(errors.Errorf("expected %q path to be unified path %q, got %q", k, path, v)) + } + } + // can be empty + if path != "" { + if filepath.Clean(path) != path || !filepath.IsAbs(path) { + panic(errors.Errorf("invalid dir path %q", path)) + } + } + + return path +} + +func systemdCgroupV2(l *LinuxFactory, rootless bool) error { + l.NewCgroupsManager = func(config *configs.Cgroup, paths map[string]string) cgroups.Manager { + return systemd.NewUnifiedManager(config, getUnifiedPath(paths), rootless) + } + return nil +} + +// SystemdCgroups is an options func to configure a LinuxFactory to return +// containers that use systemd to create and manage cgroups. +func SystemdCgroups(l *LinuxFactory) error { + if !systemd.IsRunningSystemd() { + return fmt.Errorf("systemd not running on this host, can't use systemd as cgroups manager") + } + + if cgroups.IsCgroup2UnifiedMode() { + return systemdCgroupV2(l, false) + } + + l.NewCgroupsManager = func(config *configs.Cgroup, paths map[string]string) cgroups.Manager { + return systemd.NewLegacyManager(config, paths) + } + + return nil +} + +// RootlessSystemdCgroups is rootless version of SystemdCgroups. +func RootlessSystemdCgroups(l *LinuxFactory) error { + if !systemd.IsRunningSystemd() { + return fmt.Errorf("systemd not running on this host, can't use systemd as cgroups manager") + } + + if !cgroups.IsCgroup2UnifiedMode() { + return fmt.Errorf("cgroup v2 not enabled on this host, can't use systemd (rootless) as cgroups manager") + } + return systemdCgroupV2(l, true) +} + +func cgroupfs2(l *LinuxFactory, rootless bool) error { + l.NewCgroupsManager = func(config *configs.Cgroup, paths map[string]string) cgroups.Manager { + m, err := fs2.NewManager(config, getUnifiedPath(paths), rootless) + if err != nil { + panic(err) + } + return m + } + return nil +} + +func cgroupfs(l *LinuxFactory, rootless bool) error { + if cgroups.IsCgroup2UnifiedMode() { + return cgroupfs2(l, rootless) + } + l.NewCgroupsManager = func(config *configs.Cgroup, paths map[string]string) cgroups.Manager { + return fs.NewManager(config, paths, rootless) + } + return nil +} + +// Cgroupfs is an options func to configure a LinuxFactory to return containers +// that use the native cgroups filesystem implementation to create and manage +// cgroups. +func Cgroupfs(l *LinuxFactory) error { + return cgroupfs(l, false) +} + +// RootlessCgroupfs is an options func to configure a LinuxFactory to return +// containers that use the native cgroups filesystem implementation to create +// and manage cgroups. The difference between RootlessCgroupfs and Cgroupfs is +// that RootlessCgroupfs can transparently handle permission errors that occur +// during rootless container (including euid=0 in userns) setup (while still allowing cgroup usage if +// they've been set up properly). +func RootlessCgroupfs(l *LinuxFactory) error { + return cgroupfs(l, true) +} + // IntelRdtfs is an options func to configure a LinuxFactory to return // containers that use the Intel RDT "resource control" filesystem to // create and manage Intel RDT resources (e.g., L3 cache, memory bandwidth). @@ -69,7 +165,7 @@ func TmpfsRoot(l *LinuxFactory) error { return err } if !mounted { - if err := mount("tmpfs", l.Root, "", "tmpfs", 0, ""); err != nil { + if err := unix.Mount("tmpfs", l.Root, "tmpfs", 0, ""); err != nil { return err } } @@ -90,7 +186,7 @@ func CriuPath(criupath string) func(*LinuxFactory) error { func New(root string, options ...func(*LinuxFactory) error) (Factory, error) { if root != "" { if err := os.MkdirAll(root, 0o700); err != nil { - return nil, err + return nil, newGenericError(err, SystemError) } } l := &LinuxFactory{ @@ -101,6 +197,10 @@ func New(root string, options ...func(*LinuxFactory) error) (Factory, error) { CriuPath: "criu", } + if err := Cgroupfs(l); err != nil { + return nil, err + } + for _, opt := range options { if opt == nil { continue @@ -137,69 +237,37 @@ type LinuxFactory struct { // Validator provides validation to container configurations. Validator validate.Validator + // NewCgroupsManager returns an initialized cgroups manager for a single container. + NewCgroupsManager func(config *configs.Cgroup, paths map[string]string) cgroups.Manager + // NewIntelRdtManager returns an initialized Intel RDT manager for a single container. NewIntelRdtManager func(config *configs.Config, id string, path string) intelrdt.Manager } func (l *LinuxFactory) Create(id string, config *configs.Config) (Container, error) { if l.Root == "" { - return nil, errors.New("root not set") + return nil, newGenericError(fmt.Errorf("invalid root"), ConfigInvalid) } if err := l.validateID(id); err != nil { return nil, err } if err := l.Validator.Validate(config); err != nil { - return nil, err + return nil, newGenericError(err, ConfigInvalid) } containerRoot, err := securejoin.SecureJoin(l.Root, id) if err != nil { return nil, err } if _, err := os.Stat(containerRoot); err == nil { - return nil, ErrExist + return nil, newGenericError(fmt.Errorf("container with id exists: %v", id), IdInUse) } else if !os.IsNotExist(err) { - return nil, err + return nil, newGenericError(err, SystemError) } - - cm, err := manager.New(config.Cgroups) - if err != nil { - return nil, err - } - - // Check that cgroup does not exist or empty (no processes). - // Note for cgroup v1 this check is not thorough, as there are multiple - // separate hierarchies, while both Exists() and GetAllPids() only use - // one for "devices" controller (assuming others are the same, which is - // probably true in almost all scenarios). Checking all the hierarchies - // would be too expensive. - if cm.Exists() { - pids, err := cm.GetAllPids() - // Reading PIDs can race with cgroups removal, so ignore ENOENT and ENODEV. - if err != nil && !errors.Is(err, os.ErrNotExist) && !errors.Is(err, unix.ENODEV) { - return nil, fmt.Errorf("unable to get cgroup PIDs: %w", err) - } - if len(pids) != 0 { - // TODO: return an error. - logrus.Warnf("container's cgroup is not empty: %d process(es) found", len(pids)) - logrus.Warn("DEPRECATED: running container in a non-empty cgroup won't be supported in runc 1.2; https://github.com/opencontainers/runc/issues/3132") - } - } - - // Check that cgroup is not frozen. Do not use Exists() here - // since in cgroup v1 it only checks "devices" controller. - st, err := cm.GetFreezerState() - if err != nil { - return nil, fmt.Errorf("unable to get cgroup freezer state: %w", err) - } - if st == configs.Frozen { - return nil, errors.New("container's cgroup unexpectedly frozen") - } - if err := os.MkdirAll(containerRoot, 0o711); err != nil { - return nil, err + return nil, newGenericError(err, SystemError) } if err := os.Chown(containerRoot, unix.Geteuid(), unix.Getegid()); err != nil { - return nil, err + return nil, newGenericError(err, SystemError) } c := &linuxContainer{ id: id, @@ -210,7 +278,7 @@ func (l *LinuxFactory) Create(id string, config *configs.Config) (Container, err criuPath: l.CriuPath, newuidmapPath: l.NewuidmapPath, newgidmapPath: l.NewgidmapPath, - cgroupManager: cm, + cgroupManager: l.NewCgroupsManager(config.Cgroups, nil), } if l.NewIntelRdtManager != nil { c.intelRdtManager = l.NewIntelRdtManager(config, id, "") @@ -221,7 +289,7 @@ func (l *LinuxFactory) Create(id string, config *configs.Config) (Container, err func (l *LinuxFactory) Load(id string) (Container, error) { if l.Root == "" { - return nil, errors.New("root not set") + return nil, newGenericError(fmt.Errorf("invalid root"), ConfigInvalid) } // when load, we need to check id is valid or not. if err := l.validateID(id); err != nil { @@ -231,7 +299,7 @@ func (l *LinuxFactory) Load(id string) (Container, error) { if err != nil { return nil, err } - state, err := l.loadState(containerRoot) + state, err := l.loadState(containerRoot, id) if err != nil { return nil, err } @@ -240,10 +308,6 @@ func (l *LinuxFactory) Load(id string) (Container, error) { processStartTime: state.InitProcessStartTime, fds: state.ExternalDescriptors, } - cm, err := manager.NewWithPaths(state.Config.Cgroups, state.CgroupPaths) - if err != nil { - return nil, err - } c := &linuxContainer{ initProcess: r, initProcessStartTime: state.InitProcessStartTime, @@ -254,7 +318,7 @@ func (l *LinuxFactory) Load(id string) (Container, error) { criuPath: l.CriuPath, newuidmapPath: l.NewuidmapPath, newgidmapPath: l.NewgidmapPath, - cgroupManager: cm, + cgroupManager: l.NewCgroupsManager(state.Config.Cgroups, state.CgroupPaths), root: containerRoot, created: state.Created, } @@ -279,26 +343,11 @@ func (l *LinuxFactory) StartInitialization() (err error) { envInitPipe := os.Getenv("_LIBCONTAINER_INITPIPE") pipefd, err := strconv.Atoi(envInitPipe) if err != nil { - err = fmt.Errorf("unable to convert _LIBCONTAINER_INITPIPE: %w", err) - logrus.Error(err) - return err + return fmt.Errorf("unable to convert _LIBCONTAINER_INITPIPE=%s to int: %s", envInitPipe, err) } pipe := os.NewFile(uintptr(pipefd), "pipe") defer pipe.Close() - defer func() { - // We have an error during the initialization of the container's init, - // send it back to the parent process in the form of an initError. - if werr := writeSync(pipe, procError); werr != nil { - fmt.Fprintln(os.Stderr, err) - return - } - if werr := utils.WriteJSON(pipe, &initError{Message: err.Error()}); werr != nil { - fmt.Fprintln(os.Stderr, err) - return - } - }() - // Only init processes have FIFOFD. fifofd := -1 envInitType := os.Getenv("_LIBCONTAINER_INITTYPE") @@ -306,7 +355,7 @@ func (l *LinuxFactory) StartInitialization() (err error) { if it == initStandard { envFifoFd := os.Getenv("_LIBCONTAINER_FIFOFD") if fifofd, err = strconv.Atoi(envFifoFd); err != nil { - return fmt.Errorf("unable to convert _LIBCONTAINER_FIFOFD: %w", err) + return fmt.Errorf("unable to convert _LIBCONTAINER_FIFOFD=%s to int: %s", envFifoFd, err) } } @@ -314,7 +363,7 @@ func (l *LinuxFactory) StartInitialization() (err error) { if envConsole := os.Getenv("_LIBCONTAINER_CONSOLE"); envConsole != "" { console, err := strconv.Atoi(envConsole) if err != nil { - return fmt.Errorf("unable to convert _LIBCONTAINER_CONSOLE: %w", err) + return fmt.Errorf("unable to convert _LIBCONTAINER_CONSOLE=%s to int: %s", envConsole, err) } consoleSocket = os.NewFile(uintptr(console), "console-socket") defer consoleSocket.Close() @@ -323,26 +372,32 @@ func (l *LinuxFactory) StartInitialization() (err error) { logPipeFdStr := os.Getenv("_LIBCONTAINER_LOGPIPE") logPipeFd, err := strconv.Atoi(logPipeFdStr) if err != nil { - return fmt.Errorf("unable to convert _LIBCONTAINER_LOGPIPE: %w", err) - } - - // Get mount files (O_PATH). - mountFds, err := parseMountFds() - if err != nil { - return err + return fmt.Errorf("unable to convert _LIBCONTAINER_LOGPIPE=%s to int: %s", logPipeFdStr, err) } // clear the current process's environment to clean any libcontainer // specific env vars. os.Clearenv() + defer func() { + // We have an error during the initialization of the container's init, + // send it back to the parent process in the form of an initError. + if werr := utils.WriteJSON(pipe, syncT{procError}); werr != nil { + fmt.Fprintln(os.Stderr, err) + return + } + if werr := utils.WriteJSON(pipe, newSystemError(err)); werr != nil { + fmt.Fprintln(os.Stderr, err) + return + } + }() defer func() { if e := recover(); e != nil { - err = fmt.Errorf("panic from initialization: %w, %v", e, string(debug.Stack())) + err = fmt.Errorf("panic from initialization: %v, %v", e, string(debug.Stack())) } }() - i, err := newContainerInit(it, pipe, consoleSocket, fifofd, logPipeFd, mountFds) + i, err := newContainerInit(it, pipe, consoleSocket, fifofd, logPipeFd) if err != nil { return err } @@ -351,7 +406,7 @@ func (l *LinuxFactory) StartInitialization() (err error) { return i.Init() } -func (l *LinuxFactory) loadState(root string) (*State, error) { +func (l *LinuxFactory) loadState(root, id string) (*State, error) { stateFilePath, err := securejoin.SecureJoin(root, stateFilename) if err != nil { return nil, err @@ -359,21 +414,21 @@ func (l *LinuxFactory) loadState(root string) (*State, error) { f, err := os.Open(stateFilePath) if err != nil { if os.IsNotExist(err) { - return nil, ErrNotExist + return nil, newGenericError(fmt.Errorf("container %q does not exist", id), ContainerNotExists) } - return nil, err + return nil, newGenericError(err, SystemError) } defer f.Close() var state *State if err := json.NewDecoder(f).Decode(&state); err != nil { - return nil, err + return nil, newGenericError(err, SystemError) } return state, nil } func (l *LinuxFactory) validateID(id string) error { if !idRegex.MatchString(id) || string(os.PathSeparator)+id != utils.CleanPath(string(os.PathSeparator)+id) { - return ErrInvalidID + return newGenericError(fmt.Errorf("invalid id format: %v", id), InvalidIdFormat) } return nil @@ -396,18 +451,3 @@ func NewgidmapPath(newgidmapPath string) func(*LinuxFactory) error { return nil } } - -func parseMountFds() ([]int, error) { - fdsJson := os.Getenv("_LIBCONTAINER_MOUNT_FDS") - if fdsJson == "" { - // Always return the nil slice if no fd is present. - return nil, nil - } - - var mountFds []int - if err := json.Unmarshal([]byte(fdsJson), &mountFds); err != nil { - return nil, fmt.Errorf("Error unmarshalling _LIBCONTAINER_MOUNT_FDS: %w", err) - } - - return mountFds, nil -} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/generic_error.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/generic_error.go new file mode 100644 index 000000000000..d185ebd89898 --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/generic_error.go @@ -0,0 +1,92 @@ +package libcontainer + +import ( + "fmt" + "io" + "text/template" + "time" + + "github.com/opencontainers/runc/libcontainer/stacktrace" +) + +var errorTemplate = template.Must(template.New("error").Parse(`Timestamp: {{.Timestamp}} +Code: {{.ECode}} +{{if .Message }} +Message: {{.Message}} +{{end}} +Frames:{{range $i, $frame := .Stack.Frames}} +--- +{{$i}}: {{$frame.Function}} +Package: {{$frame.Package}} +File: {{$frame.File}}@{{$frame.Line}}{{end}} +`)) + +func newGenericError(err error, c ErrorCode) Error { + if le, ok := err.(Error); ok { + return le + } + gerr := &genericError{ + Timestamp: time.Now(), + Err: err, + ECode: c, + Stack: stacktrace.Capture(1), + } + if err != nil { + gerr.Message = err.Error() + } + return gerr +} + +func newSystemError(err error) Error { + return createSystemError(err, "") +} + +func newSystemErrorWithCausef(err error, cause string, v ...interface{}) Error { + return createSystemError(err, fmt.Sprintf(cause, v...)) +} + +func newSystemErrorWithCause(err error, cause string) Error { + return createSystemError(err, cause) +} + +// createSystemError creates the specified error with the correct number of +// stack frames skipped. This is only to be called by the other functions for +// formatting the error. +func createSystemError(err error, cause string) Error { + gerr := &genericError{ + Timestamp: time.Now(), + Err: err, + ECode: SystemError, + Cause: cause, + Stack: stacktrace.Capture(2), + } + if err != nil { + gerr.Message = err.Error() + } + return gerr +} + +type genericError struct { + Timestamp time.Time + ECode ErrorCode + Err error `json:"-"` + Cause string + Message string + Stack stacktrace.Stacktrace +} + +func (e *genericError) Error() string { + if e.Cause == "" { + return e.Message + } + frame := e.Stack.Frames[0] + return fmt.Sprintf("%s:%d: %s caused: %s", frame.File, frame.Line, e.Cause, e.Message) +} + +func (e *genericError) Code() ErrorCode { + return e.ECode +} + +func (e *genericError) Detail(w io.Writer) error { + return errorTemplate.Execute(w, e) +} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/init_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/init_linux.go index 1e5c394c3e06..c456cbe7a150 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/init_linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/init_linux.go @@ -1,28 +1,30 @@ +// +build linux + package libcontainer import ( "bytes" "encoding/json" - "errors" "fmt" "io" + "io/ioutil" "net" "os" "strings" "unsafe" "github.com/containerd/console" - "github.com/opencontainers/runtime-spec/specs-go" - "github.com/sirupsen/logrus" - "github.com/vishvananda/netlink" - "golang.org/x/sys/unix" - "github.com/opencontainers/runc/libcontainer/capabilities" "github.com/opencontainers/runc/libcontainer/cgroups" "github.com/opencontainers/runc/libcontainer/configs" "github.com/opencontainers/runc/libcontainer/system" "github.com/opencontainers/runc/libcontainer/user" "github.com/opencontainers/runc/libcontainer/utils" + "github.com/opencontainers/runtime-spec/specs-go" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" + "github.com/vishvananda/netlink" + "golang.org/x/sys/unix" ) type initType string @@ -75,7 +77,7 @@ type initer interface { Init() error } -func newContainerInit(t initType, pipe *os.File, consoleSocket *os.File, fifoFd, logFd int, mountFds []int) (initer, error) { +func newContainerInit(t initType, pipe *os.File, consoleSocket *os.File, fifoFd, logFd int) (initer, error) { var config *initConfig if err := json.NewDecoder(pipe).Decode(&config); err != nil { return nil, err @@ -85,11 +87,6 @@ func newContainerInit(t initType, pipe *os.File, consoleSocket *os.File, fifoFd, } switch t { case initSetns: - // mountFds must be nil in this case. We don't mount while doing runc exec. - if mountFds != nil { - return nil, errors.New("mountFds must be nil. Can't mount while doing runc exec.") - } - return &linuxSetnsInit{ pipe: pipe, consoleSocket: consoleSocket, @@ -104,7 +101,6 @@ func newContainerInit(t initType, pipe *os.File, consoleSocket *os.File, fifoFd, config: config, fifoFd: fifoFd, logFd: logFd, - mountFds: mountFds, }, nil } return nil, fmt.Errorf("unknown init type %q", t) @@ -143,7 +139,7 @@ func finalizeNamespace(config *initConfig) error { // inherited are marked close-on-exec so they stay out of the // container if err := utils.CloseExecFrom(config.PassedFilesCount + 3); err != nil { - return fmt.Errorf("error closing exec fds: %w", err) + return errors.Wrap(err, "close exec fds") } // we only do chdir if it's specified @@ -162,7 +158,7 @@ func finalizeNamespace(config *initConfig) error { // to the directory, but the user running runc does not. // This is useful in cases where the cwd is also a volume that's been chowned to the container user. default: - return fmt.Errorf("chdir to cwd (%q) set in config.json failed: %w", config.Cwd, err) + return fmt.Errorf("chdir to cwd (%q) set in config.json failed: %v", config.Cwd, err) } } @@ -178,26 +174,26 @@ func finalizeNamespace(config *initConfig) error { } // drop capabilities in bounding set before changing user if err := w.ApplyBoundingSet(); err != nil { - return fmt.Errorf("unable to apply bounding set: %w", err) + return errors.Wrap(err, "apply bounding set") } // preserve existing capabilities while we change users if err := system.SetKeepCaps(); err != nil { - return fmt.Errorf("unable to set keep caps: %w", err) + return errors.Wrap(err, "set keep caps") } if err := setupUser(config); err != nil { - return fmt.Errorf("unable to setup user: %w", err) + return errors.Wrap(err, "setup user") } // Change working directory AFTER the user has been set up, if we haven't done it yet. if doChdir { if err := unix.Chdir(config.Cwd); err != nil { - return fmt.Errorf("chdir to cwd (%q) set in config.json failed: %w", config.Cwd, err) + return fmt.Errorf("chdir to cwd (%q) set in config.json failed: %v", config.Cwd, err) } } if err := system.ClearKeepCaps(); err != nil { - return fmt.Errorf("unable to clear keep caps: %w", err) + return errors.Wrap(err, "clear keep caps") } if err := w.ApplyCaps(); err != nil { - return fmt.Errorf("unable to apply caps: %w", err) + return errors.Wrap(err, "apply caps") } return nil } @@ -276,36 +272,6 @@ func syncParentHooks(pipe io.ReadWriter) error { return readSync(pipe, procResume) } -// syncParentSeccomp sends to the given pipe a JSON payload which -// indicates that the parent should pick up the seccomp fd with pidfd_getfd() -// and send it to the seccomp agent over a unix socket. It then waits for -// the parent to indicate that it is cleared to resume and closes the seccompFd. -// If the seccompFd is -1, there isn't anything to sync with the parent, so it -// returns no error. -func syncParentSeccomp(pipe io.ReadWriter, seccompFd int) error { - if seccompFd == -1 { - return nil - } - - // Tell parent. - if err := writeSyncWithFd(pipe, procSeccomp, seccompFd); err != nil { - unix.Close(seccompFd) - return err - } - - // Wait for parent to give the all-clear. - if err := readSync(pipe, procSeccompDone); err != nil { - unix.Close(seccompFd) - return fmt.Errorf("sync parent seccomp: %w", err) - } - - if err := unix.Close(seccompFd); err != nil { - return fmt.Errorf("close seccomp fd: %w", err) - } - - return nil -} - // setupUser changes the groups, gid, and uid for the user inside the container func setupUser(config *initConfig) error { // Set up defaults. @@ -359,11 +325,11 @@ func setupUser(config *initConfig) error { // Before we change to the container's user make sure that the processes // STDIO is correctly owned by the user that we are switching to. - if err := fixStdioPermissions(execUser); err != nil { + if err := fixStdioPermissions(config, execUser); err != nil { return err } - setgroups, err := os.ReadFile("/proc/self/setgroups") + setgroups, err := ioutil.ReadFile("/proc/self/setgroups") if err != nil && !os.IsNotExist(err) { return err } @@ -377,7 +343,7 @@ func setupUser(config *initConfig) error { if allowSupGroups { suppGroups := append(execUser.Sgids, addGroups...) if err := unix.Setgroups(suppGroups); err != nil { - return &os.SyscallError{Syscall: "setgroups", Err: err} + return err } } @@ -400,38 +366,40 @@ func setupUser(config *initConfig) error { // fixStdioPermissions fixes the permissions of PID 1's STDIO within the container to the specified user. // The ownership needs to match because it is created outside of the container and needs to be // localized. -func fixStdioPermissions(u *user.ExecUser) error { +func fixStdioPermissions(config *initConfig, u *user.ExecUser) error { var null unix.Stat_t if err := unix.Stat("/dev/null", &null); err != nil { - return &os.PathError{Op: "stat", Path: "/dev/null", Err: err} + return err } - for _, file := range []*os.File{os.Stdin, os.Stdout, os.Stderr} { + for _, fd := range []uintptr{ + os.Stdin.Fd(), + os.Stderr.Fd(), + os.Stdout.Fd(), + } { var s unix.Stat_t - if err := unix.Fstat(int(file.Fd()), &s); err != nil { - return &os.PathError{Op: "fstat", Path: file.Name(), Err: err} + if err := unix.Fstat(int(fd), &s); err != nil { + return err } - // Skip chown if uid is already the one we want. - if int(s.Uid) == u.Uid { + // Skip chown of /dev/null if it was used as one of the STDIO fds. + if s.Rdev == null.Rdev { continue } - // We only change the uid (as it is possible for the mount to + // We only change the uid owner (as it is possible for the mount to // prefer a different gid, and there's no reason for us to change it). // The reason why we don't just leave the default uid=X mount setup is // that users expect to be able to actually use their console. Without // this code, you couldn't effectively run as a non-root user inside a // container and also have a console set up. - if err := file.Chown(u.Uid, int(s.Gid)); err != nil { + if err := unix.Fchown(int(fd), u.Uid, int(s.Gid)); err != nil { // If we've hit an EINVAL then s.Gid isn't mapped in the user // namespace. If we've hit an EPERM then the inode's current owner // is not mapped in our user namespace (in particular, - // privileged_wrt_inode_uidgid() has failed). Read-only - // /dev can result in EROFS error. In any case, it's - // better for us to just not touch the stdio rather - // than bail at this point. - - if errors.Is(err, unix.EINVAL) || errors.Is(err, unix.EPERM) || errors.Is(err, unix.EROFS) { + // privileged_wrt_inode_uidgid() has failed). In either case, we + // are in a configuration where it's better for us to just not + // touch the stdio rather than bail at this point. + if err == unix.EINVAL || err == unix.EPERM { continue } return err @@ -488,8 +456,8 @@ func setupRoute(config *configs.Config) error { func setupRlimits(limits []configs.Rlimit, pid int) error { for _, rlimit := range limits { - if err := unix.Prlimit(pid, rlimit.Type, &unix.Rlimit{Max: rlimit.Hard, Cur: rlimit.Soft}, nil); err != nil { - return fmt.Errorf("error setting rlimit type %v: %w", rlimit.Type, err) + if err := system.Prlimit(pid, rlimit.Type, unix.Rlimit{Max: rlimit.Hard, Cur: rlimit.Soft}); err != nil { + return fmt.Errorf("error setting rlimit type %v: %v", rlimit.Type, err) } } return nil @@ -514,12 +482,27 @@ func isWaitable(pid int) (bool, error) { si := &siginfo{} _, _, e := unix.Syscall6(unix.SYS_WAITID, _P_PID, uintptr(pid), uintptr(unsafe.Pointer(si)), unix.WEXITED|unix.WNOWAIT|unix.WNOHANG, 0, 0) if e != 0 { - return false, &os.SyscallError{Syscall: "waitid", Err: e} + return false, os.NewSyscallError("waitid", e) } return si.si_pid != 0, nil } +// isNoChildren returns true if err represents a unix.ECHILD (formerly syscall.ECHILD) false otherwise +func isNoChildren(err error) bool { + switch err := err.(type) { + case unix.Errno: + if err == unix.ECHILD { + return true + } + case *os.SyscallError: + if err.Err == unix.ECHILD { + return true + } + } + return false +} + // signalAllProcesses freezes then iterates over all the processes inside the // manager's cgroups sending the signal s to them. // If s is SIGKILL then it will wait for each process to exit. @@ -565,7 +548,7 @@ func signalAllProcesses(m cgroups.Manager, s os.Signal) error { for _, p := range procs { if s != unix.SIGKILL { if ok, err := isWaitable(p.Pid); err != nil { - if !errors.Is(err, unix.ECHILD) { + if !isNoChildren(err) { logrus.Warn("signalAllProcesses: ", p.Pid, err) } continue @@ -582,7 +565,7 @@ func signalAllProcesses(m cgroups.Manager, s os.Signal) error { // to retrieve its exit code. if subreaper == 0 { if _, err := p.Wait(); err != nil { - if !errors.Is(err, unix.ECHILD) { + if !isNoChildren(err) { logrus.Warn("wait: ", err) } } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/intelrdt.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/intelrdt.go index 8b6bf3ef09dc..3fa11b8002d3 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/intelrdt.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/intelrdt.go @@ -1,11 +1,13 @@ +// +build linux + package intelrdt import ( "bufio" "bytes" - "errors" "fmt" "io" + "io/ioutil" "os" "path/filepath" "strconv" @@ -13,7 +15,6 @@ import ( "sync" "github.com/moby/sys/mountinfo" - "github.com/opencontainers/runc/libcontainer/cgroups/fscommon" "github.com/opencontainers/runc/libcontainer/configs" ) @@ -69,7 +70,7 @@ import ( * |-- ... * |-- schemata * |-- tasks - * |-- + * |-- * |-- ... * |-- schemata * |-- tasks @@ -152,7 +153,7 @@ type Manager interface { // Returns statistics for Intel RDT GetStats() (*Stats, error) - // Destroys the Intel RDT container-specific 'container_id' group + // Destroys the Intel RDT 'container_id' group Destroy() error // Returns Intel RDT path to save in a state file and to be able to @@ -180,10 +181,14 @@ func NewManager(config *configs.Config, id string, path string) Manager { } const ( - intelRdtTasks = "tasks" + IntelRdtTasks = "tasks" ) var ( + // The absolute root path of the Intel RDT "resource control" filesystem + intelRdtRoot string + intelRdtRootLock sync.Mutex + // The flag to indicate if Intel RDT/CAT is enabled catEnabled bool // The flag to indicate if Intel RDT/MBA is enabled @@ -193,10 +198,14 @@ var ( // For Intel RDT initialization initOnce sync.Once - - errNotFound = errors.New("Intel RDT resctrl mount point not found") ) +type intelRdtData struct { + root string + config *configs.Config + pid int +} + // Check if Intel RDT sub-features are enabled in featuresInit() func featuresInit() { initOnce.Do(func() { @@ -206,10 +215,9 @@ func featuresInit() { return } - // 2. Check if Intel RDT "resource control" filesystem is available. - // The user guarantees to mount the filesystem. - root, err := Root() - if err != nil { + // 2. Check if Intel RDT "resource control" filesystem is mounted + // The user guarantees to mount the filesystem + if !isIntelRdtMounted() { return } @@ -218,7 +226,7 @@ func featuresInit() { // selectively disabled or enabled by kernel command line // (e.g., rdt=!l3cat,mba) in 4.14 and newer kernel if flagsSet.CAT { - if _, err := os.Stat(filepath.Join(root, "info", "L3")); err == nil { + if _, err := os.Stat(filepath.Join(intelRdtRoot, "info", "L3")); err == nil { catEnabled = true } } @@ -228,15 +236,15 @@ func featuresInit() { // depends on MBA mbaEnabled = true } else if flagsSet.MBA { - if _, err := os.Stat(filepath.Join(root, "info", "MB")); err == nil { + if _, err := os.Stat(filepath.Join(intelRdtRoot, "info", "MB")); err == nil { mbaEnabled = true } } if flagsSet.MBMTotal || flagsSet.MBMLocal || flagsSet.CMT { - if _, err := os.Stat(filepath.Join(root, "info", "L3_MON")); err != nil { + if _, err := os.Stat(filepath.Join(intelRdtRoot, "info", "L3_MON")); err != nil { return } - enabledMonFeatures, err = getMonFeatures(root) + enabledMonFeatures, err = getMonFeatures(intelRdtRoot) if err != nil { return } @@ -263,7 +271,7 @@ func findIntelRdtMountpointDir(f io.Reader) (string, error) { return "", err } if len(mi) < 1 { - return "", errNotFound + return "", NewNotFoundError("Intel RDT") } // Check if MBA Software Controller is enabled through mount option "-o mba_MBps" @@ -274,16 +282,10 @@ func findIntelRdtMountpointDir(f io.Reader) (string, error) { return mi[0].Mountpoint, nil } -// For Root() use only. -var ( - intelRdtRoot string - rootMu sync.Mutex -) - -// Root returns the Intel RDT "resource control" filesystem mount point. -func Root() (string, error) { - rootMu.Lock() - defer rootMu.Unlock() +// Gets the root path of Intel RDT "resource control" filesystem +func getIntelRdtRoot() (string, error) { + intelRdtRootLock.Lock() + defer intelRdtRootLock.Unlock() if intelRdtRoot != "" { return intelRdtRoot, nil @@ -307,6 +309,11 @@ func Root() (string, error) { return intelRdtRoot, nil } +func isIntelRdtMounted() bool { + _, err := getIntelRdtRoot() + return err == nil +} + type cpuInfoFlags struct { CAT bool // Cache Allocation Technology MBA bool // Memory Bandwidth Allocation @@ -359,15 +366,33 @@ func parseCpuInfoFile(path string) (cpuInfoFlags, error) { return infoFlags, nil } +func parseUint(s string, base, bitSize int) (uint64, error) { + value, err := strconv.ParseUint(s, base, bitSize) + if err != nil { + intValue, intErr := strconv.ParseInt(s, base, bitSize) + // 1. Handle negative values greater than MinInt64 (and) + // 2. Handle negative values lesser than MinInt64 + if intErr == nil && intValue < 0 { + return 0, nil + } else if intErr != nil && intErr.(*strconv.NumError).Err == strconv.ErrRange && intValue < 0 { + return 0, nil + } + + return value, err + } + + return value, nil +} + // Gets a single uint64 value from the specified file. func getIntelRdtParamUint(path, file string) (uint64, error) { fileName := filepath.Join(path, file) - contents, err := os.ReadFile(fileName) + contents, err := ioutil.ReadFile(fileName) if err != nil { return 0, err } - res, err := fscommon.ParseUint(string(bytes.TrimSpace(contents)), 10, 64) + res, err := parseUint(string(bytes.TrimSpace(contents)), 10, 64) if err != nil { return res, fmt.Errorf("unable to parse %q as a uint from file %q", string(contents), fileName) } @@ -376,7 +401,7 @@ func getIntelRdtParamUint(path, file string) (uint64, error) { // Gets a string value from the specified file func getIntelRdtParamString(path, file string) (string, error) { - contents, err := os.ReadFile(filepath.Join(path, file)) + contents, err := ioutil.ReadFile(filepath.Join(path, file)) if err != nil { return "", err } @@ -388,17 +413,29 @@ func writeFile(dir, file, data string) error { if dir == "" { return fmt.Errorf("no such directory for %s", file) } - if err := os.WriteFile(filepath.Join(dir, file), []byte(data+"\n"), 0o600); err != nil { - return newLastCmdError(fmt.Errorf("intelrdt: unable to write %v: %w", data, err)) + if err := ioutil.WriteFile(filepath.Join(dir, file), []byte(data+"\n"), 0o600); err != nil { + return fmt.Errorf("failed to write %v to %v: %v", data, file, err) } return nil } +func getIntelRdtData(c *configs.Config, pid int) (*intelRdtData, error) { + rootPath, err := getIntelRdtRoot() + if err != nil { + return nil, err + } + return &intelRdtData{ + root: rootPath, + config: c, + pid: pid, + }, nil +} + // Get the read-only L3 cache information func getL3CacheInfo() (*L3CacheInfo, error) { l3CacheInfo := &L3CacheInfo{} - rootPath, err := Root() + rootPath, err := getIntelRdtRoot() if err != nil { return l3CacheInfo, err } @@ -428,7 +465,7 @@ func getL3CacheInfo() (*L3CacheInfo, error) { func getMemBwInfo() (*MemBwInfo, error) { memBwInfo := &MemBwInfo{} - rootPath, err := Root() + rootPath, err := getIntelRdtRoot() if err != nil { return memBwInfo, err } @@ -461,7 +498,7 @@ func getMemBwInfo() (*MemBwInfo, error) { // Get diagnostics for last filesystem operation error from file info/last_cmd_status func getLastCmdStatus() (string, error) { - rootPath, err := Root() + rootPath, err := getIntelRdtRoot() if err != nil { return "", err } @@ -478,13 +515,13 @@ func getLastCmdStatus() (string, error) { // WriteIntelRdtTasks writes the specified pid into the "tasks" file func WriteIntelRdtTasks(dir string, pid int) error { if dir == "" { - return fmt.Errorf("no such directory for %s", intelRdtTasks) + return fmt.Errorf("no such directory for %s", IntelRdtTasks) } // Don't attach any pid if -1 is specified as a pid if pid != -1 { - if err := os.WriteFile(filepath.Join(dir, intelRdtTasks), []byte(strconv.Itoa(pid)), 0o600); err != nil { - return newLastCmdError(fmt.Errorf("intelrdt: unable to add pid %d: %w", pid, err)) + if err := ioutil.WriteFile(filepath.Join(dir, IntelRdtTasks), []byte(strconv.Itoa(pid)), 0o600); err != nil { + return fmt.Errorf("failed to write %v to %v: %v", pid, IntelRdtTasks, err) } } return nil @@ -508,19 +545,15 @@ func IsMBAScEnabled() bool { return mbaScEnabled } -// Get the path of the clos group in "resource control" filesystem that the container belongs to -func (m *intelRdtManager) getIntelRdtPath() (string, error) { - rootPath, err := Root() +// Get the 'container_id' path in Intel RDT "resource control" filesystem +func GetIntelRdtPath(id string) (string, error) { + rootPath, err := getIntelRdtRoot() if err != nil { return "", err } - clos := m.id - if m.config.IntelRdt != nil && m.config.IntelRdt.ClosID != "" { - clos = m.config.IntelRdt.ClosID - } - - return filepath.Join(rootPath, clos), nil + path := filepath.Join(rootPath, id) + return path, nil } // Applies Intel RDT configuration to the process with the specified pid @@ -529,48 +562,30 @@ func (m *intelRdtManager) Apply(pid int) (err error) { if m.config.IntelRdt == nil { return nil } - - path, err := m.getIntelRdtPath() - if err != nil { + d, err := getIntelRdtData(m.config, pid) + if err != nil && !IsNotFound(err) { return err } m.mu.Lock() defer m.mu.Unlock() - - if m.config.IntelRdt.ClosID != "" && m.config.IntelRdt.L3CacheSchema == "" && m.config.IntelRdt.MemBwSchema == "" { - // Check that the CLOS exists, i.e. it has been pre-configured to - // conform with the runtime spec - if _, err := os.Stat(path); err != nil { - return fmt.Errorf("clos dir not accessible (must be pre-created when l3CacheSchema and memBwSchema are empty): %w", err) - } - } - - if err := os.MkdirAll(path, 0o755); err != nil { - return newLastCmdError(err) - } - - if err := WriteIntelRdtTasks(path, pid); err != nil { - return newLastCmdError(err) + path, err := d.join(m.id) + if err != nil { + return err } m.path = path return nil } -// Destroys the Intel RDT container-specific 'container_id' group +// Destroys the Intel RDT 'container_id' group func (m *intelRdtManager) Destroy() error { - // Don't remove resctrl group if closid has been explicitly specified. The - // group is likely externally managed, i.e. by some other entity than us. - // There are probably other containers/tasks sharing the same group. - if m.config.IntelRdt == nil || m.config.IntelRdt.ClosID == "" { - m.mu.Lock() - defer m.mu.Unlock() - if err := os.RemoveAll(m.GetPath()); err != nil { - return err - } - m.path = "" + m.mu.Lock() + defer m.mu.Unlock() + if err := os.RemoveAll(m.GetPath()); err != nil { + return err } + m.path = "" return nil } @@ -578,7 +593,7 @@ func (m *intelRdtManager) Destroy() error { // restore the object later func (m *intelRdtManager) GetPath() string { if m.path == "" { - m.path, _ = m.getIntelRdtPath() + m.path, _ = GetIntelRdtPath(m.id) } return m.path } @@ -592,9 +607,9 @@ func (m *intelRdtManager) GetStats() (*Stats, error) { m.mu.Lock() defer m.mu.Unlock() - stats := newStats() + stats := NewStats() - rootPath, err := Root() + rootPath, err := getIntelRdtRoot() if err != nil { return nil, err } @@ -605,7 +620,7 @@ func (m *intelRdtManager) GetStats() (*Stats, error) { } schemaRootStrings := strings.Split(tmpRootStrings, "\n") - // The L3 cache and memory bandwidth schemata in container's clos group + // The L3 cache and memory bandwidth schemata in 'container_id' group containerPath := m.GetPath() tmpStrings, err := getIntelRdtParamString(containerPath, "schemata") if err != nil { @@ -628,7 +643,7 @@ func (m *intelRdtManager) GetStats() (*Stats, error) { } } - // The L3 cache schema in container's clos group + // The L3 cache schema in 'container_id' group for _, schema := range schemaStrings { if strings.Contains(schema, "L3") { stats.L3CacheSchema = strings.TrimSpace(schema) @@ -651,7 +666,7 @@ func (m *intelRdtManager) GetStats() (*Stats, error) { } } - // The memory bandwidth schema in container's clos group + // The memory bandwidth schema in 'container_id' group for _, schema := range schemaStrings { if strings.Contains(schema, "MB") { stats.MemBwSchema = strings.TrimSpace(schema) @@ -721,30 +736,24 @@ func (m *intelRdtManager) Set(container *configs.Config) error { l3CacheSchema := container.IntelRdt.L3CacheSchema memBwSchema := container.IntelRdt.MemBwSchema - // TODO: verify that l3CacheSchema and/or memBwSchema match the - // existing schemata if ClosID has been specified. This is a more - // involved than reading the file and doing plain string comparison as - // the value written in does not necessarily match what gets read out - // (leading zeros, cache id ordering etc). - // Write a single joint schema string to schemata file if l3CacheSchema != "" && memBwSchema != "" { if err := writeFile(path, "schemata", l3CacheSchema+"\n"+memBwSchema); err != nil { - return err + return NewLastCmdError(err) } } // Write only L3 cache schema string to schemata file if l3CacheSchema != "" && memBwSchema == "" { if err := writeFile(path, "schemata", l3CacheSchema); err != nil { - return err + return NewLastCmdError(err) } } // Write only memory bandwidth schema string to schemata file if l3CacheSchema == "" && memBwSchema != "" { if err := writeFile(path, "schemata", memBwSchema); err != nil { - return err + return NewLastCmdError(err) } } } @@ -752,10 +761,56 @@ func (m *intelRdtManager) Set(container *configs.Config) error { return nil } -func newLastCmdError(err error) error { - status, err1 := getLastCmdStatus() +func (raw *intelRdtData) join(id string) (string, error) { + path := filepath.Join(raw.root, id) + if err := os.MkdirAll(path, 0o755); err != nil { + return "", NewLastCmdError(err) + } + + if err := WriteIntelRdtTasks(path, raw.pid); err != nil { + return "", NewLastCmdError(err) + } + return path, nil +} + +type NotFoundError struct { + ResourceControl string +} + +func (e *NotFoundError) Error() string { + return fmt.Sprintf("mountpoint for %s not found", e.ResourceControl) +} + +func NewNotFoundError(res string) error { + return &NotFoundError{ + ResourceControl: res, + } +} + +func IsNotFound(err error) bool { + if err == nil { + return false + } + _, ok := err.(*NotFoundError) + return ok +} + +type LastCmdError struct { + LastCmdStatus string + Err error +} + +func (e *LastCmdError) Error() string { + return e.Err.Error() + ", last_cmd_status: " + e.LastCmdStatus +} + +func NewLastCmdError(err error) error { + lastCmdStatus, err1 := getLastCmdStatus() if err1 == nil { - return fmt.Errorf("%w, last_cmd_status: %s", err, status) + return &LastCmdError{ + LastCmdStatus: lastCmdStatus, + Err: err, + } } return err } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/mbm.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/mbm.go index 13f31ac7a089..0fbecdeb2281 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/mbm.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/mbm.go @@ -1,3 +1,5 @@ +// +build linux + package intelrdt // The flag to indicate if Intel RDT/MBM is enabled diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/monitoring.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/monitoring.go index 82e0002efad0..547c15470f25 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/monitoring.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/monitoring.go @@ -3,6 +3,7 @@ package intelrdt import ( "bufio" "io" + "io/ioutil" "os" "path/filepath" @@ -48,7 +49,7 @@ func parseMonFeatures(reader io.Reader) (monFeatures, error) { } func getMonitoringStats(containerPath string, stats *Stats) error { - numaFiles, err := os.ReadDir(filepath.Join(containerPath, "mon_data")) + numaFiles, err := ioutil.ReadDir(filepath.Join(containerPath, "mon_data")) if err != nil { return err } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/stats.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/stats.go index a5eb2541e816..70df0d14e6ce 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/stats.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/intelrdt/stats.go @@ -1,3 +1,5 @@ +// +build linux + package intelrdt type L3CacheInfo struct { @@ -52,6 +54,6 @@ type Stats struct { CMTStats *[]CMTNumaNodeStats `json:"cmt_stats,omitempty"` } -func newStats() *Stats { +func NewStats() *Stats { return &Stats{} } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/keys/keyctl.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/keys/keyctl.go index f3a6c5343fa4..4a60c34b8421 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/keys/keyctl.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/keys/keyctl.go @@ -1,11 +1,13 @@ +// +build linux + package keys import ( - "errors" - "fmt" "strconv" "strings" + "github.com/pkg/errors" + "golang.org/x/sys/unix" ) @@ -14,7 +16,7 @@ type KeySerial uint32 func JoinSessionKeyring(name string) (KeySerial, error) { sessKeyID, err := unix.KeyctlJoinSessionKeyring(name) if err != nil { - return 0, fmt.Errorf("unable to create session key: %w", err) + return 0, errors.Wrap(err, "create session key") } return KeySerial(sessKeyID), nil } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/logs/logs.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/logs/logs.go index 95deb0d6ca7a..6610a1aaeeac 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/logs/logs.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/logs/logs.go @@ -3,28 +3,37 @@ package logs import ( "bufio" "encoding/json" + "fmt" "io" + "os" + "sync" + "github.com/pkg/errors" "github.com/sirupsen/logrus" ) +var ( + configureMutex sync.Mutex + // loggingConfigured will be set once logging has been configured via invoking `ConfigureLogging`. + // Subsequent invocations of `ConfigureLogging` would be no-op + loggingConfigured = false +) + +type Config struct { + LogLevel logrus.Level + LogFormat string + LogFilePath string + LogPipeFd int + LogCaller bool +} + func ForwardLogs(logPipe io.ReadCloser) chan error { done := make(chan error, 1) s := bufio.NewScanner(logPipe) - logger := logrus.StandardLogger() - if logger.ReportCaller { - // Need a copy of the standard logger, but with ReportCaller - // turned off, as the logs are merely forwarded and their - // true source is not this file/line/function. - logNoCaller := *logrus.StandardLogger() - logNoCaller.ReportCaller = false - logger = &logNoCaller - } - go func() { for s.Scan() { - processEntry(s.Bytes(), logger) + processEntry(s.Bytes()) } if err := logPipe.Close(); err != nil { logrus.Errorf("error closing log source: %v", err) @@ -38,19 +47,60 @@ func ForwardLogs(logPipe io.ReadCloser) chan error { return done } -func processEntry(text []byte, logger *logrus.Logger) { +func processEntry(text []byte) { if len(text) == 0 { return } var jl struct { - Level logrus.Level `json:"level"` - Msg string `json:"msg"` + Level string `json:"level"` + Msg string `json:"msg"` } if err := json.Unmarshal(text, &jl); err != nil { logrus.Errorf("failed to decode %q to json: %v", text, err) return } - logger.Log(jl.Level, jl.Msg) + lvl, err := logrus.ParseLevel(jl.Level) + if err != nil { + logrus.Errorf("failed to parse log level %q: %v", jl.Level, err) + return + } + logrus.StandardLogger().Logf(lvl, jl.Msg) +} + +func ConfigureLogging(config Config) error { + configureMutex.Lock() + defer configureMutex.Unlock() + + if loggingConfigured { + return errors.New("logging has already been configured") + } + + logrus.SetLevel(config.LogLevel) + logrus.SetReportCaller(config.LogCaller) + + // XXX: while 0 is a valid fd (usually stdin), here we assume + // that we never deliberately set LogPipeFd to 0. + if config.LogPipeFd > 0 { + logrus.SetOutput(os.NewFile(uintptr(config.LogPipeFd), "logpipe")) + } else if config.LogFilePath != "" { + f, err := os.OpenFile(config.LogFilePath, os.O_CREATE|os.O_WRONLY|os.O_APPEND|os.O_SYNC, 0o644) + if err != nil { + return err + } + logrus.SetOutput(f) + } + + switch config.LogFormat { + case "text": + // retain logrus's default. + case "json": + logrus.SetFormatter(new(logrus.JSONFormatter)) + default: + return fmt.Errorf("unknown log-format %q", config.LogFormat) + } + + loggingConfigured = true + return nil } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/message_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/message_linux.go index 6d1107e875d4..1d4f5033aa2f 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/message_linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/message_linux.go @@ -1,9 +1,8 @@ +// +build linux + package libcontainer import ( - "fmt" - "math" - "github.com/vishvananda/netlink/nl" "golang.org/x/sys/unix" ) @@ -21,7 +20,6 @@ const ( RootlessEUIDAttr uint16 = 27287 UidmapPathAttr uint16 = 27288 GidmapPathAttr uint16 = 27289 - MountSourcesAttr uint16 = 27290 ) type Int32msg struct { @@ -56,12 +54,6 @@ type Bytemsg struct { func (msg *Bytemsg) Serialize() []byte { l := msg.Len() - if l > math.MaxUint16 { - // We cannot return nil nor an error here, so we panic with - // a specific type instead, which is handled via recover in - // bootstrapData. - panic(netlinkError{fmt.Errorf("netlink: cannot serialize bytemsg of length %d (larger than UINT16_MAX)", l)}) - } buf := make([]byte, (l+unix.NLA_ALIGNTO-1) & ^(unix.NLA_ALIGNTO-1)) native := nl.NativeEndian() native.PutUint16(buf[0:2], uint16(l)) diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/mount_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/mount_linux.go deleted file mode 100644 index 5f49de964ff5..000000000000 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/mount_linux.go +++ /dev/null @@ -1,83 +0,0 @@ -package libcontainer - -import ( - "strconv" - - "golang.org/x/sys/unix" -) - -// mountError holds an error from a failed mount or unmount operation. -type mountError struct { - op string - source string - target string - procfd string - flags uintptr - data string - err error -} - -// Error provides a string error representation. -func (e *mountError) Error() string { - out := e.op + " " - - if e.source != "" { - out += e.source + ":" + e.target - } else { - out += e.target - } - if e.procfd != "" { - out += " (via " + e.procfd + ")" - } - - if e.flags != uintptr(0) { - out += ", flags: 0x" + strconv.FormatUint(uint64(e.flags), 16) - } - if e.data != "" { - out += ", data: " + e.data - } - - out += ": " + e.err.Error() - return out -} - -// Unwrap returns the underlying error. -// This is a convention used by Go 1.13+ standard library. -func (e *mountError) Unwrap() error { - return e.err -} - -// mount is a simple unix.Mount wrapper. If procfd is not empty, it is used -// instead of target (and the target is only used to add context to an error). -func mount(source, target, procfd, fstype string, flags uintptr, data string) error { - dst := target - if procfd != "" { - dst = procfd - } - if err := unix.Mount(source, dst, fstype, flags, data); err != nil { - return &mountError{ - op: "mount", - source: source, - target: target, - procfd: procfd, - flags: flags, - data: data, - err: err, - } - } - return nil -} - -// unmount is a simple unix.Unmount wrapper. -func unmount(target string, flags int) error { - err := unix.Unmount(target, flags) - if err != nil { - return &mountError{ - op: "unmount", - target: target, - flags: uintptr(flags), - err: err, - } - } - return nil -} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/network_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/network_linux.go index 8915548b3bc0..12e5800fc0e6 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/network_linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/network_linux.go @@ -1,9 +1,11 @@ +// +build linux + package libcontainer import ( "bytes" "fmt" - "os" + "io/ioutil" "path/filepath" "strconv" @@ -73,7 +75,7 @@ func getNetworkInterfaceStats(interfaceName string) (*types.NetworkInterface, er // Reads the specified statistics available under /sys/class/net//statistics func readSysfsNetworkStats(ethInterface, statsFile string) (uint64, error) { - data, err := os.ReadFile(filepath.Join("/sys/class/net", ethInterface, "statistics", statsFile)) + data, err := ioutil.ReadFile(filepath.Join("/sys/class/net", ethInterface, "statistics", statsFile)) if err != nil { return 0, err } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/notify_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/notify_linux.go index a8762842e8fb..73a6f5946558 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/notify_linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/notify_linux.go @@ -1,8 +1,11 @@ +// +build linux + package libcontainer import ( "errors" "fmt" + "io/ioutil" "os" "path/filepath" @@ -32,7 +35,7 @@ func registerMemoryEvent(cgDir string, evName string, arg string) (<-chan struct eventControlPath := filepath.Join(cgDir, "cgroup.event_control") data := fmt.Sprintf("%d %d %s", eventfd.Fd(), evFile.Fd(), arg) - if err := os.WriteFile(eventControlPath, []byte(data), 0o700); err != nil { + if err := ioutil.WriteFile(eventControlPath, []byte(data), 0o700); err != nil { eventfd.Close() evFile.Close() return nil, err diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/notify_v2_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/notify_linux_v2.go similarity index 87% rename from cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/notify_v2_linux.go rename to cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/notify_linux_v2.go index 821536c8da02..dd0ec290ecf1 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/notify_v2_linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/notify_linux_v2.go @@ -1,11 +1,13 @@ +// +build linux + package libcontainer import ( - "fmt" "path/filepath" "unsafe" "github.com/opencontainers/runc/libcontainer/cgroups/fscommon" + "github.com/pkg/errors" "github.com/sirupsen/logrus" "golang.org/x/sys/unix" ) @@ -13,19 +15,19 @@ import ( func registerMemoryEventV2(cgDir, evName, cgEvName string) (<-chan struct{}, error) { fd, err := unix.InotifyInit() if err != nil { - return nil, fmt.Errorf("unable to init inotify: %w", err) + return nil, errors.Wrap(err, "unable to init inotify") } // watching oom kill evFd, err := unix.InotifyAddWatch(fd, filepath.Join(cgDir, evName), unix.IN_MODIFY) if err != nil { unix.Close(fd) - return nil, fmt.Errorf("unable to add inotify watch: %w", err) + return nil, errors.Wrap(err, "unable to add inotify watch") } // Because no `unix.IN_DELETE|unix.IN_DELETE_SELF` event for cgroup file system, so watching all process exited cgFd, err := unix.InotifyAddWatch(fd, filepath.Join(cgDir, cgEvName), unix.IN_MODIFY) if err != nil { unix.Close(fd) - return nil, fmt.Errorf("unable to add inotify watch: %w", err) + return nil, errors.Wrap(err, "unable to add inotify watch") } ch := make(chan struct{}) go func() { @@ -51,7 +53,7 @@ func registerMemoryEventV2(cgDir, evName, cgEvName string) (<-chan struct{}, err offset = 0 for offset <= uint32(n-unix.SizeofInotifyEvent) { rawEvent := (*unix.InotifyEvent)(unsafe.Pointer(&buffer[offset])) - offset += unix.SizeofInotifyEvent + rawEvent.Len + offset += unix.SizeofInotifyEvent + uint32(rawEvent.Len) if rawEvent.Mask&unix.IN_MODIFY != unix.IN_MODIFY { continue } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/process.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/process.go index 8a5d340dacdd..d3e472a4fdb9 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/process.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/process.go @@ -1,7 +1,7 @@ package libcontainer import ( - "errors" + "fmt" "io" "math" "os" @@ -9,8 +9,6 @@ import ( "github.com/opencontainers/runc/libcontainer/configs" ) -var errInvalidProcess = errors.New("invalid process") - type processOperations interface { wait() (*os.ProcessState, error) signal(sig os.Signal) error @@ -80,22 +78,13 @@ type Process struct { ops processOperations LogLevel string - - // SubCgroupPaths specifies sub-cgroups to run the process in. - // Map keys are controller names, map values are paths (relative to - // container's top-level cgroup). - // - // If empty, the default top-level container's cgroup is used. - // - // For cgroup v2, the only key allowed is "". - SubCgroupPaths map[string]string } // Wait waits for the process to exit. // Wait releases any resources associated with the Process func (p Process) Wait() (*os.ProcessState, error) { if p.ops == nil { - return nil, errInvalidProcess + return nil, newGenericError(fmt.Errorf("invalid process"), NoProcessOps) } return p.ops.wait() } @@ -105,7 +94,7 @@ func (p Process) Pid() (int, error) { // math.MinInt32 is returned here, because it's invalid value // for the kill() system call. if p.ops == nil { - return math.MinInt32, errInvalidProcess + return math.MinInt32, newGenericError(fmt.Errorf("invalid process"), NoProcessOps) } return p.ops.pid(), nil } @@ -113,7 +102,7 @@ func (p Process) Pid() (int, error) { // Signal sends a signal to the Process. func (p Process) Signal(sig os.Signal) error { if p.ops == nil { - return errInvalidProcess + return newGenericError(fmt.Errorf("invalid process"), NoProcessOps) } return p.ops.signal(sig) } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/process_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/process_linux.go index e025445d3307..80f25e334f71 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/process_linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/process_linux.go @@ -1,3 +1,5 @@ +// +build linux + package libcontainer import ( @@ -5,7 +7,6 @@ import ( "errors" "fmt" "io" - "net" "os" "os/exec" "path/filepath" @@ -24,6 +25,10 @@ import ( "golang.org/x/sys/unix" ) +// Synchronisation value for cgroup namespace setup. +// The same constant is defined in nsexec.c as "CREATECGROUPNS". +const createCgroupns = 0x80 + type parentProcess interface { // pid returns the pid for the running process. pid() int @@ -91,7 +96,7 @@ func (p *setnsProcess) start() (retErr error) { p.messageSockPair.child.Close() p.logFilePair.child.Close() if err != nil { - return fmt.Errorf("error starting setns process: %w", err) + return newSystemErrorWithCause(err, "starting setns process") } waitInit := initWaiter(p.messageSockPair.parent) @@ -99,7 +104,7 @@ func (p *setnsProcess) start() (retErr error) { if retErr != nil { if newOom, err := p.manager.OOMKillCount(); err == nil && newOom != oom { // Someone in this cgroup was killed, this _might_ be us. - retErr = fmt.Errorf("%w (possibly OOM-killed)", retErr) + retErr = newSystemErrorWithCause(retErr, "possibly OOM-killed") } werr := <-waitInit if werr != nil { @@ -114,7 +119,7 @@ func (p *setnsProcess) start() (retErr error) { if p.bootstrapData != nil { if _, err := io.Copy(p.messageSockPair.parent, p.bootstrapData); err != nil { - return fmt.Errorf("error copying bootstrap data to pipe: %w", err) + return newSystemErrorWithCause(err, "copying bootstrap data to pipe") } } err = <-waitInit @@ -122,14 +127,14 @@ func (p *setnsProcess) start() (retErr error) { return err } if err := p.execSetns(); err != nil { - return fmt.Errorf("error executing setns process: %w", err) + return newSystemErrorWithCause(err, "executing setns process") } - for _, path := range p.cgroupPaths { - if err := cgroups.WriteCgroupProc(path, p.pid()); err != nil && !p.rootlessCgroups { - // On cgroup v2 + nesting + domain controllers, WriteCgroupProc may fail with EBUSY. + if len(p.cgroupPaths) > 0 { + if err := cgroups.EnterPid(p.cgroupPaths, p.pid()); err != nil && !p.rootlessCgroups { + // On cgroup v2 + nesting + domain controllers, EnterPid may fail with EBUSY. // https://github.com/opencontainers/runc/issues/2356#issuecomment-621277643 // Try to join the cgroup of InitProcessPid. - if cgroups.IsCgroup2UnifiedMode() && p.initProcessPid != 0 { + if cgroups.IsCgroup2UnifiedMode() { initProcCgroupFile := fmt.Sprintf("/proc/%d/cgroup", p.initProcessPid) initCg, initCgErr := cgroups.ParseCgroupFile(initProcCgroupFile) if initCgErr == nil { @@ -143,7 +148,7 @@ func (p *setnsProcess) start() (retErr error) { } } if err != nil { - return fmt.Errorf("error adding pid %d to cgroups: %w", p.pid(), err) + return newSystemErrorWithCausef(err, "adding pid %d to cgroups", p.pid()) } } } @@ -152,17 +157,17 @@ func (p *setnsProcess) start() (retErr error) { _, err := os.Stat(p.intelRdtPath) if err == nil { if err := intelrdt.WriteIntelRdtTasks(p.intelRdtPath, p.pid()); err != nil { - return fmt.Errorf("error adding pid %d to Intel RDT: %w", p.pid(), err) + return newSystemErrorWithCausef(err, "adding pid %d to Intel RDT resource control filesystem", p.pid()) } } } // set rlimits, this has to be done here because we lose permissions // to raise the limits once we enter a user-namespace if err := setupRlimits(p.config.Rlimits, p.pid()); err != nil { - return fmt.Errorf("error setting rlimits for process: %w", err) + return newSystemErrorWithCause(err, "setting rlimits for process") } if err := utils.WriteJSON(p.messageSockPair.parent, p.config); err != nil { - return fmt.Errorf("error writing config to pipe: %w", err) + return newSystemErrorWithCause(err, "writing config to pipe") } ierr := parseSync(p.messageSockPair.parent, func(sync *syncT) error { @@ -173,49 +178,13 @@ func (p *setnsProcess) start() (retErr error) { case procHooks: // This shouldn't happen. panic("unexpected procHooks in setns") - case procSeccomp: - if p.config.Config.Seccomp.ListenerPath == "" { - return errors.New("listenerPath is not set") - } - - seccompFd, err := recvSeccompFd(uintptr(p.pid()), uintptr(sync.Fd)) - if err != nil { - return err - } - defer unix.Close(seccompFd) - - bundle, annotations := utils.Annotations(p.config.Config.Labels) - containerProcessState := &specs.ContainerProcessState{ - Version: specs.Version, - Fds: []string{specs.SeccompFdName}, - Pid: p.cmd.Process.Pid, - Metadata: p.config.Config.Seccomp.ListenerMetadata, - State: specs.State{ - Version: specs.Version, - ID: p.config.ContainerId, - Status: specs.StateRunning, - Pid: p.initProcessPid, - Bundle: bundle, - Annotations: annotations, - }, - } - if err := sendContainerProcessState(p.config.Config.Seccomp.ListenerPath, - containerProcessState, seccompFd); err != nil { - return err - } - - // Sync with child. - if err := writeSync(p.messageSockPair.parent, procSeccompDone); err != nil { - return err - } - return nil default: - return errors.New("invalid JSON payload from child") + return newSystemError(errors.New("invalid JSON payload from child")) } }) if err := unix.Shutdown(int(p.messageSockPair.parent.Fd()), unix.SHUT_WR); err != nil { - return &os.PathError{Op: "shutdown", Path: "(init pipe)", Err: err} + return newSystemErrorWithCause(err, "calling shutdown on init pipe") } // Must be done after Shutdown so the child will exit and we can wait for it. if ierr != nil { @@ -233,16 +202,16 @@ func (p *setnsProcess) execSetns() error { status, err := p.cmd.Process.Wait() if err != nil { _ = p.cmd.Wait() - return fmt.Errorf("error waiting on setns process to finish: %w", err) + return newSystemErrorWithCause(err, "waiting on setns process to finish") } if !status.Success() { _ = p.cmd.Wait() - return &exec.ExitError{ProcessState: status} + return newSystemError(&exec.ExitError{ProcessState: status}) } var pid *pid if err := json.NewDecoder(p.messageSockPair.parent).Decode(&pid); err != nil { _ = p.cmd.Wait() - return fmt.Errorf("error reading pid from init pipe: %w", err) + return newSystemErrorWithCause(err, "reading pid from init pipe") } // Clean up the zombie parent process @@ -366,7 +335,7 @@ func (p *initProcess) start() (retErr error) { _ = p.logFilePair.child.Close() if err != nil { p.process.ops = nil - return fmt.Errorf("unable to start init: %w", err) + return newSystemErrorWithCause(err, "starting init process command") } waitInit := initWaiter(p.messageSockPair.parent) @@ -386,9 +355,9 @@ func (p *initProcess) start() (retErr error) { if logrus.GetLevel() >= logrus.DebugLevel { // Only show the original error if debug is set, // as it is not generally very useful. - retErr = fmt.Errorf(oomError+": %w", retErr) + retErr = newSystemErrorWithCause(retErr, oomError) } else { - retErr = errors.New(oomError) + retErr = newSystemError(errors.New(oomError)) } } @@ -413,15 +382,15 @@ func (p *initProcess) start() (retErr error) { // cgroup. We don't need to worry about not doing this and not being root // because we'd be using the rootless cgroup manager in that case. if err := p.manager.Apply(p.pid()); err != nil { - return fmt.Errorf("unable to apply cgroup configuration: %w", err) + return newSystemErrorWithCause(err, "applying cgroup configuration for process") } if p.intelRdtManager != nil { if err := p.intelRdtManager.Apply(p.pid()); err != nil { - return fmt.Errorf("unable to apply Intel RDT configuration: %w", err) + return newSystemErrorWithCause(err, "applying Intel RDT configuration for process") } } if _, err := io.Copy(p.messageSockPair.parent, p.bootstrapData); err != nil { - return fmt.Errorf("can't copy bootstrap data to pipe: %w", err) + return newSystemErrorWithCause(err, "copying bootstrap data to pipe") } err = <-waitInit if err != nil { @@ -430,7 +399,7 @@ func (p *initProcess) start() (retErr error) { childPid, err := p.getChildPid() if err != nil { - return fmt.Errorf("can't get final child's PID from pipe: %w", err) + return newSystemErrorWithCause(err, "getting the final child's pid from pipe") } // Save the standard descriptor names before the container process @@ -438,23 +407,30 @@ func (p *initProcess) start() (retErr error) { // we won't know at checkpoint time which file descriptor to look up. fds, err := getPipeFds(childPid) if err != nil { - return fmt.Errorf("error getting pipe fds for pid %d: %w", childPid, err) + return newSystemErrorWithCausef(err, "getting pipe fds for pid %d", childPid) } p.setExternalDescriptors(fds) + // Now it's time to setup cgroup namesapce + if p.config.Config.Namespaces.Contains(configs.NEWCGROUP) && p.config.Config.Namespaces.PathOf(configs.NEWCGROUP) == "" { + if _, err := p.messageSockPair.parent.Write([]byte{createCgroupns}); err != nil { + return newSystemErrorWithCause(err, "sending synchronization value to init process") + } + } + // Wait for our first child to exit if err := p.waitForChildExit(childPid); err != nil { - return fmt.Errorf("error waiting for our first child to exit: %w", err) + return newSystemErrorWithCause(err, "waiting for our first child to exit") } if err := p.createNetworkInterfaces(); err != nil { - return fmt.Errorf("error creating network interfaces: %w", err) + return newSystemErrorWithCause(err, "creating network interfaces") } if err := p.updateSpecState(); err != nil { - return fmt.Errorf("error updating spec state: %w", err) + return newSystemErrorWithCause(err, "updating the spec state") } if err := p.sendConfig(); err != nil { - return fmt.Errorf("error sending config to init process: %w", err) + return newSystemErrorWithCause(err, "sending config to init process") } var ( sentRun bool @@ -463,60 +439,25 @@ func (p *initProcess) start() (retErr error) { ierr := parseSync(p.messageSockPair.parent, func(sync *syncT) error { switch sync.Type { - case procSeccomp: - if p.config.Config.Seccomp.ListenerPath == "" { - return errors.New("listenerPath is not set") - } - - seccompFd, err := recvSeccompFd(uintptr(childPid), uintptr(sync.Fd)) - if err != nil { - return err - } - defer unix.Close(seccompFd) - - s, err := p.container.currentOCIState() - if err != nil { - return err - } - - // initProcessStartTime hasn't been set yet. - s.Pid = p.cmd.Process.Pid - s.Status = specs.StateCreating - containerProcessState := &specs.ContainerProcessState{ - Version: specs.Version, - Fds: []string{specs.SeccompFdName}, - Pid: s.Pid, - Metadata: p.config.Config.Seccomp.ListenerMetadata, - State: *s, - } - if err := sendContainerProcessState(p.config.Config.Seccomp.ListenerPath, - containerProcessState, seccompFd); err != nil { - return err - } - - // Sync with child. - if err := writeSync(p.messageSockPair.parent, procSeccompDone); err != nil { - return err - } case procReady: // set rlimits, this has to be done here because we lose permissions // to raise the limits once we enter a user-namespace if err := setupRlimits(p.config.Rlimits, p.pid()); err != nil { - return fmt.Errorf("error setting rlimits for ready process: %w", err) + return newSystemErrorWithCause(err, "setting rlimits for ready process") } // call prestart and CreateRuntime hooks if !p.config.Config.Namespaces.Contains(configs.NEWNS) { // Setup cgroup before the hook, so that the prestart and CreateRuntime hook could apply cgroup permissions. if err := p.manager.Set(p.config.Config.Cgroups.Resources); err != nil { - return fmt.Errorf("error setting cgroup config for ready process: %w", err) + return newSystemErrorWithCause(err, "setting cgroup config for ready process") } if p.intelRdtManager != nil { if err := p.intelRdtManager.Set(p.config.Config); err != nil { - return fmt.Errorf("error setting Intel RDT config for ready process: %w", err) + return newSystemErrorWithCause(err, "setting Intel RDT config for ready process") } } - if len(p.config.Config.Hooks) != 0 { + if p.config.Config.Hooks != nil { s, err := p.container.currentOCIState() if err != nil { return err @@ -552,26 +493,26 @@ func (p *initProcess) start() (retErr error) { // procRun sync. state, uerr := p.container.updateState(p) if uerr != nil { - return fmt.Errorf("unable to store init state: %w", err) + return newSystemErrorWithCause(err, "store init state") } p.container.initProcessStartTime = state.InitProcessStartTime // Sync with child. if err := writeSync(p.messageSockPair.parent, procRun); err != nil { - return err + return newSystemErrorWithCause(err, "writing syncT 'run'") } sentRun = true case procHooks: // Setup cgroup before prestart hook, so that the prestart hook could apply cgroup permissions. if err := p.manager.Set(p.config.Config.Cgroups.Resources); err != nil { - return fmt.Errorf("error setting cgroup config for procHooks process: %w", err) + return newSystemErrorWithCause(err, "setting cgroup config for procHooks process") } if p.intelRdtManager != nil { if err := p.intelRdtManager.Set(p.config.Config); err != nil { - return fmt.Errorf("error setting Intel RDT config for procHooks process: %w", err) + return newSystemErrorWithCause(err, "setting Intel RDT config for procHooks process") } } - if len(p.config.Config.Hooks) != 0 { + if p.config.Config.Hooks != nil { s, err := p.container.currentOCIState() if err != nil { return err @@ -590,24 +531,24 @@ func (p *initProcess) start() (retErr error) { } // Sync with child. if err := writeSync(p.messageSockPair.parent, procResume); err != nil { - return err + return newSystemErrorWithCause(err, "writing syncT 'resume'") } sentResume = true default: - return errors.New("invalid JSON payload from child") + return newSystemError(errors.New("invalid JSON payload from child")) } return nil }) if !sentRun { - return fmt.Errorf("error during container init: %w", ierr) + return newSystemErrorWithCause(ierr, "container init") } if p.config.Config.Namespaces.Contains(configs.NEWNS) && !sentResume { - return errors.New("could not synchronise after executing prestart and CreateRuntime hooks with container process") + return newSystemError(errors.New("could not synchronise after executing prestart and CreateRuntime hooks with container process")) } if err := unix.Shutdown(int(p.messageSockPair.parent.Fd()), unix.SHUT_WR); err != nil { - return &os.PathError{Op: "shutdown", Path: "(init pipe)", Err: err} + return newSystemErrorWithCause(err, "shutting down init pipe") } // Must be done after Shutdown so the child will exit and we can wait for it. @@ -693,46 +634,6 @@ func (p *initProcess) forwardChildLogs() chan error { return logs.ForwardLogs(p.logFilePair.parent) } -func recvSeccompFd(childPid, childFd uintptr) (int, error) { - pidfd, _, errno := unix.Syscall(unix.SYS_PIDFD_OPEN, childPid, 0, 0) - if errno != 0 { - return -1, fmt.Errorf("performing SYS_PIDFD_OPEN syscall: %w", errno) - } - defer unix.Close(int(pidfd)) - - seccompFd, _, errno := unix.Syscall(unix.SYS_PIDFD_GETFD, pidfd, childFd, 0) - if errno != 0 { - return -1, fmt.Errorf("performing SYS_PIDFD_GETFD syscall: %w", errno) - } - - return int(seccompFd), nil -} - -func sendContainerProcessState(listenerPath string, state *specs.ContainerProcessState, fd int) error { - conn, err := net.Dial("unix", listenerPath) - if err != nil { - return fmt.Errorf("failed to connect with seccomp agent specified in the seccomp profile: %w", err) - } - - socket, err := conn.(*net.UnixConn).File() - if err != nil { - return fmt.Errorf("cannot get seccomp socket: %w", err) - } - defer socket.Close() - - b, err := json.Marshal(state) - if err != nil { - return fmt.Errorf("cannot marshall seccomp state: %w", err) - } - - err = utils.SendFds(socket, b, fd) - if err != nil { - return fmt.Errorf("cannot send seccomp fd to %s: %w", listenerPath, err) - } - - return nil -} - func getPipeFds(pid int) ([]string, error) { fds := make([]string, 3) @@ -793,7 +694,7 @@ func (p *Process) InitializeIO(rootuid, rootgid int) (i *IO, err error) { // change ownership of the pipes in case we are in a user namespace for _, fd := range fds { if err := unix.Fchown(int(fd), rootuid, rootgid); err != nil { - return nil, &os.PathError{Op: "fchown", Path: "fd " + strconv.Itoa(int(fd)), Err: err} + return nil, err } } return i, nil @@ -818,7 +719,7 @@ func initWaiter(r io.Reader) chan error { return } } - ch <- fmt.Errorf("waiting for init preliminary setup: %w", err) + ch <- newSystemErrorWithCause(err, "waiting for init preliminary setup") }() return ch diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/restored_process.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/restored_process.go index cdffbd3aff55..34270e64ed47 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/restored_process.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/restored_process.go @@ -1,7 +1,9 @@ +// +build linux + package libcontainer import ( - "errors" + "fmt" "os" "os/exec" @@ -29,7 +31,7 @@ type restoredProcess struct { } func (p *restoredProcess) start() error { - return errors.New("restored process cannot be started") + return newGenericError(fmt.Errorf("restored process cannot be started"), SystemError) } func (p *restoredProcess) pid() int { @@ -49,8 +51,7 @@ func (p *restoredProcess) wait() (*os.ProcessState, error) { // maybe use --exec-cmd in criu err := p.cmd.Wait() if err != nil { - var exitErr *exec.ExitError - if !errors.As(err, &exitErr) { + if _, ok := err.(*exec.ExitError); !ok { return nil, err } } @@ -88,7 +89,7 @@ type nonChildProcess struct { } func (p *nonChildProcess) start() error { - return errors.New("restored process cannot be started") + return newGenericError(fmt.Errorf("restored process cannot be started"), SystemError) } func (p *nonChildProcess) pid() int { @@ -96,11 +97,11 @@ func (p *nonChildProcess) pid() int { } func (p *nonChildProcess) terminate() error { - return errors.New("restored process cannot be terminated") + return newGenericError(fmt.Errorf("restored process cannot be terminated"), SystemError) } func (p *nonChildProcess) wait() (*os.ProcessState, error) { - return nil, errors.New("restored process cannot be waited on") + return nil, newGenericError(fmt.Errorf("restored process cannot be waited on"), SystemError) } func (p *nonChildProcess) startTime() (uint64, error) { diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/rootfs_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/rootfs_linux.go index 51660f5efb92..430f490dec91 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/rootfs_linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/rootfs_linux.go @@ -1,14 +1,15 @@ +// +build linux + package libcontainer import ( - "errors" "fmt" "io" + "io/ioutil" "os" "os/exec" "path" "path/filepath" - "strconv" "strings" "time" @@ -21,6 +22,7 @@ import ( "github.com/opencontainers/runc/libcontainer/devices" "github.com/opencontainers/runc/libcontainer/userns" "github.com/opencontainers/runc/libcontainer/utils" + libcontainerUtils "github.com/opencontainers/runc/libcontainer/utils" "github.com/opencontainers/runtime-spec/specs-go" "github.com/opencontainers/selinux/go-selinux/label" "github.com/sirupsen/logrus" @@ -35,13 +37,12 @@ type mountConfig struct { cgroup2Path string rootlessCgroups bool cgroupns bool - fd *int } // needsSetupDev returns true if /dev needs to be set up. func needsSetupDev(config *configs.Config) bool { for _, m := range config.Mounts { - if m.Device == "bind" && utils.CleanPath(m.Destination) == "/dev" { + if m.Device == "bind" && libcontainerUtils.CleanPath(m.Destination) == "/dev" { return false } } @@ -51,14 +52,10 @@ func needsSetupDev(config *configs.Config) bool { // prepareRootfs sets up the devices, mount points, and filesystems for use // inside a new mount namespace. It doesn't set anything as ro. You must call // finalizeRootfs after this function to finish setting up the rootfs. -func prepareRootfs(pipe io.ReadWriter, iConfig *initConfig, mountFds []int) (err error) { +func prepareRootfs(pipe io.ReadWriter, iConfig *initConfig) (err error) { config := iConfig.Config if err := prepareRoot(config); err != nil { - return fmt.Errorf("error preparing rootfs: %w", err) - } - - if mountFds != nil && len(mountFds) != len(config.Mounts) { - return fmt.Errorf("malformed mountFds slice. Expected size: %v, got: %v. Slice: %v", len(config.Mounts), len(mountFds), mountFds) + return newSystemErrorWithCause(err, "preparing rootfs") } mountConfig := &mountConfig{ @@ -69,39 +66,32 @@ func prepareRootfs(pipe io.ReadWriter, iConfig *initConfig, mountFds []int) (err cgroupns: config.Namespaces.Contains(configs.NEWCGROUP), } setupDev := needsSetupDev(config) - for i, m := range config.Mounts { + for _, m := range config.Mounts { for _, precmd := range m.PremountCmds { if err := mountCmd(precmd); err != nil { - return fmt.Errorf("error running premount command: %w", err) + return newSystemErrorWithCause(err, "running premount command") } } - - // Just before the loop we checked that if not empty, len(mountFds) == len(config.Mounts). - // Therefore, we can access mountFds[i] without any concerns. - if mountFds != nil && mountFds[i] != -1 { - mountConfig.fd = &mountFds[i] - } - if err := mountToRootfs(m, mountConfig); err != nil { - return fmt.Errorf("error mounting %q to rootfs at %q: %w", m.Source, m.Destination, err) + return newSystemErrorWithCausef(err, "mounting %q to rootfs at %q", m.Source, m.Destination) } for _, postcmd := range m.PostmountCmds { if err := mountCmd(postcmd); err != nil { - return fmt.Errorf("error running postmount command: %w", err) + return newSystemErrorWithCause(err, "running postmount command") } } } if setupDev { if err := createDevices(config); err != nil { - return fmt.Errorf("error creating device nodes: %w", err) + return newSystemErrorWithCause(err, "creating device nodes") } if err := setupPtmx(config); err != nil { - return fmt.Errorf("error setting up ptmx: %w", err) + return newSystemErrorWithCause(err, "setting up ptmx") } if err := setupDevSymlinks(config.Rootfs); err != nil { - return fmt.Errorf("error setting up /dev symlinks: %w", err) + return newSystemErrorWithCause(err, "setting up /dev symlinks") } } @@ -123,7 +113,7 @@ func prepareRootfs(pipe io.ReadWriter, iConfig *initConfig, mountFds []int) (err // operation not being perfectly split). if err := unix.Chdir(config.Rootfs); err != nil { - return &os.PathError{Op: "chdir", Path: config.Rootfs, Err: err} + return newSystemErrorWithCausef(err, "changing dir to %q", config.Rootfs) } s := iConfig.SpecState @@ -141,12 +131,12 @@ func prepareRootfs(pipe io.ReadWriter, iConfig *initConfig, mountFds []int) (err err = chroot() } if err != nil { - return fmt.Errorf("error jailing process inside rootfs: %w", err) + return newSystemErrorWithCause(err, "jailing process inside rootfs") } if setupDev { if err := reOpenDevNull(); err != nil { - return fmt.Errorf("error reopening /dev/null inside container: %w", err) + return newSystemErrorWithCause(err, "reopening /dev/null inside container") } } @@ -164,23 +154,22 @@ func prepareRootfs(pipe io.ReadWriter, iConfig *initConfig, mountFds []int) (err // finalizeRootfs sets anything to ro if necessary. You must call // prepareRootfs first. func finalizeRootfs(config *configs.Config) (err error) { - // All tmpfs mounts and /dev were previously mounted as rw - // by mountPropagate. Remount them read-only as requested. + // remount dev as ro if specified for _, m := range config.Mounts { - if m.Flags&unix.MS_RDONLY != unix.MS_RDONLY { - continue - } - if m.Device == "tmpfs" || utils.CleanPath(m.Destination) == "/dev" { - if err := remountReadonly(m); err != nil { - return err + if libcontainerUtils.CleanPath(m.Destination) == "/dev" { + if m.Flags&unix.MS_RDONLY == unix.MS_RDONLY { + if err := remountReadonly(m); err != nil { + return newSystemErrorWithCausef(err, "remounting %q as readonly", m.Destination) + } } + break } } // set rootfs ( / ) as readonly if config.Readonlyfs { if err := setReadonly(); err != nil { - return fmt.Errorf("error setting rootfs as readonly: %w", err) + return newSystemErrorWithCause(err, "setting rootfs as readonly") } } @@ -194,14 +183,14 @@ func finalizeRootfs(config *configs.Config) (err error) { // /tmp has to be mounted as private to allow MS_MOVE to work in all situations func prepareTmp(topTmpDir string) (string, error) { - tmpdir, err := os.MkdirTemp(topTmpDir, "runctop") + tmpdir, err := ioutil.TempDir(topTmpDir, "runctop") if err != nil { return "", err } - if err := mount(tmpdir, tmpdir, "", "bind", unix.MS_BIND, ""); err != nil { + if err := unix.Mount(tmpdir, tmpdir, "bind", unix.MS_BIND, ""); err != nil { return "", err } - if err := mount("", tmpdir, "", "", uintptr(unix.MS_PRIVATE), ""); err != nil { + if err := unix.Mount("", tmpdir, "", uintptr(unix.MS_PRIVATE), ""); err != nil { return "", err } return tmpdir, nil @@ -217,18 +206,13 @@ func mountCmd(cmd configs.Command) error { command.Env = cmd.Env command.Dir = cmd.Dir if out, err := command.CombinedOutput(); err != nil { - return fmt.Errorf("%#v failed: %s: %w", cmd, string(out), err) + return fmt.Errorf("%#v failed: %s: %v", cmd, string(out), err) } return nil } -func prepareBindMount(m *configs.Mount, rootfs string, mountFd *int) error { - source := m.Source - if mountFd != nil { - source = "/proc/self/fd/" + strconv.Itoa(*mountFd) - } - - stat, err := os.Stat(source) +func prepareBindMount(m *configs.Mount, rootfs string) error { + stat, err := os.Stat(m.Source) if err != nil { // error out if the source of a bind mount does not exist as we will be // unable to bind anything to it. @@ -242,7 +226,7 @@ func prepareBindMount(m *configs.Mount, rootfs string, mountFd *int) error { if dest, err = securejoin.SecureJoin(rootfs, m.Destination); err != nil { return err } - if err := checkProcMount(rootfs, dest, source); err != nil { + if err := checkProcMount(rootfs, dest, m.Source); err != nil { return err } if err := createIfNotExists(dest, stat.IsDir()); err != nil { @@ -272,11 +256,9 @@ func mountCgroupV1(m *configs.Mount, c *mountConfig) error { Data: "mode=755", PropagationFlags: m.PropagationFlags, } - if err := mountToRootfs(tmpfs, c); err != nil { return err } - for _, b := range binds { if c.cgroupns { subsystemPath := filepath.Join(c.root, b.Destination) @@ -296,7 +278,7 @@ func mountCgroupV1(m *configs.Mount, c *mountConfig) error { data = cgroups.CgroupNamePrefix + data source = "systemd" } - return mount(source, b.Destination, procfd, "cgroup", uintptr(flags), data) + return unix.Mount(source, procfd, "cgroup", uintptr(flags), data) }); err != nil { return err } @@ -328,9 +310,9 @@ func mountCgroupV2(m *configs.Mount, c *mountConfig) error { return err } return utils.WithProcfd(c.root, m.Destination, func(procfd string) error { - if err := mount(m.Source, m.Destination, procfd, "cgroup2", uintptr(m.Flags), m.Data); err != nil { + if err := unix.Mount(m.Source, procfd, "cgroup2", uintptr(m.Flags), m.Data); err != nil { // when we are in UserNS but CgroupNS is not unshared, we cannot mount cgroup2 (#2158) - if errors.Is(err, unix.EPERM) || errors.Is(err, unix.EBUSY) { + if err == unix.EPERM || err == unix.EBUSY { src := fs2.UnifiedMountpoint if c.cgroupns && c.cgroup2Path != "" { // Emulate cgroupns by bind-mounting @@ -338,8 +320,8 @@ func mountCgroupV2(m *configs.Mount, c *mountConfig) error { // the whole /sys/fs/cgroup. src = c.cgroup2Path } - err = mount(src, m.Destination, procfd, "", uintptr(m.Flags)|unix.MS_BIND, "") - if c.rootlessCgroups && errors.Is(err, unix.ENOENT) { + err = unix.Mount(src, procfd, "", uintptr(m.Flags)|unix.MS_BIND, "") + if err == unix.ENOENT && c.rootlessCgroups { err = nil } } @@ -353,12 +335,12 @@ func doTmpfsCopyUp(m *configs.Mount, rootfs, mountLabel string) (Err error) { // Set up a scratch dir for the tmpfs on the host. tmpdir, err := prepareTmp("/tmp") if err != nil { - return fmt.Errorf("tmpcopyup: failed to setup tmpdir: %w", err) + return newSystemErrorWithCause(err, "tmpcopyup: failed to setup tmpdir") } defer cleanupTmp(tmpdir) - tmpDir, err := os.MkdirTemp(tmpdir, "runctmpdir") + tmpDir, err := ioutil.TempDir(tmpdir, "runctmpdir") if err != nil { - return fmt.Errorf("tmpcopyup: failed to create tmpdir: %w", err) + return newSystemErrorWithCause(err, "tmpcopyup: failed to create tmpdir") } defer os.RemoveAll(tmpDir) @@ -366,15 +348,15 @@ func doTmpfsCopyUp(m *configs.Mount, rootfs, mountLabel string) (Err error) { // m.Destination since we are going to mount *on the host*. oldDest := m.Destination m.Destination = tmpDir - err = mountPropagate(m, "/", mountLabel, nil) + err = mountPropagate(m, "/", mountLabel) m.Destination = oldDest if err != nil { return err } defer func() { if Err != nil { - if err := unmount(tmpDir, unix.MNT_DETACH); err != nil { - logrus.Warnf("tmpcopyup: %v", err) + if err := unix.Unmount(tmpDir, unix.MNT_DETACH); err != nil { + logrus.Warnf("tmpcopyup: failed to unmount tmpdir on error: %v", err) } } }() @@ -387,8 +369,8 @@ func doTmpfsCopyUp(m *configs.Mount, rootfs, mountLabel string) (Err error) { return fmt.Errorf("tmpcopyup: failed to copy %s to %s (%s): %w", m.Destination, procfd, tmpDir, err) } // Now move the mount into the container. - if err := mount(tmpDir, m.Destination, procfd, "", unix.MS_MOVE, ""); err != nil { - return fmt.Errorf("tmpcopyup: failed to move mount: %w", err) + if err := unix.Mount(tmpDir, procfd, "", unix.MS_MOVE, ""); err != nil { + return fmt.Errorf("tmpcopyup: failed to move mount %s to %s (%s): %w", tmpDir, procfd, m.Destination, err) } return nil }) @@ -397,7 +379,6 @@ func doTmpfsCopyUp(m *configs.Mount, rootfs, mountLabel string) (Err error) { func mountToRootfs(m *configs.Mount, c *mountConfig) error { rootfs := c.root mountLabel := c.label - mountFd := c.fd dest, err := securejoin.SecureJoin(rootfs, m.Destination) if err != nil { return err @@ -421,12 +402,12 @@ func mountToRootfs(m *configs.Mount, c *mountConfig) error { return err } // Selinux kernels do not support labeling of /proc or /sys - return mountPropagate(m, rootfs, "", nil) + return mountPropagate(m, rootfs, "") case "mqueue": if err := os.MkdirAll(dest, 0o755); err != nil { return err } - if err := mountPropagate(m, rootfs, "", nil); err != nil { + if err := mountPropagate(m, rootfs, ""); err != nil { return err } return label.SetFileLabel(dest, mountLabel) @@ -441,31 +422,35 @@ func mountToRootfs(m *configs.Mount, c *mountConfig) error { if m.Extensions&configs.EXT_COPYUP == configs.EXT_COPYUP { err = doTmpfsCopyUp(m, rootfs, mountLabel) } else { - err = mountPropagate(m, rootfs, mountLabel, nil) + err = mountPropagate(m, rootfs, mountLabel) } - if err != nil { return err } - if stat != nil { if err = os.Chmod(dest, stat.Mode()); err != nil { return err } } + // Initially mounted rw in mountPropagate, remount to ro if flag set. + if m.Flags&unix.MS_RDONLY != 0 { + if err := remount(m, rootfs); err != nil { + return err + } + } return nil case "bind": - if err := prepareBindMount(m, rootfs, mountFd); err != nil { + if err := prepareBindMount(m, rootfs); err != nil { return err } - if err := mountPropagate(m, rootfs, mountLabel, mountFd); err != nil { + if err := mountPropagate(m, rootfs, mountLabel); err != nil { return err } // bind mount won't change mount options, we need remount to make mount options effective. // first check that we have non-default options required before attempting a remount if m.Flags&^(unix.MS_REC|unix.MS_REMOUNT|unix.MS_BIND) != 0 { // only remount if unique mount options are set - if err := remount(m, rootfs, mountFd); err != nil { + if err := remount(m, rootfs); err != nil { return err } } @@ -491,10 +476,7 @@ func mountToRootfs(m *configs.Mount, c *mountConfig) error { if err := os.MkdirAll(dest, 0o755); err != nil { return err } - return mountPropagate(m, rootfs, mountLabel, mountFd) - } - if err := setRecAttr(m, rootfs); err != nil { - return err + return mountPropagate(m, rootfs, mountLabel) } return nil } @@ -594,7 +576,7 @@ func checkProcMount(rootfs, dest, source string) error { func isProc(path string) (bool, error) { var s unix.Statfs_t if err := unix.Statfs(path, &s); err != nil { - return false, &os.PathError{Op: "statfs", Path: path, Err: err} + return false, err } return s.Type == unix.PROC_SUPER_MAGIC, nil } @@ -617,7 +599,7 @@ func setupDevSymlinks(rootfs string) error { dst = filepath.Join(rootfs, link[1]) ) if err := os.Symlink(src, dst); err != nil && !os.IsExist(err) { - return err + return fmt.Errorf("symlink %s %s %s", src, dst, err) } } return nil @@ -631,24 +613,20 @@ func reOpenDevNull() error { var stat, devNullStat unix.Stat_t file, err := os.OpenFile("/dev/null", os.O_RDWR, 0) if err != nil { - return err + return fmt.Errorf("Failed to open /dev/null - %s", err) } defer file.Close() //nolint: errcheck if err := unix.Fstat(int(file.Fd()), &devNullStat); err != nil { - return &os.PathError{Op: "fstat", Path: file.Name(), Err: err} + return err } for fd := 0; fd < 3; fd++ { if err := unix.Fstat(fd, &stat); err != nil { - return &os.PathError{Op: "fstat", Path: "fd " + strconv.Itoa(fd), Err: err} + return err } if stat.Rdev == devNullStat.Rdev { // Close and re-open the fd. if err := unix.Dup3(int(file.Fd()), fd, 0); err != nil { - return &os.PathError{ - Op: "dup3", - Path: "fd " + strconv.Itoa(int(file.Fd())), - Err: err, - } + return err } } } @@ -686,7 +664,7 @@ func bindMountDeviceNode(rootfs, dest string, node *devices.Device) error { _ = f.Close() } return utils.WithProcfd(rootfs, dest, func(procfd string) error { - return mount(node.Path, dest, procfd, "bind", unix.MS_BIND, "") + return unix.Mount(node.Path, procfd, "bind", unix.MS_BIND, "") }) } @@ -707,9 +685,9 @@ func createDeviceNode(rootfs string, node *devices.Device, bind bool) error { return bindMountDeviceNode(rootfs, dest, node) } if err := mknodDevice(dest, node); err != nil { - if errors.Is(err, os.ErrExist) { + if os.IsExist(err) { return nil - } else if errors.Is(err, os.ErrPermission) { + } else if os.IsPermission(err) { return bindMountDeviceNode(rootfs, dest, node) } return err @@ -734,9 +712,9 @@ func mknodDevice(dest string, node *devices.Device) error { return err } if err := unix.Mknod(dest, uint32(fileMode), int(dev)); err != nil { - return &os.PathError{Op: "mknod", Path: dest, Err: err} + return err } - return os.Chown(dest, int(node.Uid), int(node.Gid)) + return unix.Chown(dest, int(node.Uid), int(node.Gid)) } // Get the parent mount point of directory passed in as argument. Also return @@ -783,7 +761,7 @@ func rootfsParentMountPrivate(rootfs string) error { // shared. Secondly when we bind mount rootfs it will propagate to // parent namespace and we don't want that to happen. if sharedMount { - return mount("", parentMount, "", "", unix.MS_PRIVATE, "") + return unix.Mount("", parentMount, "", unix.MS_PRIVATE, "") } return nil @@ -794,7 +772,7 @@ func prepareRoot(config *configs.Config) error { if config.RootPropagation != 0 { flag = config.RootPropagation } - if err := mount("", "/", "", "", uintptr(flag), ""); err != nil { + if err := unix.Mount("", "/", "", uintptr(flag), ""); err != nil { return err } @@ -805,13 +783,13 @@ func prepareRoot(config *configs.Config) error { return err } - return mount(config.Rootfs, config.Rootfs, "", "bind", unix.MS_BIND|unix.MS_REC, "") + return unix.Mount(config.Rootfs, config.Rootfs, "bind", unix.MS_BIND|unix.MS_REC, "") } func setReadonly() error { flags := uintptr(unix.MS_BIND | unix.MS_REMOUNT | unix.MS_RDONLY) - err := mount("", "/", "", "", flags, "") + err := unix.Mount("", "/", "", flags, "") if err == nil { return nil } @@ -820,7 +798,7 @@ func setReadonly() error { return &os.PathError{Op: "statfs", Path: "/", Err: err} } flags |= uintptr(s.Flags) - return mount("", "/", "", "", flags, "") + return unix.Mount("", "/", "", flags, "") } func setupPtmx(config *configs.Config) error { @@ -829,7 +807,7 @@ func setupPtmx(config *configs.Config) error { return err } if err := os.Symlink("pts/ptmx", ptmx); err != nil { - return err + return fmt.Errorf("symlink dev ptmx %s", err) } return nil } @@ -845,23 +823,23 @@ func pivotRoot(rootfs string) error { oldroot, err := unix.Open("/", unix.O_DIRECTORY|unix.O_RDONLY, 0) if err != nil { - return &os.PathError{Op: "open", Path: "/", Err: err} + return err } defer unix.Close(oldroot) //nolint: errcheck newroot, err := unix.Open(rootfs, unix.O_DIRECTORY|unix.O_RDONLY, 0) if err != nil { - return &os.PathError{Op: "open", Path: rootfs, Err: err} + return err } defer unix.Close(newroot) //nolint: errcheck // Change to the new root so that the pivot_root actually acts on it. if err := unix.Fchdir(newroot); err != nil { - return &os.PathError{Op: "fchdir", Path: "fd " + strconv.Itoa(newroot), Err: err} + return err } if err := unix.PivotRoot(".", "."); err != nil { - return &os.PathError{Op: "pivot_root", Path: ".", Err: err} + return fmt.Errorf("pivot_root %s", err) } // Currently our "." is oldroot (according to the current kernel code). @@ -870,7 +848,7 @@ func pivotRoot(rootfs string) error { // pivot_root(2). if err := unix.Fchdir(oldroot); err != nil { - return &os.PathError{Op: "fchdir", Path: "fd " + strconv.Itoa(oldroot), Err: err} + return err } // Make oldroot rslave to make sure our unmounts don't propagate to the @@ -878,17 +856,17 @@ func pivotRoot(rootfs string) error { // known to cause issues due to races where we still have a reference to a // mount while a process in the host namespace are trying to operate on // something they think has no mounts (devicemapper in particular). - if err := mount("", ".", "", "", unix.MS_SLAVE|unix.MS_REC, ""); err != nil { + if err := unix.Mount("", ".", "", unix.MS_SLAVE|unix.MS_REC, ""); err != nil { return err } - // Perform the unmount. MNT_DETACH allows us to unmount /proc/self/cwd. - if err := unmount(".", unix.MNT_DETACH); err != nil { + // Preform the unmount. MNT_DETACH allows us to unmount /proc/self/cwd. + if err := unix.Unmount(".", unix.MNT_DETACH); err != nil { return err } // Switch back to our shiny new root. if err := unix.Chdir("/"); err != nil { - return &os.PathError{Op: "chdir", Path: "/", Err: err} + return fmt.Errorf("chdir / %s", err) } return nil } @@ -927,8 +905,8 @@ func msMoveRoot(rootfs string) error { for _, info := range mountinfos { p := info.Mountpoint // Be sure umount events are not propagated to the host. - if err := mount("", p, "", "", unix.MS_SLAVE|unix.MS_REC, ""); err != nil { - if errors.Is(err, unix.ENOENT) { + if err := unix.Mount("", p, "", unix.MS_SLAVE|unix.MS_REC, ""); err != nil { + if err == unix.ENOENT { // If the mountpoint doesn't exist that means that we've // already blasted away some parent directory of the mountpoint // and so we don't care about this error. @@ -936,13 +914,13 @@ func msMoveRoot(rootfs string) error { } return err } - if err := unmount(p, unix.MNT_DETACH); err != nil { - if !errors.Is(err, unix.EINVAL) && !errors.Is(err, unix.EPERM) { + if err := unix.Unmount(p, unix.MNT_DETACH); err != nil { + if err != unix.EINVAL && err != unix.EPERM { return err } else { // If we have not privileges for umounting (e.g. rootless), then // cover the path. - if err := mount("tmpfs", p, "", "tmpfs", 0, ""); err != nil { + if err := unix.Mount("tmpfs", p, "tmpfs", 0, ""); err != nil { return err } } @@ -950,7 +928,7 @@ func msMoveRoot(rootfs string) error { } // Move the rootfs on top of "/" in our mount namespace. - if err := mount(rootfs, "/", "", "", unix.MS_MOVE, ""); err != nil { + if err := unix.Mount(rootfs, "/", "", unix.MS_MOVE, ""); err != nil { return err } return chroot() @@ -958,12 +936,9 @@ func msMoveRoot(rootfs string) error { func chroot() error { if err := unix.Chroot("."); err != nil { - return &os.PathError{Op: "chroot", Path: ".", Err: err} - } - if err := unix.Chdir("/"); err != nil { - return &os.PathError{Op: "chdir", Path: "/", Err: err} + return err } - return nil + return unix.Chdir("/") } // createIfNotExists creates a file or a directory only if it does not already exist. @@ -988,11 +963,11 @@ func createIfNotExists(path string, isDir bool) error { // readonlyPath will make a path read only. func readonlyPath(path string) error { - if err := mount(path, path, "", "", unix.MS_BIND|unix.MS_REC, ""); err != nil { - if errors.Is(err, os.ErrNotExist) { + if err := unix.Mount(path, path, "", unix.MS_BIND|unix.MS_REC, ""); err != nil { + if os.IsNotExist(err) { return nil } - return err + return &os.PathError{Op: "bind-mount", Path: path, Err: err} } var s unix.Statfs_t @@ -1001,8 +976,8 @@ func readonlyPath(path string) error { } flags := uintptr(s.Flags) & (unix.MS_NOSUID | unix.MS_NODEV | unix.MS_NOEXEC) - if err := mount(path, path, "", "", flags|unix.MS_BIND|unix.MS_REMOUNT|unix.MS_RDONLY, ""); err != nil { - return err + if err := unix.Mount(path, path, "", flags|unix.MS_BIND|unix.MS_REMOUNT|unix.MS_RDONLY, ""); err != nil { + return &os.PathError{Op: "bind-mount-ro", Path: path, Err: err} } return nil @@ -1022,12 +997,14 @@ func remountReadonly(m *configs.Mount) error { // nosuid, etc.). So, let's use that case so that we can do // this re-mount without failing in a userns. flags |= unix.MS_REMOUNT | unix.MS_BIND | unix.MS_RDONLY - if err := mount("", dest, "", "", uintptr(flags), ""); err != nil { - if errors.Is(err, unix.EBUSY) { + if err := unix.Mount("", dest, "", uintptr(flags), ""); err != nil { + switch err { + case unix.EBUSY: time.Sleep(100 * time.Millisecond) continue + default: + return err } - return err } return nil } @@ -1040,9 +1017,9 @@ func remountReadonly(m *configs.Mount) error { // For files, maskPath bind mounts /dev/null over the top of the specified path. // For directories, maskPath mounts read-only tmpfs over the top of the specified path. func maskPath(path string, mountLabel string) error { - if err := mount("/dev/null", path, "", "", unix.MS_BIND, ""); err != nil && !errors.Is(err, os.ErrNotExist) { - if errors.Is(err, unix.ENOTDIR) { - return mount("tmpfs", path, "", "tmpfs", unix.MS_RDONLY, label.FormatMountLabel("", mountLabel)) + if err := unix.Mount("/dev/null", path, "", unix.MS_BIND, ""); err != nil && !os.IsNotExist(err) { + if err == unix.ENOTDIR { + return unix.Mount("tmpfs", path, "tmpfs", unix.MS_RDONLY, label.FormatMountLabel("", mountLabel)) } return err } @@ -1053,47 +1030,27 @@ func maskPath(path string, mountLabel string) error { // For e.g. net.ipv4.ip_forward translated to /proc/sys/net/ipv4/ip_forward. func writeSystemProperty(key, value string) error { keyPath := strings.Replace(key, ".", "/", -1) - return os.WriteFile(path.Join("/proc/sys", keyPath), []byte(value), 0o644) + return ioutil.WriteFile(path.Join("/proc/sys", keyPath), []byte(value), 0o644) } -func remount(m *configs.Mount, rootfs string, mountFd *int) error { - source := m.Source - if mountFd != nil { - source = "/proc/self/fd/" + strconv.Itoa(*mountFd) - } - +func remount(m *configs.Mount, rootfs string) error { return utils.WithProcfd(rootfs, m.Destination, func(procfd string) error { - flags := uintptr(m.Flags | unix.MS_REMOUNT) - err := mount(source, m.Destination, procfd, m.Device, flags, "") - if err == nil { - return nil - } - // Check if the source has ro flag... - var s unix.Statfs_t - if err := unix.Statfs(source, &s); err != nil { - return &os.PathError{Op: "statfs", Path: source, Err: err} - } - if s.Flags&unix.MS_RDONLY != unix.MS_RDONLY { - return err - } - // ... and retry the mount with ro flag set. - flags |= unix.MS_RDONLY - return mount(source, m.Destination, procfd, m.Device, flags, "") + return unix.Mount(m.Source, procfd, m.Device, uintptr(m.Flags|unix.MS_REMOUNT), "") }) } // Do the mount operation followed by additional mounts required to take care // of propagation flags. This will always be scoped inside the container rootfs. -func mountPropagate(m *configs.Mount, rootfs string, mountLabel string, mountFd *int) error { +func mountPropagate(m *configs.Mount, rootfs string, mountLabel string) error { var ( data = label.FormatMountLabel(m.Data, mountLabel) flags = m.Flags ) // Delay mounting the filesystem read-only if we need to do further - // operations on it. We need to set up files in "/dev", and other tmpfs - // mounts may need to be chmod-ed after mounting. These mounts will be - // remounted ro later in finalizeRootfs(), if necessary. - if m.Device == "tmpfs" || utils.CleanPath(m.Destination) == "/dev" { + // operations on it. We need to set up files in "/dev" and tmpfs mounts may + // need to be chmod-ed after mounting. The mount will be remounted ro later + // in finalizeRootfs() if necessary. + if libcontainerUtils.CleanPath(m.Destination) == "/dev" || m.Device == "tmpfs" { flags &= ^unix.MS_RDONLY } @@ -1101,22 +1058,17 @@ func mountPropagate(m *configs.Mount, rootfs string, mountLabel string, mountFd // mutating underneath us, we verify that we are actually going to mount // inside the container with WithProcfd() -- mounting through a procfd // mounts on the target. - source := m.Source - if mountFd != nil { - source = "/proc/self/fd/" + strconv.Itoa(*mountFd) - } - if err := utils.WithProcfd(rootfs, m.Destination, func(procfd string) error { - return mount(source, m.Destination, procfd, m.Device, uintptr(flags), data) + return unix.Mount(m.Source, procfd, m.Device, uintptr(flags), data) }); err != nil { - return err + return fmt.Errorf("mount through procfd: %w", err) } // We have to apply mount propagation flags in a separate WithProcfd() call // because the previous call invalidates the passed procfd -- the mount // target needs to be re-opened. if err := utils.WithProcfd(rootfs, m.Destination, func(procfd string) error { for _, pflag := range m.PropagationFlags { - if err := mount("", m.Destination, procfd, "", uintptr(pflag), ""); err != nil { + if err := unix.Mount("", procfd, "", uintptr(pflag), ""); err != nil { return err } } @@ -1126,12 +1078,3 @@ func mountPropagate(m *configs.Mount, rootfs string, mountLabel string, mountFd } return nil } - -func setRecAttr(m *configs.Mount, rootfs string) error { - if m.RecAttr == nil { - return nil - } - return utils.WithProcfd(rootfs, m.Destination, func(procfd string) error { - return unix.MountSetattr(-1, procfd, unix.AT_RECURSIVE, m.RecAttr) - }) -} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/seccomp/config.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/seccomp/config.go index d0c9bb71fb0e..b54b7eead3b7 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/seccomp/config.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/seccomp/config.go @@ -2,7 +2,6 @@ package seccomp import ( "fmt" - "sort" "github.com/opencontainers/runc/libcontainer/configs" ) @@ -17,36 +16,13 @@ var operators = map[string]configs.Operator{ "SCMP_CMP_MASKED_EQ": configs.MaskEqualTo, } -// KnownOperators returns the list of the known operations. -// Used by `runc features`. -func KnownOperators() []string { - var res []string - for k := range operators { - res = append(res, k) - } - sort.Strings(res) - return res -} - var actions = map[string]configs.Action{ - "SCMP_ACT_KILL": configs.Kill, - "SCMP_ACT_ERRNO": configs.Errno, - "SCMP_ACT_TRAP": configs.Trap, - "SCMP_ACT_ALLOW": configs.Allow, - "SCMP_ACT_TRACE": configs.Trace, - "SCMP_ACT_LOG": configs.Log, - "SCMP_ACT_NOTIFY": configs.Notify, -} - -// KnownActions returns the list of the known actions. -// Used by `runc features`. -func KnownActions() []string { - var res []string - for k := range actions { - res = append(res, k) - } - sort.Strings(res) - return res + "SCMP_ACT_KILL": configs.Kill, + "SCMP_ACT_ERRNO": configs.Errno, + "SCMP_ACT_TRAP": configs.Trap, + "SCMP_ACT_ALLOW": configs.Allow, + "SCMP_ACT_TRACE": configs.Trace, + "SCMP_ACT_LOG": configs.Log, } var archs = map[string]string{ @@ -68,17 +44,6 @@ var archs = map[string]string{ "SCMP_ARCH_S390X": "s390x", } -// KnownArchs returns the list of the known archs. -// Used by `runc features`. -func KnownArchs() []string { - var res []string - for k := range archs { - res = append(res, k) - } - sort.Strings(res) - return res -} - // ConvertStringToOperator converts a string into a Seccomp comparison operator. // Comparison operators use the names they are assigned by Libseccomp's header. // Attempting to convert a string that is not a valid operator results in an @@ -91,7 +56,9 @@ func ConvertStringToOperator(in string) (configs.Operator, error) { } // ConvertStringToAction converts a string into a Seccomp rule match action. -// Actions use the names they are assigned in Libseccomp's header. +// Actions use the names they are assigned in Libseccomp's header, though some +// (notable, SCMP_ACT_TRACE) are not available in this implementation and will +// return errors. // Attempting to convert a string that is not a valid action results in an // error. func ConvertStringToAction(in string) (configs.Action, error) { diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/seccomp/patchbpf/enosys_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/seccomp/patchbpf/enosys_linux.go index dfb8a0a8e592..3c6ef7a4c6a5 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/seccomp/patchbpf/enosys_linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/seccomp/patchbpf/enosys_linux.go @@ -1,25 +1,23 @@ -//go:build cgo && seccomp -// +build cgo,seccomp +// +build linux,cgo,seccomp package patchbpf import ( "bytes" "encoding/binary" - "errors" - "fmt" "io" "os" "runtime" "unsafe" + "github.com/opencontainers/runc/libcontainer/configs" + "github.com/opencontainers/runc/libcontainer/utils" + + "github.com/pkg/errors" libseccomp "github.com/seccomp/libseccomp-golang" "github.com/sirupsen/logrus" "golang.org/x/net/bpf" "golang.org/x/sys/unix" - - "github.com/opencontainers/runc/libcontainer/configs" - "github.com/opencontainers/runc/libcontainer/utils" ) // #cgo pkg-config: libseccomp @@ -43,11 +41,6 @@ const uintptr_t C_SET_MODE_FILTER = SECCOMP_SET_MODE_FILTER; #endif const uintptr_t C_FILTER_FLAG_LOG = SECCOMP_FILTER_FLAG_LOG; -#ifndef SECCOMP_FILTER_FLAG_NEW_LISTENER -# define SECCOMP_FILTER_FLAG_NEW_LISTENER (1UL << 3) -#endif -const uintptr_t C_FILTER_FLAG_NEW_LISTENER = SECCOMP_FILTER_FLAG_NEW_LISTENER; - // We use the AUDIT_ARCH_* values because those are the ones used by the kernel // and SCMP_ARCH_* sometimes has fake values (such as SCMP_ARCH_X32). But we // use so we get libseccomp's fallback definitions of AUDIT_ARCH_*. @@ -92,16 +85,17 @@ loop: // seccomp_export_bpf outputs the program in *host* endian-ness. var insn unix.SockFilter if err := binary.Read(rdr, utils.NativeEndian, &insn); err != nil { - if errors.Is(err, io.EOF) { + switch err { + case io.EOF: // Parsing complete. break loop - } - if errors.Is(err, io.ErrUnexpectedEOF) { + case io.ErrUnexpectedEOF: // Parsing stopped mid-instruction. - return nil, fmt.Errorf("program parsing halted mid-instruction: %w", err) + return nil, errors.Wrap(err, "program parsing halted mid-instruction") + default: + // All other errors. + return nil, errors.Wrap(err, "parsing instructions") } - // All other errors. - return nil, fmt.Errorf("error parsing instructions: %w", err) } program = append(program, bpf.RawInstruction{ Op: insn.Code, @@ -116,7 +110,7 @@ loop: func disassembleFilter(filter *libseccomp.ScmpFilter) ([]bpf.Instruction, error) { rdr, wtr, err := os.Pipe() if err != nil { - return nil, fmt.Errorf("error creating scratch pipe: %w", err) + return nil, errors.Wrap(err, "creating scratch pipe") } defer wtr.Close() defer rdr.Close() @@ -130,23 +124,23 @@ func disassembleFilter(filter *libseccomp.ScmpFilter) ([]bpf.Instruction, error) }() if err := filter.ExportBPF(wtr); err != nil { - return nil, fmt.Errorf("error exporting BPF: %w", err) + return nil, errors.Wrap(err, "exporting BPF") } // Close so that the reader actually gets EOF. _ = wtr.Close() if copyErr := <-errChan; copyErr != nil { - return nil, fmt.Errorf("error reading from ExportBPF pipe: %w", copyErr) + return nil, errors.Wrap(copyErr, "reading from ExportBPF pipe") } // Parse the instructions. rawProgram, err := parseProgram(readerBuffer) if err != nil { - return nil, fmt.Errorf("parsing generated BPF filter: %w", err) + return nil, errors.Wrap(err, "parsing generated BPF filter") } program, ok := bpf.Disassemble(rawProgram) if !ok { - return nil, errors.New("could not disassemble entire BPF filter") + return nil, errors.Errorf("could not disassemble entire BPF filter") } return program, nil } @@ -161,7 +155,7 @@ func archToNative(arch libseccomp.ScmpArch) (nativeArch, error) { // Convert to actual native architecture. arch, err := libseccomp.GetNativeArch() if err != nil { - return invalidArch, fmt.Errorf("unable to get native arch: %w", err) + return invalidArch, errors.Wrap(err, "get native arch") } return archToNative(arch) case libseccomp.ArchX86: @@ -198,7 +192,7 @@ func archToNative(arch libseccomp.ScmpArch) (nativeArch, error) { case libseccomp.ArchS390X: return nativeArch(C.C_AUDIT_ARCH_S390X), nil default: - return invalidArch, fmt.Errorf("unknown architecture: %v", arch) + return invalidArch, errors.Errorf("unknown architecture: %v", arch) } } @@ -215,7 +209,7 @@ func findLastSyscalls(config *configs.Seccomp) (lastSyscallMap, error) { for _, ociArch := range config.Architectures { arch, err := libseccomp.GetArchFromString(ociArch) if err != nil { - return nil, fmt.Errorf("unable to validate seccomp architecture: %w", err) + return nil, errors.Wrap(err, "validating seccomp architecture") } // Map native architecture to a real architecture value to avoid @@ -223,7 +217,7 @@ func findLastSyscalls(config *configs.Seccomp) (lastSyscallMap, error) { if arch == libseccomp.ArchNative { nativeArch, err := libseccomp.GetNativeArch() if err != nil { - return nil, fmt.Errorf("unable to get native architecture: %w", err) + return nil, errors.Wrap(err, "get native arch") } arch = nativeArch } @@ -231,7 +225,7 @@ func findLastSyscalls(config *configs.Seccomp) (lastSyscallMap, error) { // Figure out native architecture representation of the architecture. nativeArch, err := archToNative(arch) if err != nil { - return nil, fmt.Errorf("cannot map architecture %v to AUDIT_ARCH_ constant: %w", arch, err) + return nil, errors.Wrapf(err, "cannot map architecture %v to AUDIT_ARCH_ constant", arch) } if _, ok := lastSyscalls[nativeArch]; !ok { @@ -376,7 +370,7 @@ func generateEnosysStub(lastSyscalls lastSyscallMap) ([]bpf.Instruction, error) }, }, sectionTail...) default: - return nil, fmt.Errorf("unknown amd64 native architecture %#x", scmpArch) + return nil, errors.Errorf("unknown amd64 native architecture %#x", scmpArch) } } @@ -384,16 +378,16 @@ func generateEnosysStub(lastSyscalls lastSyscallMap) ([]bpf.Instruction, error) case 2: // x32 and x86_64 are a unique case, we can't handle any others. if uint32(nativeArch) != uint32(C.C_AUDIT_ARCH_X86_64) { - return nil, fmt.Errorf("unknown architecture overlap on native arch %#x", nativeArch) + return nil, errors.Errorf("unknown architecture overlap on native arch %#x", nativeArch) } x32sysno, ok := maxSyscalls[libseccomp.ArchX32] if !ok { - return nil, fmt.Errorf("missing %v in overlapping x86_64 arch: %v", libseccomp.ArchX32, maxSyscalls) + return nil, errors.Errorf("missing %v in overlapping x86_64 arch: %v", libseccomp.ArchX32, maxSyscalls) } x86sysno, ok := maxSyscalls[libseccomp.ArchAMD64] if !ok { - return nil, fmt.Errorf("missing %v in overlapping x86_64 arch: %v", libseccomp.ArchAMD64, maxSyscalls) + return nil, errors.Errorf("missing %v in overlapping x86_64 arch: %v", libseccomp.ArchAMD64, maxSyscalls) } // The x32 ABI indicates that a syscall is being made by an x32 @@ -454,7 +448,7 @@ func generateEnosysStub(lastSyscalls lastSyscallMap) ([]bpf.Instruction, error) }...) } default: - return nil, fmt.Errorf("invalid number of architecture overlaps: %v", len(maxSyscalls)) + return nil, errors.Errorf("invalid number of architecture overlaps: %v", len(maxSyscalls)) } // Prepend this section to the tail. @@ -523,7 +517,7 @@ func generateEnosysStub(lastSyscalls lastSyscallMap) ([]bpf.Instruction, error) func assemble(program []bpf.Instruction) ([]unix.SockFilter, error) { rawProgram, err := bpf.Assemble(program) if err != nil { - return nil, fmt.Errorf("error assembling program: %w", err) + return nil, errors.Wrap(err, "assembling program") } // Convert to []unix.SockFilter for unix.SockFilter. @@ -553,11 +547,11 @@ func generatePatch(config *configs.Seccomp) ([]bpf.Instruction, error) { lastSyscalls, err := findLastSyscalls(config) if err != nil { - return nil, fmt.Errorf("error finding last syscalls for -ENOSYS stub: %w", err) + return nil, errors.Wrap(err, "finding last syscalls for -ENOSYS stub") } stubProgram, err := generateEnosysStub(lastSyscalls) if err != nil { - return nil, fmt.Errorf("error generating -ENOSYS stub: %w", err) + return nil, errors.Wrap(err, "generating -ENOSYS stub") } return stubProgram, nil } @@ -565,12 +559,12 @@ func generatePatch(config *configs.Seccomp) ([]bpf.Instruction, error) { func enosysPatchFilter(config *configs.Seccomp, filter *libseccomp.ScmpFilter) ([]unix.SockFilter, error) { program, err := disassembleFilter(filter) if err != nil { - return nil, fmt.Errorf("error disassembling original filter: %w", err) + return nil, errors.Wrap(err, "disassembling original filter") } patch, err := generatePatch(config) if err != nil { - return nil, fmt.Errorf("error generating patch for filter: %w", err) + return nil, errors.Wrap(err, "generating patch for filter") } fullProgram := append(patch, program...) @@ -582,61 +576,49 @@ func enosysPatchFilter(config *configs.Seccomp, filter *libseccomp.ScmpFilter) ( fprog, err := assemble(fullProgram) if err != nil { - return nil, fmt.Errorf("error assembling modified filter: %w", err) + return nil, errors.Wrap(err, "assembling modified filter") } return fprog, nil } -func filterFlags(config *configs.Seccomp, filter *libseccomp.ScmpFilter) (flags uint, noNewPrivs bool, err error) { +func filterFlags(filter *libseccomp.ScmpFilter) (flags uint, noNewPrivs bool, err error) { // Ignore the error since pre-2.4 libseccomp is treated as API level 0. - apiLevel, _ := libseccomp.GetAPI() + apiLevel, _ := libseccomp.GetApi() noNewPrivs, err = filter.GetNoNewPrivsBit() if err != nil { - return 0, false, fmt.Errorf("unable to fetch no_new_privs filter bit: %w", err) + return 0, false, errors.Wrap(err, "fetch no_new_privs filter bit") } if apiLevel >= 3 { if logBit, err := filter.GetLogBit(); err != nil { - return 0, false, fmt.Errorf("unable to fetch SECCOMP_FILTER_FLAG_LOG bit: %w", err) + return 0, false, errors.Wrap(err, "fetch SECCOMP_FILTER_FLAG_LOG bit") } else if logBit { flags |= uint(C.C_FILTER_FLAG_LOG) } } // TODO: Support seccomp flags not yet added to libseccomp-golang... - - for _, call := range config.Syscalls { - if call.Action == configs.Notify { - flags |= uint(C.C_FILTER_FLAG_NEW_LISTENER) - break - } - } - return } -func sysSeccompSetFilter(flags uint, filter []unix.SockFilter) (fd int, err error) { +func sysSeccompSetFilter(flags uint, filter []unix.SockFilter) (err error) { fprog := unix.SockFprog{ Len: uint16(len(filter)), Filter: &filter[0], } - fd = -1 // only return a valid fd when C_FILTER_FLAG_NEW_LISTENER is set // If no seccomp flags were requested we can use the old-school prctl(2). if flags == 0 { err = unix.Prctl(unix.PR_SET_SECCOMP, unix.SECCOMP_MODE_FILTER, uintptr(unsafe.Pointer(&fprog)), 0, 0) } else { - fdptr, _, errno := unix.RawSyscall(unix.SYS_SECCOMP, + _, _, errno := unix.RawSyscall(unix.SYS_SECCOMP, uintptr(C.C_SET_MODE_FILTER), uintptr(flags), uintptr(unsafe.Pointer(&fprog))) if errno != 0 { err = errno } - if flags&uint(C.C_FILTER_FLAG_NEW_LISTENER) != 0 { - fd = int(fdptr) - } } runtime.KeepAlive(filter) runtime.KeepAlive(fprog) @@ -648,17 +630,17 @@ func sysSeccompSetFilter(flags uint, filter []unix.SockFilter) (fd int, err erro // patches said filter to handle -ENOSYS in a much nicer manner than the // default libseccomp default action behaviour, and loads the patched filter // into the kernel for the current process. -func PatchAndLoad(config *configs.Seccomp, filter *libseccomp.ScmpFilter) (int, error) { +func PatchAndLoad(config *configs.Seccomp, filter *libseccomp.ScmpFilter) error { // Generate a patched filter. fprog, err := enosysPatchFilter(config, filter) if err != nil { - return -1, fmt.Errorf("error patching filter: %w", err) + return errors.Wrap(err, "patching filter") } // Get the set of libseccomp flags set. - seccompFlags, noNewPrivs, err := filterFlags(config, filter) + seccompFlags, noNewPrivs, err := filterFlags(filter) if err != nil { - return -1, fmt.Errorf("unable to fetch seccomp filter flags: %w", err) + return errors.Wrap(err, "fetch seccomp filter flags") } // Set no_new_privs if it was requested, though in runc we handle @@ -666,15 +648,13 @@ func PatchAndLoad(config *configs.Seccomp, filter *libseccomp.ScmpFilter) (int, if noNewPrivs { logrus.Warnf("potentially misconfigured filter -- setting no_new_privs in seccomp path") if err := unix.Prctl(unix.PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); err != nil { - return -1, fmt.Errorf("error enabling no_new_privs bit: %w", err) + return errors.Wrap(err, "enable no_new_privs bit") } } // Finally, load the filter. - fd, err := sysSeccompSetFilter(seccompFlags, fprog) - if err != nil { - return -1, fmt.Errorf("error loading seccomp filter: %w", err) + if err := sysSeccompSetFilter(seccompFlags, fprog); err != nil { + return errors.Wrap(err, "loading seccomp filter") } - - return fd, nil + return nil } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/seccomp/patchbpf/enosys_unsupported.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/seccomp/patchbpf/enosys_unsupported.go index d23167ae3571..682131e49cc6 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/seccomp/patchbpf/enosys_unsupported.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/seccomp/patchbpf/enosys_unsupported.go @@ -1,4 +1,3 @@ -//go:build !linux || !cgo || !seccomp // +build !linux !cgo !seccomp package patchbpf diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/seccomp/seccomp_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/seccomp/seccomp_linux.go index f177b7f05f2f..f80118f2c9bc 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/seccomp/seccomp_linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/seccomp/seccomp_linux.go @@ -1,5 +1,4 @@ -//go:build cgo && seccomp -// +build cgo,seccomp +// +build linux,cgo,seccomp package seccomp @@ -7,16 +6,19 @@ import ( "errors" "fmt" - libseccomp "github.com/seccomp/libseccomp-golang" - "github.com/sirupsen/logrus" - "golang.org/x/sys/unix" - "github.com/opencontainers/runc/libcontainer/configs" "github.com/opencontainers/runc/libcontainer/seccomp/patchbpf" + + libseccomp "github.com/seccomp/libseccomp-golang" + "golang.org/x/sys/unix" ) var ( + actAllow = libseccomp.ActAllow + actTrap = libseccomp.ActTrap + actKill = libseccomp.ActKill actTrace = libseccomp.ActTrace.SetReturnCode(int16(unix.EPERM)) + actLog = libseccomp.ActLog actErrno = libseccomp.ActErrno.SetReturnCode(int16(unix.EPERM)) ) @@ -25,118 +27,77 @@ const ( syscallMaxArguments int = 6 ) -// InitSeccomp installs the seccomp filters to be used in the container as -// specified in config. -// Returns the seccomp file descriptor if any of the filters include a -// SCMP_ACT_NOTIFY action, otherwise returns -1. -func InitSeccomp(config *configs.Seccomp) (int, error) { +// Filters given syscalls in a container, preventing them from being used +// Started in the container init process, and carried over to all child processes +// Setns calls, however, require a separate invocation, as they are not children +// of the init until they join the namespace +func InitSeccomp(config *configs.Seccomp) error { if config == nil { - return -1, errors.New("cannot initialize Seccomp - nil config passed") + return errors.New("cannot initialize Seccomp - nil config passed") } defaultAction, err := getAction(config.DefaultAction, config.DefaultErrnoRet) if err != nil { - return -1, errors.New("error initializing seccomp - invalid default action") - } - - // Ignore the error since pre-2.4 libseccomp is treated as API level 0. - apiLevel, _ := libseccomp.GetAPI() - for _, call := range config.Syscalls { - if call.Action == configs.Notify { - if apiLevel < 6 { - return -1, fmt.Errorf("seccomp notify unsupported: API level: got %d, want at least 6. Please try with libseccomp >= 2.5.0 and Linux >= 5.7", apiLevel) - } - - // We can't allow the write syscall to notify to the seccomp agent. - // After InitSeccomp() is called, we need to syncParentSeccomp() to write the seccomp fd plain - // number, so the parent sends it to the seccomp agent. If we use SCMP_ACT_NOTIFY on write, we - // never can write the seccomp fd to the parent and therefore the seccomp agent never receives - // the seccomp fd and runc is hang during initialization. - // - // Note that read()/close(), that are also used in syncParentSeccomp(), _can_ use SCMP_ACT_NOTIFY. - // Because we write the seccomp fd on the pipe to the parent, the parent is able to proceed and - // send the seccomp fd to the agent (it is another process and not subject to the seccomp - // filter). We will be blocked on read()/close() inside syncParentSeccomp() but if the seccomp - // agent allows those syscalls to proceed, initialization works just fine and the agent can - // handle future read()/close() syscalls as it wanted. - if call.Name == "write" { - return -1, errors.New("SCMP_ACT_NOTIFY cannot be used for the write syscall") - } - } - } - - // See comment on why write is not allowed. The same reason applies, as this can mean handling write too. - if defaultAction == libseccomp.ActNotify { - return -1, errors.New("SCMP_ACT_NOTIFY cannot be used as default action") + return errors.New("error initializing seccomp - invalid default action") } filter, err := libseccomp.NewFilter(defaultAction) if err != nil { - return -1, fmt.Errorf("error creating filter: %w", err) + return fmt.Errorf("error creating filter: %s", err) } // Add extra architectures for _, arch := range config.Architectures { scmpArch, err := libseccomp.GetArchFromString(arch) if err != nil { - return -1, fmt.Errorf("error validating Seccomp architecture: %w", err) + return fmt.Errorf("error validating Seccomp architecture: %s", err) } if err := filter.AddArch(scmpArch); err != nil { - return -1, fmt.Errorf("error adding architecture to seccomp filter: %w", err) + return fmt.Errorf("error adding architecture to seccomp filter: %s", err) } } // Unset no new privs bit if err := filter.SetNoNewPrivsBit(false); err != nil { - return -1, fmt.Errorf("error setting no new privileges: %w", err) + return fmt.Errorf("error setting no new privileges: %s", err) } // Add a rule for each syscall for _, call := range config.Syscalls { if call == nil { - return -1, errors.New("encountered nil syscall while initializing Seccomp") + return errors.New("encountered nil syscall while initializing Seccomp") } - if err := matchCall(filter, call, defaultAction); err != nil { - return -1, err + return err } } - - seccompFd, err := patchbpf.PatchAndLoad(config, filter) - if err != nil { - return -1, fmt.Errorf("error loading seccomp filter into kernel: %w", err) + if err := patchbpf.PatchAndLoad(config, filter); err != nil { + return fmt.Errorf("error loading seccomp filter into kernel: %s", err) } - - return seccompFd, nil + return nil } // Convert Libcontainer Action to Libseccomp ScmpAction func getAction(act configs.Action, errnoRet *uint) (libseccomp.ScmpAction, error) { switch act { case configs.Kill: - return libseccomp.ActKill, nil + return actKill, nil case configs.Errno: if errnoRet != nil { return libseccomp.ActErrno.SetReturnCode(int16(*errnoRet)), nil } return actErrno, nil case configs.Trap: - return libseccomp.ActTrap, nil + return actTrap, nil case configs.Allow: - return libseccomp.ActAllow, nil + return actAllow, nil case configs.Trace: if errnoRet != nil { return libseccomp.ActTrace.SetReturnCode(int16(*errnoRet)), nil } return actTrace, nil case configs.Log: - return libseccomp.ActLog, nil - case configs.Notify: - return libseccomp.ActNotify, nil - case configs.KillThread: - return libseccomp.ActKillThread, nil - case configs.KillProcess: - return libseccomp.ActKillProcess, nil + return actLog, nil default: return libseccomp.ActInvalid, errors.New("invalid action, cannot use in rule") } @@ -201,18 +162,17 @@ func matchCall(filter *libseccomp.ScmpFilter, call *configs.Syscall, defAct libs return nil } - // If we can't resolve the syscall, assume it is not supported - // by this kernel. Warn about it, don't error out. + // If we can't resolve the syscall, assume it's not supported on this kernel + // Ignore it, don't error out callNum, err := libseccomp.GetSyscallFromName(call.Name) if err != nil { - logrus.Debugf("unknown seccomp syscall %q ignored", call.Name) return nil } // Unconditional match - just add the rule if len(call.Args) == 0 { if err := filter.AddRule(callNum, callAct); err != nil { - return fmt.Errorf("error adding seccomp filter rule for syscall %s: %w", call.Name, err) + return fmt.Errorf("error adding seccomp filter rule for syscall %s: %s", call.Name, err) } } else { // If two or more arguments have the same condition, @@ -223,7 +183,7 @@ func matchCall(filter *libseccomp.ScmpFilter, call *configs.Syscall, defAct libs for _, cond := range call.Args { newCond, err := getCondition(cond) if err != nil { - return fmt.Errorf("error creating seccomp syscall condition for syscall %s: %w", call.Name, err) + return fmt.Errorf("error creating seccomp syscall condition for syscall %s: %s", call.Name, err) } argCounts[cond.Index] += 1 @@ -246,14 +206,14 @@ func matchCall(filter *libseccomp.ScmpFilter, call *configs.Syscall, defAct libs condArr := []libseccomp.ScmpCondition{cond} if err := filter.AddRuleConditional(callNum, callAct, condArr); err != nil { - return fmt.Errorf("error adding seccomp rule for syscall %s: %w", call.Name, err) + return fmt.Errorf("error adding seccomp rule for syscall %s: %s", call.Name, err) } } } else { // No conditions share same argument // Use new, proper behavior if err := filter.AddRuleConditional(callNum, callAct, conditions); err != nil { - return fmt.Errorf("error adding seccomp rule for syscall %s: %w", call.Name, err) + return fmt.Errorf("error adding seccomp rule for syscall %s: %s", call.Name, err) } } } @@ -265,6 +225,3 @@ func matchCall(filter *libseccomp.ScmpFilter, call *configs.Syscall, defAct libs func Version() (uint, uint, uint) { return libseccomp.GetLibraryVersion() } - -// Enabled is true if seccomp support is compiled in. -const Enabled = true diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/seccomp/seccomp_unsupported.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/seccomp/seccomp_unsupported.go index be2b324e057e..8b7973e9a13b 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/seccomp/seccomp_unsupported.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/seccomp/seccomp_unsupported.go @@ -1,4 +1,3 @@ -//go:build !linux || !cgo || !seccomp // +build !linux !cgo !seccomp package seccomp @@ -12,17 +11,14 @@ import ( var ErrSeccompNotEnabled = errors.New("seccomp: config provided but seccomp not supported") // InitSeccomp does nothing because seccomp is not supported. -func InitSeccomp(config *configs.Seccomp) (int, error) { +func InitSeccomp(config *configs.Seccomp) error { if config != nil { - return -1, ErrSeccompNotEnabled + return ErrSeccompNotEnabled } - return -1, nil + return nil } // Version returns major, minor, and micro. func Version() (uint, uint, uint) { return 0, 0, 0 } - -// Enabled is true if seccomp support is compiled in. -const Enabled = false diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/setns_init_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/setns_init_linux.go index 09ab552b3d12..2d7e5814e8af 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/setns_init_linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/setns_init_linux.go @@ -1,19 +1,19 @@ +// +build linux + package libcontainer import ( - "errors" - "fmt" "os" - "strconv" - - "github.com/opencontainers/selinux/go-selinux" - "github.com/sirupsen/logrus" - "golang.org/x/sys/unix" + "runtime" "github.com/opencontainers/runc/libcontainer/apparmor" "github.com/opencontainers/runc/libcontainer/keys" "github.com/opencontainers/runc/libcontainer/seccomp" "github.com/opencontainers/runc/libcontainer/system" + "github.com/opencontainers/selinux/go-selinux" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" + "golang.org/x/sys/unix" ) // linuxSetnsInit performs the container's initialization for running a new process @@ -30,6 +30,9 @@ func (l *linuxSetnsInit) getSessionRingName() string { } func (l *linuxSetnsInit) Init() error { + runtime.LockOSThread() + defer runtime.UnlockOSThread() + if !l.config.Config.NoNewKeyring { if err := selinux.SetKeyLabel(l.config.ProcessLabel); err != nil { return err @@ -41,8 +44,8 @@ func (l *linuxSetnsInit) Init() error { // don't bail on ENOSYS. // // TODO(cyphar): And we should have logging here too. - if !errors.Is(err, unix.ENOSYS) { - return fmt.Errorf("unable to join session keyring: %w", err) + if errors.Cause(err) != unix.ENOSYS { + return errors.Wrap(err, "join session keyring") } } } @@ -67,12 +70,7 @@ func (l *linuxSetnsInit) Init() error { // do this before dropping capabilities; otherwise do it as late as possible // just before execve so as few syscalls take place after it as possible. if l.config.Config.Seccomp != nil && !l.config.NoNewPrivileges { - seccompFd, err := seccomp.InitSeccomp(l.config.Config.Seccomp) - if err != nil { - return err - } - - if err := syncParentSeccomp(l.pipe, seccompFd); err != nil { + if err := seccomp.InitSeccomp(l.config.Config.Seccomp); err != nil { return err } } @@ -86,19 +84,14 @@ func (l *linuxSetnsInit) Init() error { // place afterward (reducing the amount of syscalls that users need to // enable in their seccomp profiles). if l.config.Config.Seccomp != nil && l.config.NoNewPrivileges { - seccompFd, err := seccomp.InitSeccomp(l.config.Config.Seccomp) - if err != nil { - return fmt.Errorf("unable to init seccomp: %w", err) - } - - if err := syncParentSeccomp(l.pipe, seccompFd); err != nil { - return err + if err := seccomp.InitSeccomp(l.config.Config.Seccomp); err != nil { + return newSystemErrorWithCause(err, "init seccomp") } } logrus.Debugf("setns_init: about to exec") // Close the log pipe fd so the parent's ForwardLogs can exit. if err := unix.Close(l.logFd); err != nil { - return &os.PathError{Op: "close log pipe", Path: "fd " + strconv.Itoa(l.logFd), Err: err} + return newSystemErrorWithCause(err, "closing log pipe fd") } return system.Execv(l.config.Args[0], l.config.Args[0:], os.Environ()) diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/stacktrace/capture.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/stacktrace/capture.go new file mode 100644 index 000000000000..bfb89157b46f --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/stacktrace/capture.go @@ -0,0 +1,27 @@ +package stacktrace + +import "runtime" + +// Capture captures a stacktrace for the current calling go program +// +// skip is the number of frames to skip +func Capture(userSkip int) Stacktrace { + var ( + skip = userSkip + 1 // add one for our own function + frames []Frame + prevPc uintptr + ) + for i := skip; ; i++ { + pc, file, line, ok := runtime.Caller(i) + // detect if caller is repeated to avoid loop, gccgo + // currently runs into a loop without this check + if !ok || pc == prevPc { + break + } + frames = append(frames, NewFrame(pc, file, line)) + prevPc = pc + } + return Stacktrace{ + Frames: frames, + } +} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/stacktrace/frame.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/stacktrace/frame.go new file mode 100644 index 000000000000..0d590d9a542b --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/stacktrace/frame.go @@ -0,0 +1,38 @@ +package stacktrace + +import ( + "path/filepath" + "runtime" + "strings" +) + +// NewFrame returns a new stack frame for the provided information +func NewFrame(pc uintptr, file string, line int) Frame { + fn := runtime.FuncForPC(pc) + if fn == nil { + return Frame{} + } + pack, name := parseFunctionName(fn.Name()) + return Frame{ + Line: line, + File: filepath.Base(file), + Package: pack, + Function: name, + } +} + +func parseFunctionName(name string) (string, string) { + i := strings.LastIndex(name, ".") + if i == -1 { + return "", name + } + return name[:i], name[i+1:] +} + +// Frame contains all the information for a stack frame within a go program +type Frame struct { + File string + Function string + Package string + Line int +} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/stacktrace/stacktrace.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/stacktrace/stacktrace.go new file mode 100644 index 000000000000..5e8b58d2d28b --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/stacktrace/stacktrace.go @@ -0,0 +1,5 @@ +package stacktrace + +type Stacktrace struct { + Frames []Frame +} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/standard_init_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/standard_init_linux.go index 585a04fa0806..98c4860541e9 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/standard_init_linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/standard_init_linux.go @@ -1,22 +1,23 @@ +// +build linux + package libcontainer import ( - "errors" - "fmt" "os" "os/exec" + "runtime" "strconv" - "github.com/opencontainers/runtime-spec/specs-go" - "github.com/opencontainers/selinux/go-selinux" - "github.com/sirupsen/logrus" - "golang.org/x/sys/unix" - "github.com/opencontainers/runc/libcontainer/apparmor" "github.com/opencontainers/runc/libcontainer/configs" "github.com/opencontainers/runc/libcontainer/keys" "github.com/opencontainers/runc/libcontainer/seccomp" "github.com/opencontainers/runc/libcontainer/system" + "github.com/opencontainers/runtime-spec/specs-go" + "github.com/opencontainers/selinux/go-selinux" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" + "golang.org/x/sys/unix" ) type linuxStandardInit struct { @@ -25,7 +26,6 @@ type linuxStandardInit struct { parentPid int fifoFd int logFd int - mountFds []int config *initConfig } @@ -46,6 +46,8 @@ func (l *linuxStandardInit) getSessionRingParams() (string, uint32, uint32) { } func (l *linuxStandardInit) Init() error { + runtime.LockOSThread() + defer runtime.UnlockOSThread() if !l.config.Config.NoNewKeyring { if err := selinux.SetKeyLabel(l.config.ProcessLabel); err != nil { return err @@ -63,15 +65,15 @@ func (l *linuxStandardInit) Init() error { // // TODO(cyphar): Log this so people know what's going on, once we // have proper logging in 'runc init'. - if !errors.Is(err, unix.ENOSYS) { - return fmt.Errorf("unable to join session keyring: %w", err) + if errors.Cause(err) != unix.ENOSYS { + return errors.Wrap(err, "join session keyring") } } else { - // Make session keyring searchable. If we've gotten this far we + // Make session keyring searcheable. If we've gotten this far we // bail on any error -- we don't want to have a keyring with bad // permissions. if err := keys.ModKeyringPerm(sessKeyId, keepperms, newperms); err != nil { - return fmt.Errorf("unable to mod keyring permissions: %w", err) + return errors.Wrap(err, "mod keyring permissions") } } } @@ -85,23 +87,9 @@ func (l *linuxStandardInit) Init() error { // initialises the labeling system selinux.GetEnabled() - - // We don't need the mountFds after prepareRootfs() nor if it fails. - err := prepareRootfs(l.pipe, l.config, l.mountFds) - for _, m := range l.mountFds { - if m == -1 { - continue - } - - if err := unix.Close(m); err != nil { - return fmt.Errorf("Unable to close mountFds fds: %w", err) - } - } - - if err != nil { + if err := prepareRootfs(l.pipe, l.config); err != nil { return err } - // Set up the console. This has to be done *before* we finalize the rootfs, // but *after* we've given the user the chance to set up all of the mounts // they wanted. @@ -110,7 +98,7 @@ func (l *linuxStandardInit) Init() error { return err } if err := system.Setctty(); err != nil { - return &os.SyscallError{Syscall: "ioctl(setctty)", Err: err} + return errors.Wrap(err, "setctty") } } @@ -123,57 +111,52 @@ func (l *linuxStandardInit) Init() error { if hostname := l.config.Config.Hostname; hostname != "" { if err := unix.Sethostname([]byte(hostname)); err != nil { - return &os.SyscallError{Syscall: "sethostname", Err: err} + return errors.Wrap(err, "sethostname") } } if err := apparmor.ApplyProfile(l.config.AppArmorProfile); err != nil { - return fmt.Errorf("unable to apply apparmor profile: %w", err) + return errors.Wrap(err, "apply apparmor profile") } for key, value := range l.config.Config.Sysctl { if err := writeSystemProperty(key, value); err != nil { - return err + return errors.Wrapf(err, "write sysctl key %s", key) } } for _, path := range l.config.Config.ReadonlyPaths { if err := readonlyPath(path); err != nil { - return fmt.Errorf("can't make %q read-only: %w", path, err) + return errors.Wrapf(err, "readonly path %s", path) } } for _, path := range l.config.Config.MaskPaths { if err := maskPath(path, l.config.Config.MountLabel); err != nil { - return fmt.Errorf("can't mask path %s: %w", path, err) + return errors.Wrapf(err, "mask path %s", path) } } pdeath, err := system.GetParentDeathSignal() if err != nil { - return fmt.Errorf("can't get pdeath signal: %w", err) + return errors.Wrap(err, "get pdeath signal") } if l.config.NoNewPrivileges { if err := unix.Prctl(unix.PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); err != nil { - return &os.SyscallError{Syscall: "prctl(SET_NO_NEW_PRIVS)", Err: err} + return errors.Wrap(err, "set nonewprivileges") } } // Tell our parent that we're ready to Execv. This must be done before the // Seccomp rules have been applied, because we need to be able to read and // write to a socket. if err := syncParentReady(l.pipe); err != nil { - return fmt.Errorf("sync ready: %w", err) + return errors.Wrap(err, "sync ready") } if err := selinux.SetExecLabel(l.config.ProcessLabel); err != nil { - return fmt.Errorf("can't set process label: %w", err) + return errors.Wrap(err, "set process label") } defer selinux.SetExecLabel("") //nolint: errcheck // Without NoNewPrivileges seccomp is a privileged operation, so we need to // do this before dropping capabilities; otherwise do it as late as possible // just before execve so as few syscalls take place after it as possible. if l.config.Config.Seccomp != nil && !l.config.NoNewPrivileges { - seccompFd, err := seccomp.InitSeccomp(l.config.Config.Seccomp) - if err != nil { - return err - } - - if err := syncParentSeccomp(l.pipe, seccompFd); err != nil { + if err := seccomp.InitSeccomp(l.config.Config.Seccomp); err != nil { return err } } @@ -183,7 +166,7 @@ func (l *linuxStandardInit) Init() error { // finalizeNamespace can change user/group which clears the parent death // signal, so we restore it here. if err := pdeath.Restore(); err != nil { - return fmt.Errorf("can't restore pdeath signal: %w", err) + return errors.Wrap(err, "restore pdeath signal") } // Compare the parent from the initial start of the init process and make // sure that it did not change. if the parent changes that means it died @@ -198,43 +181,26 @@ func (l *linuxStandardInit) Init() error { if err != nil { return err } - // Set seccomp as close to execve as possible, so as few syscalls take - // place afterward (reducing the amount of syscalls that users need to - // enable in their seccomp profiles). However, this needs to be done - // before closing the pipe since we need it to pass the seccompFd to - // the parent. - if l.config.Config.Seccomp != nil && l.config.NoNewPrivileges { - seccompFd, err := seccomp.InitSeccomp(l.config.Config.Seccomp) - if err != nil { - return fmt.Errorf("unable to init seccomp: %w", err) - } - - if err := syncParentSeccomp(l.pipe, seccompFd); err != nil { - return err - } - } // Close the pipe to signal that we have completed our init. logrus.Debugf("init: closing the pipe to signal completion") _ = l.pipe.Close() // Close the log pipe fd so the parent's ForwardLogs can exit. if err := unix.Close(l.logFd); err != nil { - return &os.PathError{Op: "close log pipe", Path: "fd " + strconv.Itoa(l.logFd), Err: err} + return newSystemErrorWithCause(err, "closing log pipe fd") } // Wait for the FIFO to be opened on the other side before exec-ing the // user process. We open it through /proc/self/fd/$fd, because the fd that // was given to us was an O_PATH fd to the fifo itself. Linux allows us to // re-open an O_PATH fd through /proc. - fifoPath := "/proc/self/fd/" + strconv.Itoa(l.fifoFd) - fd, err := unix.Open(fifoPath, unix.O_WRONLY|unix.O_CLOEXEC, 0) + fd, err := unix.Open("/proc/self/fd/"+strconv.Itoa(l.fifoFd), unix.O_WRONLY|unix.O_CLOEXEC, 0) if err != nil { - return &os.PathError{Op: "open exec fifo", Path: fifoPath, Err: err} + return newSystemErrorWithCause(err, "open exec fifo") } if _, err := unix.Write(fd, []byte("0")); err != nil { - return &os.PathError{Op: "write exec fifo", Path: fifoPath, Err: err} + return newSystemErrorWithCause(err, "write 0 exec fifo") } - // Close the O_PATH fifofd fd before exec because the kernel resets // dumpable in the wrong order. This has been fixed in newer kernels, but // we keep this to ensure CVE-2016-9962 doesn't re-emerge on older kernels. @@ -242,6 +208,14 @@ func (l *linuxStandardInit) Init() error { // since been resolved. // https://github.com/torvalds/linux/blob/v4.9/fs/exec.c#L1290-L1318 _ = unix.Close(l.fifoFd) + // Set seccomp as close to execve as possible, so as few syscalls take + // place afterward (reducing the amount of syscalls that users need to + // enable in their seccomp profiles). + if l.config.Config.Seccomp != nil && l.config.NoNewPrivileges { + if err := seccomp.InitSeccomp(l.config.Config.Seccomp); err != nil { + return newSystemErrorWithCause(err, "init seccomp") + } + } s := l.config.SpecState s.Pid = unix.Getpid() @@ -250,5 +224,8 @@ func (l *linuxStandardInit) Init() error { return err } - return system.Exec(name, l.config.Args[0:], os.Environ()) + if err := system.Exec(name, l.config.Args[0:], os.Environ()); err != nil { + return newSystemErrorWithCause(err, "exec user process") + } + return nil } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/state_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/state_linux.go index aa6259b157d4..43c040c8573e 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/state_linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/state_linux.go @@ -1,3 +1,5 @@ +// +build linux + package libcontainer import ( @@ -115,7 +117,7 @@ func (r *runningState) transition(s containerState) error { switch s.(type) { case *stoppedState: if r.c.runType() == Running { - return ErrRunning + return newGenericError(fmt.Errorf("container still running"), ContainerNotStopped) } r.c.state = s return nil @@ -130,7 +132,7 @@ func (r *runningState) transition(s containerState) error { func (r *runningState) destroy() error { if r.c.runType() == Running { - return ErrRunning + return newGenericError(fmt.Errorf("container is not destroyed"), ContainerNotStopped) } return destroy(r.c) } @@ -188,7 +190,7 @@ func (p *pausedState) destroy() error { } return destroy(p.c) } - return ErrPaused + return newGenericError(fmt.Errorf("container is paused"), ContainerPaused) } // restoredState is the same as the running state but also has associated checkpoint diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/sync.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/sync.go index c9a23ef3a760..ac88ad22a8ff 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/sync.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/sync.go @@ -13,7 +13,7 @@ type syncType string // Constants that are used for synchronisation between the parent and child // during container setup. They come in pairs (with procError being a generic -// response which is followed by an &initError). +// response which is followed by a &genericError). // // [ child ] <-> [ parent ] // @@ -22,65 +22,40 @@ type syncType string // // procReady --> [final setup] // <-- procRun -// -// procSeccomp --> [pick up seccomp fd with pidfd_getfd()] -// <-- procSeccompDone const ( - procError syncType = "procError" - procReady syncType = "procReady" - procRun syncType = "procRun" - procHooks syncType = "procHooks" - procResume syncType = "procResume" - procSeccomp syncType = "procSeccomp" - procSeccompDone syncType = "procSeccompDone" + procError syncType = "procError" + procReady syncType = "procReady" + procRun syncType = "procRun" + procHooks syncType = "procHooks" + procResume syncType = "procResume" ) type syncT struct { Type syncType `json:"type"` - Fd int `json:"fd"` -} - -// initError is used to wrap errors for passing them via JSON, -// as encoding/json can't unmarshal into error type. -type initError struct { - Message string `json:"message,omitempty"` -} - -func (i initError) Error() string { - return i.Message } // writeSync is used to write to a synchronisation pipe. An error is returned // if there was a problem writing the payload. func writeSync(pipe io.Writer, sync syncType) error { - return writeSyncWithFd(pipe, sync, -1) -} - -// writeSyncWithFd is used to write to a synchronisation pipe. An error is -// returned if there was a problem writing the payload. -func writeSyncWithFd(pipe io.Writer, sync syncType, fd int) error { - if err := utils.WriteJSON(pipe, syncT{sync, fd}); err != nil { - return fmt.Errorf("writing syncT %q: %w", string(sync), err) - } - return nil + return utils.WriteJSON(pipe, syncT{sync}) } // readSync is used to read from a synchronisation pipe. An error is returned -// if we got an initError, the pipe was closed, or we got an unexpected flag. +// if we got a genericError, the pipe was closed, or we got an unexpected flag. func readSync(pipe io.Reader, expected syncType) error { var procSync syncT if err := json.NewDecoder(pipe).Decode(&procSync); err != nil { - if errors.Is(err, io.EOF) { + if err == io.EOF { return errors.New("parent closed synchronisation channel") } - return fmt.Errorf("failed reading error from parent: %w", err) + return fmt.Errorf("failed reading error from parent: %v", err) } if procSync.Type == procError { - var ierr initError + var ierr genericError if err := json.NewDecoder(pipe).Decode(&ierr); err != nil { - return fmt.Errorf("failed reading error from parent: %w", err) + return fmt.Errorf("failed reading error from parent: %v", err) } return &ierr @@ -99,17 +74,17 @@ func parseSync(pipe io.Reader, fn func(*syncT) error) error { for { var sync syncT if err := dec.Decode(&sync); err != nil { - if errors.Is(err, io.EOF) { + if err == io.EOF { break } return err } // We handle this case outside fn for cleanliness reasons. - var ierr *initError + var ierr *genericError if sync.Type == procError { - if err := dec.Decode(&ierr); err != nil && !errors.Is(err, io.EOF) { - return fmt.Errorf("error decoding proc error from init: %w", err) + if err := dec.Decode(&ierr); err != nil && err != io.EOF { + return newSystemErrorWithCause(err, "decoding proc error from init") } if ierr != nil { return ierr diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/system/linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/system/linux.go index e1d6eb18034c..b9fd0832d569 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/system/linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/system/linux.go @@ -1,10 +1,8 @@ -//go:build linux // +build linux package system import ( - "os" "os/exec" "unsafe" @@ -44,11 +42,19 @@ func Exec(cmd string, args []string, env []string) error { for { err := unix.Exec(cmd, args, env) if err != unix.EINTR { //nolint:errorlint // unix errors are bare - return &os.PathError{Op: "exec", Path: cmd, Err: err} + return err } } } +func Prlimit(pid, resource int, limit unix.Rlimit) error { + _, _, err := unix.RawSyscall6(unix.SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(&limit)), uintptr(unsafe.Pointer(&limit)), 0, 0) + if err != 0 { + return err + } + return nil +} + func SetParentDeathSignal(sig uintptr) error { if err := unix.Prctl(unix.PR_SET_PDEATHSIG, sig, 0, 0, 0); err != nil { return err diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/system/proc.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/system/proc.go index 774443ec9d29..d0407cfe42a6 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/system/proc.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/system/proc.go @@ -2,7 +2,7 @@ package system import ( "fmt" - "os" + "io/ioutil" "path/filepath" "strconv" "strings" @@ -19,8 +19,6 @@ const ( // Only values for Linux 3.14 and later are listed here Stopped State = 'T' TracingStop State = 't' Zombie State = 'Z' - Parked State = 'P' - Idle State = 'I' ) // String forms of the state from proc(5)'s documentation for @@ -41,10 +39,6 @@ func (s State) String() string { return "tracing stop" case Zombie: return "zombie" - case Parked: - return "parked" - case Idle: - return "idle" // kernel thread default: return fmt.Sprintf("unknown (%c)", s) } @@ -54,6 +48,9 @@ func (s State) String() string { // described in proc(5) with names based on the /proc/[pid]/status // fields. type Stat_t struct { + // PID is the process ID. + PID uint + // Name is the command run by the process. Name string @@ -67,7 +64,7 @@ type Stat_t struct { // Stat returns a Stat_t instance for the specified process. func Stat(pid int) (stat Stat_t, err error) { - bytes, err := os.ReadFile(filepath.Join("/proc", strconv.Itoa(pid), "stat")) + bytes, err := ioutil.ReadFile(filepath.Join("/proc", strconv.Itoa(pid), "stat")) if err != nil { return stat, err } @@ -75,53 +72,32 @@ func Stat(pid int) (stat Stat_t, err error) { } func parseStat(data string) (stat Stat_t, err error) { - // Example: + // From proc(5), field 2 could contain space and is inside `(` and `)`. + // The following is an example: // 89653 (gunicorn: maste) S 89630 89653 89653 0 -1 4194560 29689 28896 0 3 146 32 76 19 20 0 1 0 2971844 52965376 3920 18446744073709551615 1 1 0 0 0 0 0 16781312 137447943 0 0 0 17 1 0 0 0 0 0 0 0 0 0 0 0 0 0 - // The fields are space-separated, see full description in proc(5). - // - // We are only interested in: - // * field 2: process name. It is the only field enclosed into - // parenthesis, as it can contain spaces (and parenthesis) inside. - // * field 3: process state, a single character (%c) - // * field 22: process start time, a long unsigned integer (%llu). - - // 1. Look for the first '(' and the last ')' first, what's in between is Name. - // We expect at least 20 fields and a space after the last one. - - const minAfterName = 20*2 + 1 // the min field is '0 '. - - first := strings.IndexByte(data, '(') - if first < 0 || first+minAfterName >= len(data) { - return stat, fmt.Errorf("invalid stat data (no comm or too short): %q", data) + i := strings.LastIndex(data, ")") + if i <= 2 || i >= len(data)-1 { + return stat, fmt.Errorf("invalid stat data: %q", data) } - last := strings.LastIndexByte(data, ')') - if last <= first || last+minAfterName >= len(data) { - return stat, fmt.Errorf("invalid stat data (no comm or too short): %q", data) + parts := strings.SplitN(data[:i], "(", 2) + if len(parts) != 2 { + return stat, fmt.Errorf("invalid stat data: %q", data) } - stat.Name = data[first+1 : last] - - // 2. Remove fields 1 and 2 and a space after. State is right after. - data = data[last+2:] - stat.State = State(data[0]) - - // 3. StartTime is field 22, data is at field 3 now, so we need to skip 19 spaces. - skipSpaces := 22 - 3 - for first = 0; skipSpaces > 0 && first < len(data); first++ { - if data[first] == ' ' { - skipSpaces-- - } - } - // Now first points to StartTime; look for space right after. - i := strings.IndexByte(data[first:], ' ') - if i < 0 { - return stat, fmt.Errorf("invalid stat data (too short): %q", data) - } - stat.StartTime, err = strconv.ParseUint(data[first:first+i], 10, 64) + stat.Name = parts[1] + _, err = fmt.Sscanf(parts[0], "%d", &stat.PID) if err != nil { - return stat, fmt.Errorf("invalid stat data (bad start time): %w", err) + return stat, err } + // parts indexes should be offset by 3 from the field number given + // proc(5), because parts is zero-indexed and we've removed fields + // one (PID) and two (Name) in the paren-split. + parts = strings.Split(data[i+2:], " ") + var state int + fmt.Sscanf(parts[3-3], "%c", &state) //nolint:staticcheck // "3-3" is more readable in this context. + stat.State = State(state) + fmt.Sscanf(parts[22-3], "%d", &stat.StartTime) return stat, nil } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_32.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_32.go index 1acc5cb03d03..c5ca5d86235b 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_32.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_32.go @@ -1,4 +1,3 @@ -//go:build linux && (386 || arm) // +build linux // +build 386 arm diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_64.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_64.go index 1ed0dba17093..e05e30adc3ba 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_64.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_64.go @@ -1,4 +1,3 @@ -//go:build linux && (arm64 || amd64 || mips || mipsle || mips64 || mips64le || ppc || ppc64 || ppc64le || riscv64 || s390x) // +build linux // +build arm64 amd64 mips mipsle mips64 mips64le ppc ppc64 ppc64le riscv64 s390x diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/system/xattrs_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/system/xattrs_linux.go new file mode 100644 index 000000000000..a6823fc99b2c --- /dev/null +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/system/xattrs_linux.go @@ -0,0 +1,35 @@ +package system + +import "golang.org/x/sys/unix" + +// Returns a []byte slice if the xattr is set and nil otherwise +// Requires path and its attribute as arguments +func Lgetxattr(path string, attr string) ([]byte, error) { + var sz int + // Start with a 128 length byte array + dest := make([]byte, 128) + sz, errno := unix.Lgetxattr(path, attr, dest) + + switch { + case errno == unix.ENODATA: + return nil, errno + case errno == unix.ENOTSUP: + return nil, errno + case errno == unix.ERANGE: + // 128 byte array might just not be good enough, + // A dummy buffer is used to get the real size + // of the xattrs on disk + sz, errno = unix.Lgetxattr(path, attr, []byte{}) + if errno != nil { + return nil, errno + } + dest = make([]byte, sz) + sz, errno = unix.Lgetxattr(path, attr, dest) + if errno != nil { + return nil, errno + } + case errno != nil: + return nil, errno + } + return dest[:sz], nil +} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/user/lookup_unix.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/user/lookup_unix.go index f95c1409fce0..967717a1b1c5 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/user/lookup_unix.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/user/lookup_unix.go @@ -1,4 +1,3 @@ -//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build darwin dragonfly freebsd linux netbsd openbsd solaris package user diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/user/user.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/user/user.go index 2473c5eaddce..cc7a106be5db 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/user/user.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/user/user.go @@ -120,7 +120,7 @@ func ParsePasswdFileFilter(path string, filter func(User) bool) ([]User, error) func ParsePasswdFilter(r io.Reader, filter func(User) bool) ([]User, error) { if r == nil { - return nil, errors.New("nil source for passwd-formatted data") + return nil, fmt.Errorf("nil source for passwd-formatted data") } var ( @@ -178,7 +178,7 @@ func ParseGroupFileFilter(path string, filter func(Group) bool) ([]Group, error) func ParseGroupFilter(r io.Reader, filter func(Group) bool) ([]Group, error) { if r == nil { - return nil, errors.New("nil source for group-formatted data") + return nil, fmt.Errorf("nil source for group-formatted data") } rd := bufio.NewReader(r) out := []Group{} @@ -339,7 +339,7 @@ func GetExecUser(userSpec string, defaults *ExecUser, passwd, group io.Reader) ( if userArg == "" { userArg = strconv.Itoa(user.Uid) } - return nil, fmt.Errorf("unable to find user %s: %w", userArg, err) + return nil, fmt.Errorf("unable to find user %s: %v", userArg, err) } var matchedUserName string @@ -355,7 +355,7 @@ func GetExecUser(userSpec string, defaults *ExecUser, passwd, group io.Reader) ( if uidErr != nil { // Not numeric. - return nil, fmt.Errorf("unable to find user %s: %w", userArg, ErrNoPasswdEntries) + return nil, fmt.Errorf("unable to find user %s: %v", userArg, ErrNoPasswdEntries) } user.Uid = uidArg @@ -390,7 +390,7 @@ func GetExecUser(userSpec string, defaults *ExecUser, passwd, group io.Reader) ( return g.Name == groupArg }) if err != nil && group != nil { - return nil, fmt.Errorf("unable to find groups for spec %v: %w", matchedUserName, err) + return nil, fmt.Errorf("unable to find groups for spec %v: %v", matchedUserName, err) } // Only start modifying user.Gid if it is in explicit form. @@ -404,7 +404,7 @@ func GetExecUser(userSpec string, defaults *ExecUser, passwd, group io.Reader) ( if gidErr != nil { // Not numeric. - return nil, fmt.Errorf("unable to find group %s: %w", groupArg, ErrNoGroupEntries) + return nil, fmt.Errorf("unable to find group %s: %v", groupArg, ErrNoGroupEntries) } user.Gid = gidArg @@ -445,7 +445,7 @@ func GetAdditionalGroups(additionalGroups []string, group io.Reader) ([]int, err return false }) if err != nil { - return nil, fmt.Errorf("Unable to find additional groups %v: %w", additionalGroups, err) + return nil, fmt.Errorf("Unable to find additional groups %v: %v", additionalGroups, err) } } @@ -468,8 +468,7 @@ func GetAdditionalGroups(additionalGroups []string, group io.Reader) ([]int, err if !found { gid, err := strconv.ParseInt(ag, 10, 64) if err != nil { - // Not a numeric ID either. - return nil, fmt.Errorf("Unable to find group %s: %w", ag, ErrNoGroupEntries) + return nil, fmt.Errorf("Unable to find group %s", ag) } // Ensure gid is inside gid range. if gid < minID || gid > maxID { @@ -522,7 +521,7 @@ func ParseSubIDFileFilter(path string, filter func(SubID) bool) ([]SubID, error) func ParseSubIDFilter(r io.Reader, filter func(SubID) bool) ([]SubID, error) { if r == nil { - return nil, errors.New("nil source for subid-formatted data") + return nil, fmt.Errorf("nil source for subid-formatted data") } var ( @@ -575,7 +574,7 @@ func ParseIDMapFileFilter(path string, filter func(IDMap) bool) ([]IDMap, error) func ParseIDMapFilter(r io.Reader, filter func(IDMap) bool) ([]IDMap, error) { if r == nil { - return nil, errors.New("nil source for idmap-formatted data") + return nil, fmt.Errorf("nil source for idmap-formatted data") } var ( diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/user/user_fuzzer.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/user/user_fuzzer.go index e018eae614e3..8c9bb5df39c2 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/user/user_fuzzer.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/user/user_fuzzer.go @@ -1,4 +1,3 @@ -//go:build gofuzz // +build gofuzz package user diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/userns/userns_fuzzer.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/userns/userns_fuzzer.go index 1e00ab8b5050..529f8eaea2f5 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/userns/userns_fuzzer.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/userns/userns_fuzzer.go @@ -1,4 +1,3 @@ -//go:build gofuzz // +build gofuzz package userns diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/userns/userns_unsupported.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/userns/userns_unsupported.go index f35c13a10e02..f45bb0c31560 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/userns/userns_unsupported.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/userns/userns_unsupported.go @@ -1,4 +1,3 @@ -//go:build !linux // +build !linux package userns diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/utils/cmsg.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/utils/cmsg.go index 7ef9da21fd2d..c8a9364d54d7 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/utils/cmsg.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/utils/cmsg.go @@ -1,3 +1,5 @@ +// +build linux + package utils /* @@ -86,11 +88,6 @@ func SendFd(socket *os.File, name string, fd uintptr) error { if len(name) >= MaxNameLen { return fmt.Errorf("sendfd: filename too long: %s", name) } - return SendFds(socket, []byte(name), int(fd)) -} - -// SendFds sends a list of files descriptor and msg over the given AF_UNIX socket. -func SendFds(socket *os.File, msg []byte, fds ...int) error { - oob := unix.UnixRights(fds...) - return unix.Sendmsg(int(socket.Fd()), msg, oob, nil, 0) + oob := unix.UnixRights(int(fd)) + return unix.Sendmsg(int(socket.Fd()), []byte(name), oob, nil, 0) } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/utils/utils.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/utils/utils.go index 6b9fc343522a..cd78f23e1bd0 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/utils/utils.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/utils/utils.go @@ -11,7 +11,7 @@ import ( "strings" "unsafe" - securejoin "github.com/cyphar/filepath-securejoin" + "github.com/cyphar/filepath-securejoin" "golang.org/x/sys/unix" ) @@ -33,6 +33,16 @@ func init() { } } +// ResolveRootfs ensures that the current working directory is +// not a symlink and returns the absolute path to the rootfs +func ResolveRootfs(uncleanRootfs string) (string, error) { + rootfs, err := filepath.Abs(uncleanRootfs) + if err != nil { + return "", err + } + return filepath.EvalSymlinks(rootfs) +} + // ExitStatus returns the correct exit status for a process based on if it // was signaled or exited cleanly func ExitStatus(status unix.WaitStatus) int { @@ -110,7 +120,7 @@ func WithProcfd(root, unsafePath string, fn func(procfd string) error) error { unsafePath = stripRoot(root, unsafePath) path, err := securejoin.SecureJoin(root, unsafePath) if err != nil { - return fmt.Errorf("resolving path inside rootfs failed: %w", err) + return fmt.Errorf("resolving path inside rootfs failed: %v", err) } // Open the target path. diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/utils/utils_unix.go b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/utils/utils_unix.go index 220d0b439379..1576f2d4ab63 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/utils/utils_unix.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/runc/libcontainer/utils/utils_unix.go @@ -1,4 +1,3 @@ -//go:build !windows // +build !windows package utils @@ -15,7 +14,7 @@ import ( func EnsureProcHandle(fh *os.File) error { var buf unix.Statfs_t if err := unix.Fstatfs(int(fh.Fd()), &buf); err != nil { - return fmt.Errorf("ensure %s is on procfs: %w", fh.Name(), err) + return fmt.Errorf("ensure %s is on procfs: %v", fh.Name(), err) } if buf.Type != unix.PROC_SUPER_MAGIC { return fmt.Errorf("%s is not on procfs", fh.Name()) @@ -53,7 +52,7 @@ func CloseExecFrom(minFd int) error { // Intentionally ignore errors from unix.CloseOnExec -- the cases where // this might fail are basically file descriptors that have already // been closed (including and especially the one that was created when - // os.ReadDir did the "opendir" syscall). + // ioutil.ReadDir did the "opendir" syscall). unix.CloseOnExec(fd) } return nil diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/selinux/go-selinux/label/label_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/selinux/go-selinux/label/label_linux.go index 12de0ae5d65e..b3d142d8c5bf 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/selinux/go-selinux/label/label_linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/selinux/go-selinux/label/label_linux.go @@ -1,13 +1,12 @@ package label import ( - "errors" - "fmt" "os" "os/user" "strings" "github.com/opencontainers/selinux/go-selinux" + "github.com/pkg/errors" ) // Valid Label Options @@ -54,11 +53,11 @@ func InitLabels(options []string) (plabel string, mlabel string, retErr error) { return "", selinux.PrivContainerMountLabel(), nil } if i := strings.Index(opt, ":"); i == -1 { - return "", "", fmt.Errorf("Bad label option %q, valid options 'disable' or \n'user, role, level, type, filetype' followed by ':' and a value", opt) + return "", "", errors.Errorf("Bad label option %q, valid options 'disable' or \n'user, role, level, type, filetype' followed by ':' and a value", opt) } con := strings.SplitN(opt, ":", 2) if !validOptions[con[0]] { - return "", "", fmt.Errorf("Bad label option %q, valid options 'disable, user, role, level, type, filetype'", con[0]) + return "", "", errors.Errorf("Bad label option %q, valid options 'disable, user, role, level, type, filetype'", con[0]) } if con[0] == "filetype" { mcon["type"] = con[1] @@ -103,11 +102,9 @@ func SetFileCreateLabel(fileLabel string) error { return selinux.SetFSCreateLabel(fileLabel) } -// Relabel changes the label of path and all the entries beneath the path. +// Relabel changes the label of path to the filelabel string. // It changes the MCS label to s0 if shared is true. // This will allow all containers to share the content. -// -// The path itself is guaranteed to be relabeled last. func Relabel(path string, fileLabel string, shared bool) error { if !selinux.GetEnabled() || fileLabel == "" { return nil @@ -154,7 +151,7 @@ func Relabel(path string, fileLabel string, shared bool) error { path = strings.TrimSuffix(path, "/") } if exclude_paths[path] { - return fmt.Errorf("SELinux relabeling of %s is not allowed", path) + return errors.Errorf("SELinux relabeling of %s is not allowed", path) } if shared { diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/selinux/go-selinux/rchcon.go b/cluster-autoscaler/vendor/github.com/opencontainers/selinux/go-selinux/rchcon.go deleted file mode 100644 index 897ecbac41ce..000000000000 --- a/cluster-autoscaler/vendor/github.com/opencontainers/selinux/go-selinux/rchcon.go +++ /dev/null @@ -1,22 +0,0 @@ -// +build linux,go1.16 - -package selinux - -import ( - "errors" - "io/fs" - "os" - - "github.com/opencontainers/selinux/pkg/pwalkdir" -) - -func rchcon(fpath, label string) error { - return pwalkdir.Walk(fpath, func(p string, _ fs.DirEntry, _ error) error { - e := setFileLabel(p, label) - // Walk a file tree can race with removal, so ignore ENOENT. - if errors.Is(e, os.ErrNotExist) { - return nil - } - return e - }) -} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/selinux/go-selinux/rchcon_go115.go b/cluster-autoscaler/vendor/github.com/opencontainers/selinux/go-selinux/rchcon_go115.go deleted file mode 100644 index 2c8b033ce058..000000000000 --- a/cluster-autoscaler/vendor/github.com/opencontainers/selinux/go-selinux/rchcon_go115.go +++ /dev/null @@ -1,21 +0,0 @@ -// +build linux,!go1.16 - -package selinux - -import ( - "errors" - "os" - - "github.com/opencontainers/selinux/pkg/pwalk" -) - -func rchcon(fpath, label string) error { - return pwalk.Walk(fpath, func(p string, _ os.FileInfo, _ error) error { - e := setFileLabel(p, label) - // Walk a file tree can race with removal, so ignore ENOENT. - if errors.Is(e, os.ErrNotExist) { - return nil - } - return e - }) -} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/selinux/go-selinux/selinux.go b/cluster-autoscaler/vendor/github.com/opencontainers/selinux/go-selinux/selinux.go index 5a59d151f675..b336ebad3abb 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/selinux/go-selinux/selinux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/selinux/go-selinux/selinux.go @@ -1,7 +1,7 @@ package selinux import ( - "errors" + "github.com/pkg/errors" ) const ( @@ -38,8 +38,6 @@ var ( // CategoryRange allows the upper bound on the category range to be adjusted CategoryRange = DefaultCategoryRange - - privContainerMountLabel string ) // Context is a representation of the SELinux label broken into 4 parts @@ -61,30 +59,16 @@ func ClassIndex(class string) (int, error) { return classIndex(class) } -// SetFileLabel sets the SELinux label for this path, following symlinks, -// or returns an error. +// SetFileLabel sets the SELinux label for this path or returns an error. func SetFileLabel(fpath string, label string) error { return setFileLabel(fpath, label) } -// LsetFileLabel sets the SELinux label for this path, not following symlinks, -// or returns an error. -func LsetFileLabel(fpath string, label string) error { - return lSetFileLabel(fpath, label) -} - -// FileLabel returns the SELinux label for this path, following symlinks, -// or returns an error. +// FileLabel returns the SELinux label for this path or returns an error. func FileLabel(fpath string) (string, error) { return fileLabel(fpath) } -// LfileLabel returns the SELinux label for this path, not following symlinks, -// or returns an error. -func LfileLabel(fpath string) (string, error) { - return lFileLabel(fpath) -} - // SetFSCreateLabel tells the kernel what label to use for all file system objects // created by this task. // Set the label to an empty string to return to the default label. Calls to SetFSCreateLabel @@ -269,8 +253,6 @@ func CopyLevel(src, dest string) (string, error) { // Chcon changes the fpath file object to the SELinux label label. // If fpath is a directory and recurse is true, then Chcon walks the // directory tree setting the label. -// -// The fpath itself is guaranteed to be relabeled last. func Chcon(fpath string, label string, recurse bool) error { return chcon(fpath, label, recurse) } @@ -298,7 +280,5 @@ func GetDefaultContextWithLevel(user, level, scon string) (string, error) { // PrivContainerMountLabel returns mount label for privileged containers func PrivContainerMountLabel() string { - // Make sure label is initialized. - _ = label("") return privContainerMountLabel } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/selinux/go-selinux/selinux_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/selinux/go-selinux/selinux_linux.go index ee602ab96ddc..a91a116f8481 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/selinux/go-selinux/selinux_linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/selinux/go-selinux/selinux_linux.go @@ -5,18 +5,20 @@ import ( "bytes" "crypto/rand" "encoding/binary" - "errors" "fmt" "io" "io/ioutil" - "math/big" "os" "path" "path/filepath" + "regexp" "strconv" "strings" "sync" + "github.com/bits-and-blooms/bitset" + "github.com/opencontainers/selinux/pkg/pwalk" + "github.com/pkg/errors" "golang.org/x/sys/unix" ) @@ -33,6 +35,8 @@ const ( xattrNameSelinux = "security.selinux" ) +var policyRoot = filepath.Join(selinuxDir, readConfig(selinuxTypeTag)) + type selinuxState struct { enabledSet bool enabled bool @@ -44,7 +48,7 @@ type selinuxState struct { type level struct { sens uint - cats *big.Int + cats *bitset.BitSet } type mlsRange struct { @@ -67,6 +71,7 @@ const ( ) var ( + assignRegex = regexp.MustCompile(`^([^=]+)=(.*)$`) readOnlyFileLabel string state = selinuxState{ mcsList: make(map[string]bool), @@ -75,24 +80,8 @@ var ( // for attrPath() attrPathOnce sync.Once haveThreadSelf bool - - // for policyRoot() - policyRootOnce sync.Once - policyRootVal string - - // for label() - loadLabelsOnce sync.Once - labels map[string]string ) -func policyRoot() string { - policyRootOnce.Do(func() { - policyRootVal = filepath.Join(selinuxDir, readConfig(selinuxTypeTag)) - }) - - return policyRootVal -} - func (s *selinuxState) setEnable(enabled bool) bool { s.Lock() defer s.Unlock() @@ -131,7 +120,7 @@ func verifySELinuxfsMount(mnt string) bool { if err == nil { break } - if err == unix.EAGAIN || err == unix.EINTR { //nolint:errorlint // unix errors are bare + if err == unix.EAGAIN || err == unix.EINTR { continue } return false @@ -234,7 +223,7 @@ func readConfig(target string) string { scanner := bufio.NewScanner(in) for scanner.Scan() { - line := bytes.TrimSpace(scanner.Bytes()) + line := strings.TrimSpace(scanner.Text()) if len(line) == 0 { // Skip blank lines continue @@ -243,12 +232,11 @@ func readConfig(target string) string { // Skip comments continue } - fields := bytes.SplitN(line, []byte{'='}, 2) - if len(fields) != 2 { - continue - } - if bytes.Equal(fields[0], []byte(target)) { - return string(bytes.Trim(fields[1], `"`)) + if groups := assignRegex.FindStringSubmatch(line); groups != nil { + key, val := strings.TrimSpace(groups[1]), strings.TrimSpace(groups[2]) + if key == target { + return strings.Trim(val, "\"") + } } } return "" @@ -262,12 +250,12 @@ func isProcHandle(fh *os.File) error { if err == nil { break } - if err != unix.EINTR { //nolint:errorlint // unix errors are bare - return &os.PathError{Op: "fstatfs", Path: fh.Name(), Err: err} + if err != unix.EINTR { + return errors.Wrapf(err, "statfs(%q) failed", fh.Name()) } } if buf.Type != unix.PROC_SUPER_MAGIC { - return fmt.Errorf("file %q is not on procfs", fh.Name()) + return errors.Errorf("file %q is not on procfs", fh.Name()) } return nil @@ -287,15 +275,12 @@ func readCon(fpath string) (string, error) { if err := isProcHandle(in); err != nil { return "", err } - return readConFd(in) -} -func readConFd(in *os.File) (string, error) { - data, err := ioutil.ReadAll(in) - if err != nil { + var retval string + if _, err := fmt.Fscanf(in, "%s", &retval); err != nil { return "", err } - return string(bytes.TrimSuffix(data, []byte{0})), nil + return strings.Trim(retval, "\x00"), nil } // classIndex returns the int index for an object class in the loaded policy, @@ -316,72 +301,33 @@ func classIndex(class string) (int, error) { return index, nil } -// lSetFileLabel sets the SELinux label for this path, not following symlinks, -// or returns an error. -func lSetFileLabel(fpath string, label string) error { - if fpath == "" { - return ErrEmptyPath - } - for { - err := unix.Lsetxattr(fpath, xattrNameSelinux, []byte(label), 0) - if err == nil { - break - } - if err != unix.EINTR { //nolint:errorlint // unix errors are bare - return &os.PathError{Op: "lsetxattr", Path: fpath, Err: err} - } - } - - return nil -} - -// setFileLabel sets the SELinux label for this path, following symlinks, -// or returns an error. +// setFileLabel sets the SELinux label for this path or returns an error. func setFileLabel(fpath string, label string) error { if fpath == "" { return ErrEmptyPath } for { - err := unix.Setxattr(fpath, xattrNameSelinux, []byte(label), 0) + err := unix.Lsetxattr(fpath, xattrNameSelinux, []byte(label), 0) if err == nil { break } - if err != unix.EINTR { //nolint:errorlint // unix errors are bare - return &os.PathError{Op: "setxattr", Path: fpath, Err: err} + if err != unix.EINTR { + return errors.Wrapf(err, "failed to set file label on %s", fpath) } } return nil } -// fileLabel returns the SELinux label for this path, following symlinks, -// or returns an error. +// fileLabel returns the SELinux label for this path or returns an error. func fileLabel(fpath string) (string, error) { if fpath == "" { return "", ErrEmptyPath } - label, err := getxattr(fpath, xattrNameSelinux) - if err != nil { - return "", &os.PathError{Op: "getxattr", Path: fpath, Err: err} - } - // Trim the NUL byte at the end of the byte buffer, if present. - if len(label) > 0 && label[len(label)-1] == '\x00' { - label = label[:len(label)-1] - } - return string(label), nil -} - -// lFileLabel returns the SELinux label for this path, not following symlinks, -// or returns an error. -func lFileLabel(fpath string) (string, error) { - if fpath == "" { - return "", ErrEmptyPath - } - label, err := lgetxattr(fpath, xattrNameSelinux) if err != nil { - return "", &os.PathError{Op: "lgetxattr", Path: fpath, Err: err} + return "", err } // Trim the NUL byte at the end of the byte buffer, if present. if len(label) > 0 && label[len(label)-1] == '\x00' { @@ -444,7 +390,7 @@ func writeCon(fpath, val string) error { _, err = out.Write(nil) } if err != nil { - return err + return errors.Wrapf(err, "failed to set %s on procfs", fpath) } return nil } @@ -494,8 +440,8 @@ func computeCreateContext(source string, target string, class string) (string, e } // catsToBitset stores categories in a bitset. -func catsToBitset(cats string) (*big.Int, error) { - bitset := new(big.Int) +func catsToBitset(cats string) (*bitset.BitSet, error) { + bitset := &bitset.BitSet{} catlist := strings.Split(cats, ",") for _, r := range catlist { @@ -510,14 +456,14 @@ func catsToBitset(cats string) (*big.Int, error) { return nil, err } for i := catstart; i <= catend; i++ { - bitset.SetBit(bitset, int(i), 1) + bitset.Set(i) } } else { cat, err := parseLevelItem(ranges[0], category) if err != nil { return nil, err } - bitset.SetBit(bitset, int(cat), 1) + bitset.Set(cat) } } @@ -543,13 +489,13 @@ func (l *level) parseLevel(levelStr string) error { lvl := strings.SplitN(levelStr, ":", 2) sens, err := parseLevelItem(lvl[0], sensitivity) if err != nil { - return fmt.Errorf("failed to parse sensitivity: %w", err) + return errors.Wrap(err, "failed to parse sensitivity") } l.sens = sens if len(lvl) > 1 { cats, err := catsToBitset(lvl[1]) if err != nil { - return fmt.Errorf("failed to parse categories: %w", err) + return errors.Wrap(err, "failed to parse categories") } l.cats = cats } @@ -567,14 +513,14 @@ func rangeStrToMLSRange(rangeStr string) (*mlsRange, error) { case 2: mlsRange.high = &level{} if err := mlsRange.high.parseLevel(levelSlice[1]); err != nil { - return nil, fmt.Errorf("failed to parse high level %q: %w", levelSlice[1], err) + return nil, errors.Wrapf(err, "failed to parse high level %q", levelSlice[1]) } fallthrough // rangeStr that is single level, e.g. s6:c0,c3,c5,c30.c1023 case 1: mlsRange.low = &level{} if err := mlsRange.low.parseLevel(levelSlice[0]); err != nil { - return nil, fmt.Errorf("failed to parse low level %q: %w", levelSlice[0], err) + return nil, errors.Wrapf(err, "failed to parse low level %q", levelSlice[0]) } } @@ -587,30 +533,37 @@ func rangeStrToMLSRange(rangeStr string) (*mlsRange, error) { // bitsetToStr takes a category bitset and returns it in the // canonical selinux syntax -func bitsetToStr(c *big.Int) string { +func bitsetToStr(c *bitset.BitSet) string { var str string - - length := 0 - for i := int(c.TrailingZeroBits()); i < c.BitLen(); i++ { - if c.Bit(i) == 0 { - continue - } - if length == 0 { + i, e := c.NextSet(0) + len := 0 + for e { + if len == 0 { if str != "" { str += "," } - str += "c" + strconv.Itoa(i) + str += "c" + strconv.Itoa(int(i)) } - if c.Bit(i+1) == 1 { - length++ - continue + + next, e := c.NextSet(i + 1) + if e { + // consecutive cats + if next == i+1 { + len++ + i = next + continue + } } - if length == 1 { - str += ",c" + strconv.Itoa(i) - } else if length > 1 { - str += ".c" + strconv.Itoa(i) + if len == 1 { + str += ",c" + strconv.Itoa(int(i)) + } else if len > 1 { + str += ".c" + strconv.Itoa(int(i)) + } + if !e { + break } - length = 0 + len = 0 + i = next } return str @@ -623,16 +576,13 @@ func (l1 *level) equal(l2 *level) bool { if l1.sens != l2.sens { return false } - if l2.cats == nil || l1.cats == nil { - return l2.cats == l1.cats - } - return l1.cats.Cmp(l2.cats) == 0 + return l1.cats.Equal(l2.cats) } // String returns an mlsRange as a string. func (m mlsRange) String() string { low := "s" + strconv.Itoa(int(m.low.sens)) - if m.low.cats != nil && m.low.cats.BitLen() > 0 { + if m.low.cats != nil && m.low.cats.Count() > 0 { low += ":" + bitsetToStr(m.low.cats) } @@ -641,7 +591,7 @@ func (m mlsRange) String() string { } high := "s" + strconv.Itoa(int(m.high.sens)) - if m.high.cats != nil && m.high.cats.BitLen() > 0 { + if m.high.cats != nil && m.high.cats.Count() > 0 { high += ":" + bitsetToStr(m.high.cats) } @@ -691,12 +641,10 @@ func calculateGlbLub(sourceRange, targetRange string) (string, error) { /* find the intersecting categories */ if s.low.cats != nil && t.low.cats != nil { - outrange.low.cats = new(big.Int) - outrange.low.cats.And(s.low.cats, t.low.cats) + outrange.low.cats = s.low.cats.Intersection(t.low.cats) } if s.high.cats != nil && t.high.cats != nil { - outrange.high.cats = new(big.Int) - outrange.high.cats.And(s.high.cats, t.high.cats) + outrange.high.cats = s.high.cats.Intersection(t.high.cats) } return outrange.String(), nil @@ -717,7 +665,11 @@ func readWriteCon(fpath string, val string) (string, error) { return "", err } - return readConFd(f) + var retval string + if _, err := fmt.Fscanf(f, "%s", &retval); err != nil { + return "", err + } + return strings.Trim(retval, "\x00"), nil } // setExecLabel sets the SELinux label that the kernel will use for any programs @@ -745,21 +697,17 @@ func socketLabel() (string, error) { // peerLabel retrieves the label of the client on the other side of a socket func peerLabel(fd uintptr) (string, error) { - label, err := unix.GetsockoptString(int(fd), unix.SOL_SOCKET, unix.SO_PEERSEC) - if err != nil { - return "", &os.PathError{Op: "getsockopt", Path: "fd " + strconv.Itoa(int(fd)), Err: err} - } - return label, nil + return unix.GetsockoptString(int(fd), unix.SOL_SOCKET, unix.SO_PEERSEC) } // setKeyLabel takes a process label and tells the kernel to assign the // label to the next kernel keyring that gets created func setKeyLabel(label string) error { err := writeCon("/proc/self/attr/keycreate", label) - if errors.Is(err, os.ErrNotExist) { + if os.IsNotExist(errors.Cause(err)) { return nil } - if label == "" && errors.Is(err, os.ErrPermission) { + if label == "" && os.IsPermission(errors.Cause(err)) { return nil } return err @@ -772,10 +720,10 @@ func keyLabel() (string, error) { // get returns the Context as a string func (c Context) get() string { - if level := c["level"]; level != "" { - return c["user"] + ":" + c["role"] + ":" + c["type"] + ":" + level + if c["level"] != "" { + return fmt.Sprintf("%s:%s:%s:%s", c["user"], c["role"], c["type"], c["level"]) } - return c["user"] + ":" + c["role"] + ":" + c["type"] + return fmt.Sprintf("%s:%s:%s", c["user"], c["role"], c["type"]) } // newContext creates a new Context struct from the specified label @@ -836,7 +784,7 @@ func enforceMode() int { // setEnforceMode sets the current SELinux mode Enforcing, Permissive. // Disabled is not valid, since this needs to be set at boot time. func setEnforceMode(mode int) error { - return ioutil.WriteFile(selinuxEnforcePath(), []byte(strconv.Itoa(mode)), 0o644) + return ioutil.WriteFile(selinuxEnforcePath(), []byte(strconv.Itoa(mode)), 0644) } // defaultEnforceMode returns the systems default SELinux mode Enforcing, @@ -940,21 +888,24 @@ func openContextFile() (*os.File, error) { if f, err := os.Open(contextFile); err == nil { return f, nil } - return os.Open(filepath.Join(policyRoot(), "/contexts/lxc_contexts")) + lxcPath := filepath.Join(policyRoot, "/contexts/lxc_contexts") + return os.Open(lxcPath) } -func loadLabels() { - labels = make(map[string]string) +var labels, privContainerMountLabel = loadLabels() + +func loadLabels() (map[string]string, string) { + labels := make(map[string]string) in, err := openContextFile() if err != nil { - return + return labels, "" } defer in.Close() scanner := bufio.NewScanner(in) for scanner.Scan() { - line := bytes.TrimSpace(scanner.Bytes()) + line := strings.TrimSpace(scanner.Text()) if len(line) == 0 { // Skip blank lines continue @@ -963,47 +914,38 @@ func loadLabels() { // Skip comments continue } - fields := bytes.SplitN(line, []byte{'='}, 2) - if len(fields) != 2 { - continue + if groups := assignRegex.FindStringSubmatch(line); groups != nil { + key, val := strings.TrimSpace(groups[1]), strings.TrimSpace(groups[2]) + labels[key] = strings.Trim(val, "\"") } - key, val := bytes.TrimSpace(fields[0]), bytes.TrimSpace(fields[1]) - labels[string(key)] = string(bytes.Trim(val, `"`)) } con, _ := NewContext(labels["file"]) con["level"] = fmt.Sprintf("s0:c%d,c%d", maxCategory-2, maxCategory-1) - privContainerMountLabel = con.get() - reserveLabel(privContainerMountLabel) -} - -func label(key string) string { - loadLabelsOnce.Do(func() { - loadLabels() - }) - return labels[key] + reserveLabel(con.get()) + return labels, con.get() } // kvmContainerLabels returns the default processLabel and mountLabel to be used // for kvm containers by the calling process. func kvmContainerLabels() (string, string) { - processLabel := label("kvm_process") + processLabel := labels["kvm_process"] if processLabel == "" { - processLabel = label("process") + processLabel = labels["process"] } - return addMcs(processLabel, label("file")) + return addMcs(processLabel, labels["file"]) } // initContainerLabels returns the default processLabel and file labels to be // used for containers running an init system like systemd by the calling process. func initContainerLabels() (string, string) { - processLabel := label("init_process") + processLabel := labels["init_process"] if processLabel == "" { - processLabel = label("process") + processLabel = labels["process"] } - return addMcs(processLabel, label("file")) + return addMcs(processLabel, labels["file"]) } // containerLabels returns an allocated processLabel and fileLabel to be used for @@ -1013,9 +955,9 @@ func containerLabels() (processLabel string, fileLabel string) { return "", "" } - processLabel = label("process") - fileLabel = label("file") - readOnlyFileLabel = label("ro_file") + processLabel = labels["process"] + fileLabel = labels["file"] + readOnlyFileLabel = labels["ro_file"] if processLabel == "" || fileLabel == "" { return "", fileLabel @@ -1043,7 +985,7 @@ func addMcs(processLabel, fileLabel string) (string, string) { // securityCheckContext validates that the SELinux label is understood by the kernel func securityCheckContext(val string) error { - return ioutil.WriteFile(path.Join(getSelinuxMountPoint(), "context"), []byte(val), 0o644) + return ioutil.WriteFile(path.Join(getSelinuxMountPoint(), "context"), []byte(val), 0644) } // copyLevel returns a label with the MLS/MCS level from src label replaced on @@ -1081,7 +1023,7 @@ func badPrefix(fpath string) error { badPrefixes := []string{"/usr"} for _, prefix := range badPrefixes { if strings.HasPrefix(fpath, prefix) { - return fmt.Errorf("relabeling content in %s is not allowed", prefix) + return errors.Errorf("relabeling content in %s is not allowed", prefix) } } return nil @@ -1102,10 +1044,17 @@ func chcon(fpath string, label string, recurse bool) error { } if !recurse { - return setFileLabel(fpath, label) + return SetFileLabel(fpath, label) } - return rchcon(fpath, label) + return pwalk.Walk(fpath, func(p string, info os.FileInfo, err error) error { + e := SetFileLabel(p, label) + // Walk a file tree can race with removal, so ignore ENOENT + if os.IsNotExist(errors.Cause(e)) { + return nil + } + return e + }) } // dupSecOpt takes an SELinux process label and returns security options that @@ -1123,8 +1072,7 @@ func dupSecOpt(src string) ([]string, error) { con["type"] == "" { return nil, nil } - dup := []string{ - "user:" + con["user"], + dup := []string{"user:" + con["user"], "role:" + con["role"], "type:" + con["type"], } @@ -1192,8 +1140,9 @@ func findUserInContext(context Context, r io.Reader, verifier func(string) error return outConn, nil } } + if err := scanner.Err(); err != nil { - return "", fmt.Errorf("failed to scan for context: %w", err) + return "", errors.Wrap(err, "failed to scan for context") } return "", nil @@ -1206,7 +1155,7 @@ func getDefaultContextFromReaders(c *defaultSECtx) (string, error) { context, err := newContext(c.scon) if err != nil { - return "", fmt.Errorf("failed to create label for %s: %w", c.scon, err) + return "", errors.Wrapf(err, "failed to create label for %s", c.scon) } // set so the verifier validates the matched context with the provided user and level. @@ -1231,18 +1180,19 @@ func getDefaultContextFromReaders(c *defaultSECtx) (string, error) { return conn, nil } - return "", fmt.Errorf("context %q not found: %w", c.scon, ErrContextMissing) + return "", errors.Wrapf(ErrContextMissing, "context not found: %q", c.scon) } func getDefaultContextWithLevel(user, level, scon string) (string, error) { - userPath := filepath.Join(policyRoot(), selinuxUsersDir, user) + userPath := filepath.Join(policyRoot, selinuxUsersDir, user) + defaultPath := filepath.Join(policyRoot, defaultContexts) + fu, err := os.Open(userPath) if err != nil { return "", err } defer fu.Close() - defaultPath := filepath.Join(policyRoot(), defaultContexts) fd, err := os.Open(defaultPath) if err != nil { return "", err diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/selinux/go-selinux/selinux_stub.go b/cluster-autoscaler/vendor/github.com/opencontainers/selinux/go-selinux/selinux_stub.go index 78743b020c92..b7218a0b6a85 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/selinux/go-selinux/selinux_stub.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/selinux/go-selinux/selinux_stub.go @@ -2,6 +2,8 @@ package selinux +const privContainerMountLabel = "" + func setDisabled() { } @@ -17,18 +19,10 @@ func setFileLabel(fpath string, label string) error { return nil } -func lSetFileLabel(fpath string, label string) error { - return nil -} - func fileLabel(fpath string) (string, error) { return "", nil } -func lFileLabel(fpath string) (string, error) { - return "", nil -} - func setFSCreateLabel(label string) error { return nil } @@ -158,7 +152,3 @@ func disableSecOpt() []string { func getDefaultContextWithLevel(user, level, scon string) (string, error) { return "", nil } - -func label(_ string) string { - return "" -} diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/selinux/go-selinux/xattrs_linux.go b/cluster-autoscaler/vendor/github.com/opencontainers/selinux/go-selinux/xattrs_linux.go index 9e473ca168f1..117c255be201 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/selinux/go-selinux/xattrs_linux.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/selinux/go-selinux/xattrs_linux.go @@ -10,7 +10,7 @@ func lgetxattr(path, attr string) ([]byte, error) { // Start with a 128 length byte array dest := make([]byte, 128) sz, errno := doLgetxattr(path, attr, dest) - for errno == unix.ERANGE { //nolint:errorlint // unix errors are bare + for errno == unix.ERANGE { // Buffer too small, use zero-sized buffer to get the actual size sz, errno = doLgetxattr(path, attr, []byte{}) if errno != nil { @@ -31,40 +31,7 @@ func lgetxattr(path, attr string) ([]byte, error) { func doLgetxattr(path, attr string, dest []byte) (int, error) { for { sz, err := unix.Lgetxattr(path, attr, dest) - if err != unix.EINTR { //nolint:errorlint // unix errors are bare - return sz, err - } - } -} - -// getxattr returns a []byte slice containing the value of -// an extended attribute attr set for path. -func getxattr(path, attr string) ([]byte, error) { - // Start with a 128 length byte array - dest := make([]byte, 128) - sz, errno := dogetxattr(path, attr, dest) - for errno == unix.ERANGE { //nolint:errorlint // unix errors are bare - // Buffer too small, use zero-sized buffer to get the actual size - sz, errno = dogetxattr(path, attr, []byte{}) - if errno != nil { - return nil, errno - } - - dest = make([]byte, sz) - sz, errno = dogetxattr(path, attr, dest) - } - if errno != nil { - return nil, errno - } - - return dest[:sz], nil -} - -// dogetxattr is a wrapper that retries on EINTR -func dogetxattr(path, attr string, dest []byte) (int, error) { - for { - sz, err := unix.Getxattr(path, attr, dest) - if err != unix.EINTR { //nolint:errorlint // unix errors are bare + if err != unix.EINTR { return sz, err } } diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/selinux/pkg/pwalk/README.md b/cluster-autoscaler/vendor/github.com/opencontainers/selinux/pkg/pwalk/README.md index 7e78dce0156b..16c4dfd3ecc7 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/selinux/pkg/pwalk/README.md +++ b/cluster-autoscaler/vendor/github.com/opencontainers/selinux/pkg/pwalk/README.md @@ -8,12 +8,6 @@ By default, it utilizes 2\*runtime.NumCPU() goroutines for callbacks. This can be changed by using WalkN function which has the additional parameter, specifying the number of goroutines (concurrency). -### pwalk vs pwalkdir - -This package is deprecated in favor of -[pwalkdir](https://pkg.go.dev/github.com/opencontainers/selinux/pkg/pwalkdir), -which is faster, but requires at least Go 1.16. - ### Caveats Please note the following limitations of this code: diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/selinux/pkg/pwalk/pwalk.go b/cluster-autoscaler/vendor/github.com/opencontainers/selinux/pkg/pwalk/pwalk.go index 202c80da59c3..437b12b3e289 100644 --- a/cluster-autoscaler/vendor/github.com/opencontainers/selinux/pkg/pwalk/pwalk.go +++ b/cluster-autoscaler/vendor/github.com/opencontainers/selinux/pkg/pwalk/pwalk.go @@ -1,11 +1,12 @@ package pwalk import ( - "fmt" "os" "path/filepath" "runtime" "sync" + + "github.com/pkg/errors" ) type WalkFunc = filepath.WalkFunc @@ -19,7 +20,7 @@ type WalkFunc = filepath.WalkFunc // // Note that this implementation only supports primitive error handling: // -// - no errors are ever passed to walkFn; +// - no errors are ever passed to WalkFn; // // - once a walkFn returns any error, all further processing stops // and the error is returned to the caller of Walk; @@ -41,7 +42,7 @@ func Walk(root string, walkFn WalkFunc) error { func WalkN(root string, walkFn WalkFunc, num int) error { // make sure limit is sensible if num < 1 { - return fmt.Errorf("walk(%q): num must be > 0", root) + return errors.Errorf("walk(%q): num must be > 0", root) } files := make(chan *walkArgs, 2*num) @@ -51,9 +52,6 @@ func WalkN(root string, walkFn WalkFunc, num int) error { var ( err error wg sync.WaitGroup - - rootLen = len(root) - rootEntry *walkArgs ) wg.Add(1) go func() { @@ -62,11 +60,6 @@ func WalkN(root string, walkFn WalkFunc, num int) error { close(files) return err } - if len(p) == rootLen { - // Root entry is processed separately below. - rootEntry = &walkArgs{path: p, info: &info} - return nil - } // add a file to the queue unless a callback sent an error select { case e := <-errCh: @@ -100,14 +93,10 @@ func WalkN(root string, walkFn WalkFunc, num int) error { wg.Wait() - if err == nil { - err = walkFn(rootEntry.path, *rootEntry.info, nil) - } - return err } -// walkArgs holds the arguments that were passed to the Walk or WalkN +// walkArgs holds the arguments that were passed to the Walk or WalkLimit // functions. type walkArgs struct { path string diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/selinux/pkg/pwalkdir/README.md b/cluster-autoscaler/vendor/github.com/opencontainers/selinux/pkg/pwalkdir/README.md deleted file mode 100644 index 068ac400565b..000000000000 --- a/cluster-autoscaler/vendor/github.com/opencontainers/selinux/pkg/pwalkdir/README.md +++ /dev/null @@ -1,54 +0,0 @@ -## pwalkdir: parallel implementation of filepath.WalkDir - -This is a wrapper for [filepath.WalkDir](https://pkg.go.dev/path/filepath#WalkDir) -which may speed it up by calling multiple callback functions (WalkDirFunc) -in parallel, utilizing goroutines. - -By default, it utilizes 2\*runtime.NumCPU() goroutines for callbacks. -This can be changed by using WalkN function which has the additional -parameter, specifying the number of goroutines (concurrency). - -### pwalk vs pwalkdir - -This package is very similar to -[pwalk](https://pkg.go.dev/github.com/opencontainers/selinux/pkg/pwalkdir), -but utilizes `filepath.WalkDir` (added to Go 1.16), which does not call stat(2) -on every entry and is therefore faster (up to 3x, depending on usage scenario). - -Users who are OK with requiring Go 1.16+ should switch to this -implementation. - -### Caveats - -Please note the following limitations of this code: - -* Unlike filepath.WalkDir, the order of calls is non-deterministic; - -* Only primitive error handling is supported: - - * fs.SkipDir is not supported; - - * no errors are ever passed to WalkDirFunc; - - * once any error is returned from any walkDirFunc instance, no more calls - to WalkDirFunc are made, and the error is returned to the caller of WalkDir; - - * if more than one WalkDirFunc instance will return an error, only one - of such errors will be propagated to and returned by WalkDir, others - will be silently discarded. - -### Documentation - -For the official documentation, see -https://pkg.go.dev/github.com/opencontainers/selinux/pkg/pwalkdir - -### Benchmarks - -For a WalkDirFunc that consists solely of the return statement, this -implementation is about 15% slower than the standard library's -filepath.WalkDir. - -Otherwise (if a WalkDirFunc is actually doing something) this is usually -faster, except when the WalkDirN(..., 1) is used. Run `go test -bench .` -to see how different operations can benefit from it, as well as how the -level of paralellism affects the speed. diff --git a/cluster-autoscaler/vendor/github.com/opencontainers/selinux/pkg/pwalkdir/pwalkdir.go b/cluster-autoscaler/vendor/github.com/opencontainers/selinux/pkg/pwalkdir/pwalkdir.go deleted file mode 100644 index a5796b2c4f1c..000000000000 --- a/cluster-autoscaler/vendor/github.com/opencontainers/selinux/pkg/pwalkdir/pwalkdir.go +++ /dev/null @@ -1,116 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -package pwalkdir - -import ( - "fmt" - "io/fs" - "path/filepath" - "runtime" - "sync" -) - -// Walk is a wrapper for filepath.WalkDir which can call multiple walkFn -// in parallel, allowing to handle each item concurrently. A maximum of -// twice the runtime.NumCPU() walkFn will be called at any one time. -// If you want to change the maximum, use WalkN instead. -// -// The order of calls is non-deterministic. -// -// Note that this implementation only supports primitive error handling: -// -// - no errors are ever passed to walkFn; -// -// - once a walkFn returns any error, all further processing stops -// and the error is returned to the caller of Walk; -// -// - filepath.SkipDir is not supported; -// -// - if more than one walkFn instance will return an error, only one -// of such errors will be propagated and returned by Walk, others -// will be silently discarded. -func Walk(root string, walkFn fs.WalkDirFunc) error { - return WalkN(root, walkFn, runtime.NumCPU()*2) -} - -// WalkN is a wrapper for filepath.WalkDir which can call multiple walkFn -// in parallel, allowing to handle each item concurrently. A maximum of -// num walkFn will be called at any one time. -// -// Please see Walk documentation for caveats of using this function. -func WalkN(root string, walkFn fs.WalkDirFunc, num int) error { - // make sure limit is sensible - if num < 1 { - return fmt.Errorf("walk(%q): num must be > 0", root) - } - - files := make(chan *walkArgs, 2*num) - errCh := make(chan error, 1) // Get the first error, ignore others. - - // Start walking a tree asap. - var ( - err error - wg sync.WaitGroup - - rootLen = len(root) - rootEntry *walkArgs - ) - wg.Add(1) - go func() { - err = filepath.WalkDir(root, func(p string, entry fs.DirEntry, err error) error { - if err != nil { - close(files) - return err - } - if len(p) == rootLen { - // Root entry is processed separately below. - rootEntry = &walkArgs{path: p, entry: entry} - return nil - } - // Add a file to the queue unless a callback sent an error. - select { - case e := <-errCh: - close(files) - return e - default: - files <- &walkArgs{path: p, entry: entry} - return nil - } - }) - if err == nil { - close(files) - } - wg.Done() - }() - - wg.Add(num) - for i := 0; i < num; i++ { - go func() { - for file := range files { - if e := walkFn(file.path, file.entry, nil); e != nil { - select { - case errCh <- e: // sent ok - default: // buffer full - } - } - } - wg.Done() - }() - } - - wg.Wait() - - if err == nil { - err = walkFn(rootEntry.path, rootEntry.entry, nil) - } - - return err -} - -// walkArgs holds the arguments that were passed to the Walk or WalkN -// functions. -type walkArgs struct { - path string - entry fs.DirEntry -} diff --git a/cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/.travis.yml b/cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/.travis.yml deleted file mode 100644 index 5240d4622805..000000000000 --- a/cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/.travis.yml +++ /dev/null @@ -1,57 +0,0 @@ -# Travis CI configuration for libseccomp-golang - -# https://docs.travis-ci.com/user/reference/bionic -# https://wiki.ubuntu.com/Releases - -dist: bionic -sudo: false - -notifications: - email: - on_success: always - on_failure: always - -arch: - - amd64 - -os: - - linux - -language: go - -jobs: - include: - - name: "last libseccomp 2.5.0" - env: - - SECCOMP_VER=2.5.0 - - SECCOMP_SHA256SUM=1ffa7038d2720ad191919816db3479295a4bcca1ec14e02f672539f4983014f3 - - name: "compat libseccomp 2.4.4" - env: - - SECCOMP_VER=2.4.4 - - SECCOMP_SHA256SUM=4e79738d1ef3c9b7ca9769f1f8b8d84fc17143c2c1c432e53b9c64787e0ff3eb - - name: "compat libseccomp 2.2.1" - env: - - SECCOMP_VER=2.2.1 - - SECCOMP_SHA256SUM=0ba1789f54786c644af54cdffc9fd0dd0a8bb2b2ee153933f658855d2851a740 - -addons: - apt: - packages: - - build-essential - - astyle - - golint - - gperf - -install: - - go get -u golang.org/x/lint/golint - -# run all of the tests independently, fail if any of the tests error -script: - - wget https://github.com/seccomp/libseccomp/releases/download/v$SECCOMP_VER/libseccomp-$SECCOMP_VER.tar.gz - - echo $SECCOMP_SHA256SUM libseccomp-$SECCOMP_VER.tar.gz | sha256sum -c - - tar xf libseccomp-$SECCOMP_VER.tar.gz - - pushd libseccomp-$SECCOMP_VER && ./configure --prefix=/opt/libseccomp-$SECCOMP_VER && make && sudo make install && popd - - make check-syntax - - make lint - - PKG_CONFIG_PATH=/opt/libseccomp-$SECCOMP_VER/lib/pkgconfig LD_LIBRARY_PATH=/opt/libseccomp-$SECCOMP_VER/lib make vet - - PKG_CONFIG_PATH=/opt/libseccomp-$SECCOMP_VER/lib/pkgconfig LD_LIBRARY_PATH=/opt/libseccomp-$SECCOMP_VER/lib make test diff --git a/cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/Makefile b/cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/Makefile index 38cfa852cd6a..1ff4cc898599 100644 --- a/cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/Makefile +++ b/cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/Makefile @@ -18,14 +18,8 @@ fix-syntax: vet: go vet -v -# Previous bugs have made the tests freeze until the timeout. Golang default -# timeout for tests is 10 minutes, which is too long, considering current tests -# can be executed in less than 1 second. Reduce the timeout, so problems can -# be noticed earlier in the CI. -TEST_TIMEOUT=10s - test: - go test -v -timeout $(TEST_TIMEOUT) + go test -v lint: @$(if $(shell which golint),true,$(error "install golint and include it in your PATH")) diff --git a/cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/README.md b/cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/README similarity index 68% rename from cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/README.md rename to cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/README index 806a5ddf29b7..66839a466855 100644 --- a/cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/README.md +++ b/cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/README @@ -1,8 +1,7 @@ -![libseccomp Golang Bindings](https://github.com/seccomp/libseccomp-artwork/blob/main/logo/libseccomp-color_text.png) +libseccomp-golang: Go Language Bindings for the libseccomp Project =============================================================================== https://github.com/seccomp/libseccomp-golang - -[![Build Status](https://img.shields.io/travis/seccomp/libseccomp-golang/main.svg)](https://travis-ci.org/seccomp/libseccomp-golang) +https://github.com/seccomp/libseccomp The libseccomp library provides an easy to use, platform independent, interface to the Linux Kernel's syscall filtering mechanism. The libseccomp API is @@ -13,39 +12,40 @@ be familiar to, and easily adopted by, application developers. The libseccomp-golang library provides a Go based interface to the libseccomp library. -## Online Resources +* Online Resources The library source repository currently lives on GitHub at the following URLs: -* https://github.com/seccomp/libseccomp-golang -* https://github.com/seccomp/libseccomp + -> https://github.com/seccomp/libseccomp-golang + -> https://github.com/seccomp/libseccomp The project mailing list is currently hosted on Google Groups at the URL below, please note that a Google account is not required to subscribe to the mailing list. -* https://groups.google.com/d/forum/libseccomp + -> https://groups.google.com/d/forum/libseccomp Documentation is also available at: -* https://godoc.org/github.com/seccomp/libseccomp-golang + -> https://godoc.org/github.com/seccomp/libseccomp-golang -## Installing the package +* Installing the package The libseccomp-golang bindings require at least Go v1.2.1 and GCC v4.8.4; earlier versions may yield unpredictable results. If you meet these requirements you can install this package using the command below: - # go get github.com/seccomp/libseccomp-golang + $ go get github.com/seccomp/libseccomp-golang -## Testing the Library +* Testing the Library A number of tests and lint related recipes are provided in the Makefile, if you want to run the standard regression tests, you can excute the following: - # make check + $ make check In order to execute the 'make lint' recipe the 'golint' tool is needed, it can be found at: -* https://github.com/golang/lint + -> https://github.com/golang/lint + diff --git a/cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/CONTRIBUTING.md b/cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/SUBMITTING_PATCHES similarity index 69% rename from cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/CONTRIBUTING.md rename to cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/SUBMITTING_PATCHES index d6862cbd5f9f..744e5cd64f2f 100644 --- a/cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/CONTRIBUTING.md +++ b/cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/SUBMITTING_PATCHES @@ -8,11 +8,11 @@ to the rules described here, but by following the instructions below you should have a much easier time getting your work merged with the upstream project. -## Test Your Code Using Existing Tests +* Test Your Code -There are two possible tests you can run to verify your code. The first -test is used to check the formatting and coding style of your changes, you -can run the test with the following command: +There are two possible tests you can run to verify your code. The first test +is used to check the formatting and coding style of your changes, you can run +the test with the following command: # make check-syntax @@ -27,13 +27,30 @@ with the following command: ... if there are any faults or errors they will be displayed. -## Add New Tests for New Functionality +* Generate the Patch(es) -Any submissions which add functionality, or significantly change the existing -code, should include additional tests to verify the proper operation of the -proposed changes. +Depending on how you decided to work with the libseccomp code base and what +tools you are using there are different ways to generate your patch(es). +However, regardless of what tools you use, you should always generate your +patches using the "unified" diff/patch format and the patches should always +apply to the libseccomp source tree using the following command from the top +directory of the libseccomp sources: -## Explain Your Work + # patch -p1 < changes.patch + +If you are not using git, stacked git (stgit), or some other tool which can +generate patch files for you automatically, you may find the following command +helpful in generating patches, where "libseccomp.orig/" is the unmodified +source code directory and "libseccomp/" is the source code directory with your +changes: + + # diff -purN libseccomp-golang.orig/ libseccomp-golang/ + +When in doubt please generate your patch and try applying it to an unmodified +copy of the libseccomp sources; if it fails for you, it will fail for the rest +of us. + +* Explain Your Work At the top of every patch you should include a description of the problem you are trying to solve, how you solved it, and why you chose the solution you @@ -42,7 +59,7 @@ if you can describe/include a reproducer for the problem in the description as well as instructions on how to test for the bug and verify that it has been fixed. -## Sign Your Work +* Sign Your Work The sign-off is a simple line at the end of the patch description, which certifies that you wrote it or otherwise have the right to pass it on as an @@ -80,49 +97,16 @@ your real name, saying: Signed-off-by: Random J Developer -You can add this to your commit description in `git` with `git commit -s` - -## Post Your Patches Upstream - -The libseccomp project accepts both GitHub pull requests and patches sent via -the mailing list. GitHub pull requests are preferred. This sections below -explain how to contribute via either method. Please read each step and perform -all steps that apply to your chosen contribution method. - -### Submitting via Email - -Depending on how you decided to work with the libseccomp code base and what -tools you are using there are different ways to generate your patch(es). -However, regardless of what tools you use, you should always generate your -patches using the "unified" diff/patch format and the patches should always -apply to the libseccomp source tree using the following command from the top -directory of the libseccomp sources: - - # patch -p1 < changes.patch - -If you are not using git, stacked git (stgit), or some other tool which can -generate patch files for you automatically, you may find the following command -helpful in generating patches, where "libseccomp.orig/" is the unmodified -source code directory and "libseccomp/" is the source code directory with your -changes: - - # diff -purN libseccomp.orig/ libseccomp/ - -When in doubt please generate your patch and try applying it to an unmodified -copy of the libseccomp sources; if it fails for you, it will fail for the rest -of us. +* Email Your Patch(es) Finally, you will need to email your patches to the mailing list so they can -be reviewed and potentially merged into the main libseccomp repository. When -sending patches to the mailing list it is important to send your email in text -form, no HTML mail please, and ensure that your email client does not mangle -your patches. It should be possible to save your raw email to disk and apply -it directly to the libseccomp source code; if that fails then you likely have -a problem with your email client. When in doubt try a test first by sending -yourself an email with your patch and attempting to apply the emailed patch to -the libseccomp repository; if it fails for you, it will fail for the rest of -us trying to test your patch and include it in the main libseccomp repository. - -### Submitting via GitHub - -See [this guide](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request) if you've never done this before. +be reviewed and potentially merged into the main libseccomp-golang repository. +When sending patches to the mailing list it is important to send your email in +text form, no HTML mail please, and ensure that your email client does not +mangle your patches. It should be possible to save your raw email to disk and +apply it directly to the libseccomp source code; if that fails then you likely +have a problem with your email client. When in doubt try a test first by +sending yourself an email with your patch and attempting to apply the emailed +patch to the libseccomp-golang repository; if it fails for you, it will fail +for the rest of us trying to test your patch and include it in the main +libseccomp-golang repository. diff --git a/cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/go.mod b/cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/go.mod deleted file mode 100644 index 6384b3769bd1..000000000000 --- a/cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module github.com/seccomp/libseccomp-golang - -go 1.14 diff --git a/cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/go.sum b/cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/go.sum deleted file mode 100644 index 72ae16111490..000000000000 --- a/cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/go.sum +++ /dev/null @@ -1,23 +0,0 @@ -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7 h1:EBZoQjiKKPaLbPrbpssUfuHtwM6KV/vb4U85g/cigFY= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200313205530-4303120df7d8 h1:gkI/wGGwpcG5W4hLCzZNGxA4wzWBGGDStRI1MrjDl2Q= -golang.org/x/tools v0.0.0-20200313205530-4303120df7d8/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/seccomp.go b/cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/seccomp.go index e9b92e2219ad..a3cc53822ce6 100644 --- a/cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/seccomp.go +++ b/cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/seccomp.go @@ -20,13 +20,6 @@ import ( // C wrapping code -// To compile libseccomp-golang against a specific version of libseccomp: -// cd ../libseccomp && mkdir -p prefix -// ./configure --prefix=$PWD/prefix && make && make install -// cd ../libseccomp-golang -// PKG_CONFIG_PATH=$PWD/../libseccomp/prefix/lib/pkgconfig/ make -// LD_PRELOAD=$PWD/../libseccomp/prefix/lib/libseccomp.so.2.5.0 PKG_CONFIG_PATH=$PWD/../libseccomp/prefix/lib/pkgconfig/ make test - // #cgo pkg-config: libseccomp // #include // #include @@ -41,25 +34,19 @@ type VersionError struct { minimum string } -func init() { - // This forces the cgo libseccomp to initialize its internal API support state, - // which is necessary on older versions of libseccomp in order to work - // correctly. - GetAPI() -} - func (e VersionError) Error() string { - messageStr := "" + format := "Libseccomp version too low: " if e.message != "" { - messageStr = e.message + ": " + format += e.message + ": " } - minimumStr := "" + format += "minimum supported is " if e.minimum != "" { - minimumStr = e.minimum + format += e.minimum + ": " } else { - minimumStr = "2.2.0" + format += "2.2.0: " } - return fmt.Sprintf("Libseccomp version too low: %sminimum supported is %s: detected %d.%d.%d", messageStr, minimumStr, verMajor, verMinor, verMicro) + format += "detected %d.%d.%d" + return fmt.Sprintf(format, verMajor, verMinor, verMicro) } // ScmpArch represents a CPU architecture. Seccomp can restrict syscalls on a @@ -82,61 +69,9 @@ type ScmpCondition struct { Operand2 uint64 `json:"operand_two,omitempty"` } -// Seccomp userspace notification structures associated with filters that use the ActNotify action. - -// ScmpSyscall identifies a Linux System Call by its number. +// ScmpSyscall represents a Linux System Call type ScmpSyscall int32 -// ScmpFd represents a file-descriptor used for seccomp userspace notifications. -type ScmpFd int32 - -// ScmpNotifData describes the system call context that triggered a notification. -// -// Syscall: the syscall number -// Arch: the filter architecture -// InstrPointer: address of the instruction that triggered a notification -// Args: arguments (up to 6) for the syscall -// -type ScmpNotifData struct { - Syscall ScmpSyscall `json:"syscall,omitempty"` - Arch ScmpArch `json:"arch,omitempty"` - InstrPointer uint64 `json:"instr_pointer,omitempty"` - Args []uint64 `json:"args,omitempty"` -} - -// ScmpNotifReq represents a seccomp userspace notification. See NotifReceive() for -// info on how to pull such a notification. -// -// ID: notification ID -// Pid: process that triggered the notification event -// Flags: filter flags (see seccomp(2)) -// Data: system call context that triggered the notification -// -type ScmpNotifReq struct { - ID uint64 `json:"id,omitempty"` - Pid uint32 `json:"pid,omitempty"` - Flags uint32 `json:"flags,omitempty"` - Data ScmpNotifData `json:"data,omitempty"` -} - -// ScmpNotifResp represents a seccomp userspace notification response. See NotifRespond() -// for info on how to push such a response. -// -// ID: notification ID (must match the corresponding ScmpNotifReq ID) -// Error: must be 0 if no error occurred, or an error constant from package -// syscall (e.g., syscall.EPERM, etc). In the latter case, it's used -// as an error return from the syscall that created the notification. -// Val: return value for the syscall that created the notification. Only -// relevant if Error is 0. -// Flags: userspace notification response flag (e.g., NotifRespFlagContinue) -// -type ScmpNotifResp struct { - ID uint64 `json:"id,omitempty"` - Error int32 `json:"error,omitempty"` - Val uint64 `json:"val,omitempty"` - Flags uint32 `json:"flags,omitempty"` -} - // Exported Constants const ( @@ -182,10 +117,6 @@ const ( ArchS390 ScmpArch = iota // ArchS390X represents 64-bit System z/390 syscalls ArchS390X ScmpArch = iota - // ArchPARISC represents 32-bit PA-RISC - ArchPARISC ScmpArch = iota - // ArchPARISC64 represents 64-bit PA-RISC - ArchPARISC64 ScmpArch = iota ) const ( @@ -194,14 +125,10 @@ const ( // ActInvalid is a placeholder to ensure uninitialized ScmpAction // variables are invalid ActInvalid ScmpAction = iota - // ActKill kills the thread that violated the rule. It is the same as ActKillThread. - // All other threads from the same thread group will continue to execute. + // ActKill kills the process ActKill ScmpAction = iota // ActTrap throws SIGSYS ActTrap ScmpAction = iota - // ActNotify triggers a userspace notification. This action is only usable when - // libseccomp API level 6 or higher is supported. - ActNotify ScmpAction = iota // ActErrno causes the syscall to return a negative error code. This // code can be set with the SetReturnCode method ActErrno ScmpAction = iota @@ -214,14 +141,6 @@ const ( // This action is only usable when libseccomp API level 3 or higher is // supported. ActLog ScmpAction = iota - // ActKillThread kills the thread that violated the rule. It is the same as ActKill. - // All other threads from the same thread group will continue to execute. - ActKillThread ScmpAction = iota - // ActKillProcess kills the process that violated the rule. - // All threads in the thread group are also terminated. - // This action is only usable when libseccomp API level 3 or higher is - // supported. - ActKillProcess ScmpAction = iota ) const ( @@ -253,21 +172,6 @@ const ( CompareMaskedEqual ScmpCompareOp = iota ) -var ( - // ErrSyscallDoesNotExist represents an error condition where - // libseccomp is unable to resolve the syscall - ErrSyscallDoesNotExist = fmt.Errorf("could not resolve syscall name") -) - -const ( - // Userspace notification response flags - - // NotifRespFlagContinue tells the kernel to continue executing the system - // call that triggered the notification. Must only be used when the notication - // response's error is 0. - NotifRespFlagContinue uint32 = 1 -) - // Helpers for types // GetArchFromString returns an ScmpArch constant from a string representing an @@ -310,10 +214,6 @@ func GetArchFromString(arch string) (ScmpArch, error) { return ArchS390, nil case "s390x": return ArchS390X, nil - case "parisc": - return ArchPARISC, nil - case "parisc64": - return ArchPARISC64, nil default: return ArchInvalid, fmt.Errorf("cannot convert unrecognized string %q", arch) } @@ -354,10 +254,6 @@ func (a ScmpArch) String() string { return "s390" case ArchS390X: return "s390x" - case ArchPARISC: - return "parisc" - case ArchPARISC64: - return "parisc64" case ArchNative: return "native" case ArchInvalid: @@ -394,10 +290,8 @@ func (a ScmpCompareOp) String() string { // String returns a string representation of a seccomp match action func (a ScmpAction) String() string { switch a & 0xFFFF { - case ActKill, ActKillThread: - return "Action: Kill thread" - case ActKillProcess: - return "Action: Kill process" + case ActKill: + return "Action: Kill Process" case ActTrap: return "Action: Send SIGSYS" case ActErrno: @@ -405,8 +299,6 @@ func (a ScmpAction) String() string { case ActTrace: return fmt.Sprintf("Action: Notify tracing processes with code %d", (a >> 16)) - case ActNotify: - return "Action: Notify userspace" case ActLog: return "Action: Log system call" case ActAllow: @@ -442,23 +334,23 @@ func GetLibraryVersion() (major, minor, micro uint) { return verMajor, verMinor, verMicro } -// GetAPI returns the API level supported by the system. +// GetApi returns the API level supported by the system. // Returns a positive int containing the API level, or 0 with an error if the // API level could not be detected due to the library being older than v2.4.0. // See the seccomp_api_get(3) man page for details on available API levels: -// https://github.com/seccomp/libseccomp/blob/main/doc/man/man3/seccomp_api_get.3 -func GetAPI() (uint, error) { - return getAPI() +// https://github.com/seccomp/libseccomp/blob/master/doc/man/man3/seccomp_api_get.3 +func GetApi() (uint, error) { + return getApi() } -// SetAPI forcibly sets the API level. General use of this function is strongly +// SetApi forcibly sets the API level. General use of this function is strongly // discouraged. // Returns an error if the API level could not be set. An error is always // returned if the library is older than v2.4.0 // See the seccomp_api_get(3) man page for details on available API levels: -// https://github.com/seccomp/libseccomp/blob/main/doc/man/man3/seccomp_api_get.3 -func SetAPI(api uint) error { - return setAPI(api) +// https://github.com/seccomp/libseccomp/blob/master/doc/man/man3/seccomp_api_get.3 +func SetApi(api uint) error { + return setApi(api) } // Syscall functions @@ -483,7 +375,7 @@ func (s ScmpSyscall) GetNameByArch(arch ScmpArch) (string, error) { cString := C.seccomp_syscall_resolve_num_arch(arch.toNative(), C.int(s)) if cString == nil { - return "", ErrSyscallDoesNotExist + return "", fmt.Errorf("could not resolve syscall name for %#x", int32(s)) } defer C.free(unsafe.Pointer(cString)) @@ -506,7 +398,7 @@ func GetSyscallFromName(name string) (ScmpSyscall, error) { result := C.seccomp_syscall_resolve_name(cString) if result == scmpError { - return 0, ErrSyscallDoesNotExist + return 0, fmt.Errorf("could not resolve name to syscall: %q", name) } return ScmpSyscall(result), nil @@ -530,7 +422,7 @@ func GetSyscallFromNameByArch(name string, arch ScmpArch) (ScmpSyscall, error) { result := C.seccomp_syscall_resolve_name_arch(arch.toNative(), cString) if result == scmpError { - return 0, ErrSyscallDoesNotExist + return 0, fmt.Errorf("could not resolve name to syscall: %q on %v", name, arch) } return ScmpSyscall(result), nil @@ -603,10 +495,11 @@ type ScmpFilter struct { lock sync.Mutex } -// NewFilter creates and returns a new filter context. Accepts a default action to be -// taken for syscalls which match no rules in the filter. -// Returns a reference to a valid filter context, or nil and an error -// if the filter context could not be created or an invalid default action was given. +// NewFilter creates and returns a new filter context. +// Accepts a default action to be taken for syscalls which match no rules in +// the filter. +// Returns a reference to a valid filter context, or nil and an error if the +// filter context could not be created or an invalid default action was given. func NewFilter(defaultAction ScmpAction) (*ScmpFilter, error) { if err := ensureSupportedVersion(); err != nil { return nil, err @@ -626,8 +519,8 @@ func NewFilter(defaultAction ScmpAction) (*ScmpFilter, error) { filter.valid = true runtime.SetFinalizer(filter, filterFinalizer) - // Enable TSync so all goroutines will receive the same rules. - // If the kernel does not support TSYNC, allow us to continue without error. + // Enable TSync so all goroutines will receive the same rules + // If the kernel does not support TSYNC, allow us to continue without error if err := filter.setFilterAttr(filterAttrTsync, 0x1); err != nil && err != syscall.ENOTSUP { filter.Release() return nil, fmt.Errorf("could not create filter - error setting tsync bit: %v", err) @@ -659,8 +552,9 @@ func (f *ScmpFilter) Reset(defaultAction ScmpAction) error { return errBadFilter } - if retCode := C.seccomp_reset(f.filterCtx, defaultAction.toNative()); retCode != 0 { - return errRc(retCode) + retCode := C.seccomp_reset(f.filterCtx, defaultAction.toNative()) + if retCode != 0 { + return syscall.Errno(-1 * retCode) } return nil @@ -706,12 +600,11 @@ func (f *ScmpFilter) Merge(src *ScmpFilter) error { } // Merge the filters - if retCode := C.seccomp_merge(f.filterCtx, src.filterCtx); retCode != 0 { - e := errRc(retCode) - if e == syscall.EINVAL { - return fmt.Errorf("filters could not be merged due to a mismatch in attributes or invalid filter") - } - return e + retCode := C.seccomp_merge(f.filterCtx, src.filterCtx) + if syscall.Errno(-1*retCode) == syscall.EINVAL { + return fmt.Errorf("filters could not be merged due to a mismatch in attributes or invalid filter") + } else if retCode != 0 { + return syscall.Errno(-1 * retCode) } src.valid = false @@ -740,13 +633,12 @@ func (f *ScmpFilter) IsArchPresent(arch ScmpArch) (bool, error) { return false, errBadFilter } - if retCode := C.seccomp_arch_exist(f.filterCtx, arch.toNative()); retCode != 0 { - e := errRc(retCode) - if e == syscall.EEXIST { - // -EEXIST is "arch not present" - return false, nil - } - return false, e + retCode := C.seccomp_arch_exist(f.filterCtx, arch.toNative()) + if syscall.Errno(-1*retCode) == syscall.EEXIST { + // -EEXIST is "arch not present" + return false, nil + } else if retCode != 0 { + return false, syscall.Errno(-1 * retCode) } return true, nil @@ -769,10 +661,9 @@ func (f *ScmpFilter) AddArch(arch ScmpArch) error { // Libseccomp returns -EEXIST if the specified architecture is already // present. Succeed silently in this case, as it's not fatal, and the // architecture is present already. - if retCode := C.seccomp_arch_add(f.filterCtx, arch.toNative()); retCode != 0 { - if e := errRc(retCode); e != syscall.EEXIST { - return e - } + retCode := C.seccomp_arch_add(f.filterCtx, arch.toNative()) + if retCode != 0 && syscall.Errno(-1*retCode) != syscall.EEXIST { + return syscall.Errno(-1 * retCode) } return nil @@ -795,10 +686,9 @@ func (f *ScmpFilter) RemoveArch(arch ScmpArch) error { // Similar to AddArch, -EEXIST is returned if the arch is not present // Succeed silently in that case, this is not fatal and the architecture // is not present in the filter after RemoveArch - if retCode := C.seccomp_arch_remove(f.filterCtx, arch.toNative()); retCode != 0 { - if e := errRc(retCode); e != syscall.EEXIST { - return e - } + retCode := C.seccomp_arch_remove(f.filterCtx, arch.toNative()) + if retCode != 0 && syscall.Errno(-1*retCode) != syscall.EEXIST { + return syscall.Errno(-1 * retCode) } return nil @@ -815,7 +705,7 @@ func (f *ScmpFilter) Load() error { } if retCode := C.seccomp_load(f.filterCtx); retCode != 0 { - return errRc(retCode) + return syscall.Errno(-1 * retCode) } return nil @@ -874,9 +764,8 @@ func (f *ScmpFilter) GetNoNewPrivsBit() (bool, error) { func (f *ScmpFilter) GetLogBit() (bool, error) { log, err := f.getFilterAttr(filterAttrLog) if err != nil { - // Ignore error, if not supported returns apiLevel == 0 - apiLevel, _ := GetAPI() - if apiLevel < 3 { + api, apiErr := getApi() + if (apiErr != nil && api == 0) || (apiErr == nil && api < 3) { return false, fmt.Errorf("getting the log bit is only supported in libseccomp 2.4.0 and newer with API level 3 or higher") } @@ -890,30 +779,6 @@ func (f *ScmpFilter) GetLogBit() (bool, error) { return true, nil } -// GetSSB returns the current state the SSB bit will be set to on the filter -// being loaded, or an error if an issue was encountered retrieving the value. -// The SSB bit tells the kernel that a seccomp user is not interested in enabling -// Speculative Store Bypass mitigation. -// The SSB bit is only usable when libseccomp API level 4 or higher is -// supported. -func (f *ScmpFilter) GetSSB() (bool, error) { - ssb, err := f.getFilterAttr(filterAttrSSB) - if err != nil { - api, apiErr := getAPI() - if (apiErr != nil && api == 0) || (apiErr == nil && api < 4) { - return false, fmt.Errorf("getting the SSB flag is only supported in libseccomp 2.5.0 and newer with API level 4 or higher") - } - - return false, err - } - - if ssb == 0 { - return false, nil - } - - return true, nil -} - // SetBadArchAction sets the default action taken on a syscall for an // architecture not in the filter, or an error if an issue was encountered // setting the value. @@ -953,9 +818,8 @@ func (f *ScmpFilter) SetLogBit(state bool) error { err := f.setFilterAttr(filterAttrLog, toSet) if err != nil { - // Ignore error, if not supported returns apiLevel == 0 - apiLevel, _ := GetAPI() - if apiLevel < 3 { + api, apiErr := getApi() + if (apiErr != nil && api == 0) || (apiErr == nil && api < 3) { return fmt.Errorf("setting the log bit is only supported in libseccomp 2.4.0 and newer with API level 3 or higher") } } @@ -963,28 +827,6 @@ func (f *ScmpFilter) SetLogBit(state bool) error { return err } -// SetSSB sets the state of the SSB bit, which will be applied on filter -// load, or an error if an issue was encountered setting the value. -// The SSB bit is only usable when libseccomp API level 4 or higher is -// supported. -func (f *ScmpFilter) SetSSB(state bool) error { - var toSet C.uint32_t = 0x0 - - if state { - toSet = 0x1 - } - - err := f.setFilterAttr(filterAttrSSB, toSet) - if err != nil { - api, apiErr := getAPI() - if (apiErr != nil && api == 0) || (apiErr == nil && api < 4) { - return fmt.Errorf("setting the SSB flag is only supported in libseccomp 2.5.0 and newer with API level 4 or higher") - } - } - - return err -} - // SetSyscallPriority sets a syscall's priority. // This provides a hint to the filter generator in libseccomp about the // importance of this syscall. High-priority syscalls are placed @@ -1000,7 +842,7 @@ func (f *ScmpFilter) SetSyscallPriority(call ScmpSyscall, priority uint8) error if retCode := C.seccomp_syscall_priority(f.filterCtx, C.int(call), C.uint8_t(priority)); retCode != 0 { - return errRc(retCode) + return syscall.Errno(-1 * retCode) } return nil @@ -1065,7 +907,7 @@ func (f *ScmpFilter) ExportPFC(file *os.File) error { } if retCode := C.seccomp_export_pfc(f.filterCtx, C.int(fd)); retCode != 0 { - return errRc(retCode) + return syscall.Errno(-1 * retCode) } return nil @@ -1086,41 +928,8 @@ func (f *ScmpFilter) ExportBPF(file *os.File) error { } if retCode := C.seccomp_export_bpf(f.filterCtx, C.int(fd)); retCode != 0 { - return errRc(retCode) + return syscall.Errno(-1 * retCode) } return nil } - -// Userspace Notification API - -// GetNotifFd returns the userspace notification file descriptor associated with the given -// filter context. Such a file descriptor is only valid after the filter has been loaded -// and only when the filter uses the ActNotify action. The file descriptor can be used to -// retrieve and respond to notifications associated with the filter (see NotifReceive(), -// NotifRespond(), and NotifIDValid()). -func (f *ScmpFilter) GetNotifFd() (ScmpFd, error) { - return f.getNotifFd() -} - -// NotifReceive retrieves a seccomp userspace notification from a filter whose ActNotify -// action has triggered. The caller is expected to process the notification and return a -// response via NotifRespond(). Each invocation of this function returns one -// notification. As multiple notifications may be pending at any time, this function is -// normally called within a polling loop. -func NotifReceive(fd ScmpFd) (*ScmpNotifReq, error) { - return notifReceive(fd) -} - -// NotifRespond responds to a notification retrieved via NotifReceive(). The response Id -// must match that of the corresponding notification retrieved via NotifReceive(). -func NotifRespond(fd ScmpFd, scmpResp *ScmpNotifResp) error { - return notifRespond(fd, scmpResp) -} - -// NotifIDValid checks if a notification is still valid. An return value of nil means the -// notification is still valid. Otherwise the notification is not valid. This can be used -// to mitigate time-of-check-time-of-use (TOCTOU) attacks as described in seccomp_notify_id_valid(2). -func NotifIDValid(fd ScmpFd, id uint64) error { - return notifIDValid(fd, id) -} diff --git a/cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go b/cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go index 8dc7b296f3bc..4e36b27ae806 100644 --- a/cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go +++ b/cluster-autoscaler/vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go @@ -14,13 +14,6 @@ import ( // Get the seccomp header in scope // Need stdlib.h for free() on cstrings -// To compile libseccomp-golang against a specific version of libseccomp: -// cd ../libseccomp && mkdir -p prefix -// ./configure --prefix=$PWD/prefix && make && make install -// cd ../libseccomp-golang -// PKG_CONFIG_PATH=$PWD/../libseccomp/prefix/lib/pkgconfig/ make -// LD_PRELOAD=$PWD/../libseccomp/prefix/lib/libseccomp.so.2.5.0 PKG_CONFIG_PATH=$PWD/../libseccomp/prefix/lib/pkgconfig/ make test - // #cgo pkg-config: libseccomp /* #include @@ -57,14 +50,6 @@ const uint32_t C_ARCH_BAD = ARCH_BAD; #define SCMP_ARCH_S390X ARCH_BAD #endif -#ifndef SCMP_ARCH_PARISC -#define SCMP_ARCH_PARISC ARCH_BAD -#endif - -#ifndef SCMP_ARCH_PARISC64 -#define SCMP_ARCH_PARISC64 ARCH_BAD -#endif - const uint32_t C_ARCH_NATIVE = SCMP_ARCH_NATIVE; const uint32_t C_ARCH_X86 = SCMP_ARCH_X86; const uint32_t C_ARCH_X86_64 = SCMP_ARCH_X86_64; @@ -82,34 +67,17 @@ const uint32_t C_ARCH_PPC64 = SCMP_ARCH_PPC64; const uint32_t C_ARCH_PPC64LE = SCMP_ARCH_PPC64LE; const uint32_t C_ARCH_S390 = SCMP_ARCH_S390; const uint32_t C_ARCH_S390X = SCMP_ARCH_S390X; -const uint32_t C_ARCH_PARISC = SCMP_ARCH_PARISC; -const uint32_t C_ARCH_PARISC64 = SCMP_ARCH_PARISC64; #ifndef SCMP_ACT_LOG #define SCMP_ACT_LOG 0x7ffc0000U #endif -#ifndef SCMP_ACT_KILL_PROCESS -#define SCMP_ACT_KILL_PROCESS 0x80000000U -#endif - -#ifndef SCMP_ACT_KILL_THREAD -#define SCMP_ACT_KILL_THREAD 0x00000000U -#endif - -#ifndef SCMP_ACT_NOTIFY -#define SCMP_ACT_NOTIFY 0x7fc00000U -#endif - const uint32_t C_ACT_KILL = SCMP_ACT_KILL; -const uint32_t C_ACT_KILL_PROCESS = SCMP_ACT_KILL_PROCESS; -const uint32_t C_ACT_KILL_THREAD = SCMP_ACT_KILL_THREAD; const uint32_t C_ACT_TRAP = SCMP_ACT_TRAP; const uint32_t C_ACT_ERRNO = SCMP_ACT_ERRNO(0); const uint32_t C_ACT_TRACE = SCMP_ACT_TRACE(0); const uint32_t C_ACT_LOG = SCMP_ACT_LOG; const uint32_t C_ACT_ALLOW = SCMP_ACT_ALLOW; -const uint32_t C_ACT_NOTIFY = SCMP_ACT_NOTIFY; // The libseccomp SCMP_FLTATR_CTL_LOG member of the scmp_filter_attr enum was // added in v2.4.0 @@ -117,16 +85,12 @@ const uint32_t C_ACT_NOTIFY = SCMP_ACT_NOTIFY; (SCMP_VER_MAJOR == 2 && SCMP_VER_MINOR < 4) #define SCMP_FLTATR_CTL_LOG _SCMP_FLTATR_MIN #endif -#if SCMP_VER_MAJOR == 2 && SCMP_VER_MINOR < 5 -#define SCMP_FLTATR_CTL_SSB _SCMP_FLTATR_MIN -#endif const uint32_t C_ATTRIBUTE_DEFAULT = (uint32_t)SCMP_FLTATR_ACT_DEFAULT; const uint32_t C_ATTRIBUTE_BADARCH = (uint32_t)SCMP_FLTATR_ACT_BADARCH; const uint32_t C_ATTRIBUTE_NNP = (uint32_t)SCMP_FLTATR_CTL_NNP; const uint32_t C_ATTRIBUTE_TSYNC = (uint32_t)SCMP_FLTATR_CTL_TSYNC; const uint32_t C_ATTRIBUTE_LOG = (uint32_t)SCMP_FLTATR_CTL_LOG; -const uint32_t C_ATTRIBUTE_SSB = (uint32_t)SCMP_FLTATR_CTL_SSB; const int C_CMP_NE = (int)SCMP_CMP_NE; const int C_CMP_LT = (int)SCMP_CMP_LT; @@ -215,51 +179,6 @@ void add_struct_arg_cmp( return; } - -// The seccomp notify API functions were added in v2.5.0 -#if (SCMP_VER_MAJOR < 2) || \ - (SCMP_VER_MAJOR == 2 && SCMP_VER_MINOR < 5) - -struct seccomp_data { - int nr; - __u32 arch; - __u64 instruction_pointer; - __u64 args[6]; -}; - -struct seccomp_notif { - __u64 id; - __u32 pid; - __u32 flags; - struct seccomp_data data; -}; - -struct seccomp_notif_resp { - __u64 id; - __s64 val; - __s32 error; - __u32 flags; -}; - -int seccomp_notify_alloc(struct seccomp_notif **req, struct seccomp_notif_resp **resp) { - return -EOPNOTSUPP; -} -int seccomp_notify_fd(const scmp_filter_ctx ctx) { - return -EOPNOTSUPP; -} -void seccomp_notify_free(struct seccomp_notif *req, struct seccomp_notif_resp *resp) { -} -int seccomp_notify_id_valid(int fd, uint64_t id) { - return -EOPNOTSUPP; -} -int seccomp_notify_receive(int fd, struct seccomp_notif *req) { - return -EOPNOTSUPP; -} -int seccomp_notify_respond(int fd, struct seccomp_notif_resp *resp) { - return -EOPNOTSUPP; -} - -#endif */ import "C" @@ -274,7 +193,6 @@ const ( filterAttrNNP scmpFilterAttr = iota filterAttrTsync scmpFilterAttr = iota filterAttrLog scmpFilterAttr = iota - filterAttrSSB scmpFilterAttr = iota ) const ( @@ -282,10 +200,10 @@ const ( scmpError C.int = -1 // Comparison boundaries to check for architecture validity archStart ScmpArch = ArchNative - archEnd ScmpArch = ArchPARISC64 + archEnd ScmpArch = ArchS390X // Comparison boundaries to check for action validity actionStart ScmpAction = ActKill - actionEnd ScmpAction = ActKillProcess + actionEnd ScmpAction = ActLog // Comparison boundaries to check for comparison operator validity compareOpStart ScmpCompareOp = CompareNotEqual compareOpEnd ScmpCompareOp = CompareMaskedEqual @@ -318,7 +236,7 @@ func ensureSupportedVersion() error { } // Get the API level -func getAPI() (uint, error) { +func getApi() (uint, error) { api := C.seccomp_api_get() if api == 0 { return 0, fmt.Errorf("API level operations are not supported") @@ -328,9 +246,9 @@ func getAPI() (uint, error) { } // Set the API level -func setAPI(api uint) error { +func setApi(api uint) error { if retCode := C.seccomp_api_set(C.uint(api)); retCode != 0 { - if errRc(retCode) == syscall.EOPNOTSUPP { + if syscall.Errno(-1*retCode) == syscall.EOPNOTSUPP { return fmt.Errorf("API level operations are not supported") } @@ -347,10 +265,6 @@ func filterFinalizer(f *ScmpFilter) { f.Release() } -func errRc(rc C.int) error { - return syscall.Errno(-1 * rc) -} - // Get a raw filter attribute func (f *ScmpFilter) getFilterAttr(attr scmpFilterAttr) (C.uint32_t, error) { f.lock.Lock() @@ -364,7 +278,7 @@ func (f *ScmpFilter) getFilterAttr(attr scmpFilterAttr) (C.uint32_t, error) { retCode := C.seccomp_attr_get(f.filterCtx, attr.toNative(), &attribute) if retCode != 0 { - return 0x0, errRc(retCode) + return 0x0, syscall.Errno(-1 * retCode) } return attribute, nil @@ -381,7 +295,7 @@ func (f *ScmpFilter) setFilterAttr(attr scmpFilterAttr, value C.uint32_t) error retCode := C.seccomp_attr_set(f.filterCtx, attr.toNative(), value) if retCode != 0 { - return errRc(retCode) + return syscall.Errno(-1 * retCode) } return nil @@ -402,17 +316,14 @@ func (f *ScmpFilter) addRuleWrapper(call ScmpSyscall, action ScmpAction, exact b retCode = C.seccomp_rule_add_array(f.filterCtx, action.toNative(), C.int(call), length, cond) } - if retCode != 0 { - switch e := errRc(retCode); e { - case syscall.EFAULT: - return fmt.Errorf("unrecognized syscall %#x", int32(call)) - case syscall.EPERM: - return fmt.Errorf("requested action matches default action of filter") - case syscall.EINVAL: - return fmt.Errorf("two checks on same syscall argument") - default: - return e - } + if syscall.Errno(-1*retCode) == syscall.EFAULT { + return fmt.Errorf("unrecognized syscall %#x", int32(call)) + } else if syscall.Errno(-1*retCode) == syscall.EPERM { + return fmt.Errorf("requested action matches default action of filter") + } else if syscall.Errno(-1*retCode) == syscall.EINVAL { + return fmt.Errorf("two checks on same syscall argument") + } else if retCode != 0 { + return syscall.Errno(-1 * retCode) } return nil @@ -532,10 +443,6 @@ func archFromNative(a C.uint32_t) (ScmpArch, error) { return ArchS390, nil case C.C_ARCH_S390X: return ArchS390X, nil - case C.C_ARCH_PARISC: - return ArchPARISC, nil - case C.C_ARCH_PARISC64: - return ArchPARISC64, nil default: return 0x0, fmt.Errorf("unrecognized architecture %#x", uint32(a)) } @@ -576,10 +483,6 @@ func (a ScmpArch) toNative() C.uint32_t { return C.C_ARCH_S390 case ArchS390X: return C.C_ARCH_S390X - case ArchPARISC: - return C.C_ARCH_PARISC - case ArchPARISC64: - return C.C_ARCH_PARISC64 case ArchNative: return C.C_ARCH_NATIVE default: @@ -614,10 +517,6 @@ func actionFromNative(a C.uint32_t) (ScmpAction, error) { switch a & 0xFFFF0000 { case C.C_ACT_KILL: return ActKill, nil - case C.C_ACT_KILL_PROCESS: - return ActKillProcess, nil - case C.C_ACT_KILL_THREAD: - return ActKillThread, nil case C.C_ACT_TRAP: return ActTrap, nil case C.C_ACT_ERRNO: @@ -628,8 +527,6 @@ func actionFromNative(a C.uint32_t) (ScmpAction, error) { return ActLog, nil case C.C_ACT_ALLOW: return ActAllow, nil - case C.C_ACT_NOTIFY: - return ActNotify, nil default: return 0x0, fmt.Errorf("unrecognized action %#x", uint32(a)) } @@ -640,10 +537,6 @@ func (a ScmpAction) toNative() C.uint32_t { switch a & 0xFFFF { case ActKill: return C.C_ACT_KILL - case ActKillProcess: - return C.C_ACT_KILL_PROCESS - case ActKillThread: - return C.C_ACT_KILL_THREAD case ActTrap: return C.C_ACT_TRAP case ActErrno: @@ -654,8 +547,6 @@ func (a ScmpAction) toNative() C.uint32_t { return C.C_ACT_LOG case ActAllow: return C.C_ACT_ALLOW - case ActNotify: - return C.C_ACT_NOTIFY default: return 0x0 } @@ -674,181 +565,7 @@ func (a scmpFilterAttr) toNative() uint32 { return uint32(C.C_ATTRIBUTE_TSYNC) case filterAttrLog: return uint32(C.C_ATTRIBUTE_LOG) - case filterAttrSSB: - return uint32(C.C_ATTRIBUTE_SSB) default: return 0x0 } } - -func (a ScmpSyscall) toNative() C.uint32_t { - return C.uint32_t(a) -} - -func syscallFromNative(a C.int) ScmpSyscall { - return ScmpSyscall(a) -} - -func notifReqFromNative(req *C.struct_seccomp_notif) (*ScmpNotifReq, error) { - scmpArgs := make([]uint64, 6) - for i := 0; i < len(scmpArgs); i++ { - scmpArgs[i] = uint64(req.data.args[i]) - } - - arch, err := archFromNative(req.data.arch) - if err != nil { - return nil, err - } - - scmpData := ScmpNotifData{ - Syscall: syscallFromNative(req.data.nr), - Arch: arch, - InstrPointer: uint64(req.data.instruction_pointer), - Args: scmpArgs, - } - - scmpReq := &ScmpNotifReq{ - ID: uint64(req.id), - Pid: uint32(req.pid), - Flags: uint32(req.flags), - Data: scmpData, - } - - return scmpReq, nil -} - -func (scmpResp *ScmpNotifResp) toNative(resp *C.struct_seccomp_notif_resp) { - resp.id = C.__u64(scmpResp.ID) - resp.val = C.__s64(scmpResp.Val) - resp.error = (C.__s32(scmpResp.Error) * -1) // kernel requires a negated value - resp.flags = C.__u32(scmpResp.Flags) -} - -// Userspace Notification API -// Calls to C.seccomp_notify* hidden from seccomp.go - -func (f *ScmpFilter) getNotifFd() (ScmpFd, error) { - f.lock.Lock() - defer f.lock.Unlock() - - if !f.valid { - return -1, errBadFilter - } - - // Ignore error, if not supported returns apiLevel == 0 - apiLevel, _ := GetAPI() - if apiLevel < 6 { - return -1, fmt.Errorf("seccomp notification requires API level >= 6; current level = %d", apiLevel) - } - - fd := C.seccomp_notify_fd(f.filterCtx) - - return ScmpFd(fd), nil -} - -func notifReceive(fd ScmpFd) (*ScmpNotifReq, error) { - var req *C.struct_seccomp_notif - var resp *C.struct_seccomp_notif_resp - - // Ignore error, if not supported returns apiLevel == 0 - apiLevel, _ := GetAPI() - if apiLevel < 6 { - return nil, fmt.Errorf("seccomp notification requires API level >= 6; current level = %d", apiLevel) - } - - // we only use the request here; the response is unused - if retCode := C.seccomp_notify_alloc(&req, &resp); retCode != 0 { - return nil, errRc(retCode) - } - - defer func() { - C.seccomp_notify_free(req, resp) - }() - - for { - retCode, errno := C.seccomp_notify_receive(C.int(fd), req) - if retCode == 0 { - break - } - - if errno == syscall.EINTR { - continue - } - - if errno == syscall.ENOENT { - return nil, errno - } - - return nil, errRc(retCode) - } - - return notifReqFromNative(req) -} - -func notifRespond(fd ScmpFd, scmpResp *ScmpNotifResp) error { - var req *C.struct_seccomp_notif - var resp *C.struct_seccomp_notif_resp - - // Ignore error, if not supported returns apiLevel == 0 - apiLevel, _ := GetAPI() - if apiLevel < 6 { - return fmt.Errorf("seccomp notification requires API level >= 6; current level = %d", apiLevel) - } - - // we only use the reponse here; the request is discarded - if retCode := C.seccomp_notify_alloc(&req, &resp); retCode != 0 { - return errRc(retCode) - } - - defer func() { - C.seccomp_notify_free(req, resp) - }() - - scmpResp.toNative(resp) - - for { - retCode, errno := C.seccomp_notify_respond(C.int(fd), resp) - if retCode == 0 { - break - } - - if errno == syscall.EINTR { - continue - } - - if errno == syscall.ENOENT { - return errno - } - - return errRc(retCode) - } - - return nil -} - -func notifIDValid(fd ScmpFd, id uint64) error { - // Ignore error, if not supported returns apiLevel == 0 - apiLevel, _ := GetAPI() - if apiLevel < 6 { - return fmt.Errorf("seccomp notification requires API level >= 6; current level = %d", apiLevel) - } - - for { - retCode, errno := C.seccomp_notify_id_valid(C.int(fd), C.uint64_t(id)) - if retCode == 0 { - break - } - - if errno == syscall.EINTR { - continue - } - - if errno == syscall.ENOENT { - return errno - } - - return errRc(retCode) - } - - return nil -} diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/MAINTAINERS b/cluster-autoscaler/vendor/github.com/spf13/cobra/MAINTAINERS deleted file mode 100644 index 4c5ac3dd997c..000000000000 --- a/cluster-autoscaler/vendor/github.com/spf13/cobra/MAINTAINERS +++ /dev/null @@ -1,13 +0,0 @@ -maintainers: -- spf13 -- johnSchnake -- jpmcb -- marckhouzam -inactive: -- anthonyfok -- bep -- bogem -- broady -- eparis -- jharshman -- wfernandes diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/Makefile b/cluster-autoscaler/vendor/github.com/spf13/cobra/Makefile index 443ef1a987ac..472c73bf16f0 100644 --- a/cluster-autoscaler/vendor/github.com/spf13/cobra/Makefile +++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/Makefile @@ -9,11 +9,11 @@ ifeq (, $(shell which richgo)) $(warning "could not find richgo in $(PATH), run: go get github.com/kyoh86/richgo") endif -.PHONY: fmt lint test install_deps clean +.PHONY: fmt lint test cobra_generator install_deps clean default: all -all: fmt test +all: fmt test cobra_generator fmt: $(info ******************** checking formatting ********************) @@ -23,10 +23,15 @@ lint: $(info ******************** running lint tools ********************) golangci-lint run -v -test: install_deps +test: install_deps lint $(info ******************** running tests ********************) richgo test -v ./... +cobra_generator: install_deps + $(info ******************** building generator ********************) + mkdir -p $(BIN) + make -C cobra all + install_deps: $(info ******************** downloading dependencies ********************) go get -v ./... diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/README.md b/cluster-autoscaler/vendor/github.com/spf13/cobra/README.md index 7adef143b42b..074e3979f893 100644 --- a/cluster-autoscaler/vendor/github.com/spf13/cobra/README.md +++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/README.md @@ -1,26 +1,52 @@ ![cobra logo](https://cloud.githubusercontent.com/assets/173412/10886352/ad566232-814f-11e5-9cd0-aa101788c117.png) -Cobra is a library for creating powerful modern CLI applications. +Cobra is both a library for creating powerful modern CLI applications as well as a program to generate applications and command files. Cobra is used in many Go projects such as [Kubernetes](http://kubernetes.io/), [Hugo](https://gohugo.io), and [Github CLI](https://github.com/cli/cli) to name a few. [This list](./projects_using_cobra.md) contains a more extensive list of projects using Cobra. [![](https://img.shields.io/github/workflow/status/spf13/cobra/Test?longCache=tru&label=Test&logo=github%20actions&logoColor=fff)](https://github.com/spf13/cobra/actions?query=workflow%3ATest) -[![Go Reference](https://pkg.go.dev/badge/github.com/spf13/cobra.svg)](https://pkg.go.dev/github.com/spf13/cobra) +[![GoDoc](https://godoc.org/github.com/spf13/cobra?status.svg)](https://godoc.org/github.com/spf13/cobra) [![Go Report Card](https://goreportcard.com/badge/github.com/spf13/cobra)](https://goreportcard.com/report/github.com/spf13/cobra) [![Slack](https://img.shields.io/badge/Slack-cobra-brightgreen)](https://gophers.slack.com/archives/CD3LP1199) +# Table of Contents + +- [Overview](#overview) +- [Concepts](#concepts) + * [Commands](#commands) + * [Flags](#flags) +- [Installing](#installing) +- [Usage](#usage) + * [Using the Cobra Generator](user_guide.md#using-the-cobra-generator) + * [Using the Cobra Library](user_guide.md#using-the-cobra-library) + * [Working with Flags](user_guide.md#working-with-flags) + * [Positional and Custom Arguments](user_guide.md#positional-and-custom-arguments) + * [Example](user_guide.md#example) + * [Help Command](user_guide.md#help-command) + * [Usage Message](user_guide.md#usage-message) + * [PreRun and PostRun Hooks](user_guide.md#prerun-and-postrun-hooks) + * [Suggestions when "unknown command" happens](user_guide.md#suggestions-when-unknown-command-happens) + * [Generating documentation for your command](user_guide.md#generating-documentation-for-your-command) + * [Generating shell completions](user_guide.md#generating-shell-completions) +- [Contributing](CONTRIBUTING.md) +- [License](#license) + # Overview Cobra is a library providing a simple interface to create powerful modern CLI interfaces similar to git & go tools. +Cobra is also an application that will generate your application scaffolding to rapidly +develop a Cobra-based application. + Cobra provides: * Easy subcommand-based CLIs: `app server`, `app fetch`, etc. * Fully POSIX-compliant flags (including short & long versions) * Nested subcommands * Global, local and cascading flags +* Easy generation of applications & commands with `cobra init appname` & `cobra add cmdname` * Intelligent suggestions (`app srver`... did you mean `app server`?) * Automatic help generation for commands and flags * Automatic help flag recognition of `-h`, `--help`, etc. @@ -28,7 +54,7 @@ Cobra provides: * Automatically generated man pages for your application * Command aliases so you can change things without breaking them * The flexibility to define your own help, usage, etc. -* Optional seamless integration with [viper](http://github.com/spf13/viper) for 12-factor apps +* Optional tight integration with [viper](http://github.com/spf13/viper) for 12-factor apps # Concepts @@ -62,7 +88,7 @@ have children commands and optionally run an action. In the example above, 'server' is the command. -[More about cobra.Command](https://pkg.go.dev/github.com/spf13/cobra#Command) +[More about cobra.Command](https://godoc.org/github.com/spf13/cobra#Command) ## Flags @@ -79,11 +105,10 @@ which maintains the same interface while adding POSIX compliance. # Installing Using Cobra is easy. First, use `go get` to install the latest version -of the library. +of the library. This command will install the `cobra` generator executable +along with the library and its dependencies: -``` -go get -u github.com/spf13/cobra@latest -``` + go get -u github.com/spf13/cobra Next, include Cobra in your application: @@ -92,19 +117,8 @@ import "github.com/spf13/cobra" ``` # Usage -`cobra-cli` is a command line program to generate cobra applications and command files. -It will bootstrap your application scaffolding to rapidly -develop a Cobra-based application. It is the easiest way to incorporate Cobra into your application. - -It can be installed by running: - -``` -go install github.com/spf13/cobra-cli@latest -``` - -For complete details on using the Cobra-CLI generator, please read [The Cobra Generator README](https://github.com/spf13/cobra-cli/blob/master/README.md) -For complete details on using the Cobra library, please read the [The Cobra User Guide](user_guide.md). +See [User Guide](user_guide.md). # License diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/args.go b/cluster-autoscaler/vendor/github.com/spf13/cobra/args.go index 20a022b30845..70e9b262912e 100644 --- a/cluster-autoscaler/vendor/github.com/spf13/cobra/args.go +++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/args.go @@ -107,15 +107,3 @@ func RangeArgs(min int, max int) PositionalArgs { return nil } } - -// MatchAll allows combining several PositionalArgs to work in concert. -func MatchAll(pargs ...PositionalArgs) PositionalArgs { - return func(cmd *Command, args []string) error { - for _, parg := range pargs { - if err := parg(cmd, args); err != nil { - return err - } - } - return nil - } -} diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/bash_completions.go b/cluster-autoscaler/vendor/github.com/spf13/cobra/bash_completions.go index 6c360c595fd0..733f4d1211da 100644 --- a/cluster-autoscaler/vendor/github.com/spf13/cobra/bash_completions.go +++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/bash_completions.go @@ -24,7 +24,7 @@ func writePreamble(buf io.StringWriter, name string) { WriteStringAndCheck(buf, fmt.Sprintf(` __%[1]s_debug() { - if [[ -n ${BASH_COMP_DEBUG_FILE:-} ]]; then + if [[ -n ${BASH_COMP_DEBUG_FILE} ]]; then echo "$*" >> "${BASH_COMP_DEBUG_FILE}" fi } @@ -134,7 +134,7 @@ __%[1]s_handle_go_custom_completion() $filteringCmd elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then # File completion for directories only - local subdir + local subDir # Use printf to strip any trailing newline subdir=$(printf "%%s" "${out[0]}") if [ -n "$subdir" ]; then @@ -187,19 +187,13 @@ __%[1]s_handle_reply() PREFIX="" cur="${cur#*=}" ${flags_completion[${index}]} - if [ -n "${ZSH_VERSION:-}" ]; then + if [ -n "${ZSH_VERSION}" ]; then # zsh completion needs --flag= prefix eval "COMPREPLY=( \"\${COMPREPLY[@]/#/${flag}=}\" )" fi fi fi - - if [[ -z "${flag_parsing_disabled}" ]]; then - # If flag parsing is enabled, we have completed the flags and can return. - # If flag parsing is disabled, we may not know all (or any) of the flags, so we fallthrough - # to possibly call handle_go_custom_completion. - return 0; - fi + return 0; ;; esac @@ -238,13 +232,13 @@ __%[1]s_handle_reply() fi if [[ ${#COMPREPLY[@]} -eq 0 ]]; then - if declare -F __%[1]s_custom_func >/dev/null; then - # try command name qualified custom func - __%[1]s_custom_func - else - # otherwise fall back to unqualified for compatibility - declare -F __custom_func >/dev/null && __custom_func - fi + if declare -F __%[1]s_custom_func >/dev/null; then + # try command name qualified custom func + __%[1]s_custom_func + else + # otherwise fall back to unqualified for compatibility + declare -F __custom_func >/dev/null && __custom_func + fi fi # available in bash-completion >= 2, not always present on macOS @@ -278,7 +272,7 @@ __%[1]s_handle_flag() # if a command required a flag, and we found it, unset must_have_one_flag() local flagname=${words[c]} - local flagvalue="" + local flagvalue # if the word contained an = if [[ ${words[c]} == *"="* ]]; then flagvalue=${flagname#*=} # take in as flagvalue after the = @@ -297,7 +291,7 @@ __%[1]s_handle_flag() # keep flag value with flagname as flaghash # flaghash variable is an associative array which is only supported in bash > 3. - if [[ -z "${BASH_VERSION:-}" || "${BASH_VERSINFO[0]:-}" -gt 3 ]]; then + if [[ -z "${BASH_VERSION}" || "${BASH_VERSINFO[0]}" -gt 3 ]]; then if [ -n "${flagvalue}" ] ; then flaghash[${flagname}]=${flagvalue} elif [ -n "${words[ $((c+1)) ]}" ] ; then @@ -309,7 +303,7 @@ __%[1]s_handle_flag() # skip the argument to a two word flag if [[ ${words[c]} != *"="* ]] && __%[1]s_contains_word "${words[c]}" "${two_word_flags[@]}"; then - __%[1]s_debug "${FUNCNAME[0]}: found a flag ${words[c]}, skip the next argument" + __%[1]s_debug "${FUNCNAME[0]}: found a flag ${words[c]}, skip the next argument" c=$((c+1)) # if we are looking for a flags value, don't show commands if [[ $c -eq $cword ]]; then @@ -369,7 +363,7 @@ __%[1]s_handle_word() __%[1]s_handle_command elif __%[1]s_contains_word "${words[c]}" "${command_aliases[@]}"; then # aliashash variable is an associative array which is only supported in bash > 3. - if [[ -z "${BASH_VERSION:-}" || "${BASH_VERSINFO[0]:-}" -gt 3 ]]; then + if [[ -z "${BASH_VERSION}" || "${BASH_VERSINFO[0]}" -gt 3 ]]; then words[c]=${aliashash[${words[c]}]} __%[1]s_handle_command else @@ -400,7 +394,6 @@ func writePostscript(buf io.StringWriter, name string) { fi local c=0 - local flag_parsing_disabled= local flags=() local two_word_flags=() local local_nonpersistent_flags=() @@ -410,8 +403,8 @@ func writePostscript(buf io.StringWriter, name string) { local command_aliases=() local must_have_one_flag=() local must_have_one_noun=() - local has_completion_function="" - local last_command="" + local has_completion_function + local last_command local nouns=() local noun_aliases=() @@ -542,11 +535,6 @@ func writeFlags(buf io.StringWriter, cmd *Command) { flags_completion=() `) - - if cmd.DisableFlagParsing { - WriteStringAndCheck(buf, " flag_parsing_disabled=1\n") - } - localNonPersistentFlags := cmd.LocalNonPersistentFlags() cmd.NonInheritedFlags().VisitAll(func(flag *pflag.Flag) { if nonCompletableFlag(flag) { @@ -621,7 +609,7 @@ func writeCmdAliases(buf io.StringWriter, cmd *Command) { sort.Strings(cmd.Aliases) - WriteStringAndCheck(buf, fmt.Sprint(` if [[ -z "${BASH_VERSION:-}" || "${BASH_VERSINFO[0]:-}" -gt 3 ]]; then`, "\n")) + WriteStringAndCheck(buf, fmt.Sprint(` if [[ -z "${BASH_VERSION}" || "${BASH_VERSINFO[0]}" -gt 3 ]]; then`, "\n")) for _, value := range cmd.Aliases { WriteStringAndCheck(buf, fmt.Sprintf(" command_aliases+=(%q)\n", value)) WriteStringAndCheck(buf, fmt.Sprintf(" aliashash[%q]=%q\n", value, cmd.Name())) diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/bash_completionsV2.go b/cluster-autoscaler/vendor/github.com/spf13/cobra/bash_completionsV2.go index 82d26c17568e..8859b57c42c0 100644 --- a/cluster-autoscaler/vendor/github.com/spf13/cobra/bash_completionsV2.go +++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/bash_completionsV2.go @@ -138,42 +138,13 @@ __%[1]s_process_completion_results() { _filedir -d fi else - __%[1]s_handle_completion_types + __%[1]s_handle_standard_completion_case fi __%[1]s_handle_special_char "$cur" : __%[1]s_handle_special_char "$cur" = } -__%[1]s_handle_completion_types() { - __%[1]s_debug "__%[1]s_handle_completion_types: COMP_TYPE is $COMP_TYPE" - - case $COMP_TYPE in - 37|42) - # Type: menu-complete/menu-complete-backward and insert-completions - # If the user requested inserting one completion at a time, or all - # completions at once on the command-line we must remove the descriptions. - # https://github.com/spf13/cobra/issues/1508 - local tab comp - tab=$(printf '\t') - while IFS='' read -r comp; do - # Strip any description - comp=${comp%%%%$tab*} - # Only consider the completions that match - comp=$(compgen -W "$comp" -- "$cur") - if [ -n "$comp" ]; then - COMPREPLY+=("$comp") - fi - done < <(printf "%%s\n" "${out[@]}") - ;; - - *) - # Type: complete (normal completion) - __%[1]s_handle_standard_completion_case - ;; - esac -} - __%[1]s_handle_standard_completion_case() { local tab comp tab=$(printf '\t') diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/command_notwin.go b/cluster-autoscaler/vendor/github.com/spf13/cobra/command_notwin.go index bb5dad90b7f0..6159c1cc19d4 100644 --- a/cluster-autoscaler/vendor/github.com/spf13/cobra/command_notwin.go +++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/command_notwin.go @@ -1,4 +1,3 @@ -//go:build !windows // +build !windows package cobra diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/command_win.go b/cluster-autoscaler/vendor/github.com/spf13/cobra/command_win.go index a84f5a82aab8..8768b1736dca 100644 --- a/cluster-autoscaler/vendor/github.com/spf13/cobra/command_win.go +++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/command_win.go @@ -1,4 +1,3 @@ -//go:build windows // +build windows package cobra diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/completions.go b/cluster-autoscaler/vendor/github.com/spf13/cobra/completions.go index 9ecd56a472aa..b849b9c84445 100644 --- a/cluster-autoscaler/vendor/github.com/spf13/cobra/completions.go +++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/completions.go @@ -93,8 +93,6 @@ type CompletionOptions struct { // DisableDescriptions turns off all completion descriptions for shells // that support them DisableDescriptions bool - // HiddenDefaultCmd makes the default 'completion' command hidden - HiddenDefaultCmd bool } // NoFileCompletions can be used to disable file completion for commands that should @@ -228,17 +226,7 @@ func (c *Command) getCompletions(args []string) (*Command, []string, ShellCompDi if c.Root().TraverseChildren { finalCmd, finalArgs, err = c.Root().Traverse(trimmedArgs) } else { - // For Root commands that don't specify any value for their Args fields, when we call - // Find(), if those Root commands don't have any sub-commands, they will accept arguments. - // However, because we have added the __complete sub-command in the current code path, the - // call to Find() -> legacyArgs() will return an error if there are any arguments. - // To avoid this, we first remove the __complete command to get back to having no sub-commands. - rootCmd := c.Root() - if len(rootCmd.Commands()) == 1 { - rootCmd.RemoveCommand(c) - } - - finalCmd, finalArgs, err = rootCmd.Find(trimmedArgs) + finalCmd, finalArgs, err = c.Root().Find(trimmedArgs) } if err != nil { // Unable to find the real command. E.g., someInvalidCmd @@ -278,12 +266,6 @@ func (c *Command) getCompletions(args []string) (*Command, []string, ShellCompDi } } - // We only remove the flags from the arguments if DisableFlagParsing is not set. - // This is important for commands which have requested to do their own flag completion. - if !finalCmd.DisableFlagParsing { - finalArgs = finalCmd.Flags().Args() - } - if flag != nil && flagCompletion { // Check if we are completing a flag value subject to annotations if validExts, present := flag.Annotations[BashCompFilenameExt]; present { @@ -308,16 +290,12 @@ func (c *Command) getCompletions(args []string) (*Command, []string, ShellCompDi } } - var completions []string - var directive ShellCompDirective - - // Note that we want to perform flagname completion even if finalCmd.DisableFlagParsing==true; - // doing this allows for completion of persistant flag names even for commands that disable flag parsing. - // // When doing completion of a flag name, as soon as an argument starts with // a '-' we know it is a flag. We cannot use isFlagArg() here as it requires // the flag name to be complete if flag == nil && len(toComplete) > 0 && toComplete[0] == '-' && !strings.Contains(toComplete, "=") && flagCompletion { + var completions []string + // First check for required flags completions = completeRequireFlags(finalCmd, toComplete) @@ -344,86 +322,86 @@ func (c *Command) getCompletions(args []string) (*Command, []string, ShellCompDi }) } - directive = ShellCompDirectiveNoFileComp + directive := ShellCompDirectiveNoFileComp if len(completions) == 1 && strings.HasSuffix(completions[0], "=") { // If there is a single completion, the shell usually adds a space // after the completion. We don't want that if the flag ends with an = directive = ShellCompDirectiveNoSpace } + return finalCmd, completions, directive, nil + } - if !finalCmd.DisableFlagParsing { - // If DisableFlagParsing==false, we have completed the flags as known by Cobra; - // we can return what we found. - // If DisableFlagParsing==true, Cobra may not be aware of all flags, so we - // let the logic continue to see if ValidArgsFunction needs to be called. - return finalCmd, completions, directive, nil + // We only remove the flags from the arguments if DisableFlagParsing is not set. + // This is important for commands which have requested to do their own flag completion. + if !finalCmd.DisableFlagParsing { + finalArgs = finalCmd.Flags().Args() + } + + var completions []string + directive := ShellCompDirectiveDefault + if flag == nil { + foundLocalNonPersistentFlag := false + // If TraverseChildren is true on the root command we don't check for + // local flags because we can use a local flag on a parent command + if !finalCmd.Root().TraverseChildren { + // Check if there are any local, non-persistent flags on the command-line + localNonPersistentFlags := finalCmd.LocalNonPersistentFlags() + finalCmd.NonInheritedFlags().VisitAll(func(flag *pflag.Flag) { + if localNonPersistentFlags.Lookup(flag.Name) != nil && flag.Changed { + foundLocalNonPersistentFlag = true + } + }) } - } else { - directive = ShellCompDirectiveDefault - if flag == nil { - foundLocalNonPersistentFlag := false - // If TraverseChildren is true on the root command we don't check for - // local flags because we can use a local flag on a parent command - if !finalCmd.Root().TraverseChildren { - // Check if there are any local, non-persistent flags on the command-line - localNonPersistentFlags := finalCmd.LocalNonPersistentFlags() - finalCmd.NonInheritedFlags().VisitAll(func(flag *pflag.Flag) { - if localNonPersistentFlags.Lookup(flag.Name) != nil && flag.Changed { - foundLocalNonPersistentFlag = true - } - }) - } - // Complete subcommand names, including the help command - if len(finalArgs) == 0 && !foundLocalNonPersistentFlag { - // We only complete sub-commands if: - // - there are no arguments on the command-line and - // - there are no local, non-persistent flags on the command-line or TraverseChildren is true - for _, subCmd := range finalCmd.Commands() { - if subCmd.IsAvailableCommand() || subCmd == finalCmd.helpCommand { - if strings.HasPrefix(subCmd.Name(), toComplete) { - completions = append(completions, fmt.Sprintf("%s\t%s", subCmd.Name(), subCmd.Short)) - } - directive = ShellCompDirectiveNoFileComp + // Complete subcommand names, including the help command + if len(finalArgs) == 0 && !foundLocalNonPersistentFlag { + // We only complete sub-commands if: + // - there are no arguments on the command-line and + // - there are no local, non-persistent flags on the command-line or TraverseChildren is true + for _, subCmd := range finalCmd.Commands() { + if subCmd.IsAvailableCommand() || subCmd == finalCmd.helpCommand { + if strings.HasPrefix(subCmd.Name(), toComplete) { + completions = append(completions, fmt.Sprintf("%s\t%s", subCmd.Name(), subCmd.Short)) } + directive = ShellCompDirectiveNoFileComp } } + } - // Complete required flags even without the '-' prefix - completions = append(completions, completeRequireFlags(finalCmd, toComplete)...) - - // Always complete ValidArgs, even if we are completing a subcommand name. - // This is for commands that have both subcommands and ValidArgs. - if len(finalCmd.ValidArgs) > 0 { - if len(finalArgs) == 0 { - // ValidArgs are only for the first argument - for _, validArg := range finalCmd.ValidArgs { - if strings.HasPrefix(validArg, toComplete) { - completions = append(completions, validArg) - } + // Complete required flags even without the '-' prefix + completions = append(completions, completeRequireFlags(finalCmd, toComplete)...) + + // Always complete ValidArgs, even if we are completing a subcommand name. + // This is for commands that have both subcommands and ValidArgs. + if len(finalCmd.ValidArgs) > 0 { + if len(finalArgs) == 0 { + // ValidArgs are only for the first argument + for _, validArg := range finalCmd.ValidArgs { + if strings.HasPrefix(validArg, toComplete) { + completions = append(completions, validArg) } - directive = ShellCompDirectiveNoFileComp - - // If no completions were found within commands or ValidArgs, - // see if there are any ArgAliases that should be completed. - if len(completions) == 0 { - for _, argAlias := range finalCmd.ArgAliases { - if strings.HasPrefix(argAlias, toComplete) { - completions = append(completions, argAlias) - } + } + directive = ShellCompDirectiveNoFileComp + + // If no completions were found within commands or ValidArgs, + // see if there are any ArgAliases that should be completed. + if len(completions) == 0 { + for _, argAlias := range finalCmd.ArgAliases { + if strings.HasPrefix(argAlias, toComplete) { + completions = append(completions, argAlias) } } } - - // If there are ValidArgs specified (even if they don't match), we stop completion. - // Only one of ValidArgs or ValidArgsFunction can be used for a single command. - return finalCmd, completions, directive, nil } - // Let the logic continue so as to add any ValidArgsFunction completions, - // even if we already found sub-commands. - // This is for commands that have subcommands but also specify a ValidArgsFunction. + // If there are ValidArgs specified (even if they don't match), we stop completion. + // Only one of ValidArgs or ValidArgsFunction can be used for a single command. + return finalCmd, completions, directive, nil } + + // Let the logic continue so as to add any ValidArgsFunction completions, + // even if we already found sub-commands. + // This is for commands that have subcommands but also specify a ValidArgsFunction. } // Find the completion function for the flag or command @@ -611,43 +589,39 @@ func (c *Command) initDefaultCompletionCmd() { completionCmd := &Command{ Use: compCmdName, - Short: "Generate the autocompletion script for the specified shell", - Long: fmt.Sprintf(`Generate the autocompletion script for %[1]s for the specified shell. + Short: "generate the autocompletion script for the specified shell", + Long: fmt.Sprintf(` +Generate the autocompletion script for %[1]s for the specified shell. See each sub-command's help for details on how to use the generated script. `, c.Root().Name()), Args: NoArgs, ValidArgsFunction: NoFileCompletions, - Hidden: c.CompletionOptions.HiddenDefaultCmd, } c.AddCommand(completionCmd) out := c.OutOrStdout() noDesc := c.CompletionOptions.DisableDescriptions - shortDesc := "Generate the autocompletion script for %s" + shortDesc := "generate the autocompletion script for %s" bash := &Command{ Use: "bash", Short: fmt.Sprintf(shortDesc, "bash"), - Long: fmt.Sprintf(`Generate the autocompletion script for the bash shell. + Long: fmt.Sprintf(` +Generate the autocompletion script for the bash shell. This script depends on the 'bash-completion' package. If it is not installed already, you can install it via your OS's package manager. To load completions in your current shell session: - - source <(%[1]s completion bash) +$ source <(%[1]s completion bash) To load completions for every new session, execute once: - -#### Linux: - - %[1]s completion bash > /etc/bash_completion.d/%[1]s - -#### macOS: - - %[1]s completion bash > /usr/local/etc/bash_completion.d/%[1]s +Linux: + $ %[1]s completion bash > /etc/bash_completion.d/%[1]s +MacOS: + $ %[1]s completion bash > /usr/local/etc/bash_completion.d/%[1]s You will need to start a new shell for this setup to take effect. -`, c.Root().Name()), + `, c.Root().Name()), Args: NoArgs, DisableFlagsInUseLine: true, ValidArgsFunction: NoFileCompletions, @@ -662,22 +636,19 @@ You will need to start a new shell for this setup to take effect. zsh := &Command{ Use: "zsh", Short: fmt.Sprintf(shortDesc, "zsh"), - Long: fmt.Sprintf(`Generate the autocompletion script for the zsh shell. + Long: fmt.Sprintf(` +Generate the autocompletion script for the zsh shell. If shell completion is not already enabled in your environment you will need to enable it. You can execute the following once: - echo "autoload -U compinit; compinit" >> ~/.zshrc +$ echo "autoload -U compinit; compinit" >> ~/.zshrc To load completions for every new session, execute once: - -#### Linux: - - %[1]s completion zsh > "${fpath[1]}/_%[1]s" - -#### macOS: - - %[1]s completion zsh > /usr/local/share/zsh/site-functions/_%[1]s +# Linux: +$ %[1]s completion zsh > "${fpath[1]}/_%[1]s" +# macOS: +$ %[1]s completion zsh > /usr/local/share/zsh/site-functions/_%[1]s You will need to start a new shell for this setup to take effect. `, c.Root().Name()), @@ -697,15 +668,14 @@ You will need to start a new shell for this setup to take effect. fish := &Command{ Use: "fish", Short: fmt.Sprintf(shortDesc, "fish"), - Long: fmt.Sprintf(`Generate the autocompletion script for the fish shell. + Long: fmt.Sprintf(` +Generate the autocompletion script for the fish shell. To load completions in your current shell session: - - %[1]s completion fish | source +$ %[1]s completion fish | source To load completions for every new session, execute once: - - %[1]s completion fish > ~/.config/fish/completions/%[1]s.fish +$ %[1]s completion fish > ~/.config/fish/completions/%[1]s.fish You will need to start a new shell for this setup to take effect. `, c.Root().Name()), @@ -722,11 +692,11 @@ You will need to start a new shell for this setup to take effect. powershell := &Command{ Use: "powershell", Short: fmt.Sprintf(shortDesc, "powershell"), - Long: fmt.Sprintf(`Generate the autocompletion script for powershell. + Long: fmt.Sprintf(` +Generate the autocompletion script for powershell. To load completions in your current shell session: - - %[1]s completion powershell | Out-String | Invoke-Expression +PS C:\> %[1]s completion powershell | Out-String | Invoke-Expression To load completions for every new session, add the output of the above command to your powershell profile. diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/go.mod b/cluster-autoscaler/vendor/github.com/spf13/cobra/go.mod index 2d6855911de2..1fb9439dd86e 100644 --- a/cluster-autoscaler/vendor/github.com/spf13/cobra/go.mod +++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/go.mod @@ -1,10 +1,11 @@ module github.com/spf13/cobra -go 1.15 +go 1.14 require ( - github.com/cpuguy83/go-md2man/v2 v2.0.1 + github.com/cpuguy83/go-md2man/v2 v2.0.0 github.com/inconshreveable/mousetrap v1.0.0 github.com/spf13/pflag v1.0.5 + github.com/spf13/viper v1.8.1 gopkg.in/yaml.v2 v2.4.0 ) diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/go.sum b/cluster-autoscaler/vendor/github.com/spf13/cobra/go.sum index 431058ed0f61..3e22df29a3de 100644 --- a/cluster-autoscaler/vendor/github.com/spf13/cobra/go.sum +++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/go.sum @@ -1,18 +1,592 @@ -github.com/cpuguy83/go-md2man/v2 v2.0.1 h1:r/myEWzV9lfsM1tFLgDyu0atFtJ1fXn261LKYj/3DxU= -github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= +github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pelletier/go-toml v1.9.3 h1:zeC5b1GviRUyKYd6OJPvBU/mcVDVoL1OhT17FCt5dSQ= +github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.8.1 h1:Kq1fyeebqsBfbjZj4EL7gj2IO0mMaiyjYUWcUsl2O44= +github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= +gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/powershell_completions.go b/cluster-autoscaler/vendor/github.com/spf13/cobra/powershell_completions.go index 62d719f0b33f..59234c09f18d 100644 --- a/cluster-autoscaler/vendor/github.com/spf13/cobra/powershell_completions.go +++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/powershell_completions.go @@ -50,7 +50,7 @@ Register-ArgumentCompleter -CommandName '%[1]s' -ScriptBlock { if ($Command.Length -gt $CursorPosition) { $Command=$Command.Substring(0,$CursorPosition) } - __%[1]s_debug "Truncated command: $Command" + __%[1]s_debug "Truncated command: $Command" $ShellCompDirectiveError=%[3]d $ShellCompDirectiveNoSpace=%[4]d @@ -58,7 +58,7 @@ Register-ArgumentCompleter -CommandName '%[1]s' -ScriptBlock { $ShellCompDirectiveFilterFileExt=%[6]d $ShellCompDirectiveFilterDirs=%[7]d - # Prepare the command to request completions for the program. + # Prepare the command to request completions for the program. # Split the command at the first space to separate the program and arguments. $Program,$Arguments = $Command.Split(" ",2) $RequestComp="$Program %[2]s $Arguments" @@ -233,7 +233,7 @@ Register-ArgumentCompleter -CommandName '%[1]s' -ScriptBlock { Default { # Like MenuComplete but we don't want to add a space here because # the user need to press space anyway to get the completion. - # Description will not be shown because that's not possible with TabCompleteNext + # Description will not be shown because thats not possible with TabCompleteNext [System.Management.Automation.CompletionResult]::new($($comp.Name | __%[1]s_escapeStringWithSpecialChars), "$($comp.Name)", 'ParameterValue', "$($comp.Description)") } } diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/projects_using_cobra.md b/cluster-autoscaler/vendor/github.com/spf13/cobra/projects_using_cobra.md index 9674c348c0d5..d98a71e36f96 100644 --- a/cluster-autoscaler/vendor/github.com/spf13/cobra/projects_using_cobra.md +++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/projects_using_cobra.md @@ -4,7 +4,6 @@ - [Bleve](http://www.blevesearch.com/) - [CockroachDB](http://www.cockroachlabs.com/) - [Cosmos SDK](https://github.com/cosmos/cosmos-sdk) -- [Datree](https://github.com/datreeio/datree) - [Delve](https://github.com/derekparker/delve) - [Docker (distribution)](https://github.com/docker/distribution) - [Etcd](https://etcd.io/) @@ -15,37 +14,25 @@ - [GitHub Labeler](https://github.com/erdaltsksn/gh-label) - [Golangci-lint](https://golangci-lint.run) - [GopherJS](http://www.gopherjs.org/) -- [GoReleaser](https://goreleaser.com) - [Helm](https://helm.sh) - [Hugo](https://gohugo.io) -- [Infracost](https://github.com/infracost/infracost) - [Istio](https://istio.io) - [Kool](https://github.com/kool-dev/kool) - [Kubernetes](http://kubernetes.io/) - [Linkerd](https://linkerd.io/) - [Mattermost-server](https://github.com/mattermost/mattermost-server) -- [Mercure](https://mercure.rocks/) -- [Meroxa CLI](https://github.com/meroxa/cli) - [Metal Stack CLI](https://github.com/metal-stack/metalctl) - [Moby (former Docker)](https://github.com/moby/moby) -- [Moldy](https://github.com/Moldy-Community/moldy) -- [Multi-gitter](https://github.com/lindell/multi-gitter) - [Nanobox](https://github.com/nanobox-io/nanobox)/[Nanopack](https://github.com/nanopack) -- [nFPM](https://nfpm.goreleaser.com) - [OpenShift](https://www.openshift.com/) - [Ory Hydra](https://github.com/ory/hydra) - [Ory Kratos](https://github.com/ory/kratos) -- [Pixie](https://github.com/pixie-io/pixie) - [Pouch](https://github.com/alibaba/pouch) - [ProjectAtomic (enterprise)](http://www.projectatomic.io/) - [Prototool](https://github.com/uber/prototool) -- [QRcp](https://github.com/claudiodangelis/qrcp) - [Random](https://github.com/erdaltsksn/random) - [Rclone](https://rclone.org/) -- [Scaleway CLI](https://github.com/scaleway/scaleway-cli) - [Skaffold](https://skaffold.dev/) - [Tendermint](https://github.com/tendermint/tendermint) - [Twitch CLI](https://github.com/twitchdev/twitch-cli) -- [UpCloud CLI (`upctl`)](https://github.com/UpCloudLtd/upcloud-cli) -- VMware's [Tanzu Community Edition](https://github.com/vmware-tanzu/community-edition) & [Tanzu Framework](https://github.com/vmware-tanzu/tanzu-framework) - [Werf](https://werf.io/) diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/shell_completions.md b/cluster-autoscaler/vendor/github.com/spf13/cobra/shell_completions.md index 33a4c65a5a38..4ba06a11c0d5 100644 --- a/cluster-autoscaler/vendor/github.com/spf13/cobra/shell_completions.md +++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/shell_completions.md @@ -16,12 +16,10 @@ If you do not wish to use the default `completion` command, you can choose to provide your own, which will take precedence over the default one. (This also provides backwards-compatibility with programs that already have their own `completion` command.) -If you are using the `cobra-cli` generator, -which can be found at [spf13/cobra-cli](https://github.com/spf13/cobra-cli), -you can create a completion command by running +If you are using the generator, you can create a completion command by running ```bash -cobra-cli add completion +cobra add completion ``` and then modifying the generated `cmd/completion.go` file to look something like this (writing the shell script to stdout allows the most flexible use): @@ -30,17 +28,17 @@ and then modifying the generated `cmd/completion.go` file to look something like var completionCmd = &cobra.Command{ Use: "completion [bash|zsh|fish|powershell]", Short: "Generate completion script", - Long: fmt.Sprintf(`To load completions: + Long: `To load completions: Bash: - $ source <(%[1]s completion bash) + $ source <(yourprogram completion bash) # To load completions for each session, execute once: # Linux: - $ %[1]s completion bash > /etc/bash_completion.d/%[1]s + $ yourprogram completion bash > /etc/bash_completion.d/yourprogram # macOS: - $ %[1]s completion bash > /usr/local/etc/bash_completion.d/%[1]s + $ yourprogram completion bash > /usr/local/etc/bash_completion.d/yourprogram Zsh: @@ -50,25 +48,25 @@ Zsh: $ echo "autoload -U compinit; compinit" >> ~/.zshrc # To load completions for each session, execute once: - $ %[1]s completion zsh > "${fpath[1]}/_%[1]s" + $ yourprogram completion zsh > "${fpath[1]}/_yourprogram" # You will need to start a new shell for this setup to take effect. fish: - $ %[1]s completion fish | source + $ yourprogram completion fish | source # To load completions for each session, execute once: - $ %[1]s completion fish > ~/.config/fish/completions/%[1]s.fish + $ yourprogram completion fish > ~/.config/fish/completions/yourprogram.fish PowerShell: - PS> %[1]s completion powershell | Out-String | Invoke-Expression + PS> yourprogram completion powershell | Out-String | Invoke-Expression # To load completions for every new session, run: - PS> %[1]s completion powershell > %[1]s.ps1 + PS> yourprogram completion powershell > yourprogram.ps1 # and source this file from your PowerShell profile. -`,cmd.Root().Name()), +`, DisableFlagsInUseLine: true, ValidArgs: []string{"bash", "zsh", "fish", "powershell"}, Args: cobra.ExactValidArgs(1), diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/user_guide.md b/cluster-autoscaler/vendor/github.com/spf13/cobra/user_guide.md index 4a3c2b0da53b..311abce284d2 100644 --- a/cluster-autoscaler/vendor/github.com/spf13/cobra/user_guide.md +++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/user_guide.md @@ -29,10 +29,10 @@ func main() { ## Using the Cobra Generator -Cobra-CLI is its own program that will create your application and add any +Cobra provides its own program that will create your application and add any commands you want. It's the easiest way to incorporate Cobra into your application. -For complete details on using the Cobra generator, please refer to [The Cobra-CLI Generator README](https://github.com/spf13/cobra-cli/blob/master/README.md) +[Here](https://github.com/spf13/cobra/blob/master/cobra/README.md) you can find more information about it. ## Using the Cobra Library @@ -86,7 +86,7 @@ var ( userLicense string rootCmd = &cobra.Command{ - Use: "cobra-cli", + Use: "cobra", Short: "A generator for Cobra based Applications", Long: `Cobra is a CLI library for Go that empowers applications. This application is a tool to generate the needed files @@ -281,7 +281,7 @@ func init() { In this example, the persistent flag `author` is bound with `viper`. **Note**: the variable `author` will not be set to the value from config, -when the `--author` flag is provided by user. +when the `--author` flag is not provided by user. More in [viper documentation](https://github.com/spf13/viper#working-with-flags). @@ -315,7 +315,6 @@ The following validators are built in: - `ExactArgs(int)` - the command will report an error if there are not exactly N positional args. - `ExactValidArgs(int)` - the command will report an error if there are not exactly N positional args OR if there are any positional args that are not in the `ValidArgs` field of `Command` - `RangeArgs(min, max)` - the command will report an error if the number of args is not between the minimum and maximum number of expected args. -- `MatchAll(pargs ...PositionalArgs)` - enables combining existing checks with arbitrary other checks (e.g. you want to check the ExactArgs length along with other qualities). An example of setting the custom validator: diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/zsh_completions.go b/cluster-autoscaler/vendor/github.com/spf13/cobra/zsh_completions.go index 624adab537b9..1afec30ea922 100644 --- a/cluster-autoscaler/vendor/github.com/spf13/cobra/zsh_completions.go +++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/zsh_completions.go @@ -202,7 +202,7 @@ _%[1]s() _arguments '*:filename:'"$filteringCmd" elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then # File completion for directories only - local subdir + local subDir subdir="${completions[1]}" if [ -n "$subdir" ]; then __%[1]s_debug "Listing directories in $subdir" @@ -250,7 +250,7 @@ _%[1]s() # don't run the completion function when being source-ed or eval-ed if [ "$funcstack[1]" = "_%[1]s" ]; then - _%[1]s + _%[1]s fi `, name, compCmd, ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp, diff --git a/cluster-autoscaler/vendor/go.etcd.io/etcd/api/v3/version/version.go b/cluster-autoscaler/vendor/go.etcd.io/etcd/api/v3/version/version.go index 71dfdf5107cd..95b62fd8b2ff 100644 --- a/cluster-autoscaler/vendor/go.etcd.io/etcd/api/v3/version/version.go +++ b/cluster-autoscaler/vendor/go.etcd.io/etcd/api/v3/version/version.go @@ -26,7 +26,7 @@ import ( var ( // MinClusterVersion is the min cluster version this etcd binary is compatible with. MinClusterVersion = "3.0.0" - Version = "3.5.1" + Version = "3.5.0" APIVersion = "unknown" // Git SHA Value will be set during build diff --git a/cluster-autoscaler/vendor/go.etcd.io/etcd/client/v3/client.go b/cluster-autoscaler/vendor/go.etcd.io/etcd/client/v3/client.go index e99ffb6f1666..fae7c7538806 100644 --- a/cluster-autoscaler/vendor/go.etcd.io/etcd/client/v3/client.go +++ b/cluster-autoscaler/vendor/go.etcd.io/etcd/client/v3/client.go @@ -296,7 +296,9 @@ func (c *Client) dial(creds grpccredentials.TransportCredentials, dopts ...grpc. dctx, cancel = context.WithTimeout(c.ctx, c.cfg.DialTimeout) defer cancel() // TODO: Is this right for cases where grpc.WithBlock() is not set on the dial options? } - target := fmt.Sprintf("%s://%p/%s", resolver.Schema, c, authority(c.Endpoints()[0])) + + initialEndpoints := strings.Join(c.cfg.Endpoints, ";") + target := fmt.Sprintf("%s://%p/#initially=[%s]", resolver.Schema, c, initialEndpoints) conn, err := grpc.DialContext(dctx, target, opts...) if err != nil { return nil, err @@ -304,20 +306,6 @@ func (c *Client) dial(creds grpccredentials.TransportCredentials, dopts ...grpc. return conn, nil } -func authority(endpoint string) string { - spl := strings.SplitN(endpoint, "://", 2) - if len(spl) < 2 { - if strings.HasPrefix(endpoint, "unix:") { - return endpoint[len("unix:"):] - } - if strings.HasPrefix(endpoint, "unixs:") { - return endpoint[len("unixs:"):] - } - return endpoint - } - return spl[1] -} - func (c *Client) credentialsForEndpoint(ep string) grpccredentials.TransportCredentials { r := endpoint.RequiresCredentials(ep) switch r { diff --git a/cluster-autoscaler/vendor/go.etcd.io/etcd/client/v3/go.mod b/cluster-autoscaler/vendor/go.etcd.io/etcd/client/v3/go.mod index ed7bd8dc51be..0756f098dae5 100644 --- a/cluster-autoscaler/vendor/go.etcd.io/etcd/client/v3/go.mod +++ b/cluster-autoscaler/vendor/go.etcd.io/etcd/client/v3/go.mod @@ -6,8 +6,8 @@ require ( github.com/dustin/go-humanize v1.0.0 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/prometheus/client_golang v1.11.0 - go.etcd.io/etcd/api/v3 v3.5.1 - go.etcd.io/etcd/client/pkg/v3 v3.5.1 + go.etcd.io/etcd/api/v3 v3.5.0 + go.etcd.io/etcd/client/pkg/v3 v3.5.0 go.uber.org/zap v1.17.0 google.golang.org/grpc v1.38.0 sigs.k8s.io/yaml v1.2.0 diff --git a/cluster-autoscaler/vendor/golang.org/x/crypto/cryptobyte/asn1.go b/cluster-autoscaler/vendor/golang.org/x/crypto/cryptobyte/asn1.go index 3a1674a1e57c..83c776de0830 100644 --- a/cluster-autoscaler/vendor/golang.org/x/crypto/cryptobyte/asn1.go +++ b/cluster-autoscaler/vendor/golang.org/x/crypto/cryptobyte/asn1.go @@ -407,12 +407,7 @@ func (s *String) ReadASN1Enum(out *int) bool { func (s *String) readBase128Int(out *int) bool { ret := 0 for i := 0; len(*s) > 0; i++ { - if i == 5 { - return false - } - // Avoid overflowing int on a 32-bit platform. - // We don't want different behavior based on the architecture. - if ret >= 1<<(31-7) { + if i == 4 { return false } ret <<= 7 diff --git a/cluster-autoscaler/vendor/golang.org/x/net/http2/client_conn_pool.go b/cluster-autoscaler/vendor/golang.org/x/net/http2/client_conn_pool.go index c936843eafa1..652bc11a029b 100644 --- a/cluster-autoscaler/vendor/golang.org/x/net/http2/client_conn_pool.go +++ b/cluster-autoscaler/vendor/golang.org/x/net/http2/client_conn_pool.go @@ -16,12 +16,6 @@ import ( // ClientConnPool manages a pool of HTTP/2 client connections. type ClientConnPool interface { - // GetClientConn returns a specific HTTP/2 connection (usually - // a TLS-TCP connection) to an HTTP/2 server. On success, the - // returned ClientConn accounts for the upcoming RoundTrip - // call, so the caller should not omit it. If the caller needs - // to, ClientConn.RoundTrip can be called with a bogus - // new(http.Request) to release the stream reservation. GetClientConn(req *http.Request, addr string) (*ClientConn, error) MarkDead(*ClientConn) } @@ -48,7 +42,7 @@ type clientConnPool struct { conns map[string][]*ClientConn // key is host:port dialing map[string]*dialCall // currently in-flight dials keys map[*ClientConn][]string - addConnCalls map[string]*addConnCall // in-flight addConnIfNeeded calls + addConnCalls map[string]*addConnCall // in-flight addConnIfNeede calls } func (p *clientConnPool) GetClientConn(req *http.Request, addr string) (*ClientConn, error) { @@ -60,8 +54,28 @@ const ( noDialOnMiss = false ) +// shouldTraceGetConn reports whether getClientConn should call any +// ClientTrace.GetConn hook associated with the http.Request. +// +// This complexity is needed to avoid double calls of the GetConn hook +// during the back-and-forth between net/http and x/net/http2 (when the +// net/http.Transport is upgraded to also speak http2), as well as support +// the case where x/net/http2 is being used directly. +func (p *clientConnPool) shouldTraceGetConn(st clientConnIdleState) bool { + // If our Transport wasn't made via ConfigureTransport, always + // trace the GetConn hook if provided, because that means the + // http2 package is being used directly and it's the one + // dialing, as opposed to net/http. + if _, ok := p.t.ConnPool.(noDialClientConnPool); !ok { + return true + } + // Otherwise, only use the GetConn hook if this connection has + // been used previously for other requests. For fresh + // connections, the net/http package does the dialing. + return !st.freshConn +} + func (p *clientConnPool) getClientConn(req *http.Request, addr string, dialOnMiss bool) (*ClientConn, error) { - // TODO(dneil): Dial a new connection when t.DisableKeepAlives is set? if isConnectionCloseRequest(req) && dialOnMiss { // It gets its own connection. traceGetConn(req, addr) @@ -75,14 +89,10 @@ func (p *clientConnPool) getClientConn(req *http.Request, addr string, dialOnMis for { p.mu.Lock() for _, cc := range p.conns[addr] { - if cc.ReserveNewRequest() { - // When a connection is presented to us by the net/http package, - // the GetConn hook has already been called. - // Don't call it a second time here. - if !cc.getConnCalled { + if st := cc.idleState(); st.canTakeNewRequest { + if p.shouldTraceGetConn(st) { traceGetConn(req, addr) } - cc.getConnCalled = false p.mu.Unlock() return cc, nil } @@ -98,13 +108,7 @@ func (p *clientConnPool) getClientConn(req *http.Request, addr string, dialOnMis if shouldRetryDial(call, req) { continue } - cc, err := call.res, call.err - if err != nil { - return nil, err - } - if cc.ReserveNewRequest() { - return cc, nil - } + return call.res, call.err } } @@ -201,7 +205,6 @@ func (c *addConnCall) run(t *Transport, key string, tc *tls.Conn) { if err != nil { c.err = err } else { - cc.getConnCalled = true // already called by the net/http package p.addConnLocked(key, cc) } delete(p.addConnCalls, key) diff --git a/cluster-autoscaler/vendor/golang.org/x/net/http2/errors.go b/cluster-autoscaler/vendor/golang.org/x/net/http2/errors.go index 2663e5d287ee..71f2c4631787 100644 --- a/cluster-autoscaler/vendor/golang.org/x/net/http2/errors.go +++ b/cluster-autoscaler/vendor/golang.org/x/net/http2/errors.go @@ -53,13 +53,6 @@ func (e ErrCode) String() string { return fmt.Sprintf("unknown error code 0x%x", uint32(e)) } -func (e ErrCode) stringToken() string { - if s, ok := errCodeName[e]; ok { - return s - } - return fmt.Sprintf("ERR_UNKNOWN_%d", uint32(e)) -} - // ConnectionError is an error that results in the termination of the // entire connection. type ConnectionError ErrCode @@ -74,11 +67,6 @@ type StreamError struct { Cause error // optional additional detail } -// errFromPeer is a sentinel error value for StreamError.Cause to -// indicate that the StreamError was sent from the peer over the wire -// and wasn't locally generated in the Transport. -var errFromPeer = errors.New("received from peer") - func streamError(id uint32, code ErrCode) StreamError { return StreamError{StreamID: id, Code: code} } diff --git a/cluster-autoscaler/vendor/golang.org/x/net/http2/frame.go b/cluster-autoscaler/vendor/golang.org/x/net/http2/frame.go index 96a747905241..514c126c5f8f 100644 --- a/cluster-autoscaler/vendor/golang.org/x/net/http2/frame.go +++ b/cluster-autoscaler/vendor/golang.org/x/net/http2/frame.go @@ -122,7 +122,7 @@ var flagName = map[FrameType]map[Flags]string{ // a frameParser parses a frame given its FrameHeader and payload // bytes. The length of payload will always equal fh.Length (which // might be 0). -type frameParser func(fc *frameCache, fh FrameHeader, countError func(string), payload []byte) (Frame, error) +type frameParser func(fc *frameCache, fh FrameHeader, payload []byte) (Frame, error) var frameParsers = map[FrameType]frameParser{ FrameData: parseDataFrame, @@ -267,11 +267,6 @@ type Framer struct { lastFrame Frame errDetail error - // countError is a non-nil func that's called on a frame parse - // error with some unique error path token. It's initialized - // from Transport.CountError or Server.CountError. - countError func(errToken string) - // lastHeaderStream is non-zero if the last frame was an // unfinished HEADERS/CONTINUATION. lastHeaderStream uint32 @@ -431,7 +426,6 @@ func NewFramer(w io.Writer, r io.Reader) *Framer { fr := &Framer{ w: w, r: r, - countError: func(string) {}, logReads: logFrameReads, logWrites: logFrameWrites, debugReadLoggerf: log.Printf, @@ -506,7 +500,7 @@ func (fr *Framer) ReadFrame() (Frame, error) { if _, err := io.ReadFull(fr.r, payload); err != nil { return nil, err } - f, err := typeFrameParser(fh.Type)(fr.frameCache, fh, fr.countError, payload) + f, err := typeFrameParser(fh.Type)(fr.frameCache, fh, payload) if err != nil { if ce, ok := err.(connError); ok { return nil, fr.connError(ce.Code, ce.Reason) @@ -594,14 +588,13 @@ func (f *DataFrame) Data() []byte { return f.data } -func parseDataFrame(fc *frameCache, fh FrameHeader, countError func(string), payload []byte) (Frame, error) { +func parseDataFrame(fc *frameCache, fh FrameHeader, payload []byte) (Frame, error) { if fh.StreamID == 0 { // DATA frames MUST be associated with a stream. If a // DATA frame is received whose stream identifier // field is 0x0, the recipient MUST respond with a // connection error (Section 5.4.1) of type // PROTOCOL_ERROR. - countError("frame_data_stream_0") return nil, connError{ErrCodeProtocol, "DATA frame with stream ID 0"} } f := fc.getDataFrame() @@ -612,7 +605,6 @@ func parseDataFrame(fc *frameCache, fh FrameHeader, countError func(string), pay var err error payload, padSize, err = readByte(payload) if err != nil { - countError("frame_data_pad_byte_short") return nil, err } } @@ -621,7 +613,6 @@ func parseDataFrame(fc *frameCache, fh FrameHeader, countError func(string), pay // length of the frame payload, the recipient MUST // treat this as a connection error. // Filed: https://github.com/http2/http2-spec/issues/610 - countError("frame_data_pad_too_big") return nil, connError{ErrCodeProtocol, "pad size larger than data payload"} } f.data = payload[:len(payload)-int(padSize)] @@ -704,7 +695,7 @@ type SettingsFrame struct { p []byte } -func parseSettingsFrame(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (Frame, error) { +func parseSettingsFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, error) { if fh.Flags.Has(FlagSettingsAck) && fh.Length > 0 { // When this (ACK 0x1) bit is set, the payload of the // SETTINGS frame MUST be empty. Receipt of a @@ -712,7 +703,6 @@ func parseSettingsFrame(_ *frameCache, fh FrameHeader, countError func(string), // field value other than 0 MUST be treated as a // connection error (Section 5.4.1) of type // FRAME_SIZE_ERROR. - countError("frame_settings_ack_with_length") return nil, ConnectionError(ErrCodeFrameSize) } if fh.StreamID != 0 { @@ -723,17 +713,14 @@ func parseSettingsFrame(_ *frameCache, fh FrameHeader, countError func(string), // field is anything other than 0x0, the endpoint MUST // respond with a connection error (Section 5.4.1) of // type PROTOCOL_ERROR. - countError("frame_settings_has_stream") return nil, ConnectionError(ErrCodeProtocol) } if len(p)%6 != 0 { - countError("frame_settings_mod_6") // Expecting even number of 6 byte settings. return nil, ConnectionError(ErrCodeFrameSize) } f := &SettingsFrame{FrameHeader: fh, p: p} if v, ok := f.Value(SettingInitialWindowSize); ok && v > (1<<31)-1 { - countError("frame_settings_window_size_too_big") // Values above the maximum flow control window size of 2^31 - 1 MUST // be treated as a connection error (Section 5.4.1) of type // FLOW_CONTROL_ERROR. @@ -845,13 +832,11 @@ type PingFrame struct { func (f *PingFrame) IsAck() bool { return f.Flags.Has(FlagPingAck) } -func parsePingFrame(_ *frameCache, fh FrameHeader, countError func(string), payload []byte) (Frame, error) { +func parsePingFrame(_ *frameCache, fh FrameHeader, payload []byte) (Frame, error) { if len(payload) != 8 { - countError("frame_ping_length") return nil, ConnectionError(ErrCodeFrameSize) } if fh.StreamID != 0 { - countError("frame_ping_has_stream") return nil, ConnectionError(ErrCodeProtocol) } f := &PingFrame{FrameHeader: fh} @@ -887,13 +872,11 @@ func (f *GoAwayFrame) DebugData() []byte { return f.debugData } -func parseGoAwayFrame(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (Frame, error) { +func parseGoAwayFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, error) { if fh.StreamID != 0 { - countError("frame_goaway_has_stream") return nil, ConnectionError(ErrCodeProtocol) } if len(p) < 8 { - countError("frame_goaway_short") return nil, ConnectionError(ErrCodeFrameSize) } return &GoAwayFrame{ @@ -929,7 +912,7 @@ func (f *UnknownFrame) Payload() []byte { return f.p } -func parseUnknownFrame(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (Frame, error) { +func parseUnknownFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, error) { return &UnknownFrame{fh, p}, nil } @@ -940,9 +923,8 @@ type WindowUpdateFrame struct { Increment uint32 // never read with high bit set } -func parseWindowUpdateFrame(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (Frame, error) { +func parseWindowUpdateFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, error) { if len(p) != 4 { - countError("frame_windowupdate_bad_len") return nil, ConnectionError(ErrCodeFrameSize) } inc := binary.BigEndian.Uint32(p[:4]) & 0x7fffffff // mask off high reserved bit @@ -954,10 +936,8 @@ func parseWindowUpdateFrame(_ *frameCache, fh FrameHeader, countError func(strin // control window MUST be treated as a connection // error (Section 5.4.1). if fh.StreamID == 0 { - countError("frame_windowupdate_zero_inc_conn") return nil, ConnectionError(ErrCodeProtocol) } - countError("frame_windowupdate_zero_inc_stream") return nil, streamError(fh.StreamID, ErrCodeProtocol) } return &WindowUpdateFrame{ @@ -1008,7 +988,7 @@ func (f *HeadersFrame) HasPriority() bool { return f.FrameHeader.Flags.Has(FlagHeadersPriority) } -func parseHeadersFrame(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (_ Frame, err error) { +func parseHeadersFrame(_ *frameCache, fh FrameHeader, p []byte) (_ Frame, err error) { hf := &HeadersFrame{ FrameHeader: fh, } @@ -1017,13 +997,11 @@ func parseHeadersFrame(_ *frameCache, fh FrameHeader, countError func(string), p // is received whose stream identifier field is 0x0, the recipient MUST // respond with a connection error (Section 5.4.1) of type // PROTOCOL_ERROR. - countError("frame_headers_zero_stream") return nil, connError{ErrCodeProtocol, "HEADERS frame with stream ID 0"} } var padLength uint8 if fh.Flags.Has(FlagHeadersPadded) { if p, padLength, err = readByte(p); err != nil { - countError("frame_headers_pad_short") return } } @@ -1031,19 +1009,16 @@ func parseHeadersFrame(_ *frameCache, fh FrameHeader, countError func(string), p var v uint32 p, v, err = readUint32(p) if err != nil { - countError("frame_headers_prio_short") return nil, err } hf.Priority.StreamDep = v & 0x7fffffff hf.Priority.Exclusive = (v != hf.Priority.StreamDep) // high bit was set p, hf.Priority.Weight, err = readByte(p) if err != nil { - countError("frame_headers_prio_weight_short") return nil, err } } - if len(p)-int(padLength) < 0 { - countError("frame_headers_pad_too_big") + if len(p)-int(padLength) <= 0 { return nil, streamError(fh.StreamID, ErrCodeProtocol) } hf.headerFragBuf = p[:len(p)-int(padLength)] @@ -1150,13 +1125,11 @@ func (p PriorityParam) IsZero() bool { return p == PriorityParam{} } -func parsePriorityFrame(_ *frameCache, fh FrameHeader, countError func(string), payload []byte) (Frame, error) { +func parsePriorityFrame(_ *frameCache, fh FrameHeader, payload []byte) (Frame, error) { if fh.StreamID == 0 { - countError("frame_priority_zero_stream") return nil, connError{ErrCodeProtocol, "PRIORITY frame with stream ID 0"} } if len(payload) != 5 { - countError("frame_priority_bad_length") return nil, connError{ErrCodeFrameSize, fmt.Sprintf("PRIORITY frame payload size was %d; want 5", len(payload))} } v := binary.BigEndian.Uint32(payload[:4]) @@ -1199,13 +1172,11 @@ type RSTStreamFrame struct { ErrCode ErrCode } -func parseRSTStreamFrame(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (Frame, error) { +func parseRSTStreamFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, error) { if len(p) != 4 { - countError("frame_rststream_bad_len") return nil, ConnectionError(ErrCodeFrameSize) } if fh.StreamID == 0 { - countError("frame_rststream_zero_stream") return nil, ConnectionError(ErrCodeProtocol) } return &RSTStreamFrame{fh, ErrCode(binary.BigEndian.Uint32(p[:4]))}, nil @@ -1231,9 +1202,8 @@ type ContinuationFrame struct { headerFragBuf []byte } -func parseContinuationFrame(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (Frame, error) { +func parseContinuationFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, error) { if fh.StreamID == 0 { - countError("frame_continuation_zero_stream") return nil, connError{ErrCodeProtocol, "CONTINUATION frame with stream ID 0"} } return &ContinuationFrame{fh, p}, nil @@ -1282,7 +1252,7 @@ func (f *PushPromiseFrame) HeadersEnded() bool { return f.FrameHeader.Flags.Has(FlagPushPromiseEndHeaders) } -func parsePushPromise(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (_ Frame, err error) { +func parsePushPromise(_ *frameCache, fh FrameHeader, p []byte) (_ Frame, err error) { pp := &PushPromiseFrame{ FrameHeader: fh, } @@ -1293,7 +1263,6 @@ func parsePushPromise(_ *frameCache, fh FrameHeader, countError func(string), p // with. If the stream identifier field specifies the value // 0x0, a recipient MUST respond with a connection error // (Section 5.4.1) of type PROTOCOL_ERROR. - countError("frame_pushpromise_zero_stream") return nil, ConnectionError(ErrCodeProtocol) } // The PUSH_PROMISE frame includes optional padding. @@ -1301,21 +1270,18 @@ func parsePushPromise(_ *frameCache, fh FrameHeader, countError func(string), p var padLength uint8 if fh.Flags.Has(FlagPushPromisePadded) { if p, padLength, err = readByte(p); err != nil { - countError("frame_pushpromise_pad_short") return } } p, pp.PromiseID, err = readUint32(p) if err != nil { - countError("frame_pushpromise_promiseid_short") return } pp.PromiseID = pp.PromiseID & (1<<31 - 1) if int(padLength) > len(p) { // like the DATA frame, error out if padding is longer than the body. - countError("frame_pushpromise_pad_too_big") return nil, ConnectionError(ErrCodeProtocol) } pp.headerFragBuf = p[:len(p)-int(padLength)] diff --git a/cluster-autoscaler/vendor/golang.org/x/net/http2/hpack/huffman.go b/cluster-autoscaler/vendor/golang.org/x/net/http2/hpack/huffman.go index fe0b84ccd467..a1ab2f056794 100644 --- a/cluster-autoscaler/vendor/golang.org/x/net/http2/hpack/huffman.go +++ b/cluster-autoscaler/vendor/golang.org/x/net/http2/hpack/huffman.go @@ -140,29 +140,25 @@ func buildRootHuffmanNode() { panic("unexpected size") } lazyRootHuffmanNode = newInternalNode() - // allocate a leaf node for each of the 256 symbols - leaves := new([256]node) - - for sym, code := range huffmanCodes { - codeLen := huffmanCodeLen[sym] - - cur := lazyRootHuffmanNode - for codeLen > 8 { - codeLen -= 8 - i := uint8(code >> codeLen) - if cur.children[i] == nil { - cur.children[i] = newInternalNode() - } - cur = cur.children[i] - } - shift := 8 - codeLen - start, end := int(uint8(code< 8 { + codeLen -= 8 + i := uint8(code >> codeLen) + if cur.children[i] == nil { + cur.children[i] = newInternalNode() } + cur = cur.children[i] + } + shift := 8 - codeLen + start, end := int(uint8(code< 0 { // Check whether the client has flow control quota. if st.inflow.available() < int32(f.Length) { - return sc.countError("flow_on_data_length", streamError(id, ErrCodeFlowControl)) + return streamError(id, ErrCodeFlowControl) } st.inflow.take(int32(f.Length)) @@ -1727,7 +1710,7 @@ func (sc *serverConn) processData(f *DataFrame) error { wrote, err := st.body.Write(data) if err != nil { sc.sendWindowUpdate(nil, int(f.Length)-wrote) - return sc.countError("body_write_err", streamError(id, ErrCodeStreamClosed)) + return streamError(id, ErrCodeStreamClosed) } if wrote != len(data) { panic("internal error: bad Writer") @@ -1813,7 +1796,7 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error { // stream identifier MUST respond with a connection error // (Section 5.4.1) of type PROTOCOL_ERROR. if id%2 != 1 { - return sc.countError("headers_even", ConnectionError(ErrCodeProtocol)) + return ConnectionError(ErrCodeProtocol) } // A HEADERS frame can be used to create a new stream or // send a trailer for an open one. If we already have a stream @@ -1830,7 +1813,7 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error { // this state, it MUST respond with a stream error (Section 5.4.2) of // type STREAM_CLOSED. if st.state == stateHalfClosedRemote { - return sc.countError("headers_half_closed", streamError(id, ErrCodeStreamClosed)) + return streamError(id, ErrCodeStreamClosed) } return st.processTrailerHeaders(f) } @@ -1841,7 +1824,7 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error { // receives an unexpected stream identifier MUST respond with // a connection error (Section 5.4.1) of type PROTOCOL_ERROR. if id <= sc.maxClientStreamID { - return sc.countError("stream_went_down", ConnectionError(ErrCodeProtocol)) + return ConnectionError(ErrCodeProtocol) } sc.maxClientStreamID = id @@ -1858,14 +1841,14 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error { if sc.curClientStreams+1 > sc.advMaxStreams { if sc.unackedSettings == 0 { // They should know better. - return sc.countError("over_max_streams", streamError(id, ErrCodeProtocol)) + return streamError(id, ErrCodeProtocol) } // Assume it's a network race, where they just haven't // received our last SETTINGS update. But actually // this can't happen yet, because we don't yet provide // a way for users to adjust server parameters at // runtime. - return sc.countError("over_max_streams_race", streamError(id, ErrCodeRefusedStream)) + return streamError(id, ErrCodeRefusedStream) } initialState := stateOpen @@ -1875,7 +1858,7 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error { st := sc.newStream(id, 0, initialState) if f.HasPriority() { - if err := sc.checkPriority(f.StreamID, f.Priority); err != nil { + if err := checkPriority(f.StreamID, f.Priority); err != nil { return err } sc.writeSched.AdjustStream(st.id, f.Priority) @@ -1919,15 +1902,15 @@ func (st *stream) processTrailerHeaders(f *MetaHeadersFrame) error { sc := st.sc sc.serveG.check() if st.gotTrailerHeader { - return sc.countError("dup_trailers", ConnectionError(ErrCodeProtocol)) + return ConnectionError(ErrCodeProtocol) } st.gotTrailerHeader = true if !f.StreamEnded() { - return sc.countError("trailers_not_ended", streamError(st.id, ErrCodeProtocol)) + return streamError(st.id, ErrCodeProtocol) } if len(f.PseudoFields()) > 0 { - return sc.countError("trailers_pseudo", streamError(st.id, ErrCodeProtocol)) + return streamError(st.id, ErrCodeProtocol) } if st.trailer != nil { for _, hf := range f.RegularFields() { @@ -1936,7 +1919,7 @@ func (st *stream) processTrailerHeaders(f *MetaHeadersFrame) error { // TODO: send more details to the peer somehow. But http2 has // no way to send debug data at a stream level. Discuss with // HTTP folk. - return sc.countError("trailers_bogus", streamError(st.id, ErrCodeProtocol)) + return streamError(st.id, ErrCodeProtocol) } st.trailer[key] = append(st.trailer[key], hf.Value) } @@ -1945,13 +1928,13 @@ func (st *stream) processTrailerHeaders(f *MetaHeadersFrame) error { return nil } -func (sc *serverConn) checkPriority(streamID uint32, p PriorityParam) error { +func checkPriority(streamID uint32, p PriorityParam) error { if streamID == p.StreamDep { // Section 5.3.1: "A stream cannot depend on itself. An endpoint MUST treat // this as a stream error (Section 5.4.2) of type PROTOCOL_ERROR." // Section 5.3.3 says that a stream can depend on one of its dependencies, // so it's only self-dependencies that are forbidden. - return sc.countError("priority", streamError(streamID, ErrCodeProtocol)) + return streamError(streamID, ErrCodeProtocol) } return nil } @@ -1960,7 +1943,7 @@ func (sc *serverConn) processPriority(f *PriorityFrame) error { if sc.inGoAway { return nil } - if err := sc.checkPriority(f.StreamID, f.PriorityParam); err != nil { + if err := checkPriority(f.StreamID, f.PriorityParam); err != nil { return err } sc.writeSched.AdjustStream(f.StreamID, f.PriorityParam) @@ -2017,7 +2000,7 @@ func (sc *serverConn) newWriterAndRequest(st *stream, f *MetaHeadersFrame) (*res isConnect := rp.method == "CONNECT" if isConnect { if rp.path != "" || rp.scheme != "" || rp.authority == "" { - return nil, nil, sc.countError("bad_connect", streamError(f.StreamID, ErrCodeProtocol)) + return nil, nil, streamError(f.StreamID, ErrCodeProtocol) } } else if rp.method == "" || rp.path == "" || (rp.scheme != "https" && rp.scheme != "http") { // See 8.1.2.6 Malformed Requests and Responses: @@ -2030,13 +2013,13 @@ func (sc *serverConn) newWriterAndRequest(st *stream, f *MetaHeadersFrame) (*res // "All HTTP/2 requests MUST include exactly one valid // value for the :method, :scheme, and :path // pseudo-header fields" - return nil, nil, sc.countError("bad_path_method", streamError(f.StreamID, ErrCodeProtocol)) + return nil, nil, streamError(f.StreamID, ErrCodeProtocol) } bodyOpen := !f.StreamEnded() if rp.method == "HEAD" && bodyOpen { // HEAD requests can't have bodies - return nil, nil, sc.countError("head_body", streamError(f.StreamID, ErrCodeProtocol)) + return nil, nil, streamError(f.StreamID, ErrCodeProtocol) } rp.header = make(http.Header) @@ -2119,7 +2102,7 @@ func (sc *serverConn) newWriterAndRequestNoBody(st *stream, rp requestParam) (*r var err error url_, err = url.ParseRequestURI(rp.path) if err != nil { - return nil, nil, sc.countError("bad_path", streamError(st.id, ErrCodeProtocol)) + return nil, nil, streamError(st.id, ErrCodeProtocol) } requestURI = rp.path } @@ -3002,31 +2985,3 @@ func h1ServerKeepAlivesDisabled(hs *http.Server) bool { } return false } - -func (sc *serverConn) countError(name string, err error) error { - if sc == nil || sc.srv == nil { - return err - } - f := sc.srv.CountError - if f == nil { - return err - } - var typ string - var code ErrCode - switch e := err.(type) { - case ConnectionError: - typ = "conn" - code = ErrCode(e) - case StreamError: - typ = "stream" - code = ErrCode(e.Code) - default: - return err - } - codeStr := errCodeName[code] - if codeStr == "" { - codeStr = strconv.Itoa(int(code)) - } - f(fmt.Sprintf("%s_%s_%s", typ, codeStr, name)) - return err -} diff --git a/cluster-autoscaler/vendor/golang.org/x/net/http2/transport.go b/cluster-autoscaler/vendor/golang.org/x/net/http2/transport.go index f135b0f75189..b261beb1d0b2 100644 --- a/cluster-autoscaler/vendor/golang.org/x/net/http2/transport.go +++ b/cluster-autoscaler/vendor/golang.org/x/net/http2/transport.go @@ -24,7 +24,6 @@ import ( "net/http" "net/http/httptrace" "net/textproto" - "os" "sort" "strconv" "strings" @@ -52,15 +51,6 @@ const ( transportDefaultStreamMinRefresh = 4 << 10 defaultUserAgent = "Go-http-client/2.0" - - // initialMaxConcurrentStreams is a connections maxConcurrentStreams until - // it's received servers initial SETTINGS frame, which corresponds with the - // spec's minimum recommended value. - initialMaxConcurrentStreams = 100 - - // defaultMaxConcurrentStreams is a connections default maxConcurrentStreams - // if the server doesn't include one in its initial SETTINGS frame. - defaultMaxConcurrentStreams = 1000 ) // Transport is an HTTP/2 Transport. @@ -131,17 +121,6 @@ type Transport struct { // Defaults to 15s. PingTimeout time.Duration - // WriteByteTimeout is the timeout after which the connection will be - // closed no data can be written to it. The timeout begins when data is - // available to write, and is extended whenever any bytes are written. - WriteByteTimeout time.Duration - - // CountError, if non-nil, is called on HTTP/2 transport errors. - // It's intended to increment a metric for monitoring, such - // as an expvar or Prometheus metric. - // The errType consists of only ASCII word characters. - CountError func(errType string) - // t1, if non-nil, is the standard library Transport using // this transport. Its settings are used (but not its // RoundTrip method, etc). @@ -248,12 +227,11 @@ func (t *Transport) initConnPool() { // ClientConn is the state of a single HTTP/2 client connection to an // HTTP/2 server. type ClientConn struct { - t *Transport - tconn net.Conn // usually *tls.Conn, except specialized impls - tlsState *tls.ConnectionState // nil only for specialized impls - reused uint32 // whether conn is being reused; atomic - singleUse bool // whether being used for a single http.Request - getConnCalled bool // used by clientConnPool + t *Transport + tconn net.Conn // usually *tls.Conn, except specialized impls + tlsState *tls.ConnectionState // nil only for specialized impls + reused uint32 // whether conn is being reused; atomic + singleUse bool // whether being used for a single http.Request // readLoop goroutine fields: readerDone chan struct{} // closed on error @@ -266,94 +244,86 @@ type ClientConn struct { cond *sync.Cond // hold mu; broadcast on flow/closed changes flow flow // our conn-level flow control quota (cs.flow is per stream) inflow flow // peer's conn-level flow control - doNotReuse bool // whether conn is marked to not be reused for any future requests closing bool closed bool - seenSettings bool // true if we've seen a settings frame, false otherwise wantSettingsAck bool // we sent a SETTINGS frame and haven't heard back goAway *GoAwayFrame // if non-nil, the GoAwayFrame we received goAwayDebug string // goAway frame's debug data, retained as a string streams map[uint32]*clientStream // client-initiated - streamsReserved int // incr by ReserveNewRequest; decr on RoundTrip nextStreamID uint32 pendingRequests int // requests blocked and waiting to be sent because len(streams) == maxConcurrentStreams pings map[[8]byte]chan struct{} // in flight ping data to notification channel + bw *bufio.Writer br *bufio.Reader + fr *Framer lastActive time.Time lastIdle time.Time // time last idle - // Settings from peer: (also guarded by wmu) + // Settings from peer: (also guarded by mu) maxFrameSize uint32 maxConcurrentStreams uint32 peerMaxHeaderListSize uint64 initialWindowSize uint32 - // reqHeaderMu is a 1-element semaphore channel controlling access to sending new requests. - // Write to reqHeaderMu to lock it, read from it to unlock. - // Lock reqmu BEFORE mu or wmu. - reqHeaderMu chan struct{} - - // wmu is held while writing. - // Acquire BEFORE mu when holding both, to avoid blocking mu on network writes. - // Only acquire both at the same time when changing peer settings. - wmu sync.Mutex - bw *bufio.Writer - fr *Framer - werr error // first write error that has occurred hbuf bytes.Buffer // HPACK encoder writes into this henc *hpack.Encoder + + wmu sync.Mutex // held while writing; acquire AFTER mu if holding both + werr error // first write error that has occurred } // clientStream is the state for a single HTTP/2 stream. One of these // is created for each Transport.RoundTrip call. type clientStream struct { - cc *ClientConn - - // Fields of Request that we may access even after the response body is closed. - ctx context.Context - reqCancel <-chan struct{} - + cc *ClientConn + req *http.Request trace *httptrace.ClientTrace // or nil ID uint32 + resc chan resAndError bufPipe pipe // buffered pipe with the flow-controlled response payload + startedWrite bool // started request body write; guarded by cc.mu requestedGzip bool - isHead bool - - abortOnce sync.Once - abort chan struct{} // closed to signal stream should end immediately - abortErr error // set if abort is closed - - peerClosed chan struct{} // closed when the peer sends an END_STREAM flag - donec chan struct{} // closed after the stream is in the closed state - on100 chan struct{} // buffered; written to if a 100 is received - - respHeaderRecv chan struct{} // closed when headers are received - res *http.Response // set if respHeaderRecv is closed + on100 func() // optional code to run if get a 100 continue response flow flow // guarded by cc.mu inflow flow // guarded by cc.mu bytesRemain int64 // -1 means unknown; owned by transportResponseBody.Read readErr error // sticky read error; owned by transportResponseBody.Read + stopReqBody error // if non-nil, stop writing req body; guarded by cc.mu + didReset bool // whether we sent a RST_STREAM to the server; guarded by cc.mu - reqBody io.ReadCloser - reqBodyContentLength int64 // -1 means unknown - reqBodyClosed bool // body has been closed; guarded by cc.mu + peerReset chan struct{} // closed on peer reset + resetErr error // populated before peerReset is closed - // owned by writeRequest: - sentEndStream bool // sent an END_STREAM flag to the peer - sentHeaders bool + done chan struct{} // closed when stream remove from cc.streams map; close calls guarded by cc.mu // owned by clientConnReadLoop: firstByte bool // got the first response byte pastHeaders bool // got first MetaHeadersFrame (actual headers) pastTrailers bool // got optional second MetaHeadersFrame (trailers) num1xx uint8 // number of 1xx responses seen - readClosed bool // peer sent an END_STREAM flag - readAborted bool // read loop reset the stream trailer http.Header // accumulated trailers resTrailer *http.Header // client's Response.Trailer } +// awaitRequestCancel waits for the user to cancel a request or for the done +// channel to be signaled. A non-nil error is returned only if the request was +// canceled. +func awaitRequestCancel(req *http.Request, done <-chan struct{}) error { + ctx := req.Context() + if req.Cancel == nil && ctx.Done() == nil { + return nil + } + select { + case <-req.Cancel: + return errRequestCanceled + case <-ctx.Done(): + return ctx.Err() + case <-done: + return nil + } +} + var got1xxFuncForTests func(int, textproto.MIMEHeader) error // get1xxTraceFunc returns the value of request's httptrace.ClientTrace.Got1xxResponse func, @@ -365,65 +335,78 @@ func (cs *clientStream) get1xxTraceFunc() func(int, textproto.MIMEHeader) error return traceGot1xxResponseFunc(cs.trace) } -func (cs *clientStream) abortStream(err error) { - cs.cc.mu.Lock() - defer cs.cc.mu.Unlock() - cs.abortStreamLocked(err) +// awaitRequestCancel waits for the user to cancel a request, its context to +// expire, or for the request to be done (any way it might be removed from the +// cc.streams map: peer reset, successful completion, TCP connection breakage, +// etc). If the request is canceled, then cs will be canceled and closed. +func (cs *clientStream) awaitRequestCancel(req *http.Request) { + if err := awaitRequestCancel(req, cs.done); err != nil { + cs.cancelStream() + cs.bufPipe.CloseWithError(err) + } } -func (cs *clientStream) abortStreamLocked(err error) { - cs.abortOnce.Do(func() { - cs.abortErr = err - close(cs.abort) - }) - if cs.reqBody != nil && !cs.reqBodyClosed { - cs.reqBody.Close() - cs.reqBodyClosed = true +func (cs *clientStream) cancelStream() { + cc := cs.cc + cc.mu.Lock() + didReset := cs.didReset + cs.didReset = true + cc.mu.Unlock() + + if !didReset { + cc.writeStreamReset(cs.ID, ErrCodeCancel, nil) + cc.forgetStreamID(cs.ID) } - // TODO(dneil): Clean up tests where cs.cc.cond is nil. - if cs.cc.cond != nil { - // Wake up writeRequestBody if it is waiting on flow control. - cs.cc.cond.Broadcast() +} + +// checkResetOrDone reports any error sent in a RST_STREAM frame by the +// server, or errStreamClosed if the stream is complete. +func (cs *clientStream) checkResetOrDone() error { + select { + case <-cs.peerReset: + return cs.resetErr + case <-cs.done: + return errStreamClosed + default: + return nil } } -func (cs *clientStream) abortRequestBodyWrite() { +func (cs *clientStream) getStartedWrite() bool { cc := cs.cc cc.mu.Lock() defer cc.mu.Unlock() - if cs.reqBody != nil && !cs.reqBodyClosed { - cs.reqBody.Close() - cs.reqBodyClosed = true + return cs.startedWrite +} + +func (cs *clientStream) abortRequestBodyWrite(err error) { + if err == nil { + panic("nil error") + } + cc := cs.cc + cc.mu.Lock() + if cs.stopReqBody == nil { + cs.stopReqBody = err + if cs.req.Body != nil { + cs.req.Body.Close() + } cc.cond.Broadcast() } + cc.mu.Unlock() } type stickyErrWriter struct { - conn net.Conn - timeout time.Duration - err *error + w io.Writer + err *error } func (sew stickyErrWriter) Write(p []byte) (n int, err error) { if *sew.err != nil { return 0, *sew.err } - for { - if sew.timeout != 0 { - sew.conn.SetWriteDeadline(time.Now().Add(sew.timeout)) - } - nn, err := sew.conn.Write(p[n:]) - n += nn - if n < len(p) && nn > 0 && errors.Is(err, os.ErrDeadlineExceeded) { - // Keep extending the deadline so long as we're making progress. - continue - } - if sew.timeout != 0 { - sew.conn.SetWriteDeadline(time.Time{}) - } - *sew.err = err - return n, err - } + n, err = sew.w.Write(p) + *sew.err = err + return } // noCachedConnError is the concrete type of ErrNoCachedConn, which @@ -496,9 +479,9 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res } reused := !atomic.CompareAndSwapUint32(&cc.reused, 0, 1) traceGotConn(req, cc, reused) - res, err := cc.RoundTrip(req) + res, gotErrAfterReqBodyWrite, err := cc.roundTrip(req) if err != nil && retry <= 6 { - if req, err = shouldRetryRequest(req, err); err == nil { + if req, err = shouldRetryRequest(req, err, gotErrAfterReqBodyWrite); err == nil { // After the first retry, do exponential backoff with 10% jitter. if retry == 0 { continue @@ -509,7 +492,7 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res case <-time.After(time.Second * time.Duration(backoff)): continue case <-req.Context().Done(): - err = req.Context().Err() + return nil, req.Context().Err() } } } @@ -540,7 +523,7 @@ var ( // response headers. It is always called with a non-nil error. // It returns either a request to retry (either the same request, or a // modified clone), or an error if the request can't be replayed. -func shouldRetryRequest(req *http.Request, err error) (*http.Request, error) { +func shouldRetryRequest(req *http.Request, err error, afterBodyWrite bool) (*http.Request, error) { if !canRetryError(err) { return nil, err } @@ -553,6 +536,7 @@ func shouldRetryRequest(req *http.Request, err error) (*http.Request, error) { // If the request body can be reset back to its original // state via the optional req.GetBody, do that. if req.GetBody != nil { + // TODO: consider a req.Body.Close here? or audit that all caller paths do? body, err := req.GetBody() if err != nil { return nil, err @@ -564,8 +548,10 @@ func shouldRetryRequest(req *http.Request, err error) (*http.Request, error) { // The Request.Body can't reset back to the beginning, but we // don't seem to have started to read from it yet, so reuse - // the request directly. - if err == errClientConnUnusable { + // the request directly. The "afterBodyWrite" means the + // bodyWrite process has started, which becomes true before + // the first Read. + if !afterBodyWrite { return req, nil } @@ -577,10 +563,6 @@ func canRetryError(err error) bool { return true } if se, ok := err.(StreamError); ok { - if se.Code == ErrCodeProtocol && se.Cause == errFromPeer { - // See golang/go#47635, golang/go#42777 - return true - } return se.Code == ErrCodeRefusedStream } return false @@ -655,15 +637,14 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro tconn: c, readerDone: make(chan struct{}), nextStreamID: 1, - maxFrameSize: 16 << 10, // spec default - initialWindowSize: 65535, // spec default - maxConcurrentStreams: initialMaxConcurrentStreams, // "infinite", per spec. Use a smaller value until we have received server settings. - peerMaxHeaderListSize: 0xffffffffffffffff, // "infinite", per spec. Use 2^64-1 instead. + maxFrameSize: 16 << 10, // spec default + initialWindowSize: 65535, // spec default + maxConcurrentStreams: 1000, // "infinite", per spec. 1000 seems good enough. + peerMaxHeaderListSize: 0xffffffffffffffff, // "infinite", per spec. Use 2^64-1 instead. streams: make(map[uint32]*clientStream), singleUse: singleUse, wantSettingsAck: true, pings: make(map[[8]byte]chan struct{}), - reqHeaderMu: make(chan struct{}, 1), } if d := t.idleConnTimeout(); d != 0 { cc.idleTimeout = d @@ -678,16 +659,9 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro // TODO: adjust this writer size to account for frame size + // MTU + crypto/tls record padding. - cc.bw = bufio.NewWriter(stickyErrWriter{ - conn: c, - timeout: t.WriteByteTimeout, - err: &cc.werr, - }) + cc.bw = bufio.NewWriter(stickyErrWriter{c, &cc.werr}) cc.br = bufio.NewReader(c) cc.fr = NewFramer(cc.bw, cc.br) - if t.CountError != nil { - cc.fr.countError = t.CountError - } cc.fr.ReadMetaHeaders = hpack.NewDecoder(initialHeaderTableSize, nil) cc.fr.MaxHeaderListSize = t.maxHeaderListSize() @@ -740,13 +714,6 @@ func (cc *ClientConn) healthCheck() { } } -// SetDoNotReuse marks cc as not reusable for future HTTP requests. -func (cc *ClientConn) SetDoNotReuse() { - cc.mu.Lock() - defer cc.mu.Unlock() - cc.doNotReuse = true -} - func (cc *ClientConn) setGoAway(f *GoAwayFrame) { cc.mu.Lock() defer cc.mu.Unlock() @@ -764,94 +731,27 @@ func (cc *ClientConn) setGoAway(f *GoAwayFrame) { last := f.LastStreamID for streamID, cs := range cc.streams { if streamID > last { - cs.abortStreamLocked(errClientConnGotGoAway) + select { + case cs.resc <- resAndError{err: errClientConnGotGoAway}: + default: + } } } } // CanTakeNewRequest reports whether the connection can take a new request, // meaning it has not been closed or received or sent a GOAWAY. -// -// If the caller is going to immediately make a new request on this -// connection, use ReserveNewRequest instead. func (cc *ClientConn) CanTakeNewRequest() bool { cc.mu.Lock() defer cc.mu.Unlock() return cc.canTakeNewRequestLocked() } -// ReserveNewRequest is like CanTakeNewRequest but also reserves a -// concurrent stream in cc. The reservation is decremented on the -// next call to RoundTrip. -func (cc *ClientConn) ReserveNewRequest() bool { - cc.mu.Lock() - defer cc.mu.Unlock() - if st := cc.idleStateLocked(); !st.canTakeNewRequest { - return false - } - cc.streamsReserved++ - return true -} - -// ClientConnState describes the state of a ClientConn. -type ClientConnState struct { - // Closed is whether the connection is closed. - Closed bool - - // Closing is whether the connection is in the process of - // closing. It may be closing due to shutdown, being a - // single-use connection, being marked as DoNotReuse, or - // having received a GOAWAY frame. - Closing bool - - // StreamsActive is how many streams are active. - StreamsActive int - - // StreamsReserved is how many streams have been reserved via - // ClientConn.ReserveNewRequest. - StreamsReserved int - - // StreamsPending is how many requests have been sent in excess - // of the peer's advertised MaxConcurrentStreams setting and - // are waiting for other streams to complete. - StreamsPending int - - // MaxConcurrentStreams is how many concurrent streams the - // peer advertised as acceptable. Zero means no SETTINGS - // frame has been received yet. - MaxConcurrentStreams uint32 - - // LastIdle, if non-zero, is when the connection last - // transitioned to idle state. - LastIdle time.Time -} - -// State returns a snapshot of cc's state. -func (cc *ClientConn) State() ClientConnState { - cc.wmu.Lock() - maxConcurrent := cc.maxConcurrentStreams - if !cc.seenSettings { - maxConcurrent = 0 - } - cc.wmu.Unlock() - - cc.mu.Lock() - defer cc.mu.Unlock() - return ClientConnState{ - Closed: cc.closed, - Closing: cc.closing || cc.singleUse || cc.doNotReuse || cc.goAway != nil, - StreamsActive: len(cc.streams), - StreamsReserved: cc.streamsReserved, - StreamsPending: cc.pendingRequests, - LastIdle: cc.lastIdle, - MaxConcurrentStreams: maxConcurrent, - } -} - // clientConnIdleState describes the suitability of a client // connection to initiate a new RoundTrip request. type clientConnIdleState struct { canTakeNewRequest bool + freshConn bool // whether it's unused by any previous request } func (cc *ClientConn) idleState() clientConnIdleState { @@ -872,13 +772,13 @@ func (cc *ClientConn) idleStateLocked() (st clientConnIdleState) { // writing it. maxConcurrentOkay = true } else { - maxConcurrentOkay = int64(len(cc.streams)+cc.streamsReserved+1) <= int64(cc.maxConcurrentStreams) + maxConcurrentOkay = int64(len(cc.streams)+1) < int64(cc.maxConcurrentStreams) } st.canTakeNewRequest = cc.goAway == nil && !cc.closed && !cc.closing && maxConcurrentOkay && - !cc.doNotReuse && int64(cc.nextStreamID)+2*int64(cc.pendingRequests) < math.MaxInt32 && !cc.tooIdleLocked() + st.freshConn = cc.nextStreamID == 1 && st.canTakeNewRequest return } @@ -909,7 +809,7 @@ func (cc *ClientConn) onIdleTimeout() { func (cc *ClientConn) closeIfIdle() { cc.mu.Lock() - if len(cc.streams) > 0 || cc.streamsReserved > 0 { + if len(cc.streams) > 0 { cc.mu.Unlock() return } @@ -924,15 +824,9 @@ func (cc *ClientConn) closeIfIdle() { cc.tconn.Close() } -func (cc *ClientConn) isDoNotReuseAndIdle() bool { - cc.mu.Lock() - defer cc.mu.Unlock() - return cc.doNotReuse && len(cc.streams) == 0 -} - var shutdownEnterWaitStateHook = func() {} -// Shutdown gracefully closes the client connection, waiting for running streams to complete. +// Shutdown gracefully close the client connection, waiting for running streams to complete. func (cc *ClientConn) Shutdown(ctx context.Context) error { if err := cc.sendGoAway(); err != nil { return err @@ -971,18 +865,15 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error { func (cc *ClientConn) sendGoAway() error { cc.mu.Lock() - closing := cc.closing - cc.closing = true - maxStreamID := cc.nextStreamID - cc.mu.Unlock() - if closing { + defer cc.mu.Unlock() + cc.wmu.Lock() + defer cc.wmu.Unlock() + if cc.closing { // GOAWAY sent already return nil } - - cc.wmu.Lock() - defer cc.wmu.Unlock() // Send a graceful shutdown frame to server + maxStreamID := cc.nextStreamID if err := cc.fr.WriteGoAway(maxStreamID, ErrCodeNo, nil); err != nil { return err } @@ -990,6 +881,7 @@ func (cc *ClientConn) sendGoAway() error { return err } // Prevent new requests + cc.closing = true return nil } @@ -997,12 +889,17 @@ func (cc *ClientConn) sendGoAway() error { // err is sent to streams. func (cc *ClientConn) closeForError(err error) error { cc.mu.Lock() - cc.closed = true - for _, cs := range cc.streams { - cs.abortStreamLocked(err) - } defer cc.cond.Broadcast() defer cc.mu.Unlock() + for id, cs := range cc.streams { + select { + case cs.resc <- resAndError{err: err}: + default: + } + cs.bufPipe.CloseWithError(err) + delete(cc.streams, id) + } + cc.closed = true return cc.tconn.Close() } @@ -1017,9 +914,6 @@ func (cc *ClientConn) Close() error { // closes the client connection immediately. In-flight requests are interrupted. func (cc *ClientConn) closeForLostPing() error { err := errors.New("http2: client connection lost") - if f := cc.t.CountError; f != nil { - f("conn_close_lost_ping") - } return cc.closeForError(err) } @@ -1084,158 +978,41 @@ func actualContentLength(req *http.Request) int64 { return -1 } -func (cc *ClientConn) decrStreamReservations() { - cc.mu.Lock() - defer cc.mu.Unlock() - cc.decrStreamReservationsLocked() -} - -func (cc *ClientConn) decrStreamReservationsLocked() { - if cc.streamsReserved > 0 { - cc.streamsReserved-- - } -} - func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) { - ctx := req.Context() - cs := &clientStream{ - cc: cc, - ctx: ctx, - reqCancel: req.Cancel, - isHead: req.Method == "HEAD", - reqBody: req.Body, - reqBodyContentLength: actualContentLength(req), - trace: httptrace.ContextClientTrace(ctx), - peerClosed: make(chan struct{}), - abort: make(chan struct{}), - respHeaderRecv: make(chan struct{}), - donec: make(chan struct{}), - } - go cs.doRequest(req) - - waitDone := func() error { - select { - case <-cs.donec: - return nil - case <-ctx.Done(): - return ctx.Err() - case <-cs.reqCancel: - return errRequestCanceled - } - } - - handleResponseHeaders := func() (*http.Response, error) { - res := cs.res - if res.StatusCode > 299 { - // On error or status code 3xx, 4xx, 5xx, etc abort any - // ongoing write, assuming that the server doesn't care - // about our request body. If the server replied with 1xx or - // 2xx, however, then assume the server DOES potentially - // want our body (e.g. full-duplex streaming: - // golang.org/issue/13444). If it turns out the server - // doesn't, they'll RST_STREAM us soon enough. This is a - // heuristic to avoid adding knobs to Transport. Hopefully - // we can keep it. - cs.abortRequestBodyWrite() - } - res.Request = req - res.TLS = cc.tlsState - if res.Body == noBody && actualContentLength(req) == 0 { - // If there isn't a request or response body still being - // written, then wait for the stream to be closed before - // RoundTrip returns. - if err := waitDone(); err != nil { - return nil, err - } - } - return res, nil - } - - for { - select { - case <-cs.respHeaderRecv: - return handleResponseHeaders() - case <-cs.abort: - select { - case <-cs.respHeaderRecv: - // If both cs.respHeaderRecv and cs.abort are signaling, - // pick respHeaderRecv. The server probably wrote the - // response and immediately reset the stream. - // golang.org/issue/49645 - return handleResponseHeaders() - default: - waitDone() - return nil, cs.abortErr - } - case <-ctx.Done(): - err := ctx.Err() - cs.abortStream(err) - return nil, err - case <-cs.reqCancel: - cs.abortStream(errRequestCanceled) - return nil, errRequestCanceled - } - } + resp, _, err := cc.roundTrip(req) + return resp, err } -// doRequest runs for the duration of the request lifetime. -// -// It sends the request and performs post-request cleanup (closing Request.Body, etc.). -func (cs *clientStream) doRequest(req *http.Request) { - err := cs.writeRequest(req) - cs.cleanupWriteRequest(err) -} - -// writeRequest sends a request. -// -// It returns nil after the request is written, the response read, -// and the request stream is half-closed by the peer. -// -// It returns non-nil if the request ends otherwise. -// If the returned error is StreamError, the error Code may be used in resetting the stream. -func (cs *clientStream) writeRequest(req *http.Request) (err error) { - cc := cs.cc - ctx := cs.ctx - +func (cc *ClientConn) roundTrip(req *http.Request) (res *http.Response, gotErrAfterReqBodyWrite bool, err error) { if err := checkConnHeaders(req); err != nil { - return err + return nil, false, err } - - // Acquire the new-request lock by writing to reqHeaderMu. - // This lock guards the critical section covering allocating a new stream ID - // (requires mu) and creating the stream (requires wmu). - if cc.reqHeaderMu == nil { - panic("RoundTrip on uninitialized ClientConn") // for tests + if cc.idleTimer != nil { + cc.idleTimer.Stop() } - select { - case cc.reqHeaderMu <- struct{}{}: - case <-cs.reqCancel: - return errRequestCanceled - case <-ctx.Done(): - return ctx.Err() + + trailers, err := commaSeparatedTrailers(req) + if err != nil { + return nil, false, err } + hasTrailers := trailers != "" cc.mu.Lock() - if cc.idleTimer != nil { - cc.idleTimer.Stop() - } - cc.decrStreamReservationsLocked() - if err := cc.awaitOpenSlotForStreamLocked(cs); err != nil { + if err := cc.awaitOpenSlotForRequest(req); err != nil { cc.mu.Unlock() - <-cc.reqHeaderMu - return err - } - cc.addStreamLocked(cs) // assigns stream ID - if isConnectionCloseRequest(req) { - cc.doNotReuse = true + return nil, false, err } - cc.mu.Unlock() + + body := req.Body + contentLen := actualContentLength(req) + hasBody := contentLen != 0 // TODO(bradfitz): this is a copy of the logic in net/http. Unify somewhere? + var requestedGzip bool if !cc.t.disableCompression() && req.Header.Get("Accept-Encoding") == "" && req.Header.Get("Range") == "" && - !cs.isHead { + req.Method != "HEAD" { // Request gzip only, not deflate. Deflate is ambiguous and // not as universally supported anyway. // See: https://zlib.net/zlib_faq.html#faq39 @@ -1248,224 +1025,183 @@ func (cs *clientStream) writeRequest(req *http.Request) (err error) { // We don't request gzip if the request is for a range, since // auto-decoding a portion of a gzipped document will just fail // anyway. See https://golang.org/issue/8923 - cs.requestedGzip = true - } - - continueTimeout := cc.t.expectContinueTimeout() - if continueTimeout != 0 { - if !httpguts.HeaderValuesContainsToken(req.Header["Expect"], "100-continue") { - continueTimeout = 0 - } else { - cs.on100 = make(chan struct{}, 1) - } + requestedGzip = true } - // Past this point (where we send request headers), it is possible for - // RoundTrip to return successfully. Since the RoundTrip contract permits - // the caller to "mutate or reuse" the Request after closing the Response's Body, - // we must take care when referencing the Request from here on. - err = cs.encodeAndWriteHeaders(req) - <-cc.reqHeaderMu + // we send: HEADERS{1}, CONTINUATION{0,} + DATA{0,} (DATA is + // sent by writeRequestBody below, along with any Trailers, + // again in form HEADERS{1}, CONTINUATION{0,}) + hdrs, err := cc.encodeHeaders(req, requestedGzip, trailers, contentLen) if err != nil { - return err - } - - hasBody := cs.reqBodyContentLength != 0 - if !hasBody { - cs.sentEndStream = true - } else { - if continueTimeout != 0 { - traceWait100Continue(cs.trace) - timer := time.NewTimer(continueTimeout) - select { - case <-timer.C: - err = nil - case <-cs.on100: - err = nil - case <-cs.abort: - err = cs.abortErr - case <-ctx.Done(): - err = ctx.Err() - case <-cs.reqCancel: - err = errRequestCanceled - } - timer.Stop() - if err != nil { - traceWroteRequest(cs.trace, err) - return err - } - } - - if err = cs.writeRequestBody(req); err != nil { - if err != errStopReqBodyWrite { - traceWroteRequest(cs.trace, err) - return err - } - } else { - cs.sentEndStream = true - } + cc.mu.Unlock() + return nil, false, err } - traceWroteRequest(cs.trace, err) + cs := cc.newStream() + cs.req = req + cs.trace = httptrace.ContextClientTrace(req.Context()) + cs.requestedGzip = requestedGzip + bodyWriter := cc.t.getBodyWriterState(cs, body) + cs.on100 = bodyWriter.on100 - var respHeaderTimer <-chan time.Time - var respHeaderRecv chan struct{} - if d := cc.responseHeaderTimeout(); d != 0 { - timer := time.NewTimer(d) - defer timer.Stop() - respHeaderTimer = timer.C - respHeaderRecv = cs.respHeaderRecv - } - // Wait until the peer half-closes its end of the stream, - // or until the request is aborted (via context, error, or otherwise), - // whichever comes first. - for { - select { - case <-cs.peerClosed: - return nil - case <-respHeaderTimer: - return errTimeout - case <-respHeaderRecv: - respHeaderRecv = nil - respHeaderTimer = nil // keep waiting for END_STREAM - case <-cs.abort: - return cs.abortErr - case <-ctx.Done(): - return ctx.Err() - case <-cs.reqCancel: - return errRequestCanceled + defer func() { + cc.wmu.Lock() + werr := cc.werr + cc.wmu.Unlock() + if werr != nil { + cc.Close() } - } -} - -func (cs *clientStream) encodeAndWriteHeaders(req *http.Request) error { - cc := cs.cc - ctx := cs.ctx + }() cc.wmu.Lock() - defer cc.wmu.Unlock() - - // If the request was canceled while waiting for cc.mu, just quit. - select { - case <-cs.abort: - return cs.abortErr - case <-ctx.Done(): - return ctx.Err() - case <-cs.reqCancel: - return errRequestCanceled - default: - } - - // Encode headers. - // - // we send: HEADERS{1}, CONTINUATION{0,} + DATA{0,} (DATA is - // sent by writeRequestBody below, along with any Trailers, - // again in form HEADERS{1}, CONTINUATION{0,}) - trailers, err := commaSeparatedTrailers(req) - if err != nil { - return err - } - hasTrailers := trailers != "" - contentLen := actualContentLength(req) - hasBody := contentLen != 0 - hdrs, err := cc.encodeHeaders(req, cs.requestedGzip, trailers, contentLen) - if err != nil { - return err - } - - // Write the request. endStream := !hasBody && !hasTrailers - cs.sentHeaders = true - err = cc.writeHeaders(cs.ID, endStream, int(cc.maxFrameSize), hdrs) + werr := cc.writeHeaders(cs.ID, endStream, int(cc.maxFrameSize), hdrs) + cc.wmu.Unlock() traceWroteHeaders(cs.trace) - return err -} - -// cleanupWriteRequest performs post-request tasks. -// -// If err (the result of writeRequest) is non-nil and the stream is not closed, -// cleanupWriteRequest will send a reset to the peer. -func (cs *clientStream) cleanupWriteRequest(err error) { - cc := cs.cc - - if cs.ID == 0 { - // We were canceled before creating the stream, so return our reservation. - cc.decrStreamReservations() - } - - // TODO: write h12Compare test showing whether - // Request.Body is closed by the Transport, - // and in multiple cases: server replies <=299 and >299 - // while still writing request body - cc.mu.Lock() - bodyClosed := cs.reqBodyClosed - cs.reqBodyClosed = true cc.mu.Unlock() - if !bodyClosed && cs.reqBody != nil { - cs.reqBody.Close() + + if werr != nil { + if hasBody { + req.Body.Close() // per RoundTripper contract + bodyWriter.cancel() + } + cc.forgetStreamID(cs.ID) + // Don't bother sending a RST_STREAM (our write already failed; + // no need to keep writing) + traceWroteRequest(cs.trace, werr) + return nil, false, werr } - if err != nil && cs.sentEndStream { - // If the connection is closed immediately after the response is read, - // we may be aborted before finishing up here. If the stream was closed - // cleanly on both sides, there is no error. - select { - case <-cs.peerClosed: - err = nil - default: + var respHeaderTimer <-chan time.Time + if hasBody { + bodyWriter.scheduleBodyWrite() + } else { + traceWroteRequest(cs.trace, nil) + if d := cc.responseHeaderTimeout(); d != 0 { + timer := time.NewTimer(d) + defer timer.Stop() + respHeaderTimer = timer.C } } - if err != nil { - cs.abortStream(err) // possibly redundant, but harmless - if cs.sentHeaders { - if se, ok := err.(StreamError); ok { - if se.Cause != errFromPeer { - cc.writeStreamReset(cs.ID, se.Code, err) - } - } else { - cc.writeStreamReset(cs.ID, ErrCodeCancel, err) + + readLoopResCh := cs.resc + bodyWritten := false + ctx := req.Context() + + handleReadLoopResponse := func(re resAndError) (*http.Response, bool, error) { + res := re.res + if re.err != nil || res.StatusCode > 299 { + // On error or status code 3xx, 4xx, 5xx, etc abort any + // ongoing write, assuming that the server doesn't care + // about our request body. If the server replied with 1xx or + // 2xx, however, then assume the server DOES potentially + // want our body (e.g. full-duplex streaming: + // golang.org/issue/13444). If it turns out the server + // doesn't, they'll RST_STREAM us soon enough. This is a + // heuristic to avoid adding knobs to Transport. Hopefully + // we can keep it. + bodyWriter.cancel() + cs.abortRequestBodyWrite(errStopReqBodyWrite) + if hasBody && !bodyWritten { + <-bodyWriter.resc } } - cs.bufPipe.CloseWithError(err) // no-op if already closed - } else { - if cs.sentHeaders && !cs.sentEndStream { - cc.writeStreamReset(cs.ID, ErrCodeNo, nil) + if re.err != nil { + cc.forgetStreamID(cs.ID) + return nil, cs.getStartedWrite(), re.err } - cs.bufPipe.CloseWithError(errRequestCanceled) + res.Request = req + res.TLS = cc.tlsState + return res, false, nil } - if cs.ID != 0 { + + handleError := func(err error) (*http.Response, bool, error) { + if !hasBody || bodyWritten { + cc.writeStreamReset(cs.ID, ErrCodeCancel, nil) + } else { + bodyWriter.cancel() + cs.abortRequestBodyWrite(errStopReqBodyWriteAndCancel) + <-bodyWriter.resc + } cc.forgetStreamID(cs.ID) + return nil, cs.getStartedWrite(), err } - cc.wmu.Lock() - werr := cc.werr - cc.wmu.Unlock() - if werr != nil { - cc.Close() + for { + select { + case re := <-readLoopResCh: + return handleReadLoopResponse(re) + case <-respHeaderTimer: + return handleError(errTimeout) + case <-ctx.Done(): + return handleError(ctx.Err()) + case <-req.Cancel: + return handleError(errRequestCanceled) + case <-cs.peerReset: + // processResetStream already removed the + // stream from the streams map; no need for + // forgetStreamID. + return nil, cs.getStartedWrite(), cs.resetErr + case err := <-bodyWriter.resc: + bodyWritten = true + // Prefer the read loop's response, if available. Issue 16102. + select { + case re := <-readLoopResCh: + return handleReadLoopResponse(re) + default: + } + if err != nil { + cc.forgetStreamID(cs.ID) + return nil, cs.getStartedWrite(), err + } + if d := cc.responseHeaderTimeout(); d != 0 { + timer := time.NewTimer(d) + defer timer.Stop() + respHeaderTimer = timer.C + } + } } - - close(cs.donec) } -// awaitOpenSlotForStream waits until len(streams) < maxConcurrentStreams. +// awaitOpenSlotForRequest waits until len(streams) < maxConcurrentStreams. // Must hold cc.mu. -func (cc *ClientConn) awaitOpenSlotForStreamLocked(cs *clientStream) error { +func (cc *ClientConn) awaitOpenSlotForRequest(req *http.Request) error { + var waitingForConn chan struct{} + var waitingForConnErr error // guarded by cc.mu for { cc.lastActive = time.Now() if cc.closed || !cc.canTakeNewRequestLocked() { + if waitingForConn != nil { + close(waitingForConn) + } return errClientConnUnusable } cc.lastIdle = time.Time{} - if int64(len(cc.streams)) < int64(cc.maxConcurrentStreams) { + if int64(len(cc.streams))+1 <= int64(cc.maxConcurrentStreams) { + if waitingForConn != nil { + close(waitingForConn) + } return nil } + // Unfortunately, we cannot wait on a condition variable and channel at + // the same time, so instead, we spin up a goroutine to check if the + // request is canceled while we wait for a slot to open in the connection. + if waitingForConn == nil { + waitingForConn = make(chan struct{}) + go func() { + if err := awaitRequestCancel(req, waitingForConn); err != nil { + cc.mu.Lock() + waitingForConnErr = err + cc.cond.Broadcast() + cc.mu.Unlock() + } + }() + } cc.pendingRequests++ cc.cond.Wait() cc.pendingRequests-- - select { - case <-cs.abort: - return cs.abortErr - default: + if waitingForConnErr != nil { + return waitingForConnErr } } } @@ -1492,6 +1228,10 @@ func (cc *ClientConn) writeHeaders(streamID uint32, endStream bool, maxFrameSize cc.fr.WriteContinuation(streamID, endHeaders, chunk) } } + // TODO(bradfitz): this Flush could potentially block (as + // could the WriteHeaders call(s) above), which means they + // wouldn't respond to Request.Cancel being readable. That's + // rare, but this should probably be in a goroutine. cc.bw.Flush() return cc.werr } @@ -1518,7 +1258,7 @@ func (cs *clientStream) frameScratchBufferLen(maxFrameSize int) int { if n > max { n = max } - if cl := cs.reqBodyContentLength; cl != -1 && cl+1 < n { + if cl := actualContentLength(cs.req); cl != -1 && cl+1 < n { // Add an extra byte past the declared content-length to // give the caller's Request.Body io.Reader a chance to // give us more bytes than they declared, so we can catch it @@ -1533,13 +1273,31 @@ func (cs *clientStream) frameScratchBufferLen(maxFrameSize int) int { var bufPool sync.Pool // of *[]byte -func (cs *clientStream) writeRequestBody(req *http.Request) (err error) { +func (cs *clientStream) writeRequestBody(body io.Reader, bodyCloser io.Closer) (err error) { cc := cs.cc - body := cs.reqBody sentEnd := false // whether we sent the final DATA frame w/ END_STREAM + defer func() { + traceWroteRequest(cs.trace, err) + // TODO: write h12Compare test showing whether + // Request.Body is closed by the Transport, + // and in multiple cases: server replies <=299 and >299 + // while still writing request body + var cerr error + cc.mu.Lock() + if cs.stopReqBody == nil { + cs.stopReqBody = errStopReqBodyWrite + cerr = bodyCloser.Close() + } + cc.mu.Unlock() + if err == nil { + err = cerr + } + }() + + req := cs.req hasTrailers := req.Trailer != nil - remainLen := cs.reqBodyContentLength + remainLen := actualContentLength(req) hasContentLen := remainLen != -1 cc.mu.Lock() @@ -1577,29 +1335,29 @@ func (cs *clientStream) writeRequestBody(req *http.Request) (err error) { } if remainLen < 0 { err = errReqBodyTooLong + cc.writeStreamReset(cs.ID, ErrCodeCancel, err) return err } } - if err != nil { - cc.mu.Lock() - bodyClosed := cs.reqBodyClosed - cc.mu.Unlock() - switch { - case bodyClosed: - return errStopReqBodyWrite - case err == io.EOF: - sawEOF = true - err = nil - default: - return err - } + if err == io.EOF { + sawEOF = true + err = nil + } else if err != nil { + cc.writeStreamReset(cs.ID, ErrCodeCancel, err) + return err } remain := buf[:n] for len(remain) > 0 && err == nil { var allowed int32 allowed, err = cs.awaitFlowControl(len(remain)) - if err != nil { + switch { + case err == errStopReqBodyWrite: + return err + case err == errStopReqBodyWriteAndCancel: + cc.writeStreamReset(cs.ID, ErrCodeCancel, nil) + return err + case err != nil: return err } cc.wmu.Lock() @@ -1630,27 +1388,21 @@ func (cs *clientStream) writeRequestBody(req *http.Request) (err error) { return nil } - // Since the RoundTrip contract permits the caller to "mutate or reuse" - // a request after the Response's Body is closed, verify that this hasn't - // happened before accessing the trailers. - cc.mu.Lock() - trailer := req.Trailer - err = cs.abortErr - cc.mu.Unlock() - if err != nil { - return err - } - - cc.wmu.Lock() - defer cc.wmu.Unlock() var trls []byte - if len(trailer) > 0 { - trls, err = cc.encodeTrailers(trailer) + if hasTrailers { + cc.mu.Lock() + trls, err = cc.encodeTrailers(req) + cc.mu.Unlock() if err != nil { + cc.writeStreamReset(cs.ID, ErrCodeInternal, err) + cc.forgetStreamID(cs.ID) return err } } + cc.wmu.Lock() + defer cc.wmu.Unlock() + // Two ways to send END_STREAM: either with trailers, or // with an empty DATA frame. if len(trls) > 0 { @@ -1670,24 +1422,17 @@ func (cs *clientStream) writeRequestBody(req *http.Request) (err error) { // if the stream is dead. func (cs *clientStream) awaitFlowControl(maxBytes int) (taken int32, err error) { cc := cs.cc - ctx := cs.ctx cc.mu.Lock() defer cc.mu.Unlock() for { if cc.closed { return 0, errClientConnClosed } - if cs.reqBodyClosed { - return 0, errStopReqBodyWrite + if cs.stopReqBody != nil { + return 0, cs.stopReqBody } - select { - case <-cs.abort: - return 0, cs.abortErr - case <-ctx.Done(): - return 0, ctx.Err() - case <-cs.reqCancel: - return 0, errRequestCanceled - default: + if err := cs.checkResetOrDone(); err != nil { + return 0, err } if a := cs.flow.available(); a > 0 { take := a @@ -1705,14 +1450,9 @@ func (cs *clientStream) awaitFlowControl(maxBytes int) (taken int32, err error) } } -var errNilRequestURL = errors.New("http2: Request.URI is nil") - -// requires cc.wmu be held. +// requires cc.mu be held. func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trailers string, contentLength int64) ([]byte, error) { cc.hbuf.Reset() - if req.URL == nil { - return nil, errNilRequestURL - } host := req.Host if host == "" { @@ -1898,12 +1638,12 @@ func shouldSendReqContentLength(method string, contentLength int64) bool { } } -// requires cc.wmu be held. -func (cc *ClientConn) encodeTrailers(trailer http.Header) ([]byte, error) { +// requires cc.mu be held. +func (cc *ClientConn) encodeTrailers(req *http.Request) ([]byte, error) { cc.hbuf.Reset() hlSize := uint64(0) - for k, vv := range trailer { + for k, vv := range req.Trailer { for _, v := range vv { hf := hpack.HeaderField{Name: k, Value: v} hlSize += uint64(hf.Size()) @@ -1913,7 +1653,7 @@ func (cc *ClientConn) encodeTrailers(trailer http.Header) ([]byte, error) { return nil, errRequestHeaderListSize } - for k, vv := range trailer { + for k, vv := range req.Trailer { lowKey, ascii := asciiToLower(k) if !ascii { // Skip writing invalid headers. Per RFC 7540, Section 8.1.2, header @@ -1943,51 +1683,51 @@ type resAndError struct { } // requires cc.mu be held. -func (cc *ClientConn) addStreamLocked(cs *clientStream) { +func (cc *ClientConn) newStream() *clientStream { + cs := &clientStream{ + cc: cc, + ID: cc.nextStreamID, + resc: make(chan resAndError, 1), + peerReset: make(chan struct{}), + done: make(chan struct{}), + } cs.flow.add(int32(cc.initialWindowSize)) cs.flow.setConnFlow(&cc.flow) cs.inflow.add(transportDefaultStreamFlow) cs.inflow.setConnFlow(&cc.inflow) - cs.ID = cc.nextStreamID cc.nextStreamID += 2 cc.streams[cs.ID] = cs - if cs.ID == 0 { - panic("assigned stream ID 0") - } + return cs } func (cc *ClientConn) forgetStreamID(id uint32) { - cc.mu.Lock() - slen := len(cc.streams) - delete(cc.streams, id) - if len(cc.streams) != slen-1 { - panic("forgetting unknown stream id") - } - cc.lastActive = time.Now() - if len(cc.streams) == 0 && cc.idleTimer != nil { - cc.idleTimer.Reset(cc.idleTimeout) - cc.lastIdle = time.Now() - } - // Wake up writeRequestBody via clientStream.awaitFlowControl and - // wake up RoundTrip if there is a pending request. - cc.cond.Broadcast() + cc.streamByID(id, true) +} - closeOnIdle := cc.singleUse || cc.doNotReuse || cc.t.disableKeepAlives() - if closeOnIdle && cc.streamsReserved == 0 && len(cc.streams) == 0 { - if VerboseLogs { - cc.vlogf("http2: Transport closing idle conn %p (forSingleUse=%v, maxStream=%v)", cc, cc.singleUse, cc.nextStreamID-2) - } - cc.closed = true - defer cc.tconn.Close() +func (cc *ClientConn) streamByID(id uint32, andRemove bool) *clientStream { + cc.mu.Lock() + defer cc.mu.Unlock() + cs := cc.streams[id] + if andRemove && cs != nil && !cc.closed { + cc.lastActive = time.Now() + delete(cc.streams, id) + if len(cc.streams) == 0 && cc.idleTimer != nil { + cc.idleTimer.Reset(cc.idleTimeout) + cc.lastIdle = time.Now() + } + close(cs.done) + // Wake up checkResetOrDone via clientStream.awaitFlowControl and + // wake up RoundTrip if there is a pending request. + cc.cond.Broadcast() } - - cc.mu.Unlock() + return cs } // clientConnReadLoop is the state owned by the clientConn's frame-reading readLoop. type clientConnReadLoop struct { - _ incomparable - cc *ClientConn + _ incomparable + cc *ClientConn + closeWhenIdle bool } // readLoop runs in its own goroutine and reads and dispatches frames. @@ -2047,49 +1787,23 @@ func (rl *clientConnReadLoop) cleanup() { } else if err == io.EOF { err = io.ErrUnexpectedEOF } - cc.closed = true for _, cs := range cc.streams { + cs.bufPipe.CloseWithError(err) // no-op if already closed select { - case <-cs.peerClosed: - // The server closed the stream before closing the conn, - // so no need to interrupt it. + case cs.resc <- resAndError{err: err}: default: - cs.abortStreamLocked(err) } + close(cs.done) } + cc.closed = true cc.cond.Broadcast() cc.mu.Unlock() } -// countReadFrameError calls Transport.CountError with a string -// representing err. -func (cc *ClientConn) countReadFrameError(err error) { - f := cc.t.CountError - if f == nil || err == nil { - return - } - if ce, ok := err.(ConnectionError); ok { - errCode := ErrCode(ce) - f(fmt.Sprintf("read_frame_conn_error_%s", errCode.stringToken())) - return - } - if errors.Is(err, io.EOF) { - f("read_frame_eof") - return - } - if errors.Is(err, io.ErrUnexpectedEOF) { - f("read_frame_unexpected_eof") - return - } - if errors.Is(err, ErrFrameTooLarge) { - f("read_frame_too_large") - return - } - f("read_frame_other") -} - func (rl *clientConnReadLoop) run() error { cc := rl.cc + rl.closeWhenIdle = cc.t.disableKeepAlives() || cc.singleUse + gotReply := false // ever saw a HEADERS reply gotSettings := false readIdleTimeout := cc.t.ReadIdleTimeout var t *time.Timer @@ -2106,7 +1820,9 @@ func (rl *clientConnReadLoop) run() error { cc.vlogf("http2: Transport readFrame error on conn %p: (%T) %v", cc, err, err) } if se, ok := err.(StreamError); ok { - if cs := rl.streamByID(se.StreamID); cs != nil { + if cs := cc.streamByID(se.StreamID, false); cs != nil { + cs.cc.writeStreamReset(cs.ID, se.Code, err) + cs.cc.forgetStreamID(cs.ID) if se.Cause == nil { se.Cause = cc.fr.errDetail } @@ -2114,7 +1830,6 @@ func (rl *clientConnReadLoop) run() error { } continue } else if err != nil { - cc.countReadFrameError(err) return err } if VerboseLogs { @@ -2127,16 +1842,22 @@ func (rl *clientConnReadLoop) run() error { } gotSettings = true } + maybeIdle := false // whether frame might transition us to idle switch f := f.(type) { case *MetaHeadersFrame: err = rl.processHeaders(f) + maybeIdle = true + gotReply = true case *DataFrame: err = rl.processData(f) + maybeIdle = true case *GoAwayFrame: err = rl.processGoAway(f) + maybeIdle = true case *RSTStreamFrame: err = rl.processResetStream(f) + maybeIdle = true case *SettingsFrame: err = rl.processSettings(f) case *PushPromiseFrame: @@ -2154,24 +1875,38 @@ func (rl *clientConnReadLoop) run() error { } return err } + if rl.closeWhenIdle && gotReply && maybeIdle { + cc.closeIfIdle() + } } } func (rl *clientConnReadLoop) processHeaders(f *MetaHeadersFrame) error { - cs := rl.streamByID(f.StreamID) + cc := rl.cc + cs := cc.streamByID(f.StreamID, false) if cs == nil { // We'd get here if we canceled a request while the // server had its response still in flight. So if this // was just something we canceled, ignore it. return nil } - if cs.readClosed { - rl.endStreamError(cs, StreamError{ - StreamID: f.StreamID, - Code: ErrCodeProtocol, - Cause: errors.New("protocol error: headers after END_STREAM"), - }) - return nil + if f.StreamEnded() { + // Issue 20521: If the stream has ended, streamByID() causes + // clientStream.done to be closed, which causes the request's bodyWriter + // to be closed with an errStreamClosed, which may be received by + // clientConn.RoundTrip before the result of processing these headers. + // Deferring stream closure allows the header processing to occur first. + // clientConn.RoundTrip may still receive the bodyWriter error first, but + // the fix for issue 16102 prioritises any response. + // + // Issue 22413: If there is no request body, we should close the + // stream before writing to cs.resc so that the stream is closed + // immediately once RoundTrip returns. + if cs.req.Body != nil { + defer cc.forgetStreamID(f.StreamID) + } else { + cc.forgetStreamID(f.StreamID) + } } if !cs.firstByte { if cs.trace != nil { @@ -2195,11 +1930,9 @@ func (rl *clientConnReadLoop) processHeaders(f *MetaHeadersFrame) error { return err } // Any other error type is a stream error. - rl.endStreamError(cs, StreamError{ - StreamID: f.StreamID, - Code: ErrCodeProtocol, - Cause: err, - }) + cs.cc.writeStreamReset(f.StreamID, ErrCodeProtocol, err) + cc.forgetStreamID(cs.ID) + cs.resc <- resAndError{err: err} return nil // return nil from process* funcs to keep conn alive } if res == nil { @@ -2207,11 +1940,7 @@ func (rl *clientConnReadLoop) processHeaders(f *MetaHeadersFrame) error { return nil } cs.resTrailer = &res.Trailer - cs.res = res - close(cs.respHeaderRecv) - if f.StreamEnded() { - rl.endStream(cs) - } + cs.resc <- resAndError{res: res} return nil } @@ -2273,9 +2002,6 @@ func (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFra } if statusCode >= 100 && statusCode <= 199 { - if f.StreamEnded() { - return nil, errors.New("1xx informational response with END_STREAM flag") - } cs.num1xx++ const max1xxResponses = 5 // arbitrary bound on number of informational responses, same as net/http if cs.num1xx > max1xxResponses { @@ -2288,49 +2014,42 @@ func (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFra } if statusCode == 100 { traceGot100Continue(cs.trace) - select { - case cs.on100 <- struct{}{}: - default: + if cs.on100 != nil { + cs.on100() // forces any write delay timer to fire } } cs.pastHeaders = false // do it all again return nil, nil } - res.ContentLength = -1 - if clens := res.Header["Content-Length"]; len(clens) == 1 { - if cl, err := strconv.ParseUint(clens[0], 10, 63); err == nil { - res.ContentLength = int64(cl) - } else { + streamEnded := f.StreamEnded() + isHead := cs.req.Method == "HEAD" + if !streamEnded || isHead { + res.ContentLength = -1 + if clens := res.Header["Content-Length"]; len(clens) == 1 { + if cl, err := strconv.ParseUint(clens[0], 10, 63); err == nil { + res.ContentLength = int64(cl) + } else { + // TODO: care? unlike http/1, it won't mess up our framing, so it's + // more safe smuggling-wise to ignore. + } + } else if len(clens) > 1 { // TODO: care? unlike http/1, it won't mess up our framing, so it's // more safe smuggling-wise to ignore. } - } else if len(clens) > 1 { - // TODO: care? unlike http/1, it won't mess up our framing, so it's - // more safe smuggling-wise to ignore. - } else if f.StreamEnded() && !cs.isHead { - res.ContentLength = 0 } - if cs.isHead { + if streamEnded || isHead { res.Body = noBody return res, nil } - if f.StreamEnded() { - if res.ContentLength > 0 { - res.Body = missingBody{} - } else { - res.Body = noBody - } - return res, nil - } - - cs.bufPipe.setBuffer(&dataBuffer{expected: res.ContentLength}) + cs.bufPipe = pipe{b: &dataBuffer{expected: res.ContentLength}} cs.bytesRemain = res.ContentLength res.Body = transportResponseBody{cs} + go cs.awaitRequestCancel(cs.req) - if cs.requestedGzip && asciiEqualFold(res.Header.Get("Content-Encoding"), "gzip") { + if cs.requestedGzip && res.Header.Get("Content-Encoding") == "gzip" { res.Header.Del("Content-Encoding") res.Header.Del("Content-Length") res.ContentLength = -1 @@ -2369,7 +2088,8 @@ func (rl *clientConnReadLoop) processTrailers(cs *clientStream, f *MetaHeadersFr } // transportResponseBody is the concrete type of Transport.RoundTrip's -// Response.Body. It is an io.ReadCloser. +// Response.Body. It is an io.ReadCloser. On Read, it reads from cs.body. +// On Close it sends RST_STREAM if EOF wasn't already seen. type transportResponseBody struct { cs *clientStream } @@ -2387,7 +2107,7 @@ func (b transportResponseBody) Read(p []byte) (n int, err error) { n = int(cs.bytesRemain) if err == nil { err = errors.New("net/http: server replied with more than declared Content-Length; truncated") - cs.abortStream(err) + cc.writeStreamReset(cs.ID, ErrCodeProtocol, err) } cs.readErr = err return int(cs.bytesRemain), err @@ -2405,6 +2125,8 @@ func (b transportResponseBody) Read(p []byte) (n int, err error) { } cc.mu.Lock() + defer cc.mu.Unlock() + var connAdd, streamAdd int32 // Check the conn-level first, before the stream-level. if v := cc.inflow.available(); v < transportDefaultConnFlow/2 { @@ -2421,8 +2143,6 @@ func (b transportResponseBody) Read(p []byte) (n int, err error) { cs.inflow.add(streamAdd) } } - cc.mu.Unlock() - if connAdd != 0 || streamAdd != 0 { cc.wmu.Lock() defer cc.wmu.Unlock() @@ -2443,45 +2163,34 @@ func (b transportResponseBody) Close() error { cs := b.cs cc := cs.cc + serverSentStreamEnd := cs.bufPipe.Err() == io.EOF unread := cs.bufPipe.Len() - if unread > 0 { - cc.mu.Lock() - // Return connection-level flow control. - if unread > 0 { - cc.inflow.add(int32(unread)) - } - cc.mu.Unlock() - // TODO(dneil): Acquiring this mutex can block indefinitely. - // Move flow control return to a goroutine? + if unread > 0 || !serverSentStreamEnd { + cc.mu.Lock() cc.wmu.Lock() + if !serverSentStreamEnd { + cc.fr.WriteRSTStream(cs.ID, ErrCodeCancel) + cs.didReset = true + } // Return connection-level flow control. if unread > 0 { + cc.inflow.add(int32(unread)) cc.fr.WriteWindowUpdate(0, uint32(unread)) } cc.bw.Flush() cc.wmu.Unlock() + cc.mu.Unlock() } cs.bufPipe.BreakWithError(errClosedResponseBody) - cs.abortStream(errClosedResponseBody) - - select { - case <-cs.donec: - case <-cs.ctx.Done(): - // See golang/go#49366: The net/http package can cancel the - // request context after the response body is fully read. - // Don't treat this as an error. - return nil - case <-cs.reqCancel: - return errRequestCanceled - } + cc.forgetStreamID(cs.ID) return nil } func (rl *clientConnReadLoop) processData(f *DataFrame) error { cc := rl.cc - cs := rl.streamByID(f.StreamID) + cs := cc.streamByID(f.StreamID, f.StreamEnded()) data := f.Data() if cs == nil { cc.mu.Lock() @@ -2510,14 +2219,6 @@ func (rl *clientConnReadLoop) processData(f *DataFrame) error { } return nil } - if cs.readClosed { - cc.logf("protocol error: received DATA after END_STREAM") - rl.endStreamError(cs, StreamError{ - StreamID: f.StreamID, - Code: ErrCodeProtocol, - }) - return nil - } if !cs.firstByte { cc.logf("protocol error: received DATA before a HEADERS frame") rl.endStreamError(cs, StreamError{ @@ -2527,7 +2228,7 @@ func (rl *clientConnReadLoop) processData(f *DataFrame) error { return nil } if f.Length > 0 { - if cs.isHead && len(data) > 0 { + if cs.req.Method == "HEAD" && len(data) > 0 { cc.logf("protocol error: received DATA on a HEAD request") rl.endStreamError(cs, StreamError{ StreamID: f.StreamID, @@ -2549,39 +2250,30 @@ func (rl *clientConnReadLoop) processData(f *DataFrame) error { if pad := int(f.Length) - len(data); pad > 0 { refund += pad } - - didReset := false - var err error - if len(data) > 0 { - if _, err = cs.bufPipe.Write(data); err != nil { - // Return len(data) now if the stream is already closed, - // since data will never be read. - didReset = true - refund += len(data) - } + // Return len(data) now if the stream is already closed, + // since data will never be read. + didReset := cs.didReset + if didReset { + refund += len(data) } - if refund > 0 { cc.inflow.add(int32(refund)) - if !didReset { - cs.inflow.add(int32(refund)) - } - } - cc.mu.Unlock() - - if refund > 0 { cc.wmu.Lock() cc.fr.WriteWindowUpdate(0, uint32(refund)) if !didReset { + cs.inflow.add(int32(refund)) cc.fr.WriteWindowUpdate(cs.ID, uint32(refund)) } cc.bw.Flush() cc.wmu.Unlock() } + cc.mu.Unlock() - if err != nil { - rl.endStreamError(cs, err) - return nil + if len(data) > 0 && !didReset { + if _, err := cs.bufPipe.Write(data); err != nil { + rl.endStreamError(cs, err) + return err + } } } @@ -2594,32 +2286,24 @@ func (rl *clientConnReadLoop) processData(f *DataFrame) error { func (rl *clientConnReadLoop) endStream(cs *clientStream) { // TODO: check that any declared content-length matches, like // server.go's (*stream).endStream method. - if !cs.readClosed { - cs.readClosed = true - // Close cs.bufPipe and cs.peerClosed with cc.mu held to avoid a - // race condition: The caller can read io.EOF from Response.Body - // and close the body before we close cs.peerClosed, causing - // cleanupWriteRequest to send a RST_STREAM. - rl.cc.mu.Lock() - defer rl.cc.mu.Unlock() - cs.bufPipe.closeWithErrorAndCode(io.EOF, cs.copyTrailers) - close(cs.peerClosed) - } + rl.endStreamError(cs, nil) } func (rl *clientConnReadLoop) endStreamError(cs *clientStream, err error) { - cs.readAborted = true - cs.abortStream(err) -} + var code func() + if err == nil { + err = io.EOF + code = cs.copyTrailers + } + if isConnectionCloseRequest(cs.req) { + rl.closeWhenIdle = true + } + cs.bufPipe.closeWithErrorAndCode(err, code) -func (rl *clientConnReadLoop) streamByID(id uint32) *clientStream { - rl.cc.mu.Lock() - defer rl.cc.mu.Unlock() - cs := rl.cc.streams[id] - if cs != nil && !cs.readAborted { - return cs + select { + case cs.resc <- resAndError{err: err}: + default: } - return nil } func (cs *clientStream) copyTrailers() { @@ -2638,33 +2322,12 @@ func (rl *clientConnReadLoop) processGoAway(f *GoAwayFrame) error { if f.ErrCode != 0 { // TODO: deal with GOAWAY more. particularly the error code cc.vlogf("transport got GOAWAY with error code = %v", f.ErrCode) - if fn := cc.t.CountError; fn != nil { - fn("recv_goaway_" + f.ErrCode.stringToken()) - } - } cc.setGoAway(f) return nil } func (rl *clientConnReadLoop) processSettings(f *SettingsFrame) error { - cc := rl.cc - // Locking both mu and wmu here allows frame encoding to read settings with only wmu held. - // Acquiring wmu when f.IsAck() is unnecessary, but convenient and mostly harmless. - cc.wmu.Lock() - defer cc.wmu.Unlock() - - if err := rl.processSettingsNoWrite(f); err != nil { - return err - } - if !f.IsAck() { - cc.fr.WriteSettingsAck() - cc.bw.Flush() - } - return nil -} - -func (rl *clientConnReadLoop) processSettingsNoWrite(f *SettingsFrame) error { cc := rl.cc cc.mu.Lock() defer cc.mu.Unlock() @@ -2677,14 +2340,12 @@ func (rl *clientConnReadLoop) processSettingsNoWrite(f *SettingsFrame) error { return ConnectionError(ErrCodeProtocol) } - var seenMaxConcurrentStreams bool err := f.ForeachSetting(func(s Setting) error { switch s.ID { case SettingMaxFrameSize: cc.maxFrameSize = s.Val case SettingMaxConcurrentStreams: cc.maxConcurrentStreams = s.Val - seenMaxConcurrentStreams = true case SettingMaxHeaderListSize: cc.peerMaxHeaderListSize = uint64(s.Val) case SettingInitialWindowSize: @@ -2716,23 +2377,17 @@ func (rl *clientConnReadLoop) processSettingsNoWrite(f *SettingsFrame) error { return err } - if !cc.seenSettings { - if !seenMaxConcurrentStreams { - // This was the servers initial SETTINGS frame and it - // didn't contain a MAX_CONCURRENT_STREAMS field so - // increase the number of concurrent streams this - // connection can establish to our default. - cc.maxConcurrentStreams = defaultMaxConcurrentStreams - } - cc.seenSettings = true - } + cc.wmu.Lock() + defer cc.wmu.Unlock() - return nil + cc.fr.WriteSettingsAck() + cc.bw.Flush() + return cc.werr } func (rl *clientConnReadLoop) processWindowUpdate(f *WindowUpdateFrame) error { cc := rl.cc - cs := rl.streamByID(f.StreamID) + cs := cc.streamByID(f.StreamID, false) if f.StreamID != 0 && cs == nil { return nil } @@ -2752,22 +2407,24 @@ func (rl *clientConnReadLoop) processWindowUpdate(f *WindowUpdateFrame) error { } func (rl *clientConnReadLoop) processResetStream(f *RSTStreamFrame) error { - cs := rl.streamByID(f.StreamID) + cs := rl.cc.streamByID(f.StreamID, true) if cs == nil { - // TODO: return error if server tries to RST_STREAM an idle stream + // TODO: return error if server tries to RST_STEAM an idle stream return nil } - serr := streamError(cs.ID, f.ErrCode) - serr.Cause = errFromPeer - if f.ErrCode == ErrCodeProtocol { - rl.cc.SetDoNotReuse() - } - if fn := cs.cc.t.CountError; fn != nil { - fn("recv_rststream_" + f.ErrCode.stringToken()) + select { + case <-cs.peerReset: + // Already reset. + // This is the only goroutine + // which closes this, so there + // isn't a race. + default: + err := streamError(cs.ID, f.ErrCode) + cs.resetErr = err + close(cs.peerReset) + cs.bufPipe.CloseWithError(err) + cs.cc.cond.Broadcast() // wake up checkResetOrDone via clientStream.awaitFlowControl } - cs.abortStream(serr) - - cs.bufPipe.CloseWithError(serr) return nil } @@ -2789,24 +2446,19 @@ func (cc *ClientConn) Ping(ctx context.Context) error { } cc.mu.Unlock() } - errc := make(chan error, 1) - go func() { - cc.wmu.Lock() - defer cc.wmu.Unlock() - if err := cc.fr.WritePing(false, p); err != nil { - errc <- err - return - } - if err := cc.bw.Flush(); err != nil { - errc <- err - return - } - }() + cc.wmu.Lock() + if err := cc.fr.WritePing(false, p); err != nil { + cc.wmu.Unlock() + return err + } + if err := cc.bw.Flush(); err != nil { + cc.wmu.Unlock() + return err + } + cc.wmu.Unlock() select { case <-c: return nil - case err := <-errc: - return err case <-ctx.Done(): return ctx.Err() case <-cc.readerDone: @@ -2883,11 +2535,6 @@ func (t *Transport) logf(format string, args ...interface{}) { var noBody io.ReadCloser = ioutil.NopCloser(bytes.NewReader(nil)) -type missingBody struct{} - -func (missingBody) Close() error { return nil } -func (missingBody) Read([]byte) (int, error) { return 0, io.ErrUnexpectedEOF } - func strSliceContains(ss []string, s string) bool { for _, v := range ss { if v == s { @@ -2933,6 +2580,87 @@ type errorReader struct{ err error } func (r errorReader) Read(p []byte) (int, error) { return 0, r.err } +// bodyWriterState encapsulates various state around the Transport's writing +// of the request body, particularly regarding doing delayed writes of the body +// when the request contains "Expect: 100-continue". +type bodyWriterState struct { + cs *clientStream + timer *time.Timer // if non-nil, we're doing a delayed write + fnonce *sync.Once // to call fn with + fn func() // the code to run in the goroutine, writing the body + resc chan error // result of fn's execution + delay time.Duration // how long we should delay a delayed write for +} + +func (t *Transport) getBodyWriterState(cs *clientStream, body io.Reader) (s bodyWriterState) { + s.cs = cs + if body == nil { + return + } + resc := make(chan error, 1) + s.resc = resc + s.fn = func() { + cs.cc.mu.Lock() + cs.startedWrite = true + cs.cc.mu.Unlock() + resc <- cs.writeRequestBody(body, cs.req.Body) + } + s.delay = t.expectContinueTimeout() + if s.delay == 0 || + !httpguts.HeaderValuesContainsToken( + cs.req.Header["Expect"], + "100-continue") { + return + } + s.fnonce = new(sync.Once) + + // Arm the timer with a very large duration, which we'll + // intentionally lower later. It has to be large now because + // we need a handle to it before writing the headers, but the + // s.delay value is defined to not start until after the + // request headers were written. + const hugeDuration = 365 * 24 * time.Hour + s.timer = time.AfterFunc(hugeDuration, func() { + s.fnonce.Do(s.fn) + }) + return +} + +func (s bodyWriterState) cancel() { + if s.timer != nil { + if s.timer.Stop() { + s.resc <- nil + } + } +} + +func (s bodyWriterState) on100() { + if s.timer == nil { + // If we didn't do a delayed write, ignore the server's + // bogus 100 continue response. + return + } + s.timer.Stop() + go func() { s.fnonce.Do(s.fn) }() +} + +// scheduleBodyWrite starts writing the body, either immediately (in +// the common case) or after the delay timeout. It should not be +// called until after the headers have been written. +func (s bodyWriterState) scheduleBodyWrite() { + if s.timer == nil { + // We're not doing a delayed write (see + // getBodyWriterState), so just start the writing + // goroutine immediately. + go s.fn() + return + } + traceWait100Continue(s.cs.trace) + if s.timer.Stop() { + s.timer.Reset(s.delay) + } +} + // isConnectionCloseRequest reports whether req should use its own // connection for a single request and then close the connection. func isConnectionCloseRequest(req *http.Request) bool { diff --git a/cluster-autoscaler/vendor/golang.org/x/net/http2/writesched.go b/cluster-autoscaler/vendor/golang.org/x/net/http2/writesched.go index c7cd0017392e..f24d2b1e7d4a 100644 --- a/cluster-autoscaler/vendor/golang.org/x/net/http2/writesched.go +++ b/cluster-autoscaler/vendor/golang.org/x/net/http2/writesched.go @@ -32,8 +32,7 @@ type WriteScheduler interface { // Pop dequeues the next frame to write. Returns false if no frames can // be written. Frames with a given wr.StreamID() are Pop'd in the same - // order they are Push'd, except RST_STREAM frames. No frames should be - // discarded except by CloseStream. + // order they are Push'd. No frames should be discarded except by CloseStream. Pop() (wr FrameWriteRequest, ok bool) } @@ -53,7 +52,6 @@ type FrameWriteRequest struct { // stream is the stream on which this frame will be written. // nil for non-stream frames like PING and SETTINGS. - // nil for RST_STREAM streams, which use the StreamError.StreamID field instead. stream *stream // done, if non-nil, must be a buffered channel with space for diff --git a/cluster-autoscaler/vendor/golang.org/x/net/http2/writesched_random.go b/cluster-autoscaler/vendor/golang.org/x/net/http2/writesched_random.go index f2e55e05ce90..9a7b9e581c1e 100644 --- a/cluster-autoscaler/vendor/golang.org/x/net/http2/writesched_random.go +++ b/cluster-autoscaler/vendor/golang.org/x/net/http2/writesched_random.go @@ -45,11 +45,11 @@ func (ws *randomWriteScheduler) AdjustStream(streamID uint32, priority PriorityP } func (ws *randomWriteScheduler) Push(wr FrameWriteRequest) { - if wr.isControl() { + id := wr.StreamID() + if id == 0 { ws.zero.push(wr) return } - id := wr.StreamID() q, ok := ws.sq[id] if !ok { q = ws.queuePool.get() @@ -59,7 +59,7 @@ func (ws *randomWriteScheduler) Push(wr FrameWriteRequest) { } func (ws *randomWriteScheduler) Pop() (FrameWriteRequest, bool) { - // Control and RST_STREAM frames first. + // Control frames first. if !ws.zero.empty() { return ws.zero.shift(), true } diff --git a/cluster-autoscaler/vendor/golang.org/x/net/idna/go118.go b/cluster-autoscaler/vendor/golang.org/x/net/idna/go118.go deleted file mode 100644 index c5c4338dbed4..000000000000 --- a/cluster-autoscaler/vendor/golang.org/x/net/idna/go118.go +++ /dev/null @@ -1,14 +0,0 @@ -// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. - -// Copyright 2021 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.18 -// +build go1.18 - -package idna - -// Transitional processing is disabled by default in Go 1.18. -// https://golang.org/issue/47510 -const transitionalLookup = false diff --git a/cluster-autoscaler/vendor/golang.org/x/net/idna/idna10.0.0.go b/cluster-autoscaler/vendor/golang.org/x/net/idna/idna10.0.0.go index 64ccf85febb6..5208ba6cb884 100644 --- a/cluster-autoscaler/vendor/golang.org/x/net/idna/idna10.0.0.go +++ b/cluster-autoscaler/vendor/golang.org/x/net/idna/idna10.0.0.go @@ -59,10 +59,10 @@ type Option func(*options) // Transitional sets a Profile to use the Transitional mapping as defined in UTS // #46. This will cause, for example, "ß" to be mapped to "ss". Using the // transitional mapping provides a compromise between IDNA2003 and IDNA2008 -// compatibility. It is used by some browsers when resolving domain names. This +// compatibility. It is used by most browsers when resolving domain names. This // option is only meaningful if combined with MapForLookup. func Transitional(transitional bool) Option { - return func(o *options) { o.transitional = transitional } + return func(o *options) { o.transitional = true } } // VerifyDNSLength sets whether a Profile should fail if any of the IDN parts @@ -284,7 +284,7 @@ var ( punycode = &Profile{} lookup = &Profile{options{ - transitional: transitionalLookup, + transitional: true, useSTD3Rules: true, checkHyphens: true, checkJoiners: true, diff --git a/cluster-autoscaler/vendor/golang.org/x/net/idna/idna9.0.0.go b/cluster-autoscaler/vendor/golang.org/x/net/idna/idna9.0.0.go index aae6aac872b3..55f718f12744 100644 --- a/cluster-autoscaler/vendor/golang.org/x/net/idna/idna9.0.0.go +++ b/cluster-autoscaler/vendor/golang.org/x/net/idna/idna9.0.0.go @@ -58,10 +58,10 @@ type Option func(*options) // Transitional sets a Profile to use the Transitional mapping as defined in UTS // #46. This will cause, for example, "ß" to be mapped to "ss". Using the // transitional mapping provides a compromise between IDNA2003 and IDNA2008 -// compatibility. It is used by some browsers when resolving domain names. This +// compatibility. It is used by most browsers when resolving domain names. This // option is only meaningful if combined with MapForLookup. func Transitional(transitional bool) Option { - return func(o *options) { o.transitional = transitional } + return func(o *options) { o.transitional = true } } // VerifyDNSLength sets whether a Profile should fail if any of the IDN parts diff --git a/cluster-autoscaler/vendor/golang.org/x/net/idna/pre_go118.go b/cluster-autoscaler/vendor/golang.org/x/net/idna/pre_go118.go deleted file mode 100644 index 3aaccab1c5a0..000000000000 --- a/cluster-autoscaler/vendor/golang.org/x/net/idna/pre_go118.go +++ /dev/null @@ -1,12 +0,0 @@ -// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. - -// Copyright 2021 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.18 -// +build !go1.18 - -package idna - -const transitionalLookup = true diff --git a/cluster-autoscaler/vendor/golang.org/x/net/idna/punycode.go b/cluster-autoscaler/vendor/golang.org/x/net/idna/punycode.go index e8e3ac11a94b..02c7d59af3b4 100644 --- a/cluster-autoscaler/vendor/golang.org/x/net/idna/punycode.go +++ b/cluster-autoscaler/vendor/golang.org/x/net/idna/punycode.go @@ -49,7 +49,6 @@ func decode(encoded string) (string, error) { } } i, n, bias := int32(0), initialN, initialBias - overflow := false for pos < len(encoded) { oldI, w := i, int32(1) for k := base; ; k += base { @@ -61,32 +60,29 @@ func decode(encoded string) (string, error) { return "", punyError(encoded) } pos++ - i, overflow = madd(i, digit, w) - if overflow { + i += digit * w + if i < 0 { return "", punyError(encoded) } t := k - bias - if k <= bias { + if t < tmin { t = tmin - } else if k >= bias+tmax { + } else if t > tmax { t = tmax } if digit < t { break } - w, overflow = madd(0, w, base-t) - if overflow { + w *= base - t + if w >= math.MaxInt32/base { return "", punyError(encoded) } } - if len(output) >= 1024 { - return "", punyError(encoded) - } x := int32(len(output) + 1) bias = adapt(i-oldI, x, oldI == 0) n += i / x i %= x - if n < 0 || n > utf8.MaxRune { + if n > utf8.MaxRune || len(output) >= 1024 { return "", punyError(encoded) } output = append(output, 0) @@ -119,7 +115,6 @@ func encode(prefix, s string) (string, error) { if b > 0 { output = append(output, '-') } - overflow := false for remaining != 0 { m := int32(0x7fffffff) for _, r := range s { @@ -127,8 +122,8 @@ func encode(prefix, s string) (string, error) { m = r } } - delta, overflow = madd(delta, m-n, h+1) - if overflow { + delta += (m - n) * (h + 1) + if delta < 0 { return "", punyError(s) } n = m @@ -146,9 +141,9 @@ func encode(prefix, s string) (string, error) { q := delta for k := base; ; k += base { t := k - bias - if k <= bias { + if t < tmin { t = tmin - } else if k >= bias+tmax { + } else if t > tmax { t = tmax } if q < t { @@ -169,15 +164,6 @@ func encode(prefix, s string) (string, error) { return string(output), nil } -// madd computes a + (b * c), detecting overflow. -func madd(a, b, c int32) (next int32, overflow bool) { - p := int64(b) * int64(c) - if p > math.MaxInt32-int64(a) { - return 0, true - } - return a + int32(p), false -} - func decodeDigit(x byte) (digit int32, ok bool) { switch { case '0' <= x && x <= '9': diff --git a/cluster-autoscaler/vendor/golang.org/x/oauth2/google/google.go b/cluster-autoscaler/vendor/golang.org/x/oauth2/google/google.go index ccc23ee0aef6..422ff1fe34c6 100644 --- a/cluster-autoscaler/vendor/golang.org/x/oauth2/google/google.go +++ b/cluster-autoscaler/vendor/golang.org/x/oauth2/google/google.go @@ -92,10 +92,9 @@ func JWTConfigFromJSON(jsonKey []byte, scope ...string) (*jwt.Config, error) { // JSON key file types. const ( - serviceAccountKey = "service_account" - userCredentialsKey = "authorized_user" - externalAccountKey = "external_account" - impersonatedServiceAccount = "impersonated_service_account" + serviceAccountKey = "service_account" + userCredentialsKey = "authorized_user" + externalAccountKey = "external_account" ) // credentialsFile is the unmarshalled representation of a credentials file. @@ -122,13 +121,8 @@ type credentialsFile struct { TokenURLExternal string `json:"token_url"` TokenInfoURL string `json:"token_info_url"` ServiceAccountImpersonationURL string `json:"service_account_impersonation_url"` - Delegates []string `json:"delegates"` CredentialSource externalaccount.CredentialSource `json:"credential_source"` QuotaProjectID string `json:"quota_project_id"` - WorkforcePoolUserProject string `json:"workforce_pool_user_project"` - - // Service account impersonation - SourceCredentials *credentialsFile `json:"source_credentials"` } func (f *credentialsFile) jwtConfig(scopes []string, subject string) *jwt.Config { @@ -182,26 +176,8 @@ func (f *credentialsFile) tokenSource(ctx context.Context, params CredentialsPar CredentialSource: f.CredentialSource, QuotaProjectID: f.QuotaProjectID, Scopes: params.Scopes, - WorkforcePoolUserProject: f.WorkforcePoolUserProject, } return cfg.TokenSource(ctx) - case impersonatedServiceAccount: - if f.ServiceAccountImpersonationURL == "" || f.SourceCredentials == nil { - return nil, errors.New("missing 'source_credentials' field or 'service_account_impersonation_url' in credentials") - } - - ts, err := f.SourceCredentials.tokenSource(ctx, params) - if err != nil { - return nil, err - } - imp := externalaccount.ImpersonateTokenSource{ - Ctx: ctx, - URL: f.ServiceAccountImpersonationURL, - Scopes: params.Scopes, - Ts: ts, - Delegates: f.Delegates, - } - return oauth2.ReuseTokenSource(nil, imp), nil case "": return nil, errors.New("missing 'type' field in credentials") default: diff --git a/cluster-autoscaler/vendor/golang.org/x/oauth2/google/internal/externalaccount/basecredentials.go b/cluster-autoscaler/vendor/golang.org/x/oauth2/google/internal/externalaccount/basecredentials.go index bc3ce53172ae..dab917f39ef2 100644 --- a/cluster-autoscaler/vendor/golang.org/x/oauth2/google/internal/externalaccount/basecredentials.go +++ b/cluster-autoscaler/vendor/golang.org/x/oauth2/google/internal/externalaccount/basecredentials.go @@ -53,11 +53,6 @@ type Config struct { QuotaProjectID string // Scopes contains the desired scopes for the returned access token. Scopes []string - // The optional workforce pool user project number when the credential - // corresponds to a workforce pool and not a workload identity pool. - // The underlying principal must still have serviceusage.services.use IAM - // permission to use the project for billing/quota. - WorkforcePoolUserProject string } // Each element consists of a list of patterns. validateURLs checks for matches @@ -78,7 +73,6 @@ var ( regexp.MustCompile(`^iamcredentials\.[^\.\s\/\\]+\.googleapis\.com$`), regexp.MustCompile(`^[^\.\s\/\\]+-iamcredentials\.googleapis\.com$`), } - validWorkforceAudiencePattern *regexp.Regexp = regexp.MustCompile(`//iam\.googleapis\.com/locations/[^/]+/workforcePools/`) ) func validateURL(input string, patterns []*regexp.Regexp, scheme string) bool { @@ -92,17 +86,14 @@ func validateURL(input string, patterns []*regexp.Regexp, scheme string) bool { toTest := parsed.Host for _, pattern := range patterns { - if pattern.MatchString(toTest) { + + if valid := pattern.MatchString(toTest); valid { return true } } return false } -func validateWorkforceAudience(input string) bool { - return validWorkforceAudiencePattern.MatchString(input) -} - // TokenSource Returns an external account TokenSource struct. This is to be called by package google to construct a google.Credentials. func (c *Config) TokenSource(ctx context.Context) (oauth2.TokenSource, error) { return c.tokenSource(ctx, validTokenURLPatterns, validImpersonateURLPatterns, "https") @@ -124,13 +115,6 @@ func (c *Config) tokenSource(ctx context.Context, tokenURLValidPats []*regexp.Re } } - if c.WorkforcePoolUserProject != "" { - valid := validateWorkforceAudience(c.Audience) - if !valid { - return nil, fmt.Errorf("oauth2/google: workforce_pool_user_project should not be set for non-workforce pool credentials") - } - } - ts := tokenSource{ ctx: ctx, conf: c, @@ -140,11 +124,11 @@ func (c *Config) tokenSource(ctx context.Context, tokenURLValidPats []*regexp.Re } scopes := c.Scopes ts.conf.Scopes = []string{"https://www.googleapis.com/auth/cloud-platform"} - imp := ImpersonateTokenSource{ - Ctx: ctx, - URL: c.ServiceAccountImpersonationURL, - Scopes: scopes, - Ts: oauth2.ReuseTokenSource(nil, ts), + imp := impersonateTokenSource{ + ctx: ctx, + url: c.ServiceAccountImpersonationURL, + scopes: scopes, + ts: oauth2.ReuseTokenSource(nil, ts), } return oauth2.ReuseTokenSource(nil, imp), nil } @@ -240,15 +224,7 @@ func (ts tokenSource) Token() (*oauth2.Token, error) { ClientID: conf.ClientID, ClientSecret: conf.ClientSecret, } - var options map[string]interface{} - // Do not pass workforce_pool_user_project when client authentication is used. - // The client ID is sufficient for determining the user project. - if conf.WorkforcePoolUserProject != "" && conf.ClientID == "" { - options = map[string]interface{}{ - "userProject": conf.WorkforcePoolUserProject, - } - } - stsResp, err := exchangeToken(ts.ctx, conf.TokenURL, &stsRequest, clientAuth, header, options) + stsResp, err := exchangeToken(ts.ctx, conf.TokenURL, &stsRequest, clientAuth, header, nil) if err != nil { return nil, err } diff --git a/cluster-autoscaler/vendor/golang.org/x/oauth2/google/internal/externalaccount/impersonate.go b/cluster-autoscaler/vendor/golang.org/x/oauth2/google/internal/externalaccount/impersonate.go index 8251fc85e005..64edb5600135 100644 --- a/cluster-autoscaler/vendor/golang.org/x/oauth2/google/internal/externalaccount/impersonate.go +++ b/cluster-autoscaler/vendor/golang.org/x/oauth2/google/internal/externalaccount/impersonate.go @@ -29,44 +29,30 @@ type impersonateTokenResponse struct { ExpireTime string `json:"expireTime"` } -// ImpersonateTokenSource uses a source credential, stored in Ts, to request an access token to the provided URL. -// Scopes can be defined when the access token is requested. -type ImpersonateTokenSource struct { - // Ctx is the execution context of the impersonation process - // used to perform http call to the URL. Required - Ctx context.Context - // Ts is the source credential used to generate a token on the - // impersonated service account. Required. - Ts oauth2.TokenSource +type impersonateTokenSource struct { + ctx context.Context + ts oauth2.TokenSource - // URL is the endpoint to call to generate a token - // on behalf the service account. Required. - URL string - // Scopes that the impersonated credential should have. Required. - Scopes []string - // Delegates are the service account email addresses in a delegation chain. - // Each service account must be granted roles/iam.serviceAccountTokenCreator - // on the next service account in the chain. Optional. - Delegates []string + url string + scopes []string } // Token performs the exchange to get a temporary service account token to allow access to GCP. -func (its ImpersonateTokenSource) Token() (*oauth2.Token, error) { +func (its impersonateTokenSource) Token() (*oauth2.Token, error) { reqBody := generateAccessTokenReq{ - Lifetime: "3600s", - Scope: its.Scopes, - Delegates: its.Delegates, + Lifetime: "3600s", + Scope: its.scopes, } b, err := json.Marshal(reqBody) if err != nil { return nil, fmt.Errorf("oauth2/google: unable to marshal request: %v", err) } - client := oauth2.NewClient(its.Ctx, its.Ts) - req, err := http.NewRequest("POST", its.URL, bytes.NewReader(b)) + client := oauth2.NewClient(its.ctx, its.ts) + req, err := http.NewRequest("POST", its.url, bytes.NewReader(b)) if err != nil { return nil, fmt.Errorf("oauth2/google: unable to create impersonation request: %v", err) } - req = req.WithContext(its.Ctx) + req = req.WithContext(its.ctx) req.Header.Set("Content-Type", "application/json") resp, err := client.Do(req) diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/mkerrors.sh b/cluster-autoscaler/vendor/golang.org/x/sys/unix/mkerrors.sh index e92ddea00bee..a47b035f9af3 100644 --- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -597,7 +597,6 @@ ccflags="$@" $2 ~ /^DEVLINK_/ || $2 ~ /^ETHTOOL_/ || $2 ~ /^LWTUNNEL_IP/ || - $2 ~ /^ITIMER_/ || $2 !~ "WMESGLEN" && $2 ~ /^W[A-Z0-9]+$/ || $2 ~/^PPPIOC/ || diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux.go index f5915e234291..f432b0684b8c 100644 --- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux.go +++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux.go @@ -14,7 +14,6 @@ package unix import ( "encoding/binary" "syscall" - "time" "unsafe" ) @@ -2315,56 +2314,11 @@ type RemoteIovec struct { //sys shmdt(addr uintptr) (err error) //sys shmget(key int, size int, flag int) (id int, err error) -//sys getitimer(which int, currValue *Itimerval) (err error) -//sys setitimer(which int, newValue *Itimerval, oldValue *Itimerval) (err error) - -// MakeItimerval creates an Itimerval from interval and value durations. -func MakeItimerval(interval, value time.Duration) Itimerval { - return Itimerval{ - Interval: NsecToTimeval(interval.Nanoseconds()), - Value: NsecToTimeval(value.Nanoseconds()), - } -} - -// A value which may be passed to the which parameter for Getitimer and -// Setitimer. -type ItimerWhich int - -// Possible which values for Getitimer and Setitimer. -const ( - ItimerReal ItimerWhich = ITIMER_REAL - ItimerVirtual ItimerWhich = ITIMER_VIRTUAL - ItimerProf ItimerWhich = ITIMER_PROF -) - -// Getitimer wraps getitimer(2) to return the current value of the timer -// specified by which. -func Getitimer(which ItimerWhich) (Itimerval, error) { - var it Itimerval - if err := getitimer(int(which), &it); err != nil { - return Itimerval{}, err - } - - return it, nil -} - -// Setitimer wraps setitimer(2) to arm or disarm the timer specified by which. -// It returns the previous value of the timer. -// -// If the Itimerval argument is the zero value, the timer will be disarmed. -func Setitimer(which ItimerWhich, it Itimerval) (Itimerval, error) { - var prev Itimerval - if err := setitimer(int(which), &it, &prev); err != nil { - return Itimerval{}, err - } - - return prev, nil -} - /* * Unimplemented */ // AfsSyscall +// Alarm // ArchPrctl // Brk // ClockNanosleep @@ -2380,6 +2334,7 @@ func Setitimer(which ItimerWhich, it Itimerval) (Itimerval, error) { // GetMempolicy // GetRobustList // GetThreadArea +// Getitimer // Getpmsg // IoCancel // IoDestroy diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_alarm.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_alarm.go deleted file mode 100644 index 08086ac6a4c4..000000000000 --- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_alarm.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2022 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64) -// +build linux -// +build 386 amd64 mips mipsle mips64 mipsle ppc64 ppc64le ppc s390x sparc64 - -package unix - -// SYS_ALARM is not defined on arm or riscv, but is available for other GOARCH -// values. - -//sys Alarm(seconds uint) (remaining uint, err error) diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux.go index 664db640ae72..4e5420586120 100644 --- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux.go +++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux.go @@ -38,8 +38,7 @@ const ( AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 - AF_MAX = 0x2e - AF_MCTP = 0x2d + AF_MAX = 0x2d AF_MPLS = 0x1c AF_NETBEUI = 0xd AF_NETLINK = 0x10 @@ -1268,9 +1267,6 @@ const ( IP_XFRM_POLICY = 0x11 ISOFS_SUPER_MAGIC = 0x9660 ISTRIP = 0x20 - ITIMER_PROF = 0x2 - ITIMER_REAL = 0x0 - ITIMER_VIRTUAL = 0x1 IUTF8 = 0x4000 IXANY = 0x800 JFFS2_SUPER_MAGIC = 0x72b6 diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux.go index 30fa4055ec1f..93edda4c4939 100644 --- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux.go +++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux.go @@ -2032,23 +2032,3 @@ func shmget(key int, size int, flag int) (id int, err error) { } return } - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func getitimer(which int, currValue *Itimerval) (err error) { - _, _, e1 := Syscall(SYS_GETITIMER, uintptr(which), uintptr(unsafe.Pointer(currValue)), 0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func setitimer(which int, newValue *Itimerval, oldValue *Itimerval) (err error) { - _, _, e1 := Syscall(SYS_SETITIMER, uintptr(which), uintptr(unsafe.Pointer(newValue)), uintptr(unsafe.Pointer(oldValue))) - if e1 != 0 { - err = errnoErr(e1) - } - return -} diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go index 2fc6271f47cf..ff90c81e7300 100644 --- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go +++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go @@ -1,4 +1,4 @@ -// go run mksyscall.go -l32 -tags linux,386 syscall_linux.go syscall_linux_386.go syscall_linux_alarm.go +// go run mksyscall.go -l32 -tags linux,386 syscall_linux.go syscall_linux_386.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && 386 @@ -524,14 +524,3 @@ func utimes(path string, times *[2]Timeval) (err error) { } return } - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Alarm(seconds uint) (remaining uint, err error) { - r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0) - remaining = uint(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go index 21fb85079746..fa7d3dbe4e94 100644 --- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go +++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go @@ -1,4 +1,4 @@ -// go run mksyscall.go -tags linux,amd64 syscall_linux.go syscall_linux_amd64.go syscall_linux_alarm.go +// go run mksyscall.go -tags linux,amd64 syscall_linux.go syscall_linux_amd64.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && amd64 @@ -691,14 +691,3 @@ func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, f } return } - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Alarm(seconds uint) (remaining uint, err error) { - r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0) - remaining = uint(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go index eab7ab9a4f85..6d1552885314 100644 --- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go +++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go @@ -1,4 +1,4 @@ -// go run mksyscall.go -b32 -arm -tags linux,mips syscall_linux.go syscall_linux_mipsx.go syscall_linux_alarm.go +// go run mksyscall.go -b32 -arm -tags linux,mips syscall_linux.go syscall_linux_mipsx.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && mips @@ -702,14 +702,3 @@ func setrlimit(resource int, rlim *rlimit32) (err error) { } return } - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Alarm(seconds uint) (remaining uint, err error) { - r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0) - remaining = uint(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go index dc3f47f1caed..1e20d72df21e 100644 --- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go +++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go @@ -1,4 +1,4 @@ -// go run mksyscall.go -tags linux,mips64 syscall_linux.go syscall_linux_mips64x.go syscall_linux_alarm.go +// go run mksyscall.go -tags linux,mips64 syscall_linux.go syscall_linux_mips64x.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && mips64 @@ -696,14 +696,3 @@ func stat(path string, st *stat_t) (err error) { } return } - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Alarm(seconds uint) (remaining uint, err error) { - r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0) - remaining = uint(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go index 691f3de428f3..a0440c1d43be 100644 --- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go +++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go @@ -1,4 +1,4 @@ -// go run mksyscall.go -l32 -arm -tags linux,mipsle syscall_linux.go syscall_linux_mipsx.go syscall_linux_alarm.go +// go run mksyscall.go -l32 -arm -tags linux,mipsle syscall_linux.go syscall_linux_mipsx.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && mipsle @@ -702,14 +702,3 @@ func setrlimit(resource int, rlim *rlimit32) (err error) { } return } - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Alarm(seconds uint) (remaining uint, err error) { - r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0) - remaining = uint(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go index 5ce957c5672d..5864b9ca6490 100644 --- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go +++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go @@ -1,4 +1,4 @@ -// go run mksyscall.go -b32 -tags linux,ppc syscall_linux.go syscall_linux_ppc.go syscall_linux_alarm.go +// go run mksyscall.go -b32 -tags linux,ppc syscall_linux.go syscall_linux_ppc.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && ppc @@ -707,14 +707,3 @@ func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, f } return } - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Alarm(seconds uint) (remaining uint, err error) { - r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0) - remaining = uint(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go index 82c5b6336ec5..beeb49e34217 100644 --- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go +++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go @@ -1,4 +1,4 @@ -// go run mksyscall.go -tags linux,ppc64 syscall_linux.go syscall_linux_ppc64x.go syscall_linux_alarm.go +// go run mksyscall.go -tags linux,ppc64 syscall_linux.go syscall_linux_ppc64x.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && ppc64 @@ -753,14 +753,3 @@ func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, f } return } - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Alarm(seconds uint) (remaining uint, err error) { - r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0) - remaining = uint(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go index 178847e35a10..53139b82c7be 100644 --- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go +++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go @@ -1,4 +1,4 @@ -// go run mksyscall.go -tags linux,ppc64le syscall_linux.go syscall_linux_ppc64x.go syscall_linux_alarm.go +// go run mksyscall.go -tags linux,ppc64le syscall_linux.go syscall_linux_ppc64x.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && ppc64le @@ -753,14 +753,3 @@ func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, f } return } - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Alarm(seconds uint) (remaining uint, err error) { - r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0) - remaining = uint(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go index 9e462a96fbe3..202add37d10a 100644 --- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go +++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go @@ -1,4 +1,4 @@ -// go run mksyscall.go -tags linux,s390x syscall_linux.go syscall_linux_s390x.go syscall_linux_alarm.go +// go run mksyscall.go -tags linux,s390x syscall_linux.go syscall_linux_s390x.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && s390x @@ -533,14 +533,3 @@ func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, f } return } - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Alarm(seconds uint) (remaining uint, err error) { - r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0) - remaining = uint(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go index ea7d7c29ee60..2ab268c34359 100644 --- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go +++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go @@ -1,4 +1,4 @@ -// go run mksyscall.go -tags linux,sparc64 syscall_linux.go syscall_linux_sparc64.go syscall_linux_alarm.go +// go run mksyscall.go -tags linux,sparc64 syscall_linux.go syscall_linux_sparc64.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && sparc64 @@ -697,14 +697,3 @@ func utimes(path string, times *[2]Timeval) (err error) { } return } - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - -func Alarm(seconds uint) (remaining uint, err error) { - r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0) - remaining = uint(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux.go index 824cadb419c1..66788f156814 100644 --- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux.go +++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux.go @@ -24,11 +24,6 @@ type ItimerSpec struct { Value Timespec } -type Itimerval struct { - Interval Timeval - Value Timeval -} - const ( TIME_OK = 0x0 TIME_INS = 0x1 diff --git a/cluster-autoscaler/vendor/golang.org/x/term/codereview.cfg b/cluster-autoscaler/vendor/golang.org/x/term/codereview.cfg deleted file mode 100644 index 3f8b14b64e83..000000000000 --- a/cluster-autoscaler/vendor/golang.org/x/term/codereview.cfg +++ /dev/null @@ -1 +0,0 @@ -issuerepo: golang/go diff --git a/cluster-autoscaler/vendor/golang.org/x/term/term.go b/cluster-autoscaler/vendor/golang.org/x/term/term.go index d5927088082b..1f6a38fad2ab 100644 --- a/cluster-autoscaler/vendor/golang.org/x/term/term.go +++ b/cluster-autoscaler/vendor/golang.org/x/term/term.go @@ -12,8 +12,6 @@ // panic(err) // } // defer term.Restore(int(os.Stdin.Fd()), oldState) -// -// Note that on non-Unix systems os.Stdin.Fd() may not be 0. package term // State contains the state of a terminal. diff --git a/cluster-autoscaler/vendor/golang.org/x/time/rate/rate.go b/cluster-autoscaler/vendor/golang.org/x/time/rate/rate.go index b0b982e9c6e6..0cfcc8463c29 100644 --- a/cluster-autoscaler/vendor/golang.org/x/time/rate/rate.go +++ b/cluster-autoscaler/vendor/golang.org/x/time/rate/rate.go @@ -306,27 +306,15 @@ func (lim *Limiter) SetBurstAt(now time.Time, newBurst int) { // reserveN returns Reservation, not *Reservation, to avoid allocation in AllowN and WaitN. func (lim *Limiter) reserveN(now time.Time, n int, maxFutureReserve time.Duration) Reservation { lim.mu.Lock() - defer lim.mu.Unlock() if lim.limit == Inf { + lim.mu.Unlock() return Reservation{ ok: true, lim: lim, tokens: n, timeToAct: now, } - } else if lim.limit == 0 { - var ok bool - if lim.burst >= n { - ok = true - lim.burst -= n - } - return Reservation{ - ok: ok, - lim: lim, - tokens: lim.burst, - timeToAct: now, - } } now, last, tokens := lim.advance(now) @@ -363,6 +351,7 @@ func (lim *Limiter) reserveN(now time.Time, n int, maxFutureReserve time.Duratio lim.last = last } + lim.mu.Unlock() return r } @@ -388,9 +377,6 @@ func (lim *Limiter) advance(now time.Time) (newNow time.Time, newLast time.Time, // durationFromTokens is a unit conversion function from the number of tokens to the duration // of time it takes to accumulate them at a rate of limit tokens per second. func (limit Limit) durationFromTokens(tokens float64) time.Duration { - if limit <= 0 { - return InfDuration - } seconds := tokens / float64(limit) return time.Duration(float64(time.Second) * seconds) } @@ -398,8 +384,5 @@ func (limit Limit) durationFromTokens(tokens float64) time.Duration { // tokensFromDuration is a unit conversion function from a time duration to the number of tokens // which could be accumulated during that duration at a rate of limit tokens per second. func (limit Limit) tokensFromDuration(d time.Duration) float64 { - if limit <= 0 { - return 0 - } return d.Seconds() * float64(limit) } diff --git a/cluster-autoscaler/vendor/google.golang.org/genproto/googleapis/api/annotations/resource.pb.go b/cluster-autoscaler/vendor/google.golang.org/genproto/googleapis/api/annotations/resource.pb.go index 6515668d34f2..3571ad634f51 100644 --- a/cluster-autoscaler/vendor/google.golang.org/genproto/googleapis/api/annotations/resource.pb.go +++ b/cluster-autoscaler/vendor/google.golang.org/genproto/googleapis/api/annotations/resource.pb.go @@ -163,7 +163,11 @@ func (ResourceDescriptor_Style) EnumDescriptor() ([]byte, []int) { // // For Kubernetes resources, the format is {api group}/{kind}. // option (google.api.resource) = { // type: "pubsub.googleapis.com/Topic" -// pattern: "projects/{project}/topics/{topic}" +// name_descriptor: { +// pattern: "projects/{project}/topics/{topic}" +// parent_type: "cloudresourcemanager.googleapis.com/Project" +// parent_name_extractor: "projects/{project}" +// } // }; // } // @@ -171,7 +175,10 @@ func (ResourceDescriptor_Style) EnumDescriptor() ([]byte, []int) { // // resources: // - type: "pubsub.googleapis.com/Topic" -// pattern: "projects/{project}/topics/{topic}" +// name_descriptor: +// - pattern: "projects/{project}/topics/{topic}" +// parent_type: "cloudresourcemanager.googleapis.com/Project" +// parent_name_extractor: "projects/{project}" // // Sometimes, resources have multiple patterns, typically because they can // live under multiple parents. @@ -181,10 +188,26 @@ func (ResourceDescriptor_Style) EnumDescriptor() ([]byte, []int) { // message LogEntry { // option (google.api.resource) = { // type: "logging.googleapis.com/LogEntry" -// pattern: "projects/{project}/logs/{log}" -// pattern: "folders/{folder}/logs/{log}" -// pattern: "organizations/{organization}/logs/{log}" -// pattern: "billingAccounts/{billing_account}/logs/{log}" +// name_descriptor: { +// pattern: "projects/{project}/logs/{log}" +// parent_type: "cloudresourcemanager.googleapis.com/Project" +// parent_name_extractor: "projects/{project}" +// } +// name_descriptor: { +// pattern: "folders/{folder}/logs/{log}" +// parent_type: "cloudresourcemanager.googleapis.com/Folder" +// parent_name_extractor: "folders/{folder}" +// } +// name_descriptor: { +// pattern: "organizations/{organization}/logs/{log}" +// parent_type: "cloudresourcemanager.googleapis.com/Organization" +// parent_name_extractor: "organizations/{organization}" +// } +// name_descriptor: { +// pattern: "billingAccounts/{billing_account}/logs/{log}" +// parent_type: "billing.googleapis.com/BillingAccount" +// parent_name_extractor: "billingAccounts/{billing_account}" +// } // }; // } // @@ -192,10 +215,48 @@ func (ResourceDescriptor_Style) EnumDescriptor() ([]byte, []int) { // // resources: // - type: 'logging.googleapis.com/LogEntry' -// pattern: "projects/{project}/logs/{log}" -// pattern: "folders/{folder}/logs/{log}" -// pattern: "organizations/{organization}/logs/{log}" -// pattern: "billingAccounts/{billing_account}/logs/{log}" +// name_descriptor: +// - pattern: "projects/{project}/logs/{log}" +// parent_type: "cloudresourcemanager.googleapis.com/Project" +// parent_name_extractor: "projects/{project}" +// - pattern: "folders/{folder}/logs/{log}" +// parent_type: "cloudresourcemanager.googleapis.com/Folder" +// parent_name_extractor: "folders/{folder}" +// - pattern: "organizations/{organization}/logs/{log}" +// parent_type: "cloudresourcemanager.googleapis.com/Organization" +// parent_name_extractor: "organizations/{organization}" +// - pattern: "billingAccounts/{billing_account}/logs/{log}" +// parent_type: "billing.googleapis.com/BillingAccount" +// parent_name_extractor: "billingAccounts/{billing_account}" +// +// For flexible resources, the resource name doesn't contain parent names, but +// the resource itself has parents for policy evaluation. +// +// Example: +// +// message Shelf { +// option (google.api.resource) = { +// type: "library.googleapis.com/Shelf" +// name_descriptor: { +// pattern: "shelves/{shelf}" +// parent_type: "cloudresourcemanager.googleapis.com/Project" +// } +// name_descriptor: { +// pattern: "shelves/{shelf}" +// parent_type: "cloudresourcemanager.googleapis.com/Folder" +// } +// }; +// } +// +// The ResourceDescriptor Yaml config will look like: +// +// resources: +// - type: 'library.googleapis.com/Shelf' +// name_descriptor: +// - pattern: "shelves/{shelf}" +// parent_type: "cloudresourcemanager.googleapis.com/Project" +// - pattern: "shelves/{shelf}" +// parent_type: "cloudresourcemanager.googleapis.com/Folder" type ResourceDescriptor struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/cluster-autoscaler/vendor/google.golang.org/genproto/googleapis/api/annotations/routing.pb.go b/cluster-autoscaler/vendor/google.golang.org/genproto/googleapis/api/annotations/routing.pb.go deleted file mode 100644 index dd45cf6e6c1a..000000000000 --- a/cluster-autoscaler/vendor/google.golang.org/genproto/googleapis/api/annotations/routing.pb.go +++ /dev/null @@ -1,693 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v3.12.2 -// source: google/api/routing.proto - -package annotations - -import ( - reflect "reflect" - sync "sync" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Specifies the routing information that should be sent along with the request -// in the form of routing header. -// **NOTE:** All service configuration rules follow the "last one wins" order. -// -// The examples below will apply to an RPC which has the following request type: -// -// Message Definition: -// -// message Request { -// // The name of the Table -// // Values can be of the following formats: -// // - `projects//tables/` -// // - `projects//instances//tables/
` -// // - `region//zones//tables/
` -// string table_name = 1; -// -// // This value specifies routing for replication. -// // It can be in the following formats: -// // - `profiles/` -// // - a legacy `profile_id` that can be any string -// string app_profile_id = 2; -// } -// -// Example message: -// -// { -// table_name: projects/proj_foo/instances/instance_bar/table/table_baz, -// app_profile_id: profiles/prof_qux -// } -// -// The routing header consists of one or multiple key-value pairs. Every key -// and value must be percent-encoded, and joined together in the format of -// `key1=value1&key2=value2`. -// In the examples below I am skipping the percent-encoding for readablity. -// -// Example 1 -// -// Extracting a field from the request to put into the routing header -// unchanged, with the key equal to the field name. -// -// annotation: -// -// option (google.api.routing) = { -// // Take the `app_profile_id`. -// routing_parameters { -// field: "app_profile_id" -// } -// }; -// -// result: -// -// x-goog-request-params: app_profile_id=profiles/prof_qux -// -// Example 2 -// -// Extracting a field from the request to put into the routing header -// unchanged, with the key different from the field name. -// -// annotation: -// -// option (google.api.routing) = { -// // Take the `app_profile_id`, but name it `routing_id` in the header. -// routing_parameters { -// field: "app_profile_id" -// path_template: "{routing_id=**}" -// } -// }; -// -// result: -// -// x-goog-request-params: routing_id=profiles/prof_qux -// -// Example 3 -// -// Extracting a field from the request to put into the routing -// header, while matching a path template syntax on the field's value. -// -// NB: it is more useful to send nothing than to send garbage for the purpose -// of dynamic routing, since garbage pollutes cache. Thus the matching. -// -// Sub-example 3a -// -// The field matches the template. -// -// annotation: -// -// option (google.api.routing) = { -// // Take the `table_name`, if it's well-formed (with project-based -// // syntax). -// routing_parameters { -// field: "table_name" -// path_template: "{table_name=projects/*/instances/*/**}" -// } -// }; -// -// result: -// -// x-goog-request-params: -// table_name=projects/proj_foo/instances/instance_bar/table/table_baz -// -// Sub-example 3b -// -// The field does not match the template. -// -// annotation: -// -// option (google.api.routing) = { -// // Take the `table_name`, if it's well-formed (with region-based -// // syntax). -// routing_parameters { -// field: "table_name" -// path_template: "{table_name=regions/*/zones/*/**}" -// } -// }; -// -// result: -// -// -// -// Sub-example 3c -// -// Multiple alternative conflictingly named path templates are -// specified. The one that matches is used to construct the header. -// -// annotation: -// -// option (google.api.routing) = { -// // Take the `table_name`, if it's well-formed, whether -// // using the region- or projects-based syntax. -// -// routing_parameters { -// field: "table_name" -// path_template: "{table_name=regions/*/zones/*/**}" -// } -// routing_parameters { -// field: "table_name" -// path_template: "{table_name=projects/*/instances/*/**}" -// } -// }; -// -// result: -// -// x-goog-request-params: -// table_name=projects/proj_foo/instances/instance_bar/table/table_baz -// -// Example 4 -// -// Extracting a single routing header key-value pair by matching a -// template syntax on (a part of) a single request field. -// -// annotation: -// -// option (google.api.routing) = { -// // Take just the project id from the `table_name` field. -// routing_parameters { -// field: "table_name" -// path_template: "{routing_id=projects/*}/**" -// } -// }; -// -// result: -// -// x-goog-request-params: routing_id=projects/proj_foo -// -// Example 5 -// -// Extracting a single routing header key-value pair by matching -// several conflictingly named path templates on (parts of) a single request -// field. The last template to match "wins" the conflict. -// -// annotation: -// -// option (google.api.routing) = { -// // If the `table_name` does not have instances information, -// // take just the project id for routing. -// // Otherwise take project + instance. -// -// routing_parameters { -// field: "table_name" -// path_template: "{routing_id=projects/*}/**" -// } -// routing_parameters { -// field: "table_name" -// path_template: "{routing_id=projects/*/instances/*}/**" -// } -// }; -// -// result: -// -// x-goog-request-params: -// routing_id=projects/proj_foo/instances/instance_bar -// -// Example 6 -// -// Extracting multiple routing header key-value pairs by matching -// several non-conflicting path templates on (parts of) a single request field. -// -// Sub-example 6a -// -// Make the templates strict, so that if the `table_name` does not -// have an instance information, nothing is sent. -// -// annotation: -// -// option (google.api.routing) = { -// // The routing code needs two keys instead of one composite -// // but works only for the tables with the "project-instance" name -// // syntax. -// -// routing_parameters { -// field: "table_name" -// path_template: "{project_id=projects/*}/instances/*/**" -// } -// routing_parameters { -// field: "table_name" -// path_template: "projects/*/{instance_id=instances/*}/**" -// } -// }; -// -// result: -// -// x-goog-request-params: -// project_id=projects/proj_foo&instance_id=instances/instance_bar -// -// Sub-example 6b -// -// Make the templates loose, so that if the `table_name` does not -// have an instance information, just the project id part is sent. -// -// annotation: -// -// option (google.api.routing) = { -// // The routing code wants two keys instead of one composite -// // but will work with just the `project_id` for tables without -// // an instance in the `table_name`. -// -// routing_parameters { -// field: "table_name" -// path_template: "{project_id=projects/*}/**" -// } -// routing_parameters { -// field: "table_name" -// path_template: "projects/*/{instance_id=instances/*}/**" -// } -// }; -// -// result (is the same as 6a for our example message because it has the instance -// information): -// -// x-goog-request-params: -// project_id=projects/proj_foo&instance_id=instances/instance_bar -// -// Example 7 -// -// Extracting multiple routing header key-value pairs by matching -// several path templates on multiple request fields. -// -// NB: note that here there is no way to specify sending nothing if one of the -// fields does not match its template. E.g. if the `table_name` is in the wrong -// format, the `project_id` will not be sent, but the `routing_id` will be. -// The backend routing code has to be aware of that and be prepared to not -// receive a full complement of keys if it expects multiple. -// -// annotation: -// -// option (google.api.routing) = { -// // The routing needs both `project_id` and `routing_id` -// // (from the `app_profile_id` field) for routing. -// -// routing_parameters { -// field: "table_name" -// path_template: "{project_id=projects/*}/**" -// } -// routing_parameters { -// field: "app_profile_id" -// path_template: "{routing_id=**}" -// } -// }; -// -// result: -// -// x-goog-request-params: -// project_id=projects/proj_foo&routing_id=profiles/prof_qux -// -// Example 8 -// -// Extracting a single routing header key-value pair by matching -// several conflictingly named path templates on several request fields. The -// last template to match "wins" the conflict. -// -// annotation: -// -// option (google.api.routing) = { -// // The `routing_id` can be a project id or a region id depending on -// // the table name format, but only if the `app_profile_id` is not set. -// // If `app_profile_id` is set it should be used instead. -// -// routing_parameters { -// field: "table_name" -// path_template: "{routing_id=projects/*}/**" -// } -// routing_parameters { -// field: "table_name" -// path_template: "{routing_id=regions/*}/**" -// } -// routing_parameters { -// field: "app_profile_id" -// path_template: "{routing_id=**}" -// } -// }; -// -// result: -// -// x-goog-request-params: routing_id=profiles/prof_qux -// -// Example 9 -// -// Bringing it all together. -// -// annotation: -// -// option (google.api.routing) = { -// // For routing both `table_location` and a `routing_id` are needed. -// // -// // table_location can be either an instance id or a region+zone id. -// // -// // For `routing_id`, take the value of `app_profile_id` -// // - If it's in the format `profiles/`, send -// // just the `` part. -// // - If it's any other literal, send it as is. -// // If the `app_profile_id` is empty, and the `table_name` starts with -// // the project_id, send that instead. -// -// routing_parameters { -// field: "table_name" -// path_template: "projects/*/{table_location=instances/*}/tables/*" -// } -// routing_parameters { -// field: "table_name" -// path_template: "{table_location=regions/*/zones/*}/tables/*" -// } -// routing_parameters { -// field: "table_name" -// path_template: "{routing_id=projects/*}/**" -// } -// routing_parameters { -// field: "app_profile_id" -// path_template: "{routing_id=**}" -// } -// routing_parameters { -// field: "app_profile_id" -// path_template: "profiles/{routing_id=*}" -// } -// }; -// -// result: -// -// x-goog-request-params: -// table_location=instances/instance_bar&routing_id=prof_qux -type RoutingRule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A collection of Routing Parameter specifications. - // **NOTE:** If multiple Routing Parameters describe the same key - // (via the `path_template` field or via the `field` field when - // `path_template` is not provided), "last one wins" rule - // determines which Parameter gets used. - // See the examples for more details. - RoutingParameters []*RoutingParameter `protobuf:"bytes,2,rep,name=routing_parameters,json=routingParameters,proto3" json:"routing_parameters,omitempty"` -} - -func (x *RoutingRule) Reset() { - *x = RoutingRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_routing_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RoutingRule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RoutingRule) ProtoMessage() {} - -func (x *RoutingRule) ProtoReflect() protoreflect.Message { - mi := &file_google_api_routing_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RoutingRule.ProtoReflect.Descriptor instead. -func (*RoutingRule) Descriptor() ([]byte, []int) { - return file_google_api_routing_proto_rawDescGZIP(), []int{0} -} - -func (x *RoutingRule) GetRoutingParameters() []*RoutingParameter { - if x != nil { - return x.RoutingParameters - } - return nil -} - -// A projection from an input message to the GRPC or REST header. -type RoutingParameter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A request field to extract the header key-value pair from. - Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` - // A pattern matching the key-value field. Optional. - // If not specified, the whole field specified in the `field` field will be - // taken as value, and its name used as key. If specified, it MUST contain - // exactly one named segment (along with any number of unnamed segments) The - // pattern will be matched over the field specified in the `field` field, then - // if the match is successful: - // - the name of the single named segment will be used as a header name, - // - the match value of the segment will be used as a header value; - // if the match is NOT successful, nothing will be sent. - // - // Example: - // - // -- This is a field in the request message - // | that the header value will be extracted from. - // | - // | -- This is the key name in the - // | | routing header. - // V | - // field: "table_name" v - // path_template: "projects/*/{table_location=instances/*}/tables/*" - // ^ ^ - // | | - // In the {} brackets is the pattern that -- | - // specifies what to extract from the | - // field as a value to be sent. | - // | - // The string in the field must match the whole pattern -- - // before brackets, inside brackets, after brackets. - // - // When looking at this specific example, we can see that: - // - A key-value pair with the key `table_location` - // and the value matching `instances/*` should be added - // to the x-goog-request-params routing header. - // - The value is extracted from the request message's `table_name` field - // if it matches the full pattern specified: - // `projects/*/instances/*/tables/*`. - // - // **NB:** If the `path_template` field is not provided, the key name is - // equal to the field name, and the whole field should be sent as a value. - // This makes the pattern for the field and the value functionally equivalent - // to `**`, and the configuration - // - // { - // field: "table_name" - // } - // - // is a functionally equivalent shorthand to: - // - // { - // field: "table_name" - // path_template: "{table_name=**}" - // } - // - // See Example 1 for more details. - PathTemplate string `protobuf:"bytes,2,opt,name=path_template,json=pathTemplate,proto3" json:"path_template,omitempty"` -} - -func (x *RoutingParameter) Reset() { - *x = RoutingParameter{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_routing_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RoutingParameter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RoutingParameter) ProtoMessage() {} - -func (x *RoutingParameter) ProtoReflect() protoreflect.Message { - mi := &file_google_api_routing_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RoutingParameter.ProtoReflect.Descriptor instead. -func (*RoutingParameter) Descriptor() ([]byte, []int) { - return file_google_api_routing_proto_rawDescGZIP(), []int{1} -} - -func (x *RoutingParameter) GetField() string { - if x != nil { - return x.Field - } - return "" -} - -func (x *RoutingParameter) GetPathTemplate() string { - if x != nil { - return x.PathTemplate - } - return "" -} - -var file_google_api_routing_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.MethodOptions)(nil), - ExtensionType: (*RoutingRule)(nil), - Field: 72295729, - Name: "google.api.routing", - Tag: "bytes,72295729,opt,name=routing", - Filename: "google/api/routing.proto", - }, -} - -// Extension fields to descriptorpb.MethodOptions. -var ( - // See RoutingRule. - // - // optional google.api.RoutingRule routing = 72295729; - E_Routing = &file_google_api_routing_proto_extTypes[0] -) - -var File_google_api_routing_proto protoreflect.FileDescriptor - -var file_google_api_routing_proto_rawDesc = []byte{ - 0x0a, 0x18, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x6f, 0x75, - 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5a, 0x0a, 0x0b, 0x52, 0x6f, 0x75, 0x74, - 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x4b, 0x0a, 0x12, 0x72, 0x6f, 0x75, 0x74, 0x69, - 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x52, 0x11, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x22, 0x4d, 0x0a, 0x10, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x23, - 0x0a, 0x0d, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x61, 0x74, 0x68, 0x54, 0x65, 0x6d, 0x70, 0x6c, - 0x61, 0x74, 0x65, 0x3a, 0x54, 0x0a, 0x07, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1e, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb1, - 0xca, 0xbc, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, - 0x52, 0x07, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x6a, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0c, 0x52, 0x6f, 0x75, - 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, - 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, - 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x3b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xa2, 0x02, - 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_api_routing_proto_rawDescOnce sync.Once - file_google_api_routing_proto_rawDescData = file_google_api_routing_proto_rawDesc -) - -func file_google_api_routing_proto_rawDescGZIP() []byte { - file_google_api_routing_proto_rawDescOnce.Do(func() { - file_google_api_routing_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_routing_proto_rawDescData) - }) - return file_google_api_routing_proto_rawDescData -} - -var file_google_api_routing_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_google_api_routing_proto_goTypes = []interface{}{ - (*RoutingRule)(nil), // 0: google.api.RoutingRule - (*RoutingParameter)(nil), // 1: google.api.RoutingParameter - (*descriptorpb.MethodOptions)(nil), // 2: google.protobuf.MethodOptions -} -var file_google_api_routing_proto_depIdxs = []int32{ - 1, // 0: google.api.RoutingRule.routing_parameters:type_name -> google.api.RoutingParameter - 2, // 1: google.api.routing:extendee -> google.protobuf.MethodOptions - 0, // 2: google.api.routing:type_name -> google.api.RoutingRule - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 2, // [2:3] is the sub-list for extension type_name - 1, // [1:2] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_google_api_routing_proto_init() } -func file_google_api_routing_proto_init() { - if File_google_api_routing_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_google_api_routing_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RoutingRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_routing_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RoutingParameter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_routing_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 1, - NumServices: 0, - }, - GoTypes: file_google_api_routing_proto_goTypes, - DependencyIndexes: file_google_api_routing_proto_depIdxs, - MessageInfos: file_google_api_routing_proto_msgTypes, - ExtensionInfos: file_google_api_routing_proto_extTypes, - }.Build() - File_google_api_routing_proto = out.File - file_google_api_routing_proto_rawDesc = nil - file_google_api_routing_proto_goTypes = nil - file_google_api_routing_proto_depIdxs = nil -} diff --git a/cluster-autoscaler/vendor/google.golang.org/genproto/googleapis/api/httpbody/httpbody.pb.go b/cluster-autoscaler/vendor/google.golang.org/genproto/googleapis/api/httpbody/httpbody.pb.go index 7ea5ced87e0f..b47efe82b200 100644 --- a/cluster-autoscaler/vendor/google.golang.org/genproto/googleapis/api/httpbody/httpbody.pb.go +++ b/cluster-autoscaler/vendor/google.golang.org/genproto/googleapis/api/httpbody/httpbody.pb.go @@ -56,15 +56,12 @@ const ( // // // The raw HTTP body is bound to this field. // google.api.HttpBody http_body = 2; -// // } // // service ResourceService { -// rpc GetResource(GetResourceRequest) -// returns (google.api.HttpBody); -// rpc UpdateResource(google.api.HttpBody) -// returns (google.protobuf.Empty); -// +// rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); +// rpc UpdateResource(google.api.HttpBody) returns +// (google.protobuf.Empty); // } // // Example with streaming methods: @@ -74,7 +71,6 @@ const ( // returns (stream google.api.HttpBody); // rpc UpdateCalendar(stream google.api.HttpBody) // returns (stream google.api.HttpBody); -// // } // // Use of this type only changes how the request and response bodies are diff --git a/cluster-autoscaler/vendor/k8s.io/api/admission/v1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/admission/v1/generated.pb.go index a2d8ff5dde6c..f2db634b864b 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/admission/v1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/admission/v1/generated.pb.go @@ -143,65 +143,65 @@ func init() { } var fileDescriptor_4b73421fd5edef9f = []byte{ - // 921 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xd6, 0x8e, 0xed, 0x1d, 0x87, 0xda, 0x9d, 0x82, 0xba, 0xf2, 0x61, 0x6d, 0x72, 0x40, - 0x2e, 0x6a, 0x77, 0x49, 0x04, 0x55, 0x54, 0x81, 0xd4, 0x2c, 0xa9, 0x50, 0x40, 0x6a, 0xa2, 0x69, - 0x03, 0x15, 0x07, 0xa4, 0xb1, 0x3d, 0xb5, 0x07, 0xdb, 0x33, 0xcb, 0xce, 0xac, 0x83, 0x6f, 0x9c, - 0x38, 0xf3, 0x0d, 0x38, 0xf2, 0x19, 0xf8, 0x06, 0x39, 0xf6, 0xd8, 0x93, 0x45, 0xcc, 0xb7, 0xc8, - 0x09, 0xcd, 0xec, 0xec, 0x9f, 0x26, 0xb1, 0x08, 0x0d, 0xa7, 0xec, 0xfb, 0xf3, 0xfb, 0xbd, 0x97, - 0xdf, 0xdb, 0xf7, 0xd6, 0xe0, 0xc9, 0x64, 0x57, 0x78, 0x94, 0xfb, 0x93, 0xb8,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b, 0x5d, 0xab, 0xd7, 0xd8, 0x79, 0xe4, 0xe5, 0xe2, 0x67, 0x30, 0x2f, - 0x9c, 0x8c, 0x94, 0x43, 0x78, 0x4a, 0x06, 0x6f, 0xbe, 0xed, 0x7d, 0x15, 0xf1, 0x38, 0xfc, 0x96, - 0x44, 0xaa, 0x99, 0x6f, 0x28, 0x1b, 0x06, 0x9b, 0xa6, 0x78, 0x45, 0x59, 0x48, 0x33, 0xc2, 0x31, - 0xa8, 0x47, 0x44, 0xf0, 0x38, 0x1a, 0x10, 0xa7, 0xac, 0xd9, 0x1f, 0xff, 0x77, 0x76, 0x64, 0x18, - 0x82, 0x96, 0xa9, 0x50, 0x4f, 0x3d, 0x28, 0x63, 0x87, 0x9f, 0x81, 0x86, 0x88, 0xfb, 0x69, 0xc0, - 0xa9, 0x68, 0x3d, 0xee, 0x1a, 0x40, 0xe3, 0x79, 0x1e, 0x42, 0xc5, 0x3c, 0x48, 0x41, 0x23, 0x4a, - 0x94, 0x54, 0x5d, 0x3b, 0xef, 0xdd, 0x48, 0x81, 0xa6, 0x2a, 0x85, 0x72, 0x3a, 0x54, 0xe4, 0x86, - 0x0b, 0xd0, 0x34, 0x66, 0xd6, 0xe5, 0xed, 0x1b, 0x4b, 0x72, 0x77, 0xb5, 0xec, 0x34, 0xd1, 0xdb, - 0xb4, 0xe8, 0x62, 0x1d, 0xf8, 0x35, 0x80, 0xc6, 0x55, 0x10, 0xc2, 0x69, 0x6a, 0x8d, 0xda, 0x46, - 0x23, 0x88, 0x2e, 0x65, 0xa0, 0x2b, 0x50, 0xb0, 0x0b, 0x2a, 0x0c, 0xcf, 0x88, 0xb3, 0xa1, 0xd1, - 0xd9, 0xd0, 0x9f, 0xe1, 0x19, 0x41, 0x3a, 0x02, 0x7d, 0x60, 0xab, 0xbf, 0x22, 0xc4, 0x03, 0xe2, - 0x54, 0x75, 0xda, 0x1d, 0x93, 0x66, 0x3f, 0x4b, 0x03, 0x28, 0xcf, 0x81, 0x9f, 0x03, 0x9b, 0x87, - 0xea, 0x55, 0xa7, 0x9c, 0x39, 0x35, 0x0d, 0x70, 0x53, 0xc0, 0x61, 0x1a, 0x38, 0x2f, 0x1a, 0x28, - 0x07, 0xc0, 0x17, 0xa0, 0x1e, 0x0b, 0x12, 0x1d, 0xb0, 0x57, 0xdc, 0xa9, 0x6b, 0x41, 0x3f, 0xf2, - 0x8a, 0xe7, 0xe3, 0xad, 0xb5, 0x57, 0x42, 0x1e, 0x9b, 0xec, 0xfc, 0x7d, 0x4a, 0x3d, 0x28, 0x63, - 0x82, 0xc7, 0xa0, 0xca, 0xfb, 0x3f, 0x92, 0x81, 0x74, 0x6c, 0xcd, 0xf9, 0x70, 0xed, 0x90, 0xcc, - 0xd6, 0x7a, 0x08, 0x9f, 0x3c, 0xfd, 0x59, 0x12, 0xa6, 0xe6, 0x13, 0xdc, 0x36, 0xd4, 0xd5, 0x43, - 0x4d, 0x82, 0x0c, 0x19, 0xfc, 0x01, 0xd8, 0x7c, 0x3a, 0x4c, 0x9c, 0x0e, 0x78, 0x17, 0xe6, 0x4c, - 0xca, 0xc3, 0x94, 0x07, 0xe5, 0x94, 0x70, 0x0b, 0x54, 0x87, 0xd1, 0x02, 0xc5, 0xcc, 0x69, 0x74, - 0xad, 0x5e, 0x3d, 0x00, 0xaa, 0x87, 0x7d, 0xed, 0x41, 0x26, 0x02, 0x5f, 0x82, 0x1a, 0x0f, 0x95, - 0x18, 0xc2, 0xd9, 0x7c, 0x97, 0x0e, 0x9a, 0xa6, 0x83, 0xda, 0x61, 0xc2, 0x82, 0x52, 0xba, 0xad, - 0x3f, 0x2a, 0xe0, 0x4e, 0xe1, 0x42, 0x89, 0x90, 0x33, 0x41, 0xfe, 0x97, 0x13, 0x75, 0x1f, 0xd4, - 0xf0, 0x74, 0xca, 0x4f, 0x48, 0x72, 0xa5, 0xea, 0x79, 0x13, 0x7b, 0x89, 0x1b, 0xa5, 0x71, 0x78, - 0x04, 0xaa, 0x42, 0x62, 0x19,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x34, 0xd4, 0xab, 0x90, 0xde, 0xc1, - 0x94, 0x46, 0x9d, 0x86, 0xc8, 0x48, 0x64, 0x3e, 0x6e, 0x1f, 0x5f, 0x5f, 0xd4, 0x44, 0x80, 0xd4, - 0x42, 0x19, 0x53, 0xf0, 0xc5, 0xe9, 0x99, 0x5b, 0x7a, 0x7d, 0xe6, 0x96, 0xde, 0x9c, 0xb9, 0xa5, - 0x5f, 0x56, 0xae, 0x75, 0xba, 0x72, 0xad, 0xd7, 0x2b, 0xd7, 0x7a, 0xb3, 0x72, 0xad, 0xbf, 0x56, - 0xae, 0xf5, 0xdb, 0xdf, 0x6e, 0xe9, 0xfb, 0x7b, 0x6b, 0x7e, 0xeb, 0xfc, 0x13, 0x00, 0x00, 0xff, - 0xff, 0x5e, 0xe0, 0xad, 0x0d, 0x1e, 0x09, 0x00, 0x00, + // 919 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0xd6, 0x8e, 0xed, 0x1d, 0x87, 0xda, 0x9d, 0x82, 0x58, 0xf9, 0xb0, 0x36, 0x39, 0x20, + 0x17, 0xb5, 0xbb, 0x24, 0x82, 0x2a, 0xaa, 0x38, 0x34, 0x4b, 0x2a, 0x14, 0x90, 0x9a, 0x68, 0xda, + 0x40, 0xc5, 0x01, 0x69, 0xec, 0x9d, 0xda, 0x83, 0xed, 0x99, 0x65, 0x67, 0xd6, 0xc1, 0x37, 0x4e, + 0x9c, 0xf9, 0x06, 0x1c, 0xf9, 0x0c, 0x7c, 0x83, 0x1c, 0x7b, 0xec, 0xc9, 0x22, 0xe6, 0x5b, 0xe4, + 0x84, 0x66, 0x76, 0xf6, 0x4f, 0xf3, 0x47, 0x84, 0x96, 0x93, 0xf7, 0xfd, 0xf9, 0xfd, 0xde, 0xf3, + 0xef, 0xed, 0x7b, 0x0b, 0x1e, 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 0x02, 0xc3, 0x17, 0xa0, 0x36, + 0xa5, 0x2c, 0x74, 0x6e, 0xf5, 0xad, 0x41, 0x6b, 0xe7, 0xa1, 0x57, 0x88, 0x9f, 0xc3, 0xbc, 0x68, + 0x3a, 0x56, 0x0e, 0xe1, 0x29, 0x19, 0xbc, 0xc5, 0xb6, 0xf7, 0x55, 0xcc, 0x93, 0xe8, 0x5b, 0x12, + 0xab, 0x66, 0xbe, 0xa1, 0x2c, 0x0c, 0x36, 0x4d, 0xf1, 0x9a, 0xb2, 0x90, 0x66, 0x84, 0x13, 0xd0, + 0x8c, 0x89, 0xe0, 0x49, 0x3c, 0x22, 0x4e, 0x55, 0xb3, 0x3f, 0xfa, 0xef, 0xec, 0xc8, 0x30, 0x04, + 0x1d, 0x53, 0xa1, 0x99, 0x79, 0x50, 0xce, 0x0e, 0x3f, 0x07, 0x2d, 0x91, 0x0c, 0xb3, 0x80, 0x53, + 0xd3, 0x7a, 0xdc, 0x35, 0x80, 0xd6, 0xb3, 0x22, 0x84, 0xca, 0x79, 0x90, 0x82, 0x56, 0x9c, 0x2a, + 0xa9, 0xba, 0x76, 0xde, 0x7b, 0x27, 0x05, 0xda, 0xaa, 0x14, 0x2a, 0xe8, 0x50, 0x99, 0x1b, 0x2e, + 0x41, 0xdb, 0x98, 0x79, 0x97, 0xb7, 0xdf, 0x59, 0x92, 0xbb, 0xeb, 0x55, 0xaf, 0x8d, 0xde, 0xa4, + 0x45, 0x17, 0xeb, 0xc0, 0xaf, 0x01, 0x34, 0xae, 0x92, 0x10, 0x4e, 0x5b, 0x6b, 0xd4, 0x35, 0x1a, + 0x41, 0x74, 0x29, 0x03, 0x5d, 0x81, 0x82, 0x7d, 0x50, 0x63, 0x78, 0x4e, 0x9c, 0x0d, 0x8d, 0xce, + 0x87, 0xfe, 0x14, 0xcf, 0x09, 0xd2, 0x11, 0xe8, 0x03, 0x5b, 0xfd, 0x8a, 0x08, 0x8f, 0x88, 0x53, + 0xd7, 0x69, 0x77, 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ee, 0x8d, + 0xe6, 0x68, 0xed, 0xdc, 0xbb, 0x89, 0x02, 0x1a, 0x10, 0xb4, 0xd4, 0xab, 0x90, 0xdd, 0xc1, 0x8c, + 0x46, 0x9d, 0x86, 0xd8, 0x48, 0x64, 0x3e, 0x6e, 0x9f, 0xdc, 0x5c, 0xd4, 0x54, 0x80, 0xcc, 0x42, + 0x39, 0x53, 0x30, 0x38, 0x3d, 0x73, 0x2b, 0xaf, 0xce, 0xdc, 0xca, 0xeb, 0x33, 0xb7, 0xf2, 0xcb, + 0xda, 0xb5, 0x4e, 0xd7, 0xae, 0xf5, 0x6a, 0xed, 0x5a, 0xaf, 0xd7, 0xae, 0xf5, 0xd7, 0xda, 0xb5, + 0x7e, 0xfb, 0xdb, 0xad, 0x7c, 0x7f, 0x6b, 0xb1, 0xfd, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x62, + 0xcb, 0x64, 0xf1, 0x09, 0x09, 0x00, 0x00, } func (m *AdmissionRequest) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/admission/v1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/admission/v1/generated.proto index 941deb4fb4bf..5fc0e342e812 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/admission/v1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/admission/v1/generated.proto @@ -27,7 +27,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/admission/v1"; +option go_package = "v1"; // AdmissionRequest describes the admission.Attributes for the admission request. message AdmissionRequest { diff --git a/cluster-autoscaler/vendor/k8s.io/api/admission/v1beta1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/admission/v1beta1/generated.pb.go index c8839181422c..c0de5a93b9ea 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/admission/v1beta1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/admission/v1beta1/generated.pb.go @@ -143,65 +143,65 @@ func init() { } var fileDescriptor_b87c2352de86eab9 = []byte{ - // 928 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcb, 0x6e, 0xdb, 0x46, - 0x17, 0x16, 0x23, 0x59, 0x12, 0x47, 0xfe, 0x23, 0x65, 0xf2, 0x17, 0x20, 0x84, 0x80, 0x52, 0xbd, - 0x28, 0x54, 0x20, 0x19, 0xd6, 0x46, 0x1b, 0x18, 0x41, 0x37, 0x66, 0x6d, 0x14, 0x6e, 0x81, 0xd8, - 0x98, 0x44, 0x6d, 0xda, 0x45, 0x81, 0x91, 0x34, 0x91, 0x58, 0x49, 0x33, 0x2c, 0x67, 0x28, 0x57, - 0xbb, 0xee, 0xbb, 0xe9, 0x1b, 0xf4, 0x05, 0xfa, 0x16, 0xdd, 0x78, 0x99, 0x65, 0x56, 0x42, 0xad, - 0xbe, 0x85, 0x57, 0xc5, 0x0c, 0x87, 0x97, 0xc8, 0x76, 0x9a, 0x4b, 0x57, 0xe6, 0xb9, 0x7c, 0xdf, - 0x39, 0xfe, 0x0e, 0xcf, 0xa1, 0xc0, 0xd1, 0x74, 0x5f, 0xa0, 0x80, 0x7b, 0xd3, 0x78, 0x40, 0x23, - 0x46, 0x25, 0x15, 0xde, 0x82, 0xb2, 0x11, 0x8f, 0x3c, 0x13, 0x20, 0x61, 0xe0, 0x91, 0xd1, 0x3c, - 0x10, 0x22, 0xe0, 0xcc, 0x5b, 0xec, 0x0e, 0xa8, 0x24, 0xbb, 0xde, 0x98, 0x32, 0x1a, 0x11, 0x49, - 0x47, 0x28, 0x8c, 0xb8, 0xe4, 0xf0, 0x5e, 0x92, 0x8d, 0x48, 0x18, 0xa0, 0x2c, 0x1b, 0x99, 0xec, - 0xf6, 0x83, 0x71, 0x20, 0x27, 0xf1, 0x00, 0x0d, 0xf9, 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0xb9, 0x76, 0xad, 0xbf, 0xd6, 0xae, 0xf5, 0xdb, 0xdf, 0x6e, 0xe9, 0xfb, 0x7b, 0xaf, 0xfb, - 0x11, 0xf4, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x69, 0x3c, 0x61, 0x0b, 0x3c, 0x09, 0x00, 0x00, + // 925 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcb, 0x6e, 0x23, 0x45, + 0x17, 0x76, 0x8f, 0x1d, 0xdb, 0x5d, 0xce, 0x3f, 0xf6, 0xd4, 0xfc, 0x48, 0x2d, 0x0b, 0xb5, 0x4d, + 0x16, 0xc8, 0x48, 0x93, 0x6a, 0x12, 0xc1, 0x28, 0x1a, 0xb1, 0x49, 0x93, 0x08, 0x05, 0xa4, 0x49, + 0x54, 0x33, 0x86, 0x81, 0x05, 0x52, 0xd9, 0xae, 0xb1, 0x1b, 0xdb, 0x55, 0x4d, 0x57, 0xb5, 0x83, + 0x77, 0xec, 0xd9, 0xf0, 0x06, 0xbc, 0x00, 0x6f, 0xc1, 0x26, 0xcb, 0x59, 0xce, 0xca, 0x22, 0xe6, + 0x2d, 0xb2, 0x42, 0x55, 0x5d, 0x7d, 0x19, 0x27, 0x81, 0xb9, 0xb0, 0x72, 0x9f, 0xcb, 0xf7, 0x9d, + 0xe3, 0xef, 0xf4, 0x39, 0x0d, 0x8e, 0xa7, 0x07, 0x02, 0x05, 0xdc, 0x9b, 0xc6, 0x03, 0x1a, 0x31, + 0x2a, 0xa9, 0xf0, 0x16, 0x94, 0x8d, 0x78, 0xe4, 0x99, 0x00, 0x09, 0x03, 0x8f, 0x8c, 0xe6, 0x81, + 0x10, 0x01, 0x67, 0xde, 0x62, 0x6f, 0x40, 0x25, 0xd9, 0xf3, 0xc6, 0x94, 0xd1, 0x88, 0x48, 0x3a, + 0x42, 0x61, 0xc4, 0x25, 0x87, 0xef,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b7, 0xf4, 0xf2, 0xd2, 0x2d, 0xfd, 0xbc, 0x76, 0xad, 0x8b, 0xb5, 0x6b, 0xbd, 0x58, 0xbb, 0xd6, + 0xcb, 0xb5, 0x6b, 0xfd, 0xb9, 0x76, 0xad, 0x5f, 0xff, 0x72, 0x4b, 0xdf, 0xd5, 0x0c, 0xf1, 0xdf, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x6c, 0x23, 0xa1, 0xd9, 0x27, 0x09, 0x00, 0x00, } func (m *AdmissionRequest) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/admission/v1beta1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/admission/v1beta1/generated.proto index ff0fa46d252b..41a26431209b 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/admission/v1beta1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/admission/v1beta1/generated.proto @@ -27,7 +27,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/admission/v1beta1"; +option go_package = "v1beta1"; // AdmissionRequest describes the admission.Attributes for the admission request. message AdmissionRequest { diff --git a/cluster-autoscaler/vendor/k8s.io/api/admissionregistration/v1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/admissionregistration/v1/generated.pb.go index 6ac9e80ffca5..0f8019c54313 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/admissionregistration/v1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/admissionregistration/v1/generated.pb.go @@ -342,77 +342,76 @@ func init() { } var fileDescriptor_aaac5994f79683e8 = []byte{ - // 1105 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xc6, 0x76, 0x63, 0x8f, 0xf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0x79, 0xf1, 0x15, 0x74, 0x99, 0x2f, 0x7c, 0x09, - 0x20, 0x27, 0xd4, 0x1b, 0x30, 0x57, 0xb7, 0x5f, 0xd2, 0x10, 0x40, 0xe7, 0xf7, 0x20, 0x0a, 0x4d, - 0x88, 0xa6, 0xac, 0xe7, 0xa1, 0x79, 0x67, 0x1a, 0xd5, 0xed, 0x71, 0x01, 0x57, 0xfd, 0xd4, 0x00, - 0xf7, 0x26, 0x26, 0x38, 0x9e, 0x98, 0x20, 0xee, 0x78, 0xf8, 0x12, 0x14, 0xd5, 0x87, 0x69, 0x61, - 0x89, 0xf5, 0x48, 0x97, 0x37, 0x1e, 0xcc, 0xf6, 0x19, 0xe3, 0x6f, 0xb6, 0x4b, 0x24, 0x76, 0x60, - 0x32, 0x34, 0x20, 0xc3, 0x50, 0xca, 0x0a, 0x0f, 0x40, 0x31, 0x89, 0x2c, 0x2a, 0xf3, 0x7a, 0x3a, - 0x1f, 0xce, 0x34, 0x9d, 0x13, 0xcf, 0x76, 0xf2, 0x2a, 0x0a, 0x4a, 0xb9, 0xea, 0xff, 0x18, 0xa0, - 0x76, 0x55, 0x6a, 0x3b, 0x54, 0x48, 0x78, 0x38, 0x95, 0x9e, 0x35, 0x63, 0x97, 0x52, 0x11, 0x27, - 0x77, 0x3b, 0x49, 0xae, 0x38, 0x44, 0x46, 0x52, 0x6b, 0x83, 0x02, 0x95, 0xa4, 0x3f, 0xcc, 0x6b, - 0xf3, 0x3a, 0x79, 0x8d, 0xbd, 0x39, 0xdb, 0x3f, 0xdb, 0x8a, 0x17, 0xc5, 0xf4, 0xf5, 0xdf, 0x0d, - 0x90, 0x57, 0x0b, 0x09, 0xbe, 0x0f, 0x4a, 0xd8, 0xa7, 0x5f, 0x71, 0x16, 0xf8, 0xa2, 0x62, 0xe8, - 0xce, 0x5b, 0x8a, 0x42, 0xb3, 0xb4, 0xb9, 0xb7, 0x1d, 0x83, 0x28, 0xb3, 0xc3, 0x75, 0x50, 0xc6, - 0x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2, 0x0c, 0x6e, 0x64, 0xf9, 0x3a, 0xb2, 0x5c, 0xff, 0xc3, - 0x00, 0xd5, 0xa9, 0x09, 0x7b, 0xdd, 0xb2, 0xf9, 0xcd, 0x94, 0x6c, 0x3e, 0x9a, 0x69, 0x7a, 0xa6, - 0x1e, 0x3e, 0x25, 0x9c, 0xff, 0x1a, 0xa0, 0x7e, 0x75, 0x7a, 0xaf, 0x41, 0x3a, 0xbb, 0xe3, 0xd2, - 0xb9, 0x75, 0xbd, 0xdc, 0x66, 0x11, 0xcf, 0x5f, 0x0d, 0xf0, 0xc6, 0x05, 0xfb, 0x0b, 0xbe, 0x0d, - 0x72, 0x01, 0xef, 0x25, 0x2b, 0x78, 0x21, 0x0a, 0xcd, 0xdc, 0x73, 0xb4, 0x83, 0x14, 0x06, 0x0f, - 0xc1, 0x82, 0x88, 0x55, 0x20, 0xc9, 0xfc, 0xe3, 0x99, 0x9e, 0x37, 0xa9, 0x1c, 0x4e, 0x39, 0x0a, - 0xcd, 0x85, 0x21, 0x3a, 0xa4, 0x84, 0x0d, 0x50, 0x74, 0xb1, 0x13, 0x78, 0xad, 0x44, 0xb5, 0x16, - 0x9d, 0x45, 0x55, 0xa4, 0xad, 0xcd, 0x18, 0x43, 0xa9, 0xd5, 0xd9, 0x3e, 0x39, 0xab, 0xce, 0xbd, - 0x3a, 0xab, 0xce, 0x9d, 0x9e, 0x55, 0xe7, 0x7e, 0x8c, 0xaa, 0xc6, 0x49, 0x54, 0x35, 0x5e, 0x45, - 0x55, 0xe3, 0x34, 0xaa, 0x1a, 0x7f, 0x45, 0x55, 0xe3, 0xa7, 0xbf, 0xab, 0x73, 0xdf, 0xde, 0x9f, - 0xe1, 0xdf, 0xec, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x43, 0x44, 0x86, 0xf5, 0x0c, 0x0f, 0x00, - 0x00, + // 1102 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x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x27, 0x7d, 0xd0, 0x5f, + 0x31, 0xe7, 0xda, 0x83, 0xec, 0x21, 0x7d, 0xec, 0x76, 0xa9, 0x47, 0xf8, 0xb1, 0xed, 0x1f, 0x75, + 0x14, 0x20, 0xec, 0x3e, 0x91, 0xf8, 0x82, 0x97, 0xac, 0xd9, 0x97, 0x79, 0xf1, 0xc0, 0x93, 0xb4, + 0x4f, 0xa6, 0x1c, 0x1e, 0xbe, 0xca, 0x41, 0xb8, 0x5d, 0xd2, 0xc7, 0x93, 0x7e, 0xf5, 0xdf, 0x17, + 0xc0, 0xca, 0x6e, 0x20, 0xb1, 0xa4, 0x5e, 0xe7, 0x39, 0x69, 0x76, 0x19, 0x3b, 0x82, 0x35, 0x90, + 0xf7, 0x70, 0x9f, 0x54, 0x8c, 0x9a, 0xd1, 0x28, 0x39, 0x8b, 0x27, 0xa1, 0x39, 0x17, 0x85, 0x66, + 0xfe, 0x31, 0xee, 0x13, 0xa4, 0x2d, 0x90, 0x83, 0x45, 0xb7, 0x47, 0x89, 0x27, 0xb7, 0x98, 0xd7, + 0xa6, 0x9d, 0xca, 0x7c, 0xcd, 0x68, 0x94, 0x37, 0x1e, 0x59, 0x33, 0xd4, 0xcf, 0x4a, 0xa2, 0x6c, + 0x8d, 0xf8, 0x3b, 0x6f, 0x26, 0x31, 0x16, 0x47, 0x51, 0x34, 0x16, 0x03, 0x1e, 0x82, 0x02, 0x0f, + 0x7a, 0x44, 0x54, 0x72, 0xb5, 0x5c, 0xa3, 0xbc, 0xf1, 0xe9, 0x4c, 0xc1, 0x50, 0xd0, 0x23, 0xcf, + 0xa9, 0xec, 0x3e, 0xf1, 0x49, 0x0c, 0x0a, 0x67, 0x29, 0x89, 0x55, 0x50, 0x36, 0x81, 0x62, 0x52, + 0xb8, 0x03, 0x96, 0xda, 0x98, 0xf6, 0x02, 0x4e, 0xf6, 0x58, 0x8f, 0xba, 0xc7, 0x95, 0xbc, 0x4e, + 0xfe, 0xbd, 0x28, 0x34, 0x97,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bf, 0x6e, 0x81, 0xd5, 0x03, 0xdc, 0xa3, 0xad, 0x1b, + 0x59, 0xbe, 0x91, 0xe5, 0x2b, 0x65, 0x19, 0xdc, 0xc8, 0xf2, 0x75, 0x64, 0xb9, 0xfe, 0xa7, 0x01, + 0xaa, 0x53, 0x13, 0xf6, 0xba, 0x65, 0xf3, 0xdb, 0x29, 0xd9, 0x7c, 0x38, 0xd3, 0xf4, 0x4c, 0x3d, + 0x7c, 0x4a, 0x38, 0xff, 0x33, 0x40, 0xfd, 0xea, 0xf4, 0x5e, 0x83, 0x74, 0x76, 0xc7, 0xa5, 0x73, + 0xeb, 0x7a, 0xb9, 0xcd, 0x22, 0x9e, 0xbf, 0x19, 0xe0, 0x8d, 0x0b, 0xf6, 0x17, 0x7c, 0x1b, 0xe4, + 0x02, 0xde, 0x4b, 0x56, 0xf0, 0x42, 0x14, 0x9a, 0xb9, 0x67, 0x68, 0x07, 0x29, 0x0c, 0x1e, 0x82, + 0x05, 0x11, 0xab, 0x40, 0x92, 0xf9, 0x27, 0x33, 0x3d, 0x6f, 0x52, 0x39, 0x9c, 0x72, 0x14, 0x9a, + 0x0b, 0x43, 0x74, 0x48, 0x09, 0x1b, 0xa0, 0xe8, 0x62, 0x27, 0xf0, 0x5a, 0x89, 0x6a, 0x2d, 0x3a, + 0x8b, 0xaa, 0x48, 0x5b, 0x9b, 0x31, 0x86, 0x52, 0xab, 0xd3, 0x38, 0x39, 0xab, 0xce, 0xbd, 0x3c, + 0xab, 0xce, 0x9d, 0x9e, 0x55, 0xe7, 0x7e, 0x8a, 0xaa, 0xc6, 0x49, 0x54, 0x35, 0x5e, 0x46, 0x55, + 0xe3, 0x34, 0xaa, 0x1a, 0x7f, 0x47, 0x55, 0xe3, 0xe7, 0x7f, 0xaa, 0x73, 0xdf, 0xcd, 0x0f, 0xd6, + 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x84, 0xf2, 0xb0, 0x00, 0xeb, 0x0e, 0x00, 0x00, } func (m *MutatingWebhook) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/admissionregistration/v1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/admissionregistration/v1/generated.proto index a53605b588c7..c23bb4beee8b 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/admissionregistration/v1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/admissionregistration/v1/generated.proto @@ -26,7 +26,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/admissionregistration/v1"; +option go_package = "v1"; // MutatingWebhook describes an admission webhook and the resources and operations it applies to. message MutatingWebhook { diff --git a/cluster-autoscaler/vendor/k8s.io/api/admissionregistration/v1beta1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/admissionregistration/v1beta1/generated.pb.go index e2899ea171b9..9f0988ca7083 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/admissionregistration/v1beta1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/admissionregistration/v1beta1/generated.pb.go @@ -343,76 +343,76 @@ func init() { var fileDescriptor_abeea74cbc46f55a = []byte{ // 1112 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0x4b, 0x6f, 0x23, 0x45, - 0x10, 0xce, 0xc4, 0xf6, 0xc6, 0x6e, 0xe7, 0xb1, 0x69, 0x60, 0xd7, 0x84, 0x95, 0xc7, 0xf2, 0x01, - 0x59, 0x02, 0x66, 0x36, 0x01, 0x21, 0x58, 0x40, 0x28, 0x0e, 0x2c, 0x44, 0x4a, 0xb2, 0xa1, 0xb3, - 0x0f, 0x89, 0x87, 0xb4, 0xed, 0x71, 0xd9, 0x6e, 0x6c, 0x4f, 0x8f, 0xa6, 0x7b, 0xbc, 0xe4, 0xc6, - 0x4f, 0x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 0x47, - 0x72, 0xbf, 0x94, 0xd3, 0x45, 0x7f, 0x7b, 0xac, 0x04, 0xe9, 0x97, 0xb7, 0xbc, 0x6e, 0x5b, 0x01, - 0xc2, 0x52, 0x0d, 0x66, 0x0d, 0x36, 0xad, 0x3d, 0xda, 0x80, 0xde, 0xd0, 0xb5, 0xfe, 0x4a, 0x14, - 0x9a, 0xeb, 0x07, 0xd3, 0x8c, 0x64, 0x36, 0x08, 0xe6, 0x68, 0x95, 0x37, 0xbe, 0x05, 0x47, 0xa6, - 0x61, 0x8b, 0x97, 0x0f, 0x8b, 0xa3, 0xd0, 0x5c, 0xbd, 0x37, 0x41, 0x47, 0xa6, 0xe8, 0x55, 0xc1, - 0x04, 0x6b, 0xc2, 0xa7, 0xad, 0x16, 0x38, 0x52, 0x94, 0xae, 0x8d, 0x0a, 0x76, 0x34, 0x82, 0x55, - 0xc1, 0x46, 0xc7, 0x9d, 0x1e, 0x15, 0x82, 0x8c, 0xbb, 0xe1, 0x3b, 0x68, 0x55, 0x75, 0x3d, 0x0f, - 0xe4, 0x11, 0x38, 0xdc, 0x6d, 0x8a, 0xd2, 0x52, 0xc5, 0xa8, 0xe5, 0xe2, 0x17, 0xdc, 0x9f, 0xb0, - 0x90, 0xa9, 0x9b, 0xf8, 0x01, 0xba, 0x99, 0xb6, 0x12, 0x81, 0x01, 0x83, 0x27, 0x0f, 0xc1, 0x57, - 0x07, 0x51, 0xca, 0x57, 0x32, 0xb5, 0x42, 0xfd, 0xb5, 0x28, 0x34, 0x6f, 0x6e, 0x9f, 0x7f, 0x85, - 0x5c, 0xe4, 0x8b, 0x1f, 0x23, 0xec, 0x03, 0x73, 0x07, 0xdc, 0xd1, 0xed, 0x97, 0x34, 0x04, 0xd2, - 0xf9, 0xdd, 0x8e, 0x42, 0x13, 0x93, 0x19, 0xeb, 0x59, 0x68, 0xde, 0x98, 0x45, 0x75, 0x7b, 0x9c, - 0xc3, 0x55, 0xfd, 0xcd, 0x40, 0xb7, 0xa6, 0x66, 0x39, 0x1e, 0x9b, 0x20, 0xee, 0x78, 0xfc, 0x18, - 0xe5, 0xd5, 0x87, 0x69, 0x52, 0x49, 0xf5, 0x70, 0x17, 0xb7, 0x6e, 0xcf, 0xf7, 0x19, 0xe3, 0x6f, - 0xb6, 0x0f, 0x92, 0xd6, 0x71, 0x32, 0x34, 0x68, 0x84, 0x91, 0x94, 0x15, 0x7f, 0x85, 0xf2, 0x49, - 0x64, 0x51, 0x5a, 0xd4, 0x23, 0xfa, 0xfe, 0xfc, 0x23, 0x3a, 0xf5, 0xf6, 0x7a, 0x56, 0x85, 0x22, - 0x29, 0x61, 0xf5, 0x2f, 0x03, 0x55, 0x9e, 0x97, 0xdf, 0x1e, 0x13, 0x12, 0x7f, 0x3d, 0x93, 0xa3, - 0x35, 0x67, 0xab, 0x32, 0x11, 0x67, 0x78, 0x3d, 0xc9, 0x30, 0x3f, 0x44, 0xc6, 0xf2, 0xeb, 0xa2, - 0x1c, 0x93, 0xd0, 0x1f, 0x26, 0x77, 0xf7, 0xd2, 0xc9, 0x4d, 0x3c, 0x7c, 0xb4, 0x89, 0x76, 0x15, - 0x39, 0x89, 0x63, 0x54, 0x7f, 0x31, 0x50, 0x56, 0xad, 0x26, 0xfc, 0x06, 0x2a, 0x50, 0x8f, 0x7d, - 0xe6, 0xf3, 0xc0, 0x13, 0x25, 0x43, 0xf7, 0xe0, 0x4a, 0x14, 0x9a, 0x85, 0xed, 0xc3, 0xdd, 0x18, - 0x24, 0x23, 0x3b, 0xde, 0x44, 0x45, 0xea, 0xb1, 0xb4, 0x65, 0x17, 0xf5, 0xf5, 0x35, 0x35, 0x40, - 0xdb, 0x87, 0xbb, 0x69, 0x9b, 0x8e, 0xdf, 0x51, 0xfc, 0x3e, 0x08, 0x1e, 0xf8, 0x4e, 0xb2, 0x59, - 0x13, 0x7e, 0x32, 0x04, 0xc9, 0xc8, 0x8e, 0xdf, 0x44, 0x39, 0xe1, 0x70, 0x0f, 0x92, 0xbd, 0x78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6a, 0xea, 0xe7, 0xff, 0x23, 0xc1, 0x79, 0x54, 0xf5, 0x67, 0x03, - 0xbd, 0x74, 0xce, 0x3a, 0xc3, 0xaf, 0xa2, 0x4c, 0xe0, 0xf7, 0x92, 0xb5, 0xbc, 0x14, 0x85, 0x66, - 0xe6, 0x01, 0xd9, 0x23, 0x0a, 0xc3, 0x14, 0x2d, 0x89, 0x58, 0x19, 0x92, 0xf4, 0xef, 0xcc, 0xff, - 0xc6, 0x69, 0x49, 0xa9, 0x17, 0xa3, 0xd0, 0x5c, 0x1a, 0xa2, 0x43, 0x5e, 0x5c, 0x43, 0x79, 0x87, - 0xd6, 0x03, 0xb7, 0x99, 0x68, 0xda, 0x72, 0x7d, 0x59, 0x95, 0x6b, 0x67, 0x3b, 0xc6, 0x48, 0x6a, - 0xad, 0x1f, 0x9c, 0x9c, 0x96, 0x17, 0x9e, 0x9e, 0x96, 0x17, 0x9e, 0x9d, 0x96, 0x17, 0xbe, 0x8f, - 0xca, 0xc6, 0x49, 0x54, 0x36, 0x9e, 0x46, 0x65, 0xe3, 0x59, 0x54, 0x36, 0x7e, 0x8f, 0xca, 0xc6, - 0x0f, 0x7f, 0x94, 0x17, 0xbe, 0xac, 0xcd, 0xfb, 0x4f, 0xf8, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x29, 0xe6, 0x3d, 0x13, 0x4d, 0x0f, 0x00, 0x00, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0x4d, 0x6f, 0x23, 0x45, + 0x13, 0xce, 0xc4, 0xf6, 0xda, 0x6e, 0x27, 0x9b, 0x4d, 0xbf, 0x2f, 0xbb, 0x26, 0xac, 0x3c, 0x96, + 0x0f, 0xc8, 0x12, 0xec, 0xcc, 0x26, 0x20, 0x04, 0x0b, 0x08, 0xc5, 0x81, 0x85, 0x48, 0xc9, 0x6e, + 0xe8, 0xec, 0x87, 0xc4, 0x87, 0xb4, 0x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 0x27, 0x07, 0xe1, 0x74, 0x61, + 0x40, 0x67, 0xfd, 0x6a, 0xbf, 0xe4, 0xd1, 0xda, 0x7e, 0x20, 0xa9, 0x64, 0x6e, 0xe7, 0x31, 0x34, + 0xbb, 0x9c, 0xf7, 0x70, 0x15, 0x65, 0x5d, 0x3a, 0x80, 0xb2, 0x51, 0x35, 0xea, 0xc5, 0xc6, 0xca, + 0x71, 0x68, 0x2e, 0x45, 0xa1, 0x99, 0xbd, 0x47, 0x07, 0x40, 0x94, 0x05, 0x3f, 0x45, 0x2b, 0x4e, + 0x9f, 0x81, 0x2b, 0x77, 0xb8, 0xdb, 0x66, 0x9d, 0xf2, 0x72, 0xd5, 0xa8, 0x97, 0xb6, 0x3e, 0xb4, + 0x16, 0x2d, 0xa2, 0xa5, 0x43, 0xed, 0x4c, 0x90, 0x34, 0xfe, 0xaf, 0x03, 0xad, 0x4c, 0xa2, 0x64, + 0x2a, 0x10, 0xa6, 0x28, 0xe7, 0x07, 0x7d, 0x10, 0xe5, 0x4c, 0x35, 0x53, 0x2f, 0x6d, 0x7d, 0xb0, + 0x78, 0x44, 0x12, 0xf4, 0xe1, 0x31, 0x93, 0xdd, 0xfb, 0x1e, 0x24, 0x16, 0xd1, 0x58, 0xd5, 0x01, + 0x73, 0xb1, 0x4d, 0x90, 0x84, 0x19, 0xef, 0xa1, 0xd5, 0x36, 0x65, 0xfd, 0xc0, 0x87, 0x03, 0xde, + 0x67, 0xce, 0x51, 0x39, 0xab, 0xca, 0xf0, 0x7a, 0x14, 0x9a, 0xab, 0x77, 0x27, 0x0d, 0xa7, 0xa1, + 0xb9, 0x3e, 0x05, 0x3c, 0x38, 0xf2, 0x80, 0x4c, 0x3b, 0xe3, 0x8f, 0x51, 0x69, 0x40, 0xa5, 0xd3, + 0xd5, 0x5c, 0x45, 0xc5, 0x55, 0x8b, 0x42, 0xb3, 0xb4, 0x3f, 0x86, 0x4f, 0x43, 0x73, 0x6d, 0xe2, + 0xa8, 0x78, 0x26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x39, 0xeb, 0x69, 0x68, 0x5e, 0x9f, 0x47, 0x55, + 0x7b, 0x9c, 0xc1, 0x55, 0xfb, 0xd5, 0x40, 0x37, 0x67, 0x66, 0x39, 0x19, 0x9b, 0x20, 0xe9, 0x78, + 0xfc, 0x04, 0x15, 0xe2, 0x1f, 0xd3, 0xa2, 0x92, 0xaa, 0xe1, 0x2e, 0x6d, 0xdd, 0x5e, 0xec, 0x37, + 0x26, 0xff, 0x6c, 0x1f, 0x24, 0x6d, 0x60, 0x3d, 0x34, 0x68, 0x8c, 0x91, 0x94, 0x15, 0x7f, 0x89, + 0x0a, 0x3a, 0xb2, 0x28, 0x2f, 0xab, 0x11, 0x7d, 0x6f, 0xf1, 0x11, 0x9d, 0x79, 0x7b, 0x23, 0x1b, + 0x87, 0x22, 0x29, 0x61, 0xed, 0x4f, 0x03, 0x55, 0x5f, 0x94, 0xdf, 0x1e, 0x13, 0x12, 0x7f, 0x35, + 0x97, 0xa3, 0xb5, 0x60, 0xab, 0x32, 0x91, 0x64, 0x78, 0x4d, 0x67, 0x58, 0x18, 0x21, 0x13, 0xf9, + 0xf5, 0x50, 0x8e, 0x49, 0x18, 0x8c, 0x92, 0xbb, 0x7b, 0xe1, 0xe4, 0xa6, 0x1e, 0x3e, 0xde, 0x44, + 0xbb, 0x31, 0x39, 0x49, 0x62, 0xd4, 0x7e, 0x36, 0x50, 0x36, 0x5e, 0x4d, 0xf8, 0x0d, 0x54, 0xa4, + 0x1e, 0xfb, 0xd4, 0xe7, 0x81, 0x27, 0xca, 0x86, 0xea, 0xc1, 0xd5, 0x28, 0x34, 0x8b, 0xdb, 0x07, + 0xbb, 0x09, 0x48, 0xc6, 0x76, 0xbc, 0x89, 0x4a, 0xd4, 0x63, 0x69, 0xcb, 0x2e, 0xab, 0xeb, 0x6b, + 0xf1, 0x00, 0x6d, 0x1f, 0xec, 0xa6, 0x6d, 0x3a, 0x79, 0x27, 0xe6, 0xf7, 0x41, 0xf0, 0xc0, 0x77, + 0x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c, 0x84, 0xe6, 0x5e, 0x3f, 0xa7, 0xa8, 0x7f, 0x19, 0xa8, 0xf6, + 0xe2, 0x1c, 0x5f, 0x82, 0xa6, 0x0e, 0xa6, 0x35, 0xf5, 0xb3, 0xff, 0x90, 0xe0, 0x22, 0xaa, 0xfa, + 0x93, 0x81, 0xfe, 0x77, 0xc6, 0x3a, 0xc3, 0xaf, 0xa2, 0x4c, 0xe0, 0xf7, 0xf5, 0x5a, 0xce, 0x47, + 0xa1, 0x99, 0x79, 0x48, 0xf6, 0x48, 0x8c, 0x61, 0x8a, 0xf2, 0x22, 0x51, 0x06, 0x9d, 0xfe, 0x9d, + 0xc5, 0xdf, 0x38, 0x2b, 0x29, 0x8d, 0x52, 0x14, 0x9a, 0xf9, 0x11, 0x3a, 0xe2, 0xc5, 0x75, 0x54, + 0x70, 0x68, 0x23, 0x70, 0x5b, 0x5a, 0xd3, 0x56, 0x1a, 0x2b, 0x71, 0xb9, 0x76, 0xb6, 0x13, 0x8c, + 0xa4, 0xd6, 0xc6, 0xad, 0xe3, 0x93, 0xca, 0xd2, 0xb3, 0x93, 0xca, 0xd2, 0xf3, 0x93, 0xca, 0xd2, + 0x77, 0x51, 0xc5, 0x38, 0x8e, 0x2a, 0xc6, 0xb3, 0xa8, 0x62, 0x3c, 0x8f, 0x2a, 0xc6, 0x6f, 0x51, + 0xc5, 0xf8, 0xfe, 0xf7, 0xca, 0xd2, 0x17, 0x79, 0x1d, 0xff, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xcc, 0x27, 0xa9, 0x41, 0x2c, 0x0f, 0x00, 0x00, } func (m *MutatingWebhook) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto index 78440764f3b5..2752f4faee0f 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/admissionregistration/v1beta1/generated.proto @@ -26,7 +26,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/admissionregistration/v1beta1"; +option go_package = "v1beta1"; // MutatingWebhook describes an admission webhook and the resources and operations it applies to. message MutatingWebhook { diff --git a/cluster-autoscaler/vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.pb.go index 4effbc6c17e4..ee12c7d0dc99 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.pb.go @@ -225,55 +225,55 @@ func init() { } var fileDescriptor_a3903ff5e3cc7a03 = []byte{ - // 768 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xdf, 0x4e, 0x13, 0x4d, - 0x14, 0xef, 0xd2, 0x52, 0x60, 0xfa, 0x7d, 0xf4, 0x63, 0x3e, 0x08, 0xb5, 0x26, 0x5b, 0x6c, 0x82, - 0x41, 0x8d, 0xbb, 0xd2, 0x88, 0x91, 0x98, 0x68, 0x58, 0x20, 0x06, 0x05, 0x31, 0x03, 0xf1, 0x02, - 0xbd, 0x70, 0xba, 0x3b, 0x6e, 0xd7, 0x76, 0x77, 0x36, 0x3b, 0xd3, 0x26, 0xdc, 0x18, 0x1f, 0xc1, - 0x07, 0xf1, 0xd2, 0x87, 0xe0, 0xca, 0x70, 0x63, 0x42, 0x62, 0xd2, 0xc8, 0xfa, 0x16, 0x5c, 0x99, - 0x99, 0xdd, 0xb6, 0x6c, 0xbb, 0xc4, 0x86, 0x8b, 0x26, 0x9d, 0x73, 0xce, 0xef, 0x77, 0xfe, 0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fe, 0x9c, 0x00, 0xf3, 0x69, 0x32, 0x86, 0x9f, 0x40, 0x91, 0x25, 0xec, 0xac, 0xa4, 0xc8, - 0xa2, 0xc6, 0x7e, 0x1c, 0x29, 0xab, 0x6f, 0xb0, 0xaa, 0x92, 0x76, 0x86, 0x86, 0x93, 0xc1, 0x7d, - 0xb0, 0x60, 0x52, 0xd7, 0xa5, 0xde, 0x76, 0xea, 0xce, 0xbb, 0x11, 0x76, 0x2b, 0x0b, 0x9b, 0x69, - 0x01, 0x28, 0x1d, 0x07, 0x03, 0x00, 0xcc, 0xde, 0x13, 0x88, 0x96, 0x5e, 0xa1, 0xf6, 0xf4, 0x5a, - 0x03, 0xee, 0xbf, 0xa4, 0xc1, 0xce, 0xea, 0x9b, 0x18, 0xba, 0x94, 0xc5, 0x78, 0x79, 0x72, 0xae, - 0x66, 0x4e, 0xcf, 0xd5, 0xcc, 0xd9, 0xb9, 0x9a, 0xf9, 0x1c, 0xaa, 0xca, 0x49, 0xa8, 0x2a, 0xa7, - 0xa1, 0xaa, 0x9c, 0x85, 0xaa, 0xf2, 0x2b, 0x54, 0x95, 0x2f, 0xbf, 0xd5, 0xcc, 0xd1, 0xf2, 0x58, - 0x1f, 0xd5, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xa0, 0xd0, 0x65, 0xbc, 0x95, 0x07, 0x00, 0x00, + // 763 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x4f, 0x4f, 0x13, 0x41, + 0x14, 0xef, 0xd2, 0x52, 0x60, 0xaa, 0x54, 0x46, 0x08, 0xb5, 0x26, 0x5b, 0x6c, 0xa2, 0x41, 0x8d, + 0xbb, 0xd2, 0x88, 0x91, 0x98, 0x68, 0x58, 0x20, 0x06, 0x03, 0x62, 0x06, 0xe2, 0x01, 0x3d, 0x38, + 0xdd, 0x1d, 0xb7, 0x6b, 0xbb, 0x3b, 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 0x04, 0xfd, 0xf3, 0xab, 0xd1, 0x4b, 0x0a, 0x63, 0x36, 0x4e, 0x90, 0x8f, 0xce, 0x28, 0xa6, 0xae, + 0x7e, 0xcf, 0x82, 0xc5, 0x34, 0x60, 0x83, 0x7a, 0x96, 0xc3, 0xc5, 0xfc, 0x5e, 0x82, 0x1c, 0x3f, + 0xf2, 0x49, 0x2c, 0x85, 0x87, 0x49, 0x89, 0x07, 0x47, 0x3e, 0x39, 0xef, 0x56, 0x6e, 0x5f, 0x02, + 0x13, 0x6e, 0x24, 0x81, 0x70, 0xad, 0xd7, 0x41, 0x24, 0x89, 0x3b, 0xe9, 0x22, 0xce, 0xbb, 0x95, + 0x62, 0x0f, 0x96, 0xae, 0x0b, 0xbe, 0x06, 0x90, 0xd6, 0x65, 0x87, 0xd6, 0xab, 0x48, 0xc1, 0x42, + 0x59, 0x62, 0x10, 0x59, 0xa3, 0x1c, 0xd3, 0xc0, 0xbd, 0xa1, 0x08, 0x34, 0x02, 0x05, 0x3b, 0x00, + 0xb6, 0x30, 0xe3, 0x07, 0x01, 0xf6, 0x58, 0x54, 0xa2, 0xe3, 0x92, 0x52, 0x4e, 0x0e, 0xf5, 0xc1, + 0x78, 0x8a, 0x10, 0x88, 0x7e, 0xde, 0x9d, 0x21, 0x36, 0x34, 0x22, 0x03, 0xbc, 0x07, 0xf2, 0x01, + 0xc1, 0x8c, 0x7a, 0xa5, 0x49, 0xd9, 0x7e, 0xef, 0x0e, 0x90, 0xb4, 0xa2, 0xd8, 0x0b, 0xef, 0x83, + 0x29, 0x97, 0x30, 0x86, 0x6d, 0x52, 0xca, 0xcb, 0xc0, 0x62, 0x1c, 0x38, 0xb5, 0x1b, 0x99, 0x51, + 0xe2, 0xaf, 0xfe, 0x54, 0x00, 0x4c, 0xcf, 0x7d, 0xc7, 0x61, 0x1c, 0x7e, 0x18, 0x52, 0xba, 0x36, + 0x5e, 0x5f, 0x02, 0x2d, 0x75, 0x7e, 0x23, 0x4e, 0x39, 0x9d, 0x58, 0x2e, 0xa8, 0xfc, 0x10, 0x4c, + 0x3a, 0x9c, 0xb8, 0xe2, 0x16, 0xb3, 0xcb, 0x85, 0xda, 0xea, 0x95, 0x74, 0x68, 0x5c, 0x8f, 0x33, + 0x4c, 0x6e, 0x0b, 0x2e, 0x14, 0x51, 0x56, 0xe7, 0x07, 0xfb, 0x11, 0x0f, 0xa0, 0xfa, 0x7b, 0x02, + 0xcc, 0x8f, 0x92, 0x31, 0xfc, 0x02, 0x8a, 0x2c, 0x65, 0x67, 0x25, 0x45, 0x16, 0x35, 0xf6, 0xe3, + 0x18, 0xb1, 0xfa, 0xfa, 0xab, 0x2a, 0x6d, 0x67, 0x68, 0x30, 0x19, 0xdc, 0x03, 0x0b, 0x26, 0x75, + 0x5d, 0xea, 0x6d, 0x8d, 0xdc, 0x79, 0xb7, 0xc2, 0x6e, 0x65, 0x61, 0x63, 0x54, 0x00, 0x1a, 0x8d, + 0x83, 0x01, 0x00, 0x66, 0xf2, 0x04, 0xa2, 0xa5, 0x57, 0xa8, 0xbd, 0xb8, 0xd2, 0x80, 0x7b, 0x2f, + 0xa9, 0xbf, 0xb3, 0x7a, 0x26, 0x86, 0x2e, 0x64, 0x31, 0xb4, 0xe3, 0x33, 0x35, 0x73, 0x72, 0xa6, + 0x66, 0x4e, 0xcf, 0xd4, 0xcc, 0xd7, 0x50, 0x55, 0x8e, 0x43, 0x55, 0x39, 0x09, 0x55, 0xe5, 0x34, + 0x54, 0x95, 0x3f, 0xa1, 0xaa, 0x7c, 0xfb, 0xab, 0x66, 0x0e, 0xa7, 0x93, 0x3c, 0xff, 0x02, 0x00, + 0x00, 0xff, 0xff, 0xa1, 0x5f, 0xcf, 0x37, 0x78, 0x07, 0x00, 0x00, } func (m *ServerStorageVersion) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.proto index 37ac0d326703..c4506eb92365 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.proto @@ -26,7 +26,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/apiserverinternal/v1alpha1"; +option go_package = "v1alpha1"; // An API server instance reports the version it can decode and the version it // encodes objects to when persisting objects in the backend. diff --git a/cluster-autoscaler/vendor/k8s.io/api/apps/v1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/apps/v1/generated.pb.go index ee10998d52c0..81d51bd58f5c 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/apps/v1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/apps/v1/generated.pb.go @@ -899,142 +899,142 @@ func init() { } var fileDescriptor_e1014cab6f31e43b = []byte{ - // 2160 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcd, 0x6f, 0x1c, 0xb7, - 0x15, 0xd7, 0xec, 0x87, 0xb4, 0xa2, 0x2c, 0xc9, 0xa6, 0x54, 0x69, 0x63, 0x37, 0xbb, 0xee, 0xd6, - 0x75, 0x94, 0x38, 0xde, 0xad, 0x1d, 0x27, 0x08, 0xe2, 0x22, 0x81, 0x66, 0x95, 0xa6, 0x69, 0x24, - 0x59, 0xa5, 0x2c, 0x07, 0x70, 0xd3, 0xa2, 0xd4, 0x2c, 0xbd, 0x9a, 0x68, 0xbe, 0x30, 0xc3, 0x51, - 0x2c, 0xf4, 0x52, 0x14, 0xe8, 0xad, 0x87, 0xfe, 0x27, 0x45, 0x51, 0x34, 0xb7, 0x20, 0x08, 0x7a, - 0xf1, 0xa5, 0x68, 0xd0, 0x4b, 0x73, 0x5a, 0xd4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0xe3, 0xb2, 0x40, 0x27, 0xfd, - 0xad, 0x92, 0xf4, 0x9a, 0x0b, 0xa5, 0x15, 0x76, 0xa1, 0x72, 0x0c, 0x5d, 0xc3, 0x9e, 0x28, 0xab, - 0x67, 0x82, 0xcb, 0x54, 0xd0, 0x86, 0xa2, 0xde, 0x94, 0xa4, 0x2a, 0x3d, 0x59, 0x49, 0x55, 0xfe, - 0x62, 0x24, 0xd5, 0x6d, 0x50, 0xf3, 0x42, 0x31, 0x55, 0xe1, 0x94, 0x97, 0x47, 0xa5, 0xb3, 0xd0, - 0x51, 0x11, 0x6b, 0xa4, 0xa0, 0x22, 0x26, 0x99, 0x76, 0xaa, 0x7e, 0x99, 0xda, 0x89, 0x85, 0xb7, - 0x83, 0x7d, 0x8f, 0xf4, 0x78, 0x2a, 0xd5, 0xe2, 0xf0, 0xde, 0xe2, 0xad, 0x48, 0xf4, 0xc2, 0x1d, - 0xb0, 0xec, 0xb8, 0x76, 0xdf, 0x25, 0x9e, 0xb7, 0x46, 0x70, 0xcf, 0xd0, 0x2d, 0x12, 0x4e, 0x20, - 0xa8, 0x7a, 0x17, 0x86, 0x83, 0xe6, 0xf2, 0x96, 0x1c, 0x82, 0x8a, 0x6c, 0x5b, 0x1f, 0x55, 0xc0, - 0xd9, 0xec, 0x89, 0x58, 0x20, 0x44, 0x94, 0x13, 0x09, 0x91, 0x17, 0x13, 0x21, 0x1a, 0xa8, 0xb4, - 0xc4, 0x9d, 0x3f, 0x17, 0xa6, 0xab, 0x60, 0x5e, 0x08, 0x8f, 0xb0, 0x53, 0x48, 0xb1, 0x68, 0x7b, - 0x76, 0xd2, 0xdd, 0x28, 0x8b, 0x87, 0x37, 0xc1, 0xac, 0xcb, 0xb5, 0x55, 0x48, 0x10, 0xe8, 0x93, - 0x6f, 0x09, 0x82, 0x59, 0x94, 0xec, 0x44, 0x69, 0x2c, 0xd3, 0x26, 0xb1, 0xe4, 0x08, 0x09, 0x2a, - 0x69, 0x6d, 0xb2, 0x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0xf9, 0x13, 0xe1, 0x8d, 0x91, 0x4f, - 0x84, 0x12, 0xe9, 0x3f, 0xfa, 0xad, 0x50, 0x7d, 0xf5, 0xc1, 0xc3, 0xc6, 0xc4, 0xa7, 0x0f, 0x1b, - 0x13, 0x9f, 0x3d, 0x6c, 0x4c, 0xfc, 0x6a, 0xd8, 0x50, 0x1e, 0x0c, 0x1b, 0xca, 0xa7, 0xc3, 0x86, - 0xf2, 0xd9, 0xb0, 0xa1, 0xfc, 0x63, 0xd8, 0x50, 0x7e, 0xf7, 0x79, 0x63, 0xe2, 0x2e, 0xcc, 0xff, - 0x1b, 0xe4, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x92, 0xcf, 0x5d, 0xcc, 0x34, 0x29, 0x00, 0x00, + // 2149 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcb, 0x6f, 0x1b, 0xc7, + 0x19, 0xd7, 0xf2, 0x21, 0x51, 0x23, 0x4b, 0xb2, 0x47, 0xaa, 0xc4, 0xd8, 0x0d, 0xe9, 0xb2, 0xae, + 0xa3, 0xc4, 0x31, 0x59, 0x3b, 0x4e, 0x50, 0xc4, 0x45, 0x02, 0x91, 0x4a, 0xd3, 0x34, 0x7a, 0x75, + 0x64, 0x39, 0x80, 0x9b, 0x16, 0x1d, 0x2d, 0xc7, 0xd4, 0x46, 0xfb, 0xc2, 0xee, 0x2c, 0x63, 0xa2, + 0x97, 0xa2, 0x40, 0x6f, 0x3d, 0xf4, 0x3f, 0x29, 0x8a, 0xa2, 0xb9, 0x15, 0x41, 0xd0, 0x8b, 0x2f, + 0x45, 0x83, 0x5e, 0x9a, 0x13, 0x51, 0x33, 0xa7, 0xa2, 0xe8, 0xad, 0xbd, 0xf8, 0xd2, 0x62, 0x66, + 0x67, 0xdf, 0xb3, 0x22, 0x25, 0x27, 0xca, 0x03, 0xbe, 0x89, 0x33, 0xbf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, 0x4d, 0xf9, 0x78, 0x54, 0x53, 0x3e, 0x19, 0xd5, 0x94, 0x7f, 0x8c, 0x6a, 0xca, 0x6f, + 0x3f, 0xad, 0x4d, 0xdd, 0x2b, 0xf4, 0x6f, 0xfc, 0x3f, 0x00, 0x00, 0xff, 0xff, 0xc5, 0x7f, 0x6b, + 0xc0, 0xb5, 0x28, 0x00, 0x00, } func (m *ControllerRevision) Marshal() (dAtA []byte, err error) { @@ -2168,18 +2168,6 @@ func (m *RollingUpdateStatefulSetStrategy) MarshalToSizedBuffer(dAtA []byte) (in _ = i var l int _ = l - if m.MaxUnavailable != nil { - { - size, err := m.MaxUnavailable.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } if m.Partition != nil { i = encodeVarintGenerated(dAtA, i, uint64(*m.Partition)) i-- @@ -2996,10 +2984,6 @@ func (m *RollingUpdateStatefulSetStrategy) Size() (n int) { if m.Partition != nil { n += 1 + sovGenerated(uint64(*m.Partition)) } - if m.MaxUnavailable != nil { - l = m.MaxUnavailable.Size() - n += 1 + l + sovGenerated(uint64(l)) - } return n } @@ -3469,7 +3453,6 @@ func (this *RollingUpdateStatefulSetStrategy) String() string { } s := strings.Join([]string{`&RollingUpdateStatefulSetStrategy{`, `Partition:` + valueToStringGenerated(this.Partition) + `,`, - `MaxUnavailable:` + strings.Replace(fmt.Sprintf("%v", this.MaxUnavailable), "IntOrString", "intstr.IntOrString", 1) + `,`, `}`, }, "") return s @@ -7092,42 +7075,6 @@ func (m *RollingUpdateStatefulSetStrategy) Unmarshal(dAtA []byte) error { } } m.Partition = &v - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxUnavailable", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaxUnavailable == nil { - m.MaxUnavailable = &intstr.IntOrString{} - } - if err := m.MaxUnavailable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/cluster-autoscaler/vendor/k8s.io/api/apps/v1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/apps/v1/generated.proto index 1bdc400b9d20..6e5517d81fa8 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/apps/v1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/apps/v1/generated.proto @@ -28,7 +28,7 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/apps/v1"; +option go_package = "v1"; // ControllerRevision implements an immutable snapshot of state data. Clients // are responsible for serializing and deserializing the objects that contain @@ -550,22 +550,11 @@ message RollingUpdateDeployment { // RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. message RollingUpdateStatefulSetStrategy { - // Partition indicates the ordinal at which the StatefulSet should be partitioned - // for updates. During a rolling update, all pods from ordinal Replicas-1 to - // Partition are updated. All pods from ordinal Partition-1 to 0 remain untouched. - // This is helpful in being able to do a canary based deployment. The default value is 0. + // Partition indicates the ordinal at which the StatefulSet should be + // partitioned. + // Default value is 0. // +optional optional int32 partition = 1; - - // The maximum number of pods that can be unavailable during the update. - // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). - // Absolute number is calculated from percentage by rounding up. This can not be 0. - // Defaults to 1. This field is alpha-level and is only honored by servers that enable the - // MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to - // Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it - // will be counted towards MaxUnavailable. - // +optional - optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 2; } // StatefulSet represents a set of pods with consistent identities. @@ -759,7 +748,6 @@ message StatefulSetStatus { // Total number of available pods (ready for at least minReadySeconds) targeted by this statefulset. // This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate. - // +optional optional int32 availableReplicas = 11; } diff --git a/cluster-autoscaler/vendor/k8s.io/api/apps/v1/types.go b/cluster-autoscaler/vendor/k8s.io/api/apps/v1/types.go index 28474be7f4fd..469b47297f64 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/apps/v1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/api/apps/v1/types.go @@ -111,21 +111,11 @@ const ( // RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. type RollingUpdateStatefulSetStrategy struct { - // Partition indicates the ordinal at which the StatefulSet should be partitioned - // for updates. During a rolling update, all pods from ordinal Replicas-1 to - // Partition are updated. All pods from ordinal Partition-1 to 0 remain untouched. - // This is helpful in being able to do a canary based deployment. The default value is 0. + // Partition indicates the ordinal at which the StatefulSet should be + // partitioned. + // Default value is 0. // +optional Partition *int32 `json:"partition,omitempty" protobuf:"varint,1,opt,name=partition"` - // The maximum number of pods that can be unavailable during the update. - // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). - // Absolute number is calculated from percentage by rounding up. This can not be 0. - // Defaults to 1. This field is alpha-level and is only honored by servers that enable the - // MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to - // Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it - // will be counted towards MaxUnavailable. - // +optional - MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"varint,2,opt,name=maxUnavailable"` } // PersistentVolumeClaimRetentionPolicyType is a string enumeration of the policies that will determine @@ -282,7 +272,6 @@ type StatefulSetStatus struct { // Total number of available pods (ready for at least minReadySeconds) targeted by this statefulset. // This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate. - // +optional AvailableReplicas int32 `json:"availableReplicas" protobuf:"varint,11,opt,name=availableReplicas"` } diff --git a/cluster-autoscaler/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go b/cluster-autoscaler/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go index f00d10aeabc2..f640f9cdd661 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go +++ b/cluster-autoscaler/vendor/k8s.io/api/apps/v1/types_swagger_doc_generated.go @@ -281,9 +281,8 @@ func (RollingUpdateDeployment) SwaggerDoc() map[string]string { } var map_RollingUpdateStatefulSetStrategy = map[string]string{ - "": "RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.", - "partition": "Partition indicates the ordinal at which the StatefulSet should be partitioned for updates. During a rolling update, all pods from ordinal Replicas-1 to Partition are updated. All pods from ordinal Partition-1 to 0 remain untouched. This is helpful in being able to do a canary based deployment. The default value is 0.", - "maxUnavailable": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding up. This can not be 0. Defaults to 1. This field is alpha-level and is only honored by servers that enable the MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it will be counted towards MaxUnavailable.", + "": "RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.", + "partition": "Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0.", } func (RollingUpdateStatefulSetStrategy) SwaggerDoc() map[string]string { diff --git a/cluster-autoscaler/vendor/k8s.io/api/apps/v1/zz_generated.deepcopy.go b/cluster-autoscaler/vendor/k8s.io/api/apps/v1/zz_generated.deepcopy.go index 72d76670e78c..8e4d4261a290 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/apps/v1/zz_generated.deepcopy.go +++ b/cluster-autoscaler/vendor/k8s.io/api/apps/v1/zz_generated.deepcopy.go @@ -597,11 +597,6 @@ func (in *RollingUpdateStatefulSetStrategy) DeepCopyInto(out *RollingUpdateState *out = new(int32) **out = **in } - if in.MaxUnavailable != nil { - in, out := &in.MaxUnavailable, &out.MaxUnavailable - *out = new(intstr.IntOrString) - **out = **in - } return } diff --git a/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta1/generated.pb.go index 48ac988f4529..74584223c992 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta1/generated.pb.go @@ -699,131 +699,130 @@ func init() { } var fileDescriptor_2a07313e8f66e805 = []byte{ - // 1982 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x59, 0xcf, 0x6f, 0x1b, 0xc7, - 0xf5, 0xd7, 0x52, 0xa2, 0x44, 0x3d, 0x45, 0x94, 0x3d, 0xd2, 0xd7, 0x62, 0x94, 0x6f, 0x49, 0x81, - 0x35, 0x12, 0xe5, 0x87, 0x97, 0xb1, 0x92, 0x06, 0x89, 0xdd, 0xba, 0x15, 0x25, 0x37, 0x76, 0x20, - 0xc5, 0xca, 0x48, 0x8a, 0xd1, 0xf4, 0x07, 0x32, 0x24, 0xc7, 0xd4, 0x46, 0xfb, 0x0b, 0xbb, 0x43, - 0xc6, 0x44, 0x2f, 0xfd, 0x03, 0x0a, 0xa4, 0xe7, 0xfe, 0x15, 0xbd, 0xb5, 0x68, 0xd1, 0x4b, 0x0f, - 0x85, 0x8f, 0x41, 0x2f, 0x4d, 0x2f, 0x44, 0xcd, 0x5c, 0xdb, 0x5b, 0x7b, 0x31, 0x50, 0xa0, 0x98, - 0x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0xd9, 0xac, 0xfe, 0xbd, 0x62, 0xac, 0x3e, 0x83, - 0x71, 0x5e, 0x4c, 0xef, 0xdb, 0xdf, 0x79, 0xf2, 0xb4, 0x3e, 0xf3, 0xe5, 0xd3, 0xfa, 0xcc, 0x57, - 0x4f, 0xeb, 0x33, 0x3f, 0x9b, 0xd4, 0x95, 0x27, 0x93, 0xba, 0xf2, 0xe5, 0xa4, 0xae, 0x7c, 0x35, - 0xa9, 0x2b, 0x7f, 0x9d, 0xd4, 0x95, 0x5f, 0x7c, 0x5d, 0x9f, 0xf9, 0x64, 0x3d, 0xe7, 0x3f, 0xbf, - 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xe7, 0x15, 0x68, 0x85, 0x2c, 0x1e, 0x00, 0x00, + // 1968 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0xcd, 0x6f, 0x1b, 0xc7, + 0x15, 0xd7, 0x4a, 0xa2, 0x44, 0x3d, 0x45, 0x94, 0x3d, 0x52, 0x2d, 0x46, 0x69, 0x49, 0x81, 0x35, + 0x12, 0xe5, 0x43, 0xcb, 0x58, 0x49, 0x83, 0xc4, 0x2e, 0xdc, 0x8a, 0x92, 0x1b, 0x3b, 0x90, 0x22, + 0x65, 0x24, 0xc5, 0x68, 0xfa, 0x81, 0x0c, 0xc9, 0x31, 0xb5, 0xd1, 0x7e, 0x61, 0x77, 0xc8, 0x98, + 0xe8, 0xa5, 0x7f, 0x40, 0x81, 0xf4, 0xdc, 0xbf, 0xa2, 0xb7, 0x16, 0xed, 0xad, 0x87, 0xc2, 0xc7, + 0xa0, 0x97, 0xa6, 0x17, 0xa2, 0x66, 0xae, 0xed, 0xad, 0xbd, 0x18, 0x28, 0x50, 0xcc, 0xec, 0xec, + 0xf7, 0xae, 0xb4, 0x2c, 0x60, 0x01, 0xcd, 0x8d, 0x3b, 0xef, 0xbd, 0xdf, 0x9b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0xa9, 0x5f, 0x8e, 0x6b, 0xca, 0x93, 0x71, 0x4d, 0xf9, 0x72, + 0x5c, 0x53, 0xbe, 0x1a, 0xd7, 0x94, 0xbf, 0x8f, 0x6b, 0xca, 0xaf, 0xbf, 0xae, 0x4d, 0x7d, 0x32, + 0x2f, 0x3d, 0xfe, 0x37, 0x00, 0x00, 0xff, 0xff, 0x3d, 0xfc, 0xe0, 0xc3, 0xad, 0x1d, 0x00, 0x00, } func (m *ControllerRevision) Marshal() (dAtA []byte, err error) { @@ -1430,18 +1429,6 @@ func (m *RollingUpdateStatefulSetStrategy) MarshalToSizedBuffer(dAtA []byte) (in _ = i var l int _ = l - if m.MaxUnavailable != nil { - { - size, err := m.MaxUnavailable.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } if m.Partition != nil { i = encodeVarintGenerated(dAtA, i, uint64(*m.Partition)) i-- @@ -2209,10 +2196,6 @@ func (m *RollingUpdateStatefulSetStrategy) Size() (n int) { if m.Partition != nil { n += 1 + sovGenerated(uint64(*m.Partition)) } - if m.MaxUnavailable != nil { - l = m.MaxUnavailable.Size() - n += 1 + l + sovGenerated(uint64(l)) - } return n } @@ -2585,7 +2568,6 @@ func (this *RollingUpdateStatefulSetStrategy) String() string { } s := strings.Join([]string{`&RollingUpdateStatefulSetStrategy{`, `Partition:` + valueToStringGenerated(this.Partition) + `,`, - `MaxUnavailable:` + strings.Replace(fmt.Sprintf("%v", this.MaxUnavailable), "IntOrString", "intstr.IntOrString", 1) + `,`, `}`, }, "") return s @@ -4621,42 +4603,6 @@ func (m *RollingUpdateStatefulSetStrategy) Unmarshal(dAtA []byte) error { } } m.Partition = &v - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxUnavailable", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaxUnavailable == nil { - m.MaxUnavailable = &intstr.IntOrString{} - } - if err := m.MaxUnavailable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta1/generated.proto index 53df96ee4de3..9f9df98fce6f 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta1/generated.proto @@ -28,7 +28,7 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/apps/v1beta1"; +option go_package = "v1beta1"; // DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1beta2/ControllerRevision. See the // release notes for more information. @@ -270,21 +270,9 @@ message RollingUpdateDeployment { // RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. message RollingUpdateStatefulSetStrategy { - // Partition indicates the ordinal at which the StatefulSet should be partitioned - // for updates. During a rolling update, all pods from ordinal Replicas-1 to - // Partition are updated. All pods from ordinal Partition-1 to 0 remain untouched. - // This is helpful in being able to do a canary based deployment. The default value is 0. + // Partition indicates the ordinal at which the StatefulSet should be + // partitioned. optional int32 partition = 1; - - // The maximum number of pods that can be unavailable during the update. - // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). - // Absolute number is calculated from percentage by rounding up. This can not be 0. - // Defaults to 1. This field is alpha-level and is only honored by servers that enable the - // MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to - // Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it - // will be counted towards MaxUnavailable. - // +optional - optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 2; } // Scale represents a scaling request for a resource. @@ -514,7 +502,6 @@ message StatefulSetStatus { // Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet. // This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate. - // +optional optional int32 availableReplicas = 11; } diff --git a/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta1/types.go b/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta1/types.go index cdc81c956a3c..832ef34f45f6 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta1/types.go @@ -153,20 +153,9 @@ const ( // RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. type RollingUpdateStatefulSetStrategy struct { - // Partition indicates the ordinal at which the StatefulSet should be partitioned - // for updates. During a rolling update, all pods from ordinal Replicas-1 to - // Partition are updated. All pods from ordinal Partition-1 to 0 remain untouched. - // This is helpful in being able to do a canary based deployment. The default value is 0. + // Partition indicates the ordinal at which the StatefulSet should be + // partitioned. Partition *int32 `json:"partition,omitempty" protobuf:"varint,1,opt,name=partition"` - // The maximum number of pods that can be unavailable during the update. - // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). - // Absolute number is calculated from percentage by rounding up. This can not be 0. - // Defaults to 1. This field is alpha-level and is only honored by servers that enable the - // MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to - // Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it - // will be counted towards MaxUnavailable. - // +optional - MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"varint,2,opt,name=maxUnavailable"` } // PersistentVolumeClaimRetentionPolicyType is a string enumeration of the policies that will determine @@ -321,7 +310,6 @@ type StatefulSetStatus struct { // Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet. // This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate. - // +optional AvailableReplicas int32 `json:"availableReplicas" protobuf:"varint,11,opt,name=availableReplicas"` } diff --git a/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta1/types_swagger_doc_generated.go b/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta1/types_swagger_doc_generated.go index f57b7b2efcfd..e92881a35da1 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta1/types_swagger_doc_generated.go +++ b/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta1/types_swagger_doc_generated.go @@ -157,9 +157,8 @@ func (RollingUpdateDeployment) SwaggerDoc() map[string]string { } var map_RollingUpdateStatefulSetStrategy = map[string]string{ - "": "RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.", - "partition": "Partition indicates the ordinal at which the StatefulSet should be partitioned for updates. During a rolling update, all pods from ordinal Replicas-1 to Partition are updated. All pods from ordinal Partition-1 to 0 remain untouched. This is helpful in being able to do a canary based deployment. The default value is 0.", - "maxUnavailable": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding up. This can not be 0. Defaults to 1. This field is alpha-level and is only honored by servers that enable the MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it will be counted towards MaxUnavailable.", + "": "RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.", + "partition": "Partition indicates the ordinal at which the StatefulSet should be partitioned.", } func (RollingUpdateStatefulSetStrategy) SwaggerDoc() map[string]string { diff --git a/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta1/zz_generated.deepcopy.go b/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta1/zz_generated.deepcopy.go index 185f868cd683..be3fcc75b62c 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta1/zz_generated.deepcopy.go +++ b/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta1/zz_generated.deepcopy.go @@ -342,11 +342,6 @@ func (in *RollingUpdateStatefulSetStrategy) DeepCopyInto(out *RollingUpdateState *out = new(int32) **out = **in } - if in.MaxUnavailable != nil { - in, out := &in.MaxUnavailable, &out.MaxUnavailable - *out = new(intstr.IntOrString) - **out = **in - } return } diff --git a/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta2/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta2/generated.pb.go index df26908fcfc3..cd1a06e25f9d 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta2/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta2/generated.pb.go @@ -988,151 +988,150 @@ func init() { } var fileDescriptor_42fe616264472f7e = []byte{ - // 2295 bytes of a gzipped FileDescriptorProto + // 2284 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcf, 0x6f, 0x1b, 0xc7, - 0xf5, 0xd7, 0xf2, 0x87, 0x44, 0x8e, 0x2c, 0xc9, 0x1e, 0xe9, 0x2b, 0x31, 0xf2, 0xb7, 0xa4, 0xb1, - 0x31, 0x1c, 0x25, 0xb6, 0x49, 0x5b, 0xf9, 0x81, 0xc4, 0x6e, 0x93, 0x8a, 0x52, 0x6a, 0x3b, 0x90, - 0x64, 0x66, 0x64, 0x39, 0x68, 0xd0, 0x1f, 0x1e, 0x91, 0x63, 0x6a, 0xa3, 0xe5, 0xee, 0x62, 0x77, - 0x96, 0x31, 0xd1, 0x4b, 0xaf, 0x05, 0x0a, 0xb4, 0xbd, 0xf6, 0x9f, 0xe8, 0xad, 0x28, 0x1a, 0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c, 0xf6, 0xf2, 0x7f, 0x02, - 0x60, 0x0e, 0x05, 0x85, 0x28, 0xac, 0xcb, 0x98, 0x8b, 0x4f, 0x48, 0x5c, 0x80, 0x42, 0x98, 0xb9, - 0x6c, 0x44, 0x15, 0x50, 0xdc, 0x06, 0xee, 0x80, 0x45, 0x5b, 0x8b, 0x43, 0x39, 0xb1, 0x76, 0x56, - 0x40, 0x2d, 0xee, 0xc7, 0x55, 0x50, 0x92, 0x1d, 0xbc, 0x17, 0x22, 0x33, 0xd3, 0x7c, 0x3f, 0xb9, - 0x94, 0x21, 0x27, 0x32, 0xb3, 0x99, 0x04, 0xaa, 0x55, 0xca, 0x4a, 0xb5, 0xe4, 0x8f, 0x24, 0x00, - 0xe3, 0x79, 0x38, 0xf6, 0x26, 0x20, 0x66, 0x11, 0xa8, 0x98, 0x4a, 0x32, 0xff, 0xb9, 0x92, 0x91, - 0xff, 0xf8, 0x1b, 0x6a, 0x36, 0x02, 0x24, 0x26, 0xfa, 0x64, 0x2e, 0x75, 0xb2, 0x12, 0x20, 0xdf, - 0xa9, 0xa7, 0x40, 0x80, 0x02, 0x60, 0x4f, 0x26, 0x40, 0xff, 0xc8, 0x81, 0x45, 0x5f, 0x39, 0x33, - 0x01, 0x4a, 0x30, 0xf9, 0xf6, 0x62, 0x27, 0x1b, 0x29, 0xf1, 0xa7, 0xee, 0x7f, 0x89, 0x94, 0xf8, - 0x5e, 0xa5, 0x90, 0x92, 0xdf, 0xe5, 0x82, 0xae, 0x4f, 0x48, 0x4a, 0x9e, 0xc2, 0x0d, 0xc7, 0xd7, - 0x8e, 0xd7, 0xc8, 0x9f, 0xe4, 0xc1, 0xe9, 0x68, 0x1e, 0x86, 0x0a, 0xa4, 0x34, 0xb6, 0x40, 0xb6, - 0xc0, 0xd2, 0x7d, 0x5b, 0x55, 0x07, 0x7c, 0x0c, 0x81, 0x2a, 0xe9, 0x94, 0xd6, 0xff, 0x17, 0x96, - 0x4b, 0x3f, 0x48, 0xd0, 0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, 0x98, 0x71, 0x66, 0xe3, 0x6b, 0x2e, 0x36, 0x67, 0x41, 0x80, 0xcd, 0xec, 0xfa, 0x22, 0x14, + 0xd4, 0x63, 0xa1, 0xe9, 0x87, 0x16, 0x31, 0xfb, 0xa4, 0x73, 0xcb, 0x21, 0x07, 0xac, 0x83, 0x16, + 0x79, 0x07, 0xf5, 0x42, 0xdb, 0x8b, 0x69, 0xa0, 0x04, 0x2b, 0x16, 0x9a, 0x93, 0x35, 0xb1, 0xd0, + 0xa6, 0xc2, 0xa1, 0x1d, 0x24, 0x6a, 0xa1, 0x14, 0x6b, 0x96, 0x7b, 0x8e, 0xcb, 0x1b, 0x7d, 0xac, + 0xa8, 0xf8, 0x50, 0x25, 0x95, 0xe9, 0x70, 0xee, 0xed, 0x86, 0xc5, 0x28, 0xaa, 0x0f, 0x6f, 0x81, + 0xf3, 0xce, 0xd0, 0x81, 0x86, 0x3d, 0x90, 0x12, 0x07, 0x79, 0x4e, 0x80, 0x9c, 0xdf, 0x8d, 0x2a, + 0xa0, 0xb8, 0x0d, 0xbc, 0x01, 0xe6, 0xda, 0xba, 0xaa, 0xf2, 0x7c, 0xdc, 0xd4, 0x6d, 0x8d, 0x56, + 0xca, 0x1c, 0x05, 0xb2, 0x1a, 0xda, 0x0c, 0x49, 0x50, 0x44, 0x13, 0xfe, 0x0c, 0x80, 0xb6, 0xdb, + 0x18, 0xac, 0x0a, 0x18, 0xc3, 0x00, 0xe2, 0x6d, 0xc9, 0xef, 0xcc, 0xde, 0x90, 0x85, 0x02, 0x90, + 0xf2, 0xc7, 0x12, 0x58, 0x4e, 0x29, 0x74, 0xf8, 0x56, 0xa8, 0x09, 0x5e, 0x89, 0x34, 0xc1, 0x0b, + 0x29, 0x66, 0x81, 0x4e, 0x78, 0x04, 0x66, 0x19, 0x21, 0x51, 0xb4, 0xae, 0xa3, 0x22, 0xce, 0xb2, + 0x46, 0x6a, 0x00, 0x28, 0xa8, 0xed, 0x9f, 0xca, 0xe7, 0x47, 0xc3, 0xda, 0x6c, 0x48, 0x86, 0xc2, + 0xc0, 0xf2, 0xaf, 0x72, 0x00, 0x6c, 0x11, 0x43, 0xd5, 0x07, 0x3d, 0xa2, 0x9d, 0x06, 0xa7, 0xb9, + 0x13, 0xe2, 0x34, 0x2f, 0xa4, 0x6f, 0x89, 0xe7, 0x54, 0x2a, 0xa9, 0x79, 0x37, 0x42, 0x6a, 0x5e, + 0xcc, 0x02, 0xf6, 0x74, 0x56, 0xf3, 0x59, 0x1e, 0x2c, 0xf8, 0xca, 0x3e, 0xad, 0xb9, 0x19, 0xda, + 0xd1, 0x17, 0x22, 0x3b, 0xba, 0x9c, 0x60, 0xf2, 0x95, 0xf1, 0x9a, 0x0f, 0xc0, 0x1c, 0x63, 0x1d, + 0xce, 0xfe, 0x71, 0x4e, 0x33, 0x35, 0x31, 0xa7, 0xf1, 0x3a, 0xd1, 0x76, 0x08, 0x09, 0x45, 0x90, + 0x53, 0x38, 0xd4, 0xf4, 0x37, 0x91, 0x43, 0xfd, 0x51, 0x02, 0x73, 0xfe, 0x36, 0x9d, 0x02, 0x89, + 0xba, 0x1d, 0x26, 0x51, 0xcf, 0x67, 0x48, 0xce, 0x14, 0x16, 0xf5, 0x59, 0x21, 0xe8, 0x3a, 0xa7, + 0x51, 0xab, 0xec, 0x0a, 0x66, 0xa8, 0x4a, 0x1b, 0x5b, 0xa2, 0xdf, 0x9e, 0x75, 0xae, 0x5f, 0xce, + 0x18, 0xf2, 0xa4, 0x21, 0xc2, 0x95, 0xfb, 0x6a, 0x09, 0x57, 0xfe, 0xd9, 0x10, 0xae, 0x1f, 0x81, + 0x92, 0xe5, 0x52, 0xad, 0x02, 0x87, 0xbc, 0x92, 0xa9, 0xb0, 0x05, 0xcb, 0xf2, 0xa0, 0x3d, 0x7e, + 0xe5, 0xc1, 0x25, 0x31, 0xab, 0xe2, 0xd7, 0xc9, 0xac, 0x58, 0xa2, 0x1b, 0xd8, 0xb6, 0x48, 0x87, + 0x17, 0x55, 0xc9, 0x4f, 0xf4, 0x16, 0x1f, 0x45, 0x42, 0x0a, 0x0f, 0xc0, 0xb2, 0x61, 0xea, 0x5d, + 0x93, 0x58, 0xd6, 0x16, 0xc1, 0x1d, 0x55, 0xd1, 0x88, 0x1b, 0x80, 0xd3, 0x13, 0x2f, 0x8c, 0x86, + 0xb5, 0xe5, 0x56, 0xb2, 0x0a, 0x4a, 0xb3, 0x95, 0xff, 0x5c, 0x00, 0xe7, 0xa2, 0x67, 0x63, 0x0a, + 0x4d, 0x91, 0x4e, 0x44, 0x53, 0xae, 0x06, 0xf2, 0xd4, 0xe1, 0x70, 0x81, 0xa7, 0x82, 0x58, 0xae, + 0x6e, 0x80, 0x79, 0x41, 0x4b, 0x5c, 0xa1, 0x20, 0x6a, 0xde, 0xf6, 0x1c, 0x84, 0xc5, 0x28, 0xaa, + 0x0f, 0x6f, 0x82, 0x59, 0x93, 0x33, 0x2f, 0x17, 0xc0, 0x61, 0x2f, 0xff, 0x27, 0x00, 0x66, 0x51, + 0x50, 0x88, 0xc2, 0xba, 0x8c, 0xb9, 0xf8, 0x84, 0xc4, 0x05, 0x28, 0x84, 0x99, 0xcb, 0x46, 0x54, + 0x01, 0xc5, 0x6d, 0xe0, 0x0e, 0x58, 0xb0, 0xb5, 0x38, 0x94, 0x93, 0x6b, 0x17, 0x04, 0xd4, 0xc2, + 0x41, 0x5c, 0x05, 0x25, 0xd9, 0xc1, 0xfb, 0x21, 0x32, 0x33, 0xc5, 0xcf, 0x93, 0xab, 0x19, 0x6a, + 0x22, 0x33, 0x9b, 0x49, 0xa0, 0x5a, 0xa5, 0xac, 0x54, 0x4b, 0xfe, 0x48, 0x02, 0x30, 0x5e, 0x87, + 0x63, 0x5f, 0x02, 0x62, 0x16, 0x81, 0x8e, 0xa9, 0x24, 0xf3, 0x9f, 0x6b, 0x19, 0xf9, 0x8f, 0x7f, + 0xa0, 0x66, 0x23, 0x40, 0x62, 0xa1, 0x4f, 0xe7, 0x51, 0x27, 0x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24, + 0xb0, 0x9c, 0xd2, 0x55, 0xbf, 0x45, 0x51, 0xee, 0x81, 0x8b, 0xa1, 0x20, 0x59, 0x55, 0x92, 0x07, + 0xb6, 0xca, 0x0b, 0x54, 0x10, 0x99, 0x2b, 0xa0, 0x6c, 0x60, 0x93, 0x2a, 0x1e, 0x0d, 0x2e, 0x36, + 0x67, 0x47, 0xc3, 0x5a, 0xb9, 0xe5, 0x0e, 0x22, 0x5f, 0x2e, 0xff, 0x47, 0x02, 0xc5, 0xfd, 0x36, + 0x56, 0xc9, 0x29, 0x30, 0x89, 0xad, 0x10, 0x93, 0x48, 0x7f, 0xa5, 0xe7, 0xfe, 0xa4, 0x92, 0x88, + 0xed, 0x08, 0x89, 0xb8, 0x34, 0x06, 0xe7, 0xe9, 0xfc, 0xe1, 0x0d, 0x50, 0xf6, 0xa6, 0x9b, 0xec, + 0x70, 0x93, 0x7f, 0x97, 0x03, 0x33, 0x81, 0x29, 0x26, 0x3c, 0x1a, 0xef, 0x87, 0xfa, 0x01, 0x2b, + 0xfa, 0xf5, 0x2c, 0x81, 0xd4, 0xdd, 0xb3, 0xff, 0x6d, 0x8d, 0x9a, 0xc1, 0xcb, 0x63, 0xbc, 0x25, + 0xbc, 0x09, 0xe6, 0x28, 0x36, 0xbb, 0x84, 0xba, 0x32, 0xbe, 0x60, 0x65, 0xff, 0x31, 0xe5, 0x6e, + 0x48, 0x8a, 0x22, 0xda, 0x2b, 0x37, 0xc1, 0x6c, 0x68, 0x32, 0x78, 0x0e, 0xe4, 0x8f, 0xc9, 0xc0, + 0xa1, 0x54, 0x88, 0xfd, 0x09, 0x17, 0x41, 0xb1, 0x8f, 0x55, 0xdb, 0xc9, 0xf3, 0x32, 0x72, 0x7e, + 0xdc, 0xc8, 0xbd, 0x2e, 0xc9, 0xbf, 0x66, 0x8b, 0xe3, 0x27, 0xe7, 0x29, 0x64, 0xd7, 0x3b, 0xa1, + 0xec, 0x4a, 0xff, 0x60, 0x18, 0x2c, 0x99, 0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0x4b, 0xfe, 0x66, 0x7f, 0x27, 0x4e, 0xbc, 0xf1, 0xcf, 0x4c, 0x7e, 0xe3, + 0x97, 0xff, 0x22, 0x81, 0xe7, 0x52, 0x4f, 0x17, 0xb8, 0x11, 0xa2, 0x70, 0x6b, 0x11, 0x0a, 0xf7, + 0xbd, 0x54, 0xc3, 0x00, 0x8f, 0x33, 0x93, 0x9f, 0x90, 0xdf, 0xc8, 0xf6, 0x84, 0x9c, 0x70, 0x0f, + 0x1c, 0xff, 0x96, 0xdc, 0x5c, 0x7b, 0xf4, 0xb8, 0x7a, 0xe6, 0xd3, 0xc7, 0xd5, 0x33, 0x9f, 0x3f, + 0xae, 0x9e, 0xf9, 0xc5, 0xa8, 0x2a, 0x3d, 0x1a, 0x55, 0xa5, 0x4f, 0x47, 0x55, 0xe9, 0xf3, 0x51, + 0x55, 0xfa, 0xdb, 0xa8, 0x2a, 0xfd, 0xe6, 0x8b, 0xea, 0x99, 0xf7, 0xa7, 0xc5, 0x8c, 0xff, 0x0d, + 0x00, 0x00, 0xff, 0xff, 0x3e, 0x13, 0x3b, 0xc7, 0x94, 0x2b, 0x00, 0x00, } func (m *ControllerRevision) Marshal() (dAtA []byte, err error) { @@ -2266,18 +2265,6 @@ func (m *RollingUpdateStatefulSetStrategy) MarshalToSizedBuffer(dAtA []byte) (in _ = i var l int _ = l - if m.MaxUnavailable != nil { - { - size, err := m.MaxUnavailable.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } if m.Partition != nil { i = encodeVarintGenerated(dAtA, i, uint64(*m.Partition)) i-- @@ -3228,10 +3215,6 @@ func (m *RollingUpdateStatefulSetStrategy) Size() (n int) { if m.Partition != nil { n += 1 + sovGenerated(uint64(*m.Partition)) } - if m.MaxUnavailable != nil { - l = m.MaxUnavailable.Size() - n += 1 + l + sovGenerated(uint64(l)) - } return n } @@ -3746,7 +3729,6 @@ func (this *RollingUpdateStatefulSetStrategy) String() string { } s := strings.Join([]string{`&RollingUpdateStatefulSetStrategy{`, `Partition:` + valueToStringGenerated(this.Partition) + `,`, - `MaxUnavailable:` + strings.Replace(fmt.Sprintf("%v", this.MaxUnavailable), "IntOrString", "intstr.IntOrString", 1) + `,`, `}`, }, "") return s @@ -7413,42 +7395,6 @@ func (m *RollingUpdateStatefulSetStrategy) Unmarshal(dAtA []byte) error { } } m.Partition = &v - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxUnavailable", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaxUnavailable == nil { - m.MaxUnavailable = &intstr.IntOrString{} - } - if err := m.MaxUnavailable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta2/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta2/generated.proto index b5bc8c0cab51..6d9505865a50 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta2/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta2/generated.proto @@ -28,7 +28,7 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/apps/v1beta2"; +option go_package = "v1beta2"; // DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1/ControllerRevision. See the // release notes for more information. @@ -556,22 +556,11 @@ message RollingUpdateDeployment { // RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. message RollingUpdateStatefulSetStrategy { - // Partition indicates the ordinal at which the StatefulSet should be partitioned - // for updates. During a rolling update, all pods from ordinal Replicas-1 to - // Partition are updated. All pods from ordinal Partition-1 to 0 remain untouched. - // This is helpful in being able to do a canary based deployment. The default value is 0. + // Partition indicates the ordinal at which the StatefulSet should be + // partitioned. + // Default value is 0. // +optional optional int32 partition = 1; - - // The maximum number of pods that can be unavailable during the update. - // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). - // Absolute number is calculated from percentage by rounding up. This can not be 0. - // Defaults to 1. This field is alpha-level and is only honored by servers that enable the - // MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to - // Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it - // will be counted towards MaxUnavailable. - // +optional - optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 2; } // Scale represents a scaling request for a resource. @@ -801,7 +790,6 @@ message StatefulSetStatus { // Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet. // This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate. - // +optional optional int32 availableReplicas = 11; } diff --git a/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta2/types.go b/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta2/types.go index 6c2448869e71..332bc7ed82bf 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta2/types.go +++ b/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta2/types.go @@ -162,21 +162,11 @@ const ( // RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. type RollingUpdateStatefulSetStrategy struct { - // Partition indicates the ordinal at which the StatefulSet should be partitioned - // for updates. During a rolling update, all pods from ordinal Replicas-1 to - // Partition are updated. All pods from ordinal Partition-1 to 0 remain untouched. - // This is helpful in being able to do a canary based deployment. The default value is 0. + // Partition indicates the ordinal at which the StatefulSet should be + // partitioned. + // Default value is 0. // +optional Partition *int32 `json:"partition,omitempty" protobuf:"varint,1,opt,name=partition"` - // The maximum number of pods that can be unavailable during the update. - // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). - // Absolute number is calculated from percentage by rounding up. This can not be 0. - // Defaults to 1. This field is alpha-level and is only honored by servers that enable the - // MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to - // Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it - // will be counted towards MaxUnavailable. - // +optional - MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"varint,2,opt,name=maxUnavailable"` } // PersistentVolumeClaimRetentionPolicyType is a string enumeration of the policies that will determine @@ -330,7 +320,6 @@ type StatefulSetStatus struct { // Total number of available pods (ready for at least minReadySeconds) targeted by this StatefulSet. // This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate. - // +optional AvailableReplicas int32 `json:"availableReplicas" protobuf:"varint,11,opt,name=availableReplicas"` } diff --git a/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go b/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go index ef1de63b2f2e..454c632dc257 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go +++ b/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go @@ -281,9 +281,8 @@ func (RollingUpdateDeployment) SwaggerDoc() map[string]string { } var map_RollingUpdateStatefulSetStrategy = map[string]string{ - "": "RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.", - "partition": "Partition indicates the ordinal at which the StatefulSet should be partitioned for updates. During a rolling update, all pods from ordinal Replicas-1 to Partition are updated. All pods from ordinal Partition-1 to 0 remain untouched. This is helpful in being able to do a canary based deployment. The default value is 0.", - "maxUnavailable": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding up. This can not be 0. Defaults to 1. This field is alpha-level and is only honored by servers that enable the MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it will be counted towards MaxUnavailable.", + "": "RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.", + "partition": "Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0.", } func (RollingUpdateStatefulSetStrategy) SwaggerDoc() map[string]string { diff --git a/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta2/zz_generated.deepcopy.go b/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta2/zz_generated.deepcopy.go index 118fd38093d4..8293b9886b6c 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta2/zz_generated.deepcopy.go +++ b/cluster-autoscaler/vendor/k8s.io/api/apps/v1beta2/zz_generated.deepcopy.go @@ -597,11 +597,6 @@ func (in *RollingUpdateStatefulSetStrategy) DeepCopyInto(out *RollingUpdateState *out = new(int32) **out = **in } - if in.MaxUnavailable != nil { - in, out := &in.MaxUnavailable, &out.MaxUnavailable - *out = new(intstr.IntOrString) - **out = **in - } return } diff --git a/cluster-autoscaler/vendor/k8s.io/api/authentication/v1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/authentication/v1/generated.pb.go index efbecf02c568..89e7e920467f 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/authentication/v1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/authentication/v1/generated.pb.go @@ -316,64 +316,64 @@ func init() { } var fileDescriptor_2953ea822e7ffe1e = []byte{ - // 907 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcf, 0x6f, 0xe3, 0x44, - 0x14, 0x8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, 0x97, 0x7d, 0x26, 0xe8, 0xa6, 0x2e, - 0x52, 0x18, 0x19, 0x27, 0x97, 0x08, 0xfc, 0x3a, 0xaa, 0x24, 0xcc, 0xd3, 0x6f, 0x48, 0x73, 0xe6, - 0xd2, 0x27, 0x32, 0x8e, 0x4d, 0xb4, 0x36, 0x8c, 0x82, 0x24, 0x94, 0x36, 0x90, 0x8d, 0x22, 0x79, - 0xa2, 0x1f, 0xab, 0x08, 0xd1, 0x19, 0x7c, 0x84, 0x6a, 0x20, 0xef, 0x7c, 0x35, 0x4b, 0xb3, 0xbb, - 0xb7, 0x9a, 0x34, 0x96, 0x7a, 0x27, 0x7a, 0x5c, 0x44, 0x93, 0x99, 0xa9, 0x64, 0x8c, 0x64, 0x74, - 0xdb, 0x03, 0xfd, 0x96, 0x28, 0x0c, 0xde, 0x44, 0x95, 0x11, 0x4c, 0xb2, 0x89, 0x88, 0xfc, 0x89, - 0x3f, 0x44, 0xb5, 0xb1, 0x7c, 0x66, 0xf4, 0x91, 0xec, 0x2e, 0xdf, 0x37, 0x7f, 0x96, 0x48, 0x56, - 0xf6, 0xa8, 0xfc, 0xd0, 0x70, 0x9c, 0xd3, 0xf3, 0x76, 0xe9, 0xe5, 0x79, 0xbb, 0x74, 0x76, 0xde, - 0x2e, 0xbd, 0x48, 0xdb, 0xc6, 0x69, 0xda, 0x36, 0x5e, 0xa6, 0x6d, 0xe3, 0x2c, 0x6d, 0x1b, 0x7f, - 0xa6, 0x6d, 0xe3, 0x87, 0xbf, 0xda, 0xa5, 0xaf, 0xee, 0x2e, 0xfb, 0x13, 0xf3, 0x5f, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x12, 0xb8, 0x31, 0x91, 0xfc, 0x08, 0x00, 0x00, + // 906 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcf, 0x6f, 0xe3, 0xc4, + 0x17, 0x8f, 0xf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, 0x23, 0x19, 0x88, 0x6d, 0x1f, 0x04, 0xbd, + 0x62, 0x84, 0x5d, 0xfb, 0xba, 0xaa, 0x28, 0xe1, 0x82, 0xf9, 0xb0, 0x54, 0xf0, 0xee, 0x4d, 0x05, + 0xb1, 0x7b, 0x0a, 0x3e, 0x5d, 0xac, 0x33, 0x7f, 0x33, 0xd0, 0xff, 0x9d, 0x20, 0xe1, 0xde, 0xa3, + 0xe1, 0xd7, 0xe0, 0x0a, 0x02, 0x27, 0x10, 0x01, 0x77, 0x01, 0xef, 0xa1, 0xea, 0x98, 0x71, 0xaf, + 0x65, 0xec, 0x19, 0xfb, 0x0d, 0xe7, 0xd6, 0xd9, 0xac, 0x53, 0x4a, 0x67, 0x9d, 0xea, 0x27, 0x8c, + 0x7b, 0x44, 0x65, 0x70, 0x0f, 0x21, 0x1a, 0xb2, 0x63, 0x88, 0x62, 0x16, 0xf0, 0x56, 0x59, 0xe1, + 0xb0, 0xc6, 0xa1, 0x83, 0xc7, 0x03, 0x9d, 0x21, 0x73, 0x28, 0xc9, 0xca, 0xa9, 0x0f, 0xad, 0x4a, + 0x91, 0xf5, 0x33, 0xea, 0x03, 0x51, 0x19, 0xec, 0xa0, 0x4a, 0x32, 0x38, 0x6c, 0x55, 0x15, 0xe0, + 0xbe, 0x06, 0x54, 0x8e, 0x06, 0x87, 0xff, 0xcc, 0x3a, 0xaf, 0x5f, 0xb7, 0xa4, 0x98, 0x86, 0x10, + 0x5b, 0x47, 0x83, 0x43, 0x22, 0x8b, 0xcd, 0xf7, 0x10, 0xea, 0x3f, 0x13, 0x11, 0x3d, 0xa6, 0xdf, + 0x24, 0x80, 0x3b, 0xa8, 0xc6, 0x04, 0xf8, 0x71, 0xcb, 0xd8, 0xab, 0xec, 0x37, 0x9c, 0x46, 0x3a, + 0xeb, 0xd4, 0x06, 0x32, 0x40, 0xb2, 0xf8, 0xc3, 0xfa, 0x0f, 0x3f, 0x77, 0x4a, 0xcf, 0x7f, 0xdf, + 0x2b, 0x99, 0x3f, 0x95, 0xd1, 0xad, 0xa7, 0xc1, 0x18, 0x38, 0x81, 0x6f, 0x13, 0x88, 0x05, 0xfe, + 0x0a, 0xd5, 0xe5, 0x11, 0x79, 0x54, 0x50, 0xa5, 0x44, 0xb3, 0x77, 0xdf, 0xca, 0xdd, 0x71, 0x39, + 0x84, 0x15, 0x8e, 0x47, 0x32, 0x10, 0x5b, 0x12, 0x6d, 0x4d, 0xba, 0x56, 0x26, 0xe7, 0xa7, 0x20, + 0x68, 0xae, 0x49, 0x1e, 0x23, 0x97, 0xac, 0xf8, 0x31, 0xaa, 0xc6, 0x21, 0xb8, 0x4a, 0xbf, 0x66, + 0xcf, 0xb2, 0x56, 0x79, 0xcf, 0x9a, 0x9f, 0xed, 0x49, 0x08, 0x6e, 0xae, 0xa0, 0xfc, 0x22, 0x8a, + 0x09, 0x7f, 0x81, 0x36, 0x62, 0x41, 0x45, 0x12, 0x2b, 0x95, 0x8b, 0x13, 0xdf, 0xc4, 0xa9, 0xea, + 0x9c, 0x2d, 0xcd, 0xba, 0x91, 0x7d, 0x13, 0xcd, 0x67, 0xfe, 0x6d, 0xa0, 0xed, 0xc5, 0x11, 0xf0, + 0x5b, 0xa8, 0x41, 0x13, 0x8f, 0x49, 0xd3, 0x5c, 0x48, 0xbc, 0x99, 0xce, 0x3a, 0x8d, 0x83, 0x8b, + 0x20, 0xc9, 0xf3, 0xf8, 0x43, 0xb4, 0x03, 0xcf, 0x42, 0x16, 0xa9, 0xee, 0x4f, 0xc0, 0x0d, 0xb8, + 0x17, 0xab, 0xb3, 0xae, 0x38, 0x77, 0xd2, 0x59, 0x67, 0xa7, 0xbf, 0x98, 0x24, 0xcb, 0x78, 0xcc, + 0xd1, 0xd6, 0xb0, 0x60, 0x59, 0xbd, 0x68, 0x6f, 0xf5, 0xa2, 0x57, 0xd9, 0xdc, 0xc1, 0xe9, 0xac, + 0xb3, 0x55, 0xcc, 0x90, 0x05, 0x76, 0xf3, 0x17, 0x03, 0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0xd0, 0x6d, + 0x5d, 0xa4, 0x30, 0x32, 0x4e, 0x2e, 0x11, 0xf8, 0x35, 0x54, 0x49, 0x98, 0xa7, 0xdf, 0x90, 0xe6, + 0xdc, 0xa5, 0x4f, 0x64, 0x1c, 0x9b, 0x68, 0x63, 0x14, 0x05, 0x49, 0x28, 0x6d, 0x20, 0x07, 0x45, + 0xf2, 0x44, 0x3f, 0x52, 0x11, 0xa2, 0x33, 0xf8, 0x18, 0xd5, 0x40, 0xde, 0xf9, 0x6a, 0x97, 0x66, + 0xaf, 0xbb, 0x9e, 0x34, 0x96, 0x7a, 0x27, 0xfa, 0x5c, 0x44, 0xd3, 0xb9, 0xad, 0x64, 0x8c, 0x64, + 0x74, 0xbb, 0x43, 0xfd, 0x96, 0x28, 0x0c, 0xde, 0x46, 0x95, 0x31, 0x4c, 0xb3, 0x8d, 0x88, 0xfc, + 0x89, 0x3f, 0x40, 0xb5, 0x89, 0x7c, 0x66, 0xf4, 0x91, 0xec, 0xaf, 0xee, 0x9b, 0x3f, 0x4b, 0x24, + 0x2b, 0x7b, 0x58, 0x7e, 0x60, 0x38, 0xfb, 0x67, 0xe7, 0xed, 0xd2, 0x8b, 0xf3, 0x76, 0xe9, 0xe5, + 0x79, 0xbb, 0xf4, 0x3c, 0x6d, 0x1b, 0x67, 0x69, 0xdb, 0x78, 0x91, 0xb6, 0x8d, 0x97, 0x69, 0xdb, + 0xf8, 0x23, 0x6d, 0x1b, 0xdf, 0xff, 0xd9, 0x2e, 0x7d, 0x59, 0x9e, 0x74, 0xff, 0x0d, 0x00, 0x00, + 0xff, 0xff, 0x51, 0xcc, 0x53, 0x28, 0xe2, 0x08, 0x00, 0x00, } func (m *BoundObjectReference) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/authentication/v1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/authentication/v1/generated.proto index d2158420942f..8f928be408f0 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/authentication/v1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/authentication/v1/generated.proto @@ -26,7 +26,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/authentication/v1"; +option go_package = "v1"; // BoundObjectReference is a reference to an object that a token is bound to. message BoundObjectReference { diff --git a/cluster-autoscaler/vendor/k8s.io/api/authentication/v1beta1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/authentication/v1beta1/generated.pb.go index 1978dcf6ab38..3d8f76515043 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/authentication/v1beta1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/authentication/v1beta1/generated.pb.go @@ -198,49 +198,49 @@ func init() { } var fileDescriptor_77c9b20d3ad27844 = []byte{ - // 666 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xcf, 0x4e, 0x13, 0x5f, - 0x14, 0x9e, 0xe9, 0x1f, 0xd2, 0xde, 0xfe, 0xfa, 0x13, 0x6f, 0x62, 0xd2, 0x34, 0x71, 0x0a, 0x75, - 0x43, 0x82, 0xdc, 0x11, 0x42, 0x90, 0xe0, 0x8a, 0x51, 0x42, 0x30, 0x21, 0x26, 0x57, 0x70, 0xa1, - 0x2e, 0xbc, 0x9d, 0x1e, 0xa6, 0x63, 0x9d, 0x3f, 0xb9, 0x73, 0xa7, 0xca, 0x8e, 0x47, 0x70, 0xe9, - 0xd2, 0xc4, 0x27, 0x71, 0xc7, 0x92, 0x25, 0x0b, 0xd3, 0xc8, 0xf8, 0x04, 0xbe, 0x81, 0xb9, 0x77, - 0x2e, 0x4c, 0x81, 0x68, 0x61, 0x37, 0xf7, 0x3b, 0xe7, 0xfb, 0xce, 0x39, 0xdf, 0xe9, 0x29, 0x7a, - 0x3e, 0x5c, 0x4f, 0x88, 0x1f, 0xd9, 0xc3, 0xb4, 0x07, 0x3c, 0x04, 0x01, 0x89, 0x3d, 0x82, 0xb0, - 0x1f, 0x71, 0x5b, 0x07, 0x58, 0xec, 0xdb, 0x2c, 0x15, 0x03, 0x08, 0x85, 0xef, 0x32, 0xe1, 0x47, - 0xa1, 0x3d, 0x5a, 0xee, 0x81, 0x60, 0xcb, 0xb6, 0x07, 0x21, 0x70, 0x26, 0xa0, 0x4f, 0x62, 0x1e, - 0x89, 0x08, 0xcf, 0xe7, 0x14, 0xc2, 0x62, 0x9f, 0x5c, 0xa6, 0x10, 0x4d, 0x69, 0x2f, 0x79, 0xbe, - 0x18, 0xa4, 0x3d, 0xe2, 0x46, 0x81, 0xed, 0x45, 0x5e, 0x64, 0x2b, 0x66, 0x2f, 0x3d, 0x50, 0x2f, - 0xf5, 0x50, 0x5f, 0xb9, 0x62, 0x7b, 0xb5, 0x68, 0x22, 0x60, 0xee, 0xc0, 0x0f, 0x81, 0x1f, 0xda, - 0xf1, 0xd0, 0x93, 0x40, 0x62, 0x07, 0x20, 0x98, 0x3d, 0xba, 0xd6, 0x47, 0xdb, 0xfe, 0x1b, 0x8b, - 0xa7, 0xa1, 0xf0, 0x03, 0xb8, 0x46, 0x58, 0x9b, 0x46, 0x48, 0xdc, 0x01, 0x04, 0xec, 0x2a, 0xaf, - 0xfb, 0x18, 0xa1, 0xad, 0x4f, 0x82, 0xb3, 0x57, 0xec, 0x43, 0x0a, 0xb8, 0x83, 0xaa, 0xbe, 0x80, - 0x20, 0x69, 0x99, 0x73, 0xe5, 0x85, 0xba, 0x53, 0xcf, 0xc6, 0x9d, 0xea, 0x8e, 0x04, 0x68, 0x8e, - 0x6f, 0xd4, 0xbe, 0x7c, 0xed, 0x18, 0x47, 0x3f, 0xe6, 0x8c, 0xee, 0xb7, 0x12, 0x6a, 0xec, 0x45, - 0x43, 0x08, 0x29, 0x8c, 0x7c, 0xf8, 0x88, 0xdf, 0xa1, 0x9a, 0x1c, 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 0xbc, 0x9e, 0x9f, 0xfa, 0x2f, 0xfa, 0x27, 0x00, 0x00, - 0xff, 0xff, 0xb8, 0x72, 0x2c, 0x2c, 0x82, 0x05, 0x00, 0x00, + // 663 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xcd, 0x6e, 0xd3, 0x40, + 0x10, 0xb6, 0xf3, 0x53, 0x92, 0x0d, 0x81, 0xb2, 0x12, 0x52, 0x14, 0x09, 0xa7, 0x84, 0x4b, 0xa5, + 0xd2, 0x35, 0xad, 0xaa, 0x52, 0x95, 0x53, 0x0d, 0x15, 0x2a, 0x52, 0x85, 0xb4, 0xb4, 0x1c, 0x80, + 0x03, 0x1b, 0x67, 0xea, 0x98, 0xe0, 0x1f, 0xad, 0xd7, 0x81, 0xde, 0xfa, 0x08, 0x1c, 0x39, 0x22, + 0xf1, 0x24, 0xdc, 0x7a, 0xec, 0xb1, 0x07, 0x14, 0x51, 0xf3, 0x04, 0xbc, 0x01, 0xda, 0xf5, 0xb6, + 0x4e, 0x1b, 0x41, 0xdb, 0x9b, 0xf7, 0x9b, 0xf9, 0xbe, 0x99, 0xf9, 0xc6, 0x83, 0x5e, 0x0c, 0xd7, + 0x12, 0xe2, 0x47, 0xf6, 0x30, 0xed, 0x01, 0x0f, 0x41, 0x40, 0x62, 0x8f, 0x20, 0xec, 0x47, 0xdc, + 0xd6, 0x01, 0x16, 0xfb, 0x36, 0x4b, 0xc5, 0x00, 0x42, 0xe1, 0xbb, 0x4c, 0xf8, 0x51, 0x68, 0x8f, + 0x96, 0x7a, 0x20, 0xd8, 0x92, 0xed, 0x41, 0x08, 0x9c, 0x09, 0xe8, 0x93, 0x98, 0x47, 0x22, 0xc2, + 0xf7, 0x73, 0x0a, 0x61, 0xb1, 0x4f, 0xce, 0x53, 0x88, 0xa6, 0xb4, 0x17, 0x3d, 0x5f, 0x0c, 0xd2, + 0x1e, 0x71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 0xc5, 0xe0, 0x3a, 0x37, 0xb5, 0x7e, 0x45, 0xbe, + 0xa8, 0x52, 0xc3, 0xef, 0xd0, 0x4c, 0x22, 0x98, 0x48, 0x93, 0x56, 0x59, 0xe9, 0xae, 0x5c, 0x53, + 0x57, 0x71, 0x9d, 0x5b, 0x5a, 0x79, 0x26, 0x7f, 0x53, 0xad, 0xd9, 0x75, 0xd1, 0xed, 0x0b, 0x4d, + 0xe0, 0x07, 0xa8, 0x2a, 0x24, 0xa4, 0x5c, 0xaa, 0x3b, 0x4d, 0xcd, 0xac, 0xe6, 0x79, 0x79, 0x0c, + 0x2f, 0xa0, 0x3a, 0x4b, 0xfb, 0x3e, 0x84, 0x2e, 0x24, 0xad, 0x92, 0x5a, 0x46, 0x33, 0x1b, 0x77, + 0xea, 0x1b, 0xa7, 0x20, 0x2d, 0xe2, 0xdd, 0x3f, 0x26, 0xba, 0x33, 0xd5, 0x12, 0x7e, 0x82, 0x9a, + 0x13, 0xed, 0x43, 0x5f, 0xd5, 0xab, 0x39, 0x77, 0x75, 0xbd, 0xe6, 0xc6, 0x64, 0x90, 0x9e, 0xcf, + 0xc5, 0xdb, 0xa8, 0x92, 0x26, 0xc0, 0xb5, 0xd7, 0x0b, 0x57, 0xf0, 0x64, 0x37, 0x01, 0xbe, 0x15, + 0xee, 0x45, 0x85, 0xc9, 0x12, 0xa1, 0x4a, 0xe6, 0xfc, 0x38, 0x95, 0xff, 0x8f, 0x23, 0x0d, 0x02, + 0xce, 0x23, 0xae, 0x16, 0x32, 0x61, 0xd0, 0xa6, 0x04, 0x69, 0x1e, 0xeb, 0xfe, 0x28, 0xa1, 0xda, + 0x69, 0x49, 0xfc, 0x10, 0xd5, 0x64, 0x99, 0x90, 0x05, 0xa0, 0x5d, 0x9d, 0xd5, 0x24, 0x95, 0x23, + 0x71, 0x7a, 0x96, 0x81, 0xef, 0xa1, 0x72, 0xea, 0xf7, 0xd5, 0x68, 0x75, 0xa7, 0xa1, 0x13, 0xcb, + 0xbb, 0x5b, 0xcf, 0xa8, 0xc4, 0x71, 0x17, 0xcd, 0x78, 0x3c, 0x4a, 0x63, 0xf9, 0x43, 0xc8, 0x46, + 0x91, 0x5c, 0xeb, 0x73, 0x85, 0x50, 0x1d, 0xc1, 0x6f, 0x51, 0x15, 0xe4, 0xd5, 0xa8, 0x59, 0x1a, + 0xcb, 0xab, 0xd7, 0xf0, 0x87, 0xa8, 0x73, 0xdb, 0x0c, 0x05, 0xdf, 0x9f, 0x18, 0x4d, 0x62, 0x34, + 0xd7, 0x6c, 0x7b, 0xfa, 0x24, 0x55, 0x0e, 0x9e, 0x45, 0xe5, 0x21, 0xec, 0xe7, 0x63, 0x51, 0xf9, + 0x89, 0x9f, 0xa2, 0xea, 0x48, 0x5e, 0xab, 0x5e, 0xce, 0xe2, 0x15, 0x8a, 0x17, 0x27, 0x4e, 0x73, + 0xee, 0x7a, 0x69, 0xcd, 0x74, 0x16, 0x0f, 0x4f, 0x2c, 0xe3, 0xe8, 0xc4, 0x32, 0x8e, 0x4f, 0x2c, + 0xe3, 0x20, 0xb3, 0xcc, 0xc3, 0xcc, 0x32, 0x8f, 0x32, 0xcb, 0x3c, 0xce, 0x2c, 0xf3, 0x57, 0x66, + 0x99, 0x5f, 0x7e, 0x5b, 0xc6, 0x9b, 0x1b, 0x5a, 0xe4, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x66, + 0xbb, 0x89, 0x53, 0x68, 0x05, 0x00, 0x00, } func (m ExtraValue) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/authentication/v1beta1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/authentication/v1beta1/generated.proto index d1847a02e5d8..67a32b320e65 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/authentication/v1beta1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/authentication/v1beta1/generated.proto @@ -26,7 +26,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/authentication/v1beta1"; +option go_package = "v1beta1"; // ExtraValue masks the value so protobuf can generate // +protobuf.nullable=true diff --git a/cluster-autoscaler/vendor/k8s.io/api/authorization/v1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/authorization/v1/generated.pb.go index 2e8e35a551ca..66c7c06ae7d1 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/authorization/v1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/authorization/v1/generated.pb.go @@ -460,78 +460,78 @@ func init() { var fileDescriptor_e50da13573e369bd = []byte{ // 1140 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xfa, 0x4f, 0x62, 0x8f, 0x1b, 0x92, 0x4e, 0x94, 0x66, 0x9b, 0x08, 0x3b, 0x5a, 0x24, - 0x48, 0x45, 0xd9, 0x25, 0x56, 0xdb, 0x44, 0x95, 0x2a, 0x64, 0x2b, 0x11, 0x8a, 0xd4, 0x96, 0x6a, - 0xa2, 0x44, 0xa2, 0x08, 0xc4, 0x78, 0x3d, 0xb1, 0x97, 0xd8, 0xbb, 0xcb, 0xcc, 0xac, 0x43, 0x38, - 0x55, 0xe2, 0x0b, 0x70, 0xe4, 0xc0, 0x81, 0x6f, 0xc0, 0x05, 0x89, 0x1b, 0x07, 0x0e, 0x28, 0xc7, - 0x1e, 0x8b, 0x84, 0x2c, 0xb2, 0x9c, 0xf9, 0x0e, 0x68, 0x66, 0xc7, 0xde, 0x75, 0xb2, 0x76, 0x13, - 0x0e, 0xed, 0xa5, 0x37, 0xef, 0xfb, 0xfd, 0xde, 0x9b, 0x37, 0xef, 0xdf, 0x3c, 0x83, 0xed, 0xa3, - 0x2d, 0x66, 0x3a, 0x9e, 0x75, 0x14, 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6, 0x92, 0xd2, 0xc4, 0xea, 0x22, 0x3f, 0x21, 0x05, 0x0b, 0xee, 0xf8, 0xce, - 0x1c, 0x2d, 0x55, 0xe5, 0xda, 0xed, 0xcb, 0xb6, 0x83, 0x3c, 0x4d, 0x57, 0xa7, 0x2d, 0x9c, 0x03, - 0x18, 0xba, 0x60, 0x1f, 0xd6, 0x00, 0x70, 0x5c, 0xdb, 0xeb, 0xf9, 0x5d, 0xc2, 0x89, 0x0c, 0x5b, - 0x31, 0x9e, 0x83, 0xbb, 0x23, 0x04, 0x25, 0x58, 0x69, 0xf1, 0xce, 0x5f, 0x2d, 0xde, 0x8d, 0xfa, - 0xe9, 0x59, 0x25, 0xf3, 0xfc, 0xac, 0x92, 0x79, 0x71, 0x56, 0xc9, 0x3c, 0x0b, 0x2b, 0xda, 0x69, - 0x58, 0xd1, 0x9e, 0x87, 0x15, 0xed, 0x45, 0x58, 0xd1, 0xfe, 0x0e, 0x2b, 0xda, 0xf7, 0xff, 0x54, - 0x32, 0x4f, 0x57, 0xa7, 0xfc, 0x53, 0xfe, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xea, 0x67, 0x63, 0x89, - 0x60, 0x0f, 0x00, 0x00, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xf7, 0xae, 0xed, 0xc4, 0x1e, 0x37, 0xdf, 0xa4, 0x13, 0xa5, 0xd9, 0xa6, 0xfa, 0xda, 0xd1, + 0x22, 0x41, 0x2a, 0xca, 0x2e, 0xb1, 0xda, 0x26, 0xaa, 0x54, 0xa1, 0x58, 0x89, 0x50, 0xa4, 0xb6, + 0x54, 0x13, 0x25, 0x12, 0x45, 0x20, 0xc6, 0xeb, 0x89, 0xbd, 0xc4, 0xde, 0x5d, 0x66, 0x66, 0x1d, + 0xc2, 0xa9, 0x12, 0xff, 0x00, 0x47, 0x0e, 0x1c, 0xf8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x19, 0xae, 0x72, 0xe2, 0xda, 0x53, 0xcc, 0x3b, 0x48, 0x22, 0x82, 0xd1, 0x27, 0xb4, + 0x29, 0xaf, 0x9c, 0x62, 0x1c, 0x10, 0xda, 0x44, 0x12, 0x31, 0xbf, 0x04, 0xf3, 0x29, 0xe3, 0x28, + 0xec, 0xca, 0x8c, 0x0a, 0x68, 0x2c, 0xa3, 0x42, 0x83, 0xa1, 0x58, 0x0e, 0x1f, 0x82, 0x79, 0x2f, + 0xd1, 0xd9, 0x47, 0x8f, 0x98, 0xa1, 0x4b, 0xea, 0x62, 0x34, 0xa8, 0xa5, 0xcd, 0x09, 0x08, 0x9d, + 0xe7, 0x9a, 0xbf, 0xe8, 0x00, 0x66, 0xdc, 0xc6, 0x06, 0x65, 0x0f, 0xf7, 0x08, 0x0b, 0xb0, 0x43, + 0xd4, 0x95, 0xae, 0x2b, 0x87, 0xcb, 0x4f, 0x86, 0x00, 0x4a, 0x38, 0xaf, 0xbe, 0x1c, 0x7c, 0x0b, + 0x14, 0xdb, 0xd4, 0x0f, 0x03, 0x99, 0x98, 0x72, 0x63, 0x4e, 0x51, 0x8a, 0x1f, 0x0a, 0x21, 0x8a, + 0x31, 0x78, 0x1b, 0xcc, 0xf6, 0x09, 0x65, 0xae, 0xef, 0x19, 0x05, 0x49, 0x9b, 0x57, 0xb4, 0xd9, + 0x83, 0x58, 0x8c, 0x86, 0x38, 0xbc, 0x03, 0x4a, 0x54, 0x39, 0x6e, 0x14, 0x25, 0x77, 0x41, 0x71, + 0x4b, 0xa3, 0x08, 0x8e, 0x18, 0xf0, 0x1e, 0xa8, 0xb0, 0xb0, 0x39, 0x52, 0x98, 0x91, 0x0a, 0x8b, + 0x4a, 0xa1, 0xb2, 0x97, 0x40, 0x28, 0xcd, 0x13, 0xd7, 0x12, 0x77, 0x34, 0x66, 0xc7, 0xaf, 0x25, + 0x42, 0x80, 0x24, 0x62, 0xfe, 0xaa, 0x81, 0x6b, 0x57, 0xcb, 0xd8, 0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 0x6d, 0xfd, 0x5b, 0x01, 0x2c, 0xbf, 0x69, 0xe9, 0x49, 0x8b, 0x4e, 0xc8, 0x08, 0x55, + 0xcf, 0xf8, 0x28, 0x39, 0xfb, 0x8c, 0x50, 0x24, 0x11, 0x68, 0x82, 0x99, 0x76, 0xfc, 0xba, 0xc5, + 0xef, 0x0f, 0x10, 0x01, 0x56, 0x4f, 0x9b, 0x42, 0x60, 0x0b, 0x14, 0x89, 0xd8, 0x5b, 0x8d, 0xe2, + 0x6a, 0x7e, 0xad, 0x52, 0xff, 0xe0, 0xdf, 0x54, 0x86, 0x25, 0x37, 0xdf, 0x1d, 0x8f, 0xd3, 0x93, + 0x64, 0x9d, 0x90, 0x32, 0x14, 0x1b, 0x87, 0xff, 0x07, 0xf9, 0xd0, 0x6d, 0xa9, 0xd7, 0xbe, 0xa2, + 0x28, 0xf9, 0xfd, 0xdd, 0x6d, 0x24, 0xe4, 0x2b, 0x58, 0x2d, 0xcf, 0xd2, 0x04, 0x5c, 0x00, 0xf9, + 0x23, 0x72, 0x12, 0x37, 0x14, 0x12, 0x9f, 0xf0, 0x21, 0x28, 0xf6, 0xc5, 0x5e, 0xad, 0xe2, 0xfb, + 0xce, 0x54, 0x27, 0x93, 0x35, 0x1c, 0xc5, 0x5a, 0x0f, 0xf4, 0x4d, 0xcd, 0xfc, 0x5d, 0x03, 0x37, + 0x27, 0x96, 0x9f, 0x58, 0x77, 0x70, 0xb7, 0xeb, 0x1f, 0x93, 0x96, 0x3c, 0xb6, 0x94, 0xac, 0x3b, + 0x5b, 0xb1, 0x18, 0x0d, 0x71, 0xf8, 0x36, 0x98, 0x69, 0x11, 0xcf, 0x25, 0x2d, 0xb9, 0x18, 0x95, + 0x92, 0xca, 0xdd, 0x96, 0x52, 0xa4, 0x50, 0xc1, 0xa3, 0x04, 0x33, 0xdf, 0x53, 0xab, 0xd8, 0x88, + 0x87, 0xa4, 0x14, 0x29, 0x14, 0x6e, 0x81, 0x79, 0x22, 0xdc, 0x94, 0xfe, 0xef, 0x50, 0xea, 0x0f, + 0x33, 0xba, 0xac, 0x14, 0xe6, 0x77, 0xc6, 0x61, 0x74, 0x9e, 0x6f, 0xfe, 0xad, 0x03, 0x63, 0xd2, + 0x68, 0x83, 0x87, 0xc9, 0x2e, 0x22, 0x41, 0xb9, 0x0e, 0x55, 0xea, 0xb7, 0x2f, 0xd5, 0x20, 0x42, + 0xa3, 0xb1, 0xa4, 0x1c, 0x99, 0x4b, 0x4b, 0x53, 0xab, 0x8b, 0xfc, 0x85, 0x14, 0x2c, 0x78, 0xe3, + 0x3b, 0x73, 0xbc, 0x54, 0x55, 0xea, 0x77, 0x2e, 0xdb, 0x0e, 0xf2, 0x34, 0x43, 0x9d, 0xb6, 0x70, + 0x0e, 0x60, 0xe8, 0x82, 0x7d, 0x58, 0x07, 0xc0, 0xf5, 0x1c, 0xbf, 0x17, 0x74, 0x09, 0x27, 0x32, + 0x6c, 0xa5, 0x64, 0x0e, 0xee, 0x8e, 0x10, 0x94, 0x62, 0x65, 0xc5, 0xbb, 0x70, 0xb5, 0x78, 0x37, + 0xd6, 0x4e, 0xcf, 0xaa, 0xb9, 0x17, 0x67, 0xd5, 0xdc, 0xcb, 0xb3, 0x6a, 0xee, 0x79, 0x54, 0xd5, + 0x4e, 0xa3, 0xaa, 0xf6, 0x22, 0xaa, 0x6a, 0x2f, 0xa3, 0xaa, 0xf6, 0x67, 0x54, 0xd5, 0xbe, 0xfd, + 0xab, 0x9a, 0x7b, 0xa6, 0xf7, 0xd7, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x99, 0x87, 0xb8, 0x24, + 0x47, 0x0f, 0x00, 0x00, } func (m ExtraValue) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/authorization/v1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/authorization/v1/generated.proto index 47d3a57a0720..0170ee11fd62 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/authorization/v1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/authorization/v1/generated.proto @@ -26,7 +26,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/authorization/v1"; +option go_package = "v1"; // ExtraValue masks the value so protobuf can generate // +protobuf.nullable=true diff --git a/cluster-autoscaler/vendor/k8s.io/api/authorization/v1beta1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/authorization/v1beta1/generated.pb.go index aadcf8240496..4331d3e5b0d5 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/authorization/v1beta1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/authorization/v1beta1/generated.pb.go @@ -459,79 +459,79 @@ func init() { } var fileDescriptor_43130d8376f09103 = []byte{ - // 1143 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0x4f, 0x6f, 0x1b, 0x45, + // 1141 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x4f, 0x6f, 0x1b, 0x45, 0x14, 0xf7, 0xfa, 0x4f, 0x62, 0x8f, 0x1b, 0x92, 0x4e, 0x94, 0x66, 0x1b, 0x84, 0x6d, 0x19, 0x09, - 0x05, 0x51, 0x76, 0x49, 0x54, 0x48, 0x09, 0xf4, 0x10, 0x2b, 0x01, 0x45, 0x6a, 0x4b, 0x35, 0x51, - 0x72, 0xa0, 0x12, 0x30, 0xbb, 0x9e, 0xd8, 0x8b, 0xed, 0xdd, 0x65, 0x66, 0xd6, 0x21, 0x88, 0x43, - 0x8f, 0x1c, 0x39, 0x72, 0xe4, 0xc4, 0x77, 0xe0, 0x82, 0x04, 0xa7, 0x1c, 0x7b, 0x0c, 0x12, 0xb2, - 0xc8, 0xf2, 0x21,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0xc6, 0xab, 0x3c, 0x8a, 0x54, 0x37, 0xb3, 0x0f, 0xb4, 0xfa, 0x9f, 0x1a, 0xb8, - 0x7b, 0x69, 0x41, 0x8a, 0x45, 0x09, 0x77, 0xbb, 0xde, 0x11, 0x69, 0xca, 0xbb, 0x8b, 0xf1, 0xa2, - 0xb4, 0x15, 0x89, 0xd1, 0x10, 0x87, 0x6f, 0x81, 0x99, 0x26, 0x71, 0x1d, 0xd2, 0x94, 0x2b, 0x55, - 0x31, 0xae, 0xe5, 0x6d, 0x29, 0x45, 0x0a, 0x15, 0x3c, 0x4a, 0x30, 0xf3, 0x5c, 0xb5, 0xc4, 0x8d, - 0x78, 0x48, 0x4a, 0x91, 0x42, 0xe1, 0x16, 0x98, 0x27, 0xc2, 0x4d, 0x19, 0xc4, 0x0e, 0xa5, 0xde, - 0xf0, 0x65, 0x97, 0x95, 0xc2, 0xfc, 0xce, 0x38, 0x8c, 0xce, 0xf3, 0xeb, 0xff, 0x66, 0x81, 0x7e, - 0xd9, 0xd8, 0x83, 0x9d, 0x78, 0x8b, 0x91, 0xa0, 0x5c, 0xa4, 0xca, 0xeb, 0xc6, 0xf5, 0x5b, 0x46, - 0xa8, 0x35, 0x96, 0x94, 0x37, 0x73, 0x49, 0x69, 0x62, 0xf3, 0x91, 0x47, 0x78, 0x04, 0x16, 0xdc, - 0xf1, 0x95, 0x3b, 0xda, 0xc9, 0xca, 0xeb, 0x6b, 0x53, 0x35, 0x88, 0xbc, 0x52, 0x57, 0x57, 0x2e, - 0x9c, 0x03, 0x18, 0xba, 0x70, 0x09, 0x5c, 0x07, 0xc0, 0x71, 0x6d, 0xaf, 0xe7, 0x77, 0x09, 0x27, - 0x32, 0x81, 0xc5, 0x78, 0x5a, 0xee, 0x8e, 0x10, 0x94, 0x60, 0xa5, 0x65, 0x3e, 0x3f, 0x5d, 0xe6, - 0x1b, 0x9f, 0x9c, 0x9c, 0x55, 0x32, 0x2f, 0xce, 0x2a, 0x99, 0xd3, 0xb3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 0x5b, 0xb6, 0x4d, 0x18, 0x43, 0xa4, 0xef, + 0x90, 0x23, 0xf8, 0x15, 0x28, 0x8a, 0xc8, 0x9a, 0x98, 0x63, 0x5d, 0xab, 0x69, 0xab, 0xe5, 0xf5, + 0xf7, 0x8d, 0x38, 0xb1, 0x23, 0x07, 0x0d, 0xbf, 0xd3, 0x12, 0x02, 0x66, 0x08, 0xb6, 0xd1, 0x5f, + 0x33, 0x3e, 0x93, 0xb6, 0x9e, 0x10, 0x8e, 0x1b, 0xf0, 0x64, 0x50, 0xcd, 0x84, 0x83, 0x2a, 0x88, + 0x65, 0x68, 0x64, 0x15, 0x3e, 0x07, 0x79, 0xe6, 0x13, 0x5b, 0xcf, 0x4a, 0xeb, 0x1f, 0x19, 0x93, + 0x9e, 0xcd, 0x48, 0x71, 0x73, 0xcf, 0x27, 0x76, 0xe3, 0x96, 0xba, 0x26, 0x2f, 0x4e, 0x48, 0x1a, + 0x85, 0x36, 0x98, 0x61, 0x1c, 0xf3, 0x80, 0xe9, 0x39, 0x69, 0xfe, 0xe3, 0x9b, 0x99, 0x97, 0x26, + 0x1a, 0x6f, 0xa8, 0x0b, 0x66, 0xa2, 0x33, 0x52, 0xa6, 0xeb, 0xcf, 0xc1, 0xd2, 0x53, 0xcf, 0x45, + 0x84, 0x79, 0x01, 0xb5, 0xc9, 0x16, 0xe7, 0xd4, 0xb1, 0x02, 0x4e, 0x18, 0xac, 0x81, 0xbc, 0x8f, + 0x79, 0x5b, 0x26, 0xae, 0x14, 0xfb, 0xf7, 0x0c, 0xf3, 0x36, 0x92, 0x88, 0x60, 0xf4, 0x09, 0xb5, + 0x64, 0xf0, 0x09, 0xc6, 0x01, 0xa1, 0x16, 0x92, 0x48, 0xfd, 0x1b, 0x30, 0x9f, 0x30, 0x8e, 0x82, + 0xae, 0x7c, 0x5b, 0x01, 0x8d, 0xbd, 0xad, 0xd0, 0x60, 0x28, 0x92, 0xc3, 0x47, 0x60, 0xde, 0x8d, + 0x75, 0xf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, 0x4d, 0x6c, 0x3e, 0xf2, 0x08, 0x8f, 0xc0, 0x82, 0x3b, + 0xbe, 0x72, 0x47, 0x3b, 0x59, 0x79, 0x7d, 0x6d, 0xaa, 0x06, 0x91, 0x57, 0xea, 0xea, 0xca, 0x85, + 0x73, 0x00, 0x43, 0x17, 0x2e, 0x81, 0xeb, 0x00, 0x38, 0xae, 0xed, 0xf5, 0xfc, 0x2e, 0xe1, 0x44, + 0x26, 0xb0, 0x18, 0x4f, 0xcb, 0xdd, 0x11, 0x82, 0x12, 0xac, 0xb4, 0xcc, 0xe7, 0xa7, 0xcb, 0x7c, + 0xe3, 0xfe, 0xc9, 0x59, 0x25, 0xf3, 0xf2, 0xac, 0x92, 0x39, 0x3d, 0xab, 0x64, 0x5e, 0x84, 0x15, + 0xed, 0x24, 0xac, 0x68, 0x2f, 0xc3, 0x8a, 0x76, 0x1a, 0x56, 0xb4, 0xbf, 0xc3, 0x8a, 0xf6, 0xe3, + 0x3f, 0x95, 0xcc, 0xe7, 0xb3, 0x2a, 0xc2, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x7b, 0xc9, 0xa5, + 0x34, 0xa4, 0x0f, 0x00, 0x00, } func (m ExtraValue) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/authorization/v1beta1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/authorization/v1beta1/generated.proto index 01736202f837..4b1a55e0ca69 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/authorization/v1beta1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/authorization/v1beta1/generated.proto @@ -26,7 +26,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/authorization/v1beta1"; +option go_package = "v1beta1"; // ExtraValue masks the value so protobuf can generate // +protobuf.nullable=true diff --git a/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v1/generated.pb.go index 289d1b827f67..a6ff299d73ac 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v1/generated.pb.go @@ -664,108 +664,108 @@ func init() { } var fileDescriptor_2bb1f2101a7f10e2 = []byte{ - // 1608 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0x4d, 0x6c, 0xd4, 0xc6, - 0x17, 0xcf, 0x7e, 0x24, 0x24, 0x6f, 0x43, 0x3e, 0x06, 0xfe, 0x90, 0x84, 0x3f, 0xeb, 0xc8, 0x7f, - 0x84, 0xf2, 0x6f, 0x8b, 0xdd, 0x6c, 0x29, 0xa2, 0xa7, 0x2a, 0xde, 0x96, 0x82, 0x9a, 0x85, 0x30, - 0x09, 0x94, 0x7e, 0x8a, 0x89, 0x77, 0xd8, 0x98, 0xac, 0xed, 0x95, 0xed, 0x5d, 0x11, 0x24, 0xa4, - 0xf6, 0xd0, 0x7b, 0x2f, 0xb4, 0xd7, 0x56, 0xea, 0xb5, 0x67, 0xce, 0xbd, 0x71, 0xe4, 0x80, 0x54, - 0x4e, 0xab, 0xe2, 0x1e, 0x7a, 0xe8, 0xa9, 0x57, 0x4e, 0x95, 0xc7, 0x63, 0xaf, 0xbd, 0xbb, 0x76, - 0x36, 0x9b, 0x10, 0xb5, 0x15, 0xb7, 0x78, 0xe7, 0xbd, 0xdf, 0x9b, 0x79, 0xdf, 0xef, 0x05, 0x94, - 0xed, 0x8b, 0xb6, 0xa4, 0x99, 0xf2, 0x76, 0x73, 0x93, 0x5a, 0x06, 0x75, 0xa8, 0x2d, 0xb7, 0xa8, - 0x51, 0x35, 0x2d, 0x99, 0x1f, 0x90, 0x86, 0x26, 0x93, 0xa6, 0x63, 0xda, 0x2a, 0xa9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0x00, 0xff, 0xff, - 0x5d, 0x92, 0x55, 0x29, 0x87, 0x1d, 0x00, 0x00, + // 1605 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4d, 0x70, 0xd3, 0xd6, + 0x16, 0x8e, 0x7f, 0x12, 0x92, 0xe3, 0x90, 0x9f, 0x0b, 0x0f, 0x4c, 0x78, 0x58, 0x19, 0x3d, 0x86, + 0xc9, 0x7b, 0xaf, 0x48, 0x8d, 0x4b, 0x19, 0xba, 0x8c, 0xdc, 0x52, 0x98, 0xc6, 0x10, 0x6e, 0x02, + 0xa5, 0xbf, 0xc3, 0x8d, 0x7c, 0x71, 0x44, 0x2c, 0xc9, 0x23, 0xc9, 0x1e, 0xc2, 0x0c, 0x33, 0xed, + 0xa2, 0xfb, 0x6e, 0x68, 0xb7, 0xed, 0x4c, 0xb7, 0x5d, 0xb3, 0xee, 0x8e, 0x25, 0x0b, 0x66, 0xca, + 0xca, 0x53, 0xd4, 0x45, 0x17, 0x5d, 0x75, 0xcb, 0xaa, 0xa3, 0xab, 0x2b, 0x59, 0xb2, 0x2d, 0xc5, + 0x71, 0x42, 0xa6, 0xed, 0xb0, 0xb3, 0x7c, 0xcf, 0xf9, 0xce, 0xbd, 0xe7, 0xff, 0x1c, 0x50, 0xb6, + 0x2f, 0xd9, 0x92, 0x66, 0xca, 0xdb, 0xad, 0x4d, 0x6a, 0x19, 0xd4, 0xa1, 0xb6, 0xdc, 0xa6, 0x46, + 0xcd, 0xb4, 0x64, 0x7e, 0x40, 0x9a, 0x9a, 0x4c, 0x5a, 0x8e, 0x69, 0xab, 0xa4, 0xa1, 0x19, 0x75, + 0xb9, 0xbd, 0x2c, 0xd7, 0xa9, 0x41, 0x2d, 0xe2, 0xd0, 0x9a, 0xd4, 0xb4, 0x4c, 0xc7, 0x44, 0xa7, + 0x7c, 0x52, 0x89, 0x34, 0x35, 0x29, 0x42,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xff, 0x70, 0x88, 0x8a, 0x6e, 0x43, + 0xde, 0x6e, 0x52, 0x95, 0x5b, 0xf2, 0xa2, 0x94, 0xd8, 0x81, 0x48, 0x09, 0x77, 0x5c, 0x6f, 0x52, + 0xb5, 0x9b, 0x47, 0xbc, 0x2f, 0xcc, 0x10, 0xd1, 0x1d, 0x98, 0xb0, 0x99, 0xaf, 0x71, 0xb3, 0x5d, + 0x1a, 0x01, 0x9b, 0xf1, 0x2b, 0x33, 0x1c, 0x7d, 0xc2, 0xff, 0xc6, 0x1c, 0x57, 0xfc, 0x2a, 0x07, + 0x8b, 0x09, 0x9c, 0x15, 0xd3, 0xa8, 0x69, 0x2c, 0xc5, 0x5f, 0x81, 0xbc, 0xb3, 0xd3, 0x0c, 0x5c, + 0xfc, 0x42, 0x70, 0xd1, 0x8d, 0x9d, 0xa6, 0x57, 0x84, 0xce, 0xee, 0xc6, 0xef, 0xd1, 0x61, 0x86, + 0x80, 0x56, 0xc3, 0x07, 0x65, 0x63, 0x58, 0xfc, 0x5a, 0x2f, 0x3b, 0xc2, 0x80, 0xae, 0x4b, 0x0a, + 0x91, 0xe2, 0x97, 0xf7, 0x32, 0x42, 0x83, 0xd8, 0xce, 0x86, 0x45, 0x0c, 0xdb, 0x97, 0xa4, 0xe9, + 0x81, 0x87, 0xff, 0x6f, 0x38, 0x23, 0x7b, 0x1c, 0xca, 0x02, 0xbf, 0x05, 0x5a, 0xed, 0x43, 0xc3, + 0x03, 0x24, 0xa0, 0x73, 0x30, 0x61, 0x51, 0x62, 0x9b, 0x06, 0x2f, 0x38, 0xa1, 0x72, 0x31, 0xfb, + 0x17, 0xf3, 0x53, 0xf4, 0x5f, 0x38, 0xa2, 0x53, 0xdb, 0x26, 0x75, 0xca, 0xbb, 0x81, 0x59, 0x4e, + 0x78, 0xa4, 0xea, 0xff, 0x8d, 0x83, 0x73, 0xf1, 0x59, 0x06, 0x4e, 0x27, 0xe8, 0x71, 0x55, 0xb3, + 0x1d, 0xf4, 0x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 0x90, 0x0a, 0x47, 0xbd, 0xb8, 0xf0, 0xb5, + 0xac, 0xf1, 0x5e, 0x68, 0x6f, 0x41, 0x37, 0xef, 0x76, 0x84, 0xa3, 0xab, 0x51, 0x10, 0x1c, 0xc7, + 0x44, 0x2b, 0x30, 0xcb, 0x93, 0x7d, 0x8f, 0xd6, 0x4f, 0x72, 0xad, 0xcf, 0x56, 0xe2, 0xc7, 0xb8, + 0x97, 0xde, 0x83, 0xa8, 0x51, 0x5b, 0xb3, 0x68, 0x2d, 0x84, 0xc8, 0xc7, 0x21, 0xde, 0x8d, 0x1f, + 0xe3, 0x5e, 0x7a, 0xa4, 0x83, 0xc0, 0x51, 0x13, 0x2d, 0x38, 0xce, 0x20, 0xff, 0xe3, 0x76, 0x04, + 0xa1, 0x92, 0x4e, 0x8a, 0x77, 0xc3, 0x12, 0x1f, 0xe5, 0x81, 0xf7, 0x0e, 0x2c, 0x40, 0x2e, 0xc4, + 0x52, 0xef, 0x62, 0x4f, 0xea, 0x9d, 0x8b, 0x36, 0x8a, 0x91, 0x34, 0x7b, 0x03, 0x26, 0x4c, 0x16, + 0x19, 0xdc, 0x2e, 0xe7, 0x53, 0xc2, 0x29, 0x2c, 0x69, 0x21, 0x90, 0x02, 0x5e, 0x2e, 0xe3, 0xa1, + 0xc5, 0x81, 0xd0, 0x55, 0xc8, 0x37, 0xcd, 0x5a, 0x50, 0x88, 0xfe, 0x9f, 0x02, 0xb8, 0x66, 0xd6, + 0xec, 0x18, 0xdc, 0xa4, 0x77, 0x63, 0xef, 0x5f, 0xcc, 0x20, 0xd0, 0x47, 0x30, 0x19, 0x14, 0x7c, + 0xde, 0x1d, 0xc8, 0x29, 0x70, 0x83, 0x06, 0x50, 0x65, 0xda, 0x4b, 0x64, 0xc1, 0x09, 0x0e, 0xe1, + 0xd0, 0x43, 0x98, 0x57, 0x7b, 0xe7, 0xa9, 0xe2, 0x91, 0x5d, 0x6b, 0x67, 0xea, 0xb4, 0xab, 0xfc, + 0xcb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d1, 0x17, 0x2e, 0x09, 0xeb, 0xc9, 0xec, 0x21, 0xad, 0x27, + 0x5f, 0xb1, 0x9a, 0x7e, 0xcc, 0xc2, 0xf1, 0xd7, 0x1b, 0xfa, 0xe1, 0x77, 0x79, 0x8f, 0xfb, 0xf5, + 0xf5, 0x7a, 0xcf, 0x3e, 0xd4, 0x8a, 0xed, 0xcb, 0x2c, 0x8c, 0xb3, 0xd1, 0xec, 0x10, 0x16, 0x6a, + 0x97, 0x63, 0x0b, 0xb5, 0xb3, 0x29, 0x15, 0x8e, 0xdd, 0x28, 0x71, 0x7d, 0x76, 0xad, 0x67, 0x7d, + 0x76, 0x6e, 0x57, 0xa4, 0xf4, 0x65, 0xd9, 0x3b, 0x30, 0x15, 0x0a, 0x44, 0x6f, 0x78, 0xbd, 0x2a, + 0x9f, 0x29, 0x33, 0xcc, 0xb6, 0xe1, 0x86, 0x25, 0x1c, 0x26, 0x43, 0x0a, 0x51, 0x83, 0x42, 0x44, + 0xc2, 0xde, 0x98, 0x3d, 0x6a, 0x3b, 0xba, 0x2e, 0x9e, 0xea, 0x52, 0xf7, 0xe7, 0x04, 0x65, 0xe9, + 0xc9, 0x8b, 0xd2, 0xd8, 0xd3, 0x17, 0xa5, 0xb1, 0xe7, 0x2f, 0x4a, 0x63, 0x5f, 0xb8, 0xa5, 0xcc, + 0x13, 0xb7, 0x94, 0x79, 0xea, 0x96, 0x32, 0xcf, 0xdd, 0x52, 0xe6, 0x17, 0xb7, 0x94, 0xf9, 0xfa, + 0xd7, 0xd2, 0xd8, 0xc7, 0xd9, 0xf6, 0xf2, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc7, 0x83, 0x99, + 0xe1, 0x70, 0x1d, 0x00, 0x00, } func (m *ContainerResourceMetricSource) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v1/generated.proto index 9820705e7624..606a50da5607 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v1/generated.proto @@ -28,7 +28,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/autoscaling/v1"; +option go_package = "v1"; // ContainerResourceMetricSource indicates how to scale on a resource metric known to // Kubernetes, as specified in the requests and limits, describing a single container in diff --git a/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2/generated.pb.go index 9f57916d7c94..408413a78c78 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2/generated.pb.go @@ -751,116 +751,116 @@ func init() { } var fileDescriptor_b14d4df4b5f3935e = []byte{ - // 1738 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xcb, 0x8f, 0x13, 0xc9, - 0x19, 0x9f, 0xb6, 0x3d, 0xaf, 0xf2, 0x3c, 0x8b, 0x97, 0x19, 0x84, 0x3d, 0xea, 0x90, 0x40, 0x48, - 0x68, 0x07, 0x87, 0x20, 0x14, 0x0e, 0xd1, 0xf4, 0x90, 0x84, 0x11, 0x33, 0x19, 0x53, 0x06, 0x26, - 0x89, 0x92, 0x88, 0x72, 0x77, 0x8d, 0xa7, 0x32, 0x76, 0xb7, 0xd5, 0xdd, 0x36, 0x0c, 0x52, 0xa4, - 0x5c, 0x72, 0x8f, 0x12, 0xa1, 0x28, 0xff, 0x03, 0xca, 0x29, 0x11, 0x39, 0xec, 0x4a, 0x2b, 0xed, - 0x1e, 0xb8, 0xac, 0xc4, 0x61, 0x0f, 0x9c, 0xac, 0xc5, 0x2b, 0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0x09, 0x80, 0x74, 0xc0, 0x1a, 0x83, 0xac, 0x53, 0x12, 0x08, - 0x6e, 0x80, 0x4c, 0xd3, 0x36, 0xfd, 0x29, 0x65, 0xd8, 0x58, 0x57, 0xb6, 0x4d, 0x37, 0x06, 0x37, - 0xc3, 0x34, 0x66, 0xbb, 0x88, 0x43, 0xb0, 0x29, 0xd1, 0xff, 0x94, 0xc0, 0xc3, 0x31, 0x5b, 0x2a, - 0x0e, 0x81, 0xeb, 0xf7, 0x60, 0x17, 0xde, 0xf3, 0x4f, 0x50, 0x00, 0x07, 0xff, 0x02, 0x96, 0x8d, - 0xe4, 0x03, 0x38, 0x37, 0x3d, 0x72, 0xb0, 0x1a, 0xfa, 0x75, 0x40, 0x3f, 0xd3, 0xed, 0x14, 0x96, - 0x7b, 0x48, 0x50, 0xaf, 0x24, 0x66, 0x19, 0x91, 0xef, 0x26, 0x59, 0xe7, 0x86, 0x59, 0xd6, 0xef, - 0x85, 0x28, 0x2c, 0xf3, 0x4f, 0x50, 0x00, 0xa7, 0xfe, 0x2b, 0x03, 0xe6, 0x62, 0x6f, 0xb1, 0x63, - 0x8e, 0x0c, 0x91, 0xcc, 0x47, 0x16, 0x19, 0x02, 0xee, 0x48, 0x23, 0x43, 0x40, 0x1e, 0x53, 0x64, - 0x08, 0x61, 0xc7, 0x14, 0x19, 0x11, 0xcb, 0xfa, 0x44, 0xc6, 0xa7, 0x29, 0x3f, 0x32, 0xc4, 0xb0, - 0x70, 0xb8, 0xc8, 0x10, 0xb4, 0x91, 0xc8, 0xd8, 0x8e, 0x3e, 0x6f, 0x47, 0xcc, 0x6a, 0x9a, 0xef, - 0x56, 0xed, 0x7e, 0x0b, 0x5b, 0x1e, 0xf5, 0x0e, 0xf4, 0xd9, 0x9e, 0xa7, 0xb0, 0x09, 0xe6, 0x70, - 0x9b, 0x38, 0xb8, 0x46, 0xf8, 0xb6, 0x8c, 0x8f, 0x71, 0x71, 0x97, 0xd8, 0x4b, 0x74, 0x2d, 0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, 0xf9, 0x52, 0x5e, 0x1c, 0x00, 0x00, + // 1735 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xcb, 0x6f, 0x1b, 0xc7, + 0x19, 0xd7, 0x92, 0xd4, 0x6b, 0xa8, 0xe7, 0xf8, 0xc5, 0xca, 0x30, 0x29, 0x6c, 0xdd, 0xda, 0x75, + 0xeb, 0x65, 0xcd, 0xba, 0x86, 0x51, 0x9f, 0xb4, 0x72, 0x5b, 0x0b, 0x96, 0x2a, 0x7a, 0x68, 0x5b, + 0x6d, 0xd1, 0x16, 0x1e, 0xee, 0x8e, 0xa8, 0xa9, 0xc8, 0x5d, 0x62, 0x77, 0x49, 0x5b, 0x06, 0x0a, + 0xf4, 0xd2, 0x7b, 0xd1, 0xc2, 0x28, 0xfa, 0x3f, 0x18, 0x39, 0x25, 0x70, 0x0e, 0x09, 0x10, 0x20, + 0x39, 0xf8, 0x12, 0xc0, 0x87, 0x1c, 0x7c, 0x22, 0x62, 0x06, 0xc8, 0x31, 0x7f, 0x80, 0x4f, 0xc1, + 0x3c, 0xf6, 0xc9, 0x97, 0xe8, 0xc8, 0x02, 0x74, 0xe3, 0xcc, 0x7c, 0xdf, 0xef, 0x7b, 0xcc, 0xf7, + 0x9a, 0x25, 0xd0, 0xf7, 0x6f, 0xba, 0x1a, 0xb5, 0x8b, 0xfb, 0xad, 0x2a, 0x71, 0x2c, 0xe2, 0x11, + 0xb7, 0xd8, 0x26, 0x96, 0x69, 0x3b, 0x45, 0x79, 0x80, 0x9b, 0xb4, 0x88, 0x5b, 0x9e, 0xed, 0x1a, + 0xb8, 0x4e, 0xad, 0x5a, 0xb1, 0x5d, 0x2a, 0xd6, 0x88, 0x45, 0x1c, 0xec, 0x11, 0x53, 0x6b, 0x3a, + 0xb6, 0x67, 0xc3, 0x1f, 0x09, 0x52, 0x0d, 0x37, 0xa9, 0x16, 0x21, 0x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, 0x60, 0x50, 0x02, 0x16, 0xda, 0x00, 0x18, 0x7e, 0xd1, 0x74, 0x73, 0x53, 0x5c, 0xc8, + 0xad, 0xf1, 0xa3, 0x24, 0x28, 0xbc, 0x61, 0x47, 0x0f, 0xb6, 0x5c, 0x14, 0x11, 0xa1, 0xfe, 0x57, + 0x01, 0x4b, 0xc9, 0x21, 0x35, 0x78, 0x0f, 0x28, 0x03, 0xdf, 0x03, 0x7f, 0x05, 0x33, 0x62, 0xe6, + 0xb1, 0x1d, 0x79, 0xed, 0xbf, 0x3a, 0x64, 0x59, 0xc3, 0x55, 0x52, 0xaf, 0x48, 0x56, 0x11, 0xc4, + 0xfe, 0x0a, 0x05, 0x90, 0xea, 0xb3, 0x0c, 0x00, 0x61, 0x4e, 0xc1, 0xeb, 0xb1, 0x3e, 0xb6, 0x9a, + 0xe8, 0x63, 0x4b, 0xd1, 0xc7, 0x45, 0xa4, 0x67, 0xdd, 0x03, 0x53, 0x36, 0x2f, 0x33, 0x52, 0xc3, + 0xab, 0x43, 0xfc, 0x18, 0xcc, 0x3b, 0x01, 0x90, 0x0e, 0x58, 0x63, 0x90, 0x75, 0x4a, 0x02, 0xc1, + 0x0d, 0x90, 0x69, 0xda, 0xa6, 0x3f, 0xa5, 0x0c, 0x1b, 0xeb, 0xca, 0xb6, 0xe9, 0xc6, 0xe0, 0x66, + 0x98, 0xc6, 0x6c, 0x17, 0x71, 0x08, 0x36, 0x25, 0xfa, 0x9f, 0x12, 0x78, 0x38, 0x66, 0x4b, 0xc5, + 0x21, 0x70, 0xfd, 0x1e, 0xec, 0xc2, 0x7b, 0xfe, 0x09, 0x0a, 0xe0, 0xe0, 0x3f, 0xc0, 0xb2, 0x91, + 0x7c, 0x00, 0xe7, 0xa6, 0x47, 0x0e, 0x56, 0x43, 0xbf, 0x0e, 0xe8, 0x67, 0xba, 0x9d, 0xc2, 0x72, + 0x0f, 0x09, 0xea, 0x95, 0xc4, 0x2c, 0x23, 0xf2, 0xdd, 0x24, 0xeb, 0xdc, 0x30, 0xcb, 0xfa, 0xbd, + 0x10, 0x85, 0x65, 0xfe, 0x09, 0x0a, 0xe0, 0xd4, 0xff, 0x65, 0xc0, 0x5c, 0xec, 0x2d, 0x76, 0xcc, + 0x91, 0x21, 0x92, 0xf9, 0xc8, 0x22, 0x43, 0xc0, 0x1d, 0x69, 0x64, 0x08, 0xc8, 0x63, 0x8a, 0x0c, + 0x21, 0xec, 0x98, 0x22, 0x23, 0x62, 0x59, 0x9f, 0xc8, 0xf8, 0x3c, 0xe5, 0x47, 0x86, 0x18, 0x16, + 0x0e, 0x17, 0x19, 0x82, 0x36, 0x12, 0x19, 0xdb, 0xd1, 0xe7, 0xed, 0x88, 0x59, 0x4d, 0xf3, 0xdd, + 0xaa, 0xdd, 0x6b, 0x61, 0xcb, 0xa3, 0xde, 0x81, 0x3e, 0xdb, 0xf3, 0x14, 0x36, 0xc1, 0x1c, 0x6e, + 0x13, 0x07, 0xd7, 0x08, 0xdf, 0x96, 0xf1, 0x31, 0x2e, 0xee, 0x12, 0x7b, 0x89, 0xae, 0x45, 0x70, + 0x50, 0x0c, 0x95, 0xb5, 0x74, 0xb9, 0x7e, 0xe0, 0x05, 0x4f, 0x5c, 0xd9, 0xe5, 0x78, 0x4b, 0x5f, + 0xeb, 0x39, 0x45, 0x7d, 0x38, 0xd4, 0xff, 0xa4, 0xc0, 0x72, 0xcf, 0xc7, 0x85, 0xd0, 0x29, 0xca, + 0x7b, 0x72, 0x4a, 0xea, 0x18, 0x9d, 0x92, 0x1e, 0xdb, 0x29, 0x1f, 0xa5, 0x00, 0xec, 0xed, 0x0f, + 0xf0, 0x80, 0x8f, 0x15, 0x86, 0x43, 0xab, 0xc4, 0x14, 0xc7, 0x3f, 0x70, 0x06, 0x8e, 0x8e, 0x23, + 0x51, 0x58, 0x94, 0x94, 0x73, 0xf4, 0x1f, 0x59, 0xc3, 0x4f, 0x5a, 0xe9, 0x23, 0xfb, 0xa4, 0xa5, + 0x7e, 0x9a, 0xf4, 0xdb, 0x09, 0xfc, 0x7c, 0xd6, 0xef, 0x96, 0xd3, 0xc7, 0x73, 0xcb, 0xea, 0xc7, + 0x0a, 0x58, 0x4a, 0x8e, 0x11, 0x27, 0xe4, 0xdb, 0xe9, 0x67, 0x71, 0xd5, 0x4f, 0xe2, 0x77, 0xd3, + 0xe7, 0x0a, 0x38, 0x7d, 0x72, 0xfe, 0x26, 0x51, 0x3f, 0xec, 0x55, 0xf7, 0x04, 0xfc, 0xd9, 0xa1, + 0x5f, 0x7e, 0xf9, 0x26, 0x3f, 0xf1, 0xea, 0x4d, 0x7e, 0xe2, 0xf5, 0x9b, 0xfc, 0xc4, 0x3f, 0xbb, + 0x79, 0xe5, 0x65, 0x37, 0xaf, 0xbc, 0xea, 0xe6, 0x95, 0xd7, 0xdd, 0xbc, 0xf2, 0x75, 0x37, 0xaf, + 0xfc, 0xfb, 0x9b, 0xfc, 0xc4, 0x9f, 0x53, 0xed, 0xd2, 0xf7, 0x01, 0x00, 0x00, 0xff, 0xff, 0x72, + 0xba, 0x02, 0x95, 0x47, 0x1c, 0x00, 0x00, } func (m *ContainerResourceMetricSource) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2/generated.proto index 0595f1eb8fc8..e47d94a4767a 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2/generated.proto @@ -28,7 +28,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/autoscaling/v2"; +option go_package = "v2"; // ContainerResourceMetricSource indicates how to scale on a resource metric known to // Kubernetes, as specified in requests and limits, describing each pod in the diff --git a/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta1/generated.pb.go index edda3581e76e..28832c152da4 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta1/generated.pb.go @@ -577,105 +577,105 @@ func init() { } var fileDescriptor_26c1bfc7a52d0478 = []byte{ - // 1565 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0x4d, 0x6c, 0x1b, 0x45, - 0x1b, 0x8e, 0xed, 0x4d, 0x9a, 0xbc, 0x4e, 0xf3, 0x33, 0xed, 0xd7, 0xba, 0xe9, 0x57, 0x3b, 0x5a, - 0x7d, 0xfa, 0x94, 0xaf, 0xfa, 0xd8, 0x6d, 0x4d, 0xf8, 0x91, 0x10, 0x12, 0xb1, 0x0b, 0x6d, 0x45, - 0xd2, 0x96, 0x49, 0x5a, 0x21, 0x68, 0x11, 0x93, 0xf5, 0xd4, 0x59, 0x62, 0xef, 0x5a, 0x3b, 0x63, - 0xab, 0x29, 0x42, 0x42, 0x48, 0xdc, 0xb9, 0xc0, 0x19, 0x24, 0xae, 0x08, 0x71, 0x81, 0x33, 0xb7, - 0x1e, 0x7b, 0x6c, 0x05, 0xb2, 0xa8, 0x39, 0x70, 0xe6, 0xda, 0x13, 0x9a, 0xd9, 0xd9, 0xf5, 0xae, - 0xff, 0xe3, 0xa6, 0xe1, 0x47, 0xbd, 0x79, 0x77, 0xde, 0xf7, 0x79, 0x67, 0x9e, 0xf7, 0x6f, 0xde, - 0x35, 0x5c, 0xdc, 0x7d, 0x99, 0x19, 0xb6, 0x6b, 0xee, 0xd6, 0xb7, 0xa9, 0xe7, 0x50, 0x4e, 0x99, - 0xd9, 0xa0, 0x4e, 0xc9, 0xf5, 0x4c, 0xb5, 0x40, 0x6a, 0xb6, 0x49, 0xea, 0xdc, 0x65, 0x16, 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0x62, 0x7c, 0x36, 0x60, 0xfc, 0x4d, 0xdb, 0x29, - 0x61, 0xb9, 0x22, 0x24, 0xa4, 0x4f, 0x92, 0x71, 0x89, 0x08, 0xe1, 0x79, 0x00, 0x52, 0xb3, 0x95, - 0x01, 0x49, 0xc5, 0x4c, 0x01, 0x29, 0x39, 0x58, 0xbb, 0x76, 0x59, 0xad, 0xe0, 0x88, 0x94, 0xfe, - 0x45, 0x0a, 0x8e, 0xbf, 0x7e, 0x87, 0x53, 0xcf, 0x21, 0x95, 0x58, 0xb2, 0xe5, 0x01, 0xaa, 0xf2, - 0xf9, 0x4a, 0x3b, 0x10, 0x42, 0xb0, 0x8d, 0x70, 0x05, 0x47, 0xa4, 0x90, 0x0b, 0x73, 0xfe, 0xd3, - 0x26, 0xad, 0x50, 0x8b, 0xbb, 0x9e, 0xdc, 0x6c, 0x3a, 0xff, 0xfc, 0x20, 0x7f, 0x30, 0x43, 0x94, - 0x1e, 0xa3, 0x71, 0xde, 0x58, 0x27, 0xdb, 0xb4, 0x12, 0xa8, 0x16, 0x50, 0xab, 0x99, 0x9b, 0xdb, - 0x88, 0xc1, 0xe1, 0x0e, 0x78, 0x44, 0x20, 0xed, 0x27, 0xc4, 0x93, 0x78, 0x7f, 0xbe, 0xd5, 0xcc, - 0xa5, 0xb7, 0xda, 0x30, 0x38, 0x8a, 0xd9, 0x27, 0xab, 0xb5, 0xa7, 0x9d, 0xd5, 0xfa, 0x97, 0xdd, - 0x8e, 0xf1, 0x73, 0xf3, 0x6f, 0xe1, 0x98, 0x1d, 0x98, 0x55, 0x69, 0xf3, 0x24, 0x9e, 0x39, 0xae, - 0x8e, 0x35, 0x5b, 0x8c, 0x60, 0xe1, 0x18, 0x32, 0xda, 0xeb, 0x5d, 0x08, 0xc6, 0x73, 0xd0, 0xc9, - 0xfd, 0x14, 0x01, 0xfd, 0xc7, 0x24, 0x9c, 0xbc, 0xe4, 0x7a, 0xf6, 0x5d, 0x91, 0xe5, 0x95, 0x6b, -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0x0e, 0x8b, 0xa1, 0xea, - 0x3f, 0x77, 0xfa, 0xd6, 0xaf, 0x0a, 0x7f, 0x59, 0xdf, 0x1e, 0xde, 0x54, 0xfc, 0x8f, 0x70, 0xef, - 0x57, 0x49, 0x58, 0xe8, 0x6c, 0xac, 0x63, 0x7d, 0xfe, 0xb8, 0xdb, 0xf3, 0x1b, 0x4e, 0x72, 0xac, - 0x4d, 0x87, 0xb3, 0xda, 0x88, 0x5f, 0x67, 0xa3, 0x9e, 0x48, 0x1d, 0xb8, 0x27, 0xf4, 0xaf, 0xe3, - 0x1c, 0x8d, 0xff, 0x89, 0xa8, 0xcf, 0x07, 0xd5, 0xe4, 0x21, 0x7d, 0x50, 0x7d, 0xca, 0x34, 0x7d, - 0x93, 0x84, 0xe3, 0xcf, 0xfe, 0x53, 0x18, 0xfd, 0xeb, 0xe3, 0x0f, 0xdd, 0x7c, 0x3d, 0xfb, 0x67, - 0x60, 0x94, 0x40, 0x2e, 0x5c, 0xb8, 0xf7, 0x28, 0x3b, 0x71, 0xff, 0x51, 0x76, 0xe2, 0xc1, 0xa3, - 0xec, 0xc4, 0xc7, 0xad, 0x6c, 0xe2, 0x5e, 0x2b, 0x9b, 0xb8, 0xdf, 0xca, 0x26, 0x1e, 0xb4, 0xb2, - 0x89, 0x5f, 0x5a, 0xd9, 0xc4, 0x67, 0xbf, 0x66, 0x27, 0xde, 0xc9, 0x0e, 0xfe, 0x93, 0xf1, 0x8f, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x09, 0x76, 0xa2, 0x69, 0x9e, 0x1c, 0x00, 0x00, + // 1562 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0x4b, 0x6c, 0x1b, 0xc5, + 0x1b, 0x8f, 0xed, 0xcd, 0xeb, 0x73, 0x9a, 0xc7, 0xb4, 0xff, 0xd6, 0x4d, 0xff, 0xb5, 0xa3, 0x15, + 0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, 0x4f, 0x61, 0xf8, 0xaf, 0x8f, 0x3f, 0x75, 0xf3, 0xf5, 0xf4, 0x9f, 0x81, 0x61, + 0x02, 0xb9, 0x70, 0xf6, 0xee, 0xc3, 0xec, 0xd8, 0xbd, 0x87, 0xd9, 0xb1, 0xfb, 0x0f, 0xb3, 0x63, + 0x9f, 0xb6, 0xb2, 0x89, 0xbb, 0xad, 0x6c, 0xe2, 0x5e, 0x2b, 0x9b, 0xb8, 0xdf, 0xca, 0x26, 0x7e, + 0x6b, 0x65, 0x13, 0x5f, 0xfc, 0x9e, 0x1d, 0x7b, 0x6f, 0x52, 0xb5, 0x9e, 0xbf, 0x02, 0x00, 0x00, + 0xff, 0xff, 0x4d, 0x4c, 0xa8, 0x42, 0x87, 0x1c, 0x00, 0x00, } func (m *ContainerResourceMetricSource) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto index ebd3b31faee3..27f9ab45c4e8 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta1/generated.proto @@ -28,7 +28,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/autoscaling/v2beta1"; +option go_package = "v2beta1"; // ContainerResourceMetricSource indicates how to scale on a resource metric known to // Kubernetes, as specified in requests and limits, describing each pod in the diff --git a/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta1/types.go b/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta1/types.go index 22bb7699e9d1..c49c5e0c526d 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta1/types.go @@ -449,7 +449,7 @@ type ExternalMetricStatus struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.8 // +k8s:prerelease-lifecycle-gen:deprecated=1.22 -// +k8s:prerelease-lifecycle-gen:replacement=autoscaling,v2,HorizontalPodAutoscaler +// +k8s:prerelease-lifecycle-gen:replacement=autoscaling,v2beta2,HorizontalPodAutoscaler // HorizontalPodAutoscaler is the configuration for a horizontal pod // autoscaler, which automatically manages the replica count of any resource diff --git a/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta1/zz_generated.prerelease-lifecycle.go b/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta1/zz_generated.prerelease-lifecycle.go index 3437454ee3ef..67d38d05170b 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta1/zz_generated.prerelease-lifecycle.go +++ b/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta1/zz_generated.prerelease-lifecycle.go @@ -40,7 +40,7 @@ func (in *HorizontalPodAutoscaler) APILifecycleDeprecated() (major, minor int) { // APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. // It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. func (in *HorizontalPodAutoscaler) APILifecycleReplacement() schema.GroupVersionKind { - return schema.GroupVersionKind{Group: "autoscaling", Version: "v2", Kind: "HorizontalPodAutoscaler"} + return schema.GroupVersionKind{Group: "autoscaling", Version: "v2beta2", Kind: "HorizontalPodAutoscaler"} } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. diff --git a/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta2/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta2/generated.pb.go index 211acd1ae3fb..cece3c877afd 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta2/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta2/generated.pb.go @@ -751,116 +751,116 @@ func init() { } var fileDescriptor_592ad94d7d6be24f = []byte{ - // 1743 bytes of a gzipped FileDescriptorProto + // 1741 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xcd, 0x6f, 0x1b, 0xc7, 0x15, 0xd7, 0x92, 0xd4, 0xd7, 0x50, 0x9f, 0xe3, 0x2f, 0x42, 0x86, 0x49, 0x61, 0x6b, 0xb4, 0xae, - 0xd1, 0x2e, 0x2b, 0x56, 0x6d, 0x0d, 0x18, 0x45, 0xab, 0x95, 0x5b, 0xdb, 0xb0, 0x64, 0xab, 0x43, + 0x51, 0x2f, 0x2b, 0x56, 0x6d, 0x0d, 0x18, 0x45, 0xab, 0x95, 0x5b, 0xdb, 0xb0, 0x64, 0xab, 0x43, 0x59, 0x2d, 0x0a, 0xd9, 0xe8, 0x70, 0x77, 0x44, 0x4d, 0x45, 0xee, 0x12, 0xbb, 0x4b, 0xda, 0x72, - 0x80, 0x20, 0x08, 0x90, 0x7b, 0x90, 0x20, 0xd7, 0xfc, 0x09, 0x09, 0x7c, 0x09, 0x90, 0x63, 0x3e, + 0x81, 0xa2, 0x08, 0x90, 0x7b, 0x90, 0x20, 0xd7, 0xfc, 0x09, 0x09, 0x7c, 0x09, 0x90, 0x63, 0x3e, 0x60, 0x18, 0x41, 0x10, 0xf8, 0x16, 0xe7, 0x42, 0xc4, 0xcc, 0x31, 0xc7, 0xdc, 0x7c, 0x0a, 0xe6, 0x63, 0x3f, 0x49, 0x89, 0x94, 0x20, 0x29, 0xd0, 0x8d, 0x3b, 0xf3, 0xde, 0xef, 0xcd, 0x7b, 0xf3, - 0x7b, 0x6f, 0xde, 0x0c, 0xc1, 0xcd, 0x9d, 0x6b, 0xae, 0x46, 0xed, 0xe2, 0x4e, 0xb3, 0x42, 0x1c, + 0x7b, 0x6f, 0xde, 0x0c,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, 0x89, 0xbd, 0xbc, 0x20, 0x83, 0x3d, 0xbd, 0x1c, + 0x9f, 0x46, 0x49, 0x79, 0x06, 0x61, 0x12, 0x97, 0x3a, 0xc4, 0x0c, 0x20, 0x32, 0x71, 0x88, 0x9b, + 0xf1, 0x69, 0x94, 0x94, 0x87, 0x35, 0x30, 0x25, 0x51, 0xe5, 0xd6, 0xe6, 0x86, 0x39, 0x3b, 0x06, + 0x6c, 0x50, 0xe5, 0xc9, 0x15, 0xd0, 0x7d, 0x39, 0x86, 0x85, 0x12, 0xd8, 0xd0, 0x03, 0xc0, 0xf0, + 0xab, 0xa9, 0x9b, 0x1b, 0xe1, 0x96, 0xfe, 0x72, 0x48, 0xbe, 0x04, 0x65, 0x39, 0xec, 0x01, 0x82, + 0x21, 0x17, 0x45, 0xec, 0xa8, 0xef, 0x29, 0x60, 0x26, 0xd9, 0xe0, 0x06, 0x57, 0x0b, 0x65, 0xcf, + 0xab, 0xc5, 0x43, 0x30, 0x26, 0x5a, 0x25, 0xdb, 0x91, 0x04, 0xf8, 0xdd, 0x80, 0x45, 0x0f, 0x57, + 0x48, 0xad, 0x2c, 0x55, 0x05, 0x9d, 0xfd, 0x2f, 0x14, 0x40, 0xaa, 0x1f, 0x65, 0x00, 0x08, 0x53, + 0x0c, 0x2e, 0xc6, 0x4e, 0xb9, 0xf9, 0xc4, 0x29, 0x37, 0x13, 0xbd, 0xa7, 0x44, 0x4e, 0xb4, 0x0d, + 0x30, 0x62, 0xf3, 0xd2, 0x23, 0x57, 0x58, 0xea, 0x17, 0xcc, 0xa0, 0x4d, 0x0a, 0xd0, 0x74, 0xc0, + 0xce, 0x0e, 0x59, 0xc0, 0x24, 0x1a, 0xbc, 0x07, 0x32, 0x0d, 0xdb, 0xf4, 0xfb, 0x9a, 0xbe, 0x2d, + 0xe1, 0x9a, 0x6d, 0xba, 0x31, 0xcc, 0x31, 0xb6, 0x76, 0x36, 0x8a, 0x38, 0x0e, 0x6b, 0x33, 0xfd, + 0x97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, 0xb0, 0xfb, + 0x65, 0xdc, 0x89, 0xd3, 0xfd, 0xa8, 0xfb, 0x4c, 0x01, 0x67, 0x4f, 0xd9, 0x3f, 0x3c, 0xea, 0x27, + 0xdd, 0x6b, 0x3e, 0x2d, 0xff, 0xd3, 0xe8, 0xd7, 0x5e, 0xbc, 0xce, 0x0f, 0xbd, 0x7c, 0x9d, 0x1f, + 0x7a, 0xf5, 0x3a, 0x3f, 0xf4, 0xff, 0x4e, 0x5e, 0x79, 0xd1, 0xc9, 0x2b, 0x2f, 0x3b, 0x79, 0xe5, + 0x55, 0x27, 0xaf, 0x7c, 0xd7, 0xc9, 0x2b, 0xef, 0x7c, 0x9f, 0x1f, 0xfa, 0xd7, 0xa8, 0x84, 0xfe, + 0x29, 0x00, 0x00, 0xff, 0xff, 0xb0, 0x79, 0x7e, 0xc9, 0x1b, 0x1d, 0x00, 0x00, } func (m *ContainerResourceMetricSource) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto index 920031b1a194..7dee1447040b 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta2/generated.proto @@ -28,7 +28,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/autoscaling/v2beta2"; +option go_package = "v2beta2"; // ContainerResourceMetricSource indicates how to scale on a resource metric known to // Kubernetes, as specified in requests and limits, describing each pod in the diff --git a/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta2/types.go b/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta2/types.go index 10bdec5b9409..7619f1e009c1 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta2/types.go +++ b/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta2/types.go @@ -28,7 +28,6 @@ import ( // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.12 // +k8s:prerelease-lifecycle-gen:deprecated=1.23 -// +k8s:prerelease-lifecycle-gen:replacement=autoscaling,v2,HorizontalPodAutoscaler // HorizontalPodAutoscaler is the configuration for a horizontal pod // autoscaler, which automatically manages the replica count of any resource diff --git a/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta2/zz_generated.prerelease-lifecycle.go b/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta2/zz_generated.prerelease-lifecycle.go index 6d1c2504abf7..b8e49bc51b45 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta2/zz_generated.prerelease-lifecycle.go +++ b/cluster-autoscaler/vendor/k8s.io/api/autoscaling/v2beta2/zz_generated.prerelease-lifecycle.go @@ -21,10 +21,6 @@ limitations under the License. package v2beta2 -import ( - schema "k8s.io/apimachinery/pkg/runtime/schema" -) - // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *HorizontalPodAutoscaler) APILifecycleIntroduced() (major, minor int) { @@ -37,12 +33,6 @@ func (in *HorizontalPodAutoscaler) APILifecycleDeprecated() (major, minor int) { return 1, 23 } -// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. -// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. -func (in *HorizontalPodAutoscaler) APILifecycleReplacement() schema.GroupVersionKind { - return schema.GroupVersionKind{Group: "autoscaling", Version: "v2", Kind: "HorizontalPodAutoscaler"} -} - // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *HorizontalPodAutoscaler) APILifecycleRemoved() (major, minor int) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/batch/v1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/batch/v1/generated.pb.go index 483406d84c59..a33edf5b7f1f 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/batch/v1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/batch/v1/generated.pb.go @@ -375,97 +375,96 @@ func init() { } var fileDescriptor_3b52da57c93de713 = []byte{ - // 1431 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x41, 0x6f, 0x1b, 0xc5, - 0x17, 0xcf, 0xc6, 0x71, 0x6c, 0x8f, 0x93, 0xd4, 0x9d, 0xfe, 0xdb, 0xfa, 0x6f, 0x2a, 0x6f, 0x6a, - 0x0a, 0x0a, 0xa8, 0xac, 0x49, 0x88, 0x10, 0x20, 0x40, 0xca, 0xa6, 0x2a, 0x34, 0x38, 0x6a, 0x18, - 0x3b, 0x42, 0x2a, 0x05, 0xb1, 0xde, 0x1d, 0x3b, 0xdb, 0xac, 0x77, 0xac, 0x9d, 0x71, 0x84, 0x6f, - 0x48, 0x7c, 0x01, 0xf8, 0x12, 0x1c, 0x11, 0x12, 0x9c, 0x39, 0xa2, 0x1e, 0x2b, 0x4e, 0x3d, 0xad, - 0xe8, 0xf2, 0x01, 0xb8, 0x87, 0x0b, 0x9a, 0xd9, 0xf1, 0xee, 0xda, 0xde, 0x0d, 0x49, 0x0f, 0x15, - 0xb7, 0xcc, 0x9b, 0xdf, 0xfb, 0xcd, 0xdb, 0x79, 0xbf, 0x79, 0xef, 0x39, 0xe0, 0xfd, 0xe3, 0x77, - 0xa8, 0x66, 0x93, 0xe6, 0xf1, 0xa8, 0x8b, 0x3d, 0x17, 0x33, 0x4c, 0x9b, 0x27, 0xd8, 0xb5, 0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ea, 0xa2, 0x60, 0x5f, 0xd7, 0x52, 0x72, 0xa0, 0xc9, 0x68, 0xda, - 0x43, 0x6c, 0xea, 0x2b, 0x92, 0x6d, 0x89, 0xaf, 0x90, 0xf0, 0x85, 0x7b, 0x60, 0x99, 0x32, 0x83, - 0x8d, 0x68, 0x35, 0x27, 0x58, 0x1a, 0x67, 0xb2, 0x08, 0xa4, 0xbe, 0x26, 0x79, 0x96, 0xc3, 0x35, - 0x92, 0x0c, 0x8d, 0x1f, 0x15, 0x50, 0x96, 0xc8, 0x96, 0x4d, 0x19, 0x7c, 0x38, 0x77, 0x03, 0xda, - 0xf9, 0x6e, 0x80, 0x7b, 0x8b, 0xef, 0xaf, 0xc8, 0x93, 0x8a, 0x13, 0x4b, 0xe2, 0xeb, 0x77, 0x40, - 0xde, 0x66, 0x78, 0x40, 0xab, 0x8b, 0xeb, 0xb9, 0x8d, 0xf2, 0xd6, 0x8d, 0xb3, 0x02, 0xd7, 0x57, - 0x25, 0x51, 0xfe, 0x1e, 0x77, 0x41, 0xa1, 0x67, 0xe3, 0xf7, 0xa5, 0x28, 0x60, 0x7e, 0x25, 0xf0, - 0x36, 0x28, 0xf2, 0xc4, 0x5a, 0x23, 0x07, 0x8b, 0x80, 0x4b, 0x71, 0x00, 0x6d, 0x69, 0x47, 0x11, - 0x02, 0x6e, 0x80, 0x22, 0xd7, 0xc2, 0x03, 0xe2, 0xe2, 0x6a, 0x51, 0xa0, 0x57, 0x38, 0xb2, 0x23, - 0x6d, 0x28, 0xda, 0x85, 0x87, 0xe0, 0x3a, 0x65, 0x86, 0xc7, 0x6c, 0xb7, 0x7f, 0x07, 0x1b, 0x96, - 0x63, 0xbb, 0xb8, 0x8d, 0x4d, 0xe2, 0x5a, 0x54, 0xe4, 0x2e, 0xa7, 0xbf, 0x14, 0xf8, 0xea, 0xf5, - 0x76, 0x3a, 0x04, 0x65, 0xf9, 0xc2, 0x87, 0xe0, 0xb2, 0x49, 0x5c, 0x73, 0xe4, 0x79,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x11, 0xd4, 0x95, 0xef, - 0xfe, 0xac, 0x2f, 0x3c, 0xb8, 0x92, 0xf2, 0xef, 0x8a, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xae, - 0xfd, 0x54, 0xb2, 0xdd, 0x10, 0x00, 0x00, + // 1413 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0x41, 0x6f, 0x1b, 0xc5, + 0x17, 0xcf, 0x26, 0x71, 0x62, 0x8f, 0x93, 0xd4, 0x9d, 0xfe, 0xdb, 0xfa, 0x6f, 0x2a, 0x6f, 0x6a, + 0x0a, 0x0a, 0xa8, 0xac, 0x49, 0x88, 0x10, 0x42, 0x80, 0x94, 0x4d, 0x55, 0x68, 0x70, 0xd4, 0x30, + 0x76, 0x84, 0x04, 0x05, 0xb1, 0xde, 0x1d, 0x3b, 0xdb, 0xec, 0xee, 0x58, 0x3b, 0x63, 0x0b, 0xdf, + 0x90, 0xf8, 0x02, 0xf0, 0x25, 0x10, 0x27, 0x84, 0x04, 0x67, 0x8e, 0xa8, 0xc7, 0x1e, 0x7b, 0x5a, + 0xd1, 0xe5, 0x03, 0x70, 0x0f, 0x17, 0x34, 0xb3, 0xe3, 0xdd, 0xb5, 0xbd, 0x1b, 0xd2, 0x1e, 0x2a, + 0x6e, 0xd9, 0x37, 0xbf, 0xf7, 0x9b, 0xe7, 0xf7, 0x7e, 0xf3, 0xde, 0x0b, 0x78, 0xef, 0xf4, 0x1d, + 0xaa, 0xd9, 0xa4, 0x79, 0x3a, 0xec, 0x62, 0xdf, 0xc3, 0x0c, 0xd3, 0xe6, 0x08, 0x7b, 0x16, 0xf1, + 0x9b, 0xf2, 0xc0, 0x18, 0xd8, 0xcd, 0xae, 0xc1, 0xcc, 0x93, 0xe6, 0x68, 0xbb, 0xd9, 0xc7, 0x1e, + 0xf6, 0x0d, 0x86, 0x2d, 0x6d, 0xe0, 0x13,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x83, 0x0d, + 0x69, 0x75, 0x49, 0xb0, 0x34, 0xce, 0x65, 0x11, 0x48, 0x7d, 0x43, 0xf2, 0xac, 0x44, 0xdf, 0x48, + 0x32, 0x34, 0x7e, 0x52, 0x40, 0x59, 0x22, 0x5b, 0x36, 0x65, 0xf0, 0xc1, 0x5c, 0x06, 0xb4, 0x8b, + 0x65, 0x80, 0x7b, 0x8b, 0xdf, 0x5f, 0x91, 0x37, 0x15, 0x27, 0x96, 0xd4, 0xaf, 0xdf, 0x03, 0x05, + 0x9b, 0x61, 0x97, 0x56, 0x17, 0x37, 0x97, 0xb6, 0xca, 0x3b, 0x37, 0xce, 0x0b, 0x5c, 0x5f, 0x97, + 0x44, 0x85, 0x7b, 0xdc, 0x05, 0x45, 0x9e, 0x8d, 0x1f, 0x97, 0xe3, 0x80, 0x79, 0x4a, 0xe0, 0x6d, + 0x50, 0xe4, 0x85, 0xb5, 0x86, 0x0e, 0x16, 0x01, 0x97, 0x92, 0x00, 0xda, 0xd2, 0x8e, 0x62, 0x04, + 0x3c, 0x06, 0xd7, 0x29, 0x33, 0x7c, 0x66, 0x7b, 0xfd, 0x3b, 0xd8, 0xb0, 0x1c, 0xdb, 0xc3, 0x6d, + 0x6c, 0x12, 0xcf, 0xa2, 0xa2, 0x22, 0x4b, 0xfa, 0x4b, 0x61, 0xa0, 0x5e, 0x6f, 0x67, 0x43, 0x50, + 0x9e, 0x2f, 0x7c, 0x00, 0x2e, 0x9b, 0xc4, 0x33, 0x87, 0xbe, 0x8f, 0x3d, 0x73, 0x7c, 0x44, 0x1c, + 0xdb, 0x1c, 0x8b, 0xe2, 0x94, 0x74, 0x4d, 0x46, 0x73, 0x79, 0x7f, 0x16, 0x70, 0x96, 0x65, 0x44, + 0xf3, 0x44, 0xf0, 0x15, 0xb0, 0x4a, 0x87, 0x74, 0x80, 0x3d, 0xab, 0xba, 0xbc, 0xa9, 0x6c, 0x15, + 0xf5, 0x72, 0x18, 0xa8, 0xab, 0xed, 0xc8,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c, 0xab, 0xe6, 0x29, 0x2f, 0x67, 0x9e, 0xfd, 0x5c, 0x10, 0x81, 0x8a, + 0x59, 0xb6, 0x0d, 0xca, 0x03, 0xc3, 0x37, 0x1c, 0x07, 0x3b, 0x36, 0x75, 0x45, 0xac, 0x05, 0xfd, + 0x12, 0xef, 0xcb, 0x47, 0x89, 0x19, 0xa5, 0x31, 0xdc, 0xc5, 0x24, 0xee, 0xc0, 0xc1, 0x3c, 0x99, + 0x91, 0xdc, 0xa4, 0xcb, 0x7e, 0x62, 0x46, 0x69, 0x0c, 0xbc, 0x0f, 0xae, 0x46, 0x1d, 0x6c, 0x76, + 0x02, 0x2e, 0x89, 0x09, 0xf8, 0xff, 0x30, 0x50, 0xaf, 0xee, 0x65, 0x01, 0x50, 0xb6, 0x1f, 0xdc, + 0x05, 0x6b, 0x5d, 0xc3, 0x3c, 0x25, 0xbd, 0x5e, 0xba, 0x63, 0x57, 0xc2, 0x40, 0x5d, 0xd3, 0x53, + 0x76, 0x34, 0x85, 0x82, 0x5f, 0x80, 0x22, 0xc5, 0x0e, 0x36, 0x19, 0xf1, 0xa5, 0xc4, 0xde, 0xba, + 0x60, 0x55, 0x8c, 0x2e, 0x76, 0xda, 0xd2, 0x55, 0x5f, 0x13, 0x93, 0x5e, 0x7e, 0xa1, 0x98, 0x12, + 0xbe, 0x0b, 0x36, 0x5c, 0xc3, 0x1b, 0x1a, 0x31, 0x52, 0x68, 0xab, 0xa8, 0xc3, 0x30, 0x50, 0x37, + 0x0e, 0xa7, 0x4e, 0xd0, 0x0c, 0x12, 0x7e, 0x02, 0x8a, 0x6c, 0x32, 0x46, 0x57, 0x44, 0x68, 0x99, + 0x83, 0xe2, 0x88, 0x58, 0x53, 0x53, 0x34, 0x56, 0x49, 0x3c, 0x42, 0x63, 0x1a, 0xbe, 0x78, 0x30, + 0xe6, 0xc8, 0x8c, 0xed, 0xf5, 0x18, 0xf6, 0xef, 0xda, 0x9e, 0x4d, 0x4f, 0xb0, 0x55, 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, 0x8f, 0x61, 0xab, 0x83, 0x7d, 0xd7, 0xf6, 0xf8, 0x3f, 0x4f, 0x47, + 0xc4, 0xa2, 0x42, 0xb9, 0xe5, 0x9d, 0xdb, 0x99, 0xc5, 0x3e, 0xce, 0xf6, 0x89, 0x74, 0x9e, 0x73, + 0x88, 0xf2, 0x6e, 0x82, 0x2a, 0x28, 0xf8, 0xd8, 0xb0, 0xc6, 0x42, 0xde, 0x05, 0xbd, 0xc4, 0xdb, + 0x28, 0xe2, 0x06, 0x14, 0xd9, 0x1b, 0xbf, 0x28, 0xe0, 0xd2, 0xcc, 0x56, 0xfb, 0xdf, 0x5f, 0x5b, + 0x1a, 0xbf, 0x2a, 0x20, 0x2f, 0x17, 0xf0, 0x28, 0xad, 0x0b, 0xfe, 0xac, 0x4a, 0xfa, 0xce, 0x94, + 0x26, 0xce, 0x02, 0xf5, 0x66, 0xde, 0xff, 0xbc, 0x7c, 0x0b, 0xa1, 0xda, 0xf1, 0xbd, 0x3b, 0x69, + 0xe1, 0x7c, 0x18, 0x0b, 0x67, 0x51, 0xd0, 0x35, 0x13, 0xd1, 0x5c, 0x8c, 0x4b, 0xba, 0xeb, 0x5b, + 0x8f, 0x9e, 0xd6, 0x17, 0x1e, 0x3f, 0xad, 0x2f, 0x3c, 0x79, 0x5a, 0x5f, 0xf8, 0x26, 0xac, 0x2b, + 0x8f, 0xc2, 0xba, 0xf2, 0x38, 0xac, 0x2b, 0x4f, 0xc2, 0xba, 0xf2, 0x47, 0x58, 0x57, 0xbe, 0xfb, + 0xb3, 0xbe, 0xf0, 0xd9, 0xe2, 0x68, 0xfb, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x54, 0x31, 0x16, + 0xcf, 0xa2, 0x10, 0x00, 0x00, } func (m *CronJob) Marshal() (dAtA []byte, err error) { @@ -588,13 +587,6 @@ func (m *CronJobSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.TimeZone != nil { - i -= len(*m.TimeZone) - copy(dAtA[i:], *m.TimeZone) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.TimeZone))) - i-- - dAtA[i] = 0x42 - } if m.FailedJobsHistoryLimit != nil { i = encodeVarintGenerated(dAtA, i, uint64(*m.FailedJobsHistoryLimit)) i-- @@ -1207,10 +1199,6 @@ func (m *CronJobSpec) Size() (n int) { if m.FailedJobsHistoryLimit != nil { n += 1 + sovGenerated(uint64(*m.FailedJobsHistoryLimit)) } - if m.TimeZone != nil { - l = len(*m.TimeZone) - n += 1 + l + sovGenerated(uint64(l)) - } return n } @@ -1445,7 +1433,6 @@ func (this *CronJobSpec) String() string { `JobTemplate:` + strings.Replace(strings.Replace(this.JobTemplate.String(), "JobTemplateSpec", "JobTemplateSpec", 1), `&`, ``, 1) + `,`, `SuccessfulJobsHistoryLimit:` + valueToStringGenerated(this.SuccessfulJobsHistoryLimit) + `,`, `FailedJobsHistoryLimit:` + valueToStringGenerated(this.FailedJobsHistoryLimit) + `,`, - `TimeZone:` + valueToStringGenerated(this.TimeZone) + `,`, `}`, }, "") return s @@ -2055,39 +2042,6 @@ func (m *CronJobSpec) Unmarshal(dAtA []byte) error { } } m.FailedJobsHistoryLimit = &v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeZone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.TimeZone = &s - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/cluster-autoscaler/vendor/k8s.io/api/batch/v1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/batch/v1/generated.proto index a57fef0b2f62..161886029b27 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/batch/v1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/batch/v1/generated.proto @@ -27,7 +27,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/batch/v1"; +option go_package = "v1"; // CronJob represents the configuration of a single cron job. message CronJob { @@ -63,12 +63,6 @@ message CronJobSpec { // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. optional string schedule = 1; - // The time zone for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. - // If not specified, this will rely on the time zone of the kube-controller-manager process. - // ALPHA: This field is in alpha and must be enabled via the `CronJobTimeZone` feature gate. - // +optional - optional string timeZone = 8; - // Optional deadline in seconds for starting the job if it misses scheduled // time for any reason. Missed jobs executions will be counted as failed ones. // +optional @@ -254,10 +248,9 @@ message JobSpec { // `$(job-name)-$(index)-$(random-string)`, // the Pod hostname takes the form `$(job-name)-$(index)`. // - // More completion modes can be added in the future. - // If the Job controller observes a mode that it doesn't recognize, which - // is possible during upgrades due to version skew, the controller - // skips updates for the Job. + // This field is beta-level. More completion modes can be added in the future. + // If the Job controller observes a mode that it doesn't recognize, the + // controller skips updates for the Job. // +optional optional string completionMode = 9; @@ -269,6 +262,9 @@ message JobSpec { // Suspending a Job will reset the StartTime field of the Job, effectively // resetting the ActiveDeadlineSeconds timer too. Defaults to false. // + // This field is beta-level, gated by SuspendJob feature flag (enabled by + // default). + // // +optional optional bool suspend = 10; } @@ -345,8 +341,8 @@ message JobStatus { // The number of pods which have a Ready condition. // - // This field is beta-level. The job controller populates the field when - // the feature gate JobReadyPods is enabled (enabled by default). + // This field is alpha-level. The job controller populates the field when + // the feature gate JobReadyPods is enabled (disabled by default). // +optional optional int32 ready = 9; } diff --git a/cluster-autoscaler/vendor/k8s.io/api/batch/v1/types.go b/cluster-autoscaler/vendor/k8s.io/api/batch/v1/types.go index 110f974b7885..aec1cad8e20c 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/batch/v1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/api/batch/v1/types.go @@ -17,7 +17,7 @@ limitations under the License. package v1 import ( - corev1 "k8s.io/api/core/v1" + "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" ) @@ -146,7 +146,7 @@ type JobSpec struct { // Describes the pod that will be created when executing a job. // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ - Template corev1.PodTemplateSpec `json:"template" protobuf:"bytes,6,opt,name=template"` + Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,6,opt,name=template"` // ttlSecondsAfterFinished limits the lifetime of a Job that has finished // execution (either Complete or Failed). If this field is set, @@ -176,10 +176,9 @@ type JobSpec struct { // `$(job-name)-$(index)-$(random-string)`, // the Pod hostname takes the form `$(job-name)-$(index)`. // - // More completion modes can be added in the future. - // If the Job controller observes a mode that it doesn't recognize, which - // is possible during upgrades due to version skew, the controller - // skips updates for the Job. + // This field is beta-level. More completion modes can be added in the future. + // If the Job controller observes a mode that it doesn't recognize, the + // controller skips updates for the Job. // +optional CompletionMode *CompletionMode `json:"completionMode,omitempty" protobuf:"bytes,9,opt,name=completionMode,casttype=CompletionMode"` @@ -191,6 +190,9 @@ type JobSpec struct { // Suspending a Job will reset the StartTime field of the Job, effectively // resetting the ActiveDeadlineSeconds timer too. Defaults to false. // + // This field is beta-level, gated by SuspendJob feature flag (enabled by + // default). + // // +optional Suspend *bool `json:"suspend,omitempty" protobuf:"varint,10,opt,name=suspend"` } @@ -267,8 +269,8 @@ type JobStatus struct { // The number of pods which have a Ready condition. // - // This field is beta-level. The job controller populates the field when - // the feature gate JobReadyPods is enabled (enabled by default). + // This field is alpha-level. The job controller populates the field when + // the feature gate JobReadyPods is enabled (disabled by default). // +optional Ready *int32 `json:"ready,omitempty" protobuf:"varint,9,opt,name=ready"` } @@ -287,9 +289,10 @@ type UncountedTerminatedPods struct { Failed []types.UID `json:"failed,omitempty" protobuf:"bytes,2,rep,name=failed,casttype=k8s.io/apimachinery/pkg/types.UID"` } +// +enum type JobConditionType string -// These are built-in conditions of a job. +// These are valid conditions of a job. const ( // JobSuspended means the job has been suspended. JobSuspended JobConditionType = "Suspended" @@ -304,7 +307,7 @@ type JobCondition struct { // Type of job condition, Complete or Failed. Type JobConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=JobConditionType"` // Status of the condition, one of True, False, Unknown. - Status corev1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"` + Status v1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"` // Last time the condition was checked. // +optional LastProbeTime metav1.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"` @@ -375,12 +378,6 @@ type CronJobSpec struct { // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. Schedule string `json:"schedule" protobuf:"bytes,1,opt,name=schedule"` - // The time zone for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. - // If not specified, this will rely on the time zone of the kube-controller-manager process. - // ALPHA: This field is in alpha and must be enabled via the `CronJobTimeZone` feature gate. - // +optional - TimeZone *string `json:"timeZone,omitempty" protobuf:"bytes,8,opt,name=timeZone"` - // Optional deadline in seconds for starting the job if it misses scheduled // time for any reason. Missed jobs executions will be counted as failed ones. // +optional @@ -437,7 +434,7 @@ type CronJobStatus struct { // A list of pointers to currently running jobs. // +optional // +listType=atomic - Active []corev1.ObjectReference `json:"active,omitempty" protobuf:"bytes,1,rep,name=active"` + Active []v1.ObjectReference `json:"active,omitempty" protobuf:"bytes,1,rep,name=active"` // Information when was the last time the job was successfully scheduled. // +optional diff --git a/cluster-autoscaler/vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go b/cluster-autoscaler/vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go index df24723a82fe..269021a9c04b 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go +++ b/cluster-autoscaler/vendor/k8s.io/api/batch/v1/types_swagger_doc_generated.go @@ -51,7 +51,6 @@ func (CronJobList) SwaggerDoc() map[string]string { var map_CronJobSpec = map[string]string{ "": "CronJobSpec describes how the job execution will look like and when it will actually run.", "schedule": "The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.", - "timeZone": "The time zone for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. If not specified, this will rely on the time zone of the kube-controller-manager process. ALPHA: This field is in alpha and must be enabled via the `CronJobTimeZone` feature gate.", "startingDeadlineSeconds": "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.", "concurrencyPolicy": "Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new one", "suspend": "This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.", @@ -120,8 +119,8 @@ var map_JobSpec = map[string]string{ "manualSelector": "manualSelector controls generation of pod labels and pod selectors. Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector", "template": "Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", "ttlSecondsAfterFinished": "ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes.", - "completionMode": "CompletionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`.\n\n`NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other.\n\n`Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. In addition, The Pod name takes the form `$(job-name)-$(index)-$(random-string)`, the Pod hostname takes the form `$(job-name)-$(index)`.\n\nMore completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, which is possible during upgrades due to version skew, the controller skips updates for the Job.", - "suspend": "Suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. Defaults to false.", + "completionMode": "CompletionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`.\n\n`NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other.\n\n`Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. In addition, The Pod name takes the form `$(job-name)-$(index)-$(random-string)`, the Pod hostname takes the form `$(job-name)-$(index)`.\n\nThis field is beta-level. More completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, the controller skips updates for the Job.", + "suspend": "Suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. Defaults to false.\n\nThis field is beta-level, gated by SuspendJob feature flag (enabled by default).", } func (JobSpec) SwaggerDoc() map[string]string { @@ -138,7 +137,7 @@ var map_JobStatus = map[string]string{ "failed": "The number of pods which reached phase Failed.", "completedIndexes": "CompletedIndexes holds the completed indexes when .spec.completionMode = \"Indexed\" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\".", "uncountedTerminatedPods": "UncountedTerminatedPods holds the UIDs of Pods that have terminated but the job controller hasn't yet accounted for in the status counters.\n\nThe job controller creates pods with a finalizer. When a pod terminates (succeeded or failed), the controller does three steps to account for it in the job status: (1) Add the pod UID to the arrays in this field. (2) Remove the pod finalizer. (3) Remove the pod UID from the arrays while increasing the corresponding\n counter.\n\nThis field is beta-level. The job controller only makes use of this field when the feature gate JobTrackingWithFinalizers is enabled (enabled by default). Old jobs might not be tracked using this field, in which case the field remains null.", - "ready": "The number of pods which have a Ready condition.\n\nThis field is beta-level. The job controller populates the field when the feature gate JobReadyPods is enabled (enabled by default).", + "ready": "The number of pods which have a Ready condition.\n\nThis field is alpha-level. The job controller populates the field when the feature gate JobReadyPods is enabled (disabled by default).", } func (JobStatus) SwaggerDoc() map[string]string { diff --git a/cluster-autoscaler/vendor/k8s.io/api/batch/v1/zz_generated.deepcopy.go b/cluster-autoscaler/vendor/k8s.io/api/batch/v1/zz_generated.deepcopy.go index 4bc195a9f527..a9806a502468 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/batch/v1/zz_generated.deepcopy.go +++ b/cluster-autoscaler/vendor/k8s.io/api/batch/v1/zz_generated.deepcopy.go @@ -92,11 +92,6 @@ func (in *CronJobList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CronJobSpec) DeepCopyInto(out *CronJobSpec) { *out = *in - if in.TimeZone != nil { - in, out := &in.TimeZone, &out.TimeZone - *out = new(string) - **out = **in - } if in.StartingDeadlineSeconds != nil { in, out := &in.StartingDeadlineSeconds, &out.StartingDeadlineSeconds *out = new(int64) diff --git a/cluster-autoscaler/vendor/k8s.io/api/batch/v1beta1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/batch/v1beta1/generated.pb.go index d042fc695122..93794f0578eb 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/batch/v1beta1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/batch/v1beta1/generated.pb.go @@ -227,58 +227,57 @@ func init() { } var fileDescriptor_e57b277b05179ae7 = []byte{ - // 814 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0x41, 0x6f, 0x1b, 0x45, - 0x14, 0xc7, 0xbd, 0x4e, 0x9c, 0xb8, 0xe3, 0x16, 0xd2, 0x01, 0xa5, 0x2b, 0x83, 0xd6, 0xc1, 0x55, - 0x85, 0x41, 0x30, 0x4b, 0x22, 0x84, 0x38, 0x55, 0xea, 0x16, 0x15, 0x08, 0x41, 0x45, 0xe3, 0x22, - 0xa4, 0xaa, 0x42, 0x9d, 0x1d, 0xbf, 0x38, 0xd3, 0x78, 0x77, 0x56, 0x3b, 0xb3, 0x91, 0x72, 0xe3, - 0xc2, 0x9d, 0xef, 0xc2, 0x9d, 0x73, 0x8e, 0xbd, 0xd1, 0xd3, 0x8a, 0x2c, 0xdf, 0x82, 0x13, 0x9a, - 0xf1, 0x7a, 0xed, 0x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0x8e, 0x08, 0x00, 0x00, + // 794 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x95, 0x41, 0x6f, 0x1b, 0x45, + 0x14, 0xc7, 0xbd, 0x4e, 0x1c, 0xbb, 0x63, 0x0a, 0xe9, 0x80, 0x52, 0xcb, 0xa0, 0xdd, 0xe0, 0xaa, + 0x22, 0x20, 0x3a, 0x4b, 0x22, 0x84, 0x38, 0x21, 0x75, 0x8b, 0x0a, 0x84, 0xa0, 0xa2, 0x71, 0x11, + 0x12, 0xaa, 0x50, 0x67, 0x67, 0x5f, 0x9c, 0x69, 0x76, 0x77, 0x56, 0x3b, 0xb3, 0x91, 0x72, 0xe3, + 0xc2, 0x9d, 0x2f, 0xc2, 0x89, 0x3b, 0xe7, 0x1c, 0x7b, 0xec, 0x69, 0x45, 0x96, 0x6f, 0xc1, 0x09, + 0xed, 0x78, 0xbd, 0x76, 0xed, 0x75, 0xd3, 0x5e, 0x72, 0xf3, 0xbc, 0xf9, 0xff, 0x7f, 0xf3, 0xf6, + 0xbd, 0x37, 0x63, 0x74, 0xff, 0xf4, 0x4b, 0x45, 0x84, 0x74, 0x4f, 0x33, 0x1f, 0xd2, 0x18, 0x34, + 0x28, 0xf7, 0x0c, 0xe2, 0x40, 0xa6, 0x6e, 0xb5, 0xc1, 0x12, 0xe1, 0xfa, 0x4c, 0xf3, 0x13, 0xf7, + 0x6c, 0xdf, 0x07, 0xcd, 0xf6, 0xdd, 0x09, 0xc4, 0x90, 0x32, 0x0d, 0x01, 0x49, 0x52, 0xa9, 0x25, + 0x1e, 0x4c, 0x95, 0x84, 0x25, 0x82, 0x18, 0x25, 0xa9, 0x94, 0xc3, 0x7b, 0x13, 0xa1, 0x4f, 0x32, + 0x9f, 0x70, 0x19, 0xb9, 0x13, 0x39, 0x91, 0xae, 0x31, 0xf8, 0xd9, 0xb1, 0x59, 0x99, 0x85, 0xf9, + 0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x5f, 0xbc, 0x77, 0x96, 0xf4, 0xd7, 0xf0, 0x39, 0x5f, 0xbd, 0xf4, 0x0f, 0xf0, 0x41, + 0xd3, 0xa7, 0x90, 0x57, 0x3c, 0xfc, 0xde, 0xbd, 0x8b, 0x4b, 0xbb, 0xf5, 0xfc, 0xd2, 0x6e, 0xbd, + 0xb8, 0xb4, 0x5b, 0xbf, 0x15, 0xb6, 0x75, 0x51, 0xd8, 0xd6, 0xf3, 0xc2, 0xb6, 0x5e, 0x14, 0xb6, + 0xf5, 0x4f, 0x61, 0x5b, 0x7f, 0xfc, 0x6b, 0xb7, 0x7e, 0xe9, 0x56, 0x05, 0xf9, 0x3f, 0x00, 0x00, + 0xff, 0xff, 0xe9, 0xe0, 0x40, 0x92, 0x53, 0x08, 0x00, 0x00, } func (m *CronJob) Marshal() (dAtA []byte, err error) { @@ -401,13 +400,6 @@ func (m *CronJobSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.TimeZone != nil { - i -= len(*m.TimeZone) - copy(dAtA[i:], *m.TimeZone) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.TimeZone))) - i-- - dAtA[i] = 0x42 - } if m.FailedJobsHistoryLimit != nil { i = encodeVarintGenerated(dAtA, i, uint64(*m.FailedJobsHistoryLimit)) i-- @@ -670,10 +662,6 @@ func (m *CronJobSpec) Size() (n int) { if m.FailedJobsHistoryLimit != nil { n += 1 + sovGenerated(uint64(*m.FailedJobsHistoryLimit)) } - if m.TimeZone != nil { - l = len(*m.TimeZone) - n += 1 + l + sovGenerated(uint64(l)) - } return n } @@ -772,7 +760,6 @@ func (this *CronJobSpec) String() string { `JobTemplate:` + strings.Replace(strings.Replace(this.JobTemplate.String(), "JobTemplateSpec", "JobTemplateSpec", 1), `&`, ``, 1) + `,`, `SuccessfulJobsHistoryLimit:` + valueToStringGenerated(this.SuccessfulJobsHistoryLimit) + `,`, `FailedJobsHistoryLimit:` + valueToStringGenerated(this.FailedJobsHistoryLimit) + `,`, - `TimeZone:` + valueToStringGenerated(this.TimeZone) + `,`, `}`, }, "") return s @@ -1297,39 +1284,6 @@ func (m *CronJobSpec) Unmarshal(dAtA []byte) error { } } m.FailedJobsHistoryLimit = &v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeZone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.TimeZone = &s - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/cluster-autoscaler/vendor/k8s.io/api/batch/v1beta1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/batch/v1beta1/generated.proto index c73b7a654033..b4f998c1a4fa 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/batch/v1beta1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/batch/v1beta1/generated.proto @@ -28,7 +28,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/batch/v1beta1"; +option go_package = "v1beta1"; // CronJob represents the configuration of a single cron job. message CronJob { @@ -64,12 +64,6 @@ message CronJobSpec { // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. optional string schedule = 1; - // The time zone for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. - // If not specified, this will rely on the time zone of the kube-controller-manager process. - // ALPHA: This field is in alpha and must be enabled via the `CronJobTimeZone` feature gate. - // +optional - optional string timeZone = 8; - // Optional deadline in seconds for starting the job if it misses scheduled // time for any reason. Missed jobs executions will be counted as failed ones. // +optional diff --git a/cluster-autoscaler/vendor/k8s.io/api/batch/v1beta1/types.go b/cluster-autoscaler/vendor/k8s.io/api/batch/v1beta1/types.go index 54a2d14318f1..cd9af7a9e7c1 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/batch/v1beta1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/api/batch/v1beta1/types.go @@ -104,12 +104,6 @@ type CronJobSpec struct { // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. Schedule string `json:"schedule" protobuf:"bytes,1,opt,name=schedule"` - // The time zone for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. - // If not specified, this will rely on the time zone of the kube-controller-manager process. - // ALPHA: This field is in alpha and must be enabled via the `CronJobTimeZone` feature gate. - // +optional - TimeZone *string `json:"timeZone,omitempty" protobuf:"bytes,8,opt,name=timeZone"` - // Optional deadline in seconds for starting the job if it misses scheduled // time for any reason. Missed jobs executions will be counted as failed ones. // +optional diff --git a/cluster-autoscaler/vendor/k8s.io/api/batch/v1beta1/types_swagger_doc_generated.go b/cluster-autoscaler/vendor/k8s.io/api/batch/v1beta1/types_swagger_doc_generated.go index 871948076318..9973898122ad 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/batch/v1beta1/types_swagger_doc_generated.go +++ b/cluster-autoscaler/vendor/k8s.io/api/batch/v1beta1/types_swagger_doc_generated.go @@ -51,7 +51,6 @@ func (CronJobList) SwaggerDoc() map[string]string { var map_CronJobSpec = map[string]string{ "": "CronJobSpec describes how the job execution will look like and when it will actually run.", "schedule": "The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.", - "timeZone": "The time zone for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. If not specified, this will rely on the time zone of the kube-controller-manager process. ALPHA: This field is in alpha and must be enabled via the `CronJobTimeZone` feature gate.", "startingDeadlineSeconds": "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.", "concurrencyPolicy": "Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new one", "suspend": "This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.", diff --git a/cluster-autoscaler/vendor/k8s.io/api/batch/v1beta1/zz_generated.deepcopy.go b/cluster-autoscaler/vendor/k8s.io/api/batch/v1beta1/zz_generated.deepcopy.go index c3a3494c4a0d..8c256848dc2d 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/batch/v1beta1/zz_generated.deepcopy.go +++ b/cluster-autoscaler/vendor/k8s.io/api/batch/v1beta1/zz_generated.deepcopy.go @@ -90,11 +90,6 @@ func (in *CronJobList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CronJobSpec) DeepCopyInto(out *CronJobSpec) { *out = *in - if in.TimeZone != nil { - in, out := &in.TimeZone, &out.TimeZone - *out = new(string) - **out = **in - } if in.StartingDeadlineSeconds != nil { in, out := &in.StartingDeadlineSeconds, &out.StartingDeadlineSeconds *out = new(int64) diff --git a/cluster-autoscaler/vendor/k8s.io/api/certificates/v1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/certificates/v1/generated.pb.go index 37859babcd58..3f06ac97a965 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/certificates/v1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/certificates/v1/generated.pb.go @@ -229,64 +229,64 @@ func init() { } var fileDescriptor_17e045d0de66f3c7 = []byte{ - // 910 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xdf, 0x6e, 0x1b, 0xc5, - 0x17, 0xf6,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 0x36, 0x88, 0x94, 0x41, 0xf8, 0x31, 0x48, - 0x7a, 0x59, 0x94, 0xbf, 0x2c, 0x8a, 0xe7, 0x89, 0x64, 0x31, 0x5c, 0x08, 0xf8, 0xec, 0x4d, 0x01, - 0x22, 0x3c, 0x86, 0x98, 0x2e, 0xc6, 0xb9, 0x7f, 0xae, 0xa0, 0x77, 0x77, 0x66, 0x5d, 0xd8, 0x67, - 0x51, 0xc2, 0x92, 0x88, 0xc0, 0x2f, 0x39, 0x08, 0x89, 0x1f, 0xa1, 0xa6, 0xca, 0xb0, 0x4f, 0x25, - 0xb5, 0xad, 0x9e, 0xb5, 0xd1, 0xde, 0xfa, 0xc4, 0x9b, 0xb5, 0xaf, 0x14, 0xf2, 0xb2, 0x41, 0xa4, - 0x0c, 0xc2, 0x53, 0x68, 0x6f, 0xb8, 0xe9, 0xfd, 0x70, 0xf4, 0x04, 0x42, 0xf9, 0x00, 0x24, 0x0d, - 0xf0, 0xc9, 0xd8, 0xa9, 0x4c, 0xc6, 0x0e, 0x9a, 0xd9, 0x48, 0xc9, 0x8a, 0x7f, 0x42, 0x35, 0x91, - 0x41, 0x68, 0xaf, 0x68, 0xf6, 0x2f, 0xbc, 0xe5, 0x97, 0xe3, 0x2d, 0x4d, 0x73, 0x3f, 0x83, 0x30, - 0x58, 0x33, 0x32, 0x35, 0x75, 0x22, 0x9a, 0x14, 0x87, 0xa8, 0x21, 0x24, 0x95, 0xb9, 0xb0, 0xab, - 0x9a, 0xfe, 0xcb, 0xab, 0xd1, 0x6b, 0x8a, 0x60, 0xdd, 0x08, 0x34, 0x8a, 0x33, 0x31, 0xd4, 0xee, - 0xab, 0x2a, 0x72, 0x97, 0xc6, 0xee, 0xa4, 0x49, 0x9f, 0x49, 0x96, 0x26, 0x78, 0x1b, 0xd5, 0xe4, - 0x28, 0x03, 0xdd, 0xc6, 0x56, 0xf0, 0xde, 0x34, 0xdb, 0x83, 0x51, 0x06, 0x67, 0x63, 0xe7, 0xff, - 0x8b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, 0x07, 0x30, - 0x2a, 0x5e, 0x1d, 0xa2, 0x3e, 0xf1, 0x57, 0xa8, 0x3e, 0xa4, 0x4f, 0x73, 0x30, 0x4f, 0xee, 0xed, - 0xd7, 0xa5, 0xa2, 0x89, 0x7e, 0x54, 0x68, 0x52, 0x04, 0xdd, 0x5d, 0xd9, 0xb6, 0xdc, 0x13, 0x0b, - 0x39, 0x6f, 0x78, 0x2d, 0x31, 0x47, 0x28, 0x9c, 0xbe, 0x40, 0xc2, 0xb6, 0x74, 0xd5, 0x5f, 0x5f, - 0xa9, 0xea, 0xf2, 0x21, 0x9b, 0x8d, 0x52, 0x69, 0x12, 0x64, 0x4e, 0x05, 0x6f, 0xa2, 0xf6, 0x1c, - 0xab, 0xae, 0x6f, 0x2d, 0xb8, 0x36, 0x19, 0x3b, 0xed, 0x39, 0x72, 0x32, 0x8f, 0x71, 0x3f, 0x37, - 0xcd, 0xd2, 0x35, 0x62, 0x67, 0xba, 0x64, 0x96, 0xbe, 0xc8, 0xd6, 0xe2, 0xa6, 0xdc, 0x6d, 0xfe, - 0xf6, 0xbb, 0x53, 0x79, 0xfe, 0x77, 0xaf, 0x12, 0x7c, 0x73, 0x72, 0xda, 0xad, 0xbc, 0x38, 0xed, - 0x56, 0x5e, 0x9e, 0x76, 0x2b, 0xcf, 0x27, 0x5d, 0xeb, 0x64, 0xd2, 0xb5, 0x5e, 0x4c, 0xba, 0xd6, - 0xcb, 0x49, 0xd7, 0xfa, 0x67, 0xd2, 0xb5, 0x7e, 0x7d, 0xd5, 0xad, 0x3c, 0xec, 0x2c, 0xff, 0x2f, - 0xf9, 0x37, 0x00, 0x00, 0xff, 0xff, 0xbc, 0x00, 0x0c, 0x1b, 0xcd, 0x08, 0x00, 0x00, + // 906 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0x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, 0x41, 0x78, 0x11, 0x48, 0x7a, 0x59, 0x94, + 0xb7, 0x2a, 0x8a, 0x67, 0xb1, 0x64, 0x11, 0x5c, 0x08, 0xf8, 0xe2, 0x4d, 0x01, 0x22, 0x38, 0x86, + 0x88, 0x2e, 0xc7, 0x75, 0xff, 0x5a, 0x43, 0xef, 0xef, 0xcc, 0xbb, 0xb0, 0xcf, 0xc2, 0x98, 0xc5, + 0x21, 0x81, 0x5f, 0x33, 0x10, 0x12, 0x3f, 0x42, 0x75, 0x95, 0xe1, 0x80, 0x4a, 0x6a, 0x5b, 0x1d, + 0xab, 0xd7, 0xdc, 0xfa, 0xcc, 0x9d, 0xb7, 0xaf, 0x10, 0x72, 0xd3, 0x61, 0xa8, 0x0c, 0xc2, 0x55, + 0x68, 0x77, 0xd4, 0x77, 0x7f, 0x3c, 0x7a, 0x02, 0x81, 0x7c, 0x00, 0x92, 0xfa, 0xf8, 0x64, 0xe2, + 0x94, 0xa6, 0x13, 0x07, 0xcd, 0x6d, 0xa4, 0x60, 0xc5, 0x3f, 0xa3, 0x8a, 0x48, 0x21, 0xb0, 0xd7, + 0x34, 0xfb, 0x57, 0xee, 0xea, 0xc7, 0x71, 0x57, 0xa6, 0xb9, 0x9f, 0x42, 0xe0, 0x6f, 0x18, 0x99, + 0x8a, 0xba, 0x11, 0x4d, 0x8a, 0x03, 0x54, 0x13, 0x92, 0xca, 0x4c, 0xd8, 0x65, 0x4d, 0xff, 0xf5, + 0xd5, 0xe8, 0x35, 0x85, 0xbf, 0x69, 0x04, 0x6a, 0xf9, 0x9d, 0x18, 0xea, 0xee, 0xab, 0x32, 0xea, + 0xae, 0x8c, 0xdd, 0x49, 0xe2, 0x01, 0x93, 0x2c, 0x89, 0xf1, 0x36, 0xaa, 0xc8, 0x71, 0x0a, 0xba, + 0x8d, 0x0d, 0xff, 0x83, 0x59, 0xb6, 0x07, 0xe3, 0x14, 0xce, 0x26, 0xce, 0xbb, 0xcb, 0x78, 0x65, + 0x27, 0x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, 0xe7, 0xbf, 0x0e, + 0x51, 0x47, 0xfc, 0x0d, 0xaa, 0x8e, 0xe8, 0xd3, 0x0c, 0xcc, 0x97, 0x7b, 0xfb, 0x75, 0xa9, 0x68, + 0xa2, 0x9f, 0x14, 0x9a, 0xe4, 0x41, 0x77, 0xd7, 0xb6, 0xad, 0xee, 0x89, 0x85, 0x9c, 0x37, 0xfc, + 0x96, 0x98, 0x23, 0x14, 0xcc, 0x7e, 0x20, 0x61, 0x5b, 0xba, 0xea, 0x6f, 0xaf, 0x54, 0x75, 0xf1, + 0x91, 0xcd, 0x47, 0xa9, 0x30, 0x09, 0xb2, 0xa0, 0x82, 0xfb, 0xa8, 0xb9, 0xc0, 0xaa, 0xeb, 0xdb, + 0xf0, 0xaf, 0x4d, 0x27, 0x4e, 0x73, 0x81, 0x9c, 0x2c, 0x62, 0xba, 0x5f, 0x9a, 0x66, 0xe9, 0x1a, + 0xb1, 0x33, 0x5b, 0x32, 0x4b, 0x3f, 0x64, 0x63, 0x79, 0x53, 0xee, 0xd6, 0x7f, 0xff, 0xc3, 0x29, + 0x3d, 0xff, 0xa7, 0x53, 0xf2, 0x7b, 0x27, 0xa7, 0xed, 0xd2, 0x8b, 0xd3, 0x76, 0xe9, 0xe5, 0x69, + 0xbb, 0xf4, 0x7c, 0xda, 0xb6, 0x4e, 0xa6, 0x6d, 0xeb, 0xc5, 0xb4, 0x6d, 0xbd, 0x9c, 0xb6, 0xad, + 0x7f, 0xa7, 0x6d, 0xeb, 0xb7, 0x57, 0xed, 0xd2, 0xc3, 0xb5, 0x51, 0xff, 0xbf, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x88, 0x08, 0x6d, 0x53, 0xb5, 0x08, 0x00, 0x00, } func (m *CertificateSigningRequest) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/certificates/v1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/certificates/v1/generated.proto index 968cc2564c1f..1db9e324ebba 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/certificates/v1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/certificates/v1/generated.proto @@ -27,7 +27,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/certificates/v1"; +option go_package = "v1"; // CertificateSigningRequest objects provide a mechanism to obtain x509 certificates // by submitting a certificate signing request, and having it asynchronously approved and issued. @@ -154,6 +154,8 @@ message CertificateSigningRequestSpec { // // The minimum valid value for expirationSeconds is 600, i.e. 10 minutes. // + // As of v1.22, this field is beta and is controlled via the CSRDuration feature gate. + // // +optional optional int32 expirationSeconds = 8; diff --git a/cluster-autoscaler/vendor/k8s.io/api/certificates/v1/types.go b/cluster-autoscaler/vendor/k8s.io/api/certificates/v1/types.go index 752c66973476..a3900e1dca4e 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/certificates/v1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/api/certificates/v1/types.go @@ -103,6 +103,8 @@ type CertificateSigningRequestSpec struct { // // The minimum valid value for expirationSeconds is 600, i.e. 10 minutes. // + // As of v1.22, this field is beta and is controlled via the CSRDuration feature gate. + // // +optional ExpirationSeconds *int32 `json:"expirationSeconds,omitempty" protobuf:"varint,8,opt,name=expirationSeconds"` @@ -212,6 +214,7 @@ type CertificateSigningRequestStatus struct { } // RequestConditionType is the type of a CertificateSigningRequestCondition +// +enum type RequestConditionType string // Well-known condition types for certificate requests. diff --git a/cluster-autoscaler/vendor/k8s.io/api/certificates/v1/types_swagger_doc_generated.go b/cluster-autoscaler/vendor/k8s.io/api/certificates/v1/types_swagger_doc_generated.go index 0dc8a4c69b31..2714584eda53 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/certificates/v1/types_swagger_doc_generated.go +++ b/cluster-autoscaler/vendor/k8s.io/api/certificates/v1/types_swagger_doc_generated.go @@ -64,7 +64,7 @@ var map_CertificateSigningRequestSpec = map[string]string{ "": "CertificateSigningRequestSpec contains the certificate request.", "request": "request contains an x509 certificate signing request encoded in a \"CERTIFICATE REQUEST\" PEM block. When serialized as JSON or YAML, the data is additionally base64-encoded.", "signerName": "signerName indicates the requested signer, and is a qualified name.\n\nList/watch requests for CertificateSigningRequests can filter on this field using a \"spec.signerName=NAME\" fieldSelector.\n\nWell-known Kubernetes signers are:\n 1. \"kubernetes.io/kube-apiserver-client\": issues client certificates that can be used to authenticate to kube-apiserver.\n Requests for this signer are never auto-approved by kube-controller-manager, can be issued by the \"csrsigning\" controller in kube-controller-manager.\n 2. \"kubernetes.io/kube-apiserver-client-kubelet\": issues client certificates that kubelets use to authenticate to kube-apiserver.\n Requests for this signer can be auto-approved by the \"csrapproving\" controller in kube-controller-manager, and can be issued by the \"csrsigning\" controller in kube-controller-manager.\n 3. \"kubernetes.io/kubelet-serving\" issues serving certificates that kubelets use to serve TLS endpoints, which kube-apiserver can connect to securely.\n Requests for this signer are never auto-approved by kube-controller-manager, and can be issued by the \"csrsigning\" controller in kube-controller-manager.\n\nMore details are available at https://k8s.io/docs/reference/access-authn-authz/certificate-signing-requests/#kubernetes-signers\n\nCustom signerNames can also be specified. The signer defines:\n 1. Trust distribution: how trust (CA bundles) are distributed.\n 2. Permitted subjects: and behavior when a disallowed subject is requested.\n 3. Required, permitted, or forbidden x509 extensions in the request (including whether subjectAltNames are allowed, which types, restrictions on allowed values) and behavior when a disallowed extension is requested.\n 4. Required, permitted, or forbidden key usages / extended key usages.\n 5. Expiration/certificate lifetime: whether it is fixed by the signer, configurable by the admin.\n 6. Whether or not requests for CA certificates are allowed.", - "expirationSeconds": "expirationSeconds is the requested duration of validity of the issued certificate. The certificate signer may issue a certificate with a different validity duration so a client must check the delta between the notBefore and and notAfter fields in the issued certificate to determine the actual duration.\n\nThe v1.22+ in-tree implementations of the well-known Kubernetes signers will honor this field as long as the requested duration is not greater than the maximum duration they will honor per the --cluster-signing-duration CLI flag to the Kubernetes controller manager.\n\nCertificate signers may not honor this field for various reasons:\n\n 1. Old signer that is unaware of the field (such as the in-tree\n implementations prior to v1.22)\n 2. Signer whose configured maximum is shorter than the requested duration\n 3. Signer whose configured minimum is longer than the requested duration\n\nThe minimum valid value for expirationSeconds is 600, i.e. 10 minutes.", + "expirationSeconds": "expirationSeconds is the requested duration of validity of the issued certificate. The certificate signer may issue a certificate with a different validity duration so a client must check the delta between the notBefore and and notAfter fields in the issued certificate to determine the actual duration.\n\nThe v1.22+ in-tree implementations of the well-known Kubernetes signers will honor this field as long as the requested duration is not greater than the maximum duration they will honor per the --cluster-signing-duration CLI flag to the Kubernetes controller manager.\n\nCertificate signers may not honor this field for various reasons:\n\n 1. Old signer that is unaware of the field (such as the in-tree\n implementations prior to v1.22)\n 2. Signer whose configured maximum is shorter than the requested duration\n 3. Signer whose configured minimum is longer than the requested duration\n\nThe minimum valid value for expirationSeconds is 600, i.e. 10 minutes.\n\nAs of v1.22, this field is beta and is controlled via the CSRDuration feature gate.", "usages": "usages specifies a set of key usages requested in the issued certificate.\n\nRequests for TLS client certificates typically request: \"digital signature\", \"key encipherment\", \"client auth\".\n\nRequests for TLS serving certificates typically request: \"key encipherment\", \"digital signature\", \"server auth\".\n\nValid values are:\n \"signing\", \"digital signature\", \"content commitment\",\n \"key encipherment\", \"key agreement\", \"data encipherment\",\n \"cert sign\", \"crl sign\", \"encipher only\", \"decipher only\", \"any\",\n \"server auth\", \"client auth\",\n \"code signing\", \"email protection\", \"s/mime\",\n \"ipsec end system\", \"ipsec tunnel\", \"ipsec user\",\n \"timestamping\", \"ocsp signing\", \"microsoft sgc\", \"netscape sgc\"", "username": "username contains the name of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", "uid": "uid contains the uid of the user that created the CertificateSigningRequest. Populated by the API server on creation and immutable.", diff --git a/cluster-autoscaler/vendor/k8s.io/api/certificates/v1beta1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/certificates/v1beta1/generated.pb.go index 352b9faa7a6a..d9a29764418d 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/certificates/v1beta1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/certificates/v1beta1/generated.pb.go @@ -229,65 +229,64 @@ func init() { } var fileDescriptor_09d156762b8218ef = []byte{ - // 915 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x5d, 0x6f, 0x1b, 0x45, - 0x17, 0xf6, 0xc6, 0x1f, 0xb1, 0xc7, 0x79, 0xd3, 0x76, 0xf4, 0x52, 0x2d, 0x96, 0xea, 0xb5, 0x2c, - 0x40, 0xe1, 0x6b, 0x96, 0x54, 0x15, 0x44, 0xb9, 0x40, 0xb0, 0x21, 0x82, 0x88, 0x14, 0xa4, 0x49, - 0xc2, 0x05, 0x42, 0xa2, 0xe3, 0xf5, 0xe9, 0x66, 0xea, 0xee, 0x07, 0x3b, 0xb3, 0xa6, 0xbe, 0xeb, - 0x4f, 0xe0, 0x92, 0x4b, 0xfe, 0x03, 0x7f, 0x22, 0x5c, 0x20, 0xf5, 0xb2, 0x17, 0xc8, 0x22, 0xee, - 0xbf, 0xc8, 0x15, 0x9a, 0xd9, 0xf1, 0xda, 0xb1, 0x13, 0x5c, 0xda, 0xbb, 0x9d, 0x67, 0xce, 0xf3, - 0x3c, 0x67, 0xce, 0x9c, 0x33, 0x36, 0xfa, 0x6a, 0xb0, 0x23, 0x08, 0x8f, 0xdd, 0x41, 0xd6, 0x83, - 0x34, 0x02, 0x09, 0xc2, 0x1d, 0x42, 0xd4, 0x8f, 0x53, 0xd7, 0x6c, 0xb0, 0x84, 0xbb, 0x3e, 0xa4, - 0x92, 0x3f, 0xe4, 0x3e, 0xd3, 0xdb, 0xdb, 0x3d, 0x90, 0x6c, 0xdb, 0x0d, 0x20, 0x82, 0x94, 0x49, - 0xe8, 0x93, 0x24, 0x8d, 0x65, 0x8c, 0x9d, 0x9c, 0x40, 0x58, 0xc2, 0xc9, 0x3c, 0x81, 0x18, 0x42, - 0xeb, 0xc3, 0x80, 0xcb, 0xd3, 0xac, 0x47, 0xfc, 0x38, 0x74, 0x83, 0x38, 0x88, 0x5d, 0xcd, 0xeb, - 0x65, 0x0f, 0xf5, 0x4a, 0x2f, 0xf4, 0x57, 0xae, 0xd7, 0xea, 0xce, 0x27, 0x10, 0xa7, 0xe0, 0x0e, - 0x97, 0x3c, 0x5b, 0xf7, 0x66, 0x31, 0x21, 0xf3, 0x4f, 0x79, 0x04, 0xe9, 0xc8, 0x4d, 0x06, 0x81, - 0x02, 0x84, 0x1b, 0x82, 0x64, 0x57, 0xb1, 0xdc, 0xeb, 0x58, 0x69, 0x16, 0x49, 0x1e, 0xc2, 0x12, - 0xe1, 0xe3, 0x55, 0x04, 0xe1, 0x9f, 0x42, 0xc8, 0x16, 0x79, 0xdd, 0x3f, 0xd6, 0xd0, 0x9b, 0x7b, - 0xb3, 0x52, 0x1c, 0xf1, 0x20, 0xe2, 0x51, 0x40, 0xe1, 0xa7, 0x0c, 0x84, 0xc4, 0x0f, 0x50, 0x5d, - 0x65, 0xd8, 0x67, 0x92, 0xd9, 0x56, 0xc7, 0xda, 0x6a, 0xde, 0xfd, 0x88, 0xcc, 0x6a, 0x58, 0x18, - 0x91, 0x64, 0x10, 0x28, 0x40, 0x10, 0x15, 0x4d, 0x86, 0xdb, 0xe4, 0xdb, 0xde, 0x23, 0xf0, 0xe5, - 0x7d, 0x90, 0xcc, 0xc3, 0x67, 0x63, 0xa7, 0x34, 0x19, 0x3b, 0x68, 0x86, 0xd1, 0x42, 0x15, 0x3f, - 0x40, 0x15, 0x91, 0x80, 0x6f, 0xaf, 0x69, 0xf5, 0x4f, 0xc9, 0x8a, 0x1b, 0x22, 0xd7, 0xe6, 0x7a, - 0x94, 0x80, 0xef, 0x6d, 0x18, 0xaf, 0x8a, 0x5a, 0x51, 0xad, 0x8c, 0x4f, 0x51, 0x4d, 0x48, 0x26, - 0x33, 0x61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f, 0x26, 0x6d, 0xeb, 0xf9, 0xa4, 0x6d, 0xfd, 0x3d, 0x69, 0x5b, 0xbf, 0xbc, 0x68, 0x97, - 0xbe, 0x77, 0x56, 0xfc, 0x77, 0xf9, 0x27, 0x00, 0x00, 0xff, 0xff, 0x7b, 0xe7, 0x9b, 0x78, 0xf6, - 0x08, 0x00, 0x00, + // 912 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xdd, 0x6e, 0x1b, 0x45, + 0x14, 0xf6, 0xc6, 0xff, 0xe3, 0x92, 0xb6, 0x23, 0xa8, 0x16, 0x4b, 0xf5, 0x5a, 0x16, 0xa0, 0xf0, + 0xd3, 0x59, 0x52, 0x55, 0x10, 0xe5, 0x02, 0xc1, 0x86, 0x08, 0x22, 0x52, 0x90, 0x26, 0x09, 0x17, + 0x08, 0x89, 0x8e, 0xd7, 0xa7, 0x9b, 0xa9, 0xbb, 0x3f, 0xec, 0xcc, 0x9a, 0xfa, 0xae, 0x8f, 0xc0, + 0x25, 0x97, 0xbc, 0x03, 0x2f, 0x11, 0x2e, 0x90, 0x7a, 0xd9, 0x0b, 0x64, 0x11, 0xf7, 0x2d, 0x72, + 0x85, 0x66, 0x76, 0xbc, 0x76, 0xec, 0x84, 0x94, 0xf6, 0xce, 0xf3, 0xcd, 0xf9, 0xbe, 0xef, 0x9c, + 0xb3, 0xe7, 0x8c, 0xd1, 0xd7, 0xc3, 0x2d, 0x41, 0x78, 0xec, 0x0e, 0xb3, 0x3e, 0xa4, 0x11, 0x48, + 0x10, 0xee, 0x08, 0xa2, 0x41, 0x9c, 0xba, 0xe6, 0x82, 0x25, 0xdc, 0xf5, 0x21, 0x95, 0xfc, 0x21, + 0xf7, 0x99, 0xbe, 0xde, 0xec, 0x83, 0x64, 0x9b, 0x6e, 0x00, 0x11, 0xa4, 0x4c, 0xc2, 0x80, 0x24, + 0x69, 0x2c, 0x63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ac, 0x93, 0x69, 0xc7, 0x7a, 0x36, + 0xed, 0x58, 0xcf, 0xa7, 0x1d, 0xeb, 0x9f, 0x69, 0xc7, 0xfa, 0xf5, 0x45, 0xa7, 0xf4, 0x43, 0xdd, + 0x54, 0xf7, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x95, 0x4b, 0xd3, 0xe2, 0xde, 0x08, 0x00, 0x00, } func (m *CertificateSigningRequest) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/certificates/v1beta1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/certificates/v1beta1/generated.proto index e246fba021c4..904e9520733c 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/certificates/v1beta1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/certificates/v1beta1/generated.proto @@ -27,7 +27,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/certificates/v1beta1"; +option go_package = "v1beta1"; // Describes a certificate signing request message CertificateSigningRequest { @@ -119,6 +119,8 @@ message CertificateSigningRequestSpec { // // The minimum valid value for expirationSeconds is 600, i.e. 10 minutes. // + // As of v1.22, this field is beta and is controlled via the CSRDuration feature gate. + // // +optional optional int32 expirationSeconds = 8; diff --git a/cluster-autoscaler/vendor/k8s.io/api/certificates/v1beta1/types.go b/cluster-autoscaler/vendor/k8s.io/api/certificates/v1beta1/types.go index 877312d97e3c..031ef77550ba 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/certificates/v1beta1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/api/certificates/v1beta1/types.go @@ -84,6 +84,8 @@ type CertificateSigningRequestSpec struct { // // The minimum valid value for expirationSeconds is 600, i.e. 10 minutes. // + // As of v1.22, this field is beta and is controlled via the CSRDuration feature gate. + // // +optional ExpirationSeconds *int32 `json:"expirationSeconds,omitempty" protobuf:"varint,8,opt,name=expirationSeconds"` diff --git a/cluster-autoscaler/vendor/k8s.io/api/certificates/v1beta1/types_swagger_doc_generated.go b/cluster-autoscaler/vendor/k8s.io/api/certificates/v1beta1/types_swagger_doc_generated.go index d3f318150cbe..816a618cb9e2 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/certificates/v1beta1/types_swagger_doc_generated.go +++ b/cluster-autoscaler/vendor/k8s.io/api/certificates/v1beta1/types_swagger_doc_generated.go @@ -54,7 +54,7 @@ var map_CertificateSigningRequestSpec = map[string]string{ "": "CertificateSigningRequestSpec contains the certificate request.", "request": "Base64-encoded PKCS#10 CSR data", "signerName": "Requested signer for the request. It is a qualified name in the form: `scope-hostname.io/name`. If empty, it will be defaulted:\n 1. If it's a kubelet client certificate, it is assigned\n \"kubernetes.io/kube-apiserver-client-kubelet\".\n 2. If it's a kubelet serving certificate, it is assigned\n \"kubernetes.io/kubelet-serving\".\n 3. Otherwise, it is assigned \"kubernetes.io/legacy-unknown\".\nDistribution of trust for signers happens out of band. You can select on this field using `spec.signerName`.", - "expirationSeconds": "expirationSeconds is the requested duration of validity of the issued certificate. The certificate signer may issue a certificate with a different validity duration so a client must check the delta between the notBefore and and notAfter fields in the issued certificate to determine the actual duration.\n\nThe v1.22+ in-tree implementations of the well-known Kubernetes signers will honor this field as long as the requested duration is not greater than the maximum duration they will honor per the --cluster-signing-duration CLI flag to the Kubernetes controller manager.\n\nCertificate signers may not honor this field for various reasons:\n\n 1. Old signer that is unaware of the field (such as the in-tree\n implementations prior to v1.22)\n 2. Signer whose configured maximum is shorter than the requested duration\n 3. Signer whose configured minimum is longer than the requested duration\n\nThe minimum valid value for expirationSeconds is 600, i.e. 10 minutes.", + "expirationSeconds": "expirationSeconds is the requested duration of validity of the issued certificate. The certificate signer may issue a certificate with a different validity duration so a client must check the delta between the notBefore and and notAfter fields in the issued certificate to determine the actual duration.\n\nThe v1.22+ in-tree implementations of the well-known Kubernetes signers will honor this field as long as the requested duration is not greater than the maximum duration they will honor per the --cluster-signing-duration CLI flag to the Kubernetes controller manager.\n\nCertificate signers may not honor this field for various reasons:\n\n 1. Old signer that is unaware of the field (such as the in-tree\n implementations prior to v1.22)\n 2. Signer whose configured maximum is shorter than the requested duration\n 3. Signer whose configured minimum is longer than the requested duration\n\nThe minimum valid value for expirationSeconds is 600, i.e. 10 minutes.\n\nAs of v1.22, this field is beta and is controlled via the CSRDuration feature gate.", "usages": "allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3\n https://tools.ietf.org/html/rfc5280#section-4.2.1.12\nValid values are:\n \"signing\",\n \"digital signature\",\n \"content commitment\",\n \"key encipherment\",\n \"key agreement\",\n \"data encipherment\",\n \"cert sign\",\n \"crl sign\",\n \"encipher only\",\n \"decipher only\",\n \"any\",\n \"server auth\",\n \"client auth\",\n \"code signing\",\n \"email protection\",\n \"s/mime\",\n \"ipsec end system\",\n \"ipsec tunnel\",\n \"ipsec user\",\n \"timestamping\",\n \"ocsp signing\",\n \"microsoft sgc\",\n \"netscape sgc\"", "username": "Information about the requesting user. See user.Info interface for details.", "uid": "UID information about the requesting user. See user.Info interface for details.", diff --git a/cluster-autoscaler/vendor/k8s.io/api/coordination/v1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/coordination/v1/generated.pb.go index de0610601358..d5ed0f27c5f5 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/coordination/v1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/coordination/v1/generated.pb.go @@ -139,41 +139,41 @@ func init() { } var fileDescriptor_929e1148ad9baca3 = []byte{ - // 539 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xcf, 0x6e, 0xd3, 0x4c, - 0x14, 0xc5, 0xe3, 0x36, 0x91, 0x9a, 0xc9, 0xd7, 0x7e, 0x91, 0x95, 0x85, 0x95, 0x85, 0x5d, 0x22, - 0x21, 0x75, 0xc3, 0x0c, 0xa9, 0x10, 0x42, 0xac, 0x8a, 0x41, 0x40, 0xa5, 0x54, 0x48, 0x6e, 0x57, - 0xa8, 0x0b, 0x26, 0xf6, 0xc5, 0x19, 0x52, 0x7b, 0xcc, 0xcc, 0x38, 0xa8, 0x3b, 0x1e, 0x81, 0x2d, - 0x8f, 0x01, 0x4f, 0x91, 0x65, 0x97, 0x5d, 0x59, 0xc4, 0xbc, 0x08, 0x9a, 0x49, 0xda, 0x84, 0xfc, - 0x51, 0x2b, 0x76, 0x9e, 0x7b, 0xef, 0xf9, 0xdd, 0x73, 0xcf, 0xc2, 0xe8, 0xe5, 0xf0, 0x99, 0xc4, - 0x8c, 0x93, 0x61, 0xde, 0x07, 0x91, 0x82, 0x02, 0x49, 0x46, 0x90, 0x46, 0x5c, 0x90, 0x59, 0x83, - 0x66, 0x8c, 0x84, 0x9c, 0x8b, 0x88, 0xa5, 0x54, 0x31, 0x9e, 0x92, 0x51, 0x97, 0xc4, 0x90, 0x82, - 0xa0, 0x0a, 0x22, 0x9c, 0x09, 0xae, 0xb8, 0xdd, 0x9e, 0xce, 0x62, 0x9a, 0x31, 0xbc, 0x38, 0x8b, - 0x47, 0xdd, 0xf6, 0xa3, 0x98, 0xa9, 0x41, 0xde, 0xc7, 0x21, 0x4f, 0x48, 0xcc, 0x63, 0x4e, 0x8c, - 0xa4, 0x9f, 0x7f, 0x34, 0x2f, 0xf3, 0x30, 0x5f, 0x53, 0x54, 0xfb, 0xc9, 0x7c, 0x6d, 0x42, 0xc3, - 0x01, 0x4b, 0x41, 0x5c, 0x92, 0x6c, 0x18, 0xeb, 0x82, 0x24, 0x09, 0x28, 0xba, 0xc6, 0x40, 0x9b, - 0x6c, 0x52, 0x89, 0x3c, 0x55, 0x2c, 0x81, 0x15, 0xc1, 0xd3, 0xbb, 0x04, 0x32, 0x1c, 0x40, 0x42, - 0x97, 0x75, 0x9d, 0x9f, 0x16, 0xaa, 0xf5, 0x80, 0x4a, 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be, 0x53, - 0x16, 0x5e, 0xab, 0xb7, 0xa6, 0x1f, 0xac, 0x55, 0xd9, 0x7d, 0xd4, 0xa0, 0xe1, 0xe7, 0x9c, 0x09, - 0x38, 0x63, 0x09, 0x38, 0xdb, 0x26, 0x40, 0x72, 0xbf, 0x00, 0x4f, 0x58, 0x28, 0xb8, 0x96, 0xf9, - 0xff, 0x97, 0x85, 0xd7, 0x78, 0x31, 0xe7, 0x04, 0x8b, 0x50, 0xfb, 0x1c, 0xd5, 0x05, 0xa4, 0xf0, - 0xc5, 0x6c, 0xa8, 0xfe, 0xdb, 0x86, 0xdd, 0xb2, 0xf0, 0xea, 0xc1, 0x0d, 0x25, 0x98, 0x03, 0xed, - 0x23, 0xd4, 0x34, 0x97, 0x9d, 0x09, 0x9a, 0x4a, 0xa6, 0x6f, 0x93, 0x4e, 0xcd, 0x64, 0xd1, 0x2a, - 0x0b, 0xaf, 0xd9, 0x5b, 0xea, 0x05, 0x2b, 0xd3, 0xfe, 0xd1, 0x78, 0xe2, 0x56, 0xae, 0x26, 0x6e, - 0xe5, 0x7a, 0xe2, 0x56, 0xbe, 0x96, 0xae, 0x35, 0x2e, 0x5d, 0xeb, 0xaa, 0x74, 0xad, 0xeb, 0xd2, - 0xb5, 0x7e, 0x95, 0xae, 0xf5, 0xed, 0xb7, 0x5b, 0x79, 0xdf, 0xde, 0xfc, 0x03, 0xf9, 0x13, 0x00, - 0x00, 0xff, 0xff, 0xef, 0xe4, 0x75, 0x3b, 0x76, 0x04, 0x00, 0x00, + // 535 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x90, 0xc1, 0x6e, 0xd3, 0x40, + 0x10, 0x86, 0xe3, 0x36, 0x91, 0x9a, 0x0d, 0x2d, 0x91, 0x95, 0x83, 0x95, 0x83, 0x5d, 0x22, 0x21, + 0xe5, 0xc2, 0x2e, 0xa9, 0x10, 0x42, 0x9c, 0xc0, 0x20, 0xa0, 0x52, 0x2a, 0x24, 0xb7, 0x27, 0xd4, + 0x03, 0x1b, 0x7b, 0x70, 0x96, 0xd4, 0x5e, 0xb3, 0xbb, 0x0e, 0xea, 0x8d, 0x47, 0xe0, 0xca, 0x63, + 0xc0, 0x53, 0xe4, 0xd8, 0x63, 0x4f, 0x16, 0x31, 0x2f, 0x82, 0x76, 0x93, 0x36, 0x21, 0x49, 0xd5, + 0x8a, 0xdb, 0xee, 0xcc, 0xfc, 0xdf, 0xfc, 0xf3, 0xa3, 0x57, 0xa3, 0x67, 0x12, 0x33, 0x4e, 0x46, + 0xf9, 0x00, 0x44, 0x0a, 0x0a, 0x24, 0x19, 0x43, 0x1a, 0x71, 0x41, 0xe6, 0x0d, 0x9a, 0x31, 0x12, + 0x72, 0x2e, 0x22, 0x96, 0x52, 0xc5, 0x78, 0x4a, 0xc6, 0x3d, 0x12, 0x43, 0x0a, 0x82, 0x2a, 0x88, + 0x70, 0x26, 0xb8, 0xe2, 0x76, 0x7b, 0x36, 0x8b, 0x69, 0xc6, 0xf0, 0xf2, 0x2c, 0x1e, 0xf7, 0xda, + 0x8f, 0x62, 0xa6, 0x86, 0xf9, 0x00, 0x87, 0x3c, 0x21, 0x31, 0x8f, 0x39, 0x31, 0x92, 0x41, 0xfe, + 0xc9, 0xfc, 0xcc, 0xc7, 0xbc, 0x66, 0xa8, 0xf6, 0x93, 0xc5, 0xda, 0x84, 0x86, 0x43, 0x96, 0x82, + 0x38, 0x27, 0xd9, 0x28, 0xd6, 0x05, 0x49, 0x12, 0x50, 0x74, 0x83, 0x81, 0x36, 0xb9, 0x49, 0x25, + 0xf2, 0x54, 0xb1, 0x04, 0xd6, 0x04, 0x4f, 0x6f, 0x13, 0xc8, 0x70, 0x08, 0x09, 0x5d, 0xd5, 0x75, + 0x7e, 0x59, 0xa8, 0xd6, 0x07, 0x2a, 0xc1, 0xfe, 0x88, 0x76, 0xb4, 0x9b, 0x88, 0x2a, 0xea, 0x58, +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, 0x03, 0xd4, 0xa0, 0xe1, 0x97, 0x9c, 0x09, 0x38, 0x61, 0x09, + 0x38, 0xdb, 0x26, 0x40, 0x72, 0xb7, 0x00, 0x8f, 0x58, 0x28, 0xb8, 0x96, 0xf9, 0xf7, 0xcb, 0xc2, + 0x6b, 0xbc, 0x5c, 0x70, 0x82, 0x65, 0xa8, 0x7d, 0x8a, 0xea, 0x02, 0x52, 0xf8, 0x6a, 0x36, 0x54, + 0xff, 0x6f, 0xc3, 0x6e, 0x59, 0x78, 0xf5, 0xe0, 0x8a, 0x12, 0x2c, 0x80, 0xf6, 0x0b, 0xd4, 0x34, + 0x97, 0x9d, 0x08, 0x9a, 0x4a, 0xa6, 0x6f, 0x93, 0x4e, 0xcd, 0x64, 0xd1, 0x2a, 0x0b, 0xaf, 0xd9, + 0x5f, 0xe9, 0x05, 0x6b, 0xd3, 0x7e, 0x77, 0x32, 0x75, 0x2b, 0x17, 0x53, 0xb7, 0x72, 0x39, 0x75, + 0x2b, 0xdf, 0x4a, 0xd7, 0x9a, 0x94, 0xae, 0x75, 0x51, 0xba, 0xd6, 0x65, 0xe9, 0x5a, 0xbf, 0x4b, + 0xd7, 0xfa, 0xfe, 0xc7, 0xad, 0x7c, 0xd8, 0x1a, 0xf7, 0xfe, 0x06, 0x00, 0x00, 0xff, 0xff, 0x41, + 0x5e, 0x94, 0x96, 0x5e, 0x04, 0x00, 0x00, } func (m *Lease) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/coordination/v1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/coordination/v1/generated.proto index b1efb737f0c4..4d887850db25 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/coordination/v1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/coordination/v1/generated.proto @@ -26,7 +26,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/coordination/v1"; +option go_package = "v1"; // Lease defines a lease concept. message Lease { diff --git a/cluster-autoscaler/vendor/k8s.io/api/coordination/v1beta1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/coordination/v1beta1/generated.pb.go index 7334290fbbd4..bcd00d44540a 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/coordination/v1beta1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/coordination/v1beta1/generated.pb.go @@ -139,41 +139,41 @@ func init() { } var fileDescriptor_daca6bcd2ff63a80 = []byte{ - // 543 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xc1, 0x6e, 0xd3, 0x4e, - 0x10, 0xc6, 0xe3, 0xb6, 0x91, 0x9a, 0xcd, 0xbf, 0xfd, 0x47, 0x56, 0x0e, 0x56, 0x0e, 0x76, 0x95, - 0x03, 0xaa, 0x90, 0xd8, 0x25, 0x15, 0x42, 0x88, 0x13, 0x58, 0x20, 0xb5, 0xc2, 0x15, 0x92, 0xdb, - 0x13, 0xea, 0x81, 0xb5, 0x3d, 0x38, 0x4b, 0x6a, 0xaf, 0xd9, 0x5d, 0x07, 0xf5, 0xc6, 0x23, 0x70, - 0xe5, 0x45, 0xe0, 0x15, 0x72, 0xec, 0xb1, 0x27, 0x8b, 0x98, 0x17, 0x41, 0xde, 0xb8, 0x4d, 0x48, - 0x8a, 0x12, 0x71, 0xf3, 0xce, 0xcc, 0xf7, 0x9b, 0x6f, 0xbe, 0x83, 0xd1, 0xf1, 0xe8, 0x99, 0xc4, - 0x8c, 0x93, 0x51, 0x1e, 0x80, 0x48, 0x41, 0x81, 0x24, 0x63, 0x48, 0x23, 0x2e, 0x48, 0xdd, 0xa0, - 0x19, 0x23, 0x21, 0xe7, 0x22, 0x62, 0x29, 0x55, 0x8c, 0xa7, 0x64, 0x3c, 0x08, 0x40, 0xd1, 0x01, - 0x89, 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0xf5, 0x64, 0x6a, - 0x37, 0xae, 0xa7, 0x76, 0xe3, 0x66, 0x6a, 0x37, 0xbe, 0x94, 0xb6, 0x31, 0x29, 0x6d, 0xe3, 0xba, - 0xb4, 0x8d, 0x9b, 0xd2, 0x36, 0x7e, 0x96, 0xb6, 0xf1, 0xf5, 0x97, 0xdd, 0x78, 0xe7, 0xac, 0xf9, - 0xa9, 0xfc, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xcc, 0x19, 0x0e, 0xd7, 0x8f, 0x04, 0x00, 0x00, + // 540 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x91, 0xc1, 0x6e, 0xd3, 0x40, + 0x10, 0x86, 0xe3, 0xb6, 0x11, 0xcd, 0x86, 0x96, 0xc8, 0xca, 0xc1, 0xca, 0xc1, 0xae, 0x72, 0x40, + 0x15, 0x52, 0x77, 0x49, 0x85, 0x10, 0xe2, 0x04, 0x16, 0x87, 0x56, 0xb8, 0x42, 0x72, 0x7b, 0x42, + 0x3d, 0xb0, 0xb6, 0x07, 0x67, 0x49, 0xed, 0x35, 0xbb, 0xeb, 0xa0, 0xde, 0x78, 0x04, 0xae, 0xbc, + 0x08, 0xbc, 0x42, 0x8e, 0x3d, 0xf6, 0x64, 0x11, 0xf3, 0x22, 0xc8, 0x1b, 0xb7, 0x09, 0x49, 0x51, + 0x23, 0x6e, 0xde, 0x99, 0xf9, 0xbf, 0xf9, 0xe7, 0x37, 0x3a, 0x1a, 0xbd, 0x90, 0x98, 0x71, 0x32, + 0xca, 0x03, 0x10, 0x29, 0x28, 0x90, 0x64, 0x0c, 0x69, 0xc4, 0x05, 0xa9, 0x1b, 0x34, 0x63, 0x24, + 0xe4, 0x5c, 0x44, 0x2c, 0xa5, 0x8a, 0xf1, 0x94, 0x8c, 0x07, 0x01, 0x28, 0x3a, 0x20, 0x31, 0xa4, + 0x20, 0xa8, 0x82, 0x08, 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0x1b, 0xd7, 0x53, 0xbb, 0xf1, 0xb5, 0xb4, 0x8d, 0x49, 0x69, 0x1b, 0x57, 0xa5, 0x6d, 0x5c, + 0x97, 0xb6, 0xf1, 0xab, 0xb4, 0x8d, 0x6f, 0xbf, 0xed, 0xc6, 0xfb, 0x07, 0xf5, 0x6f, 0xfe, 0x13, + 0x00, 0x00, 0xff, 0xff, 0x51, 0x34, 0x6a, 0x0f, 0x77, 0x04, 0x00, 0x00, } func (m *Lease) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/coordination/v1beta1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/coordination/v1beta1/generated.proto index 85faa3b09b44..10b485e30526 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/coordination/v1beta1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/coordination/v1beta1/generated.proto @@ -26,7 +26,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/coordination/v1beta1"; +option go_package = "v1beta1"; // Lease defines a lease concept. message Lease { diff --git a/cluster-autoscaler/vendor/k8s.io/api/core/v1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/core/v1/generated.pb.go index 3f8aaf1006b7..0418699e6334 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/core/v1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/core/v1/generated.pb.go @@ -6175,899 +6175,897 @@ func init() { } var fileDescriptor_83c10c24ec417dc9 = []byte{ - // 14260 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x69, 0x70, 0x24, 0xd7, - 0x79, 0x98, 0x7a, 0x06, 0xd7, 0x7c, 0xb8, 0xdf, 0x1e, 0xc4, 0x82, 0xdc, 0xc5, 0xb2, 0x29, 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5e, 0x33, 0x6e, 0xb8, 0xd2, 0x7f, 0xc3, 0xf4, 0x4c, 0x3e, 0xb3, - 0x94, 0x47, 0x09, 0xe7, 0x37, 0x32, 0xbb, 0x04, 0xa7, 0x32, 0x57, 0x0b, 0x9a, 0x82, 0xf2, 0x2e, - 0xe1, 0x5c, 0x50, 0x05, 0xd3, 0x9f, 0xe8, 0x24, 0x0c, 0xee, 0x39, 0xad, 0xae, 0xd8, 0x28, 0x98, - 0xff, 0x79, 0xb9, 0xf4, 0x92, 0x65, 0xff, 0x9b, 0x32, 0x4c, 0x2e, 0xd5, 0x57, 0x1f, 0x68, 0x17, - 0xea, 0xd7, 0x50, 0xa9, 0xf0, 0x1a, 0x8a, 0x2f, 0xb5, 0x72, 0xee, 0xa5, 0xf6, 0x17, 0x33, 0xb6, - 0xd0, 0x00, 0xdb, 0x42, 0xdf, 0x96, 0xb3, 0x85, 0x8e, 0x78, 0xe3, 0xec, 0xe5, 0xac, 0xa2, 0x41, - 0x36, 0x99, 0x99, 0x1c, 0xcb, 0x75, 0xbf, 0xe1, 0xb4, 0x92, 0x47, 0xdf, 0x21, 0x97, 0xd2, 0xd1, - 0xcc, 0x63, 0x03, 0xc6, 0x96, 0x9c, 0x8e, 0xb3, 0xe9, 0xb6, 0xdc, 0xc8, 0x25, 0x21, 0x7a, 0x12, - 0xca, 0x4e, 0xb3, 0xc9, 0xb8, 0xad, 0xca, 0xe2, 0xa9, 0x7b, 0x07, 0x73, 0xe5, 0x85, 0x26, 0xbd, - 0xf6, 0x41, 0x61, 0xed, 0x63, 0x8a, 0x81, 0xde, 0x0f, 0x03, 0xcd, 0xc0, 0xef, 0xcc, 0x94, 0x18, - 0x26, 0xdd, 0x75, 0x03, 0xd5, 0xc0, 0xef, 0x24, 0x50, 0x19, 0x8e, 0xfd, 0xab, 0x25, 0x78, 0x6c, - 0x89, 0x74, 0x76, 0x56, 0xea, 0x39, 0xe7, 0xf7, 0x45, 0x18, 0x69, 0xfb, 0x9e, 0x1b, 0xf9, 0x41, - 0x28, 0x9a, 0x66, 0x2b, 0x62, 0x4d, 0x94, 0x61, 0x05, 0x45, 0xe7, 0x61, 0xa0, 0x13, 0x33, 0x95, - 0x63, 0x92, 0x21, 0x65, 0xec, 0x24, 0x83, 0x50, 0x8c, 0x6e, 0x48, 0x02, 0xb1, 0x62, 0x14, 0xc6, - 0xcd, 0x90, 0x04, 0x98, 0x41, 0xe2, 0x9b, 0x99, 0xde, 0xd9, 0xe2, 0x84, 0x4e, 0xdc, 0xcc, 0x14, - 0x82, 0x35, 0x2c, 0x54, 0x83, 0x4a, 0x98, 0x98, 0xd9, 0xbe, 0xb6, 0xe9, 0x38, 0xbb, 0xba, 0xd5, - 0x4c, 0xc6, 0x44, 0x8c, 0x1b, 0x65, 0xa8, 0xe7, 0xd5, 0xfd, 0xd5, 0x12, 0x20, 0x3e, 0x84, 0xdf, - 0x64, 0x03, 0x77, 0x33, 0x3d, 0x70, 0xfd, 0x6f, 0x89, 0xa3, 0x1a, 0xbd, 0xff, 0x65, 0xc1, 0x63, - 0x4b, 0xae, 0xd7, 0x24, 0x41, 0xce, 0x02, 0x7c, 0x38, 0x6f, 0xd9, 0xc3, 0x31, 0x0d, 0xc6, 0x12, - 0x1b, 0x38, 0x82, 0x25, 0x66, 0xff, 0xb1, 0x05, 0x88, 0x7f, 0xf6, 0x3b, 0xee, 0x63, 0x6f, 0xa6, - 0x3f, 0xf6, 0x08, 0x96, 0x85, 0x7d, 0x1d, 0x26, 0x96, 0x5a, 0x2e, 0xf1, 0xa2, 0xd5, 0xda, 0x92, - 0xef, 0x6d, 0xb9, 0xdb, 0xe8, 0x65, 0x98, 0x88, 0xdc, 0x36, 0xf1, 0xbb, 0x51, 0x9d, 0x34, 0x7c, - 0x8f, 0xbd, 0x24, 0xad, 0x8b, 0x83, 0x8b, 0xe8, 0xde, 0xc1, 0xdc, 0xc4, 0x86, 0x01, 0xc1, 0x09, - 0x4c, 0xfb, 0x77, 0xe9, 0xf8, 0xf9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 0x0c, 0xf1, 0x43, 0x5c, 0x88, 0x92, 0x33, 0xcf, 0x6c, - 0x36, 0x88, 0xe2, 0x6a, 0x8a, 0x25, 0xdd, 0xfc, 0x92, 0x10, 0xd5, 0xd1, 0x67, 0x60, 0x62, 0xcb, - 0x0d, 0xc2, 0x68, 0xc3, 0x6d, 0x93, 0x30, 0x72, 0xda, 0x9d, 0x07, 0x90, 0x1e, 0xab, 0x71, 0x58, - 0x31, 0x28, 0xe1, 0x04, 0x65, 0xb4, 0x0d, 0xe3, 0x2d, 0x47, 0x6f, 0x6a, 0xf8, 0xd0, 0x4d, 0xa9, - 0xdb, 0xe1, 0xba, 0x4e, 0x08, 0x9b, 0x74, 0xe9, 0x76, 0x6a, 0x30, 0x01, 0xe8, 0x08, 0x13, 0x0b, - 0xa8, 0xed, 0xc4, 0x25, 0x9f, 0x1c, 0x46, 0x19, 0x1d, 0x66, 0x20, 0x5b, 0x31, 0x19, 0x1d, 0xcd, - 0x0c, 0xf6, 0xd3, 0x50, 0x21, 0x74, 0x08, 0x29, 0x61, 0x71, 0xc1, 0x5c, 0xea, 0xaf, 0xaf, 0x6b, - 0x6e, 0x23, 0xf0, 0x4d, 0xb9, 0xfd, 0xb2, 0xa4, 0x84, 0x63, 0xa2, 0x68, 0x09, 0x86, 0x42, 0x12, - 0xb8, 0x24, 0x14, 0x57, 0x4d, 0xc1, 0x34, 0x32, 0x34, 0xee, 0x5b, 0xc2, 0x7f, 0x63, 0x51, 0x95, - 0x2e, 0x2f, 0x87, 0x89, 0x34, 0xd9, 0x65, 0xa0, 0x2d, 0xaf, 0x05, 0x56, 0x8a, 0x05, 0x14, 0xbd, - 0x06, 0xc3, 0x01, 0x69, 0x31, 0xc5, 0xd0, 0x78, 0xff, 0x8b, 0x9c, 0xeb, 0x99, 0x78, 0x3d, 0x2c, - 0x09, 0xa0, 0x6b, 0x80, 0x02, 0x42, 0x19, 0x25, 0xd7, 0xdb, 0x56, 0x66, 0xa3, 0xe2, 0xa0, 0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0x82, 0x58, 0x65, - 0x80, 0x5e, 0x87, 0x4a, 0xc7, 0x67, 0xb6, 0x88, 0x81, 0x34, 0xf0, 0x7d, 0x6f, 0xa1, 0xce, 0x81, - 0x47, 0x24, 0x0a, 0xf8, 0x28, 0xd4, 0x64, 0x55, 0x1c, 0x53, 0x41, 0xd7, 0x60, 0xb8, 0x13, 0x90, - 0x7a, 0xc4, 0xc2, 0x73, 0xf4, 0x4f, 0x90, 0xaf, 0x1a, 0x5e, 0x11, 0x4b, 0x0a, 0xf6, 0x7f, 0xb3, - 0x60, 0x2a, 0x89, 0x8a, 0x3e, 0x0c, 0x03, 0xe4, 0x2e, 0x69, 0x88, 0xfe, 0x66, 0x5e, 0xb2, 0xb1, - 0xd0, 0x81, 0x0f, 0x00, 0xfd, 0x8f, 0x59, 0x2d, 0x74, 0x15, 0x86, 0xe9, 0x0d, 0x7b, 0x45, 0x85, - 0x86, 0x7a, 0x3c, 0xef, 0x96, 0x56, 0xac, 0x0a, 0xef, 0x9c, 0x28, 0xc2, 0xb2, 0x3a, 0xb3, 0x94, - 0x6a, 0x74, 0xea, 0xf4, 0xf1, 0x12, 0x15, 0xbd, 0xb1, 0x37, 0x96, 0x6a, 0x1c, 0x49, 0x50, 0xe3, - 0x96, 0x52, 0xb2, 0x10, 0xc7, 0x44, 0xec, 0x9f, 0xb3, 0x00, 0xb8, 0x61, 0x98, 0xe3, 0x6d, 0x93, - 0x63, 0x90, 0x93, 0x57, 0x61, 0x20, 0xec, 0x90, 0x46, 0x91, 0x99, 0x6c, 0xdc, 0x9f, 0x7a, 0x87, - 0x34, 0xe2, 0x15, 0x47, 0xff, 0x61, 0x56, 0xdb, 0xfe, 0x5e, 0x80, 0x89, 0x18, 0x6d, 0x35, 0x22, - 0x6d, 0xf4, 0xac, 0x11, 0xa6, 0xe0, 0x4c, 0x22, 0x4c, 0x41, 0x85, 0x61, 0x6b, 0x22, 0xd9, 0xcf, - 0x40, 0xb9, 0xed, 0xdc, 0x15, 0x32,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, 0xfd, 0x79, 0x0b, 0x26, 0xd7, 0x13, 0x91, 0xc9, 0x2e, 0x30, 0xfd, 0x6b, 0x86, 0x10, 0xbf, - 0xce, 0x4a, 0xb1, 0x80, 0x1e, 0xb9, 0x90, 0xeb, 0xcf, 0x2d, 0x88, 0x63, 0x5f, 0x1c, 0x03, 0xfb, - 0xb6, 0x64, 0xb0, 0x6f, 0x99, 0x8c, 0xac, 0xea, 0x4e, 0x1e, 0xf7, 0x86, 0xae, 0xa9, 0xa8, 0x50, - 0x05, 0x3c, 0x6c, 0x4c, 0x86, 0x2f, 0xc5, 0x09, 0x33, 0x74, 0x94, 0x8c, 0x13, 0x65, 0xff, 0x76, - 0x09, 0x90, 0xc2, 0xed, 0x3b, 0x6a, 0x55, 0xba, 0xc6, 0xd1, 0x44, 0xad, 0xda, 0x03, 0xc4, 0x2c, - 0x08, 0x02, 0xc7, 0x0b, 0x39, 0x59, 0x57, 0x88, 0xf5, 0x0e, 0x67, 0x9e, 0x30, 0x2b, 0x9a, 0x44, - 0xd7, 0x53, 0xd4, 0x70, 0x46, 0x0b, 0x9a, 0x65, 0xc8, 0x60, 0xbf, 0x96, 0x21, 0x43, 0x3d, 0xfc, - 0xe0, 0x7e, 0xd6, 0x82, 0x71, 0x35, 0x4c, 0xef, 0x10, 0x2b, 0x75, 0xd5, 0x9f, 0x9c, 0x03, 0xb4, - 0xa6, 0x75, 0x99, 0x5d, 0x2c, 0xdf, 0xce, 0xfc, 0x19, 0x9d, 0x96, 0xfb, 0x16, 0x51, 0x31, 0x03, - 0xe7, 0x84, 0x7f, 0xa2, 0x28, 0xbd, 0x7f, 0x30, 0x37, 0xae, 0xfe, 0xf1, 0x18, 0xc5, 0x71, 0x15, - 0x7a, 0x24, 0x4f, 0x26, 0x96, 0x22, 0x7a, 0x11, 0x06, 0x3b, 0x3b, 0x4e, 0x48, 0x12, 0xde, 0x3c, - 0x83, 0x35, 0x5a, 0x78, 0xff, 0x60, 0x6e, 0x42, 0x55, 0x60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48, 0xce, 0x90, 0x3d, 0xd4, 0x67, 0xf8, 0x6f, 0x59, 0x70, 0xb6, 0x30, 0x2c, 0xcc, - 0x37, 0x21, 0x83, 0x68, 0x7f, 0xce, 0x82, 0xec, 0xc9, 0x36, 0xcc, 0xca, 0x2e, 0x41, 0xa5, 0x41, - 0x0b, 0x35, 0x3f, 0xe0, 0x38, 0x40, 0x82, 0x04, 0xe0, 0x18, 0xc7, 0xb0, 0x1e, 0x2b, 0xf5, 0xb4, - 0x1e, 0xfb, 0x15, 0x0b, 0x52, 0x87, 0xfc, 0x31, 0x70, 0x1b, 0xab, 0x26, 0xb7, 0xf1, 0xde, 0x7e, - 0x46, 0x33, 0x87, 0xd1, 0xf8, 0xe3, 0x49, 0x38, 0x9d, 0xe3, 0x96, 0xb7, 0x07, 0xd3, 0xdb, 0x0d, - 0x62, 0x7a, 0x58, 0x17, 0x45, 0x1e, 0x2a, 0x74, 0xc7, 0x66, 0xc9, 0x61, 0xa7, 0x53, 0x28, 0x38, - 0xdd, 0x04, 0xfa, 0x9c, 0x05, 0x27, 0x9d, 0x3b, 0xe1, 0x32, 0xe5, 0x1a, 0xdd, 0xc6, 0x62, 0xcb, - 0x6f, 0xec, 0xd2, 0x2b, 0x59, 0x6e, 0x84, 0x17, 0x32, 0x25, 0x79, 0xb7, 0xeb, 0x29, 0x7c, 0xa3, - 0x79, 0x96, 0x2d, 0x37, 0x0b, 0x0b, 0x67, 0xb6, 0x85, 0xb0, 0x48, 0xa1, 0x40, 0xdf, 0xa4, 0x05, - 0x31, 0x00, 0xb2, 0xfc, 0x27, 0x39, 0x1b, 0x24, 0x21, 0x58, 0xd1, 0x41, 0x9f, 0x86, 0xca, 0xb6, - 0x74, 0xf7, 0xcd, 0x60, 0xb3, 0xe2, 0x81, 0x2c, 0x76, 0x82, 0xe6, 0xea, 0x78, 0x85, 0x84, 0x63, - 0xa2, 0xe8, 0x55, 0x28, 0x7b, 0x5b, 0x61, 0x51, 0xc2, 0xd9, 0x84, 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0x89, 0x6c, 0x22, 0xe8, 0x53, 0x30, 0x11, 0x92, 0xeb, - 0xae, 0xd7, 0xbd, 0x2b, 0x45, 0x18, 0x05, 0x2e, 0x7c, 0xf5, 0x65, 0x1d, 0x93, 0x0b, 0x42, 0xcd, - 0x32, 0x9c, 0xa0, 0x86, 0xda, 0x30, 0x71, 0xc7, 0xf5, 0x9a, 0xfe, 0x9d, 0x50, 0xd2, 0x1f, 0xc9, - 0x97, 0x87, 0xde, 0xe6, 0x98, 0x89, 0x3e, 0x1a, 0xcd, 0xdd, 0x36, 0x88, 0xe1, 0x04, 0x71, 0xba, - 0x6a, 0x83, 0xae, 0xb7, 0x10, 0xde, 0x0c, 0x49, 0x20, 0x72, 0x95, 0xb3, 0x55, 0x8b, 0x65, 0x21, - 0x8e, 0xe1, 0x74, 0xd5, 0xb2, 0x3f, 0x57, 0x02, 0xbf, 0xcb, 0x53, 0x57, 0x88, 0x55, 0x8b, 0x55, - 0x29, 0xd6, 0x30, 0xe8, 0xae, 0x66, 0xff, 0xd6, 0x7d, 0x0f, 0xfb, 0x7e, 0x24, 0xcf, 0x01, 0xa6, - 0xd3, 0xd7, 0xca, 0xb1, 0x81, 0x85, 0x56, 0x00, 0x85, 0xdd, 0x4e, 0xa7, 0xc5, 0x6c, 0x83, 0x9c, - 0x16, 0x23, 0xc5, 0xed, 0x25, 0xca, 0x3c, 0xf4, 0x6e, 0x3d, 0x05, 0xc5, 0x19, 0x35, 0xe8, 0x01, - 0xbf, 0x25, 0xba, 0x3a, 0xc8, 0xba, 0xca, 0x75, 0x27, 0x75, 0xde, 0x4f, 0x09, 0x43, 0xcb, 0x30, - 0x1c, 0xee, 0x87, 0x8d, 0x48, 0x44, 0x4a, 0xcc, 0x49, 0x18, 0x55, 0x67, 0x28, 0x5a, 0xbe, 0x42, - 0x5e, 0x05, 0xcb, 0xba, 0xa8, 0x01, 0x27, 0x04, 0xc5, 0xa5, 0x1d, 0xc7, 0x53, 0xe9, 0x77, 0xb8, - 0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1b, 0x30, 0xd5, 0x09, 0x08, 0x69, - 0x33, 0x46, 0x5f, 0xdc, 0x67, 0x73, 0x3c, 0xea, 0x02, 0xed, 0x49, 0x2d, 0x01, 0xbb, 0x9f, 0x51, - 0x86, 0x53, 0x14, 0xd0, 0x1d, 0x18, 0xf1, 0xf7, 0x48, 0xb0, 0x43, 0x9c, 0xe6, 0xcc, 0xf9, 0x02, - 0x3f, 0x08, 0x71, 0xb9, 0xdd, 0x10, 0xb8, 0x09, 0x93, 0x01, 0x59, 0xdc, 0xdb, 0x64, 0x40, 0x36, - 0x86, 0x7e, 0xc4, 0x82, 0x33, 0x52, 0xcb, 0x50, 0xef, 0xd0, 0x51, 0x5f, 0xf2, 0xbd, 0x30, 0x0a, - 0x78, 0x9c, 0x80, 0xc7, 0xf3, 0x7d, 0xe7, 0x37, 0x72, 0x2a, 0x29, 0x89, 0xea, 0x99, 0x3c, 0x8c, - 0x10, 0xe7, 0xb7, 0x88, 0x96, 0x60, 0x3a, 0x24, 0x91, 0x3c, 0x8c, 0x16, 0xc2, 0x95, 0xd7, 0xab, - 0xeb, 0x33, 0x4f, 0xf0, 0x20, 0x07, 0x74, 0x33, 0xd4, 0x93, 0x40, 0x9c, 0xc6, 0x47, 0x97, 0xa1, - 0xe4, 0x87, 0x33, 0xef, 0x2d, 0xc8, 0x51, 0x4a, 0x9f, 0xe2, 0xdc, 0x74, 0xec, 0x46, 0x1d, 0x97, - 0xfc, 0x70, 0xf6, 0xdb, 0x61, 0x3a, 0xc5, 0x31, 0x1c, 0x26, 0xb7, 0xcf, 0xec, 0x2e, 0x8c, 0x1b, - 0xb3, 0xf2, 0x50, 0xb5, 0xd4, 0xff, 0x76, 0x18, 0x2a, 0x4a, 0x83, 0x89, 0x2e, 0x99, 0x8a, 0xe9, - 0x33, 0x49, 0xc5, 0xf4, 0x48, 0xcd, 0x6f, 0x1a, 0xba, 0xe8, 0x8d, 0x8c, 0x68, 0x70, 0x79, 0x67, - 0x40, 0xff, 0x06, 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xba, 0xb6, 0x99, - 0x5a, 0x93, 0x41, 0xe8, 0x33, 0x6a, 0x5b, 0x69, 0x08, 0xb5, 0x67, 0x14, 0xd7, 0x11, 0x72, 0x18, - 0xed, 0x5c, 0x44, 0x3c, 0xc7, 0x8b, 0xc4, 0x63, 0x2b, 0x8e, 0x39, 0xc8, 0x4a, 0xb1, 0x80, 0xda, - 0x5f, 0x28, 0xc3, 0x99, 0x5c, 0xdf, 0x39, 0xda, 0xf5, 0xb6, 0xef, 0xb9, 0x91, 0xaf, 0xac, 0x89, - 0x78, 0x9c, 0x41, 0xd2, 0xd9, 0x59, 0x13, 0xe5, 0x58, 0x61, 0xa0, 0x0b, 0x30, 0xc8, 0x84, 0xa2, - 0xa9, 0x24, 0xac, 0x8b, 0x55, 0x1e, 0x78, 0x8a, 0x83, 0xfb, 0xce, 0x9b, 0xfd, 0x04, 0xe5, 0x60, - 0xfc, 0x56, 0xf2, 0x42, 0xa1, 0xdd, 0xf5, 0xfd, 0x16, 0x66, 0x40, 0xf4, 0x3e, 0x31, 0x5e, 0x09, - 0xf3, 0x19, 0xec, 0x34, 0xfd, 0x50, 0x1b, 0xb4, 0xa7, 0x60, 0x78, 0x97, 0xec, 0x07, 0xae, 0xb7, - 0x9d, 0x34, 0xab, 0xba, 0xc6, 0x8b, 0xb1, 0x84, 0x9b, 0x59, 0x03, 0x87, 0x8f, 0x3a, 0xe1, 0xf5, - 0x48, 0x4f, 0xf6, 0xe4, 0x87, 0xca, 0x30, 0x89, 0x17, 0xab, 0xef, 0x4e, 0xc4, 0xcd, 0xf4, 0x44, - 0x1c, 0x75, 0xc2, 0xeb, 0xde, 0xb3, 0xf1, 0xf3, 0x16, 0x4c, 0xb2, 0xdc, 0x34, 0xc2, 0x43, 0xde, - 0xf5, 0xbd, 0x63, 0x78, 0x0a, 0x3c, 0x01, 0x83, 0x01, 0x6d, 0x34, 0x99, 0x7d, 0x95, 0xf5, 0x04, - 0x73, 0x18, 0x7a, 0x0c, 0x06, 0x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0x51, 0x11, 0x10, 0x6e, 0xde, 0x4c, 0x35, 0xda, 0x73, 0x98, 0x45, - 0x9b, 0x2c, 0x24, 0x45, 0xc0, 0x13, 0xc2, 0xca, 0xe3, 0xe3, 0x83, 0x7d, 0x77, 0x40, 0x64, 0x92, - 0x0d, 0x13, 0xf6, 0x25, 0xb2, 0xb8, 0xb7, 0x7d, 0x89, 0x6c, 0x79, 0xd6, 0x85, 0x51, 0xed, 0x6b, - 0x1e, 0xea, 0x8c, 0xef, 0xd2, 0xdb, 0x4a, 0xeb, 0xf7, 0x43, 0x9d, 0xf5, 0x1f, 0xb3, 0x20, 0xe1, - 0x72, 0xa0, 0xc4, 0x62, 0x56, 0xae, 0x58, 0xec, 0x3c, 0x0c, 0x04, 0x7e, 0x8b, 0x24, 0x33, 0x70, - 0x62, 0xbf, 0x45, 0x30, 0x83, 0x50, 0x8c, 0x28, 0x16, 0x76, 0x8c, 0xe9, 0x0f, 0x39, 0xf1, 0x44, - 0x7b, 0x02, 0x06, 0x5b, 0x64, 0x8f, 0xb4, 0x92, 0x89, 0x92, 0xae, 0xd3, 0x42, 0xcc, 0x61, 0xf6, - 0xcf, 0x0f, 0xc0, 0xd9, 0xc2, 0xa0, 0x2e, 0xf4, 0x39, 0xb4, 0xed, 0x44, 0xe4, 0x8e, 0xb3, 0x9f, - 0xcc, 0x68, 0x72, 0x85, 0x17, 0x63, 0x09, 0x67, 0x9e, 0x64, 0x3c, 0x30, 0x79, 0x42, 0x88, 0x28, - 0xe2, 0x91, 0x0b, 0xa8, 0x29, 0x94, 0x2a, 0x1f, 0x85, 0x50, 0xea, 0x39, 0x80, 0x30, 0x6c, 0x71, - 0xc3, 0xac, 0xa6, 0x70, 0x51, 0x8b, 0x03, 0xd8, 0xd7, 0xaf, 0x0b, 0x08, 0xd6, 0xb0, 0x50, 0x15, - 0xa6, 0x3a, 0x81, 0x1f, 0x71, 0x99, 0x6c, 0x95, 0xdb, 0x2e, 0x0e, 0x9a, 0xf1, 0x34,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, 0x39, 0x56, 0x18, 0xf6, - 0x87, 0xd8, 0xed, 0xc3, 0xc6, 0xf4, 0x70, 0x91, 0x8a, 0xfe, 0xe1, 0x98, 0x9a, 0x0d, 0xa6, 0xc9, - 0xac, 0xea, 0xf1, 0x90, 0x8a, 0x0f, 0x7b, 0xda, 0xb0, 0xee, 0xd7, 0x17, 0x07, 0x4d, 0x42, 0xdf, - 0x91, 0x32, 0x50, 0x79, 0xb6, 0xc7, 0xad, 0x71, 0x08, 0x93, 0x14, 0x96, 0x4e, 0x85, 0x25, 0x9b, - 0x58, 0xad, 0x89, 0x7d, 0xa1, 0xa5, 0x53, 0x11, 0x00, 0x1c, 0xe3, 0x50, 0x66, 0x4a, 0xfd, 0x09, - 0x67, 0x50, 0x1c, 0x56, 0x54, 0x61, 0x87, 0x58, 0xc3, 0x40, 0x97, 0x84, 0x40, 0x81, 0xeb, 0x05, - 0x1e, 0x4d, 0x08, 0x14, 0xe4, 0x70, 0x69, 0x52, 0xa0, 0xcb, 0x30, 0xaa, 0x32, 0x68, 0xd7, 0x78, - 0x22, 0x23, 0xb1, 0xcc, 0x96, 0xe3, 0x62, 0xac, 0xe3, 0xa0, 0x0d, 0x98, 0x0c, 0xb9, 0x9c, 0x4d, - 0xc5, 0x7a, 0xe6, 0xf2, 0xca, 0xf7, 0x4b, 0x2b, 0xa0, 0xba, 0x09, 0xbe, 0xcf, 0x8a, 0xf8, 0xe9, - 0x24, 0xfd, 0xfc, 0x93, 0x24, 0xd0, 0xab, 0x30, 0xd1, 0xf2, 0x9d, 0xe6, 0xa2, 0xd3, 0x72, 0xbc, - 0x06, 0x1b, 0x9f, 0x11, 0x33, 0x11, 0xeb, 0x75, 0x03, 0x8a, 0x13, 0xd8, 0x94, 0x79, 0xd3, 0x4b, - 0x44, 0x7c, 0x72, 0xc7, 0xdb, 0x26, 0xa1, 0xc8, 0x87, 0xcc, 0x98, 0xb7, 0xeb, 0x39, 0x38, 0x38, - 0xb7, 0x36, 0x7a, 0x09,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, 0xed, 0xaf, 0x96, 0xe0, 0x94, 0x1a, 0xc2, 0x6f, 0xdd, 0x81, 0xbb, 0x99, 0x1e, 0xb8, - 0x23, 0xd0, 0xeb, 0xda, 0x37, 0x60, 0x88, 0x07, 0x07, 0xec, 0x83, 0xf5, 0x7e, 0xc2, 0x0c, 0xbe, - 0xab, 0xb8, 0x3d, 0x23, 0x00, 0xef, 0xf7, 0x5b, 0x30, 0x99, 0xf0, 0x35, 0x43, 0x58, 0x73, 0x48, - 0x7e, 0x10, 0xf6, 0x38, 0x8b, 0xf1, 0x3e, 0x0f, 0x03, 0x3b, 0x7e, 0x18, 0x25, 0x8d, 0x3e, 0xae, - 0xfa, 0x61, 0x84, 0x19, 0xc4, 0xfe, 0x5d, 0x0b, 0x06, 0x37, 0x1c, 0xd7, 0x8b, 0xa4, 0x82, 0xc0, - 0xca, 0x51, 0x10, 0xf4, 0xf3, 0x5d, 0xe8, 0x45, 0x18, 0x22, 0x5b, 0x5b, 0xa4, 0x11, 0x89, 0x59, - 0x95, 0xd1, 0x1c, 0x86, 0x96, 0x59, 0x29, 0xe5, 0x05, 0x59, 0x63, 0xfc, 0x2f, 0x16, 0xc8, 0xe8, - 0x36, 0x54, 0x22, 0xb7, 0x4d, 0x16, 0x9a, 0x4d, 0xa1, 0x36, 0x7f, 0x80, 0x88, 0x14, 0x1b, 0x92, - 0x00, 0x8e, 0x69, 0xd9, 0x5f, 0x28, 0x01, 0xc4, 0x51, 0x95, 0x7a, 0x7d, 0xe2, 0x62, 0x4a, 0xa1, - 0x7a, 0x21, 0x43, 0xa1, 0x8a, 0x62, 0x82, 0x19, 0xda, 0x54, 0x35, 0x4c, 0xe5, 0xbe, 0x86, 0x69, - 0xe0, 0x30, 0xc3, 0xb4, 0x04, 0xd3, 0x71, 0x54, 0x28, 0x33, 0x28, 0x1e, 0xbb, 0x3e, 0x37, 0x92, - 0x40, 0x9c, 0xc6, 0xb7, 0x09, 0x9c, 0x57, 0xc1, 0x71, 0xc4, 0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 0x3d, 0xe2, 0x70, 0x1a, 0x79, 0x10, 0x55, - 0x5f, 0x13, 0x00, 0x9c, 0x24, 0x6a, 0xff, 0x74, 0x09, 0xce, 0x16, 0x1a, 0x2f, 0x22, 0x0c, 0xa7, - 0xb7, 0xdb, 0xa1, 0xb3, 0x14, 0x90, 0x26, 0xf1, 0x22, 0xd7, 0x69, 0xd5, 0x3b, 0xa4, 0xa1, 0xc9, - 0xcf, 0x99, 0x15, 0xe0, 0x95, 0xb5, 0xfa, 0x42, 0x1a, 0x03, 0xe7, 0xd4, 0x44, 0x2b, 0x80, 0xd2, - 0x10, 0x31, 0xc3, 0x2c, 0x46, 0x78, 0x9a, 0x1e, 0xce, 0xa8, 0x81, 0x3e, 0x04, 0xe3, 0xca, 0x28, - 0x52, 0x9b, 0x71, 0x76, 0xb0, 0x63, 0x1d, 0x80, 0x4d, 0x3c, 0x74, 0x99, 0x07, 0x99, 0x17, 0xe9, - 0x08, 0x84, 0xb0, 0x7d, 0x52, 0x46, 0x90, 0x17, 0xc5, 0x58, 0xc7, 0x59, 0x7c, 0xe9, 0xd7, 0x7e, - 0xff, 0xdc, 0x7b, 0x7e, 0xf3, 0xf7, 0xcf, 0xbd, 0xe7, 0x77, 0x7e, 0xff, 0xdc, 0x7b, 0xbe, 0xeb, - 0xde, 0x39, 0xeb, 0xd7, 0xee, 0x9d, 0xb3, 0x7e, 0xf3, 0xde, 0x39, 0xeb, 0x77, 0xee, 0x9d, 0xb3, - 0x7e, 0xef, 0xde, 0x39, 0xeb, 0x0b, 0x7f, 0x70, 0xee, 0x3d, 0x9f, 0x40, 0x71, 0x98, 0xc8, 0x4b, - 0x74, 0x76, 0x2e, 0xed, 0x5d, 0xfe, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x1b, 0x9e, 0xe7, 0x8d, - 0x05, 0x08, 0x01, 0x00, + // 14240 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x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, 0xeb, 0x06, 0xaa, 0x81, 0xdf, 0x49, 0xa0, 0x32, 0x1c, 0xfb, 0x57, 0x4b, + 0xf0, 0xd8, 0x12, 0xe9, 0xec, 0xac, 0xd4, 0x73, 0xce, 0xef, 0x8b, 0x30, 0xd2, 0xf6, 0x3d, 0x37, + 0xf2, 0x83, 0x50, 0x34, 0xcd, 0x56, 0xc4, 0x9a, 0x28, 0xc3, 0x0a, 0x8a, 0xce, 0xc3, 0x40, 0x27, + 0x66, 0x2a, 0xc7, 0x24, 0x43, 0xca, 0xd8, 0x49, 0x06, 0xa1, 0x18, 0xdd, 0x90, 0x04, 0x62, 0xc5, + 0x28, 0x8c, 0x9b, 0x21, 0x09, 0x30, 0x83, 0xc4, 0x37, 0x33, 0xbd, 0xb3, 0xc5, 0x09, 0x9d, 0xb8, + 0x99, 0x29, 0x04, 0x6b, 0x58, 0xa8, 0x06, 0x95, 0x30, 0x31, 0xb3, 0x7d, 0x6d, 0xd3, 0x71, 0x76, + 0x75, 0xab, 0x99, 0x8c, 0x89, 0x18, 0x37, 0xca, 0x50, 0xcf, 0xab, 0xfb, 0xab, 0x25, 0x40, 0x7c, + 0x08, 0xbf, 0xc9, 0x06, 0xee, 0x66, 0x7a, 0xe0, 0xfa, 0xdf, 0x12, 0x47, 0x35, 0x7a, 0xff, 0xd3, + 0x82, 0xc7, 0x96, 0x5c, 0xaf, 0x49, 0x82, 0x9c, 0x05, 0xf8, 0x70, 0xde, 0xb2, 0x87, 0x63, 0x1a, + 0x8c, 0x25, 0x36, 0x70, 0x04, 0x4b, 0xcc, 0xfe, 0x63, 0x0b, 0x10, 0xff, 0xec, 0x77, 0xdc, 0xc7, + 0xde, 0x4c, 0x7f, 0xec, 0x11, 0x2c, 0x0b, 0xfb, 0x3a, 0x4c, 0x2c, 0xb5, 0x5c, 0xe2, 0x45, 0xab, + 0xb5, 0x25, 0xdf, 0xdb, 0x72, 0xb7, 0xd1, 0xcb, 0x30, 0x11, 0xb9, 0x6d, 0xe2, 0x77, 0xa3, 0x3a, + 0x69, 0xf8, 0x1e, 0x7b, 0x49, 0x5a, 0x17, 0x07, 0x17, 0xd1, 0xbd, 0x83, 0xb9, 0x89, 0x0d, 0x03, + 0x82, 0x13, 0x98, 0xf6, 0xef, 0xd2, 0xf1, 0xf3, 0xdb, 0x1d, 0xdf, 0x23, 0x5e, 0xb4, 0xe4, 0x7b, + 0x4d, 0x2e, 0x71, 0x78, 0x19, 0x06, 0x22, 0x3a, 0x1e, 0x7c, 0xec, 0x2e, 0xc8, 0x8d, 0x42, 0x47, + 0xe1, 0xfe, 0xc1, 0xdc, 0xe9, 0x74, 0x0d, 0x36, 0x4e, 0xac, 0x0e, 0xfa, 0x36, 0x18, 0x0a, 0x23, + 0x27, 0xea, 0x86, 0x62, 0x34, 0x1f, 0x97, 0xa3, 0x59, 0x67, 0xa5, 0xf7, 0x0f, 0xe6, 0x26, 0x55, + 0x35, 0x5e, 0x84, 0x45, 0x05, 0xf4, 0x14, 0x0c, 0xb7, 0x49, 0x18, 0x3a, 0xdb, 0xf2, 0x36, 0x9c, + 0x14, 0x75, 0x87, 0xd7, 0x78, 0x31, 0x96, 0x70, 0xf4, 0x04, 0x0c, 0x92, 0x20, 0xf0, 0x03, 0xb1, + 0x47, 0xc7, 0x05, 0xe2, 0xe0, 0x32, 0x2d, 0xc4, 0x1c, 0x66, 0xff, 0x86, 0x05, 0x93, 0xaa, 0xaf, + 0xbc, 0xad, 0x63, 0x78, 0x15, 0x7c, 0x02, 0xa0, 0x21, 0x3f, 0x30, 0x64, 0xb7, 0xc7, 0xe8, 0x73, + 0x17, 0x32, 0x2f, 0xea, 0xd4, 0x30, 0xc6, 0x94, 0x55, 0x51, 0x88, 0x35, 0x6a, 0xf6, 0x3f, 0xb1, + 0xe0, 0x44, 0xe2, 0x8b, 0xae, 0xbb, 0x61, 0x84, 0xde, 0x48, 0x7d, 0xd5, 0x7c, 0x7f, 0x5f, 0x45, + 0x6b, 0xb3, 0x6f, 0x52, 0x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51, 0xb4, 0x3f, 0x83, 0x18, 0xaa, 0x3a, 0x58, 0x36, 0x36, 0x3e, 0x8e, + 0x69, 0xb9, 0xbd, 0x09, 0x13, 0xea, 0x20, 0x64, 0x63, 0x82, 0xe6, 0x60, 0x90, 0xb1, 0x4f, 0x42, + 0xba, 0x56, 0xa1, 0x5d, 0x60, 0xac, 0x15, 0xe6, 0xe5, 0xac, 0x0b, 0xee, 0x5b, 0x64, 0x71, 0x3f, + 0x22, 0xfc, 0x4d, 0x5f, 0xd6, 0xba, 0x20, 0x01, 0x38, 0xc6, 0xb1, 0xff, 0x2f, 0x67, 0x43, 0xe3, + 0xd3, 0xb6, 0x8f, 0xfb, 0xe5, 0x19, 0x18, 0xd9, 0xf1, 0xc3, 0x88, 0x62, 0xb3, 0x36, 0x06, 0x63, + 0xc6, 0xf3, 0xaa, 0x28, 0xc7, 0x0a, 0x03, 0xbd, 0x02, 0xe3, 0x0d, 0xbd, 0x01, 0x71, 0x39, 0xaa, + 0x63, 0xc4, 0x68, 0x1d, 0x9b, 0xb8, 0xe8, 0x25, 0x18, 0x61, 0x36, 0x20, 0x0d, 0xbf, 0x25, 0xb8, + 0x36, 0x79, 0xc3, 0x8f, 0xd4, 0x44, 0xf9, 0x7d, 0xed, 0x37, 0x56, 0xd8, 0xe8, 0x02, 0x0c, 0xd1, + 0x2e, 0xac, 0xd6, 0xc4, 0xb5, 0xa4, 0x04, 0x45, 0x57, 0x59, 0x29, 0x16, 0x50, 0xfb, 0x2f, 0x95, + 0xb4, 0x51, 0xa6, 0xef, 0x61, 0x82, 0x6a, 0x30, 0x7c, 0xc7, 0x71, 0x23, 0xd7, 0xdb, 0x16, 0xfc, + 0xc7, 0x53, 0x85, 0x77, 0x14, 0xab, 0x74, 0x9b, 0x57, 0xe0, 0xb7, 0xa8, 0xf8, 0x83, 0x25, 0x19, + 0x4a, 0x31, 0xe8, 0x7a, 0x1e, 0xa5, 0x58, 0xea, 0x97, 0x22, 0xe6, 0x15, 0x38, 0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xca, 0xd2, 0x72, 0xbc, 0x14, 0x53, 0xd1, 0x18, 0x2e, 0xc0, 0x50, + 0xa7, 0xa9, 0x75, 0x25, 0x16, 0xaf, 0x56, 0x59, 0x2f, 0x04, 0xf4, 0x9d, 0x12, 0x69, 0xe4, 0x26, + 0xc0, 0x15, 0x5c, 0x5b, 0x12, 0xe7, 0xae, 0xd4, 0xa6, 0x58, 0xb9, 0xda, 0x94, 0xf7, 0xc1, 0x30, + 0xbd, 0x17, 0xdc, 0x86, 0xec, 0x37, 0x57, 0xd0, 0xf2, 0x22, 0x2c, 0x61, 0xf6, 0xcf, 0x58, 0x70, + 0xe2, 0x8a, 0x1b, 0xd1, 0x4b, 0x3b, 0x19, 0x6e, 0x80, 0xde, 0xda, 0xa1, 0x1b, 0xf9, 0xc1, 0x7e, + 0x32, 0xdc, 0x00, 0x56, 0x10, 0xac, 0x61, 0xf1, 0x0f, 0xda, 0x73, 0x99, 0x85, 0x76, 0xc9, 0xd4, + 0x5f, 0x61, 0x51, 0x8e, 0x15, 0x06, 0x1d, 0xaf, 0xa6, 0x1b, 0x30, 0xd1, 0xdf, 0xbe, 0x38, 0xb8, + 0xd5, 0x78, 0x55, 0x25, 0x00, 0xc7, 0x38, 0xf6, 0x1f, 0x59, 0x30, 0x77, 0xa5, 0xd5, 0x0d, 0x23, + 0x12, 0x6c, 0x85, 0x39, 0x87, 0xee, 0xf3, 0x50, 0x21, 0x52, 0xd0, 0x2e, 0x7a, 0xad, 0x18, 0x51, + 0x25, 0x81, 0xe7, 0x51, 0x0f, 0x14, 0x5e, 0x1f, 0xbe, 0x8c, 0x87, 0x73, 0x46, 0x5b, 0x01, 0x44, + 0xf4, 0xb6, 0xf4, 0x30, 0x10, 0xcc, 0x9f, 0x7c, 0x39, 0x05, 0xc5, 0x19, 0x35, 0xec, 0x1f, 0xb7, + 0xe0, 0x94, 0xfa, 0xe0, 0x77, 0xdc, 0x67, 0xda, 0x5f, 0x29, 0xc1, 0xf8, 0xd5, 0x8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0x47, 0x6f, 0xc2, 0x54, 0xdb, 0x89, 0x1a, 0x3b, 0xcb, + 0x77, 0x3b, 0x01, 0x57, 0x39, 0xc9, 0x71, 0x7a, 0xba, 0xd7, 0x38, 0x69, 0x1f, 0x19, 0x9b, 0x72, + 0xae, 0x25, 0x88, 0xe1, 0x14, 0x79, 0xb4, 0x09, 0xa3, 0xac, 0x8c, 0x79, 0xf1, 0x85, 0x45, 0xac, + 0x41, 0x5e, 0x6b, 0xca, 0x18, 0x61, 0x2d, 0xa6, 0x83, 0x75, 0xa2, 0xf6, 0x97, 0xcb, 0x7c, 0xb7, + 0x33, 0x56, 0xfe, 0x29, 0x18, 0xee, 0xf8, 0xcd, 0xa5, 0xd5, 0x2a, 0x16, 0xb3, 0xa0, 0xae, 0x91, + 0x1a, 0x2f, 0xc6, 0x12, 0x8e, 0x2e, 0xc2, 0x88, 0xf8, 0x29, 0x55, 0x84, 0xec, 0x6c, 0x16, 0x78, + 0x21, 0x56, 0x50, 0xf4, 0x1c, 0x40, 0x27, 0xf0, 0xf7, 0xdc, 0x26, 0x8b, 0x2e, 0x51, 0x36, 0xed, + 0x88, 0x6a, 0x0a, 0x82, 0x35, 0x2c, 0xf4, 0x0a, 0x8c, 0x77, 0xbd, 0x90, 0xb3, 0x23, 0x5a, 0x2c, + 0x59, 0x65, 0xe1, 0x72, 0x53, 0x07, 0x62, 0x13, 0x17, 0x2d, 0xc0, 0x50, 0xe4, 0x30, 0xbb, 0x98, + 0xc1, 0x7c, 0x73, 0xdf, 0x0d, 0x8a, 0xa1, 0x27, 0x07, 0xa1, 0x15, 0xb0, 0xa8, 0x88, 0x3e, 0x21, + 0x1d, 0x6a, 0xf9, 0xc1, 0x2e, 0xec, 0xec, 0xfb, 0xbb, 0x04, 0x34, 0x77, 0x5a, 0x61, 0xbf, 0x6f, + 0xd0, 0x42, 0x2f, 0x03, 0x90, 0xbb, 0x11, 0x09, 0x3c, 0xa7, 0xa5, 0xac, 0xd9, 0x14, 0x5f, 0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x57, 0xbd, 0x9b, 0x21, 0x61, 0xde, 0x8f, 0x95, 0xc5, 0xf7, 0xc6, 0x8e, + 0x8d, 0xbc, 0x3c, 0x33, 0x85, 0x98, 0x51, 0x93, 0x72, 0x51, 0xe2, 0xbf, 0xcc, 0x4c, 0x36, 0x03, + 0xf9, 0xdd, 0x33, 0xb3, 0x97, 0xc5, 0xc3, 0x79, 0xcb, 0x24, 0x81, 0x93, 0x34, 0x29, 0x47, 0xca, + 0x77, 0xbd, 0xf0, 0x16, 0xe9, 0x75, 0x76, 0xf0, 0x87, 0x38, 0xbb, 0x8d, 0x78, 0x09, 0x16, 0xf5, + 0x8f, 0x95, 0x3d, 0x98, 0xf5, 0x60, 0x2a, 0xb9, 0x45, 0x1f, 0x2a, 0x3b, 0xf2, 0x07, 0x03, 0x30, + 0x61, 0x2e, 0x29, 0x74, 0x09, 0x2a, 0x82, 0x88, 0xca, 0x26, 0xa0, 0x76, 0xc9, 0x9a, 0x04, 0xe0, + 0x18, 0x87, 0x25, 0x91, 0x60, 0xd5, 0x35, 0xf3, 0xe0, 0x38, 0x89, 0x84, 0x82, 0x60, 0x0d, 0x8b, + 0x3e, 0xac, 0x36, 0x7d, 0x3f, 0x52, 0x17, 0x92, 0x5a, 0x77, 0x8b, 0xac, 0x14, 0x0b, 0x28, 0xbd, + 0x88, 0x76, 0x49, 0xe0, 0x91, 0x96, 0x19, 0x77, 0x58, 0x5d, 0x44, 0xd7, 0x74, 0x20, 0x36, 0x71, + 0xe9, 0x75, 0xea, 0x87, 0x6c, 0x21, 0x8b, 0xe7, 0x5b, 0x6c, 0x6e, 0x5d, 0xe7, 0x0e, 0xd8, 0x12, + 0x8e, 0x3e, 0x0e, 0x8f, 0xa8, 0xd8, 0x4a, 0x98, 0x6b, 0x33, 0x64, 0x8b, 0x43, 0x86, 0xb4, 0xe5, + 0x91, 0xa5, 0x6c, 0x34, 0x9c, 0x57, 0x1f, 0xbd, 0x0a, 0x13, 0x82, 0xc5, 0x97, 0x14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xc5, 0x03, 0x59, 0xec, 0x04, 0xcd, 0xd5, 0xf1, 0x0a, + 0x09, 0xc7, 0x44, 0xd1, 0xab, 0x50, 0xf6, 0xb6, 0xc2, 0xa2, 0x84, 0xb3, 0x09, 0xbb, 0x4b, 0x1e, + 0x69, 0x63, 0x7d, 0xa5, 0x8e, 0x69, 0x45, 0x74, 0x15, 0xca, 0xc1, 0x66, 0x53, 0x88, 0xa1, 0x33, + 0x37, 0x29, 0x5e, 0xac, 0xe6, 0xf4, 0x8a, 0x51, 0xc2, 0x8b, 0x55, 0x4c, 0x49, 0xa0, 0x1a, 0x0c, + 0x32, 0x5f, 0x36, 0xc1, 0xd4, 0x64, 0x3e, 0xdf, 0x0a, 0x7c, 0x42, 0x79, 0x38, 0x0e, 0x86, 0x80, + 0x39, 0x21, 0xb4, 0x01, 0x43, 0x0d, 0x96, 0x9c, 0x54, 0x70, 0x31, 0x1f, 0xc8, 0x14, 0x38, 0x17, + 0x64, 0x6d, 0x15, 0xf2, 0x57, 0x86, 0x81, 0x05, 0x2d, 0x46, 0x95, 0x74, 0x76, 0xb6, 0x42, 0x91, + 0x4c, 0x3b, 0x9b, 0x6a, 0x41, 0x32, 0x62, 0x41, 0x95, 0x61, 0x60, 0x41, 0x0b, 0xbd, 0x0c, 0xa5, + 0xad, 0x86, 0xf0, 0x53, 0xcb, 0x94, 0x3c, 0x9b, 0xc1, 0x52, 0x16, 0x87, 0xee, 0x1d, 0xcc, 0x95, + 0x56, 0x96, 0x70, 0x69, 0xab, 0x81, 0xd6, 0x61, 0x78, 0x8b, 0x87, 0x57, 0x10, 0xc2, 0xe5, 0x27, + 0xb3, 0x23, 0x3f, 0xa4, 0x22, 0x30, 0x70, 0x9f, 0x27, 0x01, 0xc0, 0x92, 0x08, 0xcb, 0x48, 0xa0, + 0xc2, 0x44, 0x88, 0x28, 0x75, 0xf3, 0x87, 0x0b, 0xed, 0xc1, 0x99, 0xcc, 0x38, 0xd8, 0x04, 0xd6, + 0x28, 0xd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xc7, 0x38, 0x68, 0x05, + 0x46, 0x1c, 0xa9, 0x03, 0x42, 0xf9, 0x21, 0x7a, 0x94, 0xe6, 0x87, 0x47, 0xad, 0x90, 0x5a, 0x1f, + 0x55, 0x17, 0xbd, 0x02, 0xe3, 0xc2, 0x6f, 0x59, 0x24, 0x09, 0x3d, 0x61, 0x3a, 0x97, 0xd5, 0x75, + 0x20, 0x36, 0x71, 0xd1, 0x4d, 0x18, 0x8d, 0xfc, 0x16, 0xf3, 0x90, 0xa2, 0x6c, 0xde, 0xe9, 0xfc, + 0x60, 0x73, 0x1b, 0x0a, 0x4d, 0x17, 0xbf, 0xaa, 0xaa, 0x58, 0xa7, 0x83, 0x36, 0xf8, 0x7a, 0x67, + 0x71, 0xe4, 0x49, 0x38, 0xf3, 0x48, 0xfe, 0x9d, 0xa4, 0xc2, 0xcd, 0x9b, 0xdb, 0x41, 0xd4, 0xc4, + 0x3a, 0x19, 0x74, 0x05, 0xa6, 0x3b, 0x81, 0xeb, 0xb3, 0x35, 0xa1, 0xd4, 0x7f, 0x33, 0x66, 0xd6, + 0xa8, 0x5a, 0x12, 0x01, 0xa7, 0xeb, 0x30, 0xb7, 0x73, 0x51, 0x38, 0x73, 0x86, 0x67, 0xbe, 0xe0, + 0x6f, 0x42, 0x5e, 0x86, 0x15, 0x14, 0xad, 0xb1, 0x93, 0x98, 0x8b, 0x33, 0x66, 0x66, 0xf3, 0xa3, + 0x02, 0xe9, 0x62, 0x0f, 0xce, 0xbc, 0xaa, 0xbf, 0x38, 0xa6, 0x80, 0x9a, 0x5a, 0xc2, 0x49, 0xfa, + 0x62, 0x08, 0x67, 0x1e, 0x2b, 0xb0, 0xac, 0x4b, 0x3c, 0x2f, 0x62, 0x86, 0xc0, 0x28, 0x0e, 0x71, + 0x82, 0x26, 0xfa, 0x28, 0x4c, 0x89, 0x58, 0x86, 0xf1, 0x30, 0x9d, 0x8d, 0xed, 0xce, 0x71, 0x02, + 0x86, 0x53, 0xd8, 0x3c, 0x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xe5, 0x58, 0x61, 0xd0, 0xb3, 0x8a, 0x5f, 0x54, 0xc9, 0xcb, 0x49, + 0x58, 0xa2, 0x0b, 0xe8, 0x21, 0x93, 0x78, 0x9e, 0x87, 0x81, 0x6e, 0x48, 0x64, 0xa8, 0x56, 0x75, + 0x6d, 0x33, 0xb5, 0x26, 0x83, 0xd0, 0x67, 0xd4, 0xb6, 0xd2, 0x10, 0x6a, 0xcf, 0x28, 0xae, 0x23, + 0xe4, 0x30, 0xda, 0xb9, 0x88, 0x78, 0x8e, 0x17, 0x89, 0xc7, 0x56, 0x1c, 0x73, 0x90, 0x95, 0x62, + 0x01, 0xb5, 0xbf, 0x50, 0x86, 0x33, 0xb9, 0xbe, 0x73, 0xb4, 0xeb, 0x6d, 0xdf, 0x73, 0x23, 0x5f, + 0x59, 0x13, 0xf1, 0x38, 0x83, 0xa4, 0xb3, 0xb3, 0x26, 0xca, 0xb1, 0xc2, 0x40, 0x17, 0x60, 0x90, + 0x09, 0x45, 0x53, 0x49, 0x58, 0x17, 0xab, 0x3c, 0xf0, 0x14, 0x07, 0xf7, 0x9d, 0x37, 0xfb, 0x09, + 0xca, 0xc1, 0xf8, 0xad, 0xe4, 0x85, 0x42, 0xbb, 0xeb, 0xfb, 0x2d, 0xcc, 0x80, 0xe8, 0x7d, 0x62, + 0xbc, 0x12, 0xe6, 0x33, 0xd8, 0x69, 0xfa, 0xa1, 0x36, 0x68, 0x4f, 0xc1, 0xf0, 0x2e, 0xd9, 0x0f, + 0x5c, 0x6f, 0x3b, 0x69, 0x56, 0x75, 0x8d, 0x17, 0x63, 0x09, 0x37, 0xb3, 0x06, 0x0e, 0x1f, 0x75, + 0xc2, 0xeb, 0x91, 0x9e, 0xec, 0xc9, 0x0f, 0x95, 0x61, 0x12, 0x2f, 0x56, 0xdf, 0x9d, 0x88, 0x9b, + 0xe9, 0x89, 0x38, 0xea, 0x84, 0xd7, 0xbd, 0x67, 0xe3, 0xe7, 0x2d, 0x98, 0x64, 0xb9, 0x69, 0x84, + 0x87, 0xbc, 0xeb, 0x7b, 0xc7, 0xf0, 0x14, 0x78, 0x02, 0x06, 0x03, 0xda, 0x68, 0x32, 0xfb, 0x2a, + 0xeb, 0x09, 0xe6, 0x30, 0xf4, 0x18, 0x0c, 0xb0, 0x2e, 0xd0, 0xc9, 0x1b, 0xe3, 0x47, 0x70, 0xd5, + 0x89, 0x1c, 0xcc, 0x4a, 0x59, 0xd8, 0x25, 0x4c, 0x3a, 0x2d, 0x97, 0x77, 0x3a, 0x56, 0x59, 0xbf, + 0x33, 0xbc, 0xea, 0x33, 0xbb, 0xf6, 0xf6, 0xc2, 0x2e, 0x65, 0x93, 0x2c, 0x7e, 0x66, 0xff, 0x51, + 0x09, 0xce, 0x65, 0xd6, 0xeb, 0x3b, 0xec, 0x52, 0x71, 0xed, 0x87, 0x99, 0x7d, 0xa4, 0x7c, 0x8c, + 0x46, 0xab, 0x03, 0xfd, 0x72, 0xff, 0x83, 0x7d, 0x44, 0x43, 0xca, 0x1c, 0xb2, 0x77, 0x48, 0x34, + 0xa4, 0xcc, 0xbe, 0xe5, 0x88, 0x09, 0xfe, 0xbc, 0x94, 0xf3, 0x2d, 0x4c, 0x60, 0x70, 0x91, 0x9e, + 0x33, 0x0c, 0x18, 0xca, 0x47, 0x38, 0x3f, 0x63, 0x78, 0x19, 0x56, 0x50, 0xb4, 0x00, 0x93, 0x6d, + 0xd7, 0xa3, 0x87, 0xcf, 0xbe, 0xc9, 0x8a, 0xab, 0x60, 0x75, 0x6b, 0x26, 0x18, 0x27, 0xf1, 0x91, + 0xab, 0x45, 0x4a, 0xe2, 0x5f, 0xf7, 0xca, 0xa1, 0x76, 0xdd, 0xbc, 0xa9, 0xce, 0x57, 0xa3, 0x98, + 0x11, 0x35, 0x69, 0x4d, 0x93, 0x13, 0x95, 0xfb, 0x97, 0x13, 0x8d, 0x65, 0xcb, 0x88, 0x66, 0x5f, + 0x81, 0xf1, 0x07, 0x56, 0x0c, 0xd8, 0x5f, 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x4f, 0x48, 0x2d, 0x5a, 0x93, + 0xa2, 0x85, 0x35, 0xba, 0x32, 0x86, 0x00, 0x6b, 0x63, 0xd0, 0x34, 0x66, 0x58, 0x17, 0xe5, 0x58, + 0x61, 0xd8, 0x1f, 0x62, 0xb7, 0x0f, 0x1b, 0xd3, 0xc3, 0x45, 0x2a, 0xfa, 0xfb, 0x63, 0x6a, 0x36, + 0x98, 0x26, 0xb3, 0xaa, 0xc7, 0x43, 0x2a, 0x3e, 0xec, 0x69, 0xc3, 0xba, 0x5f, 0x5f, 0x1c, 0x34, + 0x09, 0x7d, 0x47, 0xca, 0x40, 0xe5, 0xd9, 0x1e, 0xb7, 0xc6, 0x21, 0x4c, 0x52, 0x58, 0x3a, 0x15, + 0x96, 0x6c, 0x62, 0xb5, 0x26, 0xf6, 0x85, 0x96, 0x4e, 0x45, 0x00, 0x70, 0x8c, 0x43, 0x99, 0x29, + 0xf5, 0x27, 0x9c, 0x41, 0x71, 0x58, 0x51, 0x85, 0x1d, 0x62, 0x0d, 0x03, 0x5d, 0x12, 0x02, 0x05, + 0xae, 0x17, 0x78, 0x34, 0x21, 0x50, 0x90, 0xc3, 0xa5, 0x49, 0x81, 0x2e, 0xc3, 0xa8, 0xca, 0xa0, + 0x5d, 0xe3, 0x89, 0x8c, 0xc4, 0x32, 0x5b, 0x8e, 0x8b, 0xb1, 0x8e, 0x83, 0x36, 0x60, 0x32, 0xe4, + 0x72, 0x36, 0x15, 0xeb, 0x99, 0xcb, 0x2b, 0xdf, 0x2f, 0xad, 0x80, 0xea, 0x26, 0xf8, 0x3e, 0x2b, + 0xe2, 0xa7, 0x93, 0xf4, 0xf3, 0x4f, 0x92, 0x40, 0xaf, 0xc2, 0x44, 0xcb, 0x77, 0x9a, 0x8b, 0x4e, + 0xcb, 0xf1, 0x1a, 0x6c, 0x7c, 0x46, 0xcc, 0x44, 0xac, 0xd7, 0x0d, 0x28, 0x4e, 0x60, 0x53, 0xe6, + 0x4d, 0x2f, 0x11, 0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0xdf, 0x2e, 0x02, 0xba, 0x56, 0x6b, 0xa0, 0xa7, 0x93, 0x8b, 0xa1, 0xcd, 0x1e, 0xec, 0xff, + 0x09, 0x9c, 0xab, 0x99, 0xb4, 0xbf, 0x5a, 0x82, 0x53, 0x6a, 0x08, 0xbf, 0x75, 0x07, 0xee, 0x66, + 0x7a, 0xe0, 0x8e, 0x40, 0xaf, 0x6b, 0xdf, 0x80, 0x21, 0x1e, 0x1c, 0xb0, 0x0f, 0xd6, 0xfb, 0x09, + 0x33, 0xf8, 0xae, 0xe2, 0xf6, 0x8c, 0x00, 0xbc, 0xdf, 0x6f, 0xc1, 0x64, 0xc2, 0xd7, 0x0c, 0x61, + 0xcd, 0x21, 0xf9, 0x41, 0xd8, 0xe3, 0x2c, 0xc6, 0xfb, 0x3c, 0x0c, 0xec, 0xf8, 0x61, 0x94, 0x34, + 0xfa, 0xb8, 0xea, 0x87, 0x11, 0x66, 0x10, 0xfb, 0x77, 0x2d, 0x18, 0xdc, 0x70, 0x5c, 0x2f, 0x92, + 0x0a, 0x02, 0x2b, 0x47, 0x41, 0xd0, 0xcf, 0x77, 0xa1, 0x17, 0x61, 0x88, 0x6c, 0x6d, 0x91, 0x46, + 0x24, 0x66, 0x55, 0x46, 0x73, 0x18, 0x5a, 0x66, 0xa5, 0x94, 0x17, 0x64, 0x8d, 0xf1, 0xbf, 0x58, + 0x20, 0xa3, 0xdb, 0x50, 0x89, 0xdc, 0x36, 0x59, 0x68, 0x36, 0x85, 0xda, 0xfc, 0x01, 0x22, 0x52, + 0x6c, 0x48, 0x02, 0x38, 0xa6, 0x65, 0x7f, 0xa1, 0x04, 0x10, 0x47, 0x55, 0xea, 0xf5, 0x89, 0x8b, + 0x29, 0x85, 0xea, 0x85, 0x0c, 0x85, 0x2a, 0x8a, 0x09, 0x66, 0x68, 0x53, 0xd5, 0x30, 0x95, 0xfb, + 0x1a, 0xa6, 0x81, 0xc3, 0x0c, 0xd3, 0x12, 0x4c, 0xc7, 0x51,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, 0x0e, 0x52, 0xb7, 0x05, 0x93, 0x1d, 0xb3, 0x6a, 0x8f, 0xb8, 0x9a, + 0x46, 0x5e, 0x43, 0xd5, 0xd7, 0x04, 0x00, 0x27, 0x89, 0xda, 0x3f, 0x5d, 0x82, 0xb3, 0x85, 0xc6, + 0x88, 0x08, 0xc3, 0xe9, 0xed, 0x76, 0xe8, 0x2c, 0x05, 0xa4, 0x49, 0xbc, 0xc8, 0x75, 0x5a, 0xf5, + 0x0e, 0x69, 0x68, 0xf2, 0x70, 0x66, 0xd5, 0x77, 0x65, 0xad, 0xbe, 0x90, 0xc6, 0xc0, 0x39, 0x35, + 0xd1, 0x0a, 0xa0, 0x34, 0x44, 0xcc, 0x30, 0x8b, 0xf9, 0x9d, 0xa6, 0x87, 0x33, 0x6a, 0xa0, 0x0f, + 0xc1, 0xb8, 0x32, 0x72, 0xd4, 0x66, 0x9c, 0x1d, 0xec, 0x58, 0x07, 0x60, 0x13, 0x0f, 0x5d, 0xe6, + 0x41, 0xe3, 0x45, 0x7a, 0x01, 0x21, 0x3c, 0x9f, 0x94, 0x11, 0xe1, 0x45, 0x31, 0xd6, 0x71, 0x16, + 0x2f, 0xfe, 0xda, 0xef, 0x9f, 0x7b, 0xcf, 0x6f, 0xfe, 0xfe, 0xb9, 0xf7, 0xfc, 0xce, 0xef, 0x9f, + 0x7b, 0xcf, 0x77, 0xdd, 0x3b, 0x67, 0xfd, 0xda, 0xbd, 0x73, 0xd6, 0x6f, 0xde, 0x3b, 0x67, 0xfd, + 0xce, 0xbd, 0x73, 0xd6, 0xef, 0xdd, 0x3b, 0x67, 0x7d, 0xe1, 0x0f, 0xce, 0xbd, 0xe7, 0x13, 0xa5, + 0xbd, 0xcb, 0xff, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x4d, 0xc9, 0x26, 0x9f, 0xc5, 0x07, 0x01, 0x00, } func (m *AWSElasticBlockStoreVolumeSource) Marshal() (dAtA []byte, err error) { @@ -18902,11 +18900,6 @@ func (m *TopologySpreadConstraint) MarshalToSizedBuffer(dAtA []byte) (int, error _ = i var l int _ = l - if m.MinDomains != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.MinDomains)) - i-- - dAtA[i] = 0x28 - } if m.LabelSelector != nil { { size, err := m.LabelSelector.MarshalToSizedBuffer(dAtA[:i]) @@ -24090,9 +24083,6 @@ func (m *TopologySpreadConstraint) Size() (n int) { l = m.LabelSelector.Size() n += 1 + l + sovGenerated(uint64(l)) } - if m.MinDomains != nil { - n += 1 + sovGenerated(uint64(*m.MinDomains)) - } return n } @@ -27680,7 +27670,6 @@ func (this *TopologySpreadConstraint) String() string { `TopologyKey:` + fmt.Sprintf("%v", this.TopologyKey) + `,`, `WhenUnsatisfiable:` + fmt.Sprintf("%v", this.WhenUnsatisfiable) + `,`, `LabelSelector:` + strings.Replace(fmt.Sprintf("%v", this.LabelSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, - `MinDomains:` + valueToStringGenerated(this.MinDomains) + `,`, `}`, }, "") return s @@ -65682,26 +65671,6 @@ func (m *TopologySpreadConstraint) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinDomains", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.MinDomains = &v default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/cluster-autoscaler/vendor/k8s.io/api/core/v1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/core/v1/generated.proto index 41423f45f72d..b5b44781f02b 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/core/v1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/core/v1/generated.proto @@ -28,7 +28,7 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/core/v1"; +option go_package = "v1"; // Represents a Persistent Disk resource in AWS. // @@ -37,11 +37,11 @@ option go_package = "k8s.io/api/core/v1"; // can only be mounted as read/write once. AWS EBS volumes support // ownership management and SELinux relabeling. message AWSElasticBlockStoreVolumeSource { - // volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). + // Unique ID of the persistent disk resource in AWS (Amazon EBS volume). // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore optional string volumeID = 1; - // fsType is the filesystem type of the volume that you want to mount. + // Filesystem type of the volume that you want to mount. // Tip: Ensure that the filesystem type is supported by the host operating system. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore @@ -49,14 +49,15 @@ message AWSElasticBlockStoreVolumeSource { // +optional optional string fsType = 2; - // partition is the partition in the volume that you want to mount. + // The partition in the volume that you want to mount. // If omitted, the default is to mount by volume name. // Examples: For volume /dev/sda1, you specify the partition as "1". // Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). // +optional optional int32 partition = 3; - // readOnly value true will force the readOnly setting in VolumeMounts. + // Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". + // If omitted, the default is "false". // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore // +optional optional bool readOnly = 4; @@ -98,45 +99,45 @@ message AvoidPods { // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. message AzureDiskVolumeSource { - // diskName is the Name of the data disk in the blob storage + // The Name of the data disk in the blob storage optional string diskName = 1; - // diskURI is the URI of data disk in the blob storage + // The URI the data disk in the blob storage optional string diskURI = 2; - // cachingMode is the Host Caching mode: None, Read Only, Read Write. + // Host Caching mode: None, Read Only, Read Write. // +optional optional string cachingMode = 3; - // fsType is Filesystem type to mount. + // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // +optional optional string fsType = 4; - // readOnly Defaults to false (read/write). ReadOnly here will force + // Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // +optional optional bool readOnly = 5; - // kind expected values are Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared + // Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared optional string kind = 6; } // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. message AzureFilePersistentVolumeSource { - // secretName is the name of secret that contains Azure Storage Account Name and Key + // the name of secret that contains Azure Storage Account Name and Key optional string secretName = 1; - // shareName is the azure Share Name + // Share Name optional string shareName = 2; - // readOnly defaults to false (read/write). ReadOnly here will force + // Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // +optional optional bool readOnly = 3; - // secretNamespace is the namespace of the secret that contains Azure Storage Account Name and Key + // the namespace of the secret that contains Azure Storage Account Name and Key // default is the same as the Pod // +optional optional string secretNamespace = 4; @@ -144,13 +145,13 @@ message AzureFilePersistentVolumeSource { // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. message AzureFileVolumeSource { - // secretName is the name of secret that contains Azure Storage Account Name and Key + // the name of secret that contains Azure Storage Account Name and Key optional string secretName = 1; - // shareName is the azure share Name + // Share Name optional string shareName = 2; - // readOnly defaults to false (read/write). ReadOnly here will force + // Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // +optional optional bool readOnly = 3; @@ -170,30 +171,31 @@ message Binding { // Represents storage that is managed by an external CSI volume driver (Beta feature) message CSIPersistentVolumeSource { - // driver is the name of the driver to use for this volume. + // Driver is the name of the driver to use for this volume. // Required. optional string driver = 1; - // volumeHandle is the unique volume name returned by the CSI volume + // VolumeHandle is the unique volume name returned by the CSI volume // plugin’s CreateVolume to refer to the volume on all subsequent calls. // Required. optional string volumeHandle = 2; - // readOnly value to pass to ControllerPublishVolumeRequest. + // Optional: The value to pass to ControllerPublishVolumeRequest. // Defaults to false (read/write). // +optional optional bool readOnly = 3; - // fsType to mount. Must be a filesystem type supported by the host operating system. + // Filesystem type to mount. + // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". // +optional optional string fsType = 4; - // volumeAttributes of the volume to publish. + // Attributes of the volume to publish. // +optional map volumeAttributes = 5; - // controllerPublishSecretRef is a reference to the secret object containing + // ControllerPublishSecretRef is a reference to the secret object containing // sensitive information to pass to the CSI driver to complete the CSI // ControllerPublishVolume and ControllerUnpublishVolume calls. // This field is optional, and may be empty if no secret is required. If the @@ -201,7 +203,7 @@ message CSIPersistentVolumeSource { // +optional optional SecretReference controllerPublishSecretRef = 6; - // nodeStageSecretRef is a reference to the secret object containing sensitive + // NodeStageSecretRef is a reference to the secret object containing sensitive // information to pass to the CSI driver to complete the CSI NodeStageVolume // and NodeStageVolume and NodeUnstageVolume calls. // This field is optional, and may be empty if no secret is required. If the @@ -209,7 +211,7 @@ message CSIPersistentVolumeSource { // +optional optional SecretReference nodeStageSecretRef = 7; - // nodePublishSecretRef is a reference to the secret object containing + // NodePublishSecretRef is a reference to the secret object containing // sensitive information to pass to the CSI driver to complete the CSI // NodePublishVolume and NodeUnpublishVolume calls. // This field is optional, and may be empty if no secret is required. If the @@ -217,7 +219,7 @@ message CSIPersistentVolumeSource { // +optional optional SecretReference nodePublishSecretRef = 8; - // controllerExpandSecretRef is a reference to the secret object containing + // ControllerExpandSecretRef is a reference to the secret object containing // sensitive information to pass to the CSI driver to complete the CSI // ControllerExpandVolume call. // This is an alpha field and requires enabling ExpandCSIVolumes feature gate. @@ -229,27 +231,27 @@ message CSIPersistentVolumeSource { // Represents a source location of a volume to mount, managed by an external CSI driver message CSIVolumeSource { - // driver is the name of the CSI driver that handles this volume. + // Driver is the name of the CSI driver that handles this volume. // Consult with your admin for the correct name as registered in the cluster. optional string driver = 1; - // readOnly specifies a read-only configuration for the volume. + // Specifies a read-only configuration for the volume. // Defaults to false (read/write). // +optional optional bool readOnly = 2; - // fsType to mount. Ex. "ext4", "xfs", "ntfs". + // Filesystem type to mount. Ex. "ext4", "xfs", "ntfs". // If not provided, the empty value is passed to the associated CSI driver // which will determine the default filesystem to apply. // +optional optional string fsType = 3; - // volumeAttributes stores driver-specific properties that are passed to the CSI + // VolumeAttributes stores driver-specific properties that are passed to the CSI // driver. Consult your driver's documentation for supported values. // +optional map volumeAttributes = 4; - // nodePublishSecretRef is a reference to the secret object containing + // NodePublishSecretRef is a reference to the secret object containing // sensitive information to pass to the CSI driver to complete the CSI // NodePublishVolume and NodeUnpublishVolume calls. // This field is optional, and may be empty if no secret is required. If the @@ -272,30 +274,30 @@ message Capabilities { // Represents a Ceph Filesystem mount that lasts the lifetime of a pod // Cephfs volumes do not support ownership management or SELinux relabeling. message CephFSPersistentVolumeSource { - // monitors is Required: Monitors is a collection of Ceph monitors + // Required: Monitors is a collection of Ceph monitors // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it repeated string monitors = 1; - // path is Optional: Used as the mounted root, rather than the full Ceph tree, default is / + // Optional: Used as the mounted root, rather than the full Ceph tree, default is / // +optional optional string path = 2; - // user is Optional: User is the rados user name, default is admin + // Optional: User is the rados user name, default is admin // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it // +optional optional string user = 3; - // secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret + // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it // +optional optional string secretFile = 4; - // secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. + // Optional: SecretRef is reference to the authentication secret for User, default is empty. // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it // +optional optional SecretReference secretRef = 5; - // readOnly is Optional: Defaults to false (read/write). ReadOnly here will force + // Optional: Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it // +optional @@ -305,30 +307,30 @@ message CephFSPersistentVolumeSource { // Represents a Ceph Filesystem mount that lasts the lifetime of a pod // Cephfs volumes do not support ownership management or SELinux relabeling. message CephFSVolumeSource { - // monitors is Required: Monitors is a collection of Ceph monitors + // Required: Monitors is a collection of Ceph monitors // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it repeated string monitors = 1; - // path is Optional: Used as the mounted root, rather than the full Ceph tree, default is / + // Optional: Used as the mounted root, rather than the full Ceph tree, default is / // +optional optional string path = 2; - // user is optional: User is the rados user name, default is admin + // Optional: User is the rados user name, default is admin // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it // +optional optional string user = 3; - // secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret + // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it // +optional optional string secretFile = 4; - // secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. + // Optional: SecretRef is reference to the authentication secret for User, default is empty. // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it // +optional optional LocalObjectReference secretRef = 5; - // readOnly is Optional: Defaults to false (read/write). ReadOnly here will force + // Optional: Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it // +optional @@ -340,24 +342,24 @@ message CephFSVolumeSource { // The volume must also be in the same region as the kubelet. // Cinder volumes support ownership management and SELinux relabeling. message CinderPersistentVolumeSource { - // volumeID used to identify the volume in cinder. + // volume id used to identify the volume in cinder. // More info: https://examples.k8s.io/mysql-cinder-pd/README.md optional string volumeID = 1; - // fsType Filesystem type to mount. + // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // More info: https://examples.k8s.io/mysql-cinder-pd/README.md // +optional optional string fsType = 2; - // readOnly is Optional: Defaults to false (read/write). ReadOnly here will force + // Optional: Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // More info: https://examples.k8s.io/mysql-cinder-pd/README.md // +optional optional bool readOnly = 3; - // secretRef is Optional: points to a secret object containing parameters used to connect + // Optional: points to a secret object containing parameters used to connect // to OpenStack. // +optional optional SecretReference secretRef = 4; @@ -368,24 +370,24 @@ message CinderPersistentVolumeSource { // The volume must also be in the same region as the kubelet. // Cinder volumes support ownership management and SELinux relabeling. message CinderVolumeSource { - // volumeID used to identify the volume in cinder. + // volume id used to identify the volume in cinder. // More info: https://examples.k8s.io/mysql-cinder-pd/README.md optional string volumeID = 1; - // fsType is the filesystem type to mount. + // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // More info: https://examples.k8s.io/mysql-cinder-pd/README.md // +optional optional string fsType = 2; - // readOnly defaults to false (read/write). ReadOnly here will force + // Optional: Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // More info: https://examples.k8s.io/mysql-cinder-pd/README.md // +optional optional bool readOnly = 3; - // secretRef is optional: points to a secret object containing parameters used to connect + // Optional: points to a secret object containing parameters used to connect // to OpenStack. // +optional optional LocalObjectReference secretRef = 4; @@ -555,7 +557,7 @@ message ConfigMapNodeConfigSource { message ConfigMapProjection { optional LocalObjectReference localObjectReference = 1; - // items if unspecified, each key-value pair in the Data field of the referenced + // If unspecified, each key-value pair in the Data field of the referenced // ConfigMap will be projected into the volume as a file whose name is the // key and content is the value. If specified, the listed keys will be // projected into the specified paths, and unlisted keys will not be @@ -565,7 +567,7 @@ message ConfigMapProjection { // +optional repeated KeyToPath items = 2; - // optional specify whether the ConfigMap or its keys must be defined + // Specify whether the ConfigMap or its keys must be defined // +optional optional bool optional = 4; } @@ -579,7 +581,7 @@ message ConfigMapProjection { message ConfigMapVolumeSource { optional LocalObjectReference localObjectReference = 1; - // items if unspecified, each key-value pair in the Data field of the referenced + // If unspecified, each key-value pair in the Data field of the referenced // ConfigMap will be projected into the volume as a file whose name is the // key and content is the value. If specified, the listed keys will be // projected into the specified paths, and unlisted keys will not be @@ -589,7 +591,7 @@ message ConfigMapVolumeSource { // +optional repeated KeyToPath items = 2; - // defaultMode is optional: mode bits used to set permissions on created files by default. + // Optional: mode bits used to set permissions on created files by default. // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. // Defaults to 0644. @@ -599,7 +601,7 @@ message ConfigMapVolumeSource { // +optional optional int32 defaultMode = 3; - // optional specify whether the ConfigMap or its keys must be defined + // Specify whether the ConfigMap or its keys must be defined // +optional optional bool optional = 4; } @@ -611,7 +613,7 @@ message Container { // Cannot be updated. optional string name = 1; - // Container image name. + // Docker image name. // More info: https://kubernetes.io/docs/concepts/containers/images // This field is optional to allow higher level config management to default or override // container images in workload controllers like Deployments and StatefulSets. @@ -619,7 +621,7 @@ message Container { optional string image = 2; // Entrypoint array. Not executed within a shell. - // The container image's ENTRYPOINT is used if this is not provided. + // The docker image's ENTRYPOINT is used if this is not provided. // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable // cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced // to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will @@ -630,7 +632,7 @@ message Container { repeated string command = 3; // Arguments to the entrypoint. - // The container image's CMD is used if this is not provided. + // The docker image's CMD is used if this is not provided. // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable // cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced // to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will @@ -873,7 +875,7 @@ message ContainerStateTerminated { // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.Time finishedAt = 6; - // Container's ID in the format '://' + // Container's ID in the format 'docker://' // +optional optional string containerID = 7; } @@ -916,7 +918,7 @@ message ContainerStatus { // ImageID of the container's image. optional string imageID = 7; - // Container's ID in the format '://'. + // Container's ID in the format 'docker://'. // +optional optional string containerID = 8; @@ -989,14 +991,14 @@ message DownwardAPIVolumeSource { // Represents an empty directory for a pod. // Empty directory volumes support ownership management and SELinux relabeling. message EmptyDirVolumeSource { - // medium represents what type of storage medium should back this directory. + // What type of storage medium should back this directory. // The default is "" which means to use the node's default medium. // Must be an empty string (default) or Memory. // More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir // +optional optional string medium = 1; - // sizeLimit is the total amount of local storage required for this EmptyDir volume. + // Total amount of local storage required for this EmptyDir volume. // The size limit is also applicable for memory medium. // The maximum usage on memory medium EmptyDir would be the minimum value between // the SizeLimit specified here and the sum of memory limits of all containers in a pod. @@ -1052,7 +1054,7 @@ message EndpointPort { // The application protocol for this port. // This field follows standard Kubernetes label syntax. // Un-prefixed names are reserved for IANA standard service names (as per - // RFC-6335 and https://www.iana.org/assignments/service-names). + // RFC-6335 and http://www.iana.org/assignments/service-names). // Non-standard protocols should use prefixed names such as // mycompany.com/my-custom-protocol. // +optional @@ -1220,12 +1222,12 @@ message EphemeralContainerCommon { // This name must be unique among all containers, init containers and ephemeral containers. optional string name = 1; - // Container image name. + // Docker image name. // More info: https://kubernetes.io/docs/concepts/containers/images optional string image = 2; // Entrypoint array. Not executed within a shell. - // The image's ENTRYPOINT is used if this is not provided. + // The docker image's ENTRYPOINT is used if this is not provided. // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable // cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced // to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will @@ -1236,7 +1238,7 @@ message EphemeralContainerCommon { repeated string command = 3; // Arguments to the entrypoint. - // The image's CMD is used if this is not provided. + // The docker image's CMD is used if this is not provided. // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable // cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced // to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will @@ -1510,27 +1512,27 @@ message ExecAction { // Fibre Channel volumes can only be mounted as read/write once. // Fibre Channel volumes support ownership management and SELinux relabeling. message FCVolumeSource { - // targetWWNs is Optional: FC target worldwide names (WWNs) + // Optional: FC target worldwide names (WWNs) // +optional repeated string targetWWNs = 1; - // lun is Optional: FC target lun number + // Optional: FC target lun number // +optional optional int32 lun = 2; - // fsType is the filesystem type to mount. + // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // TODO: how do we prevent errors in the filesystem from compromising the machine // +optional optional string fsType = 3; - // readOnly is Optional: Defaults to false (read/write). ReadOnly here will force + // Optional: Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // +optional optional bool readOnly = 4; - // wwids Optional: FC volume world wide identifiers (wwids) + // Optional: FC volume world wide identifiers (wwids) // Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. // +optional repeated string wwids = 5; @@ -1539,16 +1541,16 @@ message FCVolumeSource { // FlexPersistentVolumeSource represents a generic persistent volume resource that is // provisioned/attached using an exec based plugin. message FlexPersistentVolumeSource { - // driver is the name of the driver to use for this volume. + // Driver is the name of the driver to use for this volume. optional string driver = 1; - // fsType is the Filesystem type to mount. + // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. // +optional optional string fsType = 2; - // secretRef is Optional: SecretRef is reference to the secret object containing + // Optional: SecretRef is reference to the secret object containing // sensitive information to pass to the plugin scripts. This may be // empty if no secret object is specified. If the secret object // contains more than one secret, all secrets are passed to the plugin @@ -1556,12 +1558,12 @@ message FlexPersistentVolumeSource { // +optional optional SecretReference secretRef = 3; - // readOnly is Optional: defaults to false (read/write). ReadOnly here will force + // Optional: Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // +optional optional bool readOnly = 4; - // options is Optional: this field holds extra command options if any. + // Optional: Extra command options if any. // +optional map options = 5; } @@ -1569,16 +1571,16 @@ message FlexPersistentVolumeSource { // FlexVolume represents a generic volume resource that is // provisioned/attached using an exec based plugin. message FlexVolumeSource { - // driver is the name of the driver to use for this volume. + // Driver is the name of the driver to use for this volume. optional string driver = 1; - // fsType is the filesystem type to mount. + // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. // +optional optional string fsType = 2; - // secretRef is Optional: secretRef is reference to the secret object containing + // Optional: SecretRef is reference to the secret object containing // sensitive information to pass to the plugin scripts. This may be // empty if no secret object is specified. If the secret object // contains more than one secret, all secrets are passed to the plugin @@ -1586,12 +1588,12 @@ message FlexVolumeSource { // +optional optional LocalObjectReference secretRef = 3; - // readOnly is Optional: defaults to false (read/write). ReadOnly here will force + // Optional: Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // +optional optional bool readOnly = 4; - // options is Optional: this field holds extra command options if any. + // Optional: Extra command options if any. // +optional map options = 5; } @@ -1600,12 +1602,12 @@ message FlexVolumeSource { // One and only one of datasetName and datasetUUID should be set. // Flocker volumes do not support ownership management or SELinux relabeling. message FlockerVolumeSource { - // datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker + // Name of the dataset stored as metadata -> name on the dataset for Flocker // should be considered as deprecated // +optional optional string datasetName = 1; - // datasetUUID is the UUID of the dataset. This is unique identifier of a Flocker dataset + // UUID of the dataset. This is unique identifier of a Flocker dataset // +optional optional string datasetUUID = 2; } @@ -1617,11 +1619,11 @@ message FlockerVolumeSource { // can only be mounted as read/write once or read-only many times. GCE // PDs support ownership management and SELinux relabeling. message GCEPersistentDiskVolumeSource { - // pdName is unique name of the PD resource in GCE. Used to identify the disk in GCE. + // Unique name of the PD resource in GCE. Used to identify the disk in GCE. // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk optional string pdName = 1; - // fsType is filesystem type of the volume that you want to mount. + // Filesystem type of the volume that you want to mount. // Tip: Ensure that the filesystem type is supported by the host operating system. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk @@ -1629,7 +1631,7 @@ message GCEPersistentDiskVolumeSource { // +optional optional string fsType = 2; - // partition is the partition in the volume that you want to mount. + // The partition in the volume that you want to mount. // If omitted, the default is to mount by volume name. // Examples: For volume /dev/sda1, you specify the partition as "1". // Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). @@ -1637,7 +1639,7 @@ message GCEPersistentDiskVolumeSource { // +optional optional int32 partition = 3; - // readOnly here will force the ReadOnly setting in VolumeMounts. + // ReadOnly here will force the ReadOnly setting in VolumeMounts. // Defaults to false. // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk // +optional @@ -1665,14 +1667,14 @@ message GRPCAction { // EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir // into the Pod's container. message GitRepoVolumeSource { - // repository is the URL + // Repository URL optional string repository = 1; - // revision is the commit hash for the specified revision. + // Commit hash for the specified revision. // +optional optional string revision = 2; - // directory is the target directory name. + // Target directory name. // Must not contain or start with '..'. If '.' is supplied, the volume directory will be the // git repository. Otherwise, if specified, the volume will contain the git repository in // the subdirectory with the given name. @@ -1683,21 +1685,21 @@ message GitRepoVolumeSource { // Represents a Glusterfs mount that lasts the lifetime of a pod. // Glusterfs volumes do not support ownership management or SELinux relabeling. message GlusterfsPersistentVolumeSource { - // endpoints is the endpoint name that details Glusterfs topology. + // EndpointsName is the endpoint name that details Glusterfs topology. // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod optional string endpoints = 1; - // path is the Glusterfs volume path. + // Path is the Glusterfs volume path. // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod optional string path = 2; - // readOnly here will force the Glusterfs volume to be mounted with read-only permissions. + // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. // Defaults to false. // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod // +optional optional bool readOnly = 3; - // endpointsNamespace is the namespace that contains Glusterfs endpoint. + // EndpointsNamespace is the namespace that contains Glusterfs endpoint. // If this field is empty, the EndpointNamespace defaults to the same namespace as the bound PVC. // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod // +optional @@ -1707,15 +1709,15 @@ message GlusterfsPersistentVolumeSource { // Represents a Glusterfs mount that lasts the lifetime of a pod. // Glusterfs volumes do not support ownership management or SELinux relabeling. message GlusterfsVolumeSource { - // endpoints is the endpoint name that details Glusterfs topology. + // EndpointsName is the endpoint name that details Glusterfs topology. // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod optional string endpoints = 1; - // path is the Glusterfs volume path. + // Path is the Glusterfs volume path. // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod optional string path = 2; - // readOnly here will force the Glusterfs volume to be mounted with read-only permissions. + // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. // Defaults to false. // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod // +optional @@ -1770,12 +1772,12 @@ message HostAlias { // Represents a host path mapped into a pod. // Host path volumes do not support ownership management or SELinux relabeling. message HostPathVolumeSource { - // path of the directory on the host. + // Path of the directory on the host. // If the path is a symlink, it will follow the link to the real path. // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath optional string path = 1; - // type for HostPath Volume + // Type for HostPath Volume // Defaults to "" // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath // +optional @@ -1786,22 +1788,22 @@ message HostPathVolumeSource { // ISCSI volumes can only be mounted as read/write once. // ISCSI volumes support ownership management and SELinux relabeling. message ISCSIPersistentVolumeSource { - // targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port + // iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port // is other than default (typically TCP ports 860 and 3260). optional string targetPortal = 1; - // iqn is Target iSCSI Qualified Name. + // Target iSCSI Qualified Name. optional string iqn = 2; - // lun is iSCSI Target Lun number. + // iSCSI Target Lun number. optional int32 lun = 3; - // iscsiInterface is the interface Name that uses an iSCSI transport. + // iSCSI Interface Name that uses an iSCSI transport. // Defaults to 'default' (tcp). // +optional optional string iscsiInterface = 4; - // fsType is the filesystem type of the volume that you want to mount. + // Filesystem type of the volume that you want to mount. // Tip: Ensure that the filesystem type is supported by the host operating system. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi @@ -1809,29 +1811,29 @@ message ISCSIPersistentVolumeSource { // +optional optional string fsType = 5; - // readOnly here will force the ReadOnly setting in VolumeMounts. + // ReadOnly here will force the ReadOnly setting in VolumeMounts. // Defaults to false. // +optional optional bool readOnly = 6; - // portals is the iSCSI Target Portal List. The Portal is either an IP or ip_addr:port if the port + // iSCSI Target Portal List. The Portal is either an IP or ip_addr:port if the port // is other than default (typically TCP ports 860 and 3260). // +optional repeated string portals = 7; - // chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication + // whether support iSCSI Discovery CHAP authentication // +optional optional bool chapAuthDiscovery = 8; - // chapAuthSession defines whether support iSCSI Session CHAP authentication + // whether support iSCSI Session CHAP authentication // +optional optional bool chapAuthSession = 11; - // secretRef is the CHAP Secret for iSCSI target and initiator authentication + // CHAP Secret for iSCSI target and initiator authentication // +optional optional SecretReference secretRef = 10; - // initiatorName is the custom iSCSI Initiator Name. + // Custom iSCSI Initiator Name. // If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface // : will be created for the connection. // +optional @@ -1842,22 +1844,22 @@ message ISCSIPersistentVolumeSource { // ISCSI volumes can only be mounted as read/write once. // ISCSI volumes support ownership management and SELinux relabeling. message ISCSIVolumeSource { - // targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port + // iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port // is other than default (typically TCP ports 860 and 3260). optional string targetPortal = 1; - // iqn is the target iSCSI Qualified Name. + // Target iSCSI Qualified Name. optional string iqn = 2; - // lun represents iSCSI Target Lun number. + // iSCSI Target Lun number. optional int32 lun = 3; - // iscsiInterface is the interface Name that uses an iSCSI transport. + // iSCSI Interface Name that uses an iSCSI transport. // Defaults to 'default' (tcp). // +optional optional string iscsiInterface = 4; - // fsType is the filesystem type of the volume that you want to mount. + // Filesystem type of the volume that you want to mount. // Tip: Ensure that the filesystem type is supported by the host operating system. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi @@ -1865,29 +1867,29 @@ message ISCSIVolumeSource { // +optional optional string fsType = 5; - // readOnly here will force the ReadOnly setting in VolumeMounts. + // ReadOnly here will force the ReadOnly setting in VolumeMounts. // Defaults to false. // +optional optional bool readOnly = 6; - // portals is the iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port + // iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port // is other than default (typically TCP ports 860 and 3260). // +optional repeated string portals = 7; - // chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication + // whether support iSCSI Discovery CHAP authentication // +optional optional bool chapAuthDiscovery = 8; - // chapAuthSession defines whether support iSCSI Session CHAP authentication + // whether support iSCSI Session CHAP authentication // +optional optional bool chapAuthSession = 11; - // secretRef is the CHAP Secret for iSCSI target and initiator authentication + // CHAP Secret for iSCSI target and initiator authentication // +optional optional LocalObjectReference secretRef = 10; - // initiatorName is the custom iSCSI Initiator Name. + // Custom iSCSI Initiator Name. // If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface // : will be created for the connection. // +optional @@ -1896,16 +1898,16 @@ message ISCSIVolumeSource { // Maps a string key to a path within a volume. message KeyToPath { - // key is the key to project. + // The key to project. optional string key = 1; - // path is the relative path of the file to map the key to. + // The relative path of the file to map the key to. // May not be an absolute path. // May not contain the path element '..'. // May not start with the string '..'. optional string path = 2; - // mode is Optional: mode bits used to set permissions on this file. + // Optional: mode bits used to set permissions on this file. // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. // If not specified, the volume defaultMode will be used. @@ -2066,11 +2068,11 @@ message LocalObjectReference { // Local represents directly-attached storage with node affinity (Beta feature) message LocalVolumeSource { - // path of the full path to the volume on the node. + // The full path to the volume on the node. // It can be either a directory or block device (disk, partition, ...). optional string path = 1; - // fsType is the filesystem type to mount. + // Filesystem type to mount. // It applies only when the Path is a block device. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". The default value is to auto-select a filesystem if unspecified. @@ -2081,15 +2083,16 @@ message LocalVolumeSource { // Represents an NFS mount that lasts the lifetime of a pod. // NFS volumes do not support ownership management or SELinux relabeling. message NFSVolumeSource { - // server is the hostname or IP address of the NFS server. + // Server is the hostname or IP address of the NFS server. // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs optional string server = 1; - // path that is exported by the NFS server. + // Path that is exported by the NFS server. // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs optional string path = 2; - // readOnly here will force the NFS export to be mounted with read-only permissions. + // ReadOnly here will force + // the NFS export to be mounted with read-only permissions. // Defaults to false. // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs // +optional @@ -2402,7 +2405,9 @@ message NodeSpec { // +optional repeated Taint taints = 5; - // Deprecated: Previously used to specify the source of the node's configuration for the DynamicKubeletConfig feature. This feature is removed from Kubelets as of 1.24 and will be fully removed in 1.26. + // Deprecated. If specified, the source of the node's configuration. + // The DynamicKubeletConfig feature gate must be enabled for the Kubelet to use this field. + // This field is deprecated as of 1.22: https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration // +optional optional NodeConfigSource configSource = 6; @@ -2495,7 +2500,7 @@ message NodeSystemInfo { // OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)). optional string osImage = 5; - // ContainerRuntime Version reported by the node through runtime remote API (e.g. containerd://1.4.2). + // ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0). optional string containerRuntimeVersion = 6; // Kubelet Version reported by the node. @@ -2590,13 +2595,13 @@ message PersistentVolume { // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - // spec defines a specification of a persistent volume owned by the cluster. + // Spec defines a specification of a persistent volume owned by the cluster. // Provisioned by an administrator. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes // +optional optional PersistentVolumeSpec spec = 2; - // status represents the current information/status for the persistent volume. + // Status represents the current information/status for the persistent volume. // Populated by the system. // Read-only. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes @@ -2611,12 +2616,12 @@ message PersistentVolumeClaim { // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - // spec defines the desired characteristics of a volume requested by a pod author. + // Spec defines the desired characteristics of a volume requested by a pod author. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims // +optional optional PersistentVolumeClaimSpec spec = 2; - // status represents the current information/status of a persistent volume claim. + // Status represents the current information/status of a persistent volume claim. // Read-only. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims // +optional @@ -2629,21 +2634,21 @@ message PersistentVolumeClaimCondition { optional string status = 2; - // lastProbeTime is the time we probed the condition. + // Last time we probed the condition. // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastProbeTime = 3; - // lastTransitionTime is the time the condition transitioned from one status to another. + // Last time the condition transitioned from one status to another. // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4; - // reason is a unique, this should be a short, machine understandable string that gives the reason + // Unique, this should be a short, machine understandable string that gives the reason // for condition's last transition. If it reports "ResizeStarted" that means the underlying // persistent volume is being resized. // +optional optional string reason = 5; - // message is the human-readable message indicating details about last transition. + // Human-readable message indicating details about last transition. // +optional optional string message = 6; } @@ -2655,7 +2660,7 @@ message PersistentVolumeClaimList { // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - // items is a list of persistent volume claims. + // A list of persistent volume claims. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims repeated PersistentVolumeClaim items = 2; } @@ -2663,16 +2668,16 @@ message PersistentVolumeClaimList { // PersistentVolumeClaimSpec describes the common attributes of storage devices // and allows a Source for provider-specific attributes message PersistentVolumeClaimSpec { - // accessModes contains the desired access modes the volume should have. + // AccessModes contains the desired access modes the volume should have. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 // +optional repeated string accessModes = 1; - // selector is a label query over volumes to consider for binding. + // A label query over volumes to consider for binding. // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 4; - // resources represents the minimum resources the volume should have. + // Resources represents the minimum resources the volume should have. // If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements // that are lower than previous value but must still be higher than capacity recorded in the // status field of the claim. @@ -2680,11 +2685,11 @@ message PersistentVolumeClaimSpec { // +optional optional ResourceRequirements resources = 2; - // volumeName is the binding reference to the PersistentVolume backing this claim. + // VolumeName is the binding reference to the PersistentVolume backing this claim. // +optional optional string volumeName = 3; - // storageClassName is the name of the StorageClass required by the claim. + // Name of the StorageClass required by the claim. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 // +optional optional string storageClassName = 5; @@ -2694,7 +2699,7 @@ message PersistentVolumeClaimSpec { // +optional optional string volumeMode = 6; - // dataSource field can be used to specify either: + // This field can be used to specify either: // * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) // * An existing PVC (PersistentVolumeClaim) // If the provisioner or an external controller can support the specified data source, @@ -2704,7 +2709,7 @@ message PersistentVolumeClaimSpec { // +optional optional TypedLocalObjectReference dataSource = 7; - // dataSourceRef specifies the object from which to populate the volume with data, if a non-empty + // Specifies the object from which to populate the volume with data, if a non-empty // volume is desired. This may be any local object from a non-empty API group (non // core object) or a PersistentVolumeClaim object. // When this field is specified, volume binding will only succeed if the type of @@ -2720,34 +2725,34 @@ message PersistentVolumeClaimSpec { // * While DataSource ignores disallowed values (dropping them), DataSourceRef // preserves all values, and generates an error if a disallowed value is // specified. - // (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. + // (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled. // +optional optional TypedLocalObjectReference dataSourceRef = 8; } // PersistentVolumeClaimStatus is the current status of a persistent volume claim. message PersistentVolumeClaimStatus { - // phase represents the current phase of PersistentVolumeClaim. + // Phase represents the current phase of PersistentVolumeClaim. // +optional optional string phase = 1; - // accessModes contains the actual access modes the volume backing the PVC has. + // AccessModes contains the actual access modes the volume backing the PVC has. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 // +optional repeated string accessModes = 2; - // capacity represents the actual resources of the underlying volume. + // Represents the actual resources of the underlying volume. // +optional map capacity = 3; - // conditions is the current Condition of persistent volume claim. If underlying persistent volume is being + // Current Condition of persistent volume claim. If underlying persistent volume is being // resized then the Condition will be set to 'ResizeStarted'. // +optional // +patchMergeKey=type // +patchStrategy=merge repeated PersistentVolumeClaimCondition conditions = 4; - // allocatedResources is the storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may + // The storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may // be larger than the actual capacity when a volume expansion operation is requested. // For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. // If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. @@ -2759,7 +2764,7 @@ message PersistentVolumeClaimStatus { // +optional map allocatedResources = 5; - // resizeStatus stores status of resize operation. + // ResizeStatus stores status of resize operation. // ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty // string by resize controller or kubelet. // This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. @@ -2790,11 +2795,11 @@ message PersistentVolumeClaimTemplate { // PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another // type of volume that is owned by someone else (the system). message PersistentVolumeClaimVolumeSource { - // claimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. + // ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims optional string claimName = 1; - // readOnly Will force the ReadOnly setting in VolumeMounts. + // Will force the ReadOnly setting in VolumeMounts. // Default false. // +optional optional bool readOnly = 2; @@ -2807,7 +2812,7 @@ message PersistentVolumeList { // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - // items is a list of persistent volumes. + // List of persistent volumes. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes repeated PersistentVolume items = 2; } @@ -2815,19 +2820,19 @@ message PersistentVolumeList { // PersistentVolumeSource is similar to VolumeSource but meant for the // administrator who creates PVs. Exactly one of its members must be set. message PersistentVolumeSource { - // gcePersistentDisk represents a GCE Disk resource that is attached to a + // GCEPersistentDisk represents a GCE Disk resource that is attached to a // kubelet's host machine and then exposed to the pod. Provisioned by an admin. // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk // +optional optional GCEPersistentDiskVolumeSource gcePersistentDisk = 1; - // awsElasticBlockStore represents an AWS Disk resource that is attached to a + // AWSElasticBlockStore represents an AWS Disk resource that is attached to a // kubelet's host machine and then exposed to the pod. // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore // +optional optional AWSElasticBlockStoreVolumeSource awsElasticBlockStore = 2; - // hostPath represents a directory on the host. + // HostPath represents a directory on the host. // Provisioned by a developer or tester. // This is useful for single-node development and testing only! // On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. @@ -2835,113 +2840,113 @@ message PersistentVolumeSource { // +optional optional HostPathVolumeSource hostPath = 3; - // glusterfs represents a Glusterfs volume that is attached to a host and + // Glusterfs represents a Glusterfs volume that is attached to a host and // exposed to the pod. Provisioned by an admin. // More info: https://examples.k8s.io/volumes/glusterfs/README.md // +optional optional GlusterfsPersistentVolumeSource glusterfs = 4; - // nfs represents an NFS mount on the host. Provisioned by an admin. + // NFS represents an NFS mount on the host. Provisioned by an admin. // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs // +optional optional NFSVolumeSource nfs = 5; - // rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. + // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. // More info: https://examples.k8s.io/volumes/rbd/README.md // +optional optional RBDPersistentVolumeSource rbd = 6; - // iscsi represents an ISCSI Disk resource that is attached to a + // ISCSI represents an ISCSI Disk resource that is attached to a // kubelet's host machine and then exposed to the pod. Provisioned by an admin. // +optional optional ISCSIPersistentVolumeSource iscsi = 7; - // cinder represents a cinder volume attached and mounted on kubelets host machine. + // Cinder represents a cinder volume attached and mounted on kubelets host machine. // More info: https://examples.k8s.io/mysql-cinder-pd/README.md // +optional optional CinderPersistentVolumeSource cinder = 8; - // cephFS represents a Ceph FS mount on the host that shares a pod's lifetime + // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime // +optional optional CephFSPersistentVolumeSource cephfs = 9; - // fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. // +optional optional FCVolumeSource fc = 10; - // flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running + // Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running // +optional optional FlockerVolumeSource flocker = 11; - // flexVolume represents a generic volume resource that is + // FlexVolume represents a generic volume resource that is // provisioned/attached using an exec based plugin. // +optional optional FlexPersistentVolumeSource flexVolume = 12; - // azureFile represents an Azure File Service mount on the host and bind mount to the pod. + // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. // +optional optional AzureFilePersistentVolumeSource azureFile = 13; - // vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine // +optional optional VsphereVirtualDiskVolumeSource vsphereVolume = 14; - // quobyte represents a Quobyte mount on the host that shares a pod's lifetime + // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime // +optional optional QuobyteVolumeSource quobyte = 15; - // azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. // +optional optional AzureDiskVolumeSource azureDisk = 16; - // photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine + // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine optional PhotonPersistentDiskVolumeSource photonPersistentDisk = 17; - // portworxVolume represents a portworx volume attached and mounted on kubelets host machine + // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine // +optional optional PortworxVolumeSource portworxVolume = 18; - // scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. // +optional optional ScaleIOPersistentVolumeSource scaleIO = 19; - // local represents directly-attached storage with node affinity + // Local represents directly-attached storage with node affinity // +optional optional LocalVolumeSource local = 20; - // storageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod + // StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod // More info: https://examples.k8s.io/volumes/storageos/README.md // +optional optional StorageOSPersistentVolumeSource storageos = 21; - // csi represents storage that is handled by an external CSI driver (Beta feature). + // CSI represents storage that is handled by an external CSI driver (Beta feature). // +optional optional CSIPersistentVolumeSource csi = 22; } // PersistentVolumeSpec is the specification of a persistent volume. message PersistentVolumeSpec { - // capacity is the description of the persistent volume's resources and capacity. + // A description of the persistent volume's resources and capacity. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity // +optional map capacity = 1; - // persistentVolumeSource is the actual volume backing the persistent volume. + // The actual volume backing the persistent volume. optional PersistentVolumeSource persistentVolumeSource = 2; - // accessModes contains all ways the volume can be mounted. + // AccessModes contains all ways the volume can be mounted. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes // +optional repeated string accessModes = 3; - // claimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. + // ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. // Expected to be non-nil when bound. // claim.VolumeName is the authoritative bind between PV and PVC. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding // +optional optional ObjectReference claimRef = 4; - // persistentVolumeReclaimPolicy defines what happens to a persistent volume when released from its claim. + // What happens to a persistent volume when released from its claim. // Valid options are Retain (default for manually created PersistentVolumes), Delete (default // for dynamically provisioned PersistentVolumes), and Recycle (deprecated). // Recycle must be supported by the volume plugin underlying this PersistentVolume. @@ -2949,12 +2954,12 @@ message PersistentVolumeSpec { // +optional optional string persistentVolumeReclaimPolicy = 5; - // storageClassName is the name of StorageClass to which this persistent volume belongs. Empty value + // Name of StorageClass to which this persistent volume belongs. Empty value // means that this volume does not belong to any StorageClass. // +optional optional string storageClassName = 6; - // mountOptions is the list of mount options, e.g. ["ro", "soft"]. Not validated - mount will + // A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will // simply fail if one is invalid. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options // +optional @@ -2965,7 +2970,7 @@ message PersistentVolumeSpec { // +optional optional string volumeMode = 8; - // nodeAffinity defines constraints that limit what nodes this volume can be accessed from. + // NodeAffinity defines constraints that limit what nodes this volume can be accessed from. // This field influences the scheduling of pods that use this volume. // +optional optional VolumeNodeAffinity nodeAffinity = 9; @@ -2973,16 +2978,16 @@ message PersistentVolumeSpec { // PersistentVolumeStatus is the current status of a persistent volume. message PersistentVolumeStatus { - // phase indicates if a volume is available, bound to a claim, or released by a claim. + // Phase indicates if a volume is available, bound to a claim, or released by a claim. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase // +optional optional string phase = 1; - // message is a human-readable message indicating details about why the volume is in this state. + // A human-readable message indicating details about why the volume is in this state. // +optional optional string message = 2; - // reason is a brief CamelCase string that describes any failure and is meant + // Reason is a brief CamelCase string that describes any failure and is meant // for machine parsing and tidy display in the CLI. // +optional optional string reason = 3; @@ -2990,10 +2995,10 @@ message PersistentVolumeStatus { // Represents a Photon Controller persistent disk resource. message PhotonPersistentDiskVolumeSource { - // pdID is the ID that identifies Photon Controller persistent disk + // ID that identifies Photon Controller persistent disk optional string pdID = 1; - // fsType is the filesystem type to mount. + // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. optional string fsType = 2; @@ -3060,7 +3065,7 @@ message PodAffinityTerm { // namespaces specifies a static list of namespace names that the term applies to. // The term is applied to the union of the namespaces listed in this field // and the ones selected by namespaceSelector. - // null or empty namespaces list and null namespaceSelector means "this pod's namespace". + // null or empty namespaces list and null namespaceSelector means "this pod's namespace" // +optional repeated string namespaces = 2; @@ -3076,6 +3081,7 @@ message PodAffinityTerm { // and the ones listed in the namespaces field. // null selector and null or empty namespaces list means "this pod's namespace". // An empty selector ({}) matches all namespaces. + // This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 4; } @@ -3575,7 +3581,8 @@ message PodSpec { optional PodSecurityContext securityContext = 14; // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. - // If specified, these secrets will be passed to individual puller implementations for them to use. + // If specified, these secrets will be passed to individual puller implementations for them to use. For example, + // in the case of docker, only DockerConfig type secrets are honored. // More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod // +optional // +patchMergeKey=name @@ -3647,6 +3654,7 @@ message PodSpec { // If unset or empty, the "legacy" RuntimeClass will be used, which is an implicit class with an // empty definition that uses the default runtime handler. // More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class + // This is a beta feature as of Kubernetes v1.14. // +optional optional string runtimeClassName = 29; @@ -3659,6 +3667,7 @@ message PodSpec { // PreemptionPolicy is the Policy for preempting pods with lower priority. // One of Never, PreemptLowerPriority. // Defaults to PreemptLowerPriority if unset. + // This field is beta-level, gated by the NonPreemptingPriority feature-gate. // +optional optional string preemptionPolicy = 31; @@ -3669,6 +3678,7 @@ message PodSpec { // set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value // defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. // More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md + // This field is beta-level as of Kubernetes v1.18, and is only honored by servers that enable the PodOverhead feature. // +optional map overhead = 32; @@ -3719,7 +3729,7 @@ message PodSpec { // - spec.containers[*].securityContext.runAsUser // - spec.containers[*].securityContext.runAsGroup // +optional - // This is a beta field and requires the IdentifyPodOS feature + // This is an alpha field and requires the IdentifyPodOS feature optional PodOS os = 36; } @@ -3802,7 +3812,8 @@ message PodStatus { // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status repeated ContainerStatus initContainerStatuses = 10; - // The list has one entry per container in the manifest. + // The list has one entry per container in the manifest. Each entry is currently the output + // of `docker inspect`. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status // +optional repeated ContainerStatus containerStatuses = 8; @@ -3897,15 +3908,15 @@ message PortStatus { // PortworxVolumeSource represents a Portworx volume resource. message PortworxVolumeSource { - // volumeID uniquely identifies a Portworx volume + // VolumeID uniquely identifies a Portworx volume optional string volumeID = 1; - // fSType represents the filesystem type to mount + // FSType represents the filesystem type to mount // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. optional string fsType = 2; - // readOnly defaults to false (read/write). ReadOnly here will force + // Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // +optional optional bool readOnly = 3; @@ -4009,7 +4020,7 @@ message ProbeHandler { optional TCPSocketAction tcpSocket = 3; // GRPC specifies an action involving a GRPC port. - // This is a beta field and requires enabling GRPCContainerProbe feature gate. + // This is an alpha field and requires enabling GRPCContainerProbe feature gate. // +featureGate=GRPCContainerProbe // +optional optional GRPCAction grpc = 4; @@ -4017,11 +4028,11 @@ message ProbeHandler { // Represents a projected volume source message ProjectedVolumeSource { - // sources is the list of volume projections + // list of volume projections // +optional repeated VolumeProjection sources = 1; - // defaultMode are the mode bits used to set permissions on created files by default. + // Mode bits used to set permissions on created files by default. // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. // Directories within the path are not affected by this setting. @@ -4034,30 +4045,30 @@ message ProjectedVolumeSource { // Represents a Quobyte mount that lasts the lifetime of a pod. // Quobyte volumes do not support ownership management or SELinux relabeling. message QuobyteVolumeSource { - // registry represents a single or multiple Quobyte Registry services + // Registry represents a single or multiple Quobyte Registry services // specified as a string as host:port pair (multiple entries are separated with commas) // which acts as the central registry for volumes optional string registry = 1; - // volume is a string that references an already created Quobyte volume by name. + // Volume is a string that references an already created Quobyte volume by name. optional string volume = 2; - // readOnly here will force the Quobyte volume to be mounted with read-only permissions. + // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. // Defaults to false. // +optional optional bool readOnly = 3; - // user to map volume access to + // User to map volume access to // Defaults to serivceaccount user // +optional optional string user = 4; - // group to map volume access to + // Group to map volume access to // Default is no group // +optional optional string group = 5; - // tenant owning the given Quobyte volume in the Backend + // Tenant owning the given Quobyte volume in the Backend // Used with dynamically provisioned Quobyte volumes, value is set by the plugin // +optional optional string tenant = 6; @@ -4066,15 +4077,15 @@ message QuobyteVolumeSource { // Represents a Rados Block Device mount that lasts the lifetime of a pod. // RBD volumes support ownership management and SELinux relabeling. message RBDPersistentVolumeSource { - // monitors is a collection of Ceph monitors. + // A collection of Ceph monitors. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it repeated string monitors = 1; - // image is the rados image name. + // The rados image name. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it optional string image = 2; - // fsType is the filesystem type of the volume that you want to mount. + // Filesystem type of the volume that you want to mount. // Tip: Ensure that the filesystem type is supported by the host operating system. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd @@ -4082,32 +4093,32 @@ message RBDPersistentVolumeSource { // +optional optional string fsType = 3; - // pool is the rados pool name. + // The rados pool name. // Default is rbd. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it // +optional optional string pool = 4; - // user is the rados user name. + // The rados user name. // Default is admin. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it // +optional optional string user = 5; - // keyring is the path to key ring for RBDUser. + // Keyring is the path to key ring for RBDUser. // Default is /etc/ceph/keyring. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it // +optional optional string keyring = 6; - // secretRef is name of the authentication secret for RBDUser. If provided + // SecretRef is name of the authentication secret for RBDUser. If provided // overrides keyring. // Default is nil. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it // +optional optional SecretReference secretRef = 7; - // readOnly here will force the ReadOnly setting in VolumeMounts. + // ReadOnly here will force the ReadOnly setting in VolumeMounts. // Defaults to false. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it // +optional @@ -4117,15 +4128,15 @@ message RBDPersistentVolumeSource { // Represents a Rados Block Device mount that lasts the lifetime of a pod. // RBD volumes support ownership management and SELinux relabeling. message RBDVolumeSource { - // monitors is a collection of Ceph monitors. + // A collection of Ceph monitors. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it repeated string monitors = 1; - // image is the rados image name. + // The rados image name. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it optional string image = 2; - // fsType is the filesystem type of the volume that you want to mount. + // Filesystem type of the volume that you want to mount. // Tip: Ensure that the filesystem type is supported by the host operating system. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd @@ -4133,32 +4144,32 @@ message RBDVolumeSource { // +optional optional string fsType = 3; - // pool is the rados pool name. + // The rados pool name. // Default is rbd. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it // +optional optional string pool = 4; - // user is the rados user name. + // The rados user name. // Default is admin. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it // +optional optional string user = 5; - // keyring is the path to key ring for RBDUser. + // Keyring is the path to key ring for RBDUser. // Default is /etc/ceph/keyring. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it // +optional optional string keyring = 6; - // secretRef is name of the authentication secret for RBDUser. If provided + // SecretRef is name of the authentication secret for RBDUser. If provided // overrides keyring. // Default is nil. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it // +optional optional LocalObjectReference secretRef = 7; - // readOnly here will force the ReadOnly setting in VolumeMounts. + // ReadOnly here will force the ReadOnly setting in VolumeMounts. // Defaults to false. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it // +optional @@ -4407,45 +4418,45 @@ message SELinuxOptions { // ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume message ScaleIOPersistentVolumeSource { - // gateway is the host address of the ScaleIO API Gateway. + // The host address of the ScaleIO API Gateway. optional string gateway = 1; - // system is the name of the storage system as configured in ScaleIO. + // The name of the storage system as configured in ScaleIO. optional string system = 2; - // secretRef references to the secret for ScaleIO user and other + // SecretRef references to the secret for ScaleIO user and other // sensitive information. If this is not provided, Login operation will fail. optional SecretReference secretRef = 3; - // sslEnabled is the flag to enable/disable SSL communication with Gateway, default false + // Flag to enable/disable SSL communication with Gateway, default false // +optional optional bool sslEnabled = 4; - // protectionDomain is the name of the ScaleIO Protection Domain for the configured storage. + // The name of the ScaleIO Protection Domain for the configured storage. // +optional optional string protectionDomain = 5; - // storagePool is the ScaleIO Storage Pool associated with the protection domain. + // The ScaleIO Storage Pool associated with the protection domain. // +optional optional string storagePool = 6; - // storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. + // Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. // Default is ThinProvisioned. // +optional optional string storageMode = 7; - // volumeName is the name of a volume already created in the ScaleIO system + // The name of a volume already created in the ScaleIO system // that is associated with this volume source. optional string volumeName = 8; - // fsType is the filesystem type to mount. + // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". // Default is "xfs" // +optional optional string fsType = 9; - // readOnly defaults to false (read/write). ReadOnly here will force + // Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // +optional optional bool readOnly = 10; @@ -4453,45 +4464,45 @@ message ScaleIOPersistentVolumeSource { // ScaleIOVolumeSource represents a persistent ScaleIO volume message ScaleIOVolumeSource { - // gateway is the host address of the ScaleIO API Gateway. + // The host address of the ScaleIO API Gateway. optional string gateway = 1; - // system is the name of the storage system as configured in ScaleIO. + // The name of the storage system as configured in ScaleIO. optional string system = 2; - // secretRef references to the secret for ScaleIO user and other + // SecretRef references to the secret for ScaleIO user and other // sensitive information. If this is not provided, Login operation will fail. optional LocalObjectReference secretRef = 3; - // sslEnabled Flag enable/disable SSL communication with Gateway, default false + // Flag to enable/disable SSL communication with Gateway, default false // +optional optional bool sslEnabled = 4; - // protectionDomain is the name of the ScaleIO Protection Domain for the configured storage. + // The name of the ScaleIO Protection Domain for the configured storage. // +optional optional string protectionDomain = 5; - // storagePool is the ScaleIO Storage Pool associated with the protection domain. + // The ScaleIO Storage Pool associated with the protection domain. // +optional optional string storagePool = 6; - // storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. + // Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. // Default is ThinProvisioned. // +optional optional string storageMode = 7; - // volumeName is the name of a volume already created in the ScaleIO system + // The name of a volume already created in the ScaleIO system // that is associated with this volume source. optional string volumeName = 8; - // fsType is the filesystem type to mount. + // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". // Default is "xfs". // +optional optional string fsType = 9; - // readOnly Defaults to false (read/write). ReadOnly here will force + // Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // +optional optional bool readOnly = 10; @@ -4630,7 +4641,7 @@ message SecretList { message SecretProjection { optional LocalObjectReference localObjectReference = 1; - // items if unspecified, each key-value pair in the Data field of the referenced + // If unspecified, each key-value pair in the Data field of the referenced // Secret will be projected into the volume as a file whose name is the // key and content is the value. If specified, the listed keys will be // projected into the specified paths, and unlisted keys will not be @@ -4640,7 +4651,7 @@ message SecretProjection { // +optional repeated KeyToPath items = 2; - // optional field specify whether the Secret or its key must be defined + // Specify whether the Secret or its key must be defined // +optional optional bool optional = 4; } @@ -4649,11 +4660,11 @@ message SecretProjection { // in any namespace // +structType=atomic message SecretReference { - // name is unique within a namespace to reference a secret resource. + // Name is unique within a namespace to reference a secret resource. // +optional optional string name = 1; - // namespace defines the space within which the secret name must be unique. + // Namespace defines the space within which the secret name must be unique. // +optional optional string namespace = 2; } @@ -4664,12 +4675,12 @@ message SecretReference { // as files using the keys in the Data field as the file names. // Secret volumes support ownership management and SELinux relabeling. message SecretVolumeSource { - // secretName is the name of the secret in the pod's namespace to use. + // Name of the secret in the pod's namespace to use. // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret // +optional optional string secretName = 1; - // items If unspecified, each key-value pair in the Data field of the referenced + // If unspecified, each key-value pair in the Data field of the referenced // Secret will be projected into the volume as a file whose name is the // key and content is the value. If specified, the listed keys will be // projected into the specified paths, and unlisted keys will not be @@ -4679,7 +4690,7 @@ message SecretVolumeSource { // +optional repeated KeyToPath items = 2; - // defaultMode is Optional: mode bits used to set permissions on created files by default. + // Optional: mode bits used to set permissions on created files by default. // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. // YAML accepts both octal and decimal values, JSON requires decimal values // for mode bits. Defaults to 0644. @@ -4689,7 +4700,7 @@ message SecretVolumeSource { // +optional optional int32 defaultMode = 3; - // optional field specify whether the Secret or its keys must be defined + // Specify whether the Secret or its keys must be defined // +optional optional bool optional = 4; } @@ -4822,10 +4833,7 @@ message ServiceAccount { // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - // Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. - // Pods are only limited to this list if this service account has a "kubernetes.io/enforce-mountable-secrets" annotation set to "true". - // This field should not be used to find auto-generated service account token secrets for use outside of pods. - // Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. + // Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount. // More info: https://kubernetes.io/docs/concepts/configuration/secret // +optional // +patchMergeKey=name @@ -4862,14 +4870,14 @@ message ServiceAccountList { // the pods runtime filesystem for use against APIs (Kubernetes API Server or // otherwise). message ServiceAccountTokenProjection { - // audience is the intended audience of the token. A recipient of a token + // Audience is the intended audience of the token. A recipient of a token // must identify itself with an identifier specified in the audience of the // token, and otherwise should reject the token. The audience defaults to the // identifier of the apiserver. // +optional optional string audience = 1; - // expirationSeconds is the requested duration of validity of the service + // ExpirationSeconds is the requested duration of validity of the service // account token. As the token approaches expiration, the kubelet volume // plugin will proactively rotate the service account token. The kubelet will // start trying to rotate the token if the token is older than 80 percent of @@ -4878,7 +4886,7 @@ message ServiceAccountTokenProjection { // +optional optional int64 expirationSeconds = 2; - // path is the path relative to the mount point of the file to project the + // Path is the path relative to the mount point of the file to project the // token into. optional string path = 3; } @@ -4913,7 +4921,7 @@ message ServicePort { // The application protocol for this port. // This field follows standard Kubernetes label syntax. // Un-prefixed names are reserved for IANA standard service names (as per - // RFC-6335 and https://www.iana.org/assignments/service-names). + // RFC-6335 and http://www.iana.org/assignments/service-names). // Non-standard protocols should use prefixed names such as // mycompany.com/my-custom-protocol. // +optional @@ -5058,14 +5066,11 @@ message ServiceSpec { // +optional optional string sessionAffinity = 7; - // Only applies to Service Type: LoadBalancer. + // Only applies to Service Type: LoadBalancer + // LoadBalancer will get created with the IP specified in this field. // This feature depends on whether the underlying cloud-provider supports specifying // the loadBalancerIP when a load balancer is created. // This field will be ignored if the cloud-provider does not support the feature. - // Deprecated: This field was under-specified and its meaning varies across implementations, - // and it cannot support dual-stack. - // As of Kubernetes v1.24, users are encouraged to use implementation-specific annotations when available. - // This field may be removed in a future API version. // +optional optional string loadBalancerIP = 8; @@ -5157,6 +5162,8 @@ message ServiceSpec { // value), those requests will be respected, regardless of this field. // This field may only be set for services with type LoadBalancer and will // be cleared if the type is changed to any other type. + // This field is beta-level and is only honored by servers that enable the ServiceLBNodePortControl feature. + // +featureGate=ServiceLBNodePortControl // +optional optional bool allocateLoadBalancerNodePorts = 20; @@ -5210,11 +5217,11 @@ message SessionAffinityConfig { // Represents a StorageOS persistent volume resource. message StorageOSPersistentVolumeSource { - // volumeName is the human-readable name of the StorageOS volume. Volume + // VolumeName is the human-readable name of the StorageOS volume. Volume // names are only unique within a namespace. optional string volumeName = 1; - // volumeNamespace specifies the scope of the volume within StorageOS. If no + // VolumeNamespace specifies the scope of the volume within StorageOS. If no // namespace is specified then the Pod's namespace will be used. This allows the // Kubernetes name scoping to be mirrored within StorageOS for tighter integration. // Set VolumeName to any name to override the default behaviour. @@ -5223,18 +5230,18 @@ message StorageOSPersistentVolumeSource { // +optional optional string volumeNamespace = 2; - // fsType is the filesystem type to mount. + // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // +optional optional string fsType = 3; - // readOnly defaults to false (read/write). ReadOnly here will force + // Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // +optional optional bool readOnly = 4; - // secretRef specifies the secret to use for obtaining the StorageOS API + // SecretRef specifies the secret to use for obtaining the StorageOS API // credentials. If not specified, default values will be attempted. // +optional optional ObjectReference secretRef = 5; @@ -5242,11 +5249,11 @@ message StorageOSPersistentVolumeSource { // Represents a StorageOS persistent volume resource. message StorageOSVolumeSource { - // volumeName is the human-readable name of the StorageOS volume. Volume + // VolumeName is the human-readable name of the StorageOS volume. Volume // names are only unique within a namespace. optional string volumeName = 1; - // volumeNamespace specifies the scope of the volume within StorageOS. If no + // VolumeNamespace specifies the scope of the volume within StorageOS. If no // namespace is specified then the Pod's namespace will be used. This allows the // Kubernetes name scoping to be mirrored within StorageOS for tighter integration. // Set VolumeName to any name to override the default behaviour. @@ -5255,18 +5262,18 @@ message StorageOSVolumeSource { // +optional optional string volumeNamespace = 2; - // fsType is the filesystem type to mount. + // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // +optional optional string fsType = 3; - // readOnly defaults to false (read/write). ReadOnly here will force + // Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // +optional optional bool readOnly = 4; - // secretRef specifies the secret to use for obtaining the StorageOS API + // SecretRef specifies the secret to use for obtaining the StorageOS API // credentials. If not specified, default values will be attempted. // +optional optional LocalObjectReference secretRef = 5; @@ -5375,18 +5382,15 @@ message TopologySpreadConstraint { // MaxSkew describes the degree to which pods may be unevenly distributed. // When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference // between the number of matching pods in the target topology and the global minimum. - // The global minimum is the minimum number of matching pods in an eligible domain - // or zero if the number of eligible domains is less than MinDomains. // For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same - // labelSelector spread as 2/2/1: - // In this case, the global minimum is 1. + // labelSelector spread as 1/1/0: // +-------+-------+-------+ // | zone1 | zone2 | zone3 | // +-------+-------+-------+ - // | P P | P P | P | + // | P | P | | // +-------+-------+-------+ - // - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; - // scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) + // - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1; + // scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) // violate MaxSkew(1). // - if MaxSkew is 2, incoming pod can be scheduled onto any zone. // When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence @@ -5398,10 +5402,6 @@ message TopologySpreadConstraint { // and identical values are considered to be in the same topology. // We consider each as a "bucket", and try to put balanced number // of pods into each bucket. - // We define a domain as a particular instance of a topology. - // Also, we define an eligible domain as a domain whose nodes match the node selector. - // e.g. If TopologyKey is "kubernetes.io/hostname", each Node is a domain of that topology. - // And, if TopologyKey is "topology.kubernetes.io/zone", each zone is a domain of that topology. // It's a required field. optional string topologyKey = 2; @@ -5433,33 +5433,6 @@ message TopologySpreadConstraint { // in their corresponding topology domain. // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector labelSelector = 4; - - // MinDomains indicates a minimum number of eligible domains. - // When the number of eligible domains with matching topology keys is less than minDomains, - // Pod Topology Spread treats "global minimum" as 0, and then the calculation of Skew is performed. - // And when the number of eligible domains with matching topology keys equals or greater than minDomains, - // this value has no effect on scheduling. - // As a result, when the number of eligible domains is less than minDomains, - // scheduler won't schedule more than maxSkew Pods to those domains. - // If value is nil, the constraint behaves as if MinDomains is equal to 1. - // Valid values are integers greater than 0. - // When value is not nil, WhenUnsatisfiable must be DoNotSchedule. - // - // For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same - // labelSelector spread as 2/2/2: - // +-------+-------+-------+ - // | zone1 | zone2 | zone3 | - // +-------+-------+-------+ - // | P P | P P | P P | - // +-------+-------+-------+ - // The number of domains is less than 5(MinDomains), so "global minimum" is treated as 0. - // In this situation, new pod with the same labelSelector cannot be scheduled, - // because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, - // it will violate MaxSkew. - // - // This is an alpha field and requires enabling MinDomainsInPodTopologySpread feature gate. - // +optional - optional int32 minDomains = 5; } // TypedLocalObjectReference contains enough information to let you locate the @@ -5481,12 +5454,12 @@ message TypedLocalObjectReference { // Volume represents a named volume in a pod that may be accessed by any container in the pod. message Volume { - // name of the volume. + // Volume's name. // Must be a DNS_LABEL and unique within the pod. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names optional string name = 1; - // volumeSource represents the location and type of the mounted volume. + // VolumeSource represents the location and type of the mounted volume. // If not specified, the Volume is implied to be an EmptyDir. // This implied behavior is deprecated and will be removed in a future version. optional VolumeSource volumeSource = 2; @@ -5537,25 +5510,25 @@ message VolumeMount { // VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from. message VolumeNodeAffinity { - // required specifies hard node constraints that must be met. + // Required specifies hard node constraints that must be met. optional NodeSelector required = 1; } // Projection that may be projected along with other supported volume types message VolumeProjection { - // secret information about the secret data to project + // information about the secret data to project // +optional optional SecretProjection secret = 1; - // downwardAPI information about the downwardAPI data to project + // information about the downwardAPI data to project // +optional optional DownwardAPIProjection downwardAPI = 2; - // configMap information about the configMap data to project + // information about the configMap data to project // +optional optional ConfigMapProjection configMap = 3; - // serviceAccountToken is information about the serviceAccountToken data to project + // information about the serviceAccountToken data to project // +optional optional ServiceAccountTokenProjection serviceAccountToken = 4; } @@ -5563,7 +5536,7 @@ message VolumeProjection { // Represents the source of a volume to mount. // Only one of its members may be specified. message VolumeSource { - // hostPath represents a pre-existing file or directory on the host + // HostPath represents a pre-existing file or directory on the host // machine that is directly exposed to the container. This is generally // used for system agents or other privileged things that are allowed // to see the host machine. Most containers will NOT need this. @@ -5574,131 +5547,131 @@ message VolumeSource { // +optional optional HostPathVolumeSource hostPath = 1; - // emptyDir represents a temporary directory that shares a pod's lifetime. + // EmptyDir represents a temporary directory that shares a pod's lifetime. // More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir // +optional optional EmptyDirVolumeSource emptyDir = 2; - // gcePersistentDisk represents a GCE Disk resource that is attached to a + // GCEPersistentDisk represents a GCE Disk resource that is attached to a // kubelet's host machine and then exposed to the pod. // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk // +optional optional GCEPersistentDiskVolumeSource gcePersistentDisk = 3; - // awsElasticBlockStore represents an AWS Disk resource that is attached to a + // AWSElasticBlockStore represents an AWS Disk resource that is attached to a // kubelet's host machine and then exposed to the pod. // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore // +optional optional AWSElasticBlockStoreVolumeSource awsElasticBlockStore = 4; - // gitRepo represents a git repository at a particular revision. + // GitRepo represents a git repository at a particular revision. // DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an // EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir // into the Pod's container. // +optional optional GitRepoVolumeSource gitRepo = 5; - // secret represents a secret that should populate this volume. + // Secret represents a secret that should populate this volume. // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret // +optional optional SecretVolumeSource secret = 6; - // nfs represents an NFS mount on the host that shares a pod's lifetime + // NFS represents an NFS mount on the host that shares a pod's lifetime // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs // +optional optional NFSVolumeSource nfs = 7; - // iscsi represents an ISCSI Disk resource that is attached to a + // ISCSI represents an ISCSI Disk resource that is attached to a // kubelet's host machine and then exposed to the pod. // More info: https://examples.k8s.io/volumes/iscsi/README.md // +optional optional ISCSIVolumeSource iscsi = 8; - // glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. + // Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. // More info: https://examples.k8s.io/volumes/glusterfs/README.md // +optional optional GlusterfsVolumeSource glusterfs = 9; - // persistentVolumeClaimVolumeSource represents a reference to a + // PersistentVolumeClaimVolumeSource represents a reference to a // PersistentVolumeClaim in the same namespace. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims // +optional optional PersistentVolumeClaimVolumeSource persistentVolumeClaim = 10; - // rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. + // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. // More info: https://examples.k8s.io/volumes/rbd/README.md // +optional optional RBDVolumeSource rbd = 11; - // flexVolume represents a generic volume resource that is + // FlexVolume represents a generic volume resource that is // provisioned/attached using an exec based plugin. // +optional optional FlexVolumeSource flexVolume = 12; - // cinder represents a cinder volume attached and mounted on kubelets host machine. + // Cinder represents a cinder volume attached and mounted on kubelets host machine. // More info: https://examples.k8s.io/mysql-cinder-pd/README.md // +optional optional CinderVolumeSource cinder = 13; - // cephFS represents a Ceph FS mount on the host that shares a pod's lifetime + // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime // +optional optional CephFSVolumeSource cephfs = 14; - // flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running + // Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running // +optional optional FlockerVolumeSource flocker = 15; - // downwardAPI represents downward API about the pod that should populate this volume + // DownwardAPI represents downward API about the pod that should populate this volume // +optional optional DownwardAPIVolumeSource downwardAPI = 16; - // fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. // +optional optional FCVolumeSource fc = 17; - // azureFile represents an Azure File Service mount on the host and bind mount to the pod. + // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. // +optional optional AzureFileVolumeSource azureFile = 18; - // configMap represents a configMap that should populate this volume + // ConfigMap represents a configMap that should populate this volume // +optional optional ConfigMapVolumeSource configMap = 19; - // vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine // +optional optional VsphereVirtualDiskVolumeSource vsphereVolume = 20; - // quobyte represents a Quobyte mount on the host that shares a pod's lifetime + // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime // +optional optional QuobyteVolumeSource quobyte = 21; - // azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. // +optional optional AzureDiskVolumeSource azureDisk = 22; - // photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine + // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine optional PhotonPersistentDiskVolumeSource photonPersistentDisk = 23; - // projected items for all in one resources secrets, configmaps, and downward API + // Items for all in one resources secrets, configmaps, and downward API optional ProjectedVolumeSource projected = 26; - // portworxVolume represents a portworx volume attached and mounted on kubelets host machine + // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine // +optional optional PortworxVolumeSource portworxVolume = 24; - // scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. // +optional optional ScaleIOVolumeSource scaleIO = 25; - // storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + // StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. // +optional optional StorageOSVolumeSource storageos = 27; - // csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). + // CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). // +optional optional CSIVolumeSource csi = 28; - // ephemeral represents a volume that is handled by a cluster storage driver. + // Ephemeral represents a volume that is handled by a cluster storage driver. // The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, // and deleted when the pod is removed. // @@ -5729,20 +5702,20 @@ message VolumeSource { // Represents a vSphere volume resource. message VsphereVirtualDiskVolumeSource { - // volumePath is the path that identifies vSphere volume vmdk + // Path that identifies vSphere volume vmdk optional string volumePath = 1; - // fsType is filesystem type to mount. + // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // +optional optional string fsType = 2; - // storagePolicyName is the storage Policy Based Management (SPBM) profile name. + // Storage Policy Based Management (SPBM) profile name. // +optional optional string storagePolicyName = 3; - // storagePolicyID is the storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. + // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. // +optional optional string storagePolicyID = 4; } diff --git a/cluster-autoscaler/vendor/k8s.io/api/core/v1/types.go b/cluster-autoscaler/vendor/k8s.io/api/core/v1/types.go index c2a3c67b2054..80c5dd744c19 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/core/v1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/api/core/v1/types.go @@ -34,11 +34,11 @@ const ( // Volume represents a named volume in a pod that may be accessed by any container in the pod. type Volume struct { - // name of the volume. + // Volume's name. // Must be a DNS_LABEL and unique within the pod. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // volumeSource represents the location and type of the mounted volume. + // VolumeSource represents the location and type of the mounted volume. // If not specified, the Volume is implied to be an EmptyDir. // This implied behavior is deprecated and will be removed in a future version. VolumeSource `json:",inline" protobuf:"bytes,2,opt,name=volumeSource"` @@ -47,7 +47,7 @@ type Volume struct { // Represents the source of a volume to mount. // Only one of its members may be specified. type VolumeSource struct { - // hostPath represents a pre-existing file or directory on the host + // HostPath represents a pre-existing file or directory on the host // machine that is directly exposed to the container. This is generally // used for system agents or other privileged things that are allowed // to see the host machine. Most containers will NOT need this. @@ -57,104 +57,104 @@ type VolumeSource struct { // mount host directories as read/write. // +optional HostPath *HostPathVolumeSource `json:"hostPath,omitempty" protobuf:"bytes,1,opt,name=hostPath"` - // emptyDir represents a temporary directory that shares a pod's lifetime. + // EmptyDir represents a temporary directory that shares a pod's lifetime. // More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir // +optional EmptyDir *EmptyDirVolumeSource `json:"emptyDir,omitempty" protobuf:"bytes,2,opt,name=emptyDir"` - // gcePersistentDisk represents a GCE Disk resource that is attached to a + // GCEPersistentDisk represents a GCE Disk resource that is attached to a // kubelet's host machine and then exposed to the pod. // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk // +optional GCEPersistentDisk *GCEPersistentDiskVolumeSource `json:"gcePersistentDisk,omitempty" protobuf:"bytes,3,opt,name=gcePersistentDisk"` - // awsElasticBlockStore represents an AWS Disk resource that is attached to a + // AWSElasticBlockStore represents an AWS Disk resource that is attached to a // kubelet's host machine and then exposed to the pod. // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore // +optional AWSElasticBlockStore *AWSElasticBlockStoreVolumeSource `json:"awsElasticBlockStore,omitempty" protobuf:"bytes,4,opt,name=awsElasticBlockStore"` - // gitRepo represents a git repository at a particular revision. + // GitRepo represents a git repository at a particular revision. // DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an // EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir // into the Pod's container. // +optional GitRepo *GitRepoVolumeSource `json:"gitRepo,omitempty" protobuf:"bytes,5,opt,name=gitRepo"` - // secret represents a secret that should populate this volume. + // Secret represents a secret that should populate this volume. // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret // +optional Secret *SecretVolumeSource `json:"secret,omitempty" protobuf:"bytes,6,opt,name=secret"` - // nfs represents an NFS mount on the host that shares a pod's lifetime + // NFS represents an NFS mount on the host that shares a pod's lifetime // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs // +optional NFS *NFSVolumeSource `json:"nfs,omitempty" protobuf:"bytes,7,opt,name=nfs"` - // iscsi represents an ISCSI Disk resource that is attached to a + // ISCSI represents an ISCSI Disk resource that is attached to a // kubelet's host machine and then exposed to the pod. // More info: https://examples.k8s.io/volumes/iscsi/README.md // +optional ISCSI *ISCSIVolumeSource `json:"iscsi,omitempty" protobuf:"bytes,8,opt,name=iscsi"` - // glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. + // Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. // More info: https://examples.k8s.io/volumes/glusterfs/README.md // +optional Glusterfs *GlusterfsVolumeSource `json:"glusterfs,omitempty" protobuf:"bytes,9,opt,name=glusterfs"` - // persistentVolumeClaimVolumeSource represents a reference to a + // PersistentVolumeClaimVolumeSource represents a reference to a // PersistentVolumeClaim in the same namespace. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims // +optional PersistentVolumeClaim *PersistentVolumeClaimVolumeSource `json:"persistentVolumeClaim,omitempty" protobuf:"bytes,10,opt,name=persistentVolumeClaim"` - // rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. + // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. // More info: https://examples.k8s.io/volumes/rbd/README.md // +optional RBD *RBDVolumeSource `json:"rbd,omitempty" protobuf:"bytes,11,opt,name=rbd"` - // flexVolume represents a generic volume resource that is + // FlexVolume represents a generic volume resource that is // provisioned/attached using an exec based plugin. // +optional FlexVolume *FlexVolumeSource `json:"flexVolume,omitempty" protobuf:"bytes,12,opt,name=flexVolume"` - // cinder represents a cinder volume attached and mounted on kubelets host machine. + // Cinder represents a cinder volume attached and mounted on kubelets host machine. // More info: https://examples.k8s.io/mysql-cinder-pd/README.md // +optional Cinder *CinderVolumeSource `json:"cinder,omitempty" protobuf:"bytes,13,opt,name=cinder"` - // cephFS represents a Ceph FS mount on the host that shares a pod's lifetime + // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime // +optional CephFS *CephFSVolumeSource `json:"cephfs,omitempty" protobuf:"bytes,14,opt,name=cephfs"` - // flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running + // Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running // +optional Flocker *FlockerVolumeSource `json:"flocker,omitempty" protobuf:"bytes,15,opt,name=flocker"` - // downwardAPI represents downward API about the pod that should populate this volume + // DownwardAPI represents downward API about the pod that should populate this volume // +optional DownwardAPI *DownwardAPIVolumeSource `json:"downwardAPI,omitempty" protobuf:"bytes,16,opt,name=downwardAPI"` - // fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. // +optional FC *FCVolumeSource `json:"fc,omitempty" protobuf:"bytes,17,opt,name=fc"` - // azureFile represents an Azure File Service mount on the host and bind mount to the pod. + // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. // +optional AzureFile *AzureFileVolumeSource `json:"azureFile,omitempty" protobuf:"bytes,18,opt,name=azureFile"` - // configMap represents a configMap that should populate this volume + // ConfigMap represents a configMap that should populate this volume // +optional ConfigMap *ConfigMapVolumeSource `json:"configMap,omitempty" protobuf:"bytes,19,opt,name=configMap"` - // vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine // +optional VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty" protobuf:"bytes,20,opt,name=vsphereVolume"` - // quobyte represents a Quobyte mount on the host that shares a pod's lifetime + // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime // +optional Quobyte *QuobyteVolumeSource `json:"quobyte,omitempty" protobuf:"bytes,21,opt,name=quobyte"` - // azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. // +optional AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty" protobuf:"bytes,22,opt,name=azureDisk"` - // photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine + // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine PhotonPersistentDisk *PhotonPersistentDiskVolumeSource `json:"photonPersistentDisk,omitempty" protobuf:"bytes,23,opt,name=photonPersistentDisk"` - // projected items for all in one resources secrets, configmaps, and downward API + // Items for all in one resources secrets, configmaps, and downward API Projected *ProjectedVolumeSource `json:"projected,omitempty" protobuf:"bytes,26,opt,name=projected"` - // portworxVolume represents a portworx volume attached and mounted on kubelets host machine + // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine // +optional PortworxVolume *PortworxVolumeSource `json:"portworxVolume,omitempty" protobuf:"bytes,24,opt,name=portworxVolume"` - // scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. // +optional ScaleIO *ScaleIOVolumeSource `json:"scaleIO,omitempty" protobuf:"bytes,25,opt,name=scaleIO"` - // storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + // StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. // +optional StorageOS *StorageOSVolumeSource `json:"storageos,omitempty" protobuf:"bytes,27,opt,name=storageos"` - // csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). + // CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). // +optional CSI *CSIVolumeSource `json:"csi,omitempty" protobuf:"bytes,28,opt,name=csi"` - // ephemeral represents a volume that is handled by a cluster storage driver. + // Ephemeral represents a volume that is handled by a cluster storage driver. // The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, // and deleted when the pod is removed. // @@ -188,10 +188,10 @@ type VolumeSource struct { // PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another // type of volume that is owned by someone else (the system). type PersistentVolumeClaimVolumeSource struct { - // claimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. + // ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims ClaimName string `json:"claimName" protobuf:"bytes,1,opt,name=claimName"` - // readOnly Will force the ReadOnly setting in VolumeMounts. + // Will force the ReadOnly setting in VolumeMounts. // Default false. // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,2,opt,name=readOnly"` @@ -200,85 +200,85 @@ type PersistentVolumeClaimVolumeSource struct { // PersistentVolumeSource is similar to VolumeSource but meant for the // administrator who creates PVs. Exactly one of its members must be set. type PersistentVolumeSource struct { - // gcePersistentDisk represents a GCE Disk resource that is attached to a + // GCEPersistentDisk represents a GCE Disk resource that is attached to a // kubelet's host machine and then exposed to the pod. Provisioned by an admin. // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk // +optional GCEPersistentDisk *GCEPersistentDiskVolumeSource `json:"gcePersistentDisk,omitempty" protobuf:"bytes,1,opt,name=gcePersistentDisk"` - // awsElasticBlockStore represents an AWS Disk resource that is attached to a + // AWSElasticBlockStore represents an AWS Disk resource that is attached to a // kubelet's host machine and then exposed to the pod. // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore // +optional AWSElasticBlockStore *AWSElasticBlockStoreVolumeSource `json:"awsElasticBlockStore,omitempty" protobuf:"bytes,2,opt,name=awsElasticBlockStore"` - // hostPath represents a directory on the host. + // HostPath represents a directory on the host. // Provisioned by a developer or tester. // This is useful for single-node development and testing only! // On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath // +optional HostPath *HostPathVolumeSource `json:"hostPath,omitempty" protobuf:"bytes,3,opt,name=hostPath"` - // glusterfs represents a Glusterfs volume that is attached to a host and + // Glusterfs represents a Glusterfs volume that is attached to a host and // exposed to the pod. Provisioned by an admin. // More info: https://examples.k8s.io/volumes/glusterfs/README.md // +optional Glusterfs *GlusterfsPersistentVolumeSource `json:"glusterfs,omitempty" protobuf:"bytes,4,opt,name=glusterfs"` - // nfs represents an NFS mount on the host. Provisioned by an admin. + // NFS represents an NFS mount on the host. Provisioned by an admin. // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs // +optional NFS *NFSVolumeSource `json:"nfs,omitempty" protobuf:"bytes,5,opt,name=nfs"` - // rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. + // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. // More info: https://examples.k8s.io/volumes/rbd/README.md // +optional RBD *RBDPersistentVolumeSource `json:"rbd,omitempty" protobuf:"bytes,6,opt,name=rbd"` - // iscsi represents an ISCSI Disk resource that is attached to a + // ISCSI represents an ISCSI Disk resource that is attached to a // kubelet's host machine and then exposed to the pod. Provisioned by an admin. // +optional ISCSI *ISCSIPersistentVolumeSource `json:"iscsi,omitempty" protobuf:"bytes,7,opt,name=iscsi"` - // cinder represents a cinder volume attached and mounted on kubelets host machine. + // Cinder represents a cinder volume attached and mounted on kubelets host machine. // More info: https://examples.k8s.io/mysql-cinder-pd/README.md // +optional Cinder *CinderPersistentVolumeSource `json:"cinder,omitempty" protobuf:"bytes,8,opt,name=cinder"` - // cephFS represents a Ceph FS mount on the host that shares a pod's lifetime + // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime // +optional CephFS *CephFSPersistentVolumeSource `json:"cephfs,omitempty" protobuf:"bytes,9,opt,name=cephfs"` - // fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. // +optional FC *FCVolumeSource `json:"fc,omitempty" protobuf:"bytes,10,opt,name=fc"` - // flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running + // Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running // +optional Flocker *FlockerVolumeSource `json:"flocker,omitempty" protobuf:"bytes,11,opt,name=flocker"` - // flexVolume represents a generic volume resource that is + // FlexVolume represents a generic volume resource that is // provisioned/attached using an exec based plugin. // +optional FlexVolume *FlexPersistentVolumeSource `json:"flexVolume,omitempty" protobuf:"bytes,12,opt,name=flexVolume"` - // azureFile represents an Azure File Service mount on the host and bind mount to the pod. + // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. // +optional AzureFile *AzureFilePersistentVolumeSource `json:"azureFile,omitempty" protobuf:"bytes,13,opt,name=azureFile"` - // vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine // +optional VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty" protobuf:"bytes,14,opt,name=vsphereVolume"` - // quobyte represents a Quobyte mount on the host that shares a pod's lifetime + // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime // +optional Quobyte *QuobyteVolumeSource `json:"quobyte,omitempty" protobuf:"bytes,15,opt,name=quobyte"` - // azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. // +optional AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty" protobuf:"bytes,16,opt,name=azureDisk"` - // photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine + // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine PhotonPersistentDisk *PhotonPersistentDiskVolumeSource `json:"photonPersistentDisk,omitempty" protobuf:"bytes,17,opt,name=photonPersistentDisk"` - // portworxVolume represents a portworx volume attached and mounted on kubelets host machine + // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine // +optional PortworxVolume *PortworxVolumeSource `json:"portworxVolume,omitempty" protobuf:"bytes,18,opt,name=portworxVolume"` - // scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. // +optional ScaleIO *ScaleIOPersistentVolumeSource `json:"scaleIO,omitempty" protobuf:"bytes,19,opt,name=scaleIO"` - // local represents directly-attached storage with node affinity + // Local represents directly-attached storage with node affinity // +optional Local *LocalVolumeSource `json:"local,omitempty" protobuf:"bytes,20,opt,name=local"` - // storageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod + // StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod // More info: https://examples.k8s.io/volumes/storageos/README.md // +optional StorageOS *StorageOSPersistentVolumeSource `json:"storageos,omitempty" protobuf:"bytes,21,opt,name=storageos"` - // csi represents storage that is handled by an external CSI driver (Beta feature). + // CSI represents storage that is handled by an external CSI driver (Beta feature). // +optional CSI *CSIPersistentVolumeSource `json:"csi,omitempty" protobuf:"bytes,22,opt,name=csi"` } @@ -306,13 +306,13 @@ type PersistentVolume struct { // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // spec defines a specification of a persistent volume owned by the cluster. + // Spec defines a specification of a persistent volume owned by the cluster. // Provisioned by an administrator. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes // +optional Spec PersistentVolumeSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - // status represents the current information/status for the persistent volume. + // Status represents the current information/status for the persistent volume. // Populated by the system. // Read-only. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes @@ -322,34 +322,34 @@ type PersistentVolume struct { // PersistentVolumeSpec is the specification of a persistent volume. type PersistentVolumeSpec struct { - // capacity is the description of the persistent volume's resources and capacity. + // A description of the persistent volume's resources and capacity. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity // +optional Capacity ResourceList `json:"capacity,omitempty" protobuf:"bytes,1,rep,name=capacity,casttype=ResourceList,castkey=ResourceName"` - // persistentVolumeSource is the actual volume backing the persistent volume. + // The actual volume backing the persistent volume. PersistentVolumeSource `json:",inline" protobuf:"bytes,2,opt,name=persistentVolumeSource"` - // accessModes contains all ways the volume can be mounted. + // AccessModes contains all ways the volume can be mounted. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes // +optional AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,3,rep,name=accessModes,casttype=PersistentVolumeAccessMode"` - // claimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. + // ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. // Expected to be non-nil when bound. // claim.VolumeName is the authoritative bind between PV and PVC. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding // +optional ClaimRef *ObjectReference `json:"claimRef,omitempty" protobuf:"bytes,4,opt,name=claimRef"` - // persistentVolumeReclaimPolicy defines what happens to a persistent volume when released from its claim. + // What happens to a persistent volume when released from its claim. // Valid options are Retain (default for manually created PersistentVolumes), Delete (default // for dynamically provisioned PersistentVolumes), and Recycle (deprecated). // Recycle must be supported by the volume plugin underlying this PersistentVolume. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming // +optional PersistentVolumeReclaimPolicy PersistentVolumeReclaimPolicy `json:"persistentVolumeReclaimPolicy,omitempty" protobuf:"bytes,5,opt,name=persistentVolumeReclaimPolicy,casttype=PersistentVolumeReclaimPolicy"` - // storageClassName is the name of StorageClass to which this persistent volume belongs. Empty value + // Name of StorageClass to which this persistent volume belongs. Empty value // means that this volume does not belong to any StorageClass. // +optional StorageClassName string `json:"storageClassName,omitempty" protobuf:"bytes,6,opt,name=storageClassName"` - // mountOptions is the list of mount options, e.g. ["ro", "soft"]. Not validated - mount will + // A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will // simply fail if one is invalid. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options // +optional @@ -358,7 +358,7 @@ type PersistentVolumeSpec struct { // or to remain in raw block state. Value of Filesystem is implied when not included in spec. // +optional VolumeMode *PersistentVolumeMode `json:"volumeMode,omitempty" protobuf:"bytes,8,opt,name=volumeMode,casttype=PersistentVolumeMode"` - // nodeAffinity defines constraints that limit what nodes this volume can be accessed from. + // NodeAffinity defines constraints that limit what nodes this volume can be accessed from. // This field influences the scheduling of pods that use this volume. // +optional NodeAffinity *VolumeNodeAffinity `json:"nodeAffinity,omitempty" protobuf:"bytes,9,opt,name=nodeAffinity"` @@ -366,7 +366,7 @@ type PersistentVolumeSpec struct { // VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from. type VolumeNodeAffinity struct { - // required specifies hard node constraints that must be met. + // Required specifies hard node constraints that must be met. Required *NodeSelector `json:"required,omitempty" protobuf:"bytes,1,opt,name=required"` } @@ -399,14 +399,14 @@ const ( // PersistentVolumeStatus is the current status of a persistent volume. type PersistentVolumeStatus struct { - // phase indicates if a volume is available, bound to a claim, or released by a claim. + // Phase indicates if a volume is available, bound to a claim, or released by a claim. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase // +optional Phase PersistentVolumePhase `json:"phase,omitempty" protobuf:"bytes,1,opt,name=phase,casttype=PersistentVolumePhase"` - // message is a human-readable message indicating details about why the volume is in this state. + // A human-readable message indicating details about why the volume is in this state. // +optional Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` - // reason is a brief CamelCase string that describes any failure and is meant + // Reason is a brief CamelCase string that describes any failure and is meant // for machine parsing and tidy display in the CLI. // +optional Reason string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"` @@ -421,7 +421,7 @@ type PersistentVolumeList struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // items is a list of persistent volumes. + // List of persistent volumes. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes Items []PersistentVolume `json:"items" protobuf:"bytes,2,rep,name=items"` } @@ -437,12 +437,12 @@ type PersistentVolumeClaim struct { // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // spec defines the desired characteristics of a volume requested by a pod author. + // Spec defines the desired characteristics of a volume requested by a pod author. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims // +optional Spec PersistentVolumeClaimSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - // status represents the current information/status of a persistent volume claim. + // Status represents the current information/status of a persistent volume claim. // Read-only. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims // +optional @@ -458,7 +458,7 @@ type PersistentVolumeClaimList struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // items is a list of persistent volume claims. + // A list of persistent volume claims. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims Items []PersistentVolumeClaim `json:"items" protobuf:"bytes,2,rep,name=items"` } @@ -466,24 +466,24 @@ type PersistentVolumeClaimList struct { // PersistentVolumeClaimSpec describes the common attributes of storage devices // and allows a Source for provider-specific attributes type PersistentVolumeClaimSpec struct { - // accessModes contains the desired access modes the volume should have. + // AccessModes contains the desired access modes the volume should have. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 // +optional AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,1,rep,name=accessModes,casttype=PersistentVolumeAccessMode"` - // selector is a label query over volumes to consider for binding. + // A label query over volumes to consider for binding. // +optional Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,4,opt,name=selector"` - // resources represents the minimum resources the volume should have. + // Resources represents the minimum resources the volume should have. // If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements // that are lower than previous value but must still be higher than capacity recorded in the // status field of the claim. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources // +optional Resources ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,2,opt,name=resources"` - // volumeName is the binding reference to the PersistentVolume backing this claim. + // VolumeName is the binding reference to the PersistentVolume backing this claim. // +optional VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,3,opt,name=volumeName"` - // storageClassName is the name of the StorageClass required by the claim. + // Name of the StorageClass required by the claim. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 // +optional StorageClassName *string `json:"storageClassName,omitempty" protobuf:"bytes,5,opt,name=storageClassName"` @@ -491,7 +491,7 @@ type PersistentVolumeClaimSpec struct { // Value of Filesystem is implied when not included in claim spec. // +optional VolumeMode *PersistentVolumeMode `json:"volumeMode,omitempty" protobuf:"bytes,6,opt,name=volumeMode,casttype=PersistentVolumeMode"` - // dataSource field can be used to specify either: + // This field can be used to specify either: // * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) // * An existing PVC (PersistentVolumeClaim) // If the provisioner or an external controller can support the specified data source, @@ -500,7 +500,7 @@ type PersistentVolumeClaimSpec struct { // the same contents as the DataSourceRef field. // +optional DataSource *TypedLocalObjectReference `json:"dataSource,omitempty" protobuf:"bytes,7,opt,name=dataSource"` - // dataSourceRef specifies the object from which to populate the volume with data, if a non-empty + // Specifies the object from which to populate the volume with data, if a non-empty // volume is desired. This may be any local object from a non-empty API group (non // core object) or a PersistentVolumeClaim object. // When this field is specified, volume binding will only succeed if the type of @@ -516,12 +516,13 @@ type PersistentVolumeClaimSpec struct { // * While DataSource ignores disallowed values (dropping them), DataSourceRef // preserves all values, and generates an error if a disallowed value is // specified. - // (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. + // (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled. // +optional DataSourceRef *TypedLocalObjectReference `json:"dataSourceRef,omitempty" protobuf:"bytes,8,opt,name=dataSourceRef"` } // PersistentVolumeClaimConditionType is a valid value of PersistentVolumeClaimCondition.Type +// +enum type PersistentVolumeClaimConditionType string const ( @@ -555,41 +556,41 @@ const ( type PersistentVolumeClaimCondition struct { Type PersistentVolumeClaimConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=PersistentVolumeClaimConditionType"` Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"` - // lastProbeTime is the time we probed the condition. + // Last time we probed the condition. // +optional LastProbeTime metav1.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"` - // lastTransitionTime is the time the condition transitioned from one status to another. + // Last time the condition transitioned from one status to another. // +optional LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` - // reason is a unique, this should be a short, machine understandable string that gives the reason + // Unique, this should be a short, machine understandable string that gives the reason // for condition's last transition. If it reports "ResizeStarted" that means the underlying // persistent volume is being resized. // +optional Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"` - // message is the human-readable message indicating details about last transition. + // Human-readable message indicating details about last transition. // +optional Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"` } // PersistentVolumeClaimStatus is the current status of a persistent volume claim. type PersistentVolumeClaimStatus struct { - // phase represents the current phase of PersistentVolumeClaim. + // Phase represents the current phase of PersistentVolumeClaim. // +optional Phase PersistentVolumeClaimPhase `json:"phase,omitempty" protobuf:"bytes,1,opt,name=phase,casttype=PersistentVolumeClaimPhase"` - // accessModes contains the actual access modes the volume backing the PVC has. + // AccessModes contains the actual access modes the volume backing the PVC has. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 // +optional AccessModes []PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,2,rep,name=accessModes,casttype=PersistentVolumeAccessMode"` - // capacity represents the actual resources of the underlying volume. + // Represents the actual resources of the underlying volume. // +optional Capacity ResourceList `json:"capacity,omitempty" protobuf:"bytes,3,rep,name=capacity,casttype=ResourceList,castkey=ResourceName"` - // conditions is the current Condition of persistent volume claim. If underlying persistent volume is being + // Current Condition of persistent volume claim. If underlying persistent volume is being // resized then the Condition will be set to 'ResizeStarted'. // +optional // +patchMergeKey=type // +patchStrategy=merge Conditions []PersistentVolumeClaimCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,4,rep,name=conditions"` - // allocatedResources is the storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may + // The storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may // be larger than the actual capacity when a volume expansion operation is requested. // For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. // If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. @@ -600,7 +601,7 @@ type PersistentVolumeClaimStatus struct { // +featureGate=RecoverVolumeExpansionFailure // +optional AllocatedResources ResourceList `json:"allocatedResources,omitempty" protobuf:"bytes,5,rep,name=allocatedResources,casttype=ResourceList,castkey=ResourceName"` - // resizeStatus stores status of resize operation. + // ResizeStatus stores status of resize operation. // ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty // string by resize controller or kubelet. // This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. @@ -684,11 +685,11 @@ const ( // Represents a host path mapped into a pod. // Host path volumes do not support ownership management or SELinux relabeling. type HostPathVolumeSource struct { - // path of the directory on the host. + // Path of the directory on the host. // If the path is a symlink, it will follow the link to the real path. // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath Path string `json:"path" protobuf:"bytes,1,opt,name=path"` - // type for HostPath Volume + // Type for HostPath Volume // Defaults to "" // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath // +optional @@ -698,13 +699,13 @@ type HostPathVolumeSource struct { // Represents an empty directory for a pod. // Empty directory volumes support ownership management and SELinux relabeling. type EmptyDirVolumeSource struct { - // medium represents what type of storage medium should back this directory. + // What type of storage medium should back this directory. // The default is "" which means to use the node's default medium. // Must be an empty string (default) or Memory. // More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir // +optional Medium StorageMedium `json:"medium,omitempty" protobuf:"bytes,1,opt,name=medium,casttype=StorageMedium"` - // sizeLimit is the total amount of local storage required for this EmptyDir volume. + // Total amount of local storage required for this EmptyDir volume. // The size limit is also applicable for memory medium. // The maximum usage on memory medium EmptyDir would be the minimum value between // the SizeLimit specified here and the sum of memory limits of all containers in a pod. @@ -717,15 +718,15 @@ type EmptyDirVolumeSource struct { // Represents a Glusterfs mount that lasts the lifetime of a pod. // Glusterfs volumes do not support ownership management or SELinux relabeling. type GlusterfsVolumeSource struct { - // endpoints is the endpoint name that details Glusterfs topology. + // EndpointsName is the endpoint name that details Glusterfs topology. // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod EndpointsName string `json:"endpoints" protobuf:"bytes,1,opt,name=endpoints"` - // path is the Glusterfs volume path. + // Path is the Glusterfs volume path. // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod Path string `json:"path" protobuf:"bytes,2,opt,name=path"` - // readOnly here will force the Glusterfs volume to be mounted with read-only permissions. + // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. // Defaults to false. // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod // +optional @@ -735,21 +736,21 @@ type GlusterfsVolumeSource struct { // Represents a Glusterfs mount that lasts the lifetime of a pod. // Glusterfs volumes do not support ownership management or SELinux relabeling. type GlusterfsPersistentVolumeSource struct { - // endpoints is the endpoint name that details Glusterfs topology. + // EndpointsName is the endpoint name that details Glusterfs topology. // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod EndpointsName string `json:"endpoints" protobuf:"bytes,1,opt,name=endpoints"` - // path is the Glusterfs volume path. + // Path is the Glusterfs volume path. // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod Path string `json:"path" protobuf:"bytes,2,opt,name=path"` - // readOnly here will force the Glusterfs volume to be mounted with read-only permissions. + // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. // Defaults to false. // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` - // endpointsNamespace is the namespace that contains Glusterfs endpoint. + // EndpointsNamespace is the namespace that contains Glusterfs endpoint. // If this field is empty, the EndpointNamespace defaults to the same namespace as the bound PVC. // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod // +optional @@ -759,41 +760,41 @@ type GlusterfsPersistentVolumeSource struct { // Represents a Rados Block Device mount that lasts the lifetime of a pod. // RBD volumes support ownership management and SELinux relabeling. type RBDVolumeSource struct { - // monitors is a collection of Ceph monitors. + // A collection of Ceph monitors. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it CephMonitors []string `json:"monitors" protobuf:"bytes,1,rep,name=monitors"` - // image is the rados image name. + // The rados image name. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it RBDImage string `json:"image" protobuf:"bytes,2,opt,name=image"` - // fsType is the filesystem type of the volume that you want to mount. + // Filesystem type of the volume that you want to mount. // Tip: Ensure that the filesystem type is supported by the host operating system. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd // TODO: how do we prevent errors in the filesystem from compromising the machine // +optional FSType string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"` - // pool is the rados pool name. + // The rados pool name. // Default is rbd. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it // +optional RBDPool string `json:"pool,omitempty" protobuf:"bytes,4,opt,name=pool"` - // user is the rados user name. + // The rados user name. // Default is admin. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it // +optional RadosUser string `json:"user,omitempty" protobuf:"bytes,5,opt,name=user"` - // keyring is the path to key ring for RBDUser. + // Keyring is the path to key ring for RBDUser. // Default is /etc/ceph/keyring. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it // +optional Keyring string `json:"keyring,omitempty" protobuf:"bytes,6,opt,name=keyring"` - // secretRef is name of the authentication secret for RBDUser. If provided + // SecretRef is name of the authentication secret for RBDUser. If provided // overrides keyring. // Default is nil. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it // +optional SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,7,opt,name=secretRef"` - // readOnly here will force the ReadOnly setting in VolumeMounts. + // ReadOnly here will force the ReadOnly setting in VolumeMounts. // Defaults to false. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it // +optional @@ -803,41 +804,41 @@ type RBDVolumeSource struct { // Represents a Rados Block Device mount that lasts the lifetime of a pod. // RBD volumes support ownership management and SELinux relabeling. type RBDPersistentVolumeSource struct { - // monitors is a collection of Ceph monitors. + // A collection of Ceph monitors. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it CephMonitors []string `json:"monitors" protobuf:"bytes,1,rep,name=monitors"` - // image is the rados image name. + // The rados image name. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it RBDImage string `json:"image" protobuf:"bytes,2,opt,name=image"` - // fsType is the filesystem type of the volume that you want to mount. + // Filesystem type of the volume that you want to mount. // Tip: Ensure that the filesystem type is supported by the host operating system. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd // TODO: how do we prevent errors in the filesystem from compromising the machine // +optional FSType string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"` - // pool is the rados pool name. + // The rados pool name. // Default is rbd. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it // +optional RBDPool string `json:"pool,omitempty" protobuf:"bytes,4,opt,name=pool"` - // user is the rados user name. + // The rados user name. // Default is admin. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it // +optional RadosUser string `json:"user,omitempty" protobuf:"bytes,5,opt,name=user"` - // keyring is the path to key ring for RBDUser. + // Keyring is the path to key ring for RBDUser. // Default is /etc/ceph/keyring. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it // +optional Keyring string `json:"keyring,omitempty" protobuf:"bytes,6,opt,name=keyring"` - // secretRef is name of the authentication secret for RBDUser. If provided + // SecretRef is name of the authentication secret for RBDUser. If provided // overrides keyring. // Default is nil. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it // +optional SecretRef *SecretReference `json:"secretRef,omitempty" protobuf:"bytes,7,opt,name=secretRef"` - // readOnly here will force the ReadOnly setting in VolumeMounts. + // ReadOnly here will force the ReadOnly setting in VolumeMounts. // Defaults to false. // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it // +optional @@ -849,21 +850,21 @@ type RBDPersistentVolumeSource struct { // The volume must also be in the same region as the kubelet. // Cinder volumes support ownership management and SELinux relabeling. type CinderVolumeSource struct { - // volumeID used to identify the volume in cinder. + // volume id used to identify the volume in cinder. // More info: https://examples.k8s.io/mysql-cinder-pd/README.md VolumeID string `json:"volumeID" protobuf:"bytes,1,opt,name=volumeID"` - // fsType is the filesystem type to mount. + // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // More info: https://examples.k8s.io/mysql-cinder-pd/README.md // +optional FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"` - // readOnly defaults to false (read/write). ReadOnly here will force + // Optional: Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // More info: https://examples.k8s.io/mysql-cinder-pd/README.md // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` - // secretRef is optional: points to a secret object containing parameters used to connect + // Optional: points to a secret object containing parameters used to connect // to OpenStack. // +optional SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,4,opt,name=secretRef"` @@ -874,21 +875,21 @@ type CinderVolumeSource struct { // The volume must also be in the same region as the kubelet. // Cinder volumes support ownership management and SELinux relabeling. type CinderPersistentVolumeSource struct { - // volumeID used to identify the volume in cinder. + // volume id used to identify the volume in cinder. // More info: https://examples.k8s.io/mysql-cinder-pd/README.md VolumeID string `json:"volumeID" protobuf:"bytes,1,opt,name=volumeID"` - // fsType Filesystem type to mount. + // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // More info: https://examples.k8s.io/mysql-cinder-pd/README.md // +optional FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"` - // readOnly is Optional: Defaults to false (read/write). ReadOnly here will force + // Optional: Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // More info: https://examples.k8s.io/mysql-cinder-pd/README.md // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` - // secretRef is Optional: points to a secret object containing parameters used to connect + // Optional: points to a secret object containing parameters used to connect // to OpenStack. // +optional SecretRef *SecretReference `json:"secretRef,omitempty" protobuf:"bytes,4,opt,name=secretRef"` @@ -897,25 +898,25 @@ type CinderPersistentVolumeSource struct { // Represents a Ceph Filesystem mount that lasts the lifetime of a pod // Cephfs volumes do not support ownership management or SELinux relabeling. type CephFSVolumeSource struct { - // monitors is Required: Monitors is a collection of Ceph monitors + // Required: Monitors is a collection of Ceph monitors // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it Monitors []string `json:"monitors" protobuf:"bytes,1,rep,name=monitors"` - // path is Optional: Used as the mounted root, rather than the full Ceph tree, default is / + // Optional: Used as the mounted root, rather than the full Ceph tree, default is / // +optional Path string `json:"path,omitempty" protobuf:"bytes,2,opt,name=path"` - // user is optional: User is the rados user name, default is admin + // Optional: User is the rados user name, default is admin // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it // +optional User string `json:"user,omitempty" protobuf:"bytes,3,opt,name=user"` - // secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret + // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it // +optional SecretFile string `json:"secretFile,omitempty" protobuf:"bytes,4,opt,name=secretFile"` - // secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. + // Optional: SecretRef is reference to the authentication secret for User, default is empty. // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it // +optional SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,5,opt,name=secretRef"` - // readOnly is Optional: Defaults to false (read/write). ReadOnly here will force + // Optional: Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it // +optional @@ -926,10 +927,10 @@ type CephFSVolumeSource struct { // in any namespace // +structType=atomic type SecretReference struct { - // name is unique within a namespace to reference a secret resource. + // Name is unique within a namespace to reference a secret resource. // +optional Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` - // namespace defines the space within which the secret name must be unique. + // Namespace defines the space within which the secret name must be unique. // +optional Namespace string `json:"namespace,omitempty" protobuf:"bytes,2,opt,name=namespace"` } @@ -937,25 +938,25 @@ type SecretReference struct { // Represents a Ceph Filesystem mount that lasts the lifetime of a pod // Cephfs volumes do not support ownership management or SELinux relabeling. type CephFSPersistentVolumeSource struct { - // monitors is Required: Monitors is a collection of Ceph monitors + // Required: Monitors is a collection of Ceph monitors // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it Monitors []string `json:"monitors" protobuf:"bytes,1,rep,name=monitors"` - // path is Optional: Used as the mounted root, rather than the full Ceph tree, default is / + // Optional: Used as the mounted root, rather than the full Ceph tree, default is / // +optional Path string `json:"path,omitempty" protobuf:"bytes,2,opt,name=path"` - // user is Optional: User is the rados user name, default is admin + // Optional: User is the rados user name, default is admin // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it // +optional User string `json:"user,omitempty" protobuf:"bytes,3,opt,name=user"` - // secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret + // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it // +optional SecretFile string `json:"secretFile,omitempty" protobuf:"bytes,4,opt,name=secretFile"` - // secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. + // Optional: SecretRef is reference to the authentication secret for User, default is empty. // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it // +optional SecretRef *SecretReference `json:"secretRef,omitempty" protobuf:"bytes,5,opt,name=secretRef"` - // readOnly is Optional: Defaults to false (read/write). ReadOnly here will force + // Optional: Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it // +optional @@ -966,11 +967,11 @@ type CephFSPersistentVolumeSource struct { // One and only one of datasetName and datasetUUID should be set. // Flocker volumes do not support ownership management or SELinux relabeling. type FlockerVolumeSource struct { - // datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker + // Name of the dataset stored as metadata -> name on the dataset for Flocker // should be considered as deprecated // +optional DatasetName string `json:"datasetName,omitempty" protobuf:"bytes,1,opt,name=datasetName"` - // datasetUUID is the UUID of the dataset. This is unique identifier of a Flocker dataset + // UUID of the dataset. This is unique identifier of a Flocker dataset // +optional DatasetUUID string `json:"datasetUUID,omitempty" protobuf:"bytes,2,opt,name=datasetUUID"` } @@ -1005,24 +1006,24 @@ const ( // can only be mounted as read/write once or read-only many times. GCE // PDs support ownership management and SELinux relabeling. type GCEPersistentDiskVolumeSource struct { - // pdName is unique name of the PD resource in GCE. Used to identify the disk in GCE. + // Unique name of the PD resource in GCE. Used to identify the disk in GCE. // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk PDName string `json:"pdName" protobuf:"bytes,1,opt,name=pdName"` - // fsType is filesystem type of the volume that you want to mount. + // Filesystem type of the volume that you want to mount. // Tip: Ensure that the filesystem type is supported by the host operating system. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk // TODO: how do we prevent errors in the filesystem from compromising the machine // +optional FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"` - // partition is the partition in the volume that you want to mount. + // The partition in the volume that you want to mount. // If omitted, the default is to mount by volume name. // Examples: For volume /dev/sda1, you specify the partition as "1". // Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk // +optional Partition int32 `json:"partition,omitempty" protobuf:"varint,3,opt,name=partition"` - // readOnly here will force the ReadOnly setting in VolumeMounts. + // ReadOnly here will force the ReadOnly setting in VolumeMounts. // Defaults to false. // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk // +optional @@ -1032,30 +1033,30 @@ type GCEPersistentDiskVolumeSource struct { // Represents a Quobyte mount that lasts the lifetime of a pod. // Quobyte volumes do not support ownership management or SELinux relabeling. type QuobyteVolumeSource struct { - // registry represents a single or multiple Quobyte Registry services + // Registry represents a single or multiple Quobyte Registry services // specified as a string as host:port pair (multiple entries are separated with commas) // which acts as the central registry for volumes Registry string `json:"registry" protobuf:"bytes,1,opt,name=registry"` - // volume is a string that references an already created Quobyte volume by name. + // Volume is a string that references an already created Quobyte volume by name. Volume string `json:"volume" protobuf:"bytes,2,opt,name=volume"` - // readOnly here will force the Quobyte volume to be mounted with read-only permissions. + // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. // Defaults to false. // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` - // user to map volume access to + // User to map volume access to // Defaults to serivceaccount user // +optional User string `json:"user,omitempty" protobuf:"bytes,4,opt,name=user"` - // group to map volume access to + // Group to map volume access to // Default is no group // +optional Group string `json:"group,omitempty" protobuf:"bytes,5,opt,name=group"` - // tenant owning the given Quobyte volume in the Backend + // Tenant owning the given Quobyte volume in the Backend // Used with dynamically provisioned Quobyte volumes, value is set by the plugin // +optional Tenant string `json:"tenant,omitempty" protobuf:"bytes,6,opt,name=tenant"` @@ -1064,25 +1065,25 @@ type QuobyteVolumeSource struct { // FlexPersistentVolumeSource represents a generic persistent volume resource that is // provisioned/attached using an exec based plugin. type FlexPersistentVolumeSource struct { - // driver is the name of the driver to use for this volume. + // Driver is the name of the driver to use for this volume. Driver string `json:"driver" protobuf:"bytes,1,opt,name=driver"` - // fsType is the Filesystem type to mount. + // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. // +optional FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"` - // secretRef is Optional: SecretRef is reference to the secret object containing + // Optional: SecretRef is reference to the secret object containing // sensitive information to pass to the plugin scripts. This may be // empty if no secret object is specified. If the secret object // contains more than one secret, all secrets are passed to the plugin // scripts. // +optional SecretRef *SecretReference `json:"secretRef,omitempty" protobuf:"bytes,3,opt,name=secretRef"` - // readOnly is Optional: defaults to false (read/write). ReadOnly here will force + // Optional: Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"` - // options is Optional: this field holds extra command options if any. + // Optional: Extra command options if any. // +optional Options map[string]string `json:"options,omitempty" protobuf:"bytes,5,rep,name=options"` } @@ -1090,25 +1091,25 @@ type FlexPersistentVolumeSource struct { // FlexVolume represents a generic volume resource that is // provisioned/attached using an exec based plugin. type FlexVolumeSource struct { - // driver is the name of the driver to use for this volume. + // Driver is the name of the driver to use for this volume. Driver string `json:"driver" protobuf:"bytes,1,opt,name=driver"` - // fsType is the filesystem type to mount. + // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. // +optional FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"` - // secretRef is Optional: secretRef is reference to the secret object containing + // Optional: SecretRef is reference to the secret object containing // sensitive information to pass to the plugin scripts. This may be // empty if no secret object is specified. If the secret object // contains more than one secret, all secrets are passed to the plugin // scripts. // +optional SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,3,opt,name=secretRef"` - // readOnly is Optional: defaults to false (read/write). ReadOnly here will force + // Optional: Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"` - // options is Optional: this field holds extra command options if any. + // Optional: Extra command options if any. // +optional Options map[string]string `json:"options,omitempty" protobuf:"bytes,5,rep,name=options"` } @@ -1120,23 +1121,24 @@ type FlexVolumeSource struct { // can only be mounted as read/write once. AWS EBS volumes support // ownership management and SELinux relabeling. type AWSElasticBlockStoreVolumeSource struct { - // volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). + // Unique ID of the persistent disk resource in AWS (Amazon EBS volume). // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore VolumeID string `json:"volumeID" protobuf:"bytes,1,opt,name=volumeID"` - // fsType is the filesystem type of the volume that you want to mount. + // Filesystem type of the volume that you want to mount. // Tip: Ensure that the filesystem type is supported by the host operating system. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore // TODO: how do we prevent errors in the filesystem from compromising the machine // +optional FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"` - // partition is the partition in the volume that you want to mount. + // The partition in the volume that you want to mount. // If omitted, the default is to mount by volume name. // Examples: For volume /dev/sda1, you specify the partition as "1". // Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). // +optional Partition int32 `json:"partition,omitempty" protobuf:"varint,3,opt,name=partition"` - // readOnly value true will force the readOnly setting in VolumeMounts. + // Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". + // If omitted, the default is "false". // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"` @@ -1150,12 +1152,12 @@ type AWSElasticBlockStoreVolumeSource struct { // EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir // into the Pod's container. type GitRepoVolumeSource struct { - // repository is the URL + // Repository URL Repository string `json:"repository" protobuf:"bytes,1,opt,name=repository"` - // revision is the commit hash for the specified revision. + // Commit hash for the specified revision. // +optional Revision string `json:"revision,omitempty" protobuf:"bytes,2,opt,name=revision"` - // directory is the target directory name. + // Target directory name. // Must not contain or start with '..'. If '.' is supplied, the volume directory will be the // git repository. Otherwise, if specified, the volume will contain the git repository in // the subdirectory with the given name. @@ -1169,11 +1171,11 @@ type GitRepoVolumeSource struct { // as files using the keys in the Data field as the file names. // Secret volumes support ownership management and SELinux relabeling. type SecretVolumeSource struct { - // secretName is the name of the secret in the pod's namespace to use. + // Name of the secret in the pod's namespace to use. // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret // +optional SecretName string `json:"secretName,omitempty" protobuf:"bytes,1,opt,name=secretName"` - // items If unspecified, each key-value pair in the Data field of the referenced + // If unspecified, each key-value pair in the Data field of the referenced // Secret will be projected into the volume as a file whose name is the // key and content is the value. If specified, the listed keys will be // projected into the specified paths, and unlisted keys will not be @@ -1182,7 +1184,7 @@ type SecretVolumeSource struct { // relative and may not contain the '..' path or start with '..'. // +optional Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` - // defaultMode is Optional: mode bits used to set permissions on created files by default. + // Optional: mode bits used to set permissions on created files by default. // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. // YAML accepts both octal and decimal values, JSON requires decimal values // for mode bits. Defaults to 0644. @@ -1191,7 +1193,7 @@ type SecretVolumeSource struct { // mode, like fsGroup, and the result can be other mode bits set. // +optional DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"bytes,3,opt,name=defaultMode"` - // optional field specify whether the Secret or its keys must be defined + // Specify whether the Secret or its keys must be defined // +optional Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"` } @@ -1208,7 +1210,7 @@ const ( // mode. type SecretProjection struct { LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"` - // items if unspecified, each key-value pair in the Data field of the referenced + // If unspecified, each key-value pair in the Data field of the referenced // Secret will be projected into the volume as a file whose name is the // key and content is the value. If specified, the listed keys will be // projected into the specified paths, and unlisted keys will not be @@ -1217,7 +1219,7 @@ type SecretProjection struct { // relative and may not contain the '..' path or start with '..'. // +optional Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` - // optional field specify whether the Secret or its key must be defined + // Specify whether the Secret or its key must be defined // +optional Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"` } @@ -1225,15 +1227,16 @@ type SecretProjection struct { // Represents an NFS mount that lasts the lifetime of a pod. // NFS volumes do not support ownership management or SELinux relabeling. type NFSVolumeSource struct { - // server is the hostname or IP address of the NFS server. + // Server is the hostname or IP address of the NFS server. // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs Server string `json:"server" protobuf:"bytes,1,opt,name=server"` - // path that is exported by the NFS server. + // Path that is exported by the NFS server. // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs Path string `json:"path" protobuf:"bytes,2,opt,name=path"` - // readOnly here will force the NFS export to be mounted with read-only permissions. + // ReadOnly here will force + // the NFS export to be mounted with read-only permissions. // Defaults to false. // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs // +optional @@ -1244,42 +1247,42 @@ type NFSVolumeSource struct { // ISCSI volumes can only be mounted as read/write once. // ISCSI volumes support ownership management and SELinux relabeling. type ISCSIVolumeSource struct { - // targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port + // iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port // is other than default (typically TCP ports 860 and 3260). TargetPortal string `json:"targetPortal" protobuf:"bytes,1,opt,name=targetPortal"` - // iqn is the target iSCSI Qualified Name. + // Target iSCSI Qualified Name. IQN string `json:"iqn" protobuf:"bytes,2,opt,name=iqn"` - // lun represents iSCSI Target Lun number. + // iSCSI Target Lun number. Lun int32 `json:"lun" protobuf:"varint,3,opt,name=lun"` - // iscsiInterface is the interface Name that uses an iSCSI transport. + // iSCSI Interface Name that uses an iSCSI transport. // Defaults to 'default' (tcp). // +optional ISCSIInterface string `json:"iscsiInterface,omitempty" protobuf:"bytes,4,opt,name=iscsiInterface"` - // fsType is the filesystem type of the volume that you want to mount. + // Filesystem type of the volume that you want to mount. // Tip: Ensure that the filesystem type is supported by the host operating system. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi // TODO: how do we prevent errors in the filesystem from compromising the machine // +optional FSType string `json:"fsType,omitempty" protobuf:"bytes,5,opt,name=fsType"` - // readOnly here will force the ReadOnly setting in VolumeMounts. + // ReadOnly here will force the ReadOnly setting in VolumeMounts. // Defaults to false. // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,6,opt,name=readOnly"` - // portals is the iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port + // iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port // is other than default (typically TCP ports 860 and 3260). // +optional Portals []string `json:"portals,omitempty" protobuf:"bytes,7,opt,name=portals"` - // chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication + // whether support iSCSI Discovery CHAP authentication // +optional DiscoveryCHAPAuth bool `json:"chapAuthDiscovery,omitempty" protobuf:"varint,8,opt,name=chapAuthDiscovery"` - // chapAuthSession defines whether support iSCSI Session CHAP authentication + // whether support iSCSI Session CHAP authentication // +optional SessionCHAPAuth bool `json:"chapAuthSession,omitempty" protobuf:"varint,11,opt,name=chapAuthSession"` - // secretRef is the CHAP Secret for iSCSI target and initiator authentication + // CHAP Secret for iSCSI target and initiator authentication // +optional SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,10,opt,name=secretRef"` - // initiatorName is the custom iSCSI Initiator Name. + // Custom iSCSI Initiator Name. // If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface // : will be created for the connection. // +optional @@ -1290,42 +1293,42 @@ type ISCSIVolumeSource struct { // ISCSI volumes can only be mounted as read/write once. // ISCSI volumes support ownership management and SELinux relabeling. type ISCSIPersistentVolumeSource struct { - // targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port + // iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port // is other than default (typically TCP ports 860 and 3260). TargetPortal string `json:"targetPortal" protobuf:"bytes,1,opt,name=targetPortal"` - // iqn is Target iSCSI Qualified Name. + // Target iSCSI Qualified Name. IQN string `json:"iqn" protobuf:"bytes,2,opt,name=iqn"` - // lun is iSCSI Target Lun number. + // iSCSI Target Lun number. Lun int32 `json:"lun" protobuf:"varint,3,opt,name=lun"` - // iscsiInterface is the interface Name that uses an iSCSI transport. + // iSCSI Interface Name that uses an iSCSI transport. // Defaults to 'default' (tcp). // +optional ISCSIInterface string `json:"iscsiInterface,omitempty" protobuf:"bytes,4,opt,name=iscsiInterface"` - // fsType is the filesystem type of the volume that you want to mount. + // Filesystem type of the volume that you want to mount. // Tip: Ensure that the filesystem type is supported by the host operating system. // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi // TODO: how do we prevent errors in the filesystem from compromising the machine // +optional FSType string `json:"fsType,omitempty" protobuf:"bytes,5,opt,name=fsType"` - // readOnly here will force the ReadOnly setting in VolumeMounts. + // ReadOnly here will force the ReadOnly setting in VolumeMounts. // Defaults to false. // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,6,opt,name=readOnly"` - // portals is the iSCSI Target Portal List. The Portal is either an IP or ip_addr:port if the port + // iSCSI Target Portal List. The Portal is either an IP or ip_addr:port if the port // is other than default (typically TCP ports 860 and 3260). // +optional Portals []string `json:"portals,omitempty" protobuf:"bytes,7,opt,name=portals"` - // chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication + // whether support iSCSI Discovery CHAP authentication // +optional DiscoveryCHAPAuth bool `json:"chapAuthDiscovery,omitempty" protobuf:"varint,8,opt,name=chapAuthDiscovery"` - // chapAuthSession defines whether support iSCSI Session CHAP authentication + // whether support iSCSI Session CHAP authentication // +optional SessionCHAPAuth bool `json:"chapAuthSession,omitempty" protobuf:"varint,11,opt,name=chapAuthSession"` - // secretRef is the CHAP Secret for iSCSI target and initiator authentication + // CHAP Secret for iSCSI target and initiator authentication // +optional SecretRef *SecretReference `json:"secretRef,omitempty" protobuf:"bytes,10,opt,name=secretRef"` - // initiatorName is the custom iSCSI Initiator Name. + // Custom iSCSI Initiator Name. // If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface // : will be created for the connection. // +optional @@ -1336,23 +1339,23 @@ type ISCSIPersistentVolumeSource struct { // Fibre Channel volumes can only be mounted as read/write once. // Fibre Channel volumes support ownership management and SELinux relabeling. type FCVolumeSource struct { - // targetWWNs is Optional: FC target worldwide names (WWNs) + // Optional: FC target worldwide names (WWNs) // +optional TargetWWNs []string `json:"targetWWNs,omitempty" protobuf:"bytes,1,rep,name=targetWWNs"` - // lun is Optional: FC target lun number + // Optional: FC target lun number // +optional Lun *int32 `json:"lun,omitempty" protobuf:"varint,2,opt,name=lun"` - // fsType is the filesystem type to mount. + // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // TODO: how do we prevent errors in the filesystem from compromising the machine // +optional FSType string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"` - // readOnly is Optional: Defaults to false (read/write). ReadOnly here will force + // Optional: Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"` - // wwids Optional: FC volume world wide identifiers (wwids) + // Optional: FC volume world wide identifiers (wwids) // Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. // +optional WWIDs []string `json:"wwids,omitempty" protobuf:"bytes,5,rep,name=wwids"` @@ -1360,11 +1363,11 @@ type FCVolumeSource struct { // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. type AzureFileVolumeSource struct { - // secretName is the name of secret that contains Azure Storage Account Name and Key + // the name of secret that contains Azure Storage Account Name and Key SecretName string `json:"secretName" protobuf:"bytes,1,opt,name=secretName"` - // shareName is the azure share Name + // Share Name ShareName string `json:"shareName" protobuf:"bytes,2,opt,name=shareName"` - // readOnly defaults to false (read/write). ReadOnly here will force + // Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` @@ -1372,15 +1375,15 @@ type AzureFileVolumeSource struct { // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. type AzureFilePersistentVolumeSource struct { - // secretName is the name of secret that contains Azure Storage Account Name and Key + // the name of secret that contains Azure Storage Account Name and Key SecretName string `json:"secretName" protobuf:"bytes,1,opt,name=secretName"` - // shareName is the azure Share Name + // Share Name ShareName string `json:"shareName" protobuf:"bytes,2,opt,name=shareName"` - // readOnly defaults to false (read/write). ReadOnly here will force + // Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` - // secretNamespace is the namespace of the secret that contains Azure Storage Account Name and Key + // the namespace of the secret that contains Azure Storage Account Name and Key // default is the same as the Pod // +optional SecretNamespace *string `json:"secretNamespace" protobuf:"bytes,4,opt,name=secretNamespace"` @@ -1388,26 +1391,26 @@ type AzureFilePersistentVolumeSource struct { // Represents a vSphere volume resource. type VsphereVirtualDiskVolumeSource struct { - // volumePath is the path that identifies vSphere volume vmdk + // Path that identifies vSphere volume vmdk VolumePath string `json:"volumePath" protobuf:"bytes,1,opt,name=volumePath"` - // fsType is filesystem type to mount. + // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // +optional FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"` - // storagePolicyName is the storage Policy Based Management (SPBM) profile name. + // Storage Policy Based Management (SPBM) profile name. // +optional StoragePolicyName string `json:"storagePolicyName,omitempty" protobuf:"bytes,3,opt,name=storagePolicyName"` - // storagePolicyID is the storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. + // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. // +optional StoragePolicyID string `json:"storagePolicyID,omitempty" protobuf:"bytes,4,opt,name=storagePolicyID"` } // Represents a Photon Controller persistent disk resource. type PhotonPersistentDiskVolumeSource struct { - // pdID is the ID that identifies Photon Controller persistent disk + // ID that identifies Photon Controller persistent disk PdID string `json:"pdID" protobuf:"bytes,1,opt,name=pdID"` - // fsType is the filesystem type to mount. + // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"` @@ -1431,35 +1434,35 @@ const ( // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. type AzureDiskVolumeSource struct { - // diskName is the Name of the data disk in the blob storage + // The Name of the data disk in the blob storage DiskName string `json:"diskName" protobuf:"bytes,1,opt,name=diskName"` - // diskURI is the URI of data disk in the blob storage + // The URI the data disk in the blob storage DataDiskURI string `json:"diskURI" protobuf:"bytes,2,opt,name=diskURI"` - // cachingMode is the Host Caching mode: None, Read Only, Read Write. + // Host Caching mode: None, Read Only, Read Write. // +optional CachingMode *AzureDataDiskCachingMode `json:"cachingMode,omitempty" protobuf:"bytes,3,opt,name=cachingMode,casttype=AzureDataDiskCachingMode"` - // fsType is Filesystem type to mount. + // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // +optional FSType *string `json:"fsType,omitempty" protobuf:"bytes,4,opt,name=fsType"` - // readOnly Defaults to false (read/write). ReadOnly here will force + // Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // +optional ReadOnly *bool `json:"readOnly,omitempty" protobuf:"varint,5,opt,name=readOnly"` - // kind expected values are Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared + // Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared Kind *AzureDataDiskKind `json:"kind,omitempty" protobuf:"bytes,6,opt,name=kind,casttype=AzureDataDiskKind"` } // PortworxVolumeSource represents a Portworx volume resource. type PortworxVolumeSource struct { - // volumeID uniquely identifies a Portworx volume + // VolumeID uniquely identifies a Portworx volume VolumeID string `json:"volumeID" protobuf:"bytes,1,opt,name=volumeID"` - // fSType represents the filesystem type to mount + // FSType represents the filesystem type to mount // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"` - // readOnly defaults to false (read/write). ReadOnly here will force + // Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` @@ -1467,36 +1470,36 @@ type PortworxVolumeSource struct { // ScaleIOVolumeSource represents a persistent ScaleIO volume type ScaleIOVolumeSource struct { - // gateway is the host address of the ScaleIO API Gateway. + // The host address of the ScaleIO API Gateway. Gateway string `json:"gateway" protobuf:"bytes,1,opt,name=gateway"` - // system is the name of the storage system as configured in ScaleIO. + // The name of the storage system as configured in ScaleIO. System string `json:"system" protobuf:"bytes,2,opt,name=system"` - // secretRef references to the secret for ScaleIO user and other + // SecretRef references to the secret for ScaleIO user and other // sensitive information. If this is not provided, Login operation will fail. SecretRef *LocalObjectReference `json:"secretRef" protobuf:"bytes,3,opt,name=secretRef"` - // sslEnabled Flag enable/disable SSL communication with Gateway, default false + // Flag to enable/disable SSL communication with Gateway, default false // +optional SSLEnabled bool `json:"sslEnabled,omitempty" protobuf:"varint,4,opt,name=sslEnabled"` - // protectionDomain is the name of the ScaleIO Protection Domain for the configured storage. + // The name of the ScaleIO Protection Domain for the configured storage. // +optional ProtectionDomain string `json:"protectionDomain,omitempty" protobuf:"bytes,5,opt,name=protectionDomain"` - // storagePool is the ScaleIO Storage Pool associated with the protection domain. + // The ScaleIO Storage Pool associated with the protection domain. // +optional StoragePool string `json:"storagePool,omitempty" protobuf:"bytes,6,opt,name=storagePool"` - // storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. + // Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. // Default is ThinProvisioned. // +optional StorageMode string `json:"storageMode,omitempty" protobuf:"bytes,7,opt,name=storageMode"` - // volumeName is the name of a volume already created in the ScaleIO system + // The name of a volume already created in the ScaleIO system // that is associated with this volume source. VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,8,opt,name=volumeName"` - // fsType is the filesystem type to mount. + // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". // Default is "xfs". // +optional FSType string `json:"fsType,omitempty" protobuf:"bytes,9,opt,name=fsType"` - // readOnly Defaults to false (read/write). ReadOnly here will force + // Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,10,opt,name=readOnly"` @@ -1504,36 +1507,36 @@ type ScaleIOVolumeSource struct { // ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume type ScaleIOPersistentVolumeSource struct { - // gateway is the host address of the ScaleIO API Gateway. + // The host address of the ScaleIO API Gateway. Gateway string `json:"gateway" protobuf:"bytes,1,opt,name=gateway"` - // system is the name of the storage system as configured in ScaleIO. + // The name of the storage system as configured in ScaleIO. System string `json:"system" protobuf:"bytes,2,opt,name=system"` - // secretRef references to the secret for ScaleIO user and other + // SecretRef references to the secret for ScaleIO user and other // sensitive information. If this is not provided, Login operation will fail. SecretRef *SecretReference `json:"secretRef" protobuf:"bytes,3,opt,name=secretRef"` - // sslEnabled is the flag to enable/disable SSL communication with Gateway, default false + // Flag to enable/disable SSL communication with Gateway, default false // +optional SSLEnabled bool `json:"sslEnabled,omitempty" protobuf:"varint,4,opt,name=sslEnabled"` - // protectionDomain is the name of the ScaleIO Protection Domain for the configured storage. + // The name of the ScaleIO Protection Domain for the configured storage. // +optional ProtectionDomain string `json:"protectionDomain,omitempty" protobuf:"bytes,5,opt,name=protectionDomain"` - // storagePool is the ScaleIO Storage Pool associated with the protection domain. + // The ScaleIO Storage Pool associated with the protection domain. // +optional StoragePool string `json:"storagePool,omitempty" protobuf:"bytes,6,opt,name=storagePool"` - // storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. + // Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. // Default is ThinProvisioned. // +optional StorageMode string `json:"storageMode,omitempty" protobuf:"bytes,7,opt,name=storageMode"` - // volumeName is the name of a volume already created in the ScaleIO system + // The name of a volume already created in the ScaleIO system // that is associated with this volume source. VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,8,opt,name=volumeName"` - // fsType is the filesystem type to mount. + // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". // Default is "xfs" // +optional FSType string `json:"fsType,omitempty" protobuf:"bytes,9,opt,name=fsType"` - // readOnly defaults to false (read/write). ReadOnly here will force + // Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,10,opt,name=readOnly"` @@ -1541,10 +1544,10 @@ type ScaleIOPersistentVolumeSource struct { // Represents a StorageOS persistent volume resource. type StorageOSVolumeSource struct { - // volumeName is the human-readable name of the StorageOS volume. Volume + // VolumeName is the human-readable name of the StorageOS volume. Volume // names are only unique within a namespace. VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,1,opt,name=volumeName"` - // volumeNamespace specifies the scope of the volume within StorageOS. If no + // VolumeNamespace specifies the scope of the volume within StorageOS. If no // namespace is specified then the Pod's namespace will be used. This allows the // Kubernetes name scoping to be mirrored within StorageOS for tighter integration. // Set VolumeName to any name to override the default behaviour. @@ -1552,16 +1555,16 @@ type StorageOSVolumeSource struct { // Namespaces that do not pre-exist within StorageOS will be created. // +optional VolumeNamespace string `json:"volumeNamespace,omitempty" protobuf:"bytes,2,opt,name=volumeNamespace"` - // fsType is the filesystem type to mount. + // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // +optional FSType string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"` - // readOnly defaults to false (read/write). ReadOnly here will force + // Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"` - // secretRef specifies the secret to use for obtaining the StorageOS API + // SecretRef specifies the secret to use for obtaining the StorageOS API // credentials. If not specified, default values will be attempted. // +optional SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,5,opt,name=secretRef"` @@ -1569,10 +1572,10 @@ type StorageOSVolumeSource struct { // Represents a StorageOS persistent volume resource. type StorageOSPersistentVolumeSource struct { - // volumeName is the human-readable name of the StorageOS volume. Volume + // VolumeName is the human-readable name of the StorageOS volume. Volume // names are only unique within a namespace. VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,1,opt,name=volumeName"` - // volumeNamespace specifies the scope of the volume within StorageOS. If no + // VolumeNamespace specifies the scope of the volume within StorageOS. If no // namespace is specified then the Pod's namespace will be used. This allows the // Kubernetes name scoping to be mirrored within StorageOS for tighter integration. // Set VolumeName to any name to override the default behaviour. @@ -1580,16 +1583,16 @@ type StorageOSPersistentVolumeSource struct { // Namespaces that do not pre-exist within StorageOS will be created. // +optional VolumeNamespace string `json:"volumeNamespace,omitempty" protobuf:"bytes,2,opt,name=volumeNamespace"` - // fsType is the filesystem type to mount. + // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. // +optional FSType string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"` - // readOnly defaults to false (read/write). ReadOnly here will force + // Defaults to false (read/write). ReadOnly here will force // the ReadOnly setting in VolumeMounts. // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,4,opt,name=readOnly"` - // secretRef specifies the secret to use for obtaining the StorageOS API + // SecretRef specifies the secret to use for obtaining the StorageOS API // credentials. If not specified, default values will be attempted. // +optional SecretRef *ObjectReference `json:"secretRef,omitempty" protobuf:"bytes,5,opt,name=secretRef"` @@ -1603,7 +1606,7 @@ type StorageOSPersistentVolumeSource struct { // ConfigMap volumes support ownership management and SELinux relabeling. type ConfigMapVolumeSource struct { LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"` - // items if unspecified, each key-value pair in the Data field of the referenced + // If unspecified, each key-value pair in the Data field of the referenced // ConfigMap will be projected into the volume as a file whose name is the // key and content is the value. If specified, the listed keys will be // projected into the specified paths, and unlisted keys will not be @@ -1612,7 +1615,7 @@ type ConfigMapVolumeSource struct { // relative and may not contain the '..' path or start with '..'. // +optional Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` - // defaultMode is optional: mode bits used to set permissions on created files by default. + // Optional: mode bits used to set permissions on created files by default. // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. // Defaults to 0644. @@ -1621,7 +1624,7 @@ type ConfigMapVolumeSource struct { // mode, like fsGroup, and the result can be other mode bits set. // +optional DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"varint,3,opt,name=defaultMode"` - // optional specify whether the ConfigMap or its keys must be defined + // Specify whether the ConfigMap or its keys must be defined // +optional Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"` } @@ -1639,7 +1642,7 @@ const ( // mode. type ConfigMapProjection struct { LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"` - // items if unspecified, each key-value pair in the Data field of the referenced + // If unspecified, each key-value pair in the Data field of the referenced // ConfigMap will be projected into the volume as a file whose name is the // key and content is the value. If specified, the listed keys will be // projected into the specified paths, and unlisted keys will not be @@ -1648,7 +1651,7 @@ type ConfigMapProjection struct { // relative and may not contain the '..' path or start with '..'. // +optional Items []KeyToPath `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` - // optional specify whether the ConfigMap or its keys must be defined + // Specify whether the ConfigMap or its keys must be defined // +optional Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"` } @@ -1658,13 +1661,13 @@ type ConfigMapProjection struct { // the pods runtime filesystem for use against APIs (Kubernetes API Server or // otherwise). type ServiceAccountTokenProjection struct { - // audience is the intended audience of the token. A recipient of a token + // Audience is the intended audience of the token. A recipient of a token // must identify itself with an identifier specified in the audience of the // token, and otherwise should reject the token. The audience defaults to the // identifier of the apiserver. //+optional Audience string `json:"audience,omitempty" protobuf:"bytes,1,rep,name=audience"` - // expirationSeconds is the requested duration of validity of the service + // ExpirationSeconds is the requested duration of validity of the service // account token. As the token approaches expiration, the kubelet volume // plugin will proactively rotate the service account token. The kubelet will // start trying to rotate the token if the token is older than 80 percent of @@ -1672,17 +1675,17 @@ type ServiceAccountTokenProjection struct { // and must be at least 10 minutes. //+optional ExpirationSeconds *int64 `json:"expirationSeconds,omitempty" protobuf:"varint,2,opt,name=expirationSeconds"` - // path is the path relative to the mount point of the file to project the + // Path is the path relative to the mount point of the file to project the // token into. Path string `json:"path" protobuf:"bytes,3,opt,name=path"` } // Represents a projected volume source type ProjectedVolumeSource struct { - // sources is the list of volume projections + // list of volume projections // +optional Sources []VolumeProjection `json:"sources" protobuf:"bytes,1,rep,name=sources"` - // defaultMode are the mode bits used to set permissions on created files by default. + // Mode bits used to set permissions on created files by default. // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. // Directories within the path are not affected by this setting. @@ -1696,16 +1699,16 @@ type ProjectedVolumeSource struct { type VolumeProjection struct { // all types below are the supported types for projection into the same volume - // secret information about the secret data to project + // information about the secret data to project // +optional Secret *SecretProjection `json:"secret,omitempty" protobuf:"bytes,1,opt,name=secret"` - // downwardAPI information about the downwardAPI data to project + // information about the downwardAPI data to project // +optional DownwardAPI *DownwardAPIProjection `json:"downwardAPI,omitempty" protobuf:"bytes,2,opt,name=downwardAPI"` - // configMap information about the configMap data to project + // information about the configMap data to project // +optional ConfigMap *ConfigMapProjection `json:"configMap,omitempty" protobuf:"bytes,3,opt,name=configMap"` - // serviceAccountToken is information about the serviceAccountToken data to project + // information about the serviceAccountToken data to project // +optional ServiceAccountToken *ServiceAccountTokenProjection `json:"serviceAccountToken,omitempty" protobuf:"bytes,4,opt,name=serviceAccountToken"` } @@ -1716,15 +1719,15 @@ const ( // Maps a string key to a path within a volume. type KeyToPath struct { - // key is the key to project. + // The key to project. Key string `json:"key" protobuf:"bytes,1,opt,name=key"` - // path is the relative path of the file to map the key to. + // The relative path of the file to map the key to. // May not be an absolute path. // May not contain the path element '..'. // May not start with the string '..'. Path string `json:"path" protobuf:"bytes,2,opt,name=path"` - // mode is Optional: mode bits used to set permissions on this file. + // Optional: mode bits used to set permissions on this file. // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. // If not specified, the volume defaultMode will be used. @@ -1736,11 +1739,11 @@ type KeyToPath struct { // Local represents directly-attached storage with node affinity (Beta feature) type LocalVolumeSource struct { - // path of the full path to the volume on the node. + // The full path to the volume on the node. // It can be either a directory or block device (disk, partition, ...). Path string `json:"path" protobuf:"bytes,1,opt,name=path"` - // fsType is the filesystem type to mount. + // Filesystem type to mount. // It applies only when the Path is a block device. // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". The default value is to auto-select a filesystem if unspecified. @@ -1750,30 +1753,31 @@ type LocalVolumeSource struct { // Represents storage that is managed by an external CSI volume driver (Beta feature) type CSIPersistentVolumeSource struct { - // driver is the name of the driver to use for this volume. + // Driver is the name of the driver to use for this volume. // Required. Driver string `json:"driver" protobuf:"bytes,1,opt,name=driver"` - // volumeHandle is the unique volume name returned by the CSI volume + // VolumeHandle is the unique volume name returned by the CSI volume // plugin’s CreateVolume to refer to the volume on all subsequent calls. // Required. VolumeHandle string `json:"volumeHandle" protobuf:"bytes,2,opt,name=volumeHandle"` - // readOnly value to pass to ControllerPublishVolumeRequest. + // Optional: The value to pass to ControllerPublishVolumeRequest. // Defaults to false (read/write). // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` - // fsType to mount. Must be a filesystem type supported by the host operating system. + // Filesystem type to mount. + // Must be a filesystem type supported by the host operating system. // Ex. "ext4", "xfs", "ntfs". // +optional FSType string `json:"fsType,omitempty" protobuf:"bytes,4,opt,name=fsType"` - // volumeAttributes of the volume to publish. + // Attributes of the volume to publish. // +optional VolumeAttributes map[string]string `json:"volumeAttributes,omitempty" protobuf:"bytes,5,rep,name=volumeAttributes"` - // controllerPublishSecretRef is a reference to the secret object containing + // ControllerPublishSecretRef is a reference to the secret object containing // sensitive information to pass to the CSI driver to complete the CSI // ControllerPublishVolume and ControllerUnpublishVolume calls. // This field is optional, and may be empty if no secret is required. If the @@ -1781,7 +1785,7 @@ type CSIPersistentVolumeSource struct { // +optional ControllerPublishSecretRef *SecretReference `json:"controllerPublishSecretRef,omitempty" protobuf:"bytes,6,opt,name=controllerPublishSecretRef"` - // nodeStageSecretRef is a reference to the secret object containing sensitive + // NodeStageSecretRef is a reference to the secret object containing sensitive // information to pass to the CSI driver to complete the CSI NodeStageVolume // and NodeStageVolume and NodeUnstageVolume calls. // This field is optional, and may be empty if no secret is required. If the @@ -1789,7 +1793,7 @@ type CSIPersistentVolumeSource struct { // +optional NodeStageSecretRef *SecretReference `json:"nodeStageSecretRef,omitempty" protobuf:"bytes,7,opt,name=nodeStageSecretRef"` - // nodePublishSecretRef is a reference to the secret object containing + // NodePublishSecretRef is a reference to the secret object containing // sensitive information to pass to the CSI driver to complete the CSI // NodePublishVolume and NodeUnpublishVolume calls. // This field is optional, and may be empty if no secret is required. If the @@ -1797,7 +1801,7 @@ type CSIPersistentVolumeSource struct { // +optional NodePublishSecretRef *SecretReference `json:"nodePublishSecretRef,omitempty" protobuf:"bytes,8,opt,name=nodePublishSecretRef"` - // controllerExpandSecretRef is a reference to the secret object containing + // ControllerExpandSecretRef is a reference to the secret object containing // sensitive information to pass to the CSI driver to complete the CSI // ControllerExpandVolume call. // This is an alpha field and requires enabling ExpandCSIVolumes feature gate. @@ -1809,27 +1813,27 @@ type CSIPersistentVolumeSource struct { // Represents a source location of a volume to mount, managed by an external CSI driver type CSIVolumeSource struct { - // driver is the name of the CSI driver that handles this volume. + // Driver is the name of the CSI driver that handles this volume. // Consult with your admin for the correct name as registered in the cluster. Driver string `json:"driver" protobuf:"bytes,1,opt,name=driver"` - // readOnly specifies a read-only configuration for the volume. + // Specifies a read-only configuration for the volume. // Defaults to false (read/write). // +optional ReadOnly *bool `json:"readOnly,omitempty" protobuf:"varint,2,opt,name=readOnly"` - // fsType to mount. Ex. "ext4", "xfs", "ntfs". + // Filesystem type to mount. Ex. "ext4", "xfs", "ntfs". // If not provided, the empty value is passed to the associated CSI driver // which will determine the default filesystem to apply. // +optional FSType *string `json:"fsType,omitempty" protobuf:"bytes,3,opt,name=fsType"` - // volumeAttributes stores driver-specific properties that are passed to the CSI + // VolumeAttributes stores driver-specific properties that are passed to the CSI // driver. Consult your driver's documentation for supported values. // +optional VolumeAttributes map[string]string `json:"volumeAttributes,omitempty" protobuf:"bytes,4,rep,name=volumeAttributes"` - // nodePublishSecretRef is a reference to the secret object containing + // NodePublishSecretRef is a reference to the secret object containing // sensitive information to pass to the CSI driver to complete the CSI // NodePublishVolume and NodeUnpublishVolume calls. // This field is optional, and may be empty if no secret is required. If the @@ -2292,14 +2296,14 @@ type Container struct { // Each container in a pod must have a unique name (DNS_LABEL). // Cannot be updated. Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // Container image name. + // Docker image name. // More info: https://kubernetes.io/docs/concepts/containers/images // This field is optional to allow higher level config management to default or override // container images in workload controllers like Deployments and StatefulSets. // +optional Image string `json:"image,omitempty" protobuf:"bytes,2,opt,name=image"` // Entrypoint array. Not executed within a shell. - // The container image's ENTRYPOINT is used if this is not provided. + // The docker image's ENTRYPOINT is used if this is not provided. // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable // cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced // to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will @@ -2309,7 +2313,7 @@ type Container struct { // +optional Command []string `json:"command,omitempty" protobuf:"bytes,3,rep,name=command"` // Arguments to the entrypoint. - // The container image's CMD is used if this is not provided. + // The docker image's CMD is used if this is not provided. // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable // cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced // to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will @@ -2461,7 +2465,7 @@ type ProbeHandler struct { TCPSocket *TCPSocketAction `json:"tcpSocket,omitempty" protobuf:"bytes,3,opt,name=tcpSocket"` // GRPC specifies an action involving a GRPC port. - // This is a beta field and requires enabling GRPCContainerProbe feature gate. + // This is an alpha field and requires enabling GRPCContainerProbe feature gate. // +featureGate=GRPCContainerProbe // +optional GRPC *GRPCAction `json:"grpc,omitempty" protobuf:"bytes,4,opt,name=grpc"` @@ -2554,7 +2558,7 @@ type ContainerStateTerminated struct { // Time at which the container last terminated // +optional FinishedAt metav1.Time `json:"finishedAt,omitempty" protobuf:"bytes,6,opt,name=finishedAt"` - // Container's ID in the format '://' + // Container's ID in the format 'docker://' // +optional ContainerID string `json:"containerID,omitempty" protobuf:"bytes,7,opt,name=containerID"` } @@ -2594,7 +2598,7 @@ type ContainerStatus struct { Image string `json:"image" protobuf:"bytes,6,opt,name=image"` // ImageID of the container's image. ImageID string `json:"imageID" protobuf:"bytes,7,opt,name=imageID"` - // Container's ID in the format '://'. + // Container's ID in the format 'docker://'. // +optional ContainerID string `json:"containerID,omitempty" protobuf:"bytes,8,opt,name=containerID"` // Specifies whether the container has passed its startup probe. @@ -2631,9 +2635,10 @@ const ( ) // PodConditionType is a valid value for PodCondition.Type +// +enum type PodConditionType string -// These are built-in conditions of pod. An application may use a custom condition not listed here. +// These are valid conditions of pod. const ( // ContainersReady indicates whether all containers in the pod are ready. ContainersReady PodConditionType = "ContainersReady" @@ -2902,7 +2907,7 @@ type PodAffinityTerm struct { // namespaces specifies a static list of namespace names that the term applies to. // The term is applied to the union of the namespaces listed in this field // and the ones selected by namespaceSelector. - // null or empty namespaces list and null namespaceSelector means "this pod's namespace". + // null or empty namespaces list and null namespaceSelector means "this pod's namespace" // +optional Namespaces []string `json:"namespaces,omitempty" protobuf:"bytes,2,rep,name=namespaces"` // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching @@ -2916,6 +2921,7 @@ type PodAffinityTerm struct { // and the ones listed in the namespaces field. // null selector and null or empty namespaces list means "this pod's namespace". // An empty selector ({}) matches all namespaces. + // This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. // +optional NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty" protobuf:"bytes,4,opt,name=namespaceSelector"` } @@ -3169,7 +3175,8 @@ type PodSpec struct { // +optional SecurityContext *PodSecurityContext `json:"securityContext,omitempty" protobuf:"bytes,14,opt,name=securityContext"` // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. - // If specified, these secrets will be passed to individual puller implementations for them to use. + // If specified, these secrets will be passed to individual puller implementations for them to use. For example, + // in the case of docker, only DockerConfig type secrets are honored. // More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod // +optional // +patchMergeKey=name @@ -3230,6 +3237,7 @@ type PodSpec struct { // If unset or empty, the "legacy" RuntimeClass will be used, which is an implicit class with an // empty definition that uses the default runtime handler. // More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class + // This is a beta feature as of Kubernetes v1.14. // +optional RuntimeClassName *string `json:"runtimeClassName,omitempty" protobuf:"bytes,29,opt,name=runtimeClassName"` // EnableServiceLinks indicates whether information about services should be injected into pod's @@ -3240,6 +3248,7 @@ type PodSpec struct { // PreemptionPolicy is the Policy for preempting pods with lower priority. // One of Never, PreemptLowerPriority. // Defaults to PreemptLowerPriority if unset. + // This field is beta-level, gated by the NonPreemptingPriority feature-gate. // +optional PreemptionPolicy *PreemptionPolicy `json:"preemptionPolicy,omitempty" protobuf:"bytes,31,opt,name=preemptionPolicy"` // Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. @@ -3249,6 +3258,7 @@ type PodSpec struct { // set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value // defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. // More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md + // This field is beta-level as of Kubernetes v1.18, and is only honored by servers that enable the PodOverhead feature. // +optional Overhead ResourceList `json:"overhead,omitempty" protobuf:"bytes,32,opt,name=overhead"` // TopologySpreadConstraints describes how a group of pods ought to spread across topology @@ -3296,7 +3306,7 @@ type PodSpec struct { // - spec.containers[*].securityContext.runAsUser // - spec.containers[*].securityContext.runAsGroup // +optional - // This is a beta field and requires the IdentifyPodOS feature + // This is an alpha field and requires the IdentifyPodOS feature OS *PodOS `json:"os,omitempty" protobuf:"bytes,36,opt,name=os"` } @@ -3335,18 +3345,15 @@ type TopologySpreadConstraint struct { // MaxSkew describes the degree to which pods may be unevenly distributed. // When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference // between the number of matching pods in the target topology and the global minimum. - // The global minimum is the minimum number of matching pods in an eligible domain - // or zero if the number of eligible domains is less than MinDomains. // For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same - // labelSelector spread as 2/2/1: - // In this case, the global minimum is 1. + // labelSelector spread as 1/1/0: // +-------+-------+-------+ // | zone1 | zone2 | zone3 | // +-------+-------+-------+ - // | P P | P P | P | + // | P | P | | // +-------+-------+-------+ - // - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; - // scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) + // - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1; + // scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) // violate MaxSkew(1). // - if MaxSkew is 2, incoming pod can be scheduled onto any zone. // When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence @@ -3357,10 +3364,6 @@ type TopologySpreadConstraint struct { // and identical values are considered to be in the same topology. // We consider each as a "bucket", and try to put balanced number // of pods into each bucket. - // We define a domain as a particular instance of a topology. - // Also, we define an eligible domain as a domain whose nodes match the node selector. - // e.g. If TopologyKey is "kubernetes.io/hostname", each Node is a domain of that topology. - // And, if TopologyKey is "topology.kubernetes.io/zone", each zone is a domain of that topology. // It's a required field. TopologyKey string `json:"topologyKey" protobuf:"bytes,2,opt,name=topologyKey"` // WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy @@ -3390,32 +3393,6 @@ type TopologySpreadConstraint struct { // in their corresponding topology domain. // +optional LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty" protobuf:"bytes,4,opt,name=labelSelector"` - // MinDomains indicates a minimum number of eligible domains. - // When the number of eligible domains with matching topology keys is less than minDomains, - // Pod Topology Spread treats "global minimum" as 0, and then the calculation of Skew is performed. - // And when the number of eligible domains with matching topology keys equals or greater than minDomains, - // this value has no effect on scheduling. - // As a result, when the number of eligible domains is less than minDomains, - // scheduler won't schedule more than maxSkew Pods to those domains. - // If value is nil, the constraint behaves as if MinDomains is equal to 1. - // Valid values are integers greater than 0. - // When value is not nil, WhenUnsatisfiable must be DoNotSchedule. - // - // For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same - // labelSelector spread as 2/2/2: - // +-------+-------+-------+ - // | zone1 | zone2 | zone3 | - // +-------+-------+-------+ - // | P P | P P | P P | - // +-------+-------+-------+ - // The number of domains is less than 5(MinDomains), so "global minimum" is treated as 0. - // In this situation, new pod with the same labelSelector cannot be scheduled, - // because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, - // it will violate MaxSkew. - // - // This is an alpha field and requires enabling MinDomainsInPodTopologySpread feature gate. - // +optional - MinDomains *int32 `json:"minDomains,omitempty" protobuf:"varint,5,opt,name=minDomains"` } const ( @@ -3621,11 +3598,11 @@ type EphemeralContainerCommon struct { // Name of the ephemeral container specified as a DNS_LABEL. // This name must be unique among all containers, init containers and ephemeral containers. Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // Container image name. + // Docker image name. // More info: https://kubernetes.io/docs/concepts/containers/images Image string `json:"image,omitempty" protobuf:"bytes,2,opt,name=image"` // Entrypoint array. Not executed within a shell. - // The image's ENTRYPOINT is used if this is not provided. + // The docker image's ENTRYPOINT is used if this is not provided. // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable // cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced // to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will @@ -3635,7 +3612,7 @@ type EphemeralContainerCommon struct { // +optional Command []string `json:"command,omitempty" protobuf:"bytes,3,rep,name=command"` // Arguments to the entrypoint. - // The image's CMD is used if this is not provided. + // The docker image's CMD is used if this is not provided. // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable // cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced // to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will @@ -3857,7 +3834,8 @@ type PodStatus struct { // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status InitContainerStatuses []ContainerStatus `json:"initContainerStatuses,omitempty" protobuf:"bytes,10,rep,name=initContainerStatuses"` - // The list has one entry per container in the manifest. + // The list has one entry per container in the manifest. Each entry is currently the output + // of `docker inspect`. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status // +optional ContainerStatuses []ContainerStatus `json:"containerStatuses,omitempty" protobuf:"bytes,8,rep,name=containerStatuses"` @@ -4380,14 +4358,11 @@ type ServiceSpec struct { // +optional SessionAffinity ServiceAffinity `json:"sessionAffinity,omitempty" protobuf:"bytes,7,opt,name=sessionAffinity,casttype=ServiceAffinity"` - // Only applies to Service Type: LoadBalancer. + // Only applies to Service Type: LoadBalancer + // LoadBalancer will get created with the IP specified in this field. // This feature depends on whether the underlying cloud-provider supports specifying // the loadBalancerIP when a load balancer is created. // This field will be ignored if the cloud-provider does not support the feature. - // Deprecated: This field was under-specified and its meaning varies across implementations, - // and it cannot support dual-stack. - // As of Kubernetes v1.24, users are encouraged to use implementation-specific annotations when available. - // This field may be removed in a future API version. // +optional LoadBalancerIP string `json:"loadBalancerIP,omitempty" protobuf:"bytes,8,opt,name=loadBalancerIP"` @@ -4485,6 +4460,8 @@ type ServiceSpec struct { // value), those requests will be respected, regardless of this field. // This field may only be set for services with type LoadBalancer and will // be cleared if the type is changed to any other type. + // This field is beta-level and is only honored by servers that enable the ServiceLBNodePortControl feature. + // +featureGate=ServiceLBNodePortControl // +optional AllocateLoadBalancerNodePorts *bool `json:"allocateLoadBalancerNodePorts,omitempty" protobuf:"bytes,20,opt,name=allocateLoadBalancerNodePorts"` @@ -4532,7 +4509,7 @@ type ServicePort struct { // The application protocol for this port. // This field follows standard Kubernetes label syntax. // Un-prefixed names are reserved for IANA standard service names (as per - // RFC-6335 and https://www.iana.org/assignments/service-names). + // RFC-6335 and http://www.iana.org/assignments/service-names). // Non-standard protocols should use prefixed names such as // mycompany.com/my-custom-protocol. // +optional @@ -4627,10 +4604,7 @@ type ServiceAccount struct { // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. - // Pods are only limited to this list if this service account has a "kubernetes.io/enforce-mountable-secrets" annotation set to "true". - // This field should not be used to find auto-generated service account token secrets for use outside of pods. - // Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. + // Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount. // More info: https://kubernetes.io/docs/concepts/configuration/secret // +optional // +patchMergeKey=name @@ -4766,7 +4740,7 @@ type EndpointPort struct { // The application protocol for this port. // This field follows standard Kubernetes label syntax. // Un-prefixed names are reserved for IANA standard service names (as per - // RFC-6335 and https://www.iana.org/assignments/service-names). + // RFC-6335 and http://www.iana.org/assignments/service-names). // Non-standard protocols should use prefixed names such as // mycompany.com/my-custom-protocol. // +optional @@ -4811,7 +4785,9 @@ type NodeSpec struct { // +optional Taints []Taint `json:"taints,omitempty" protobuf:"bytes,5,opt,name=taints"` - // Deprecated: Previously used to specify the source of the node's configuration for the DynamicKubeletConfig feature. This feature is removed from Kubelets as of 1.24 and will be fully removed in 1.26. + // Deprecated. If specified, the source of the node's configuration. + // The DynamicKubeletConfig feature gate must be enabled for the Kubelet to use this field. + // This field is deprecated as of 1.22: https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration // +optional ConfigSource *NodeConfigSource `json:"configSource,omitempty" protobuf:"bytes,6,opt,name=configSource"` @@ -4900,7 +4876,7 @@ type NodeSystemInfo struct { KernelVersion string `json:"kernelVersion" protobuf:"bytes,4,opt,name=kernelVersion"` // OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)). OSImage string `json:"osImage" protobuf:"bytes,5,opt,name=osImage"` - // ContainerRuntime Version reported by the node through runtime remote API (e.g. containerd://1.4.2). + // ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0). ContainerRuntimeVersion string `json:"containerRuntimeVersion" protobuf:"bytes,6,opt,name=containerRuntimeVersion"` // Kubelet Version reported by the node. KubeletVersion string `json:"kubeletVersion" protobuf:"bytes,7,opt,name=kubeletVersion"` @@ -5079,10 +5055,11 @@ const ( NodeTerminated NodePhase = "Terminated" ) +// +enum type NodeConditionType string -// These are valid but not exhaustive conditions of node. A cloud provider may set a condition not listed here. -// The built-in set of conditions are: +// These are valid conditions of node. Currently, we don't have enough information to decide +// node condition. In the future, we will add more. The proposed set of conditions are: // NodeReachable, NodeLive, NodeReady, NodeSchedulable, NodeRunnable. const ( // NodeReady means kubelet is healthy and ready to accept pods. @@ -5117,9 +5094,10 @@ type NodeCondition struct { Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"` } +// +enum type NodeAddressType string -// These are built-in addresses type of node. A cloud provider may set a type not listed here. +// These are valid address type of node. const ( // NodeHostName identifies a name of the node. Although every node can be assumed // to have a NodeAddress of this type, its exact syntax and semantics are not @@ -5289,9 +5267,10 @@ const ( NamespaceTerminatingCause metav1.CauseType = "NamespaceTerminating" ) +// +enum type NamespaceConditionType string -// These are built-in conditions of a namespace. +// These are valid conditions of a namespace. const ( // NamespaceDeletionDiscoveryFailure contains information about namespace deleter errors during resource discovery. NamespaceDeletionDiscoveryFailure NamespaceConditionType = "NamespaceDeletionDiscoveryFailure" @@ -5779,8 +5758,8 @@ type EventList struct { // List holds a list of objects, which may not be known by the server. type List metav1.List -// LimitType is a type of object that is limited. It can be Pod, Container, PersistentVolumeClaim or -// a fully qualified resource name. +// LimitType is a type of object that is limited +// +enum type LimitType string const ( @@ -5912,6 +5891,7 @@ const ( // Match all pod objects that have priority class mentioned ResourceQuotaScopePriorityClass ResourceQuotaScope = "PriorityClass" // Match all pod objects that have cross-namespace pod (anti)affinity mentioned. + // This is a beta feature enabled by the PodAffinityNamespaceSelector feature flag. ResourceQuotaScopeCrossNamespacePodAffinity ResourceQuotaScope = "CrossNamespacePodAffinity" ) diff --git a/cluster-autoscaler/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go b/cluster-autoscaler/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go index 53a06b94528a..0a60e7008ab9 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go +++ b/cluster-autoscaler/vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go @@ -29,10 +29,10 @@ package v1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_AWSElasticBlockStoreVolumeSource = map[string]string{ "": "Represents a Persistent Disk resource in AWS.\n\nAn AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling.", - "volumeID": "volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - "fsType": "fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - "partition": "partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty).", - "readOnly": "readOnly value true will force the readOnly setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + "volumeID": "Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + "fsType": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + "partition": "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty).", + "readOnly": "Specify \"true\" to force and set the ReadOnly property in VolumeMounts to \"true\". If omitted, the default is \"false\". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", } func (AWSElasticBlockStoreVolumeSource) SwaggerDoc() map[string]string { @@ -71,12 +71,12 @@ func (AvoidPods) SwaggerDoc() map[string]string { var map_AzureDiskVolumeSource = map[string]string{ "": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", - "diskName": "diskName is the Name of the data disk in the blob storage", - "diskURI": "diskURI is the URI of data disk in the blob storage", - "cachingMode": "cachingMode is the Host Caching mode: None, Read Only, Read Write.", - "fsType": "fsType is Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", - "readOnly": "readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - "kind": "kind expected values are Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared", + "diskName": "The Name of the data disk in the blob storage", + "diskURI": "The URI the data disk in the blob storage", + "cachingMode": "Host Caching mode: None, Read Only, Read Write.", + "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "kind": "Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared", } func (AzureDiskVolumeSource) SwaggerDoc() map[string]string { @@ -85,10 +85,10 @@ func (AzureDiskVolumeSource) SwaggerDoc() map[string]string { var map_AzureFilePersistentVolumeSource = map[string]string{ "": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", - "secretName": "secretName is the name of secret that contains Azure Storage Account Name and Key", - "shareName": "shareName is the azure Share Name", - "readOnly": "readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - "secretNamespace": "secretNamespace is the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod", + "secretName": "the name of secret that contains Azure Storage Account Name and Key", + "shareName": "Share Name", + "readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "secretNamespace": "the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod", } func (AzureFilePersistentVolumeSource) SwaggerDoc() map[string]string { @@ -97,9 +97,9 @@ func (AzureFilePersistentVolumeSource) SwaggerDoc() map[string]string { var map_AzureFileVolumeSource = map[string]string{ "": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", - "secretName": "secretName is the name of secret that contains Azure Storage Account Name and Key", - "shareName": "shareName is the azure share Name", - "readOnly": "readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "secretName": "the name of secret that contains Azure Storage Account Name and Key", + "shareName": "Share Name", + "readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", } func (AzureFileVolumeSource) SwaggerDoc() map[string]string { @@ -118,15 +118,15 @@ func (Binding) SwaggerDoc() map[string]string { var map_CSIPersistentVolumeSource = map[string]string{ "": "Represents storage that is managed by an external CSI volume driver (Beta feature)", - "driver": "driver is the name of the driver to use for this volume. Required.", - "volumeHandle": "volumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls. Required.", - "readOnly": "readOnly value to pass to ControllerPublishVolumeRequest. Defaults to false (read/write).", - "fsType": "fsType to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\".", - "volumeAttributes": "volumeAttributes of the volume to publish.", - "controllerPublishSecretRef": "controllerPublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerPublishVolume and ControllerUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", - "nodeStageSecretRef": "nodeStageSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeStageVolume and NodeStageVolume and NodeUnstageVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", - "nodePublishSecretRef": "nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", - "controllerExpandSecretRef": "controllerExpandSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerExpandVolume call. This is an alpha field and requires enabling ExpandCSIVolumes feature gate. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", + "driver": "Driver is the name of the driver to use for this volume. Required.", + "volumeHandle": "VolumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls. Required.", + "readOnly": "Optional: The value to pass to ControllerPublishVolumeRequest. Defaults to false (read/write).", + "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\".", + "volumeAttributes": "Attributes of the volume to publish.", + "controllerPublishSecretRef": "ControllerPublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerPublishVolume and ControllerUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", + "nodeStageSecretRef": "NodeStageSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeStageVolume and NodeStageVolume and NodeUnstageVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", + "nodePublishSecretRef": "NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", + "controllerExpandSecretRef": "ControllerExpandSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerExpandVolume call. This is an alpha field and requires enabling ExpandCSIVolumes feature gate. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", } func (CSIPersistentVolumeSource) SwaggerDoc() map[string]string { @@ -135,11 +135,11 @@ func (CSIPersistentVolumeSource) SwaggerDoc() map[string]string { var map_CSIVolumeSource = map[string]string{ "": "Represents a source location of a volume to mount, managed by an external CSI driver", - "driver": "driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster.", - "readOnly": "readOnly specifies a read-only configuration for the volume. Defaults to false (read/write).", - "fsType": "fsType to mount. Ex. \"ext4\", \"xfs\", \"ntfs\". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply.", - "volumeAttributes": "volumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values.", - "nodePublishSecretRef": "nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed.", + "driver": "Driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster.", + "readOnly": "Specifies a read-only configuration for the volume. Defaults to false (read/write).", + "fsType": "Filesystem type to mount. Ex. \"ext4\", \"xfs\", \"ntfs\". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply.", + "volumeAttributes": "VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values.", + "nodePublishSecretRef": "NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed.", } func (CSIVolumeSource) SwaggerDoc() map[string]string { @@ -158,12 +158,12 @@ func (Capabilities) SwaggerDoc() map[string]string { var map_CephFSPersistentVolumeSource = map[string]string{ "": "Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.", - "monitors": "monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", - "path": "path is Optional: Used as the mounted root, rather than the full Ceph tree, default is /", - "user": "user is Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", - "secretFile": "secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", - "secretRef": "secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", - "readOnly": "readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + "monitors": "Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + "path": "Optional: Used as the mounted root, rather than the full Ceph tree, default is /", + "user": "Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + "secretFile": "Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + "secretRef": "Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + "readOnly": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", } func (CephFSPersistentVolumeSource) SwaggerDoc() map[string]string { @@ -172,12 +172,12 @@ func (CephFSPersistentVolumeSource) SwaggerDoc() map[string]string { var map_CephFSVolumeSource = map[string]string{ "": "Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.", - "monitors": "monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", - "path": "path is Optional: Used as the mounted root, rather than the full Ceph tree, default is /", - "user": "user is optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", - "secretFile": "secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", - "secretRef": "secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", - "readOnly": "readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + "monitors": "Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + "path": "Optional: Used as the mounted root, rather than the full Ceph tree, default is /", + "user": "Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + "secretFile": "Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + "secretRef": "Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + "readOnly": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", } func (CephFSVolumeSource) SwaggerDoc() map[string]string { @@ -186,10 +186,10 @@ func (CephFSVolumeSource) SwaggerDoc() map[string]string { var map_CinderPersistentVolumeSource = map[string]string{ "": "Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.", - "volumeID": "volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", - "fsType": "fsType Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", - "readOnly": "readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", - "secretRef": "secretRef is Optional: points to a secret object containing parameters used to connect to OpenStack.", + "volumeID": "volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + "readOnly": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + "secretRef": "Optional: points to a secret object containing parameters used to connect to OpenStack.", } func (CinderPersistentVolumeSource) SwaggerDoc() map[string]string { @@ -198,10 +198,10 @@ func (CinderPersistentVolumeSource) SwaggerDoc() map[string]string { var map_CinderVolumeSource = map[string]string{ "": "Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.", - "volumeID": "volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", - "fsType": "fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", - "readOnly": "readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", - "secretRef": "secretRef is optional: points to a secret object containing parameters used to connect to OpenStack.", + "volumeID": "volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + "readOnly": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + "secretRef": "Optional: points to a secret object containing parameters used to connect to OpenStack.", } func (CinderVolumeSource) SwaggerDoc() map[string]string { @@ -305,8 +305,8 @@ func (ConfigMapNodeConfigSource) SwaggerDoc() map[string]string { var map_ConfigMapProjection = map[string]string{ "": "Adapts a ConfigMap into a projected volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.", - "items": "items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", - "optional": "optional specify whether the ConfigMap or its keys must be defined", + "items": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", + "optional": "Specify whether the ConfigMap or its keys must be defined", } func (ConfigMapProjection) SwaggerDoc() map[string]string { @@ -315,9 +315,9 @@ func (ConfigMapProjection) SwaggerDoc() map[string]string { var map_ConfigMapVolumeSource = map[string]string{ "": "Adapts a ConfigMap into a volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.", - "items": "items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", - "defaultMode": "defaultMode is optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", - "optional": "optional specify whether the ConfigMap or its keys must be defined", + "items": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", + "defaultMode": "Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "optional": "Specify whether the ConfigMap or its keys must be defined", } func (ConfigMapVolumeSource) SwaggerDoc() map[string]string { @@ -327,9 +327,9 @@ func (ConfigMapVolumeSource) SwaggerDoc() map[string]string { var map_Container = map[string]string{ "": "A single application container that you want to run within a pod.", "name": "Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.", - "image": "Container image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets.", - "command": "Entrypoint array. Not executed within a shell. The container image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", - "args": "Arguments to the entrypoint. The container image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + "image": "Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets.", + "command": "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + "args": "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", "workingDir": "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.", "ports": "List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated.", "envFrom": "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", @@ -405,7 +405,7 @@ var map_ContainerStateTerminated = map[string]string{ "message": "Message regarding the last termination of the container", "startedAt": "Time at which previous execution of the container started", "finishedAt": "Time at which the container last terminated", - "containerID": "Container's ID in the format '://'", + "containerID": "Container's ID in the format 'docker://'", } func (ContainerStateTerminated) SwaggerDoc() map[string]string { @@ -431,7 +431,7 @@ var map_ContainerStatus = map[string]string{ "restartCount": "The number of times the container has been restarted.", "image": "The image the container is running. More info: https://kubernetes.io/docs/concepts/containers/images.", "imageID": "ImageID of the container's image.", - "containerID": "Container's ID in the format '://'.", + "containerID": "Container's ID in the format 'docker://'.", "started": "Specifies whether the container has passed its startup probe. Initialized as false, becomes true after startupProbe is considered successful. Resets to false when the container is restarted, or if kubelet loses state temporarily. Is always true when no startupProbe is defined.", } @@ -481,8 +481,8 @@ func (DownwardAPIVolumeSource) SwaggerDoc() map[string]string { var map_EmptyDirVolumeSource = map[string]string{ "": "Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.", - "medium": "medium represents what type of storage medium should back this directory. The default is \"\" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", - "sizeLimit": "sizeLimit is the total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir", + "medium": "What type of storage medium should back this directory. The default is \"\" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", + "sizeLimit": "Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir", } func (EmptyDirVolumeSource) SwaggerDoc() map[string]string { @@ -506,7 +506,7 @@ var map_EndpointPort = map[string]string{ "name": "The name of this port. This must match the 'name' field in the corresponding ServicePort. Must be a DNS_LABEL. Optional only if one port is defined.", "port": "The port number of the endpoint.", "protocol": "The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.", - "appProtocol": "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.", + "appProtocol": "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.", } func (EndpointPort) SwaggerDoc() map[string]string { @@ -590,9 +590,9 @@ func (EphemeralContainer) SwaggerDoc() map[string]string { var map_EphemeralContainerCommon = map[string]string{ "": "EphemeralContainerCommon is a copy of all fields in Container to be inlined in EphemeralContainer. This separate type allows easy conversion from EphemeralContainer to Container and allows separate documentation for the fields of EphemeralContainer. When a new field is added to Container it must be added here as well.", "name": "Name of the ephemeral container specified as a DNS_LABEL. This name must be unique among all containers, init containers and ephemeral containers.", - "image": "Container image name. More info: https://kubernetes.io/docs/concepts/containers/images", - "command": "Entrypoint array. Not executed within a shell. The image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", - "args": "Arguments to the entrypoint. The image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + "image": "Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images", + "command": "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + "args": "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", "workingDir": "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.", "ports": "Ports are not allowed for ephemeral containers.", "envFrom": "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", @@ -690,11 +690,11 @@ func (ExecAction) SwaggerDoc() map[string]string { var map_FCVolumeSource = map[string]string{ "": "Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling.", - "targetWWNs": "targetWWNs is Optional: FC target worldwide names (WWNs)", - "lun": "lun is Optional: FC target lun number", - "fsType": "fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", - "readOnly": "readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - "wwids": "wwids Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.", + "targetWWNs": "Optional: FC target worldwide names (WWNs)", + "lun": "Optional: FC target lun number", + "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "readOnly": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "wwids": "Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.", } func (FCVolumeSource) SwaggerDoc() map[string]string { @@ -703,11 +703,11 @@ func (FCVolumeSource) SwaggerDoc() map[string]string { var map_FlexPersistentVolumeSource = map[string]string{ "": "FlexPersistentVolumeSource represents a generic persistent volume resource that is provisioned/attached using an exec based plugin.", - "driver": "driver is the name of the driver to use for this volume.", - "fsType": "fsType is the Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.", - "secretRef": "secretRef is Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.", - "readOnly": "readOnly is Optional: defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - "options": "options is Optional: this field holds extra command options if any.", + "driver": "Driver is the name of the driver to use for this volume.", + "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.", + "secretRef": "Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.", + "readOnly": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "options": "Optional: Extra command options if any.", } func (FlexPersistentVolumeSource) SwaggerDoc() map[string]string { @@ -716,11 +716,11 @@ func (FlexPersistentVolumeSource) SwaggerDoc() map[string]string { var map_FlexVolumeSource = map[string]string{ "": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", - "driver": "driver is the name of the driver to use for this volume.", - "fsType": "fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.", - "secretRef": "secretRef is Optional: secretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.", - "readOnly": "readOnly is Optional: defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - "options": "options is Optional: this field holds extra command options if any.", + "driver": "Driver is the name of the driver to use for this volume.", + "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.", + "secretRef": "Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.", + "readOnly": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "options": "Optional: Extra command options if any.", } func (FlexVolumeSource) SwaggerDoc() map[string]string { @@ -729,8 +729,8 @@ func (FlexVolumeSource) SwaggerDoc() map[string]string { var map_FlockerVolumeSource = map[string]string{ "": "Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.", - "datasetName": "datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated", - "datasetUUID": "datasetUUID is the UUID of the dataset. This is unique identifier of a Flocker dataset", + "datasetName": "Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated", + "datasetUUID": "UUID of the dataset. This is unique identifier of a Flocker dataset", } func (FlockerVolumeSource) SwaggerDoc() map[string]string { @@ -739,10 +739,10 @@ func (FlockerVolumeSource) SwaggerDoc() map[string]string { var map_GCEPersistentDiskVolumeSource = map[string]string{ "": "Represents a Persistent Disk resource in Google Compute Engine.\n\nA GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling.", - "pdName": "pdName is unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - "fsType": "fsType is filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - "partition": "partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - "readOnly": "readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + "pdName": "Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + "fsType": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + "partition": "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + "readOnly": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", } func (GCEPersistentDiskVolumeSource) SwaggerDoc() map[string]string { @@ -760,9 +760,9 @@ func (GRPCAction) SwaggerDoc() map[string]string { var map_GitRepoVolumeSource = map[string]string{ "": "Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling.\n\nDEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", - "repository": "repository is the URL", - "revision": "revision is the commit hash for the specified revision.", - "directory": "directory is the target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.", + "repository": "Repository URL", + "revision": "Commit hash for the specified revision.", + "directory": "Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.", } func (GitRepoVolumeSource) SwaggerDoc() map[string]string { @@ -771,10 +771,10 @@ func (GitRepoVolumeSource) SwaggerDoc() map[string]string { var map_GlusterfsPersistentVolumeSource = map[string]string{ "": "Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.", - "endpoints": "endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", - "path": "path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", - "readOnly": "readOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", - "endpointsNamespace": "endpointsNamespace is the namespace that contains Glusterfs endpoint. If this field is empty, the EndpointNamespace defaults to the same namespace as the bound PVC. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + "endpoints": "EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + "path": "Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + "readOnly": "ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + "endpointsNamespace": "EndpointsNamespace is the namespace that contains Glusterfs endpoint. If this field is empty, the EndpointNamespace defaults to the same namespace as the bound PVC. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", } func (GlusterfsPersistentVolumeSource) SwaggerDoc() map[string]string { @@ -783,9 +783,9 @@ func (GlusterfsPersistentVolumeSource) SwaggerDoc() map[string]string { var map_GlusterfsVolumeSource = map[string]string{ "": "Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.", - "endpoints": "endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", - "path": "path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", - "readOnly": "readOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + "endpoints": "EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + "path": "Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + "readOnly": "ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", } func (GlusterfsVolumeSource) SwaggerDoc() map[string]string { @@ -827,8 +827,8 @@ func (HostAlias) SwaggerDoc() map[string]string { var map_HostPathVolumeSource = map[string]string{ "": "Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.", - "path": "path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - "type": "type for HostPath Volume Defaults to \"\" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + "path": "Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + "type": "Type for HostPath Volume Defaults to \"\" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", } func (HostPathVolumeSource) SwaggerDoc() map[string]string { @@ -837,17 +837,17 @@ func (HostPathVolumeSource) SwaggerDoc() map[string]string { var map_ISCSIPersistentVolumeSource = map[string]string{ "": "ISCSIPersistentVolumeSource represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.", - "targetPortal": "targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", - "iqn": "iqn is Target iSCSI Qualified Name.", - "lun": "lun is iSCSI Target Lun number.", - "iscsiInterface": "iscsiInterface is the interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).", - "fsType": "fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi", - "readOnly": "readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.", - "portals": "portals is the iSCSI Target Portal List. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", - "chapAuthDiscovery": "chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication", - "chapAuthSession": "chapAuthSession defines whether support iSCSI Session CHAP authentication", - "secretRef": "secretRef is the CHAP Secret for iSCSI target and initiator authentication", - "initiatorName": "initiatorName is the custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection.", + "targetPortal": "iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", + "iqn": "Target iSCSI Qualified Name.", + "lun": "iSCSI Target Lun number.", + "iscsiInterface": "iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).", + "fsType": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi", + "readOnly": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.", + "portals": "iSCSI Target Portal List. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", + "chapAuthDiscovery": "whether support iSCSI Discovery CHAP authentication", + "chapAuthSession": "whether support iSCSI Session CHAP authentication", + "secretRef": "CHAP Secret for iSCSI target and initiator authentication", + "initiatorName": "Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection.", } func (ISCSIPersistentVolumeSource) SwaggerDoc() map[string]string { @@ -856,17 +856,17 @@ func (ISCSIPersistentVolumeSource) SwaggerDoc() map[string]string { var map_ISCSIVolumeSource = map[string]string{ "": "Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.", - "targetPortal": "targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", - "iqn": "iqn is the target iSCSI Qualified Name.", - "lun": "lun represents iSCSI Target Lun number.", - "iscsiInterface": "iscsiInterface is the interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).", - "fsType": "fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi", - "readOnly": "readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.", - "portals": "portals is the iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", - "chapAuthDiscovery": "chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication", - "chapAuthSession": "chapAuthSession defines whether support iSCSI Session CHAP authentication", - "secretRef": "secretRef is the CHAP Secret for iSCSI target and initiator authentication", - "initiatorName": "initiatorName is the custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection.", + "targetPortal": "iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", + "iqn": "Target iSCSI Qualified Name.", + "lun": "iSCSI Target Lun number.", + "iscsiInterface": "iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).", + "fsType": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi", + "readOnly": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.", + "portals": "iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", + "chapAuthDiscovery": "whether support iSCSI Discovery CHAP authentication", + "chapAuthSession": "whether support iSCSI Session CHAP authentication", + "secretRef": "CHAP Secret for iSCSI target and initiator authentication", + "initiatorName": "Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection.", } func (ISCSIVolumeSource) SwaggerDoc() map[string]string { @@ -875,9 +875,9 @@ func (ISCSIVolumeSource) SwaggerDoc() map[string]string { var map_KeyToPath = map[string]string{ "": "Maps a string key to a path within a volume.", - "key": "key is the key to project.", - "path": "path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.", - "mode": "mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "key": "The key to project.", + "path": "The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.", + "mode": "Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", } func (KeyToPath) SwaggerDoc() map[string]string { @@ -979,8 +979,8 @@ func (LocalObjectReference) SwaggerDoc() map[string]string { var map_LocalVolumeSource = map[string]string{ "": "Local represents directly-attached storage with node affinity (Beta feature)", - "path": "path of the full path to the volume on the node. It can be either a directory or block device (disk, partition, ...).", - "fsType": "fsType is the filesystem type to mount. It applies only when the Path is a block device. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default value is to auto-select a filesystem if unspecified.", + "path": "The full path to the volume on the node. It can be either a directory or block device (disk, partition, ...).", + "fsType": "Filesystem type to mount. It applies only when the Path is a block device. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default value is to auto-select a filesystem if unspecified.", } func (LocalVolumeSource) SwaggerDoc() map[string]string { @@ -989,9 +989,9 @@ func (LocalVolumeSource) SwaggerDoc() map[string]string { var map_NFSVolumeSource = map[string]string{ "": "Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling.", - "server": "server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - "path": "path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - "readOnly": "readOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + "server": "Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + "path": "Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + "readOnly": "ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", } func (NFSVolumeSource) SwaggerDoc() map[string]string { @@ -1188,7 +1188,7 @@ var map_NodeSpec = map[string]string{ "providerID": "ID of the node assigned by the cloud provider in the format: ://", "unschedulable": "Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration", "taints": "If specified, the node's taints.", - "configSource": "Deprecated: Previously used to specify the source of the node's configuration for the DynamicKubeletConfig feature. This feature is removed from Kubelets as of 1.24 and will be fully removed in 1.26.", + "configSource": "Deprecated. If specified, the source of the node's configuration. The DynamicKubeletConfig feature gate must be enabled for the Kubelet to use this field. This field is deprecated as of 1.22: https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration", "externalID": "Deprecated. Not all kubelets will set this field. Remove field after 1.13. see: https://issues.k8s.io/61966", } @@ -1222,7 +1222,7 @@ var map_NodeSystemInfo = map[string]string{ "bootID": "Boot ID reported by the node.", "kernelVersion": "Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).", "osImage": "OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).", - "containerRuntimeVersion": "ContainerRuntime Version reported by the node through runtime remote API (e.g. containerd://1.4.2).", + "containerRuntimeVersion": "ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0).", "kubeletVersion": "Kubelet Version reported by the node.", "kubeProxyVersion": "KubeProxy Version reported by the node.", "operatingSystem": "The Operating System reported by the node", @@ -1261,8 +1261,8 @@ func (ObjectReference) SwaggerDoc() map[string]string { var map_PersistentVolume = map[string]string{ "": "PersistentVolume (PV) is a storage resource provisioned by an administrator. It is analogous to a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec defines a specification of a persistent volume owned by the cluster. Provisioned by an administrator. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes", - "status": "status represents the current information/status for the persistent volume. Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes", + "spec": "Spec defines a specification of a persistent volume owned by the cluster. Provisioned by an administrator. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes", + "status": "Status represents the current information/status for the persistent volume. Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes", } func (PersistentVolume) SwaggerDoc() map[string]string { @@ -1272,8 +1272,8 @@ func (PersistentVolume) SwaggerDoc() map[string]string { var map_PersistentVolumeClaim = map[string]string{ "": "PersistentVolumeClaim is a user's request for and claim to a persistent volume", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - "status": "status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + "spec": "Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + "status": "Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", } func (PersistentVolumeClaim) SwaggerDoc() map[string]string { @@ -1282,10 +1282,10 @@ func (PersistentVolumeClaim) SwaggerDoc() map[string]string { var map_PersistentVolumeClaimCondition = map[string]string{ "": "PersistentVolumeClaimCondition contails details about state of pvc", - "lastProbeTime": "lastProbeTime is the time we probed the condition.", - "lastTransitionTime": "lastTransitionTime is the time the condition transitioned from one status to another.", - "reason": "reason is a unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports \"ResizeStarted\" that means the underlying persistent volume is being resized.", - "message": "message is the human-readable message indicating details about last transition.", + "lastProbeTime": "Last time we probed the condition.", + "lastTransitionTime": "Last time the condition transitioned from one status to another.", + "reason": "Unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports \"ResizeStarted\" that means the underlying persistent volume is being resized.", + "message": "Human-readable message indicating details about last transition.", } func (PersistentVolumeClaimCondition) SwaggerDoc() map[string]string { @@ -1295,7 +1295,7 @@ func (PersistentVolumeClaimCondition) SwaggerDoc() map[string]string { var map_PersistentVolumeClaimList = map[string]string{ "": "PersistentVolumeClaimList is a list of PersistentVolumeClaim items.", "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "items": "items is a list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + "items": "A list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", } func (PersistentVolumeClaimList) SwaggerDoc() map[string]string { @@ -1304,14 +1304,14 @@ func (PersistentVolumeClaimList) SwaggerDoc() map[string]string { var map_PersistentVolumeClaimSpec = map[string]string{ "": "PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes", - "accessModes": "accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", - "selector": "selector is a label query over volumes to consider for binding.", - "resources": "resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", - "volumeName": "volumeName is the binding reference to the PersistentVolume backing this claim.", - "storageClassName": "storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1", + "accessModes": "AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", + "selector": "A label query over volumes to consider for binding.", + "resources": "Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", + "volumeName": "VolumeName is the binding reference to the PersistentVolume backing this claim.", + "storageClassName": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1", "volumeMode": "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.", - "dataSource": "dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.", - "dataSourceRef": "dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef\n allows any non-core object, as well as PersistentVolumeClaim objects.\n* While DataSource ignores disallowed values (dropping them), DataSourceRef\n preserves all values, and generates an error if a disallowed value is\n specified.\n(Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled.", + "dataSource": "This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.", + "dataSourceRef": "Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef\n allows any non-core object, as well as PersistentVolumeClaim objects.\n* While DataSource ignores disallowed values (dropping them), DataSourceRef\n preserves all values, and generates an error if a disallowed value is\n specified.\n(Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.", } func (PersistentVolumeClaimSpec) SwaggerDoc() map[string]string { @@ -1320,12 +1320,12 @@ func (PersistentVolumeClaimSpec) SwaggerDoc() map[string]string { var map_PersistentVolumeClaimStatus = map[string]string{ "": "PersistentVolumeClaimStatus is the current status of a persistent volume claim.", - "phase": "phase represents the current phase of PersistentVolumeClaim.", - "accessModes": "accessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", - "capacity": "capacity represents the actual resources of the underlying volume.", - "conditions": "conditions is the current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'.", - "allocatedResources": "allocatedResources is the storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", - "resizeStatus": "resizeStatus stores status of resize operation. ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty string by resize controller or kubelet. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", + "phase": "Phase represents the current phase of PersistentVolumeClaim.", + "accessModes": "AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", + "capacity": "Represents the actual resources of the underlying volume.", + "conditions": "Current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'.", + "allocatedResources": "The storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", + "resizeStatus": "ResizeStatus stores status of resize operation. ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty string by resize controller or kubelet. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", } func (PersistentVolumeClaimStatus) SwaggerDoc() map[string]string { @@ -1344,8 +1344,8 @@ func (PersistentVolumeClaimTemplate) SwaggerDoc() map[string]string { var map_PersistentVolumeClaimVolumeSource = map[string]string{ "": "PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system).", - "claimName": "claimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - "readOnly": "readOnly Will force the ReadOnly setting in VolumeMounts. Default false.", + "claimName": "ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + "readOnly": "Will force the ReadOnly setting in VolumeMounts. Default false.", } func (PersistentVolumeClaimVolumeSource) SwaggerDoc() map[string]string { @@ -1355,7 +1355,7 @@ func (PersistentVolumeClaimVolumeSource) SwaggerDoc() map[string]string { var map_PersistentVolumeList = map[string]string{ "": "PersistentVolumeList is a list of PersistentVolume items.", "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "items": "items is a list of persistent volumes. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes", + "items": "List of persistent volumes. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes", } func (PersistentVolumeList) SwaggerDoc() map[string]string { @@ -1364,28 +1364,28 @@ func (PersistentVolumeList) SwaggerDoc() map[string]string { var map_PersistentVolumeSource = map[string]string{ "": "PersistentVolumeSource is similar to VolumeSource but meant for the administrator who creates PVs. Exactly one of its members must be set.", - "gcePersistentDisk": "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - "awsElasticBlockStore": "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - "hostPath": "hostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - "glusterfs": "glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md", - "nfs": "nfs represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - "rbd": "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md", - "iscsi": "iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin.", - "cinder": "cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", - "cephfs": "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime", - "fc": "fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - "flocker": "flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running", - "flexVolume": "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", - "azureFile": "azureFile represents an Azure File Service mount on the host and bind mount to the pod.", - "vsphereVolume": "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", - "quobyte": "quobyte represents a Quobyte mount on the host that shares a pod's lifetime", - "azureDisk": "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", - "photonPersistentDisk": "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", - "portworxVolume": "portworxVolume represents a portworx volume attached and mounted on kubelets host machine", - "scaleIO": "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", - "local": "local represents directly-attached storage with node affinity", - "storageos": "storageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://examples.k8s.io/volumes/storageos/README.md", - "csi": "csi represents storage that is handled by an external CSI driver (Beta feature).", + "gcePersistentDisk": "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + "awsElasticBlockStore": "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + "hostPath": "HostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + "glusterfs": "Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md", + "nfs": "NFS represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + "rbd": "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md", + "iscsi": "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin.", + "cinder": "Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + "cephfs": "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", + "fc": "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", + "flocker": "Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running", + "flexVolume": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", + "azureFile": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", + "vsphereVolume": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", + "quobyte": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", + "azureDisk": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + "photonPersistentDisk": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", + "portworxVolume": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", + "scaleIO": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", + "local": "Local represents directly-attached storage with node affinity", + "storageos": "StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://examples.k8s.io/volumes/storageos/README.md", + "csi": "CSI represents storage that is handled by an external CSI driver (Beta feature).", } func (PersistentVolumeSource) SwaggerDoc() map[string]string { @@ -1394,14 +1394,14 @@ func (PersistentVolumeSource) SwaggerDoc() map[string]string { var map_PersistentVolumeSpec = map[string]string{ "": "PersistentVolumeSpec is the specification of a persistent volume.", - "capacity": "capacity is the description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity", - "accessModes": "accessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes", - "claimRef": "claimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding", - "persistentVolumeReclaimPolicy": "persistentVolumeReclaimPolicy defines what happens to a persistent volume when released from its claim. Valid options are Retain (default for manually created PersistentVolumes), Delete (default for dynamically provisioned PersistentVolumes), and Recycle (deprecated). Recycle must be supported by the volume plugin underlying this PersistentVolume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming", - "storageClassName": "storageClassName is the name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.", - "mountOptions": "mountOptions is the list of mount options, e.g. [\"ro\", \"soft\"]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options", + "capacity": "A description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity", + "accessModes": "AccessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes", + "claimRef": "ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding", + "persistentVolumeReclaimPolicy": "What happens to a persistent volume when released from its claim. Valid options are Retain (default for manually created PersistentVolumes), Delete (default for dynamically provisioned PersistentVolumes), and Recycle (deprecated). Recycle must be supported by the volume plugin underlying this PersistentVolume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming", + "storageClassName": "Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.", + "mountOptions": "A list of mount options, e.g. [\"ro\", \"soft\"]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options", "volumeMode": "volumeMode defines if a volume is intended to be used with a formatted filesystem or to remain in raw block state. Value of Filesystem is implied when not included in spec.", - "nodeAffinity": "nodeAffinity defines constraints that limit what nodes this volume can be accessed from. This field influences the scheduling of pods that use this volume.", + "nodeAffinity": "NodeAffinity defines constraints that limit what nodes this volume can be accessed from. This field influences the scheduling of pods that use this volume.", } func (PersistentVolumeSpec) SwaggerDoc() map[string]string { @@ -1410,9 +1410,9 @@ func (PersistentVolumeSpec) SwaggerDoc() map[string]string { var map_PersistentVolumeStatus = map[string]string{ "": "PersistentVolumeStatus is the current status of a persistent volume.", - "phase": "phase indicates if a volume is available, bound to a claim, or released by a claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase", - "message": "message is a human-readable message indicating details about why the volume is in this state.", - "reason": "reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI.", + "phase": "Phase indicates if a volume is available, bound to a claim, or released by a claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase", + "message": "A human-readable message indicating details about why the volume is in this state.", + "reason": "Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI.", } func (PersistentVolumeStatus) SwaggerDoc() map[string]string { @@ -1421,8 +1421,8 @@ func (PersistentVolumeStatus) SwaggerDoc() map[string]string { var map_PhotonPersistentDiskVolumeSource = map[string]string{ "": "Represents a Photon Controller persistent disk resource.", - "pdID": "pdID is the ID that identifies Photon Controller persistent disk", - "fsType": "fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "pdID": "ID that identifies Photon Controller persistent disk", + "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", } func (PhotonPersistentDiskVolumeSource) SwaggerDoc() map[string]string { @@ -1453,9 +1453,9 @@ func (PodAffinity) SwaggerDoc() map[string]string { var map_PodAffinityTerm = map[string]string{ "": "Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running", "labelSelector": "A label query over a set of resources, in this case pods.", - "namespaces": "namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means \"this pod's namespace\".", + "namespaces": "namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means \"this pod's namespace\"", "topologyKey": "This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.", - "namespaceSelector": "A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means \"this pod's namespace\". An empty selector ({}) matches all namespaces.", + "namespaceSelector": "A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means \"this pod's namespace\". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled.", } func (PodAffinityTerm) SwaggerDoc() map[string]string { @@ -1652,7 +1652,7 @@ var map_PodSpec = map[string]string{ "hostIPC": "Use the host's ipc namespace. Optional: Default to false.", "shareProcessNamespace": "Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Default to false.", "securityContext": "SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field.", - "imagePullSecrets": "ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod", + "imagePullSecrets": "ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod", "hostname": "Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value.", "subdomain": "If specified, the fully qualified Pod hostname will be \"...svc.\". If not specified, the pod will not have a domainname at all.", "affinity": "If specified, the pod's scheduling constraints", @@ -1663,13 +1663,13 @@ var map_PodSpec = map[string]string{ "priority": "The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority.", "dnsConfig": "Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy.", "readinessGates": "If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to \"True\" More info: https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates", - "runtimeClassName": "RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. If unset or empty, the \"legacy\" RuntimeClass will be used, which is an implicit class with an empty definition that uses the default runtime handler. More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class", + "runtimeClassName": "RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. If unset or empty, the \"legacy\" RuntimeClass will be used, which is an implicit class with an empty definition that uses the default runtime handler. More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class This is a beta feature as of Kubernetes v1.14.", "enableServiceLinks": "EnableServiceLinks indicates whether information about services should be injected into pod's environment variables, matching the syntax of Docker links. Optional: Defaults to true.", - "preemptionPolicy": "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset.", - "overhead": "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. This field will be autopopulated at admission time by the RuntimeClass admission controller. If the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. The RuntimeClass admission controller will reject Pod create requests which have the overhead already set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md", + "preemptionPolicy": "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is beta-level, gated by the NonPreemptingPriority feature-gate.", + "overhead": "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. This field will be autopopulated at admission time by the RuntimeClass admission controller. If the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. The RuntimeClass admission controller will reject Pod create requests which have the overhead already set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md This field is beta-level as of Kubernetes v1.18, and is only honored by servers that enable the PodOverhead feature.", "topologySpreadConstraints": "TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. All topologySpreadConstraints are ANDed.", "setHostnameAsFQDN": "If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. If a pod does not have FQDN, this has no effect. Default to false.", - "os": "Specifies the OS of the containers in the pod. Some pod and container fields are restricted if this is set.\n\nIf the OS field is set to linux, the following fields must be unset: -securityContext.windowsOptions\n\nIf the OS field is set to windows, following fields must be unset: - spec.hostPID - spec.hostIPC - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy - spec.securityContext.sysctls - spec.shareProcessNamespace - spec.securityContext.runAsUser - spec.securityContext.runAsGroup - spec.securityContext.supplementalGroups - spec.containers[*].securityContext.seLinuxOptions - spec.containers[*].securityContext.seccompProfile - spec.containers[*].securityContext.capabilities - spec.containers[*].securityContext.readOnlyRootFilesystem - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser - spec.containers[*].securityContext.runAsGroup This is a beta field and requires the IdentifyPodOS feature", + "os": "Specifies the OS of the containers in the pod. Some pod and container fields are restricted if this is set.\n\nIf the OS field is set to linux, the following fields must be unset: -securityContext.windowsOptions\n\nIf the OS field is set to windows, following fields must be unset: - spec.hostPID - spec.hostIPC - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy - spec.securityContext.sysctls - spec.shareProcessNamespace - spec.securityContext.runAsUser - spec.securityContext.runAsGroup - spec.securityContext.supplementalGroups - spec.containers[*].securityContext.seLinuxOptions - spec.containers[*].securityContext.seccompProfile - spec.containers[*].securityContext.capabilities - spec.containers[*].securityContext.readOnlyRootFilesystem - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser - spec.containers[*].securityContext.runAsGroup This is an alpha field and requires the IdentifyPodOS feature", } func (PodSpec) SwaggerDoc() map[string]string { @@ -1688,7 +1688,7 @@ var map_PodStatus = map[string]string{ "podIPs": "podIPs holds the IP addresses allocated to the pod. If this field is specified, the 0th entry must match the podIP field. Pods may be allocated at most 1 value for each of IPv4 and IPv6. This list is empty if no IPs have been allocated yet.", "startTime": "RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod.", "initContainerStatuses": "The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", - "containerStatuses": "The list has one entry per container in the manifest. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", + "containerStatuses": "The list has one entry per container in the manifest. Each entry is currently the output of `docker inspect`. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", "qosClass": "The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://git.k8s.io/community/contributors/design-proposals/node/resource-qos.md", "ephemeralContainerStatuses": "Status for any ephemeral containers that have run in this pod. This field is beta-level and available on clusters that haven't disabled the EphemeralContainers feature gate.", } @@ -1749,9 +1749,9 @@ func (PortStatus) SwaggerDoc() map[string]string { var map_PortworxVolumeSource = map[string]string{ "": "PortworxVolumeSource represents a Portworx volume resource.", - "volumeID": "volumeID uniquely identifies a Portworx volume", - "fsType": "fSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified.", - "readOnly": "readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "volumeID": "VolumeID uniquely identifies a Portworx volume", + "fsType": "FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", } func (PortworxVolumeSource) SwaggerDoc() map[string]string { @@ -1808,7 +1808,7 @@ var map_ProbeHandler = map[string]string{ "exec": "Exec specifies the action to take.", "httpGet": "HTTPGet specifies the http request to perform.", "tcpSocket": "TCPSocket specifies an action involving a TCP port.", - "grpc": "GRPC specifies an action involving a GRPC port. This is a beta field and requires enabling GRPCContainerProbe feature gate.", + "grpc": "GRPC specifies an action involving a GRPC port. This is an alpha field and requires enabling GRPCContainerProbe feature gate.", } func (ProbeHandler) SwaggerDoc() map[string]string { @@ -1817,8 +1817,8 @@ func (ProbeHandler) SwaggerDoc() map[string]string { var map_ProjectedVolumeSource = map[string]string{ "": "Represents a projected volume source", - "sources": "sources is the list of volume projections", - "defaultMode": "defaultMode are the mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "sources": "list of volume projections", + "defaultMode": "Mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", } func (ProjectedVolumeSource) SwaggerDoc() map[string]string { @@ -1827,12 +1827,12 @@ func (ProjectedVolumeSource) SwaggerDoc() map[string]string { var map_QuobyteVolumeSource = map[string]string{ "": "Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.", - "registry": "registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes", - "volume": "volume is a string that references an already created Quobyte volume by name.", - "readOnly": "readOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.", - "user": "user to map volume access to Defaults to serivceaccount user", - "group": "group to map volume access to Default is no group", - "tenant": "tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin", + "registry": "Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes", + "volume": "Volume is a string that references an already created Quobyte volume by name.", + "readOnly": "ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.", + "user": "User to map volume access to Defaults to serivceaccount user", + "group": "Group to map volume access to Default is no group", + "tenant": "Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin", } func (QuobyteVolumeSource) SwaggerDoc() map[string]string { @@ -1841,14 +1841,14 @@ func (QuobyteVolumeSource) SwaggerDoc() map[string]string { var map_RBDPersistentVolumeSource = map[string]string{ "": "Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.", - "monitors": "monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", - "image": "image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", - "fsType": "fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd", - "pool": "pool is the rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", - "user": "user is the rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", - "keyring": "keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", - "secretRef": "secretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", - "readOnly": "readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "monitors": "A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "image": "The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "fsType": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd", + "pool": "The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "user": "The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "keyring": "Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "secretRef": "SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "readOnly": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", } func (RBDPersistentVolumeSource) SwaggerDoc() map[string]string { @@ -1857,14 +1857,14 @@ func (RBDPersistentVolumeSource) SwaggerDoc() map[string]string { var map_RBDVolumeSource = map[string]string{ "": "Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.", - "monitors": "monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", - "image": "image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", - "fsType": "fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd", - "pool": "pool is the rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", - "user": "user is the rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", - "keyring": "keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", - "secretRef": "secretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", - "readOnly": "readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "monitors": "A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "image": "The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "fsType": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd", + "pool": "The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "user": "The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "keyring": "Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "secretRef": "SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "readOnly": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", } func (RBDVolumeSource) SwaggerDoc() map[string]string { @@ -2019,16 +2019,16 @@ func (SELinuxOptions) SwaggerDoc() map[string]string { var map_ScaleIOPersistentVolumeSource = map[string]string{ "": "ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume", - "gateway": "gateway is the host address of the ScaleIO API Gateway.", - "system": "system is the name of the storage system as configured in ScaleIO.", - "secretRef": "secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.", - "sslEnabled": "sslEnabled is the flag to enable/disable SSL communication with Gateway, default false", - "protectionDomain": "protectionDomain is the name of the ScaleIO Protection Domain for the configured storage.", - "storagePool": "storagePool is the ScaleIO Storage Pool associated with the protection domain.", - "storageMode": "storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.", - "volumeName": "volumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source.", - "fsType": "fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\"", - "readOnly": "readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "gateway": "The host address of the ScaleIO API Gateway.", + "system": "The name of the storage system as configured in ScaleIO.", + "secretRef": "SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.", + "sslEnabled": "Flag to enable/disable SSL communication with Gateway, default false", + "protectionDomain": "The name of the ScaleIO Protection Domain for the configured storage.", + "storagePool": "The ScaleIO Storage Pool associated with the protection domain.", + "storageMode": "Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.", + "volumeName": "The name of a volume already created in the ScaleIO system that is associated with this volume source.", + "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\"", + "readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", } func (ScaleIOPersistentVolumeSource) SwaggerDoc() map[string]string { @@ -2037,16 +2037,16 @@ func (ScaleIOPersistentVolumeSource) SwaggerDoc() map[string]string { var map_ScaleIOVolumeSource = map[string]string{ "": "ScaleIOVolumeSource represents a persistent ScaleIO volume", - "gateway": "gateway is the host address of the ScaleIO API Gateway.", - "system": "system is the name of the storage system as configured in ScaleIO.", - "secretRef": "secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.", - "sslEnabled": "sslEnabled Flag enable/disable SSL communication with Gateway, default false", - "protectionDomain": "protectionDomain is the name of the ScaleIO Protection Domain for the configured storage.", - "storagePool": "storagePool is the ScaleIO Storage Pool associated with the protection domain.", - "storageMode": "storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.", - "volumeName": "volumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source.", - "fsType": "fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\".", - "readOnly": "readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "gateway": "The host address of the ScaleIO API Gateway.", + "system": "The name of the storage system as configured in ScaleIO.", + "secretRef": "SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.", + "sslEnabled": "Flag to enable/disable SSL communication with Gateway, default false", + "protectionDomain": "The name of the ScaleIO Protection Domain for the configured storage.", + "storagePool": "The ScaleIO Storage Pool associated with the protection domain.", + "storageMode": "Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.", + "volumeName": "The name of a volume already created in the ScaleIO system that is associated with this volume source.", + "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\".", + "readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", } func (ScaleIOVolumeSource) SwaggerDoc() map[string]string { @@ -2127,8 +2127,8 @@ func (SecretList) SwaggerDoc() map[string]string { var map_SecretProjection = map[string]string{ "": "Adapts a secret into a projected volume.\n\nThe contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.", - "items": "items if unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", - "optional": "optional field specify whether the Secret or its key must be defined", + "items": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", + "optional": "Specify whether the Secret or its key must be defined", } func (SecretProjection) SwaggerDoc() map[string]string { @@ -2137,8 +2137,8 @@ func (SecretProjection) SwaggerDoc() map[string]string { var map_SecretReference = map[string]string{ "": "SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace", - "name": "name is unique within a namespace to reference a secret resource.", - "namespace": "namespace defines the space within which the secret name must be unique.", + "name": "Name is unique within a namespace to reference a secret resource.", + "namespace": "Namespace defines the space within which the secret name must be unique.", } func (SecretReference) SwaggerDoc() map[string]string { @@ -2147,10 +2147,10 @@ func (SecretReference) SwaggerDoc() map[string]string { var map_SecretVolumeSource = map[string]string{ "": "Adapts a Secret into a volume.\n\nThe contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.", - "secretName": "secretName is the name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", - "items": "items If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", - "defaultMode": "defaultMode is Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", - "optional": "optional field specify whether the Secret or its keys must be defined", + "secretName": "Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", + "items": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", + "defaultMode": "Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "optional": "Specify whether the Secret or its keys must be defined", } func (SecretVolumeSource) SwaggerDoc() map[string]string { @@ -2199,7 +2199,7 @@ func (Service) SwaggerDoc() map[string]string { var map_ServiceAccount = map[string]string{ "": "ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "secrets": "Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. Pods are only limited to this list if this service account has a \"kubernetes.io/enforce-mountable-secrets\" annotation set to \"true\". This field should not be used to find auto-generated service account token secrets for use outside of pods. Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. More info: https://kubernetes.io/docs/concepts/configuration/secret", + "secrets": "Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount. More info: https://kubernetes.io/docs/concepts/configuration/secret", "imagePullSecrets": "ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod", "automountServiceAccountToken": "AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level.", } @@ -2220,9 +2220,9 @@ func (ServiceAccountList) SwaggerDoc() map[string]string { var map_ServiceAccountTokenProjection = map[string]string{ "": "ServiceAccountTokenProjection represents a projected service account token volume. This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise).", - "audience": "audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver.", - "expirationSeconds": "expirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes.", - "path": "path is the path relative to the mount point of the file to project the token into.", + "audience": "Audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver.", + "expirationSeconds": "ExpirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes.", + "path": "Path is the path relative to the mount point of the file to project the token into.", } func (ServiceAccountTokenProjection) SwaggerDoc() map[string]string { @@ -2243,7 +2243,7 @@ var map_ServicePort = map[string]string{ "": "ServicePort contains information on service's port.", "name": "The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the 'name' field in the EndpointPort. Optional if only one ServicePort is defined on this service.", "protocol": "The IP protocol for this port. Supports \"TCP\", \"UDP\", and \"SCTP\". Default is TCP.", - "appProtocol": "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.", + "appProtocol": "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.", "port": "The port that will be exposed by this service.", "targetPort": "Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod's container ports. If this is not specified, the value of the 'port' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the 'port' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service", "nodePort": "The port on each node on which this service is exposed when type is NodePort or LoadBalancer. Usually assigned by the system. If a value is specified, in-range, and not in use it will be used, otherwise the operation will fail. If not specified, a port will be allocated if this Service requires one. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport", @@ -2271,7 +2271,7 @@ var map_ServiceSpec = map[string]string{ "type": "type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. \"ClusterIP\" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object or EndpointSlice objects. If clusterIP is \"None\", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a virtual IP. \"NodePort\" builds on ClusterIP and allocates a port on every node which routes to the same endpoints as the clusterIP. \"LoadBalancer\" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the same endpoints as the clusterIP. \"ExternalName\" aliases this service to the specified externalName. Several other fields do not apply to ExternalName services. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types", "externalIPs": "externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system.", "sessionAffinity": "Supports \"ClientIP\" and \"None\". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", - "loadBalancerIP": "Only applies to Service Type: LoadBalancer. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. Deprecated: This field was under-specified and its meaning varies across implementations, and it cannot support dual-stack. As of Kubernetes v1.24, users are encouraged to use implementation-specific annotations when available. This field may be removed in a future API version.", + "loadBalancerIP": "Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature.", "loadBalancerSourceRanges": "If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature.\" More info: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/", "externalName": "externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires `type` to be \"ExternalName\".", "externalTrafficPolicy": "externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. \"Local\" preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. \"Cluster\" obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading.", @@ -2280,7 +2280,7 @@ var map_ServiceSpec = map[string]string{ "sessionAffinityConfig": "sessionAffinityConfig contains the configurations of session affinity.", "ipFamilies": "IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service. This field is usually assigned automatically based on cluster configuration and the ipFamilyPolicy field. If this field is specified manually, the requested family is available in the cluster, and ipFamilyPolicy allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. Valid values are \"IPv4\" and \"IPv6\". This field only applies to Services of types ClusterIP, NodePort, and LoadBalancer, and does apply to \"headless\" services. This field will be wiped when updating a Service to type ExternalName.\n\nThis field may hold a maximum of two entries (dual-stack families, in either order). These families must correspond to the values of the clusterIPs field, if specified. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field.", "ipFamilyPolicy": "IPFamilyPolicy represents the dual-stack-ness requested or required by this Service. If there is no value provided, then this field will be set to SingleStack. Services can be \"SingleStack\" (a single IP family), \"PreferDualStack\" (two IP families on dual-stack configured clusters or a single IP family on single-stack clusters), or \"RequireDualStack\" (two IP families on dual-stack configured clusters, otherwise fail). The ipFamilies and clusterIPs fields depend on the value of this field. This field will be wiped when updating a service to type ExternalName.", - "allocateLoadBalancerNodePorts": "allocateLoadBalancerNodePorts defines if NodePorts will be automatically allocated for services with type LoadBalancer. Default is \"true\". It may be set to \"false\" if the cluster load-balancer does not rely on NodePorts. If the caller requests specific NodePorts (by specifying a value), those requests will be respected, regardless of this field. This field may only be set for services with type LoadBalancer and will be cleared if the type is changed to any other type.", + "allocateLoadBalancerNodePorts": "allocateLoadBalancerNodePorts defines if NodePorts will be automatically allocated for services with type LoadBalancer. Default is \"true\". It may be set to \"false\" if the cluster load-balancer does not rely on NodePorts. If the caller requests specific NodePorts (by specifying a value), those requests will be respected, regardless of this field. This field may only be set for services with type LoadBalancer and will be cleared if the type is changed to any other type. This field is beta-level and is only honored by servers that enable the ServiceLBNodePortControl feature.", "loadBalancerClass": "loadBalancerClass is the class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. \"internal-vip\" or \"example.com/internal-vip\". Unprefixed names are reserved for end-users. This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type 'LoadBalancer'. Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type.", "internalTrafficPolicy": "InternalTrafficPolicy specifies if the cluster internal traffic should be routed to all endpoints or node-local endpoints only. \"Cluster\" routes internal traffic to a Service to all endpoints. \"Local\" routes traffic to node-local endpoints only, traffic is dropped if no node-local endpoints are ready. The default value is \"Cluster\".", } @@ -2310,11 +2310,11 @@ func (SessionAffinityConfig) SwaggerDoc() map[string]string { var map_StorageOSPersistentVolumeSource = map[string]string{ "": "Represents a StorageOS persistent volume resource.", - "volumeName": "volumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.", - "volumeNamespace": "volumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.", - "fsType": "fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", - "readOnly": "readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - "secretRef": "secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.", + "volumeName": "VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.", + "volumeNamespace": "VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.", + "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "secretRef": "SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.", } func (StorageOSPersistentVolumeSource) SwaggerDoc() map[string]string { @@ -2323,11 +2323,11 @@ func (StorageOSPersistentVolumeSource) SwaggerDoc() map[string]string { var map_StorageOSVolumeSource = map[string]string{ "": "Represents a StorageOS persistent volume resource.", - "volumeName": "volumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.", - "volumeNamespace": "volumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.", - "fsType": "fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", - "readOnly": "readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - "secretRef": "secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.", + "volumeName": "VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.", + "volumeNamespace": "VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.", + "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "secretRef": "SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.", } func (StorageOSVolumeSource) SwaggerDoc() map[string]string { @@ -2400,11 +2400,10 @@ func (TopologySelectorTerm) SwaggerDoc() map[string]string { var map_TopologySpreadConstraint = map[string]string{ "": "TopologySpreadConstraint specifies how to spread matching pods among the given topology.", - "maxSkew": "MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. The global minimum is the minimum number of matching pods in an eligible domain or zero if the number of eligible domains is less than MinDomains. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 2/2/1: In this case, the global minimum is 1. ", - "topologyKey": "TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each as a \"bucket\", and try to put balanced number of pods into each bucket. We define a domain as a particular instance of a topology. Also, we define an eligible domain as a domain whose nodes match the node selector. e.g. If TopologyKey is \"kubernetes.io/hostname\", each Node is a domain of that topology. And, if TopologyKey is \"topology.kubernetes.io/zone\", each zone is a domain of that topology. It's a required field.", + "maxSkew": "MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 1/1/0: ", + "topologyKey": "TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each as a \"bucket\", and try to put balanced number of pods into each bucket. It's a required field.", "whenUnsatisfiable": "WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location,\n but giving higher precedence to topologies that would help reduce the\n skew.\nA constraint is considered \"Unsatisfiable\" for an incoming pod if and only if every possible node assignment for that pod would violate \"MaxSkew\" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: ", "labelSelector": "LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain.", - "minDomains": "MinDomains indicates a minimum number of eligible domains. When the number of eligible domains with matching topology keys is less than minDomains, Pod Topology Spread treats \"global minimum\" as 0, and then the calculation of Skew is performed. And when the number of eligible domains with matching topology keys equals or greater than minDomains, this value has no effect on scheduling. As a result, when the number of eligible domains is less than minDomains, scheduler won't schedule more than maxSkew Pods to those domains. If value is nil, the constraint behaves as if MinDomains is equal to 1. Valid values are integers greater than 0. When value is not nil, WhenUnsatisfiable must be DoNotSchedule.\n\nFor example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same labelSelector spread as 2/2/2: ", } func (TopologySpreadConstraint) SwaggerDoc() map[string]string { @@ -2424,7 +2423,7 @@ func (TypedLocalObjectReference) SwaggerDoc() map[string]string { var map_Volume = map[string]string{ "": "Volume represents a named volume in a pod that may be accessed by any container in the pod.", - "name": "name of the volume. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "name": "Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", } func (Volume) SwaggerDoc() map[string]string { @@ -2457,7 +2456,7 @@ func (VolumeMount) SwaggerDoc() map[string]string { var map_VolumeNodeAffinity = map[string]string{ "": "VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from.", - "required": "required specifies hard node constraints that must be met.", + "required": "Required specifies hard node constraints that must be met.", } func (VolumeNodeAffinity) SwaggerDoc() map[string]string { @@ -2466,10 +2465,10 @@ func (VolumeNodeAffinity) SwaggerDoc() map[string]string { var map_VolumeProjection = map[string]string{ "": "Projection that may be projected along with other supported volume types", - "secret": "secret information about the secret data to project", - "downwardAPI": "downwardAPI information about the downwardAPI data to project", - "configMap": "configMap information about the configMap data to project", - "serviceAccountToken": "serviceAccountToken is information about the serviceAccountToken data to project", + "secret": "information about the secret data to project", + "downwardAPI": "information about the downwardAPI data to project", + "configMap": "information about the configMap data to project", + "serviceAccountToken": "information about the serviceAccountToken data to project", } func (VolumeProjection) SwaggerDoc() map[string]string { @@ -2478,35 +2477,35 @@ func (VolumeProjection) SwaggerDoc() map[string]string { var map_VolumeSource = map[string]string{ "": "Represents the source of a volume to mount. Only one of its members may be specified.", - "hostPath": "hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - "emptyDir": "emptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", - "gcePersistentDisk": "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - "awsElasticBlockStore": "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - "gitRepo": "gitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", - "secret": "secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", - "nfs": "nfs represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - "iscsi": "iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md", - "glusterfs": "glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md", - "persistentVolumeClaim": "persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - "rbd": "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md", - "flexVolume": "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", - "cinder": "cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", - "cephfs": "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime", - "flocker": "flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running", - "downwardAPI": "downwardAPI represents downward API about the pod that should populate this volume", - "fc": "fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - "azureFile": "azureFile represents an Azure File Service mount on the host and bind mount to the pod.", - "configMap": "configMap represents a configMap that should populate this volume", - "vsphereVolume": "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", - "quobyte": "quobyte represents a Quobyte mount on the host that shares a pod's lifetime", - "azureDisk": "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", - "photonPersistentDisk": "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", - "projected": "projected items for all in one resources secrets, configmaps, and downward API", - "portworxVolume": "portworxVolume represents a portworx volume attached and mounted on kubelets host machine", - "scaleIO": "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", - "storageos": "storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.", - "csi": "csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).", - "ephemeral": "ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed.\n\nUse this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity\n tracking are needed,\nc) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through\n a PersistentVolumeClaim (see EphemeralVolumeSource for more\n information on the connection between this volume type\n and PersistentVolumeClaim).\n\nUse PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod.\n\nUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information.\n\nA pod can use both types of ephemeral volumes and persistent volumes at the same time.", + "hostPath": "HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + "emptyDir": "EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", + "gcePersistentDisk": "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + "awsElasticBlockStore": "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + "gitRepo": "GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", + "secret": "Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", + "nfs": "NFS represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + "iscsi": "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md", + "glusterfs": "Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md", + "persistentVolumeClaim": "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + "rbd": "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md", + "flexVolume": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", + "cinder": "Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", + "cephfs": "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", + "flocker": "Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running", + "downwardAPI": "DownwardAPI represents downward API about the pod that should populate this volume", + "fc": "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", + "azureFile": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", + "configMap": "ConfigMap represents a configMap that should populate this volume", + "vsphereVolume": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", + "quobyte": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", + "azureDisk": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + "photonPersistentDisk": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", + "projected": "Items for all in one resources secrets, configmaps, and downward API", + "portworxVolume": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", + "scaleIO": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", + "storageos": "StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.", + "csi": "CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).", + "ephemeral": "Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed.\n\nUse this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity\n tracking are needed,\nc) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through\n a PersistentVolumeClaim (see EphemeralVolumeSource for more\n information on the connection between this volume type\n and PersistentVolumeClaim).\n\nUse PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod.\n\nUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information.\n\nA pod can use both types of ephemeral volumes and persistent volumes at the same time.", } func (VolumeSource) SwaggerDoc() map[string]string { @@ -2515,10 +2514,10 @@ func (VolumeSource) SwaggerDoc() map[string]string { var map_VsphereVirtualDiskVolumeSource = map[string]string{ "": "Represents a vSphere volume resource.", - "volumePath": "volumePath is the path that identifies vSphere volume vmdk", - "fsType": "fsType is filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", - "storagePolicyName": "storagePolicyName is the storage Policy Based Management (SPBM) profile name.", - "storagePolicyID": "storagePolicyID is the storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.", + "volumePath": "Path that identifies vSphere volume vmdk", + "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "storagePolicyName": "Storage Policy Based Management (SPBM) profile name.", + "storagePolicyID": "Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.", } func (VsphereVirtualDiskVolumeSource) SwaggerDoc() map[string]string { diff --git a/cluster-autoscaler/vendor/k8s.io/api/core/v1/well_known_taints.go b/cluster-autoscaler/vendor/k8s.io/api/core/v1/well_known_taints.go index a6d8c272b25a..84d268197c6a 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/core/v1/well_known_taints.go +++ b/cluster-autoscaler/vendor/k8s.io/api/core/v1/well_known_taints.go @@ -45,8 +45,4 @@ const ( // TaintNodePIDPressure will be added when node has pid pressure // and removed when node has enough pid. TaintNodePIDPressure = "node.kubernetes.io/pid-pressure" - - // TaintNodeOutOfService can be added when node is out of service in case of - // a non-graceful shutdown - TaintNodeOutOfService = "node.kubernetes.io/out-of-service" ) diff --git a/cluster-autoscaler/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go b/cluster-autoscaler/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go index a3fbd14c6c59..fc951ad44d2c 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go +++ b/cluster-autoscaler/vendor/k8s.io/api/core/v1/zz_generated.deepcopy.go @@ -5644,11 +5644,6 @@ func (in *TopologySpreadConstraint) DeepCopyInto(out *TopologySpreadConstraint) *out = new(metav1.LabelSelector) (*in).DeepCopyInto(*out) } - if in.MinDomains != nil { - in, out := &in.MinDomains, &out.MinDomains - *out = new(int32) - **out = **in - } return } diff --git a/cluster-autoscaler/vendor/k8s.io/api/discovery/v1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/discovery/v1/generated.pb.go index 79f2cc09d8d9..38bdb02a52bb 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/discovery/v1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/discovery/v1/generated.pb.go @@ -258,63 +258,63 @@ func init() { } var fileDescriptor_3a5d310fb1396ddf = []byte{ - // 893 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0x4d, 0x6f, 0xe3, 0x44, - 0x18, 0x8e, 0x9b, 0x86, 0xda, 0x93, 0x56, 0xec, 0x8e, 0x90, 0x1a, 0x05, 0x14, 0x87, 0xa0, 0x45, - 0x91, 0x2a, 0x6c, 0x5a, 0x21, 0xb4, 0x20, 0x21, 0x51, 0xb3, 0x65, 0x97, 0xaf, 0x52, 0xcd, 0xf6, - 0xb4, 0x42, 0x5a, 0x5c, 0xfb, 0xad, 0x63, 0xd2, 0xcc, 0x58, 0x33, 0x93, 0x48, 0xe1, 0xc4, 0x85, - 0x33, 0xfc, 0x22, 0x8e, 0xa8, 0xc7, 0xbd, 0xb1, 0x27, 0x8b, 0x9a, 0xbf, 0xc0, 0x69, 0x4f, 0x68, - 0xc6, 0x9f, 0x25, 0x8d, 0xb2, 0x37, 0xcf, 0x33, 0xcf, 0xf3, 0x7e, 0x3c, 0x33, 0xf3, 0x1a, 0x7d, - 0x3e,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0x37, 0x1f, 0x0f, 0x6f, 0xdd, - 0xee, 0xdd, 0x82, 0xde, 0xb8, 0xe1, 0xde, 0x67, 0xd7, 0x37, 0x83, 0xd6, 0x8b, 0x9b, 0x41, 0xeb, - 0xe5, 0xcd, 0xa0, 0xf5, 0x4b, 0x36, 0x30, 0xae, 0xb3, 0x81, 0xf1, 0x22, 0x1b, 0x18, 0x2f, 0xb3, - 0x81, 0xf1, 0x77, 0x36, 0x30, 0x7e, 0xff, 0x67, 0xd0, 0x7a, 0xb6, 0xbf, 0xe6, 0xa7, 0xfe, 0x5f, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x2e, 0xd0, 0xcc, 0x2e, 0x07, 0x08, 0x00, 0x00, + // 889 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0x4d, 0x6f, 0xe3, 0x44, + 0x18, 0x8e, 0x9b, 0x86, 0xda, 0x93, 0x56, 0xec, 0x8e, 0x90, 0x36, 0x0a, 0x28, 0x0e, 0x46, 0x8b, + 0x22, 0x55, 0xd8, 0xb4, 0x42, 0x68, 0xe1, 0x44, 0xcd, 0x96, 0x5d, 0xbe, 0x4a, 0x35, 0xdb, 0xd3, + 0x0a, 0x69, 0x71, 0xed, 0xb7, 0x8e, 0x49, 0x33, 0x63, 0xcd, 0x4c, 0x22, 0x85, 0x13, 0x17, 0xce, + 0xf0, 0x8b, 0x38, 0xa2, 0x1e, 0xf7, 0xc6, 0x9e, 0x2c, 0x6a, 0xfe, 0x02, 0xa7, 0x3d, 0xa1, 0x19, + 0x7f, 0x96, 0xb4, 0x0a, 0xb7, 0x99, 0x67, 0x9e, 0xe7, 0xfd, 0x78, 0x66, 0xe6, 0x45, 0x9f, 0xcd, + 0x1e, 0x09, 0x37, 0x61, 0xde, 0x6c, 0x71, 0x0e, 0x9c, 0x82, 0x04, 0xe1, 0x2d, 0x81, 0x46, 0x8c, + 0x7b, 0xe5, 0x41, 0x90, 0x26, 0x5e, 0x94, 0x88, 0x90, 0x2d, 0x81, 0xaf, 0xbc, 0xe5, 0x81, 0x17, + 0x03, 0x05, 0x1e, 0x48, 0x88, 0xdc, 0x94, 0x33, 0xc9, 0xf0, 0x83, 0x82, 0xe8, 0x06, 0x69, 0xe2, + 0xd6, 0x44, 0x77, 0x79, 0x30, 0xfc, 0x20, 0x4e, 0xe4, 0x74, 0x71, 0xee, 0x86, 0x6c, 0xee, 0xc5, + 0x2c, 0x66, 0x9e, 0xe6, 0x9f, 0x2f, 0x2e, 0xf4, 0x4e, 0x6f, 0xf4, 0xaa, 0x88, 0x33, 0x74, 0x5a, + 0x09, 0x43, 0xc6, 0xe1, 0x96, 0x5c, 0xc3, 0x8f, 0x1a, 0xce, 0x3c, 0x08, 0xa7, 0x09, 0x55, 0x35, + 0xa5, 0xb3, 0x58, 0x01, 0xc2, 0x9b, 0x83, 0x0c, 0x6e, 0x53, 0x79, 0x77, 0xa9, 0xf8, 0x82, 0xca, + 0x64, 0x0e, 0x6b, 0x82, 0x8f, 0x37, 0x09, 0x44, 0x38, 0x85, 0x79, 0xf0, 0x5f, 0x9d, 0xf3, 0xcf, + 0x36, 0x32, 0x8f, 0x69, 0x94, 0xb2, 0x84, 0x4a, 0xbc, 0x8f, 0xac, 0x20, 0x8a, 0x38, 0x08, 0x01, + 0x62, 0x60, 0x8c, 0xbb, 0x13, 0xcb, 0xdf, 0xcb, 0x33, 0xdb, 0x3a, 0xaa, 0x40, 0xd2, 0x9c, 0xe3, + 0x17, 0x08, 0x85, 0x8c, 0x46, 0x89, 0x4c, 0x18, 0x15, 0x83, 0xad, 0xb1, 0x31, 0xe9, 0x1f, 0xee, + 0xbb, 0x77, 0x38, 0xeb, 0x56, 0x39, 0x3e, 0xaf, 0x25, 0x3e, 0xbe, 0xca, 0xec, 0x4e, 0x9e, 0xd9, + 0xa8, 0xc1, 0x48, 0x2b, 0x24, 0x9e, 0x20, 0x73, 0xca, 0x84, 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x79, 0x75, 0x3d, + 0xea, 0xfc, 0x9c, 0x8f, 0x8c, 0xab, 0x7c, 0x64, 0xbc, 0xcc, 0x47, 0xc6, 0xab, 0x7c, 0x64, 0xfc, + 0x95, 0x8f, 0x8c, 0xdf, 0xfe, 0x1e, 0x75, 0x9e, 0x6f, 0x2d, 0x0f, 0xfe, 0x0d, 0x00, 0x00, 0xff, + 0xff, 0x66, 0x0f, 0x26, 0x7b, 0xf2, 0x07, 0x00, 0x00, } func (m *Endpoint) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/discovery/v1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/discovery/v1/generated.proto index 44d9d19e26e2..0e1e4a8c37d5 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/discovery/v1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/discovery/v1/generated.proto @@ -27,7 +27,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/discovery/v1"; +option go_package = "v1"; // Endpoint represents a single logical "backend" implementing a service. message Endpoint { @@ -35,8 +35,7 @@ message Endpoint { // according to the corresponding EndpointSlice addressType field. Consumers // must handle different types of addresses in the context of their own // capabilities. This must contain at least one address but no more than - // 100. These are all assumed to be fungible and clients may choose to only - // use the first element. Refer to: https://issue.k8s.io/106267 + // 100. // +listType=set repeated string addresses = 1; @@ -141,7 +140,7 @@ message EndpointPort { // The application protocol for this port. // This field follows standard Kubernetes label syntax. // Un-prefixed names are reserved for IANA standard service names (as per - // RFC-6335 and https://www.iana.org/assignments/service-names). + // RFC-6335 and http://www.iana.org/assignments/service-names). // Non-standard protocols should use prefixed names such as // mycompany.com/my-custom-protocol. // +optional diff --git a/cluster-autoscaler/vendor/k8s.io/api/discovery/v1/types.go b/cluster-autoscaler/vendor/k8s.io/api/discovery/v1/types.go index 13591436d140..3c45ba3e7f92 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/discovery/v1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/api/discovery/v1/types.go @@ -73,8 +73,7 @@ type Endpoint struct { // according to the corresponding EndpointSlice addressType field. Consumers // must handle different types of addresses in the context of their own // capabilities. This must contain at least one address but no more than - // 100. These are all assumed to be fungible and clients may choose to only - // use the first element. Refer to: https://issue.k8s.io/106267 + // 100. // +listType=set Addresses []string `json:"addresses" protobuf:"bytes,1,rep,name=addresses"` // conditions contains information about the current status of the endpoint. @@ -177,7 +176,7 @@ type EndpointPort struct { // The application protocol for this port. // This field follows standard Kubernetes label syntax. // Un-prefixed names are reserved for IANA standard service names (as per - // RFC-6335 and https://www.iana.org/assignments/service-names). + // RFC-6335 and http://www.iana.org/assignments/service-names). // Non-standard protocols should use prefixed names such as // mycompany.com/my-custom-protocol. // +optional diff --git a/cluster-autoscaler/vendor/k8s.io/api/discovery/v1/types_swagger_doc_generated.go b/cluster-autoscaler/vendor/k8s.io/api/discovery/v1/types_swagger_doc_generated.go index bb3c8769fd64..b424a1cf0466 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/discovery/v1/types_swagger_doc_generated.go +++ b/cluster-autoscaler/vendor/k8s.io/api/discovery/v1/types_swagger_doc_generated.go @@ -29,7 +29,7 @@ package v1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_Endpoint = map[string]string{ "": "Endpoint represents a single logical \"backend\" implementing a service.", - "addresses": "addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100. These are all assumed to be fungible and clients may choose to only use the first element. Refer to: https://issue.k8s.io/106267", + "addresses": "addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100.", "conditions": "conditions contains information about the current status of the endpoint.", "hostname": "hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation.", "targetRef": "targetRef is a reference to a Kubernetes object that represents this endpoint.", @@ -68,7 +68,7 @@ var map_EndpointPort = map[string]string{ "name": "The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string.", "protocol": "The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.", "port": "The port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer.", - "appProtocol": "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.", + "appProtocol": "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.", } func (EndpointPort) SwaggerDoc() map[string]string { diff --git a/cluster-autoscaler/vendor/k8s.io/api/discovery/v1beta1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/discovery/v1beta1/generated.pb.go index fcb9136e7429..e024cc0a16db 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/discovery/v1beta1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/discovery/v1beta1/generated.pb.go @@ -258,62 +258,62 @@ func init() { } var fileDescriptor_ece80bbc872d519b = []byte{ - // 871 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0x41, 0x6f, 0xe3, 0x44, - 0x14, 0x8e, 0x9b, 0x86, 0xda, 0x93, 0x56, 0xec, 0x8e, 0x38, 0x44, 0xa5, 0xb2, 0x23, 0xa3, 0x45, - 0x11, 0x15, 0x36, 0xad, 0x56, 0x68, 0x05, 0xa7, 0x1a, 0x0a, 0x8b, 0xb4, 0xec, 0x56, 0xd3, 0x4a, - 0x48, 0x2b, 0x0e, 0x4c, 0xec, 0xa9, 0x63, 0xd2, 0xcc, 0x58, 0x33, 0x93, 0x48, 0xb9, 0xf1, 0x0f, - 0xe0, 0xb7, 0xf0, 0x17, 0x90, 0x50, 0x8f, 0x7b, 0xdc, 0x93, 0x45, 0xcd, 0xbf, 0xe8, 0x09, 0xcd, - 0x78, 0x6c, 0x27, 0x04, 0xba, 0xb9, 0x79, 0xbe, 0x79, 0xdf, 0xf7, 0xde, 0xfb, 0xde, 0xcc, 0x18, - 0x9c, 0x4f, 0x9f, 0x89, 0x20, 0x63, 0xe1, 0x74, 0x3e, 0x26, 0x9c, 0x12, 0x49, 0x44, 0xb8, 0x20, - 0x34, 0x61, 0x3c, 0x34, 0x1b, 0x38, 0xcf, 0xc2, 0x24, 0x13, 0x31, 0x5b, 0x10, 0xbe, 0x0c, 0x17, - 0x27, 0x63, 0x22, 0xf1, 0x49, 0x98, 0x12, 0x4a, 0x38, 0x96, 0x24, 0x09, 0x72, 0xce, 0x24, 0x83, - 0x47, 0x55, 0x74, 0x80, 0xf3, 0x2c, 0x68, 0xa2, 0x03, 0x13, 0x7d, 0xf8, 0x69, 0x9a, 0xc9, 0xc9, - 0x7c, 0x1c, 0xc4, 0x6c, 0x16, 0xa6, 0x2c, 0x65, 0xa1, 0x26, 0x8d, 0xe7, 0xd7, 0x7a, 0xa5, 0x17, - 0xfa, 0xab, 0x12, 0x3b, 0xf4, 0x57, 0x52, 0xc7, 0x8c, 0x93, 0x70, 0xb1, 0x91, 0xf0, 0xf0, 0x69, - 0x1b, 0x33, 0xc3, 0xf1, 0x24, 0xa3, 0xaa, 0xba, 0x7c, 0x9a, 0x2a, 0x40, 0x84, 0x33, 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0x4f, 0xad, 0x04, 0xaa, 0x74, 0xfc, 0x3f, 0x2c, 0xf0, 0x78, 0xcd, 0xe3, 0x17, 0x99, 0x90, 0xf0, - 0xc7, 0x0d, 0x9f, 0x83, 0xed, 0x7c, 0x56, 0x6c, 0xed, 0x72, 0x73, 0x40, 0x6b, 0x64, 0xc5, 0xe3, - 0x0b, 0xd0, 0xcb, 0x24, 0x99, 0xd5, 0xce, 0x6c, 0xf9, 0x46, 0xe8, 0xea, 0xda, 0x2e, 0xbe, 0x53, - 0x0a, 0xa8, 0x12, 0xf2, 0x8f, 0xc1, 0x9e, 0xb9, 0x08, 0x70, 0xb8, 0x76, 0xd8, 0xf7, 0x4d, 0xf8, - 0xca, 0x81, 0x8f, 0xa2, 0xdb, 0x3b, 0xb7, 0xf3, 0xe6, 0xce, 0xed, 0xbc, 0xbd, 0x73, 0x3b, 0xbf, - 0x94, 0xae, 0x75, 0x5b, 0xba, 0xd6, 0x9b, 0xd2, 0xb5, 0xde, 0x96, 0xae, 0xf5, 0x57, 0xe9, 0x5a, - 0xbf, 0xfd, 0xed, 0x76, 0x5e, 0x1f, 0x3d, 0xf4, 0xc3, 0xfe, 0x27, 0x00, 0x00, 0xff, 0xff, 0xd2, - 0xeb, 0x52, 0x19, 0xe8, 0x07, 0x00, 0x00, + // 870 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0x41, 0x8f, 0xe3, 0x34, + 0x14, 0x6e, 0xa6, 0x53, 0x9a, 0xb8, 0x33, 0x62, 0xd7, 0xe2, 0x50, 0x0d, 0xab, 0xa4, 0x0a, 0x5a, + 0x54, 0x31, 0xda, 0x84, 0x19, 0xad, 0xd0, 0x0a, 0x4e, 0x13, 0x18, 0x58, 0xa4, 0x65, 0x77, 0xe4, + 0x19, 0x09, 0x69, 0xc5, 0x01, 0x37, 0xf1, 0xa4, 0xa1, 0x53, 0x3b, 0xb2, 0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 0xe0, 0x24, 0xe1, 0x44, 0x08, 0x22, 0x86, 0xd6, 0xa8, 0x3b, 0x76, 0xa2, 0xc3, + 0xb2, 0xf0, 0x9c, 0xb3, 0x1a, 0x44, 0xed, 0x39, 0x4c, 0x00, 0x88, 0x19, 0x4d, 0x32, 0x99, 0x31, + 0x2a, 0x86, 0x7b, 0x23, 0x6b, 0x3c, 0x38, 0xfd, 0x34, 0xb8, 0xcf, 0xde, 0xa0, 0x4e, 0xf4, 0x65, + 0xc3, 0x8b, 0xe0, 0x6d, 0xe1, 0x75, 0xca, 0xc2, 0x03, 0x2d, 0x86, 0xd6, 0x74, 0xe1, 0x18, 0xd8, + 0x53, 0x26, 0x24, 0xc5, 0x73, 0x32, 0xec, 0x8e, 0xac, 0xb1, 0x13, 0x1d, 0x94, 0x85, 0x67, 0x3f, + 0x37, 0x18, 0x6a, 0x4e, 0xe1, 0x05, 0x70, 0x24, 0xe6, 0x29, 0x91, 0x88, 0x5c, 0x0f, 0xf7, 0x75, + 0x39, 0x1f, 0xad, 0x97, 0xa3, 0x06, 0x14, 0x2c, 0x4f, 0x82, 0x57, 0x93, 0x9f, 0x48, 0xac, 0x82, + 0x08, 0x27, 0x34, 0x26, 0x55, 0x87, 0x57, 0x35, 0x13, 0xb5, 0x22, 0x70, 0x02, 0x6c, 0xc9, 0x72, + 0x76, 0xc3, 0xd2, 0xd5, 0xb0, 0x37, 0xea, 0x8e, 0x07, 0xa7, 0x4f, 0x77, 0xeb, 0x2f, 0xb8, 0x32, + 0xb4, 0x73, 0x2a, 0xf9, 0x2a, 0x7a, 0x60, 0x7a, 0xb4, 0x6b, 0x18, 0x35, 0xba, 0xaa, 0x3f, 0xca, + 0x12, 0xf2, 0x52, 0xf5, 0xf7, 0x5e, 0xdb, 0xdf, 0x4b, 0x83, 0xa1, 0xe6, 0x14, 0xbe, 0x00, 0xbd, + 0x69, 0x46, 0xa5, 0x18, 0xf6, 0x75, 0x6f, 0xc7, 0xbb, 0x95, 0xf2, 0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 0xda, 0x99, 0x1d, 0xff, 0x08, 0x5d, 0x5d, 0xdb, 0xc5, 0xb7, 0x4a, + 0x01, 0x55, 0x42, 0xfe, 0x31, 0xe8, 0x9b, 0x87, 0x00, 0x47, 0x1b, 0x97, 0xfd, 0xc0, 0x84, 0xaf, + 0x5d, 0xf8, 0xe8, 0xc9, 0xed, 0x9d, 0xdb, 0x79, 0x73, 0xe7, 0x76, 0xde, 0xde, 0xb9, 0x9d, 0x9f, + 0x4b, 0xd7, 0xba, 0x2d, 0x5d, 0xeb, 0x4d, 0xe9, 0x5a, 0x6f, 0x4b, 0xd7, 0xfa, 0xb3, 0x74, 0xad, + 0x5f, 0xff, 0x72, 0x3b, 0xaf, 0xfb, 0x26, 0xff, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf7, 0x0d, + 0x6f, 0x98, 0xd3, 0x07, 0x00, 0x00, } func (m *Endpoint) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/discovery/v1beta1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/discovery/v1beta1/generated.proto index 84bdf075af22..6925f7ce3b09 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/discovery/v1beta1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/discovery/v1beta1/generated.proto @@ -27,7 +27,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/discovery/v1beta1"; +option go_package = "v1beta1"; // Endpoint represents a single logical "backend" implementing a service. message Endpoint { @@ -35,8 +35,7 @@ message Endpoint { // according to the corresponding EndpointSlice addressType field. Consumers // must handle different types of addresses in the context of their own // capabilities. This must contain at least one address but no more than - // 100. These are all assumed to be fungible and clients may choose to only - // use the first element. Refer to: https://issue.k8s.io/106267 + // 100. // +listType=set repeated string addresses = 1; @@ -144,7 +143,7 @@ message EndpointPort { // The application protocol for this port. // This field follows standard Kubernetes label syntax. // Un-prefixed names are reserved for IANA standard service names (as per - // RFC-6335 and https://www.iana.org/assignments/service-names). + // RFC-6335 and http://www.iana.org/assignments/service-names). // Non-standard protocols should use prefixed names such as // mycompany.com/my-custom-protocol. // +optional diff --git a/cluster-autoscaler/vendor/k8s.io/api/discovery/v1beta1/types.go b/cluster-autoscaler/vendor/k8s.io/api/discovery/v1beta1/types.go index 8620004f44ff..eeb46e175a14 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/discovery/v1beta1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/api/discovery/v1beta1/types.go @@ -76,8 +76,7 @@ type Endpoint struct { // according to the corresponding EndpointSlice addressType field. Consumers // must handle different types of addresses in the context of their own // capabilities. This must contain at least one address but no more than - // 100. These are all assumed to be fungible and clients may choose to only - // use the first element. Refer to: https://issue.k8s.io/106267 + // 100. // +listType=set Addresses []string `json:"addresses" protobuf:"bytes,1,rep,name=addresses"` // conditions contains information about the current status of the endpoint. @@ -182,7 +181,7 @@ type EndpointPort struct { // The application protocol for this port. // This field follows standard Kubernetes label syntax. // Un-prefixed names are reserved for IANA standard service names (as per - // RFC-6335 and https://www.iana.org/assignments/service-names). + // RFC-6335 and http://www.iana.org/assignments/service-names). // Non-standard protocols should use prefixed names such as // mycompany.com/my-custom-protocol. // +optional diff --git a/cluster-autoscaler/vendor/k8s.io/api/discovery/v1beta1/types_swagger_doc_generated.go b/cluster-autoscaler/vendor/k8s.io/api/discovery/v1beta1/types_swagger_doc_generated.go index 96e6d13ef7f0..b4c221999ada 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/discovery/v1beta1/types_swagger_doc_generated.go +++ b/cluster-autoscaler/vendor/k8s.io/api/discovery/v1beta1/types_swagger_doc_generated.go @@ -29,7 +29,7 @@ package v1beta1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_Endpoint = map[string]string{ "": "Endpoint represents a single logical \"backend\" implementing a service.", - "addresses": "addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100. These are all assumed to be fungible and clients may choose to only use the first element. Refer to: https://issue.k8s.io/106267", + "addresses": "addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100.", "conditions": "conditions contains information about the current status of the endpoint.", "hostname": "hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation.", "targetRef": "targetRef is a reference to a Kubernetes object that represents this endpoint.", @@ -67,7 +67,7 @@ var map_EndpointPort = map[string]string{ "name": "The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string.", "protocol": "The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.", "port": "The port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer.", - "appProtocol": "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.", + "appProtocol": "The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.", } func (EndpointPort) SwaggerDoc() map[string]string { diff --git a/cluster-autoscaler/vendor/k8s.io/api/events/v1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/events/v1/generated.pb.go index 2ec919a95aa8..70ad588a6280 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/events/v1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/events/v1/generated.pb.go @@ -139,56 +139,56 @@ func init() { } var fileDescriptor_ee2600587b650fac = []byte{ - // 775 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x4f, 0x6f, 0xe3, 0x44, - 0x14, 0x8f, 0x77, 0x9b, 0xb4, 0x99, 0xec, 0x6e, 0xd3, 0xd9, 0x95, 0x3a, 0x74, 0x25, 0x27, 0x64, - 0x25, 0x14, 0x21, 0x61, 0xd3, 0x0a, 0x21, 0x84, 0x84, 0x44, 0xdd, 0x14, 0x54, 0xd4, 0x52, 0x69, - 0xda, 0x13, 0xe2, 0xd0, 0x89, 0xf3, 0xea, 0x9a, 0xc4, 0x33, 0xd6, 0xcc, 0x24, 0x52, 0x6f, 0x5c, - 0x90, 0x38, 0xf2, 0x05, 0xf8, 0x00, 0x88, 0x2f, 0xd2, 0x63, 0x8f, 0x3d, 0x45, 0xd4, 0x7c, 0x11, - 0xe4, 0xb1, 0x13, 0xa7, 0xf9, 0x03, 0x41, 0x7b, 0xf3, 0xbc, 0xf7, 0xfb, 0xf3, 0xde, 0xcc, 0xcb, - 0x0b, 0xfa, 0xaa, 0xff, 0x85, 0x72, 0x42, 0xe1, 0xf6, 0x87, 0x5d, 0x90, 0x1c, 0x34, 0x28, 0x77, - 0x04, 0xbc, 0x27, 0xa4, 0x9b, 0x27, 0x58, 0x1c, 0xba, 0x30, 0x02, 0xae, 0x95, 0x3b, 0xda, 0x77, - 0x03, 0xe0, 0x20, 0x99, 0x86, 0x9e, 0x13, 0x4b, 0xa1, 0x05, 0x7e, 0x93, 0xa1, 0x1c, 0x16, 0x87, - 0x4e, 0x86, 0x72, 0x46, 0xfb, 0x7b, 0x9f, 0x04, 0xa1, 0xbe, 0x19, 0x76, 0x1d, 0x5f, 0x44, 0x6e, - 0x20, 0x02, 0xe1, 0x1a, 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, 0xde, 0x67, 0x3b, 0x4e, 0xe7, 0xf5, 0x74, 0x4e, 0x90, 0x2e, - 0x58, 0x78, 0x5f, 0xde, 0x3d, 0xda, 0xa5, 0xfb, 0x47, 0xbb, 0xf4, 0xf0, 0x68, 0x97, 0x7e, 0x4e, - 0x6c, 0xeb, 0x2e, 0xb1, 0xad, 0xfb, 0xc4, 0xb6, 0x1e, 0x12, 0xdb, 0xfa, 0x2b, 0xb1, 0xad, 0xdf, - 0xfe, 0xb6, 0x4b, 0x3f, 0xbc, 0x59, 0xf6, 0x6f, 0xfa, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe0, - 0xc8, 0x73, 0x3d, 0x7d, 0x07, 0x00, 0x00, + // 772 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x4f, 0x6f, 0xe3, 0x44, + 0x14, 0x8f, 0xbb, 0x4d, 0xda, 0x4c, 0x76, 0xb7, 0xe9, 0x2c, 0x52, 0x87, 0xae, 0xe4, 0x84, 0xac, + 0x84, 0x22, 0x24, 0x6c, 0xb2, 0x42, 0x88, 0x0b, 0x12, 0xeb, 0xa6, 0xa0, 0xa2, 0x96, 0x4a, 0xd3, + 0x9e, 0x10, 0x87, 0x4e, 0x9c, 0x57, 0xd7, 0x24, 0x9e, 0xb1, 0x66, 0x26, 0x91, 0x7a, 0xe3, 0x82, + 0xc4, 0x91, 0x2f, 0xc0, 0x07, 0x40, 0x7c, 0x91, 0x1e, 0x7b, 0xec, 0x29, 0xa2, 0xe6, 0x8b, 0x20, + 0x8f, 0x9d, 0x38, 0xcd, 0x1f, 0x08, 0xda, 0x9b, 0xe7, 0xbd, 0xdf, 0x9f, 0xf7, 0x66, 0x9e, 0x1f, + 0xfa, 0x6a, 0xf0, 0xa5, 0x72, 0x42, 0xe1, 0x0e, 0x46, 0x3d, 0x90, 0x1c, 0x34, 0x28, 0x77, 0x0c, + 0xbc, 0x2f, 0xa4, 0x9b, 0x27, 0x58, 0x1c, 0xba, 0x30, 0x06, 0xae, 0x95, 0x3b, 0xee, 0xb8, 0x01, + 0x70, 0x90, 0x4c, 0x43, 0xdf, 0x89, 0xa5, 0xd0, 0x02, 0x7f, 0x90, 0xa1, 0x1c, 0x16, 0x87, 0x4e, + 0x86, 0x72, 0xc6, 0x9d, 0xc3, 0x4f, 0x83, 0x50, 0xdf, 0x8c, 0x7a, 0x8e, 0x2f, 0x22, 0x37, 0x10, + 0x81, 0x70, 0x0d, 0xb8, 0x37, 0xba, 0x36, 0x27, 0x73, 0x30, 0x5f, 0x99, 0xc8, 0x61, 0x6b, 0xce, + 0xca, 0x17, 0x12, 0x56, 0x18, 0x1d, 0x7e, 0x5e, 0x60, 0x22, 0xe6, 0xdf, 0x84, 0x1c, 0xe4, 0xad, + 0x1b, 0x0f, 0x82, 0x34, 0xa0, 0xdc, 0x08, 0x34, 0x5b, 0xc5, 0x72, 0xd7, 0xb1, 0xe4, 0x88, 0xeb, + 0x30, 0x82, 0x25, 0xc2, 0x17, 0xff, 0x45, 0x50, 0xfe, 0x0d, 0x44, 0x6c, 0x91, 0xd7, 0xfa, 0xbd, + 0x8a, 0xca, 0xc7, 0x69, 0xff, 0xf8, 0x0a, 0xed, 0xa6, 0xd5, 0xf4, 0x99, 0x66, 0xc4, 0x6a, 0x5a, + 0xed, 0xda, 0xdb, 0xcf, 0x9c, 0xe2, 0x92, 0x66, 0xa2, 0x4e, 0x3c, 0x08, 0xd2, 0x80, 0x72, 0x52, + 0xb4, 0x33, 0xee, 0x38, 0xe7, 0xbd, 0x9f, 0xc0, 0xd7, 0x67, 0xa0, 0x99, 0x87, 0xef, 0x26, 0x8d, + 0x52, 0x32, 0x69, 0xa0, 0x22, 0x46, 0x67, 0xaa, 0xf8, 0x0a, 0x55, 0xcd, 0x55, 0x5f, 0x86, 0x11, + 0x90, 0x2d, 0x63, 0xe1, 0x6e, 0x66, 0x71, 0x16, 0xfa, 0x52, 0xa4, 0x34, 0x6f, 0x3f, 0x77, 0xa8, + 0x1e, 0x4f, 0x95, 0x68, 0x21, 0x8a, 0x8f, 0x51, 0x45, 0x81, 0x0c, 0x41, 0x91, 0x67, 0x46, 0xfe, + 0x23, 0x67, 0xd5, 0x33, 0x3b, 0x86, 0x7b, 0x61, 0x80, 0x1e, 0x4a, 0x26, 0x8d, 0x4a, 0xf6, 0x4d, + 0x73, 0x32, 0x3e, 0x43, 0xaf, 0x24, 0xc4, 0x42, 0xea, 0x90, 0x07, 0x47, 0x82, 0x6b, 0x29, 0x86, + 0x43, 0x90, 0x64, 0xbb, 0x69, 0xb5, 0xab, 0xde, 0xeb, 0xbc, 0x82, 0x57, 0x74, 0x19, 0x42, 0x57, + 0xf1, 0xf0, 0xb7, 0x68, 0x7f, 0x16, 0x3e, 0xe1, 0x4a, 0x33, 0xee, 0x03, 0x29, 0x1b, 0xb1, 0x0f, + 0x73, 0xb1, 0x7d, 0xba, 0x08, 0xa0, 0xcb, 0x1c, 0xfc, 0x31, 0xaa, 0x30, 0x5f, 0x87, 0x82, 0x93, + 0x8a, 0x61, 0xbf, 0xcc, 0xd9, 0x95, 0x77, 0x26, 0x4a, 0xf3, 0x6c, 0x8a, 0x93, 0xc0, 0x94, 0xe0, + 0x64, 0xe7, 0x29, 0x8e, 0x9a, 0x28, 0xcd, 0xb3, 0xf8, 0x12, 0x55, 0x25, 0x04, 0x4c, 0xf6, 0x43, + 0x1e, 0x90, 0x5d, 0x73, 0x63, 0x6f, 0xe6, 0x6f, 0x2c, 0x9d, 0xe9, 0xe2, 0x85, 0x29, 0x5c, 0x83, + 0x04, 0xee, 0xcf, 0x3d, 0x02, 0x9d, 0xb2, 0x69, 0x21, 0x84, 0xbf, 0x43, 0x3b, 0x12, 0x86, 0xe9, + 0x8c, 0x91, 0xea, 0xe6, 0x9a, 0xb5, 0x64, 0xd2, 0xd8, 0xa1, 0x19, 0x8f, 0x4e, 0x05, 0x70, 0x13, + 0x6d, 0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7, 0xff, 0xb2, 0x3c, 0xbc, 0x17, 0xb9, 0x4e, 0xf9, + 0x24, 0x65, 0xd0, 0x8c, 0xd8, 0xfa, 0xc3, 0x42, 0xb5, 0xb9, 0xe5, 0x82, 0xdf, 0xa0, 0xb2, 0x6f, + 0xda, 0xb6, 0x4c, 0xdb, 0x33, 0x52, 0xd6, 0x6c, 0x96, 0xc3, 0x23, 0x54, 0x1f, 0x32, 0xa5, 0xcf, + 0x7b, 0x0a, 0xe4, 0x18, 0xfa, 0xef, 0xb3, 0x1d, 0x67, 0xf3, 0x7a, 0xba, 0x20, 0x48, 0x97, 0x2c, + 0xbc, 0xf6, 0xdd, 0xa3, 0x5d, 0xba, 0x7f, 0xb4, 0x4b, 0x0f, 0x8f, 0x76, 0xe9, 0xe7, 0xc4, 0xb6, + 0xee, 0x12, 0xdb, 0xba, 0x4f, 0x6c, 0xeb, 0x21, 0xb1, 0xad, 0xbf, 0x12, 0xdb, 0xfa, 0xed, 0x6f, + 0xbb, 0xf4, 0xc3, 0xd6, 0xb8, 0xf3, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6b, 0xcb, 0x1e, 0x6e, + 0x6b, 0x07, 0x00, 0x00, } func (m *Event) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/events/v1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/events/v1/generated.proto index cfa16b021b64..04df31b0c1cf 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/events/v1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/events/v1/generated.proto @@ -27,7 +27,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/events/v1"; +option go_package = "v1"; // Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. // Events have a limited retention time and triggers and messages may evolve diff --git a/cluster-autoscaler/vendor/k8s.io/api/events/v1beta1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/events/v1beta1/generated.pb.go index 701127ff9454..d92411bc8ab2 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/events/v1beta1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/events/v1beta1/generated.pb.go @@ -139,56 +139,56 @@ func init() { } var fileDescriptor_4f97f691c32a5ac8 = []byte{ - // 779 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xcf, 0x6e, 0xdb, 0x46, - 0x10, 0xc6, 0xc5, 0xc4, 0x92, 0xad, 0x55, 0x12, 0xcb, 0x9b, 0x83, 0xd7, 0x2e, 0x40, 0x09, 0x0a, - 0x10, 0x08, 0x05, 0x4a, 0xd6, 0x41, 0x51, 0xf4, 0x56, 0x84, 0x91, 0x5b, 0x24, 0xb0, 0x1b, 0x60, - 0xe3, 0x53, 0xd1, 0x43, 0x56, 0xd4, 0x84, 0x66, 0x25, 0xee, 0x12, 0xbb, 0x2b, 0x01, 0xbe, 0xf5, - 0x52, 0xa0, 0xc7, 0x3e, 0x43, 0x6f, 0xbd, 0xf5, 0x31, 0x7c, 0xf4, 0xd1, 0x27, 0xa1, 0x66, 0x5f, - 0xa4, 0xe0, 0x72, 0x25, 0xca, 0xfa, 0x03, 0xab, 0xe8, 0x8d, 0x9c, 0xf9, 0xbe, 0xdf, 0xcc, 0x2e, - 0x47, 0x23, 0x14, 0x0c, 0xbf, 0x51, 0x5e, 0x2c, 0xfc, 0xe1, 0xb8, 0x0f, 0x92, 0x83, 0x06, 0xe5, - 0x4f, 0x80, 0x0f, 0x84, 0xf4, 0x6d, 0x82, 0xa5, 0xb1, 0x0f, 0x13, 0xe0, 0x5a, 0xf9, 0x93, 0x93, - 0x3e, 0x68, 0x76, 0xe2, 0x47, 0xc0, 0x41, 0x32, 0x0d, 0x03, 0x2f, 0x95, 0x42, 0x0b, 0x7c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f, 0x40, 0xd5, 0xd0, 0x9c, 0xdd, 0x31, 0x67, 0x9f, 0x9b, 0x8a, 0x13, 0x17, 0x39, 0x3c, - 0x46, 0xcd, 0x11, 0x53, 0xfa, 0x7d, 0x5f, 0x81, 0x9c, 0xc0, 0xe0, 0xff, 0xec, 0xc9, 0xf9, 0xd0, - 0x9e, 0x2d, 0x01, 0xe9, 0x4a, 0x89, 0xe0, 0xdb, 0xeb, 0x3b, 0xb7, 0x72, 0x73, 0xe7, 0x56, 0x6e, - 0xef, 0xdc, 0xca, 0x2f, 0x99, 0xeb, 0x5c, 0x67, 0xae, 0x73, 0x93, 0xb9, 0xce, 0x6d, 0xe6, 0x3a, - 0x7f, 0x67, 0xae, 0xf3, 0xfb, 0x3f, 0x6e, 0xe5, 0xc7, 0xa3, 0x8d, 0xff, 0xb0, 0xff, 0x06, 0x00, - 0x00, 0xff, 0xff, 0xae, 0x19, 0x45, 0xf5, 0x96, 0x07, 0x00, 0x00, + // 774 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xcd, 0x6e, 0xdb, 0x46, + 0x10, 0x16, 0x13, 0x4b, 0xb2, 0x56, 0x49, 0x2c, 0x6f, 0x0e, 0xde, 0xb8, 0x00, 0x25, 0x28, 0x40, + 0x20, 0x14, 0x08, 0x59, 0x07, 0x45, 0xd1, 0x6b, 0x18, 0xb9, 0x45, 0x02, 0xbb, 0x01, 0x36, 0x3e, + 0x15, 0x3d, 0x64, 0x45, 0x4d, 0x68, 0x56, 0xe2, 0x2e, 0xb1, 0xbb, 0x12, 0xe0, 0x5b, 0x2f, 0x05, + 0x7a, 0xec, 0x33, 0xf4, 0xd6, 0x5b, 0x1f, 0xc3, 0xc7, 0x1c, 0x7d, 0x12, 0x6a, 0xf6, 0x45, 0x0a, + 0x2e, 0x57, 0xa2, 0xac, 0x1f, 0x58, 0x45, 0x6f, 0xe2, 0xcc, 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 0x76, 0xa8, 0xbc, 0xdd, + 0x1a, 0xc9, 0xd9, 0xe6, 0x4c, 0xb5, 0xac, 0xf3, 0xfe, 0x3c, 0xb2, 0x74, 0xa4, 0x4e, 0x51, 0x35, + 0xd6, 0x90, 0x28, 0xf2, 0xa0, 0xf3, 0xb0, 0xd7, 0x7c, 0xd5, 0xb9, 0xef, 0x82, 0x04, 0x8f, 0xad, + 0x58, 0xf5, 0x6d, 0x4e, 0xa3, 0x05, 0xbb, 0xfb, 0xa7, 0x83, 0x9a, 0x4b, 0x17, 0x06, 0x3f, 0x47, + 0xd5, 0xd0, 0xf4, 0xee, 0x98, 0xde, 0x17, 0xa4, 0xa2, 0xe3, 0x22, 0x87, 0x27, 0xa8, 0x35, 0x66, + 0x4a, 0xbf, 0x1f, 0x28, 0x90, 0x53, 0x18, 0xfe, 0x9f, 0x3b, 0xb9, 0x58, 0xda, 0xb3, 0x15, 0x41, + 0xba, 0x66, 0x11, 0xbc, 0xbc, 0xbe, 0x75, 0x2b, 0x9f, 0x6f, 0xdd, 0xca, 0xcd, 0xad, 0x5b, 0xf9, + 0x25, 0x73, 0x9d, 0xeb, 0xcc, 0x75, 0x3e, 0x67, 0xae, 0x73, 0x93, 0xb9, 0xce, 0xdf, 0x99, 0xeb, + 0xfc, 0xfe, 0x8f, 0x5b, 0xf9, 0xb1, 0x6e, 0xdb, 0xfe, 0x37, 0x00, 0x00, 0xff, 0xff, 0xfc, 0xc9, + 0x09, 0x14, 0x84, 0x07, 0x00, 0x00, } func (m *Event) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/events/v1beta1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/events/v1beta1/generated.proto index de60bdc3e8c2..57e95b9648f6 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/events/v1beta1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/events/v1beta1/generated.proto @@ -27,7 +27,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/events/v1beta1"; +option go_package = "v1beta1"; // Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. // Events have a limited retention time and triggers and messages may evolve diff --git a/cluster-autoscaler/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go index db6b56bb26d9..20b3b2a00680 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/extensions/v1beta1/generated.pb.go @@ -1085,38 +1085,10 @@ func (m *NetworkPolicySpec) XXX_DiscardUnknown() { var xxx_messageInfo_NetworkPolicySpec proto.InternalMessageInfo -func (m *NetworkPolicyStatus) Reset() { *m = NetworkPolicyStatus{} } -func (*NetworkPolicyStatus) ProtoMessage() {} -func (*NetworkPolicyStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{37} -} -func (m *NetworkPolicyStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetworkPolicyStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NetworkPolicyStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkPolicyStatus.Merge(m, src) -} -func (m *NetworkPolicyStatus) XXX_Size() int { - return m.Size() -} -func (m *NetworkPolicyStatus) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkPolicyStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_NetworkPolicyStatus proto.InternalMessageInfo - func (m *PodSecurityPolicy) Reset() { *m = PodSecurityPolicy{} } func (*PodSecurityPolicy) ProtoMessage() {} func (*PodSecurityPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{38} + return fileDescriptor_cdc93917efc28165, []int{37} } func (m *PodSecurityPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1144,7 +1116,7 @@ var xxx_messageInfo_PodSecurityPolicy proto.InternalMessageInfo func (m *PodSecurityPolicyList) Reset() { *m = PodSecurityPolicyList{} } func (*PodSecurityPolicyList) ProtoMessage() {} func (*PodSecurityPolicyList) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{39} + return fileDescriptor_cdc93917efc28165, []int{38} } func (m *PodSecurityPolicyList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1172,7 +1144,7 @@ var xxx_messageInfo_PodSecurityPolicyList proto.InternalMessageInfo func (m *PodSecurityPolicySpec) Reset() { *m = PodSecurityPolicySpec{} } func (*PodSecurityPolicySpec) ProtoMessage() {} func (*PodSecurityPolicySpec) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{40} + return fileDescriptor_cdc93917efc28165, []int{39} } func (m *PodSecurityPolicySpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1200,7 +1172,7 @@ var xxx_messageInfo_PodSecurityPolicySpec proto.InternalMessageInfo func (m *ReplicaSet) Reset() { *m = ReplicaSet{} } func (*ReplicaSet) ProtoMessage() {} func (*ReplicaSet) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{41} + return fileDescriptor_cdc93917efc28165, []int{40} } func (m *ReplicaSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1228,7 +1200,7 @@ var xxx_messageInfo_ReplicaSet proto.InternalMessageInfo func (m *ReplicaSetCondition) Reset() { *m = ReplicaSetCondition{} } func (*ReplicaSetCondition) ProtoMessage() {} func (*ReplicaSetCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{42} + return fileDescriptor_cdc93917efc28165, []int{41} } func (m *ReplicaSetCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1256,7 +1228,7 @@ var xxx_messageInfo_ReplicaSetCondition proto.InternalMessageInfo func (m *ReplicaSetList) Reset() { *m = ReplicaSetList{} } func (*ReplicaSetList) ProtoMessage() {} func (*ReplicaSetList) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{43} + return fileDescriptor_cdc93917efc28165, []int{42} } func (m *ReplicaSetList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1284,7 +1256,7 @@ var xxx_messageInfo_ReplicaSetList proto.InternalMessageInfo func (m *ReplicaSetSpec) Reset() { *m = ReplicaSetSpec{} } func (*ReplicaSetSpec) ProtoMessage() {} func (*ReplicaSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{44} + return fileDescriptor_cdc93917efc28165, []int{43} } func (m *ReplicaSetSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1312,7 +1284,7 @@ var xxx_messageInfo_ReplicaSetSpec proto.InternalMessageInfo func (m *ReplicaSetStatus) Reset() { *m = ReplicaSetStatus{} } func (*ReplicaSetStatus) ProtoMessage() {} func (*ReplicaSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{45} + return fileDescriptor_cdc93917efc28165, []int{44} } func (m *ReplicaSetStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1340,7 +1312,7 @@ var xxx_messageInfo_ReplicaSetStatus proto.InternalMessageInfo func (m *RollbackConfig) Reset() { *m = RollbackConfig{} } func (*RollbackConfig) ProtoMessage() {} func (*RollbackConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{46} + return fileDescriptor_cdc93917efc28165, []int{45} } func (m *RollbackConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1368,7 +1340,7 @@ var xxx_messageInfo_RollbackConfig proto.InternalMessageInfo func (m *RollingUpdateDaemonSet) Reset() { *m = RollingUpdateDaemonSet{} } func (*RollingUpdateDaemonSet) ProtoMessage() {} func (*RollingUpdateDaemonSet) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{47} + return fileDescriptor_cdc93917efc28165, []int{46} } func (m *RollingUpdateDaemonSet) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1396,7 +1368,7 @@ var xxx_messageInfo_RollingUpdateDaemonSet proto.InternalMessageInfo func (m *RollingUpdateDeployment) Reset() { *m = RollingUpdateDeployment{} } func (*RollingUpdateDeployment) ProtoMessage() {} func (*RollingUpdateDeployment) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{48} + return fileDescriptor_cdc93917efc28165, []int{47} } func (m *RollingUpdateDeployment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1424,7 +1396,7 @@ var xxx_messageInfo_RollingUpdateDeployment proto.InternalMessageInfo func (m *RunAsGroupStrategyOptions) Reset() { *m = RunAsGroupStrategyOptions{} } func (*RunAsGroupStrategyOptions) ProtoMessage() {} func (*RunAsGroupStrategyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{49} + return fileDescriptor_cdc93917efc28165, []int{48} } func (m *RunAsGroupStrategyOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1452,7 +1424,7 @@ var xxx_messageInfo_RunAsGroupStrategyOptions proto.InternalMessageInfo func (m *RunAsUserStrategyOptions) Reset() { *m = RunAsUserStrategyOptions{} } func (*RunAsUserStrategyOptions) ProtoMessage() {} func (*RunAsUserStrategyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{50} + return fileDescriptor_cdc93917efc28165, []int{49} } func (m *RunAsUserStrategyOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1480,7 +1452,7 @@ var xxx_messageInfo_RunAsUserStrategyOptions proto.InternalMessageInfo func (m *RuntimeClassStrategyOptions) Reset() { *m = RuntimeClassStrategyOptions{} } func (*RuntimeClassStrategyOptions) ProtoMessage() {} func (*RuntimeClassStrategyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{51} + return fileDescriptor_cdc93917efc28165, []int{50} } func (m *RuntimeClassStrategyOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1508,7 +1480,7 @@ var xxx_messageInfo_RuntimeClassStrategyOptions proto.InternalMessageInfo func (m *SELinuxStrategyOptions) Reset() { *m = SELinuxStrategyOptions{} } func (*SELinuxStrategyOptions) ProtoMessage() {} func (*SELinuxStrategyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{52} + return fileDescriptor_cdc93917efc28165, []int{51} } func (m *SELinuxStrategyOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1536,7 +1508,7 @@ var xxx_messageInfo_SELinuxStrategyOptions proto.InternalMessageInfo func (m *Scale) Reset() { *m = Scale{} } func (*Scale) ProtoMessage() {} func (*Scale) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{53} + return fileDescriptor_cdc93917efc28165, []int{52} } func (m *Scale) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1564,7 +1536,7 @@ var xxx_messageInfo_Scale proto.InternalMessageInfo func (m *ScaleSpec) Reset() { *m = ScaleSpec{} } func (*ScaleSpec) ProtoMessage() {} func (*ScaleSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{54} + return fileDescriptor_cdc93917efc28165, []int{53} } func (m *ScaleSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1592,7 +1564,7 @@ var xxx_messageInfo_ScaleSpec proto.InternalMessageInfo func (m *ScaleStatus) Reset() { *m = ScaleStatus{} } func (*ScaleStatus) ProtoMessage() {} func (*ScaleStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{55} + return fileDescriptor_cdc93917efc28165, []int{54} } func (m *ScaleStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1620,7 +1592,7 @@ var xxx_messageInfo_ScaleStatus proto.InternalMessageInfo func (m *SupplementalGroupsStrategyOptions) Reset() { *m = SupplementalGroupsStrategyOptions{} } func (*SupplementalGroupsStrategyOptions) ProtoMessage() {} func (*SupplementalGroupsStrategyOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_cdc93917efc28165, []int{56} + return fileDescriptor_cdc93917efc28165, []int{55} } func (m *SupplementalGroupsStrategyOptions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1684,7 +1656,6 @@ func init() { proto.RegisterType((*NetworkPolicyPeer)(nil), "k8s.io.api.extensions.v1beta1.NetworkPolicyPeer") proto.RegisterType((*NetworkPolicyPort)(nil), "k8s.io.api.extensions.v1beta1.NetworkPolicyPort") proto.RegisterType((*NetworkPolicySpec)(nil), "k8s.io.api.extensions.v1beta1.NetworkPolicySpec") - proto.RegisterType((*NetworkPolicyStatus)(nil), "k8s.io.api.extensions.v1beta1.NetworkPolicyStatus") proto.RegisterType((*PodSecurityPolicy)(nil), "k8s.io.api.extensions.v1beta1.PodSecurityPolicy") proto.RegisterType((*PodSecurityPolicyList)(nil), "k8s.io.api.extensions.v1beta1.PodSecurityPolicyList") proto.RegisterType((*PodSecurityPolicySpec)(nil), "k8s.io.api.extensions.v1beta1.PodSecurityPolicySpec") @@ -1712,245 +1683,243 @@ func init() { } var fileDescriptor_cdc93917efc28165 = []byte{ - // 3797 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0x4d, 0x6c, 0x1c, 0xc9, - 0x75, 0x56, 0xcf, 0x0c, 0x39, 0xc3, 0x47, 0xf1, 0xaf, 0x48, 0x91, 0x63, 0xc9, 0xe2, 0xc8, 0xbd, - 0x88, 0xa2, 0xdd, 0x68, 0x67, 0x56, 0x5c, 0xad, 0xbc, 0x59, 0x21, 0xf6, 0x72, 0x48, 0x51, 0xa2, - 0xc3, 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0x94, 0xa8, 0x36, 0x71, - 0xf8, 0x76, 0x16, 0xa2, 0x5f, 0x4c, 0xdb, 0x3e, 0x05, 0x87, 0xb8, 0xe4, 0xcf, 0x0b, 0x30, 0xb5, - 0x43, 0x9c, 0xef, 0x9b, 0xf6, 0x71, 0xcb, 0xd4, 0x35, 0x75, 0x70, 0x05, 0x79, 0x00, 0x47, 0xf2, - 0xc0, 0x3b, 0x43, 0x76, 0x26, 0x62, 0x5d, 0x66, 0x36, 0xf8, 0x38, 0x96, 0x0d, 0x56, 0x46, 0x42, - 0xbd, 0x38, 0x27, 0xfc, 0x58, 0x82, 0xa5, 0x08, 0xff, 0x93, 0x20, 0xb0, 0xec, 0xc3, 0x98, 0x65, - 0xda, 0x8e, 0x57, 0x7f, 0x8c, 0x34, 0x19, 0x16, 0xbd, 0x43, 0x15, 0x08, 0x83, 0xc1, 0x2e, 0x1a, - 0xda, 0x82, 0x82, 0x63, 0x8a, 0x63, 0x30, 0x1a, 0x26, 0x21, 0x76, 0x13, 0x04, 0x66, 0x61, 0xcf, - 0xc4, 0x05, 0xc7, 0x94, 0xff, 0x49, 0x82, 0x6a, 0x84, 0x2b, 0x1c, 0x1a, 0x5f, 0xd3, 0x0c, 0x30, - 0x94, 0x0e, 0x6d, 0xb3, 0x77, 0xe9, 0x39, 0xf8, 0x9b, 0xbc, 0x61, 0x9b, 0x3d, 0xcc, 0xb1, 0xe4, - 0x9f, 0x48, 0x30, 0x17, 0xe1, 0xbc, 0x82, 0xb4, 0xf4, 0x51, 0x34, 0x2d, 0xdd, 0x1f, 0x65, 0x22, - 0x19, 0xc9, 0xe9, 0x27, 0x85, 0xd8, 0x34, 0xd8, 0x84, 0xd1, 0x21, 0x4c, 0x5a, 0x66, 0xa7, 0xfd, - 0x0a, 0xbe, 0x9d, 0xce, 0xb0, 0x72, 0xa1, 0x15, 0x60, 0xe1, 0x30, 0x30, 0x3a, 0x85, 0x39, 0x43, - 0xe9, 0x11, 0x6a, 0x29, 0x2a, 0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df, 0x83, 0xf9, 0x94, 0x14, 0x81, - 0xd4, 0xc8, 0xc3, 0x8a, 0x1b, 0x31, 0x1b, 0xf9, 0xb6, 0x21, 0xff, 0x17, 0xc2, 0x7f, 0x91, 0x60, - 0x8e, 0xef, 0x8e, 0xda, 0xb7, 0x35, 0x67, 0x70, 0x65, 0x79, 0xf9, 0x79, 0x24, 0x2f, 0x3f, 0x1c, - 0xb2, 0x25, 0x09, 0x0b, 0xb3, 0x72, 0xb3, 0xfc, 0x53, 0x09, 0x6e, 0x24, 0xb8, 0xaf, 0x20, 0x74, - 0xef, 0x47, 0x43, 0xf7, 0x3b, 0xa3, 0x4e, 0x28, 0x23, 0x7c, 0xff, 0xf7, 0x5c, 0xca, 0x74, 0xf8, - 0x29, 0x5d, 0x01, 0xb0, 0x6c, 0xed, 0x44, 0xd3, 0x49, 0x57, 0x34, 0x35, 0x54, 0x42, 0x2d, 0x6b, - 0x3e, 0x05, 0x87, 0xb8, 0x10, 0x85, 0xc5, 0x0e, 0x39, 0x54, 0xfa, 0xba, 0xb3, 0xda, 0xe9, 0xac, - 0x29, 0x96, 0x72, 0xa0, 0xe9, 0x9a, 0xa3, 0x89, 0xe7, 0x9f, 0x89, 0xe6, 0x63, 0xb7, 0xd9, 0x20, - 0x8d, 0xe3, 0xe5, 0x59, 0xed, 0x76, 0xda, 0xd7, 0x3e, 0x8f, 0x65, 0x80, 0x33, 0xa0, 0xd1, 0x00, - 0xaa, 0x36, 0xf9, 0x5e, 0x5f, 0xb3, 0x49, 0x67, 0xdd, 0x36, 0xad, 0x88, 0xda, 0x22, 0x57, 0xfb, - 0x5b, 0xe7, 0x67, 0xb5, 0x2a, 0xce, 0xe0, 0x19, 0xae, 0x38, 0x13, 0x1e, 0x7d, 0x06, 0xf3, 0x8a, - 0x68, 0x2e, 0x0c, 0x6b, 0x75, 0x4f, 0xe8, 0xfb, 0xe7, 0x67, 0xb5, 0xf9, 0xd5, 0x24, 0x79, 0xb8, - 0xc2, 0x34, 0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0x19, 0xb7, 0x45, - 0xce, 0xff, 0x5b, 0x88, 0xbd, 0x08, 0x15, 0xc7, 0xb8, 0x6f, 0x3e, 0x86, 0xa9, 0x88, 0xb2, 0x91, - 0x3a, 0xc8, 0xff, 0x56, 0x82, 0xaf, 0x0d, 0x7d, 0x48, 0x42, 0xcd, 0xc8, 0x21, 0xa9, 0xc7, 0x0e, - 0xc9, 0x72, 0x36, 0xc0, 0xeb, 0xeb, 0x44, 0x6c, 0xae, 0xbd, 0xf8, 0x62, 0xf9, 0xda, 0xcf, 0xbe, - 0x58, 0xbe, 0xf6, 0xf3, 0x2f, 0x96, 0xaf, 0xfd, 0xc1, 0xf9, 0xb2, 0xf4, 0xe2, 0x7c, 0x59, 0xfa, - 0xd9, 0xf9, 0xb2, 0xf4, 0xf3, 0xf3, 0x65, 0xe9, 0x3f, 0xce, 0x97, 0xa5, 0x3f, 0xf9, 0xc5, 0xf2, - 0xb5, 0x8f, 0x6f, 0x5f, 0xf8, 0x27, 0xff, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x9b, 0x34, 0xc8, - 0x81, 0x2b, 0x40, 0x00, 0x00, + // 3761 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0x4d, 0x6c, 0x1c, 0xc7, + 0x72, 0xd6, 0xec, 0x2e, 0xb9, 0xcb, 0xe2, 0x7f, 0x93, 0x22, 0xf7, 0x49, 0x4f, 0x5c, 0xbd, 0x31, + 0xa2, 0xc8, 0x8e, 0xb4, 0x6b, 0xc9, 0x92, 0x9e, 0x22, 0x21, 0xef, 0x99, 0x4b, 0x8a, 0x12, 0x5f, + 0xf8, 0xb3, 0xee, 0x25, 0x65, 0xc3, 0x88, 0x1d, 0x0f, 0x77, 0x9b, 0xcb, 0x11, 0x67, 0x67, 0xc6, + 0xd3, 0xb3, 0x34, 0x17, 0xc8, 0x21, 0x87, 0x5c, 0x0c,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, 0x09, 0x52, 0x6c, 0x6a, 0x8e, + 0x07, 0xc6, 0xa6, 0x36, 0x1c, 0x9e, 0xda, 0x76, 0x22, 0x17, 0x4e, 0x91, 0x66, 0x7e, 0xec, 0x98, + 0xbc, 0x78, 0xa0, 0xa8, 0x9a, 0xb2, 0xa3, 0x91, 0x72, 0x31, 0xec, 0xc7, 0x1b, 0x61, 0x32, 0x8e, + 0xf2, 0xa3, 0xc7, 0x30, 0xed, 0x0c, 0x6d, 0xeb, 0x8a, 0x07, 0x52, 0xe2, 0x20, 0x3f, 0x11, 0x20, + 0xd3, 0x1b, 0x51, 0x06, 0x1c, 0x97, 0x41, 0x0f, 0x60, 0xa2, 0x65, 0x68, 0x1a, 0xf7, 0xc7, 0x25, + 0xa3, 0xa7, 0xdb, 0xe5, 0x11, 0x8e, 0x82, 0xd8, 0x79, 0x5c, 0x0a, 0x51, 0x70, 0x84, 0x13, 0x11, + 0x80, 0x96, 0x9b, 0x70, 0x68, 0x19, 0x78, 0x7c, 0xbc, 0x95, 0x35, 0x06, 0x78, 0xa9, 0xca, 0xaf, + 0x01, 0xbc, 0x21, 0x8a, 0x03, 0xc0, 0xf2, 0x3f, 0x49, 0x30, 0x9f, 0x12, 0x3a, 0xd0, 0x2f, 0x43, + 0x29, 0xf6, 0x37, 0x22, 0x29, 0xf6, 0x72, 0x8a, 0x58, 0x20, 0xcf, 0xea, 0x30, 0x6e, 0xb1, 0x59, + 0xe9, 0x1d, 0x87, 0x45, 0xc4, 0xc8, 0xbb, 0x03, 0xa6, 0x81, 0x83, 0x32, 0x7e, 0xcc, 0x9f, 0x3e, + 0x3e, 0xaa, 0x8c, 0x87, 0x68, 0x38, 0x0c, 0x2f, 0xff, 0x59, 0x0e, 0x60, 0x99, 0x98, 0x9a, 0xd1, + 0xef, 0x12, 0xfd, 0x3c, 0x6a, 0xa8, 0xcd, 0x50, 0x0d, 0x75, 0x73, 0xd0, 0xf6, 0x78, 0xa6, 0xa5, + 0x16, 0x51, 0xef,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x98, 0x4b, 0x7e, 0x70, 0x40, 0x6f, 0x85, 0x96, 0xbc, 0x12, 0x59, 0xf2, 0xc9, 0x88, + 0x94, 0x58, 0xf0, 0x0f, 0x61, 0x42, 0x3c, 0x4b, 0x08, 0x18, 0xe1, 0xcc, 0x72, 0x52, 0x76, 0x12, + 0x10, 0x6e, 0x71, 0xcc, 0x8f, 0x49, 0x78, 0x0c, 0x47, 0xd0, 0xe4, 0x4f, 0x73, 0x30, 0xd4, 0x6c, + 0x29, 0x1a, 0x39, 0x87, 0xda, 0xf8, 0x57, 0xa1, 0xda, 0x78, 0xd0, 0x7f, 0x75, 0xe3, 0x56, 0xa5, + 0x96, 0xc5, 0x38, 0x52, 0x16, 0xbf, 0x91, 0x09, 0xed, 0xe4, 0x8a, 0xf8, 0x37, 0x61, 0xc4, 0x53, + 0x7a, 0xba, 0x44, 0x2d, 0xff, 0x79, 0x0e, 0x46, 0x03, 0x2a, 0x4e, 0x99, 0xe6, 0x77, 0x43, 0xb5, + 0x4d, 0x3e, 0xc3, 0x23, 0x50, 0x40, 0x57, 0xd5, 0xad, 0x66, 0x9c, 0x56, 0x6d, 0xbf, 0x39, 0x37, + 0x5e, 0xe4, 0xfc, 0x02, 0x26, 0x6c, 0xc5, 0xea, 0x10, 0xdb, 0xfb, 0x28, 0xe2, 0xb4, 0x92, 0x79, + 0xff, 0x67, 0x60, 0x2b, 0x44, 0xc5, 0x11, 0xee, 0x4b, 0x0f, 0x61, 0x3c, 0xa4, 0xec, 0x54, 0x9d, + 0xd6, 0x7f, 0x23, 0xc1, 0xcf, 0x06, 0x3e, 0x24, 0xa1, 0x7a, 0xe8, 0x90, 0x54, 0x23, 0x87, 0x64, + 0x21, 0x1d, 0xe0, 0xd5, 0x75, 0xec, 0xd5, 0x6f, 0x3e, 0xff, 0x6e, 0xe1, 0xc2, 0x37, 0xdf, 0x2d, + 0x5c, 0xf8, 0xf6, 0xbb, 0x85, 0x0b, 0xbf, 0x7f, 0xbc, 0x20, 0x3d, 0x3f, 0x5e, 0x90, 0xbe, 0x39, + 0x5e, 0x90, 0xbe, 0x3d, 0x5e, 0x90, 0xfe, 0xfd, 0x78, 0x41, 0xfa, 0xe3, 0xef, 0x17, 0x2e, 0xbc, + 0x5f, 0x14, 0x70, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0x2f, 0x9d, 0xa0, 0x1e, 0x3d, 0x3f, 0x00, + 0x00, } func (m *AllowedCSIDriver) Marshal() (dAtA []byte, err error) { @@ -3390,16 +3359,6 @@ func (m *NetworkPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a { size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -3748,43 +3707,6 @@ func (m *NetworkPolicySpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *NetworkPolicyStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NetworkPolicyStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NetworkPolicyStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Conditions) > 0 { - for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - func (m *PodSecurityPolicy) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -5410,8 +5332,6 @@ func (m *NetworkPolicy) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = m.Spec.Size() n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) return n } @@ -5544,21 +5464,6 @@ func (m *NetworkPolicySpec) Size() (n int) { return n } -func (m *NetworkPolicyStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Conditions) > 0 { - for _, e := range m.Conditions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - func (m *PodSecurityPolicy) Size() (n int) { if m == nil { return 0 @@ -6388,7 +6293,6 @@ func (this *NetworkPolicy) String() string { s := strings.Join([]string{`&NetworkPolicy{`, `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "NetworkPolicySpec", "NetworkPolicySpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "NetworkPolicyStatus", "NetworkPolicyStatus", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -6498,21 +6402,6 @@ func (this *NetworkPolicySpec) String() string { }, "") return s } -func (this *NetworkPolicyStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForConditions := "[]Condition{" - for _, f := range this.Conditions { - repeatedStringForConditions += fmt.Sprintf("%v", f) + "," - } - repeatedStringForConditions += "}" - s := strings.Join([]string{`&NetworkPolicyStatus{`, - `Conditions:` + repeatedStringForConditions + `,`, - `}`, - }, "") - return s -} func (this *PodSecurityPolicy) String() string { if this == nil { return "nil" @@ -11259,39 +11148,6 @@ func (m *NetworkPolicy) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -12146,90 +12002,6 @@ func (m *NetworkPolicySpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *NetworkPolicyStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NetworkPolicyStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NetworkPolicyStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Conditions = append(m.Conditions, v1.Condition{}) - if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *PodSecurityPolicy) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/cluster-autoscaler/vendor/k8s.io/api/extensions/v1beta1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/extensions/v1beta1/generated.proto index eaa63b59fa42..737a7e79c76c 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/extensions/v1beta1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/extensions/v1beta1/generated.proto @@ -28,7 +28,7 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/extensions/v1beta1"; +option go_package = "v1beta1"; // AllowedCSIDriver represents a single inline CSI Driver that is allowed to be used. message AllowedCSIDriver { @@ -664,11 +664,6 @@ message NetworkPolicy { // Specification of the desired behavior for this NetworkPolicy. // +optional optional NetworkPolicySpec spec = 2; - - // Status is the current state of the NetworkPolicy. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - optional NetworkPolicyStatus status = 3; } // DEPRECATED 1.9 - This group version of NetworkPolicyEgressRule is deprecated by networking/v1/NetworkPolicyEgressRule. @@ -818,18 +813,6 @@ message NetworkPolicySpec { repeated string policyTypes = 4; } -// NetworkPolicyStatus describe the current state of the NetworkPolicy. -message NetworkPolicyStatus { - // Conditions holds an array of metav1.Condition that describe the state of the NetworkPolicy. - // Current service state - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - // +listType=map - // +listMapKey=type - repeated k8s.io.apimachinery.pkg.apis.meta.v1.Condition conditions = 1; -} - // PodSecurityPolicy governs the ability to make requests that affect the Security Context // that will be applied to a pod and container. // Deprecated: use PodSecurityPolicy from policy API Group instead. diff --git a/cluster-autoscaler/vendor/k8s.io/api/extensions/v1beta1/types.go b/cluster-autoscaler/vendor/k8s.io/api/extensions/v1beta1/types.go index c63cf0d6713a..963318a2fe1f 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/extensions/v1beta1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/api/extensions/v1beta1/types.go @@ -1376,11 +1376,6 @@ type NetworkPolicy struct { // Specification of the desired behavior for this NetworkPolicy. // +optional Spec NetworkPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - - // Status is the current state of the NetworkPolicy. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Status NetworkPolicyStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } // DEPRECATED 1.9 - This group version of PolicyType is deprecated by networking/v1/PolicyType. @@ -1545,48 +1540,6 @@ type NetworkPolicyPeer struct { IPBlock *IPBlock `json:"ipBlock,omitempty" protobuf:"bytes,3,rep,name=ipBlock"` } -// NetworkPolicyConditionType is the type for status conditions on -// a NetworkPolicy. This type should be used with the -// NetworkPolicyStatus.Conditions field. -type NetworkPolicyConditionType string - -const ( - // NetworkPolicyConditionStatusAccepted represents status of a Network Policy that could be properly parsed by - // the Network Policy provider and will be implemented in the cluster - NetworkPolicyConditionStatusAccepted NetworkPolicyConditionType = "Accepted" - - // NetworkPolicyConditionStatusPartialFailure represents status of a Network Policy that could be partially - // parsed by the Network Policy provider and may not be completely implemented due to a lack of a feature or some - // other condition - NetworkPolicyConditionStatusPartialFailure NetworkPolicyConditionType = "PartialFailure" - - // NetworkPolicyConditionStatusFailure represents status of a Network Policy that could not be parsed by the - // Network Policy provider and will not be implemented in the cluster - NetworkPolicyConditionStatusFailure NetworkPolicyConditionType = "Failure" -) - -// NetworkPolicyConditionReason defines the set of reasons that explain why a -// particular NetworkPolicy condition type has been raised. -type NetworkPolicyConditionReason string - -const ( - // NetworkPolicyConditionReasonFeatureNotSupported represents a reason where the Network Policy may not have been - // implemented in the cluster due to a lack of some feature not supported by the Network Policy provider - NetworkPolicyConditionReasonFeatureNotSupported NetworkPolicyConditionReason = "FeatureNotSupported" -) - -// NetworkPolicyStatus describe the current state of the NetworkPolicy. -type NetworkPolicyStatus struct { - // Conditions holds an array of metav1.Condition that describe the state of the NetworkPolicy. - // Current service state - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - // +listType=map - // +listMapKey=type - Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` -} - // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.3 // +k8s:prerelease-lifecycle-gen:deprecated=1.9 diff --git a/cluster-autoscaler/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go b/cluster-autoscaler/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go index cf924b5897c2..d70303fa8c46 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go +++ b/cluster-autoscaler/vendor/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go @@ -365,7 +365,6 @@ var map_NetworkPolicy = map[string]string{ "": "DEPRECATED 1.9 - This group version of NetworkPolicy is deprecated by networking/v1/NetworkPolicy. NetworkPolicy describes what network traffic is allowed for a set of Pods", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "spec": "Specification of the desired behavior for this NetworkPolicy.", - "status": "Status is the current state of the NetworkPolicy. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (NetworkPolicy) SwaggerDoc() map[string]string { @@ -436,15 +435,6 @@ func (NetworkPolicySpec) SwaggerDoc() map[string]string { return map_NetworkPolicySpec } -var map_NetworkPolicyStatus = map[string]string{ - "": "NetworkPolicyStatus describe the current state of the NetworkPolicy.", - "conditions": "Conditions holds an array of metav1.Condition that describe the state of the NetworkPolicy. Current service state", -} - -func (NetworkPolicyStatus) SwaggerDoc() map[string]string { - return map_NetworkPolicyStatus -} - var map_PodSecurityPolicy = map[string]string{ "": "PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated: use PodSecurityPolicy from policy API Group instead.", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", diff --git a/cluster-autoscaler/vendor/k8s.io/api/extensions/v1beta1/zz_generated.deepcopy.go b/cluster-autoscaler/vendor/k8s.io/api/extensions/v1beta1/zz_generated.deepcopy.go index 9c1c8421c310..e0961588e067 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/extensions/v1beta1/zz_generated.deepcopy.go +++ b/cluster-autoscaler/vendor/k8s.io/api/extensions/v1beta1/zz_generated.deepcopy.go @@ -759,7 +759,6 @@ func (in *NetworkPolicy) DeepCopyInto(out *NetworkPolicy) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) return } @@ -972,29 +971,6 @@ func (in *NetworkPolicySpec) DeepCopy() *NetworkPolicySpec { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NetworkPolicyStatus) DeepCopyInto(out *NetworkPolicyStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyStatus. -func (in *NetworkPolicyStatus) DeepCopy() *NetworkPolicyStatus { - if in == nil { - return nil - } - out := new(NetworkPolicyStatus) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PodSecurityPolicy) DeepCopyInto(out *PodSecurityPolicy) { *out = *in diff --git a/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1alpha1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1alpha1/generated.pb.go index a45e23e236a2..7f0687ac043c 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1alpha1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1alpha1/generated.pb.go @@ -689,102 +689,101 @@ func init() { } var fileDescriptor_45ba024d525b289b = []byte{ - // 1505 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4b, 0x6f, 0xdb, 0xc6, - 0x16, 0x36, 0x65, 0xc9, 0xb6, 0xc6, 0xcf, 0x8c, 0x13, 0x58, 0x70, 0x00, 0xc9, 0xe1, 0x05, 0x6e, - 0x72, 0x6f, 0x12, 0x32, 0xce, 0x4d, 0x72, 0x53, 0x04, 0x45, 0x60, 0x3a, 0x69, 0x5e, 0xb6, 0x6b, - 0x8f, 0x92, 0x14, 0x0d, 0x52, 0x20, 0x34, 0x35, 0x96, 0x26, 0x96, 0x48, 0x76, 0x86, 0x54, 0xea, - 0x22, 0x8b, 0x02, 0xfd, 0x03, 0xfd, 0x01, 0x59, 0x76, 0xd1, 0x75, 0x7f, 0x41, 0x97, 0x46, 0xd1, - 0x45, 0x96, 0x59, 0x09, 0xb1, 0xba, 0x2d, 0xba, 0x6e, 0xb3, 0x2a, 0x66, 0x38, 0x24, 0x45, 0xbd, - 0xa8, 0xd4, 0x40, 0x56, 0xdd, 0x89, 0xe7, 0x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, 0x29, 0x47, 0x91, - 0x05, 0xbc, 0x05, 0x16, 0x84, 0xdf, 0x06, 0xb6, 0xab, 0x5e, 0x4d, 0x14, 0x4b, 0x4c, 0x73, 0x2e, - 0x7e, 0x14, 0x76, 0xba, 0xf4, 0xa8, 0xc7, 0x43, 0xfd, 0x53, 0x01, 0xf0, 0xef, 0xbc, 0xf7, 0xe7, - 0x41, 0xde, 0x74, 0x89, 0xa0, 0x7d, 0xc1, 0x14, 0xe4, 0x8d, 0xd9, 0x76, 0xab, 0x94, 0x5f, 0xdb, - 0xbe, 0x17, 0x08, 0x51, 0xac, 0xe7, 0xc6, 0xe1, 0x43, 0x18, 0x3c, 0x78, 0xd2, 0x38, 0x0c, 0xcc, - 0x50, 0xac, 0x87, 0xd7, 0xc1, 0x8c, 0x55, 0xf7, 0x99, 0x87, 0x69, 0xd9, 0x72, 0x5c, 0x2c, 0xb6, - 0xc6, 0x94, 0x71, 0x52, 0xe6, 0x34, 0xb3, 0xde, 0xa1, 0x43, 0x09, 0x4b, 0xa8, 0x01, 0xc0, 0x5b, - 0x9e, 0xb9, 0x26, 0x8f, 0x93, 0x13, 0x71, 0xe6, 0xf8, 0x85, 0x6d, 0x45, 0x52, 0xd4, 0x61, 0xa1, - 0x3e, 0x07, 0xa7, 0xca, 0x98, 0x36, 0x89, 0x85, 0xd7, 0x2c, 0xcb, 0xf1, 0x6d, 0x2f, 0x24, 0xb0, - 0x3a, 0xc8, 0x47, 0x66, 0x72, 0x2a, 0x4e, 0xc8, 0xf8, 0xf9, 0x08, 0x0b, 0xc5, 0x36, 0xd1, 0x18, - 0x66, 0x06, 0x8e, 0xe1, 0xcf, 0x19, 0x30, 0x19, 0xc3, 0x67, 0xf7, 0x89, 0x5d, 0x91, 0xc8, 0xa7, - 0x43, 0xeb, 0x07, 0xc4, 0xae, 0xbc, 0x6b, 0x95, 0xa6, 0xa5, 0x19, 0xff, 0x44, 0xc2, 0x10, 0xde, - 0x07, 0x59, 0x9f, 0x61, 0x2a, 0x07, 0xec, 0x42, 0x6a, 0x37, 0x3f, 0x62, 0x98, 0x86, 0x0c, 0x68, - 0x8a, 0x43, 0x73, 0x01, 0x12, 0x18, 0x70, 0x0b, 0xe4, 0xaa, 0xfc, 0x56, 0xe4, 0xe6, 0xbf, 0x98, - 0x0a, 0xd6, 0x49, 0xed, 0x83, 0x46, 0x10, 0x12, 0x14, 0xc0, 0x40, 0x0a, 0xe6, 0x58, 0xa2, 0x88, - 0xe2, 0xc2, 0x46, 0x61, 0x34, 0x7d, 0x6b, 0x6f, 0xc0, 0x76, 0xab, 0x34, 0x97, 0x54, 0xa1, 0xae, - 0x08, 0xaa, 0x0e, 0xa6, 0x3b, 0x52, 0x4c, 0x5f, 0x82, 0xc6, 0xed, 0xc3, 0xa3, 0xe2, 0xd8, 0xeb, - 0xa3, 0xe2, 0xd8, 0x9b, 0xa3, 0xe2, 0xd8, 0x37, 0xed, 0xa2, 0x72, 0xd8, 0x2e, 0x2a, 0xaf, 0xdb, - 0x45, 0xe5, 0x4d, 0xbb, 0xa8, 0xbc, 0x6d, 0x17, 0x95, 0xef, 0x7e, 0x2d, 0x8e, 0x3d, 0x29, 0xa5, - 0xfc, 0xb7, 0xef, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x48, 0x84, 0x5f, 0xef, 0x28, 0x14, 0x00, - 0x00, + // 1502 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0x4d, 0x6f, 0xdb, 0x46, + 0x13, 0x36, 0x65, 0xc9, 0xb6, 0xc6, 0x9f, 0x59, 0x27, 0xb0, 0xe0, 0x00, 0x92, 0xc3, 0x17, 0x78, + 0x93, 0xf7, 0x4d, 0x42, 0xc6, 0x69, 0x92, 0xa6, 0x08, 0x8a, 0xc0, 0x74, 0xda, 0x7c, 0xd9, 0xae, + 0xbd, 0x4e, 0x52, 0x34, 0x48, 0x81, 0xd0, 0xd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, 0x6c, 0xdd, 0x08, 0x0d, 0xc7, 0x58, 0xc8, 0x85, 0x69, 0x4f, 0x9e, 0x41, + 0x04, 0x95, 0xdb, 0xf7, 0x83, 0x81, 0xe0, 0xdd, 0xf5, 0x49, 0xca, 0x8b, 0xdb, 0x11, 0x71, 0x3a, + 0x00, 0x7a, 0x01, 0x73, 0x6d, 0x89, 0x87, 0x41, 0x47, 0x45, 0xd0, 0x6b, 0x03, 0x83, 0xf6, 0xbc, + 0x17, 0xa3, 0x20, 0xe3, 0xce, 0x6d, 0x74, 0xe0, 0xe2, 0xae, 0x48, 0xea, 0xaf, 0x19, 0x38, 0x62, + 0x21, 0xbf, 0x07, 0x82, 0x65, 0xa6, 0x08, 0xd6, 0xcd, 0x63, 0x3c, 0x35, 0x7d, 0x09, 0x17, 0xed, + 0x20, 0x5c, 0x2b, 0xc7, 0x09, 0x72, 0x34, 0x01, 0xfb, 0x33, 0x03, 0xff, 0xe9, 0xef, 0x9c, 0x10, + 0xb2, 0xfb, 0xa9, 0xcd, 0xf6, 0x61, 0xc7, 0x66, 0x3b, 0x3b, 0x04, 0xc4, 0xbf, 0x04, 0xad, 0x83, + 0xa0, 0xbd, 0x51, 0xa0, 0xd8, 0xbf, 0x6e, 0xef, 0x81, 0xb0, 0x3d, 0x4d, 0x13, 0xb6, 0x1b, 0xc7, + 0xe8, 0xb2, 0x3e, 0x04, 0xee, 0xf6, 0x51, 0xcd, 0x15, 0x33, 0xad, 0x21, 0x9e, 0xda, 0x83, 0x23, + 0x6b, 0x25, 0x98, 0xe1, 0x80, 0xbf, 0x0c, 0x29, 0xef, 0x4f, 0x6c, 0x73, 0xa7, 0x46, 0xea, 0xc4, + 0xf6, 0x65, 0x47, 0x52, 0x18, 0xaf, 0x85, 0x4f, 0xa4, 0x9c, 0x6b, 0x63, 0xb8, 0x97, 0xe9, 0xa8, + 0x27, 0x35, 0x7c, 0x8e, 0xa5, 0x19, 0x8e, 0xf0, 0xd5, 0x97, 0x0a, 0x2c,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, 0xe4, 0x54, 0x9c, 0x90, 0xf1, 0xf3, 0x31, 0x16, 0x4e, 0x6c, 0xe2, 0x31, 0xcc, + 0xf4, 0x1d, 0xc3, 0x5f, 0x32, 0x30, 0x9e, 0xc0, 0x67, 0xf7, 0xa8, 0x5d, 0x96, 0xc8, 0xa7, 0x23, + 0xeb, 0xfb, 0xd4, 0x2e, 0xbf, 0x6d, 0x96, 0x26, 0xa5, 0x19, 0xff, 0xc4, 0xc2, 0x10, 0xdd, 0x83, + 0x6c, 0xc0, 0x88, 0x27, 0x07, 0xec, 0xc2, 0xc0, 0x6e, 0x7e, 0xc8, 0x88, 0x17, 0x31, 0xa0, 0x09, + 0x0e, 0xcd, 0x05, 0x58, 0x60, 0xa0, 0x0d, 0xc8, 0x55, 0xf8, 0xad, 0xc8, 0xcd, 0x7f, 0x71, 0x20, + 0x58, 0x3b, 0xb5, 0x0f, 0x1b, 0x41, 0x48, 0x70, 0x08, 0x83, 0x3c, 0x98, 0x61, 0xa9, 0x22, 0x8a, + 0x0b, 0x1b, 0x86, 0xd1, 0xf4, 0xac, 0xbd, 0x81, 0x5a, 0xcd, 0xd2, 0x4c, 0x5a, 0x85, 0x3b, 0x22, + 0xa8, 0x3a, 0x4c, 0xb6, 0xa5, 0x38, 0x78, 0x09, 0x1a, 0xda, 0xc1, 0x61, 0x71, 0xe4, 0xd5, 0x61, + 0x71, 0xe4, 0xf5, 0x61, 0x71, 0xe4, 0xdb, 0x56, 0x51, 0x39, 0x68, 0x15, 0x95, 0x57, 0xad, 0xa2, + 0xf2, 0xba, 0x55, 0x54, 0xde, 0xb4, 0x8a, 0xca, 0xf7, 0xbf, 0x15, 0x47, 0x1e, 0x4f, 0x44, 0x47, + 0xfb, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xe7, 0xb3, 0x17, 0x48, 0x11, 0x14, 0x00, 0x00, } func (m *FlowDistinguisherMethod) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1alpha1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1alpha1/generated.proto index 347c9d3fa01c..6c0cf9342002 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1alpha1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1alpha1/generated.proto @@ -26,7 +26,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/flowcontrol/v1alpha1"; +option go_package = "v1alpha1"; // FlowDistinguisherMethod specifies the method of a flow distinguisher. message FlowDistinguisherMethod { diff --git a/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1alpha1/types.go b/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1alpha1/types.go index 5af677e2f53d..99b609494b9e 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1alpha1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1alpha1/types.go @@ -63,7 +63,7 @@ const ( // +k8s:prerelease-lifecycle-gen:introduced=1.18 // +k8s:prerelease-lifecycle-gen:deprecated=1.20 // +k8s:prerelease-lifecycle-gen:removed=1.21 -// +k8s:prerelease-lifecycle-gen:replacement=flowcontrol.apiserver.k8s.io,v1beta2,FlowSchema +// +k8s:prerelease-lifecycle-gen:replacement=flowcontrol.apiserver.k8s.io,v1beta1,FlowSchema // FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with // similar attributes and is identified by a pair of strings: the name of the FlowSchema and a "flow distinguisher". @@ -87,7 +87,7 @@ type FlowSchema struct { // +k8s:prerelease-lifecycle-gen:introduced=1.18 // +k8s:prerelease-lifecycle-gen:deprecated=1.20 // +k8s:prerelease-lifecycle-gen:removed=1.21 -// +k8s:prerelease-lifecycle-gen:replacement=flowcontrol.apiserver.k8s.io,v1beta2,FlowSchemaList +// +k8s:prerelease-lifecycle-gen:replacement=flowcontrol.apiserver.k8s.io,v1beta1,FlowSchemaList // FlowSchemaList is a list of FlowSchema objects. type FlowSchemaList struct { @@ -344,7 +344,7 @@ type FlowSchemaConditionType string // +k8s:prerelease-lifecycle-gen:introduced=1.18 // +k8s:prerelease-lifecycle-gen:deprecated=1.20 // +k8s:prerelease-lifecycle-gen:removed=1.21 -// +k8s:prerelease-lifecycle-gen:replacement=flowcontrol.apiserver.k8s.io,v1beta2,PriorityLevelConfiguration +// +k8s:prerelease-lifecycle-gen:replacement=flowcontrol.apiserver.k8s.io,v1beta1,PriorityLevelConfiguration // PriorityLevelConfiguration represents the configuration of a priority level. type PriorityLevelConfiguration struct { @@ -367,7 +367,7 @@ type PriorityLevelConfiguration struct { // +k8s:prerelease-lifecycle-gen:introduced=1.18 // +k8s:prerelease-lifecycle-gen:deprecated=1.20 // +k8s:prerelease-lifecycle-gen:removed=1.21 -// +k8s:prerelease-lifecycle-gen:replacement=flowcontrol.apiserver.k8s.io,v1beta2,PriorityLevelConfigurationList +// +k8s:prerelease-lifecycle-gen:replacement=flowcontrol.apiserver.k8s.io,v1beta1,PriorityLevelConfigurationList // PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects. type PriorityLevelConfigurationList struct { diff --git a/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1alpha1/zz_generated.prerelease-lifecycle.go b/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1alpha1/zz_generated.prerelease-lifecycle.go index 2260141609c7..a248aec4521a 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1alpha1/zz_generated.prerelease-lifecycle.go +++ b/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1alpha1/zz_generated.prerelease-lifecycle.go @@ -40,7 +40,7 @@ func (in *FlowSchema) APILifecycleDeprecated() (major, minor int) { // APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. // It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. func (in *FlowSchema) APILifecycleReplacement() schema.GroupVersionKind { - return schema.GroupVersionKind{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta2", Kind: "FlowSchema"} + return schema.GroupVersionKind{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta1", Kind: "FlowSchema"} } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. @@ -64,7 +64,7 @@ func (in *FlowSchemaList) APILifecycleDeprecated() (major, minor int) { // APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. // It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. func (in *FlowSchemaList) APILifecycleReplacement() schema.GroupVersionKind { - return schema.GroupVersionKind{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta2", Kind: "FlowSchemaList"} + return schema.GroupVersionKind{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta1", Kind: "FlowSchemaList"} } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. @@ -88,7 +88,7 @@ func (in *PriorityLevelConfiguration) APILifecycleDeprecated() (major, minor int // APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. // It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. func (in *PriorityLevelConfiguration) APILifecycleReplacement() schema.GroupVersionKind { - return schema.GroupVersionKind{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta2", Kind: "PriorityLevelConfiguration"} + return schema.GroupVersionKind{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta1", Kind: "PriorityLevelConfiguration"} } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. @@ -112,7 +112,7 @@ func (in *PriorityLevelConfigurationList) APILifecycleDeprecated() (major, minor // APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. // It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. func (in *PriorityLevelConfigurationList) APILifecycleReplacement() schema.GroupVersionKind { - return schema.GroupVersionKind{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta2", Kind: "PriorityLevelConfigurationList"} + return schema.GroupVersionKind{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta1", Kind: "PriorityLevelConfigurationList"} } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. diff --git a/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1beta1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1beta1/generated.pb.go index e1d17b5b802a..cb06fe5e77bc 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1beta1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1beta1/generated.pb.go @@ -689,101 +689,101 @@ func init() { } var fileDescriptor_80171c2a4e3669de = []byte{ - // 1496 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcb, 0x73, 0xdb, 0x44, + // 1494 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0xcb, 0x73, 0xdb, 0x44, 0x18, 0x8f, 0x1c, 0x3b, 0x89, 0xbf, 0x3c, 0xbb, 0x69, 0x27, 0x9e, 0x74, 0xc6, 0x4e, 0xc5, 0x0c, 0x05, 0xda, 0xca, 0x6d, 0x69, 0x69, 0x81, 0xe1, 0x11, 0xa5, 0x50, 0x4a, 0x93, 0x34, 0xdd, 0xb4, 0xc0, 0x94, 0xce, 0x50, 0x59, 0xde, 0xd8, 0x6a, 0x6c, 0x49, 0xd5, 0xae, 0x9c, 0x09, 0xbd, 0x30, 0xfc, 0x05, 0x9c, 0xe1, 0xc8, 0x81, 0x3b, 0xff, 0x00, 0x47, 0x3a, 0x9c, 0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9b, 0x1a, 0x75, 0xc7, 0x69, 0x58, 0xe6, 0x21, + 0xe6, 0x2e, 0x9f, 0x5b, 0xac, 0xbe, 0xeb, 0x8b, 0x59, 0x45, 0xe3, 0xb3, 0x16, 0x2a, 0x1c, 0x80, + 0xaa, 0x0f, 0x61, 0xa9, 0x77, 0x68, 0xa0, 0x1a, 0x80, 0x19, 0xde, 0x53, 0x5a, 0x50, 0x44, 0xd8, + 0x37, 0xc7, 0x67, 0x55, 0x74, 0xc7, 0xe3, 0x79, 0x19, 0x89, 0x28, 0xee, 0x82, 0x56, 0xcf, 0xc2, + 0xdc, 0x55, 0xcf, 0xf1, 0x5d, 0x99, 0x23, 0x5a, 0x83, 0xac, 0x6d, 0x34, 0xc3, 0xe9, 0x13, 0x4d, + 0xc4, 0x6d, 0xa3, 0x49, 0xb0, 0xd0, 0xa8, 0x3f, 0x2a, 0x30, 0xbf, 0x69, 0x35, 0x2d, 0x86, 0x09, + 0x75, 0x1d, 0x9b, 0x12, 0x74, 0x31, 0x31, 0xb1, 0x4e, 0xf4, 0x4c, 0xac, 0x23, 0x09, 0xe3, 0xae, + 0x59, 0xf5, 0x25, 0x4c, 0x3f, 0xf0, 0x89, 0x6f, 0xd9, 0x35, 0x39, 0xaf, 0x2f, 0xa4, 0x15, 0x78, + 0x33, 0x30, 0x4f, 0xb0, 0x4d, 0x9f, 0xe5, 0x23, 0x40, 0x6a, 0x70, 0x88, 0xa8, 0xfe, 0xad, 0xc0, + 0x09, 0x11, 0x98, 0x54, 0x87, 0xb3, 0x18, 0xdd, 0x85, 0x82, 0x41, 0xa9, 0xef, 0x91, 0xea, 0x86, + 0x63, 0x9b, 0xbe, 0xc7, 0xf9, 0x7f, 0xb8, 0x5b, 0x37, 0x3c, 0x42, 0x45, 0x35, 0x39, 0x7d, 0x4d, + 0x56, 0x53, 0x58, 0x1f, 0x62, 0x87, 0x87, 0x22, 0xa0, 0xfb, 0x30, 0xdf, 0xe8, 0xae, 0x5d, 0x96, + 0x79,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1, 0x38, 0xae, 0x31, 0x36, 0x99, 0x81, 0x8d, 0xd7, 0x51, 0xa7, + 0x5d, 0x5a, 0x48, 0xaa, 0x70, 0x4f, 0x00, 0xb5, 0x0c, 0xb3, 0x5d, 0x05, 0xa6, 0xcf, 0x3f, 0xfd, + 0xcc, 0xa3, 0xa7, 0xc5, 0x89, 0xc7, 0x4f, 0x8b, 0x13, 0x4f, 0x9e, 0x16, 0x27, 0xbe, 0xe9, 0x14, + 0x95, 0x47, 0x9d, 0xa2, 0xf2, 0xb8, 0x53, 0x54, 0x9e, 0x74, 0x8a, 0xca, 0x1f, 0x9d, 0xa2, 0xf2, + 0xdd, 0x9f, 0xc5, 0x89, 0x3b, 0xd3, 0x32, 0xb3, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x3c, 0xd4, + 0x36, 0xaf, 0xfa, 0x13, 0x00, 0x00, } func (m *FlowDistinguisherMethod) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1beta1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1beta1/generated.proto index 474d520df749..309d397ff2c3 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1beta1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1beta1/generated.proto @@ -26,7 +26,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/flowcontrol/v1beta1"; +option go_package = "v1beta1"; // FlowDistinguisherMethod specifies the method of a flow distinguisher. message FlowDistinguisherMethod { diff --git a/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1beta1/types.go b/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1beta1/types.go index b45732642983..767a32e7f517 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1beta1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1beta1/types.go @@ -105,7 +105,6 @@ const ( // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.20 -// +k8s:prerelease-lifecycle-gen:replacement=flowcontrol.apiserver.k8s.io,v1beta2,FlowSchema // FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with // similar attributes and is identified by a pair of strings: the name of the FlowSchema and a "flow distinguisher". @@ -127,7 +126,6 @@ type FlowSchema struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.20 -// +k8s:prerelease-lifecycle-gen:replacement=flowcontrol.apiserver.k8s.io,v1beta2,FlowSchemaList // FlowSchemaList is a list of FlowSchema objects. type FlowSchemaList struct { @@ -382,7 +380,6 @@ type FlowSchemaConditionType string // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.20 -// +k8s:prerelease-lifecycle-gen:replacement=flowcontrol.apiserver.k8s.io,v1beta2,PriorityLevelConfiguration // PriorityLevelConfiguration represents the configuration of a priority level. type PriorityLevelConfiguration struct { @@ -403,7 +400,6 @@ type PriorityLevelConfiguration struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.20 -// +k8s:prerelease-lifecycle-gen:replacement=flowcontrol.apiserver.k8s.io,v1beta2,PriorityLevelConfigurationList // PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects. type PriorityLevelConfigurationList struct { diff --git a/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1beta1/zz_generated.prerelease-lifecycle.go b/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1beta1/zz_generated.prerelease-lifecycle.go index ed1e16c26a5f..f02fcdccdc89 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1beta1/zz_generated.prerelease-lifecycle.go +++ b/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1beta1/zz_generated.prerelease-lifecycle.go @@ -21,10 +21,6 @@ limitations under the License. package v1beta1 -import ( - schema "k8s.io/apimachinery/pkg/runtime/schema" -) - // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *FlowSchema) APILifecycleIntroduced() (major, minor int) { @@ -37,12 +33,6 @@ func (in *FlowSchema) APILifecycleDeprecated() (major, minor int) { return 1, 23 } -// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. -// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. -func (in *FlowSchema) APILifecycleReplacement() schema.GroupVersionKind { - return schema.GroupVersionKind{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta2", Kind: "FlowSchema"} -} - // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *FlowSchema) APILifecycleRemoved() (major, minor int) { @@ -61,12 +51,6 @@ func (in *FlowSchemaList) APILifecycleDeprecated() (major, minor int) { return 1, 23 } -// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. -// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. -func (in *FlowSchemaList) APILifecycleReplacement() schema.GroupVersionKind { - return schema.GroupVersionKind{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta2", Kind: "FlowSchemaList"} -} - // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *FlowSchemaList) APILifecycleRemoved() (major, minor int) { @@ -85,12 +69,6 @@ func (in *PriorityLevelConfiguration) APILifecycleDeprecated() (major, minor int return 1, 23 } -// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. -// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. -func (in *PriorityLevelConfiguration) APILifecycleReplacement() schema.GroupVersionKind { - return schema.GroupVersionKind{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta2", Kind: "PriorityLevelConfiguration"} -} - // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *PriorityLevelConfiguration) APILifecycleRemoved() (major, minor int) { @@ -109,12 +87,6 @@ func (in *PriorityLevelConfigurationList) APILifecycleDeprecated() (major, minor return 1, 23 } -// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. -// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. -func (in *PriorityLevelConfigurationList) APILifecycleReplacement() schema.GroupVersionKind { - return schema.GroupVersionKind{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta2", Kind: "PriorityLevelConfigurationList"} -} - // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *PriorityLevelConfigurationList) APILifecycleRemoved() (major, minor int) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1beta2/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1beta2/generated.pb.go index af42d24fb31d..fe550271b183 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1beta2/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1beta2/generated.pb.go @@ -689,101 +689,101 @@ func init() { } var fileDescriptor_ed300aa8e672704e = []byte{ - // 1497 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcb, 0x73, 0xdb, 0x44, + // 1495 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0xcb, 0x73, 0xdb, 0x44, 0x18, 0x8f, 0x1c, 0x3b, 0x89, 0xbf, 0x3c, 0xbb, 0x69, 0x27, 0x9e, 0x74, 0xc6, 0x4e, 0xc5, 0x0c, 0x05, 0xda, 0xca, 0x6d, 0x69, 0x69, 0x81, 0xe1, 0x11, 0xa5, 0x50, 0x4a, 0x93, 0x34, 0xdd, 0xb4, 0xc0, 0x94, 0xce, 0x50, 0x59, 0xde, 0xd8, 0x6a, 0x6c, 0x49, 0xd5, 0xae, 0x9c, 0x09, 0xbd, 0x30, 0xfc, 0x05, 0x9c, 0xe1, 0xc8, 0x81, 0x3b, 0xff, 0x00, 0x47, 0x3a, 0x9c, 0x7a, 0xec, 0xc9, 0x50, 0x73, 0xe2, 0xc0, 0x1d, 0x7a, 0x62, 0x76, 0xb5, 0x92, 0x2c, 0xbf, 0xe4, 0x69, 0x67, 0x7a, 0xe2, - 0x66, 0x7d, 0x8f, 0xdf, 0xf7, 0xd8, 0xdf, 0x7e, 0xfb, 0x25, 0x70, 0x75, 0xff, 0x32, 0xd5, 0x2c, - 0xa7, 0xbc, 0xef, 0x57, 0x88, 0x67, 0x13, 0x46, 0x68, 0xb9, 0x45, 0xec, 0xaa, 0xe3, 0x95, 0xa5, - 0xc2, 0x70, 0xad, 0xf2, 0x5e, 0xc3, 0x39, 0x30, 0x1d, 0x9b, 0x79, 0x4e, 0xa3, 0xdc, 0x3a, 0x57, - 0x21, 0xcc, 0x38, 0x5f, 0xae, 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98, 0x55, 0x34, 0x3e, 0x6b, 0xa1, 0xc2, - 0x01, 0xa8, 0xfa, 0x10, 0x96, 0x7a, 0x87, 0x06, 0xaa, 0x01, 0x98, 0xe1, 0x3d, 0xa5, 0x05, 0x45, - 0x84, 0x7d, 0x73, 0x7c, 0x56, 0x45, 0x77, 0x3c, 0x9e, 0x97, 0x91, 0x88, 0xe2, 0x2e, 0x68, 0xf5, - 0x2c, 0xcc, 0x5d, 0xf5, 0x1c, 0xdf, 0x95, 0x39, 0xa2, 0x35, 0xc8, 0xda, 0x46, 0x33, 0x9c, 0x3e, - 0xd1, 0x44, 0xdc, 0x36, 0x9a, 0x04, 0x0b, 0x8d, 0xfa, 0xa3, 0x02, 0xf3, 0x9b, 0x56, 0xd3, 0x62, - 0x98, 0x50, 0xd7, 0xb1, 0x29, 0x41, 0x17, 0x13, 0x13, 0xeb, 0x44, 0xcf, 0xc4, 0x3a, 0x92, 0x30, - 0xee, 0x9a, 0x55, 0x5f, 0xc2, 0xf4, 0x03, 0x9f, 0xf8, 0x96, 0x5d, 0x93, 0xf3, 0xfa, 0x42, 0x5a, - 0x81, 0x37, 0x03, 0xf3, 0x04, 0xdb, 0xf4, 0x59, 0x3e, 0x02, 0xa4, 0x06, 0x87, 0x88, 0xea, 0xdf, - 0x0a, 0x9c, 0x10, 0x81, 0x49, 0x75, 0x38, 0x8b, 0xd1, 0x5d, 0x28, 0x18, 0x94, 0xfa, 0x1e, 0xa9, - 0x6e, 0x38, 0xb6, 0xe9, 0x7b, 0x9c, 0xff, 0x87, 0xbb, 0x75, 0xc3, 0x23, 0x54, 0x54, 0x93, 0xd3, - 0xd7, 0x64, 0x35, 0x85, 0xf5, 0x21, 0x76, 0x78, 0x28, 0x02, 0xba, 0x0f, 0xf3, 0x8d, 0xee, 0xda, - 0x65, 0x99, 0x67, 0xd2, 0xca, 0x4c, 0x34, 0x4c, 0x3f, 0x26, 0x33, 0x48, 0x36, 0x1d, 0x27, 0xa1, - 0xd5, 0x03, 0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 0xff, 0xc1, + 0xb4, 0x84, 0x2d, 0xfa, 0x13, 0x00, 0x00, } func (m *FlowDistinguisherMethod) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1beta2/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1beta2/generated.proto index 80bbaedea2f3..7e367b47c869 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1beta2/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/flowcontrol/v1beta2/generated.proto @@ -26,7 +26,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/flowcontrol/v1beta2"; +option go_package = "v1beta2"; // FlowDistinguisherMethod specifies the method of a flow distinguisher. message FlowDistinguisherMethod { diff --git a/cluster-autoscaler/vendor/k8s.io/api/networking/v1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/networking/v1/generated.pb.go index 631acbf9357b..719861b96ca5 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/networking/v1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/networking/v1/generated.pb.go @@ -692,38 +692,10 @@ func (m *NetworkPolicySpec) XXX_DiscardUnknown() { var xxx_messageInfo_NetworkPolicySpec proto.InternalMessageInfo -func (m *NetworkPolicyStatus) Reset() { *m = NetworkPolicyStatus{} } -func (*NetworkPolicyStatus) ProtoMessage() {} -func (*NetworkPolicyStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{23} -} -func (m *NetworkPolicyStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NetworkPolicyStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *NetworkPolicyStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_NetworkPolicyStatus.Merge(m, src) -} -func (m *NetworkPolicyStatus) XXX_Size() int { - return m.Size() -} -func (m *NetworkPolicyStatus) XXX_DiscardUnknown() { - xxx_messageInfo_NetworkPolicyStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_NetworkPolicyStatus proto.InternalMessageInfo - func (m *ServiceBackendPort) Reset() { *m = ServiceBackendPort{} } func (*ServiceBackendPort) ProtoMessage() {} func (*ServiceBackendPort) Descriptor() ([]byte, []int) { - return fileDescriptor_1c72867a70a7cc90, []int{24} + return fileDescriptor_1c72867a70a7cc90, []int{23} } func (m *ServiceBackendPort) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -772,7 +744,6 @@ func init() { proto.RegisterType((*NetworkPolicyPeer)(nil), "k8s.io.api.networking.v1.NetworkPolicyPeer") proto.RegisterType((*NetworkPolicyPort)(nil), "k8s.io.api.networking.v1.NetworkPolicyPort") proto.RegisterType((*NetworkPolicySpec)(nil), "k8s.io.api.networking.v1.NetworkPolicySpec") - proto.RegisterType((*NetworkPolicyStatus)(nil), "k8s.io.api.networking.v1.NetworkPolicyStatus") proto.RegisterType((*ServiceBackendPort)(nil), "k8s.io.api.networking.v1.ServiceBackendPort") } @@ -781,107 +752,104 @@ func init() { } var fileDescriptor_1c72867a70a7cc90 = []byte{ - // 1589 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0xcf, 0x3a, 0x71, 0xec, 0x3c, 0x27, 0x69, 0x3a, 0x6d, 0xf5, 0xb5, 0xfa, 0x15, 0x76, 0x58, - 0xd1, 0x36, 0x50, 0x6a, 0xd3, 0xb4, 0x42, 0x70, 0x01, 0xba, 0x69, 0x9b, 0x86, 0xa6, 0x89, 0x35, - 0x36, 0x45, 0x20, 0x40, 0xdd, 0xac, 0x27, 0xce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c, 0xa4, 0xc3, 0x2c, 0x79, 0x60, 0x11, 0x8f, 0x97, 0x73, 0xcb, 0xd3, 0x2b, 0x73, 0x06, - 0x0c, 0x07, 0xd5, 0xd9, 0x1b, 0x92, 0x82, 0x15, 0x47, 0xff, 0x36, 0x07, 0x05, 0x65, 0x16, 0xdd, - 0x83, 0xa2, 0x68, 0x9f, 0xb6, 0xc9, 0x4d, 0x89, 0x5a, 0x5a, 0x7d, 0x2b, 0xe1, 0x6f, 0x54, 0xcd, - 0x9a, 0xd7, 0xed, 0x08, 0x82, 0x5f, 0x13, 0xd2, 0xc2, 0xf7, 0xed, 0x9d, 0xfb, 0xc4, 0xe2, 0x77, - 0x08, 0x37, 0x0d, 0xa4, 0xfc, 0x80, 0x98, 0x86, 0x23, 0x54, 0xb4, 0x0e, 0x33, 0xbe, 0x47, 0x2c, - 0x95, 0xf8, 0x73, 0x47, 0x26, 0xbe, 0xe9, 0x11, 0x2b, 0x0e, 0x4d, 0x7c, 0x61, 0x09, 0x80, 0xb6, - 0x61, 0xd6, 0xe7, 0x26, 0xef, 0xfb, 0xb2, 0xf0, 0xa5, 0xd5, 0x0b, 0x47, 0x43, 0x49, 0x71, 0x63, - 0x51, 0x81, 0xcd, 0x06, 0xdf, 0x58, 0xc1, 0xe8, 0x7f, 0x68, 0xb0, 0x38, 0x5a, 0x6d, 0x74, 0x17, - 0x0a, 0x3e, 0x61, 0xfb, 0xb6, 0x45, 0xca, 0x33, 0xd2, 0x48, 0xfd, 0x68, 0x23, 0x81, 0x7c, 0xd8, - 0x2f, 0x25, 0xd1, 0x2b, 0x8a, 0x86, 0x43, 0x30, 0xf4, 0x31, 0x14, 0x19, 0xf1, 0x69, 0x9f, 0x59, - 0x44, 0x79, 0x7f, 0x29, 0x09, 0x2c, 0xce, 0xbd, 0x80, 0x14, 0xcd, 0xda, 0xde, 0xa4, 0x96, 0xe9, - 0x04, 0xa9, 0xc4, 0x64, 0x97, 0x30, 0xe2, 0x5a, 0xc4, 0x98,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 0xfc, 0xaa, 0x96, 0xe1, 0x22, 0x78, 0x1e, 0x66, 0xdd, 0x7e, - 0x6f, 0x87, 0x04, 0xe7, 0x37, 0x1f, 0x27, 0x67, 0x4b, 0x52, 0xb1, 0xe2, 0x1a, 0xef, 0x3d, 0x7e, - 0x56, 0x99, 0x7a, 0xf2, 0xac, 0x32, 0xf5, 0xf4, 0x59, 0x65, 0xea, 0x9b, 0x61, 0x45, 0x7b, 0x3c, - 0xac, 0x68, 0x4f, 0x86, 0x15, 0xed, 0xe9, 0xb0, 0xa2, 0xfd, 0x33, 0xac, 0x68, 0xdf, 0xff, 0x5b, - 0x99, 0xfa, 0xb4, 0x3c, 0xe9, 0x47, 0xc1, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x8f, 0x43, 0xa0, - 0xa5, 0x48, 0x14, 0x00, 0x00, + // 1545 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcd, 0x6f, 0x1b, 0x45, + 0x1b, 0xcf, 0x3a, 0x71, 0xec, 0x3c, 0x4e, 0xd2, 0x74, 0xde, 0x56, 0xaf, 0xd5, 0x57, 0xaf, 0x1d, + 0x56, 0xb4, 0x0d, 0x94, 0xda, 0x24, 0xad, 0x10, 0x9c, 0xa0, 0x9b, 0xb6, 0x69, 0x68, 0x9a, 0x58, + 0x63, 0xab, 0x08, 0x04, 0xa8, 0x93, 0xf5, 0xc4, 0xd9, 0x7a, 0xbd, 0xb3, 0xcc, 0x8e, 0x43, 0x7b, + 0xe3, 0xc2, 0x81, 0x1b, 0xff, 0x02, 0x7f, 0x02, 0x82, 0x1b, 0x82, 0xc2, 0x05, 0xf5, 0x58, 0x89, + 0x4b, 0x2f, 0x58, 0xd4, 0xfc, 0x17, 0x39, 0xa1, 0x99, 0x9d, 0xfd, 0xb0, 0x1d, 0x63, 0xab, 0xaa, + 0x72, 0x8a, 0xf7, 0xf9, 0x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 0xaa, 0x5b, 0x21, 0x09, 0x47, 0x3c, 0xf3, 0x78, 0xb8, 0x2e, 0xd4, 0xda, 0x7c, 0xf8, 0xca, + 0xea, 0xe2, 0x3f, 0xba, 0x1a, 0xc7, 0xd7, 0xc6, 0x67, 0x90, 0xd3, 0x4b, 0x57, 0x57, 0xfa, 0xc6, + 0x94, 0x95, 0x9e, 0x5e, 0x62, 0xf1, 0x9b, 0x3f, 0x22, 0x46, 0x98, 0xe8, 0x63, 0x98, 0xa7, 0x21, + 0x7a, 0xb8, 0x15, 0xd7, 0xa7, 0x44, 0x4f, 0xc6, 0x6a, 0xf2, 0x1a, 0xd5, 0x34, 0x0d, 0x88, 0xde, + 0x97, 0x59, 0x92, 0xb2, 0xf2, 0x11, 0x18, 0x14, 0xe7, 0xd4, 0xa2, 0xfa, 0x7f, 0x18, 0x6c, 0x4c, + 0x3e, 0x96, 0x97, 0xde, 0xf8, 0x13, 0xa7, 0x35, 0xcc, 0xcf, 0x01, 0x8d, 0xde, 0x6b, 0xa6, 0xb8, + 0x35, 0x5d, 0x82, 0x79, 0xaf, 0xdb, 0xd9, 0xa7, 0x61, 0x0f, 0x65, 0x13, 0x07, 0x77, 0x15, 0x15, + 0x6b, 0xae, 0xb5, 0xf6, 0xf4, 0x45, 0x69, 0xe6, 0xd9, 0x8b, 0xd2, 0xcc, 0xf3, 0x17, 0xa5, 0x99, + 0xaf, 0xfa, 0x25, 0xe3, 0x69, 0xbf, 0x64, 0x3c, 0xeb, 0x97, 0x8c, 0xe7, 0xfd, 0x92, 0xf1, 0x57, + 0xbf, 0x64, 0x7c, 0xfb, 0x77, 0x69, 0xe6, 0x93, 0xcc, 0xd1, 0xfa, 0x3f, 0x01, 0x00, 0x00, 0xff, + 0xff, 0xe9, 0x15, 0xcc, 0xab, 0x5f, 0x13, 0x00, 0x00, } func (m *HTTPIngressPath) Marshal() (dAtA []byte, err error) { @@ -1605,16 +1573,6 @@ func (m *NetworkPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a { size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -1963,43 +1921,6 @@ func (m *NetworkPolicySpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *NetworkPolicyStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NetworkPolicyStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NetworkPolicyStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Conditions) > 0 { - for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - func (m *ServiceBackendPort) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2316,8 +2237,6 @@ func (m *NetworkPolicy) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = m.Spec.Size() n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) return n } @@ -2450,21 +2369,6 @@ func (m *NetworkPolicySpec) Size() (n int) { return n } -func (m *NetworkPolicyStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Conditions) > 0 { - for _, e := range m.Conditions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - func (m *ServiceBackendPort) Size() (n int) { if m == nil { return 0 @@ -2695,7 +2599,6 @@ func (this *NetworkPolicy) String() string { s := strings.Join([]string{`&NetworkPolicy{`, `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "NetworkPolicySpec", "NetworkPolicySpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "NetworkPolicyStatus", "NetworkPolicyStatus", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -2805,21 +2708,6 @@ func (this *NetworkPolicySpec) String() string { }, "") return s } -func (this *NetworkPolicyStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForConditions := "[]Condition{" - for _, f := range this.Conditions { - repeatedStringForConditions += fmt.Sprintf("%v", f) + "," - } - repeatedStringForConditions += "}" - s := strings.Join([]string{`&NetworkPolicyStatus{`, - `Conditions:` + repeatedStringForConditions + `,`, - `}`, - }, "") - return s -} func (this *ServiceBackendPort) String() string { if this == nil { return "nil" @@ -4932,39 +4820,6 @@ func (m *NetworkPolicy) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -5819,90 +5674,6 @@ func (m *NetworkPolicySpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *NetworkPolicyStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NetworkPolicyStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NetworkPolicyStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Conditions = append(m.Conditions, v1.Condition{}) - if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *ServiceBackendPort) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/cluster-autoscaler/vendor/k8s.io/api/networking/v1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/networking/v1/generated.proto index ec8066396950..e98ab179e2cc 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/networking/v1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/networking/v1/generated.proto @@ -28,7 +28,7 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/networking/v1"; +option go_package = "v1"; // HTTPIngressPath associates a path with a backend. Incoming urls matching the // path are forwarded to the backend. @@ -337,11 +337,6 @@ message NetworkPolicy { // Specification of the desired behavior for this NetworkPolicy. // +optional optional NetworkPolicySpec spec = 2; - - // Status is the current state of the NetworkPolicy. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - optional NetworkPolicyStatus status = 3; } // NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods @@ -491,18 +486,6 @@ message NetworkPolicySpec { repeated string policyTypes = 4; } -// NetworkPolicyStatus describe the current state of the NetworkPolicy. -message NetworkPolicyStatus { - // Conditions holds an array of metav1.Condition that describe the state of the NetworkPolicy. - // Current service state - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - // +listType=map - // +listMapKey=type - repeated k8s.io.apimachinery.pkg.apis.meta.v1.Condition conditions = 1; -} - // ServiceBackendPort is the service port being referenced. message ServiceBackendPort { // Name is the name of the port on the Service. diff --git a/cluster-autoscaler/vendor/k8s.io/api/networking/v1/types.go b/cluster-autoscaler/vendor/k8s.io/api/networking/v1/types.go index bb6da40987d5..c49110e5cae0 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/networking/v1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/api/networking/v1/types.go @@ -36,11 +36,6 @@ type NetworkPolicy struct { // Specification of the desired behavior for this NetworkPolicy. // +optional Spec NetworkPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - - // Status is the current state of the NetworkPolicy. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Status NetworkPolicyStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } // PolicyType string describes the NetworkPolicy type @@ -205,48 +200,6 @@ type NetworkPolicyPeer struct { IPBlock *IPBlock `json:"ipBlock,omitempty" protobuf:"bytes,3,rep,name=ipBlock"` } -// NetworkPolicyConditionType is the type for status conditions on -// a NetworkPolicy. This type should be used with the -// NetworkPolicyStatus.Conditions field. -type NetworkPolicyConditionType string - -const ( - // NetworkPolicyConditionStatusAccepted represents status of a Network Policy that could be properly parsed by - // the Network Policy provider and will be implemented in the cluster - NetworkPolicyConditionStatusAccepted NetworkPolicyConditionType = "Accepted" - - // NetworkPolicyConditionStatusPartialFailure represents status of a Network Policy that could be partially - // parsed by the Network Policy provider and may not be completely implemented due to a lack of a feature or some - // other condition - NetworkPolicyConditionStatusPartialFailure NetworkPolicyConditionType = "PartialFailure" - - // NetworkPolicyConditionStatusFailure represents status of a Network Policy that could not be parsed by the - // Network Policy provider and will not be implemented in the cluster - NetworkPolicyConditionStatusFailure NetworkPolicyConditionType = "Failure" -) - -// NetworkPolicyConditionReason defines the set of reasons that explain why a -// particular NetworkPolicy condition type has been raised. -type NetworkPolicyConditionReason string - -const ( - // NetworkPolicyConditionReasonFeatureNotSupported represents a reason where the Network Policy may not have been - // implemented in the cluster due to a lack of some feature not supported by the Network Policy provider - NetworkPolicyConditionReasonFeatureNotSupported NetworkPolicyConditionReason = "FeatureNotSupported" -) - -// NetworkPolicyStatus describe the current state of the NetworkPolicy. -type NetworkPolicyStatus struct { - // Conditions holds an array of metav1.Condition that describe the state of the NetworkPolicy. - // Current service state - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - // +listType=map - // +listMapKey=type - Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` -} - // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // NetworkPolicyList is a list of NetworkPolicy objects. diff --git a/cluster-autoscaler/vendor/k8s.io/api/networking/v1/types_swagger_doc_generated.go b/cluster-autoscaler/vendor/k8s.io/api/networking/v1/types_swagger_doc_generated.go index 8e7870daefd7..38bd9c502b9e 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/networking/v1/types_swagger_doc_generated.go +++ b/cluster-autoscaler/vendor/k8s.io/api/networking/v1/types_swagger_doc_generated.go @@ -193,7 +193,6 @@ var map_NetworkPolicy = map[string]string{ "": "NetworkPolicy describes what network traffic is allowed for a set of Pods", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "spec": "Specification of the desired behavior for this NetworkPolicy.", - "status": "Status is the current state of the NetworkPolicy. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (NetworkPolicy) SwaggerDoc() map[string]string { @@ -264,15 +263,6 @@ func (NetworkPolicySpec) SwaggerDoc() map[string]string { return map_NetworkPolicySpec } -var map_NetworkPolicyStatus = map[string]string{ - "": "NetworkPolicyStatus describe the current state of the NetworkPolicy.", - "conditions": "Conditions holds an array of metav1.Condition that describe the state of the NetworkPolicy. Current service state", -} - -func (NetworkPolicyStatus) SwaggerDoc() map[string]string { - return map_NetworkPolicyStatus -} - var map_ServiceBackendPort = map[string]string{ "": "ServiceBackendPort is the service port being referenced.", "name": "Name is the name of the port on the Service. This is a mutually exclusive setting with \"Number\".", diff --git a/cluster-autoscaler/vendor/k8s.io/api/networking/v1/zz_generated.deepcopy.go b/cluster-autoscaler/vendor/k8s.io/api/networking/v1/zz_generated.deepcopy.go index 349c40ca7e6e..82677ca8b9ef 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/networking/v1/zz_generated.deepcopy.go +++ b/cluster-autoscaler/vendor/k8s.io/api/networking/v1/zz_generated.deepcopy.go @@ -432,7 +432,6 @@ func (in *NetworkPolicy) DeepCopyInto(out *NetworkPolicy) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) return } @@ -645,29 +644,6 @@ func (in *NetworkPolicySpec) DeepCopy() *NetworkPolicySpec { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NetworkPolicyStatus) DeepCopyInto(out *NetworkPolicyStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyStatus. -func (in *NetworkPolicyStatus) DeepCopy() *NetworkPolicyStatus { - if in == nil { - return nil - } - out := new(NetworkPolicyStatus) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ServiceBackendPort) DeepCopyInto(out *ServiceBackendPort) { *out = *in diff --git a/cluster-autoscaler/vendor/k8s.io/api/networking/v1beta1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/networking/v1beta1/generated.pb.go index 8eb092b4d018..cda115147257 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/networking/v1beta1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/networking/v1beta1/generated.pb.go @@ -458,75 +458,75 @@ func init() { } var fileDescriptor_5bea11de0ceb8f53 = []byte{ - // 1087 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x41, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0xda, 0x71, 0xeb, 0x8c, 0x9d, 0x34, 0x1a, 0x72, 0xb0, 0x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, 0x0a, 0x4b, 0x02, - 0x90, 0x1b, 0xb4, 0xbc, 0xfe, 0x46, 0x96, 0x15, 0xcc, 0x29, 0x25, 0x4f, 0x9c, 0xa4, 0x7e, 0xcc, - 0xef, 0xd0, 0xf6, 0xc2, 0x9a, 0xc5, 0x4f, 0x50, 0x3d, 0x88, 0xe8, 0xd0, 0xa1, 0x01, 0x0d, 0x5d, - 0xfd, 0x11, 0x2f, 0xf1, 0x76, 0xbe, 0x9f, 0x3a, 0x05, 0x9c, 0x5e, 0xd2, 0x7b, 0x3a, 0x48, 0xbd, - 0xa8, 0x23, 0x0b, 0x1e, 0x4d, 0x8a, 0x50, 0x9e, 0xa3, 0x9c, 0x4a, 0x92, 0xa9, 0xe9, 0x2b, 0x49, - 0x4f, 0x25, 0x49, 0x60, 0x4e, 0x52, 0xb9, 0x9c, 0x29, 0x1c, 0x5c, 0x06, 0x42, 0xb5, 0xb3, 0xb4, - 0x38, 0x53, 0x7a, 0x99, 0x86, 0x14, 0x50, 0xce, 0xf1, 0xf9, 0x65, 0x73, 0xe3, 0xf9, 0x65, 0x73, - 0xe3, 0xc5, 0x65, 0x73, 0xe3, 0x87, 0x59, 0xd3, 0x38, 0x9f, 0x35, 0x8d, 0xe7, 0xb3, 0xa6, 0xf1, - 0x62, 0xd6, 0x34, 0xfe, 0x9e, 0x35, 0x8d, 0x9f, 0xff, 0x69, 0x6e, 0x7c, 0x7d, 0xf7, 0xa5, 0x6f, - 0xfe, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xbc, 0xb0, 0xe2, 0xe8, 0x2c, 0x0c, 0x00, 0x00, + // 1085 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x41, 0x6f, 0xe3, 0x44, + 0x14, 0xae, 0x93, 0x66, 0x9b, 0x4e, 0xd2, 0x6e, 0x35, 0xf4, 0x10, 0x55, 0x22, 0xa9, 0x7c, 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0x0a, 0x05, 0x8b, 0x82, 0x00, 0x98, 0x4e, 0x29, + 0xa3, 0xcf, 0xc3, 0x4c, 0x43, 0x0a, 0x28, 0x1c, 0x22, 0x14, 0x67, 0xb5, 0xd1, 0x34, 0xfa, 0xe0, + 0x16, 0xf5, 0xbf, 0xa6, 0xb0, 0xce, 0xae, 0x8c, 0x57, 0x50, 0x14, 0x22, 0x98, 0xbf, 0x1a, 0xa8, + 0xa6, 0xed, 0x5f, 0x01, 0xb1, 0x1e, 0x2d, 0x12, 0xeb, 0x8d, 0x35, 0x97, 0xce, 0xf5, 0x9c, 0xfa, + 0x39, 0xbf, 0xba, 0x5c, 0x33, 0xb2, 0xe7, 0xa3, 0x88, 0x8b, 0xe5, 0x5d, 0x79, 0x1a, 0x71, 0x41, + 0x94, 0x06, 0x27, 0x68, 0xcf, 0x5f, 0xda, 0x4b, 0xb7, 0x7b, 0xa9, 0x99, 0x99, 0xd3, 0xd0, 0xee, + 0xf7, 0x96, 0x35, 0x64, 0x25, 0x84, 0x09, 0x68, 0x05, 0x25, 0x07, 0xc5, 0x48, 0x88, 0x58, 0xd7, + 0xf8, 0xfe, 0xfa, 0xdb, 0x30, 0xbf, 0x42, 0x55, 0x65, 0xd7, 0xef, 0x77, 0x89, 0x72, 0x65, 0xfe, + 0x56, 0xca, 0xea, 0xa1, 0xe8, 0xf7, 0x61, 0x96, 0xad, 0x62, 0x86, 0x1a, 0xfe, 0x29, 0xd9, 0xf7, + 0x0b, 0x17, 0xcf, 0x74, 0x64, 0x05, 0x8d, 0xfb, 0xf9, 0x57, 0x82, 0xf1, 0x7f, 0xbe, 0x12, 0x6a, + 0xd7, 0x7d, 0x21, 0xe0, 0x53, 0x54, 0x16, 0xc1, 0x9c, 0x02, 0x6f, 0xae, 0xe7, 0xb1, 0xdf, 0xe9, + 0x39, 0x35, 0x5d, 0xf2, 0x72, 0xbf, 0xd3, 0x23, 0xd2, 0x05, 0x3e, 0x47, 0x15, 0x96, 0x04, 0x20, + 0x37, 0x68, 0x79, 0xfd, 0x8d, 0x2c, 0x2b, 0x98, 0x53, 0x4a, 0x9e, 0x38, 0x49, 0xfd, 0x98, 0xdf, + 0xa2, 0x9d, 0x85, 0x35, 0x8b, 0x9f, 0xa0, 0x7a, 0x10, 0xd1, 0xa1, 0x43, 0x03, 0x1a, 0xba, 0xfa, + 0x11, 0x2f, 0xf1, 0x76, 0xbe, 0x9f, 0x3a, 0x05, 0x9c, 0x5e, 0xd2, 0xfb, 0x3a, 0x48, 0xbd, 0xa8, + 0x23, 0x0b, 0x1e, 0x4d, 0x8a, 0x50, 0x9e, 0xa3, 0x9c, 0x4a, 0x92, 0xa9, 0xe9, 0x57, 0x92, 0x9e, + 0x4a, 0x92, 0xc0, 0x9c, 0xa4, 0x72, 0x39, 0x53, 0x38, 0xb8, 0x0c, 0x84, 0x6a, 0x67, 0x69, 0x71, + 0xa6, 0xf4, 0x32, 0x0d, 0x29, 0xa0, 0x9c, 0xe3, 0x8b, 0xab, 0xe6, 0xc6, 0xf3, 0xab, 0xe6, 0xc6, + 0x8b, 0xab, 0xe6, 0xc6, 0xf7, 0xb3, 0xa6, 0x71, 0x31, 0x6b, 0x1a, 0xcf, 0x67, 0x4d, 0xe3, 0xc5, + 0xac, 0x69, 0xfc, 0x35, 0x6b, 0x1a, 0x3f, 0xfd, 0xdd, 0xdc, 0xf8, 0x6a, 0x4b, 0x97, 0xe9, 0xdf, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x8b, 0x3b, 0x2e, 0x16, 0x0c, 0x00, 0x00, } func (m *HTTPIngressPath) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/networking/v1beta1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/networking/v1beta1/generated.proto index 439c89050633..ef8cceff4372 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/networking/v1beta1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/networking/v1beta1/generated.proto @@ -28,7 +28,7 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/networking/v1beta1"; +option go_package = "v1beta1"; // HTTPIngressPath associates a path with a backend. Incoming urls matching the // path are forwarded to the backend. diff --git a/cluster-autoscaler/vendor/k8s.io/api/node/v1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/node/v1/generated.pb.go index 5355cbae7d10..d930f63b2450 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/node/v1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/node/v1/generated.pb.go @@ -174,49 +174,48 @@ func init() { } var fileDescriptor_6ac9be560e26ae98 = []byte{ - // 660 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x41, 0x6f, 0xd3, 0x4a, - 0x10, 0xce, 0xa6, 0xaf, 0x6a, 0xba, 0x49, 0xdf, 0xeb, 0x5b, 0x7a, 0x88, 0x22, 0xe4, 0x44, 0x39, - 0x15, 0xa4, 0xae, 0xdb, 0x0a, 0xa1, 0x0a, 0x0e, 0x48, 0x86, 0x56, 0x20, 0x41, 0x01, 0x17, 0x2e, - 0x88, 0x03, 0x1b, 0x7b, 0x70, 0xdc, 0xc4, 0xde, 0x68, 0xbd, 0x8e, 0xc8, 0x0d, 0x71, 0x41, 0xe2, - 0xd4, 0xff, 0xc2, 0x81, 0xbf, 0x50, 0x71, 0xea, 0xb1, 0xa7, 0x96, 0x86, 0x7f, 0xc1, 0x09, 0xed, - 0xda, 0x4e, 0x5c, 0x1c, 0x42, 0xb9, 0x79, 0x67, 0xbf, 0xef, 0x9b, 0x99, 0x6f, 0x76, 0x8c, 0xef, - 0xf6, 0x76, 0x22, 0xea, 0x73, 0xb3, 0x17, 0x77, 0x40, 0x84, 0x20, 0x21, 0x32, 0x87, 0x10, 0xba, - 0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 0x00, 0x00, + // 656 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x31, 0x6f, 0xd3, 0x40, + 0x14, 0xce, 0xa5, 0x54, 0x4d, 0x2f, 0x29, 0x94, 0xa3, 0x43, 0x14, 0x21, 0x27, 0xca, 0x14, 0x90, + 0x7a, 0x6e, 0x2b, 0x84, 0x2a, 0x18, 0x90, 0x0c, 0xad, 0x40, 0x82, 0x02, 0x2e, 0x2c, 0x88, 0x81, + 0x8b, 0xfd, 0x70, 0xdc, 0xc4, 0xbe, 0xe8, 0x7c, 0x8e, 0xc8, 0x86, 0x58, 0x90, 0x98, 0xfa, 0x5f, + 0x18, 0xf8, 0x0b, 0x15, 0x53, 0xc7, 0x4e, 0x2d, 0x0d, 0xff, 0x82, 0x09, 0xdd, 0xd9, 0x4e, 0x5c, + 0x12, 0x42, 0xd9, 0xee, 0xde, 0x7d, 0xdf, 0xf7, 0xde, 0xfb, 0xde, 0x3d, 0x7c, 0xbf, 0xbb, 0x1d, + 0x51, 0x9f, 0x9b, 0xdd, 0xb8, 0x0d, 0x22, 0x04, 0x09, 0x91, 0x39, 0x80, 0xd0, 0xe5, 0xc2, 0x4c, + 0x1f, 0x58, 0xdf, 0x37, 0x43, 0xee, 0x82, 0x39, 0xd8, 0x34, 0x3d, 0x08, 0x41, 0x30, 0x09, 0x2e, + 0xed, 0x0b, 0x2e, 0x39, 0x21, 0x09, 0x86, 0xb2, 0xbe, 0x4f, 0x15, 0x86, 0x0e, 0x36, 0x6b, 0xeb, + 0x9e, 0x2f, 0x3b, 0x71, 0x9b, 0x3a, 0x3c, 0x30, 0x3d, 0xee, 0x71, 0x53, 0x43, 0xdb, 0xf1, 0x7b, + 0x7d, 0xd3, 0x17, 0x7d, 0x4a, 0x24, 0x6a, 0xcd, 0x5c, 0x1a, 0x87, 0x8b, 0x59, 0x69, 0x6a, 0x77, + 0x26, 0x98, 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0x8d, 0xf9, + 0xd6, 0xd0, 0xbd, 0x1c, 0x25, 0xd9, 0xa3, 0xb5, 0x34, 0x59, 0x25, 0xff, 0x64, 0x5f, 0xd0, 0x26, + 0xaf, 0x71, 0x59, 0xf2, 0x9e, 0x5a, 0x65, 0x9f, 0x87, 0x59, 0x1f, 0x17, 0xa6, 0xa0, 0x36, 0x49, + 0xa5, 0x7a, 0x35, 0x86, 0x59, 0x37, 0x52, 0xe1, 0xf2, 0x24, 0x16, 0xd9, 0x79, 0x9d, 0xda, 0x03, + 0x7c, 0x7d, 0xaa, 0x9e, 0x19, 0x2b, 0xb3, 0x96, 0x5f, 0x99, 0xe5, 0xdc, 0x0a, 0x58, 0xad, 0xa3, + 0x73, 0xa3, 0x70, 0x7c, 0x6e, 0x14, 0x4e, 0xce, 0x8d, 0xc2, 0xc7, 0x91, 0x81, 0x8e, 0x46, 0x06, + 0x3a, 0x1e, 0x19, 0xe8, 0x64, 0x64, 0xa0, 0x1f, 0x23, 0x03, 0x1d, 0xfe, 0x34, 0x0a, 0x6f, 0x8a, + 0x83, 0xcd, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf3, 0x40, 0xe0, 0x08, 0xf3, 0x05, 0x00, 0x00, } func (m *Overhead) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/node/v1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/node/v1/generated.proto index 294be85b6248..0b98cabb2f6f 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/node/v1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/node/v1/generated.proto @@ -28,7 +28,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/node/v1"; +option go_package = "v1"; // Overhead structure represents the resource overhead associated with running a pod. message Overhead { @@ -64,6 +64,8 @@ message RuntimeClass { // Overhead represents the resource overhead associated with running a pod for a // given RuntimeClass. For more details, see // https://kubernetes.io/docs/concepts/scheduling-eviction/pod-overhead/ + // This field is in beta starting v1.18 + // and is only honored by servers that enable the PodOverhead feature. // +optional optional Overhead overhead = 3; diff --git a/cluster-autoscaler/vendor/k8s.io/api/node/v1/types.go b/cluster-autoscaler/vendor/k8s.io/api/node/v1/types.go index 984696d98373..bfe947e1fcd4 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/node/v1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/api/node/v1/types.go @@ -53,6 +53,8 @@ type RuntimeClass struct { // Overhead represents the resource overhead associated with running a pod for a // given RuntimeClass. For more details, see // https://kubernetes.io/docs/concepts/scheduling-eviction/pod-overhead/ + // This field is in beta starting v1.18 + // and is only honored by servers that enable the PodOverhead feature. // +optional Overhead *Overhead `json:"overhead,omitempty" protobuf:"bytes,3,opt,name=overhead"` diff --git a/cluster-autoscaler/vendor/k8s.io/api/node/v1/types_swagger_doc_generated.go b/cluster-autoscaler/vendor/k8s.io/api/node/v1/types_swagger_doc_generated.go index a9eddc60ea32..c68c40e90f59 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/node/v1/types_swagger_doc_generated.go +++ b/cluster-autoscaler/vendor/k8s.io/api/node/v1/types_swagger_doc_generated.go @@ -40,7 +40,7 @@ var map_RuntimeClass = map[string]string{ "": "RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://kubernetes.io/docs/concepts/containers/runtime-class/", "metadata": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "handler": "Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable.", - "overhead": "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see\n https://kubernetes.io/docs/concepts/scheduling-eviction/pod-overhead/", + "overhead": "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see\n https://kubernetes.io/docs/concepts/scheduling-eviction/pod-overhead/\nThis field is in beta starting v1.18 and is only honored by servers that enable the PodOverhead feature.", "scheduling": "Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.", } diff --git a/cluster-autoscaler/vendor/k8s.io/api/node/v1alpha1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/node/v1alpha1/generated.pb.go index 9f876d4b44d2..abd2c09b6b39 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/node/v1alpha1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/node/v1alpha1/generated.pb.go @@ -203,51 +203,51 @@ func init() { } var fileDescriptor_82a78945ab308218 = []byte{ - // 699 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x3d, 0x6f, 0xd3, 0x4c, - 0x1c, 0xcf, 0xa5, 0xad, 0x94, 0x5e, 0xd2, 0xaa, 0x8f, 0x9f, 0xea, 0x51, 0x94, 0xc1, 0xa9, 0xac, - 0x47, 0xa8, 0x42, 0xea, 0x99, 0x56, 0xa8, 0xaa, 0x18, 0x8a, 0x30, 0x2f, 0x02, 0x51, 0x5a, 0x70, - 0xcb, 0x82, 0x18, 0xb8, 0xd8, 0x7f, 0x1c, 0x13, 0xdb, 0x67, 0xd9, 0xe7, 0x88, 0x6c, 0x88, 0x05, - 0x89, 0x89, 0x89, 0x6f, 0x03, 0x73, 0xc7, 0x4e, 0xa8, 0x53, 0x4b, 0xc3, 0x77, 0x60, 0x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e, 0x36, 0x8b, 0x3a, 0x8d, 0xdb, 0xf8, 0x9f, 0x89, 0x78, 0x2e, 0x59, 0xe1, - 0xd5, 0xe2, 0x0a, 0x2f, 0x16, 0x56, 0xd2, 0xd8, 0x3d, 0xbe, 0x50, 0x4b, 0x27, 0x17, 0x6a, 0xe9, - 0xf4, 0x42, 0x2d, 0xbd, 0xeb, 0xab, 0xe8, 0xb8, 0xaf, 0xa2, 0x93, 0xbe, 0x8a, 0x4e, 0xfb, 0x2a, - 0xfa, 0xde, 0x57, 0xd1, 0xa7, 0x1f, 0x6a, 0xe9, 0x45, 0x7d, 0xda, 0xff, 0xce, 0xef, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x92, 0x0d, 0xef, 0xbe, 0xab, 0x06, 0x00, 0x00, + // 698 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xbf, 0x6f, 0xd3, 0x4e, + 0x14, 0xcf, 0xa5, 0xad, 0x94, 0x5e, 0xd2, 0xaa, 0x5f, 0x7f, 0x2b, 0x14, 0x65, 0x70, 0x2a, 0x0b, + 0xa1, 0x0a, 0xa9, 0x67, 0x5a, 0xa1, 0xaa, 0x62, 0x00, 0x61, 0x7e, 0x08, 0x44, 0x69, 0xc1, 0x2d, + 0x0b, 0x62, 0xe0, 0x62, 0x3f, 0x1c, 0x13, 0xdb, 0x67, 0xd9, 0xe7, 0x88, 0x6c, 0x88, 0x05, 0x89, + 0x89, 0x89, 0xff, 0x06, 0xe6, 0x8e, 0x9d, 0x50, 0xa7, 0x96, 0x86, 0xff, 0x81, 0x81, 0x09, 0x9d, + 0x7d, 0x4e, 0x9c, 0xa4, 0xa1, 0x61, 0xf3, 0xdd, 0x7d, 0x7e, 0xdc, 0xfb, 0xbc, 0x7b, 0xc6, 0x77, + 0x3b, 0x3b, 0x31, 0x71, 0x99, 0xde, 0x49, 0x5a, 0x10, 0x05, 0xc0, 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e, 0x57, 0x4b, + 0x27, 0xe7, 0x6a, 0xe9, 0x7d, 0x5f, 0x45, 0x47, 0x7d, 0x15, 0x1d, 0xf7, 0x55, 0x74, 0xd2, 0x57, + 0xd1, 0x8f, 0xbe, 0x8a, 0x3e, 0xff, 0x54, 0x4b, 0x2f, 0x2b, 0x79, 0x10, 0x7f, 0x02, 0x00, 0x00, + 0xff, 0xff, 0xa8, 0x77, 0xef, 0x80, 0x9b, 0x06, 0x00, 0x00, } func (m *Overhead) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/node/v1alpha1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/node/v1alpha1/generated.proto index d46e0ec6aa1a..d92e18ff333a 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/node/v1alpha1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/node/v1alpha1/generated.proto @@ -28,7 +28,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/node/v1alpha1"; +option go_package = "v1alpha1"; // Overhead structure represents the resource overhead associated with running a pod. message Overhead { @@ -85,6 +85,7 @@ message RuntimeClassSpec { // Overhead represents the resource overhead associated with running a pod for a // given RuntimeClass. For more details, see // https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md + // This field is beta-level as of Kubernetes v1.18, and is only honored by servers that enable the PodOverhead feature. // +optional optional Overhead overhead = 2; diff --git a/cluster-autoscaler/vendor/k8s.io/api/node/v1alpha1/types.go b/cluster-autoscaler/vendor/k8s.io/api/node/v1alpha1/types.go index 588c8e4c0a72..f11bcbb10ad9 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/node/v1alpha1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/api/node/v1alpha1/types.go @@ -63,6 +63,7 @@ type RuntimeClassSpec struct { // Overhead represents the resource overhead associated with running a pod for a // given RuntimeClass. For more details, see // https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md + // This field is beta-level as of Kubernetes v1.18, and is only honored by servers that enable the PodOverhead feature. // +optional Overhead *Overhead `json:"overhead,omitempty" protobuf:"bytes,2,opt,name=overhead"` diff --git a/cluster-autoscaler/vendor/k8s.io/api/node/v1alpha1/types_swagger_doc_generated.go b/cluster-autoscaler/vendor/k8s.io/api/node/v1alpha1/types_swagger_doc_generated.go index 96413754f050..5a259573c3e1 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/node/v1alpha1/types_swagger_doc_generated.go +++ b/cluster-autoscaler/vendor/k8s.io/api/node/v1alpha1/types_swagger_doc_generated.go @@ -59,7 +59,7 @@ func (RuntimeClassList) SwaggerDoc() map[string]string { var map_RuntimeClassSpec = map[string]string{ "": "RuntimeClassSpec is a specification of a RuntimeClass. It contains parameters that are required to describe the RuntimeClass to the Container Runtime Interface (CRI) implementation, as well as any other components that need to understand how the pod will be run. The RuntimeClassSpec is immutable.", "runtimeHandler": "RuntimeHandler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The RuntimeHandler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable.", - "overhead": "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md", + "overhead": "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md This field is beta-level as of Kubernetes v1.18, and is only honored by servers that enable the PodOverhead feature.", "scheduling": "Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.", } diff --git a/cluster-autoscaler/vendor/k8s.io/api/node/v1beta1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/node/v1beta1/generated.pb.go index 8cd5a4cc3593..4bfdd5df304d 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/node/v1beta1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/node/v1beta1/generated.pb.go @@ -174,49 +174,49 @@ func init() { } var fileDescriptor_f977b0dddc93b4ec = []byte{ - // 668 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xbb, 0x6f, 0xd3, 0x40, - 0x18, 0xcf, 0xa5, 0x54, 0x4d, 0x2f, 0x29, 0x14, 0x53, 0xa9, 0x51, 0x06, 0xa7, 0x04, 0x21, 0x95, - 0xa1, 0x67, 0x5a, 0x01, 0xaa, 0x90, 0x10, 0xc8, 0x3c, 0xc4, 0xb3, 0x05, 0x17, 0x16, 0xc4, 0xc0, - 0xc5, 0xfe, 0x70, 0x4c, 0x62, 0x5f, 0x74, 0x3e, 0x47, 0x64, 0x43, 0x2c, 0x48, 0x4c, 0x2c, 0xfc, - 0x37, 0xb0, 0x77, 0xa3, 0x0b, 0x52, 0xa7, 0x96, 0x86, 0xff, 0x82, 0x09, 0x9d, 0x5f, 0xb9, 0x36, - 0x4d, 0x1b, 0x36, 0xdf, 0xdd, 0xef, 0x71, 0xdf, 0xef, 0xbb, 0xcf, 0xf8, 0x4e, 0x7b, 0x3d, 0x24, - 0x1e, 0x33, 0xda, 0x51, 0x13, 0x78, 0x00, 0x02, 0x42, 0xa3, 0x07, 0x81, 0xc3, 0xb8, 0x91, 0x1e, - 0xd0, 0xae, 0x67, 0x04, 0xcc, 0x01, 0xa3, 0xb7, 0xda, 0x04, 0x41, 0x57, 0x0d, 0x17, 0x02, 0xe0, - 0x54, 0x80, 0x43, 0xba, 0x9c, 0x09, 0xa6, 0x2d, 0x26, 0x40, 0x42, 0xbb, 0x1e, 0x91, 0x40, 0x92, - 0x02, 0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0x4a, 0x7e, 0x8f, 0xf1, 0xb4, - 0x27, 0xc0, 0x0f, 0xab, 0xc5, 0xf8, 0xcd, 0x5f, 0x1e, 0x5b, 0x82, 0x7a, 0x2f, 0x73, 0x2e, 0x55, - 0x9c, 0x7e, 0x24, 0xb9, 0x56, 0x22, 0xd1, 0xf8, 0x56, 0xc4, 0x4a, 0x65, 0x1a, 0xc3, 0x15, 0xa9, - 0xb0, 0x05, 0x1d, 0xb0, 0x05, 0xe3, 0xe9, 0x54, 0x5d, 0x9f, 0x20, 0x24, 0xb2, 0xa1, 0xf0, 0x92, - 0xd9, 0x5a, 0x48, 0x1d, 0x2b, 0xea, 0x91, 0x75, 0xc8, 0x40, 0x7b, 0x85, 0xcb, 0x82, 0x75, 0xe4, - 0x8c, 0x7b, 0x2c, 0xc8, 0x2a, 0xd2, 0x55, 0x3f, 0x39, 0x5d, 0x32, 0x9a, 0x97, 0x39, 0xcc, 0xbc, - 0x90, 0x0a, 0x97, 0x87, 0x7b, 0xa1, 0xa5, 0xea, 0xd4, 0x6e, 0xe3, 0xf3, 0x23, 0xf7, 0x39, 0x66, - 0x8c, 0x16, 0xd4, 0x31, 0x9a, 0x55, 0xc6, 0xc2, 0xbc, 0xb5, 0x7d, 0xa0, 0x17, 0x76, 0x0e, 0xf4, - 0xc2, 0xee, 0x81, 0x5e, 0xf8, 0x38, 0xd0, 0xd1, 0xf6, 0x40, 0x47, 0x3b, 0x03, 0x1d, 0xed, 0x0e, - 0x74, 0xf4, 0x7b, 0xa0, 0xa3, 0xaf, 0x7f, 0xf4, 0xc2, 0xeb, 0xc5, 0x31, 0x3f, 0xfe, 0x7f, 0x01, - 0x00, 0x00, 0xff, 0xff, 0x7a, 0xca, 0xe1, 0x7d, 0x2b, 0x06, 0x00, 0x00, + // 666 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xbd, 0x6f, 0xd3, 0x40, + 0x14, 0xcf, 0xa5, 0x54, 0x4d, 0x2f, 0x29, 0x14, 0x53, 0x89, 0x28, 0x83, 0x53, 0x82, 0x90, 0xca, + 0xd0, 0x33, 0xad, 0x00, 0x55, 0x2c, 0x20, 0xf3, 0x21, 0x3e, 0x5b, 0x70, 0x61, 0x41, 0x0c, 0x5c, + 0xec, 0x87, 0x63, 0x12, 0xfb, 0xa2, 0xf3, 0x39, 0x22, 0x1b, 0x62, 0x41, 0x62, 0x62, 0xe1, 0xbf, + 0x81, 0xbd, 0x1b, 0x5d, 0x90, 0x3a, 0xb5, 0x34, 0xfc, 0x17, 0x4c, 0xe8, 0xec, 0x73, 0x72, 0x6d, + 0x9a, 0xb6, 0x6c, 0xbe, 0xf3, 0xef, 0xe3, 0xbd, 0xdf, 0xbb, 0x87, 0xef, 0xb4, 0xd7, 0x62, 0x12, + 0x30, 0xab, 0x9d, 0x34, 0x81, 0x47, 0x20, 0x20, 0xb6, 0x7a, 0x10, 0x79, 0x8c, 0x5b, 0xea, 0x07, + 0xed, 0x06, 0x56, 0xc4, 0x3c, 0xb0, 0x7a, 0x2b, 0x4d, 0x10, 0x74, 0xc5, 0xf2, 0x21, 0x02, 0x4e, + 0x05, 0x78, 0xa4, 0xcb, 0x99, 0x60, 0xc6, 0xc5, 0x0c, 0x48, 0x68, 0x37, 0x20, 0x12, 0x48, 0x14, + 0xb0, 0xb6, 0xec, 0x07, 0xa2, 0x95, 0x34, 0x89, 0xcb, 0x42, 0xcb, 0x67, 0x3e, 0xb3, 0x52, 0x7c, + 0x33, 0x79, 0x97, 0x9e, 0xd2, 0x43, 0xfa, 0x95, 0xe9, 0xd4, 0x1a, 0x9a, 0xa1, 0xcb, 0xb8, 0x34, + 0x3c, 0xec, 0x55, 0xbb, 0x3e, 0xc2, 0x84, 0xd4, 0x6d, 0x05, 0x11, 0xf0, 0xbe, 0xd5, 0x6d, 0xfb, + 0x29, 0x89, 0x43, 0xcc, 0x12, 0xee, 0xc2, 0x7f, 0xb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x56, 0xf4, 0x5f, 0xce, 0x01, 0x03, 0xe3, 0x15, 0x2e, 0x0b, 0xd6, 0x91, 0x3b, + 0x1e, 0xb0, 0x28, 0xef, 0xc8, 0xd4, 0xfd, 0xe4, 0x76, 0xc9, 0x68, 0x5e, 0x0e, 0x61, 0xf6, 0x05, + 0x25, 0x5c, 0x1e, 0xdd, 0xc5, 0x8e, 0xae, 0x53, 0xbb, 0x8d, 0xcf, 0x8f, 0xd5, 0x73, 0xc4, 0x1a, + 0x2d, 0xe8, 0x6b, 0x34, 0xab, 0xad, 0x85, 0xbd, 0xbc, 0xb5, 0x6f, 0x16, 0xb6, 0xf7, 0xcd, 0xc2, + 0xce, 0xbe, 0x59, 0xf8, 0x38, 0x30, 0xd1, 0xd6, 0xc0, 0x44, 0xdb, 0x03, 0x13, 0xed, 0x0c, 0x4c, + 0xf4, 0x7b, 0x60, 0xa2, 0xaf, 0x7f, 0xcc, 0xc2, 0xeb, 0x19, 0x95, 0xc3, 0xbf, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x5b, 0xcf, 0x13, 0x0c, 0x1b, 0x06, 0x00, 0x00, } func (m *Overhead) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/node/v1beta1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/node/v1beta1/generated.proto index 8ffad6973142..3c1e5bbbdcbf 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/node/v1beta1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/node/v1beta1/generated.proto @@ -28,7 +28,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/node/v1beta1"; +option go_package = "v1beta1"; // Overhead structure represents the resource overhead associated with running a pod. message Overhead { @@ -64,6 +64,7 @@ message RuntimeClass { // Overhead represents the resource overhead associated with running a pod for a // given RuntimeClass. For more details, see // https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md + // This field is beta-level as of Kubernetes v1.18, and is only honored by servers that enable the PodOverhead feature. // +optional optional Overhead overhead = 3; diff --git a/cluster-autoscaler/vendor/k8s.io/api/node/v1beta1/types.go b/cluster-autoscaler/vendor/k8s.io/api/node/v1beta1/types.go index b924cb421ad5..c545abf18b02 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/node/v1beta1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/api/node/v1beta1/types.go @@ -55,6 +55,7 @@ type RuntimeClass struct { // Overhead represents the resource overhead associated with running a pod for a // given RuntimeClass. For more details, see // https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md + // This field is beta-level as of Kubernetes v1.18, and is only honored by servers that enable the PodOverhead feature. // +optional Overhead *Overhead `json:"overhead,omitempty" protobuf:"bytes,3,opt,name=overhead"` diff --git a/cluster-autoscaler/vendor/k8s.io/api/node/v1beta1/types_swagger_doc_generated.go b/cluster-autoscaler/vendor/k8s.io/api/node/v1beta1/types_swagger_doc_generated.go index fec4398b2e71..6d88710340bd 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/node/v1beta1/types_swagger_doc_generated.go +++ b/cluster-autoscaler/vendor/k8s.io/api/node/v1beta1/types_swagger_doc_generated.go @@ -40,7 +40,7 @@ var map_RuntimeClass = map[string]string{ "": "RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class", "metadata": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "handler": "Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable.", - "overhead": "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md", + "overhead": "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md This field is beta-level as of Kubernetes v1.18, and is only honored by servers that enable the PodOverhead feature.", "scheduling": "Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.", } diff --git a/cluster-autoscaler/vendor/k8s.io/api/policy/v1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/policy/v1/generated.pb.go index cba6ca4bbd6f..183db076aa58 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/policy/v1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/policy/v1/generated.pb.go @@ -201,58 +201,58 @@ func init() { } var fileDescriptor_2d50488813b2d18e = []byte{ - // 808 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0xcf, 0x8f, 0xdb, 0x44, - 0x14, 0xc7, 0xe3, 0xcd, 0x66, 0x59, 0xa6, 0x49, 0xb4, 0x0c, 0x0b, 0x2c, 0x39, 0x38, 0x28, 0xa7, - 0x82, 0xd4, 0x31, 0xdb, 0x22, 0xb4, 0xaa, 0x04, 0xa2, 0x6e, 0x56, 0x50, 0xd4, 0x25, 0xd5, 0x2c, - 0x08, 0x09, 0x81, 0xc4, 0xc4, 0x7e, 0xcd, 0x0e, 0xb1, 0x3d, 0xd6, 0xcc, 0x38, 0x34, 0x27, 0xf8, - 0x13, 0xf8, 0x17, 0xf8, 0x53, 0x38, 0xb1, 0x27, 0xd4, 0x63, 0xc5, 0x21, 0x62, 0xcd, 0x3f, 0x82, - 0x3c, 0x76, 0x7e, 0x38, 0xf1, 0xaa, 0x59, 0x0e, 0xbd, 0x79, 0xde, 0x7b, 0xdf, 0xcf, 0x9b, 0xf7, - 0xe6, 0xcd, 0xc8, 0xe8, 0x93, 0xf1, 0x89, 0x22, 0x5c, 0x38, 0xe3, 0x64, 0x08, 0x32, 0x02, 0x0d, - 0xca, 0x99, 0x40, 0xe4, 0x0b, 0xe9, 0x14, 0x0e, 0x16, 0x73, 0x27, 0x16, 0x01, 0xf7, 0xa6, 0xce, - 0xe4, 0xd8, 0x19, 0x41, 0x04, 0x92, 0x69, 0xf0, 0x49, 0x2c, 0x85, 0x16, 0xf8, 0x30, 0x8f, 0x22, - 0x2c, 0xe6, 0x24, 0x8f, 0x22, 0x93, 0xe3, 0xce, 0x9d, 0x11, 0xd7, 0x17, 0xc9, 0x90, 0x78, 0x22, - 0x74, 0x46, 0x62, 0x24, 0x1c, 0x13, 0x3c, 0x4c, 0x9e, 0x9a, 0x95, 0x59, 0x98, 0xaf, 0x1c, 0xd2, - 0xf9, 0x68, 0x99, 0x2a, 0x64, 0xde, 0x05, 0x8f, 0x40, 0x4e, 0x9d, 0x78, 0x3c, 0xca, 0x0c, 0xca, - 0x09, 0x41, 0xb3, 0x8a, 0xd4, 0x1d, 0xe7, 0x3a, 0x95, 0x4c, 0x22, 0xcd, 0x43, 0xd8, 0x10, 0x7c, - 0xfc, 0x32, 0x81, 0xf2, 0x2e, 0x20, 0x64, 0x1b, 0xba, 0x7b, 0xd7, 0xe9, 0x12, 0xcd, 0x03, 0x87, - 0x47, 0x5a, 0x69, 0xb9, 0x2e, 0xea, 0xfd, 0x6d, 0xa1, 0xfd, 0xd3, 0x09, 0xf7, 0x34, 0x17, 0x11, - 0xfe, 0x11, 0xed, 0x67, 0x55, 0xf8, 0x4c, 0xb3, 0x23, 0xeb, 0x3d, 0xeb, 0xf6, 0xad, 0xbb, 0x1f, - 0x92, 0x65, 0xe3, 0x16, 0x50, 0x12, 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x08, 0x00, 0x00, + // 805 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0xdf, 0x8e, 0xdb, 0x44, + 0x14, 0xc6, 0xe3, 0x64, 0xb3, 0x2c, 0xd3, 0x24, 0x5a, 0x86, 0x02, 0x4b, 0x2e, 0x1c, 0x94, 0xab, + 0x05, 0xa9, 0x63, 0xb6, 0x45, 0x68, 0x85, 0x04, 0xa2, 0x6e, 0x56, 0x50, 0xd4, 0x25, 0xd5, 0x2c, + 0x08, 0x09, 0x81, 0xc4, 0xc4, 0x3e, 0xcd, 0x0e, 0xb1, 0x3d, 0xd6, 0xcc, 0xd8, 0x34, 0x57, 0xf0, + 0x08, 0xbc, 0x02, 0x8f, 0xc2, 0x15, 0x7b, 0x85, 0x7a, 0x59, 0x71, 0x11, 0xb1, 0xe6, 0x45, 0x90, + 0xc7, 0xce, 0x1f, 0x27, 0x59, 0x35, 0xe5, 0x82, 0x3b, 0xcf, 0x99, 0xf3, 0xfd, 0x8e, 0xcf, 0x37, + 0x67, 0x06, 0x7d, 0x3c, 0x39, 0x55, 0x84, 0x0b, 0x67, 0x92, 0x8c, 0x40, 0x46, 0xa0, 0x41, 0x39, + 0x29, 0x44, 0xbe, 0x90, 0x4e, 0xb9, 0xc1, 0x62, 0xee, 0xc4, 0x22, 0xe0, 0xde, 0xd4, 0x49, 0x4f, + 0x9c, 0x31, 0x44, 0x20, 0x99, 0x06, 0x9f, 0xc4, 0x52, 0x68, 0x81, 0x6f, 0x17, 0x59, 0x84, 0xc5, + 0x9c, 0x14, 0x59, 0x24, 0x3d, 0xe9, 0xde, 0x19, 0x73, 0x7d, 0x99, 0x8c, 0x88, 0x27, 0x42, 0x67, + 0x2c, 0xc6, 0xc2, 0x31, 0xc9, 0xa3, 0xe4, 0x89, 0x59, 0x99, 0x85, 0xf9, 0x2a, 0x20, 0xdd, 0x0f, + 0x96, 0xa5, 0x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xcd, 0xf8, 0xbc, 0x4a, 0xf3, 0x4f, 0xfc, 0x29, 0x6a, 0xa6, 0x2c, + 0x48, 0xa0, 0xbc, 0x47, 0xef, 0xed, 0xf6, 0x1f, 0x5f, 0xf1, 0x10, 0x68, 0x21, 0xfc, 0xa8, 0x7e, + 0x6a, 0xb9, 0xc7, 0x57, 0xd7, 0x76, 0xed, 0xd9, 0xb5, 0x5d, 0x7b, 0x7e, 0x6d, 0xd7, 0x7e, 0xc9, + 0x6c, 0xeb, 0x2a, 0xb3, 0xad, 0x67, 0x99, 0x6d, 0x3d, 0xcf, 0x6c, 0xeb, 0xef, 0xcc, 0xb6, 0x7e, + 0xfd, 0xc7, 0xae, 0x7d, 0x5b, 0x4f, 0x4f, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xce, 0x1b, 0x9d, + 0x9f, 0x62, 0x08, 0x00, 0x00, } func (m *Eviction) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/policy/v1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/policy/v1/generated.proto index 33bc72b86f3e..5b798423564c 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/policy/v1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/policy/v1/generated.proto @@ -27,7 +27,7 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/policy/v1"; +option go_package = "v1"; // Eviction evicts a pod from its node subject to certain policies and safety constraints. // This is a subresource of Pod. A request to cause such an eviction is diff --git a/cluster-autoscaler/vendor/k8s.io/api/policy/v1beta1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/policy/v1beta1/generated.pb.go index d19c93b109a8..9cce671dffae 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/policy/v1beta1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/policy/v1beta1/generated.pb.go @@ -609,127 +609,126 @@ func init() { } var fileDescriptor_014060e454a820dc = []byte{ - // 1907 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x59, 0x5b, 0x73, 0xdb, 0xc6, - 0xf5, 0x17, 0x4c, 0x5d, 0xa8, 0xd5, 0xc5, 0xe2, 0xea, 0x62, 0x48, 0xf9, 0x87, 0x70, 0x90, 0x99, - 0xff, 0xb8, 0x69, 0x0a, 0xc6, 0xb2, 0xe3, 0x7a, 0x9a, 0x5e, 0x22, 0x88, 0x92, 0xad, 0x8c, 0x65, - 0xb1, 0x4b, 0x3b, 0xd3, 0x76, 0xdc, 0x4e, 0x97, 0xc0, 0x8a, 0x42, 0x04, 0x02, 0x28, 0x76, 0xc1, - 0x88, 0x6f, 0x7d, 0xe8, 0x43, 0x1f, 0xfb, 0x05, 0x32, 0xfd, 0x00, 0x9d, 0x3e, 0xf5, 0x43, 0xd4, - 0x99, 0xe9, 0x64, 0xf2, 0x98, 0xe9, 0x03, 0xa7, 0x66, 0xbf, 0x85, 0x9f, 0x3a, 0x58, 0x2e, 0x40, - 0x5c, 0x49, 0x3b, 0x33, 0xf6, 0x1b, 0xb1, 0xe7, 0xf7, 0xfb, 0x9d, 0xdd, 0xb3, 0x67, 0xcf, 0x5e, - 0x08, 0xf4, 0xcb, 0xfb, 0x54, 0xb3, 0xdc, 0xc6, 0x65, 0xd0, 0x21, 0xbe, 0x43, 0x18, 0xa1, 0x8d, - 0x3e, 0x71, 0x4c, 0xd7, 0x6f, 0x08, 0x03, 0xf6, 0xac, 0x86, 0xe7, 0xda, 0x96, 0x31, 0x68, 0xf4, - 0x6f, 0x77, 0x08, 0xc3, 0xb7, 0x1b, 0x5d, 0xe2, 0x10, 0x1f, 0x33, 0x62, 0x6a, 0x9e, 0xef, 0x32, - 0x17, 0xee, 0x8e, 0xa1, 0x1a, 0xf6, 0x2c, 0x6d, 0x0c, 0x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 0x20, - 0xfd, 0x08, 0x99, 0x0a, 0x7a, 0xb8, 0x44, 0xc2, 0x33, 0xbd, 0x90, 0x88, 0xd2, 0x97, 0xdf, 0xf7, - 0xd3, 0x6d, 0x28, 0xa3, 0xa6, 0xfe, 0x43, 0x02, 0xef, 0xcd, 0xdc, 0x6c, 0xa1, 0x9e, 0xea, 0xba, - 0x96, 0xe9, 0x7a, 0xbd, 0x5c, 0xe0, 0xcd, 0xbc, 0x45, 0xea, 0xbf, 0x78, 0xfe, 0xa2, 0x3e, 0xf7, - 0xed, 0x8b, 0xfa, 0xdc, 0x77, 0x2f, 0xea, 0x73, 0x7f, 0x1c, 0xd5, 0xa5, 0xe7, 0xa3, 0xba, 0xf4, - 0xed, 0xa8, 0x2e, 0x7d, 0x37, 0xaa, 0x4b, 0xff, 0x19, 0xd5, 0xa5, 0xbf, 0xfc, 0xb7, 0x3e, 0xf7, - 0x9b, 0xdd, 0xd2, 0xff, 0x20, 0xfe, 0x17, 0x00, 0x00, 0xff, 0xff, 0xec, 0x71, 0xd7, 0x62, 0xb8, - 0x18, 0x00, 0x00, + // 1904 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x5b, 0x6f, 0xdc, 0xc6, + 0x15, 0x16, 0xbd, 0xba, 0xac, 0x46, 0x17, 0x6b, 0x47, 0x17, 0xd3, 0x4a, 0xb3, 0x74, 0x18, 0xa0, + 0x70, 0xd3, 0x84, 0x1b, 0xcb, 0x8e, 0x6b, 0x34, 0x6d, 0x11, 0x51, 0x2b, 0xd9, 0x0a, 0x2c, 0x6b, + 0x3b, 0x6b, 0x07, 0x6d, 0xe1, 0x16, 0x9d, 0x25, 0x47, 0x2b, 0x46, 0x5c, 0x92, 0xe5, 0x0c, 0x37, + 0xda, 0xb7, 0x3e, 0xf4, 0xa1, 0x8f, 0xfd, 0x03, 0x41, 0x7f, 0x40, 0xd1, 0xa7, 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, 0xc2, 0x66, 0x3d, 0xc4, 0x91, 0x89, 0x11, 0x68, 0x22, 0x0c, 0x4d, 0x00, 0xf8, + 0x0f, 0xbf, 0x39, 0xc8, 0x3b, 0x33, 0x4f, 0x9a, 0x28, 0x06, 0x67, 0xfd, 0xac, 0x87, 0xcb, 0x73, + 0x62, 0x46, 0x09, 0x5d, 0xf8, 0x57, 0x09, 0x40, 0x1a, 0x78, 0x9e, 0x4d, 0x7a, 0xc4, 0x61, 0xd8, + 0xe6, 0xad, 0x54, 0x5e, 0xe5, 0xee, 0x7e, 0x31, 0x2d, 0x6a, 0x39, 0x52, 0xd6, 0x6d, 0xbc, 0x37, + 0xe7, 0xa1, 0xa8, 0xc0, 0x67, 0x38, 0x69, 0x67, 0x62, 0xb4, 0x6b, 0x33, 0x27, 0xad, 0xf8, 0x1e, + 0x36, 0x99, 0x34, 0x61, 0x47, 0x91, 0x24, 0xfc, 0x02, 0xec, 0x44, 0xb7, 0x54, 0xe4, 0xba, 0xec, + 0xc8, 0xb2, 0x09, 0x1d, 0x50, 0x46, 0x7a, 0xf2, 0x3a, 0x4f, 0xa6, 0xba, 0x60, 0xee, 0xa0, 0x42, + 0x14, 0x2a, 0x61, 0xc3, 0x1e, 0x50, 0xa2, 0x22, 0x14, 0xae, 0xd0, 0xb8, 0x0a, 0x1e, 0x52, 0x03, + 0xdb, 0xe3, 0xd3, 0xd7, 0x55, 0xee, 0xe0, 0xfd, 0xd1, 0x50, 0x51, 0x9a, 0xd3, 0xa1, 0x68, 0x96, + 0x16, 0xfc, 0x0d, 0x90, 0x71, 0x99, 0x9f, 0x0d, 0xee, 0xe7, 0x47, 0x61, 0x65, 0x2b, 0x75, 0x50, + 0xca, 0x86, 0x1e, 0xd8, 0xc0, 0xe9, 0xf7, 0x02, 0x2a, 0xd7, 0xf8, 0x5a, 0xff, 0x60, 0xca, 0x3c, + 0x64, 0x9e, 0x18, 0x74, 0x59, 0x84, 0x71, 0x23, 0x63, 0xa0, 0x28, 0xa7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x00, 0xff, 0xff, 0xde, 0x4e, 0x7c, 0x8c, 0xa6, 0x18, 0x00, 0x00, } func (m *AllowedCSIDriver) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/policy/v1beta1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/policy/v1beta1/generated.proto index 09dbdde9817d..133ba0493c69 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/policy/v1beta1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/policy/v1beta1/generated.proto @@ -28,7 +28,7 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/policy/v1beta1"; +option go_package = "v1beta1"; // AllowedCSIDriver represents a single inline CSI Driver that is allowed to be used. message AllowedCSIDriver { @@ -144,6 +144,7 @@ message PodDisruptionBudgetSpec { // A null selector selects no pods. // An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. // In policy/v1, an empty selector will select all pods in the namespace. + // +patchStrategy=replace // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 2; diff --git a/cluster-autoscaler/vendor/k8s.io/api/policy/v1beta1/types.go b/cluster-autoscaler/vendor/k8s.io/api/policy/v1beta1/types.go index 486f93461afb..553cb316dcf1 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/policy/v1beta1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/api/policy/v1beta1/types.go @@ -36,8 +36,9 @@ type PodDisruptionBudgetSpec struct { // A null selector selects no pods. // An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. // In policy/v1, an empty selector will select all pods in the namespace. + // +patchStrategy=replace // +optional - Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"` + Selector *metav1.LabelSelector `json:"selector,omitempty" patchStrategy:"replace" protobuf:"bytes,2,opt,name=selector"` // An eviction is allowed if at most "maxUnavailable" pods selected by // "selector" are unavailable after the eviction, i.e. even in absence of diff --git a/cluster-autoscaler/vendor/k8s.io/api/rbac/v1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/rbac/v1/generated.pb.go index 4e466eb285a7..678c00512e87 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/rbac/v1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/rbac/v1/generated.pb.go @@ -400,58 +400,58 @@ func init() { } var fileDescriptor_979ffd7b30c07419 = []byte{ - // 809 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x56, 0xcf, 0x6b, 0xe3, 0x46, - 0x14, 0xf6, 0x38, 0x36, 0xb1, 0xc6, 0x35, 0x6e, 0xa6, 0xa1, 0x88, 0xb4, 0xc8, 0x41, 0x85, 0x12, - 0x68, 0x2b, 0x35, 0x69, 0x69, 0x03, 0x25, 0x87, 0x28, 0xa5, 0x25, 0x24, 0x4d, 0xc3, 0x84, 0xf6, - 0x50, 0x7a, 0xe8, 0x48, 0x9e, 0x28, 0x53, 0xeb, 0x17, 0x33, 0x92, 0x21, 0xf4, 0x52, 0x0a, 0x3d, - 0xec, 0x6d, 0x8f, 0xbb, 0x7f, 0xc1, 0x5e, 0x76, 0x8f, 0xfb, 0x17, 0xec, 0x25, 0xc7, 0x1c, 0x73, - 0x32, 0x1b, 0xed, 0x1f, 0xb2, 0x8b, 0x7e, 0x59, 0xfe, 0xa1, 0x6c, 0x7c, 0x32, 0x2c, 0x7b, 0xb2, - 0xe7, 0xbd, 0xef, 0x7d, 0xef, 0x9b, 0x4f, 0x7a, 0xcf, 0x86, 0x3f, 0x0c, 0x76, 0x85, 0xc6, 0x7c, - 0x7d, 0x10, 0x99, 0x94, 0x7b, 0x34, 0xa4, 0x42, 0x1f, 0x52, 0xaf, 0xef, 0x73, 0x3d, 0x4f, 0x90, - 0x80, 0xe9, 0xdc, 0x24, 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, 0x53, 0x2a, 0xfb, 0x16, 0x63, 0x8f, 0xc7, 0x08, 0xb4, - 0x09, 0x1b, 0x03, 0xe6, 0xf5, 0xe5, 0x7a, 0x8a, 0xfc, 0x20, 0x47, 0x36, 0x8e, 0x98, 0xd7, 0xc7, - 0x69, 0x26, 0x41, 0x78, 0xc4, 0xcd, 0x7e, 0x56, 0x27, 0x10, 0xc9, 0x34, 0xe3, 0x34, 0xa3, 0x3e, - 0x05, 0x70, 0x35, 0x7f, 0x7b, 0xc6, 0x7c, 0xe0, 0x4e, 0xbe, 0x49, 0x7d, 0xf5, 0x45, 0xf4, 0xbd, - 0xbd, 0x3b, 0xd2, 0xa1, 0x94, 0x7c, 0x8a, 0x80, 0x58, 0x54, 0x6e, 0xa4, 0xb0, 0xb5, 0x1c, 0x26, - 0x9d, 0x14, 0x09, 0x5c, 0x62, 0x8c, 0xdd, 0xab, 0x5b, 0xa5, 0x76, 0x7d, 0xab, 0xd4, 0x6e, 0x6e, - 0x95, 0xda, 0xbf, 0xb1, 0x02, 0xae, 0x62, 0x05, 0x5c, 0xc7, 0x0a, 0xb8, 0x89, 0x15, 0xf0, 0x32, - 0x56, 0xc0, 0xc3, 0x57, 0x4a, 0xed, 0x0f, 0x34, 0xff, 0x8f, 0xf5, 0x4d, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xec, 0x4f, 0xa6, 0x29, 0xdf, 0x0a, 0x00, 0x00, + // 807 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x55, 0xcf, 0x6f, 0xe3, 0x44, + 0x14, 0xce, 0xa4, 0x89, 0x1a, 0x4f, 0x88, 0x42, 0x87, 0x0a, 0x59, 0x05, 0x39, 0x95, 0x91, 0x50, + 0x25, 0xc0, 0x26, 0x05, 0x01, 0x12, 0xea, 0xa1, 0x2e, 0x02, 0x55, 0x2d, 0xa5, 0x9a, 0x0a, 0x0e, + 0x88, 0x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0, 0x75, 0xac, 0x80, 0x9b, 0x58, 0x01, 0x2f, 0x62, + 0x05, 0x3c, 0x78, 0xa9, 0xd4, 0x7e, 0xaf, 0x8f, 0xfa, 0xaf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x24, + 0xa1, 0x47, 0x98, 0xcf, 0x0a, 0x00, 0x00, } func (m *AggregationRule) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/rbac/v1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/rbac/v1/generated.proto index 1cb19d5dae9e..2cf427f12215 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/rbac/v1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/rbac/v1/generated.proto @@ -26,7 +26,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/rbac/v1"; +option go_package = "v1"; // AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole message AggregationRule { diff --git a/cluster-autoscaler/vendor/k8s.io/api/rbac/v1alpha1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/rbac/v1alpha1/generated.pb.go index 5cce23ea1246..94c1bef8bb4d 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/rbac/v1alpha1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/rbac/v1alpha1/generated.pb.go @@ -400,60 +400,59 @@ func init() { } var fileDescriptor_b59b0bd5e7cb9590 = []byte{ - // 833 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xbf, 0x8f, 0xe3, 0x44, + // 830 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0xbf, 0x8f, 0xe3, 0x44, 0x14, 0xce, 0x64, 0x13, 0x36, 0x99, 0x25, 0x0a, 0x37, 0x9c, 0x90, 0xb5, 0x42, 0xce, 0x62, 0x81, - 0x74, 0x88, 0xc3, 0x66, 0x17, 0x04, 0x34, 0x20, 0xc5, 0x57, 0xa0, 0x40, 0xd8, 0x5b, 0xe6, 0xc4, - 0x15, 0x88, 0x82, 0x89, 0x33, 0xe7, 0x0c, 0xb1, 0x3d, 0xd6, 0x8c, 0x1d, 0xe9, 0x44, 0x43, 0x43, - 0x8b, 0x68, 0x28, 0xe8, 0x69, 0x69, 0xa0, 0xe4, 0x1f, 0x58, 0xba, 0x2b, 0xb7, 0x8a, 0x58, 0xf3, - 0x87, 0x80, 0x3c, 0xb6, 0x63, 0xe7, 0x17, 0x49, 0x15, 0x09, 0x89, 0x2a, 0x99, 0xf7, 0xbe, 0xf7, - 0xbd, 0xf7, 0xbe, 0x99, 0xf7, 0x12, 0xd8, 0x9f, 0xbe, 0x2f, 0x4d, 0xc6, 0xad, 0x69, 0x3c, 0xa2, - 0x22, 0xa0, 0x11, 0x95, 0xd6, 0x8c, 0x06, 0x63, 0x2e, 0xac, 0xdc, 0x41, 0x42, 0x66, 0x89, 0x11, - 0x71, 0xac, 0xd9, 0x39, 0xf1, 0xc2, 0x09, 0x39, 0xb7, 0x5c, 0x1a, 0x50, 0x41, 0x22, 0x3a, 0x36, - 0x43, 0xc1, 0x23, 0x8e, 0xb4, 0x0c, 0x69, 0x92, 0x90, 0x99, 0x29, 0xd2, 0x2c, 0x90, 0xa7, 0x6f, - 0xba, 0x2c, 0x9a, 0xc4, 0x23, 0xd3, 0xe1, 0xbe, 0xe5, 0x72, 0x97, 0x5b, 0x2a, 0x60, 0x14, 0x3f, - 0x51, 0x27, 0x75, 0x50, 0xdf, 0x32, 0xa2, 0xd3, 0x77, 0xca, 0x94, 0x3e, 0x71, 0x26, 0x2c, 0xa0, - 0xe2, 0xa9, 0x15, 0x4e, 0xdd, 0xd4, 0x20, 0x2d, 0x9f, 0x46, 0xc4, 0x9a, 0xad, 0xa5, 0x3f, 0xb5, - 0xb6, 0x45, 0x89, 0x38, 0x88, 0x98, 0x4f, 0xd7, 0x02, 0xde, 0xdd, 0x15, 0x20, 0x9d, 0x09, 0xf5, - 0xc9, 0x6a, 0x9c, 0xf1, 0x13, 0x80, 0xdd, 0xbe, 0xeb, 0x0a, 0xea, 0x92, 0x88, 0xf1, 0x00, 0xc7, - 0x1e, 0x45, 0xdf, 0x01, 0x78, 0xd7, 0xf1, 0x62, 0x19, 0x51, 0x81, 0xb9, 0x47, 0x1f, 0x51, 0x8f, - 0x3a, 0x11, 0x17, 0x52, 0x03, 0x67, 0x47, 0xf7, 0x4e, 0x2e, 0xde, 0x36, 0x4b, 0x6d, 0x16, 0xb9, - 0xcc, 0x70, 0xea, 0xa6, 0x06, 0x69, 0xa6, 0x2d, 0x99, 0xb3, 0x73, 0x73, 0x48, 0x46, 0xd4, 0x2b, - 0x62, 0xed, 0x97, 0xaf, 0xe7, 0xbd, 0x5a, 0x32, 0xef, 0xdd, 0x7d, 0xb0, 0x81, 0x18, 0x6f, 0x4c, - 0x67, 0xfc, 0x5c, 0x87, 0x27, 0x15, 0x38, 0xfa, 0x0a, 0xb6, 0x52, 0xf2, 0x31, 0x89, 0x88, 0x06, - 0xce, 0xc0, 0xbd, 0x93, 0x8b, 0xb7, 0xf6, 0x2b, 0xe5, 0xe1, 0xe8, 0x6b, 0xea, 0x44, 0x9f, 0xd2, - 0x88, 0xd8, 0x28, 0xaf, 0x03, 0x96, 0x36, 0xbc, 0x60, 0x45, 0x03, 0xd8, 0x14, 0xb1, 0x47, 0xa5, - 0x56, 0x57, 0x9d, 0xbe, 0x6a, 0x6e, 0x7b, 0x05, 0xe6, 0x15, 0xf7, 0x98, 0xf3, 0x34, 0x95, 0xcb, - 0xee, 0xe4, 0x94, 0xcd, 0xf4, 0x24, 0x71, 0xc6, 0x80, 0x26, 0xb0, 0x4b, 0x96, 0x75, 0xd5, 0x8e, - 0x54, 0xcd, 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0x16, 0x37, 0x80, 0xee, 0xc3, 0x56, 0x31, 0xf1, 0xaa, 0xda, 0x76, + 0x99, 0xbd, 0x58, 0x0a, 0x78, 0x81, 0x40, 0x67, 0xb0, 0x31, 0x65, 0xc1, 0x58, 0xab, 0x2b, 0xe4, + 0x8b, 0x39, 0xb2, 0xf1, 0x29, 0x0b, 0xc6, 0x58, 0x79, 0x52, 0x44, 0x40, 0xfc, 0xec, 0x93, 0x5c, + 0x41, 0xa4, 0xb3, 0x8e, 0x95, 0xc7, 0xf8, 0x0d, 0xc0, 0xe3, 0xfc, 0x3d, 0x2d, 0xf8, 0xc0, 0x56, + 0xbe, 0x0b, 0x08, 0x49, 0xc8, 0x1e, 0x53, 0x21, 0x19, 0x0f, 0xf2, 0xbc, 0x8b, 0x97, 0xde, 0xbf, + 0x1a, 0xe4, 0x1e, 0x5c, 0x41, 0xed, 0xae, 0x01, 0x59, 0xb0, 0x9d, 0xfe, 0xca, 0x90, 0x38, 0x54, + 0x6b, 0x28, 0xd8, 0x9d, 0x1c, 0xd6, 0xbe, 0x2c, 0x1c, 0xb8, 0xc4, 0xd8, 0xe6, 0xf5, 0xad, 0x5e, + 0x7b, 0x76, 0xab, 0xd7, 0x6e, 0x6e, 0xf5, 0xda, 0x77, 0x89, 0x0e, 0xae, 0x13, 0x1d, 0x3c, 0x4b, + 0x74, 0x70, 0x93, 0xe8, 0xe0, 0xaf, 0x44, 0x07, 0x3f, 0xfe, 0xad, 0xd7, 0xbe, 0x6c, 0x15, 0xe2, + 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xb0, 0x73, 0x15, 0x10, 0x29, 0x0b, 0x00, 0x00, } func (m *AggregationRule) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/rbac/v1alpha1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/rbac/v1alpha1/generated.proto index bc0da93cea98..9795cffd9e47 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/rbac/v1alpha1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/rbac/v1alpha1/generated.proto @@ -26,7 +26,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/rbac/v1alpha1"; +option go_package = "v1alpha1"; // AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole message AggregationRule { diff --git a/cluster-autoscaler/vendor/k8s.io/api/rbac/v1beta1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/rbac/v1beta1/generated.pb.go index ad6685591eb3..ad5d7cb05f38 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/rbac/v1beta1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/rbac/v1beta1/generated.pb.go @@ -400,58 +400,58 @@ func init() { } var fileDescriptor_99f6bec96facc83d = []byte{ - // 812 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xbd, 0x6f, 0x2b, 0x45, - 0x10, 0xf7, 0x3a, 0xb6, 0xe2, 0x5b, 0x63, 0x99, 0xb7, 0x3c, 0xf1, 0x4e, 0x11, 0x9c, 0x2d, 0x43, - 0x11, 0xe9, 0xc1, 0x1d, 0x79, 0x20, 0xa0, 0x89, 0x44, 0x8e, 0x02, 0xa2, 0x04, 0x13, 0x6d, 0x04, - 0x05, 0xa2, 0x60, 0xef, 0xbc, 0xb9, 0x2c, 0xbe, 0x2f, 0xed, 0xde, 0x59, 0x8a, 0x68, 0x68, 0xe8, - 0x28, 0x90, 0xa8, 0x68, 0xa9, 0xa9, 0x28, 0xf9, 0x0b, 0x5c, 0xa6, 0x4c, 0x65, 0x91, 0xe3, 0x0f, - 0x01, 0xed, 0x7d, 0xf8, 0xfc, 0x75, 0x89, 0x2b, 0x4b, 0x48, 0xaf, 0xb2, 0x77, 0xe6, 0x37, 0x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72, 0x9b, 0xcc, 0xb7, 0x89, 0x1c, 0xc1, 0xdd, 0xae, 0x91, 0xad, 0x47, 0xf0, 0xf1, - 0xfd, 0xf1, 0x07, 0x80, 0xad, 0x1d, 0x2d, 0x0e, 0x73, 0xb9, 0xea, 0x37, 0x1f, 0xae, 0x7a, 0x73, - 0xb9, 0x3f, 0xc0, 0x42, 0x7f, 0xf4, 0x0e, 0x6c, 0x15, 0xc3, 0x9e, 0x16, 0xab, 0x94, 0xc9, 0x8b, - 0x7d, 0x80, 0xe7, 0x08, 0xd4, 0x87, 0x8d, 0x31, 0xf3, 0x47, 0x6a, 0x3d, 0x45, 0xbe, 0x92, 0x23, - 0x1b, 0x67, 0xcc, 0x1f, 0xe1, 0xd4, 0x23, 0x11, 0x3e, 0xf1, 0xb2, 0x1f, 0xe2, 0x05, 0x84, 0x1c, - 0x73, 0x9c, 0x7a, 0xa4, 0x56, 0xfb, 0xf9, 0x63, 0x9a, 0xf3, 0x81, 0x4a, 0xbe, 0xc5, 0xfa, 0xea, - 0xdb, 0xd4, 0xf7, 0x70, 0x76, 0x64, 0x40, 0x45, 0x7e, 0x8a, 0x90, 0xd8, 0x54, 0x6d, 0xa4, 0xb0, - 0x27, 0x39, 0x4c, 0x19, 0x16, 0x0e, 0x5c, 0x62, 0xcc, 0xe3, 0xe9, 0xbd, 0x56, 0xbb, 0xbd, 0xd7, - 0x6a, 0x77, 0xf7, 0x5a, 0xed, 0xc7, 0x44, 0x03, 0xd3, 0x44, 0x03, 0xb7, 0x89, 0x06, 0xee, 0x12, - 0x0d, 0xfc, 0x9d, 0x68, 0xe0, 0x97, 0x7f, 0xb4, 0xda, 0x37, 0xcf, 0x2a, 0xfe, 0xf2, 0xfe, 0x17, - 0x00, 0x00, 0xff, 0xff, 0xf7, 0xdd, 0xcc, 0x2b, 0x25, 0x0b, 0x00, 0x00, + // 808 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0xbd, 0x6f, 0xfb, 0x44, + 0x18, 0xce, 0xa5, 0x89, 0x12, 0x5f, 0x88, 0xc2, 0xef, 0xa8, 0xc0, 0xaa, 0xc0, 0x89, 0x02, 0x43, + 0xa5, 0x52, 0x9b, 0x16, 0x04, 0x2c, 0x48, 0xd4, 0x0c, 0x50, 0xb5, 0x84, 0xea, 0x2a, 0x18, 0x10, + 0x03, 0x67, 0xe7, 0xea, 0x1e, 0xf1, 0x97, 0xee, 0xec, 0x48, 0x15, 0x0b, 0x0b, 0x1b, 0x03, 0x12, + 0x13, 0x2b, 0x33, 0x13, 0x23, 0x7f, 0x41, 0xc6, 0x8e, 0x9d, 0x22, 0x6a, 0xfe, 0x10, 0xd0, 0xf9, + 0x23, 0xce, 0x67, 0x9b, 0x29, 0x12, 0x12, 0x53, 0x7b, 0xef, 0xfb, 0xbc, 0xcf, 0xfb, 0xbc, 0x8f, + 0xef, 0xde, 0xc0, 0x8f, 0x47, 0x1f, 0x0a, 0x9d, 0x05, 0xc6, 0x28, 0xb6, 0x28, 0xf7, 0x69, 0x44, + 0x85, 0x31, 0xa6, 0xfe, 0x30, 0xe0, 0x46, 0x9e, 0x20, 0x21, 0x33, 0xb8, 0x45, 0x6c, 0x63, 0x7c, + 0x62, 0xd1, 0x88, 0x9c, 0x18, 0x0e, 0xf5, 0x29, 0x27, 0x11, 0x1d, 0xea, 0x21, 0x0f, 0xa2, 0x00, + 0xbd, 0x96, 0x01, 0x75, 0x12, 0x32, 0x5d, 0x02, 0xf5, 0x1c, 0x78, 0x70, 0xec, 0xb0, 0xe8, 0x36, + 0xb6, 0x74, 0x3b, 0xf0, 0x0c, 0x27, 0x70, 0x02, 0x23, 0xc5, 0x5b, 0xf1, 0x4d, 0x7a, 0x4a, 0x0f, + 0xe9, 0x7f, 0x19, 0xcf, 0xc1, 0x7b, 0x65, 0x43, 0x8f, 0xd8, 0xb7, 0xcc, 0xa7, 0xfc, 0xce, 0x08, + 0x47,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 0x72, 0x60, 0x87, 0x2c, 0xda, 0xaa, 0xee, 0xa5, 0x92, 0x0f, 0x37, + 0x72, 0x2e, 0x7d, 0x06, 0xf3, 0x95, 0x64, 0xda, 0x5d, 0xfe, 0x36, 0x78, 0x99, 0xb5, 0xff, 0x4b, + 0x15, 0xa2, 0x39, 0x93, 0x4c, 0xe6, 0x0f, 0x99, 0xef, 0xec, 0xc0, 0xab, 0x01, 0x6c, 0x8a, 0x38, + 0x4d, 0x14, 0x76, 0xf5, 0x36, 0x8e, 0x76, 0x9d, 0x01, 0xcd, 0x97, 0x73, 0xc6, 0x66, 0x1e, 0x10, + 0x78, 0xc6, 0x81, 0x2e, 0x60, 0x83, 0x07, 0x2e, 0xc5, 0xf4, 0x26, 0x77, 0x6a, 0x33, 0x1d, 0xce, + 0x70, 0x66, 0x27, 0xa7, 0x6b, 0xe4, 0x01, 0x5c, 0x30, 0xf4, 0x27, 0x00, 0xbe, 0xba, 0xea, 0xca, + 0x25, 0x13, 0x11, 0xfa, 0x66, 0xc5, 0x19, 0x7d, 0xcb, 0x0b, 0xcd, 0x44, 0xe6, 0xcb, 0x6c, 0x8a, + 0x22, 0x32, 0xe7, 0xca, 0x15, 0xac, 0xb3, 0x88, 0x7a, 0x85, 0x25, 0x47, 0x1b, 0x67, 0x58, 0x55, + 0x57, 0xde, 0xa4, 0x73, 0xc9, 0x80, 0x33, 0xa2, 0xfe, 0x9f, 0x00, 0x76, 0xe6, 0xc0, 0x3b, 0x98, + 0xe1, 0x7c, 0x71, 0x86, 0xb7, 0xb6, 0x9a, 0x61, 0xbd, 0xf8, 0x7f, 0x00, 0x84, 0xe5, 0x5b, 0x41, + 0x5d, 0x58, 0x1f, 0x53, 0x6e, 0x65, 0x9b, 0x44, 0x31, 0x15, 0x89, 0xff, 0x4a, 0x06, 0x70, 0x16, + 0x47, 0x47, 0x50, 0x21, 0x21, 0xfb, 0x94, 0x07, 0x71, 0x98, 0xb5, 0x57, 0xcc, 0x76, 0x32, 0xed,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, 0x15, 0x21, 0xb1, 0xa9, 0x5a, 0x4b, 0x61, 0x2f, 0x72, 0x98, + 0x32, 0x28, 0x12, 0xb8, 0xc4, 0x98, 0xc7, 0x93, 0x47, 0xad, 0x72, 0xff, 0xa8, 0x55, 0x1e, 0x1e, + 0xb5, 0xca, 0x0f, 0x89, 0x06, 0x26, 0x89, 0x06, 0xee, 0x13, 0x0d, 0x3c, 0x24, 0x1a, 0xf8, 0x2b, + 0xd1, 0xc0, 0xcf, 0x7f, 0x6b, 0x95, 0xaf, 0x1b, 0xb9, 0xeb, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, + 0x37, 0x8f, 0x77, 0xcd, 0x15, 0x0b, 0x00, 0x00, } func (m *AggregationRule) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/rbac/v1beta1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/rbac/v1beta1/generated.proto index c0988d1b61be..53c252554db1 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/rbac/v1beta1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/rbac/v1beta1/generated.proto @@ -26,7 +26,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/rbac/v1beta1"; +option go_package = "v1beta1"; // AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole message AggregationRule { diff --git a/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1/generated.pb.go index 373c901e6b69..c5ef2f50ec9e 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1/generated.pb.go @@ -111,38 +111,38 @@ func init() { } var fileDescriptor_277b2f43b72fffd5 = []byte{ - // 492 bytes of a gzipped FileDescriptorProto - 0x1f, 0x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ad, 0x92, 0x3d, - 0xcf, 0x57, 0x83, 0xde, 0x74, 0x6f, 0xf6, 0x6b, 0x35, 0x38, 0x3d, 0xbc, 0x01, 0x64, 0x5f, 0xe6, - 0x1c, 0x98, 0x8e, 0xbe, 0x21, 0x7c, 0x6f, 0x27, 0xf5, 0x4b, 0xae, 0xb4, 0xf1, 0xf1, 0x20, 0x79, - 0xf2, 0x6f, 0xc9, 0x17, 0x74, 0x99, 0x7b, 0xaf, 0x3a, 0x62, 0xfb, 0x4f, 0x67, 0x2b, 0xf5, 0x4b, - 0xdc, 0xe2, 0x1a, 0x22, 0x65, 0x36, 0x87, 0x27, 0xe3, 0xce, 0xd9, 0x43, 0x72, 0xec, 0x15, 0x90, - 0x9d, 0x9d, 0xd5, 0xbf, 0xe7, 0x4d, 0x41, 0x3b, 0x1b, 0x13, 0xfb, 0xc5, 0x72, 0x6d, 0x35, 0xae, - 0xd7, 0x56, 0xe3, 0x66, 0x6d, 0x35, 0xbe, 0xe4, 0x16, 0x5a, 0xe6, 0x16, 0xba, 0xce, 0x2d, 0x74, - 0x93, 0x5b, 0xe8, 0x7b, 0x6e, 0xa1, 0xaf, 0x3f, 0xac, 0xc6, 0x07, 0xf3, 0xd8, 0x9b, 0xfc, 0x1d, - 0x00, 0x00, 0xff, 0xff, 0xa9, 0x88, 0x2b, 0xa0, 0xc7, 0x03, 0x00, 0x00, + // 488 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x3f, 0x8f, 0xd3, 0x30, + 0x18, 0xc6, 0xeb, 0x1e, 0x95, 0x0e, 0x57, 0x95, 0x4a, 0x10, 0x52, 0xd4, 0x21, 0xad, 0x7a, 0x03, + 0x59, 0xb0, 0xe9, 0x09, 0x10, 0xd2, 0x4d, 0x84, 0x93, 0x10, 0xd2, 0x21, 0xaa, 0x0c, 0x0c, 0x88, + 0x01, 0x27, 0x79, 0x2f, 0x35, 0x4d, 0xe2, 0xc8, 0x76, 0x22, 0x75, 0xe3, 0x23, 0xf0, 0x8d, 0x58, + 0x3b, 0xde, 0x78, 0x53, 0x45, 0xc3, 0x47, 0x60, 0x63, 0x42, 0x49, 0xc3, 0xa5, 0x7f, 0xee, 0x04, + 0x5b, 0xfc, 0x3e, 0xcf, 0xef, 0xb1, 0xfd, 0x24, 0xc1, 0xaf, 0xe6, 0x2f, 0x15, 0xe1, 0x82, 0xce, + 0x33, 0x0f, 0x64, 0x02, 0x1a, 0x14, 0xcd, 0x21, 0x09, 0x84, 0xa4, 0xb5, 0xc0, 0x52, 0x4e, 0x95, + 0x3f, 0x83, 0x20, 0x8b, 0x78, 0x12, 0xd2, 0x7c, 0x42, 0x43, 0x48, 0x40, 0x32, 0x0d, 0x01, 0x49, + 0xa5, 0xd0, 0xc2, 0x30, 0x37, 0x4e, 0xc2, 0x52, 0x4e, 0x1a, 0x27, 0xc9, 0x27, 0x83, 0x27, 0x21, + 0xd7, 0xb3, 0xcc, 0x23, 0xbe, 0x88, 0x69, 0x28, 0x42, 0x41, 0x2b, 0xc0, 0xcb, 0x2e, 0xab, 0x55, + 0xb5, 0xa8, 0x9e, 0x36, 0x41, 0x83, 0xf1, 0xd6, 0x96, 0xbe, 0x90, 0x70, 0xcb, 0x66, 0x83, 0x67, + 0x8d, 0x27, 0x66, 0xfe, 0x8c, 0x27, 0x20, 0x17, 0x34, 0x9d, 0x87, 0xe5, 0x40, 0xd1, 0x18, 0x34, + 0xbb, 0x8d, 0xa2, 0x77, 0x51, 0x32, 0x4b, 0x34, 0x8f, 0xe1, 0x00, 0x78, 0xf1, 0x2f, 0xa0, 0xbc, + 0x68, 0xcc, 0xf6, 0xb9, 0xf1, 0xaf, 0x36, 0xee, 0x4d, 0x25, 0x17, 0x92, 0xeb, 0xc5, 0xeb, 0x88, + 0x29, 0x65, 0x7c, 0xc6, 0xc7, 0xe5, 0xa9, 0x02, 0xa6, 0x99, 0x89, 0x46, 0xc8, 0x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9, 0x1e, 0x1d, 0xd9, 0xdd, 0xd3, 0xc7, 0xe4, 0xae, 0xbf, 0x80, 0xec, 0x9c, 0xac, + 0x79, 0x3d, 0x6f, 0x4b, 0xda, 0xdd, 0x84, 0x38, 0xf6, 0x72, 0x6d, 0xb5, 0xae, 0xd6, 0x56, 0xeb, + 0x7a, 0x6d, 0xb5, 0xbe, 0x16, 0x16, 0x5a, 0x16, 0x16, 0xba, 0x2a, 0x2c, 0x74, 0x5d, 0x58, 0xe8, + 0x47, 0x61, 0xa1, 0x6f, 0x3f, 0xad, 0xd6, 0xc7, 0x76, 0x3e, 0xf9, 0x13, 0x00, 0x00, 0xff, 0xff, + 0x53, 0xd9, 0x28, 0x30, 0xb1, 0x03, 0x00, 0x00, } func (m *PriorityClass) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1/generated.proto index afc090777dec..1f9a7474a0ac 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1/generated.proto @@ -27,7 +27,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/scheduling/v1"; +option go_package = "v1"; // PriorityClass defines mapping from a priority class name to the priority // integer value. The value can be any valid integer. @@ -57,6 +57,7 @@ message PriorityClass { // PreemptionPolicy is the Policy for preempting pods with lower priority. // One of Never, PreemptLowerPriority. // Defaults to PreemptLowerPriority if unset. + // This field is beta-level, gated by the NonPreemptingPriority feature-gate. // +optional optional string preemptionPolicy = 5; } diff --git a/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1/types.go b/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1/types.go index 0f2989424efa..b4ff34767cc4 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1/types.go @@ -54,6 +54,7 @@ type PriorityClass struct { // PreemptionPolicy is the Policy for preempting pods with lower priority. // One of Never, PreemptLowerPriority. // Defaults to PreemptLowerPriority if unset. + // This field is beta-level, gated by the NonPreemptingPriority feature-gate. // +optional PreemptionPolicy *apiv1.PreemptionPolicy `json:"preemptionPolicy,omitempty" protobuf:"bytes,5,opt,name=preemptionPolicy"` } diff --git a/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1/types_swagger_doc_generated.go b/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1/types_swagger_doc_generated.go index ac34c531fb9d..7524adf9a840 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1/types_swagger_doc_generated.go +++ b/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1/types_swagger_doc_generated.go @@ -33,7 +33,7 @@ var map_PriorityClass = map[string]string{ "value": "The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.", "globalDefault": "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.", "description": "description is an arbitrary string that usually provides guidelines on when this priority class should be used.", - "preemptionPolicy": "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset.", + "preemptionPolicy": "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is beta-level, gated by the NonPreemptingPriority feature-gate.", } func (PriorityClass) SwaggerDoc() map[string]string { diff --git a/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1alpha1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1alpha1/generated.pb.go index d2c5d2f33f9a..16f3c7cb4c36 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1alpha1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1alpha1/generated.pb.go @@ -111,38 +111,38 @@ func init() { } var fileDescriptor_f033641dd0b95dce = []byte{ - // 495 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x31, 0x8f, 0xd3, 0x30, - 0x14, 0xc7, 0xeb, 0x1e, 0x95, 0x8a, 0xab, 0x4a, 0x25, 0x08, 0x29, 0xea, 0xe0, 0x56, 0xbd, 0xa5, - 0xcb, 0xd9, 0xf4, 0x04, 0x08, 0xe9, 0xb6, 0x52, 0xe9, 0x84, 0x04, 0xa2, 0xca, 0xc0, 0x80, 0x18, - 0x70, 0xd3, 0x77, 0xa9, 0x69, 0x12, 0x47, 0xb6, 0x13, 0xa9, 0x1b, 0x1f, 0x81, 0x2f, 0x85, 0xd4, - 0xf1, 0xc6, 0x9b, 0x2a, 0x1a, 0x3e, 0x02, 0x1b, 0x13, 0x4a, 0x9a, 0xbb, 0xb4, 0x0d, 0x1c, 0x6c, - 0x79, 0xef, 0xfd, 0xfe, 0x7f, 0xdb, 0xff, 0xd8, 0xf8, 0x72, 0xf9, 0x52, 0x53, 0x21, 0xd9, 0x32, - 0x9e, 0x81, 0x0a, 0xc1, 0x80, 0x66, 0x09, 0x84, 0x73, 0xa9, 0x58, 0x31, 0xe0, 0x91, 0x60, 0xda, - 0x5d, 0xc0, 0x3c, 0xf6, 0x45, 0xe8, 0xb1, 0x64, 0xc4, 0xfd, 0x68, 0xc1, 0x47, 0xcc, 0x83, 0x10, - 0x14, 0x37, 0x30, 0xa7, 0x91, 0x92, 0x46, 0x5a, 0x64, 0xc7, 0x53, 0x1e, 0x09, 0x5a, 0xf2, 0xf4, - 0x96, 0xef, 0x9e, 0x79, 0xc2, 0x2c, 0xe2, 0x19, 0x75, 0x65, 0xc0, 0x3c, 0xe9, 0x49, 0x96, 0xcb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0x86, 0xf6, 0x83, 0x3e, 0x1a, 0x3e, 0x1c, 0x3f, 0x2e, 0xa4, 0xad, 0x49, - 0x39, 0x72, 0xf6, 0x39, 0xcb, 0xc3, 0x9d, 0x48, 0x01, 0x04, 0x79, 0x35, 0x95, 0xbe, 0x70, 0x57, - 0x76, 0x23, 0xd7, 0x5e, 0xa4, 0x9b, 0x5e, 0x67, 0x7a, 0x34, 0xfb, 0xb5, 0xe9, 0x9d, 0x56, 0x6f, - 0x00, 0x3d, 0xc6, 0x9c, 0x8a, 0xe9, 0xe0, 0x1b, 0xc2, 0x8f, 0x0e, 0x52, 0x7f, 0x23, 0xb4, 0xb1, - 0x3e, 0x56, 0x92, 0xa7, 0xff, 0x97, 0x7c, 0xa6, 0xce, 0x73, 0xef, 0x14, 0x47, 0x6c, 0xde, 0x76, - 0xf6, 0x52, 0x77, 0x70, 0x43, 0x18, 0x08, 0xb4, 0x5d, 0xef, 0x9f, 0x0c, 0x5b, 0xe7, 0x67, 0xf4, - 0xfe, 0xb7, 0x40, 0x0f, 0xf6, 0x57, 0xfe, 0xa4, 0xd7, 0x99, 0x87, 0xb3, 0xb3, 0x1a, 0x4f, 0xd6, - 0x5b, 0x52, 0xbb, 0xde, 0x92, 0xda, 0xcd, 0x96, 0xd4, 0xbe, 0xa4, 0x04, 0xad, 0x53, 0x82, 0xae, - 0x53, 0x82, 0x6e, 0x52, 0x82, 0xbe, 0xa7, 0x04, 0x7d, 0xfd, 0x41, 0x6a, 0x1f, 0xc8, 0xfd, 0xaf, - 0xf4, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbd, 0xf8, 0x5a, 0x80, 0xdf, 0x03, 0x00, 0x00, + // 494 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x4f, 0x8b, 0xd3, 0x40, + 0x18, 0xc6, 0x3b, 0x5d, 0x0b, 0x75, 0x4a, 0xa1, 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x95, 0xd0, 0xc1, 0x37, 0x84, 0x1f, 0x1d, 0xb4, 0xfe, 0x46, 0x68, 0x63, + 0x7d, 0xac, 0x34, 0x4f, 0xef, 0xd7, 0x7c, 0xe6, 0xce, 0x7b, 0xef, 0x14, 0x57, 0x6c, 0xee, 0x26, + 0x7b, 0xad, 0x3b, 0xb8, 0x21, 0x0c, 0x04, 0xda, 0xae, 0xf7, 0x4f, 0x86, 0xad, 0xf3, 0x33, 0xfa, + 0xef, 0x7f, 0x81, 0x1e, 0x9c, 0xaf, 0x7c, 0x49, 0xaf, 0xb3, 0x0c, 0x67, 0x1b, 0x35, 0xa6, 0xab, + 0x0d, 0xa9, 0xdd, 0x6c, 0x48, 0xed, 0x76, 0x43, 0x6a, 0x5f, 0x52, 0x82, 0x56, 0x29, 0x41, 0x37, + 0x29, 0x41, 0xb7, 0x29, 0x41, 0xdf, 0x53, 0x82, 0xbe, 0xfe, 0x20, 0xb5, 0x0f, 0xcd, 0x5d, 0xe6, + 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x5c, 0x1a, 0x39, 0xc9, 0x03, 0x00, 0x00, } func (m *PriorityClass) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1alpha1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1alpha1/generated.proto index 5c60b7ab4c78..da27a13e7510 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1alpha1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1alpha1/generated.proto @@ -27,7 +27,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/scheduling/v1alpha1"; +option go_package = "v1alpha1"; // DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass. // PriorityClass defines mapping from a priority class name to the priority @@ -58,6 +58,7 @@ message PriorityClass { // PreemptionPolicy is the Policy for preempting pods with lower priority. // One of Never, PreemptLowerPriority. // Defaults to PreemptLowerPriority if unset. + // This field is beta-level, gated by the NonPreemptingPriority feature-gate. // +optional optional string preemptionPolicy = 5; } diff --git a/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1alpha1/types.go b/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1alpha1/types.go index 7b0df4864600..4d8462c7c5cd 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1alpha1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1alpha1/types.go @@ -55,6 +55,7 @@ type PriorityClass struct { // PreemptionPolicy is the Policy for preempting pods with lower priority. // One of Never, PreemptLowerPriority. // Defaults to PreemptLowerPriority if unset. + // This field is beta-level, gated by the NonPreemptingPriority feature-gate. // +optional PreemptionPolicy *apiv1.PreemptionPolicy `json:"preemptionPolicy,omitempty" protobuf:"bytes,5,opt,name=preemptionPolicy"` } diff --git a/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1alpha1/types_swagger_doc_generated.go b/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1alpha1/types_swagger_doc_generated.go index fa25f969c437..940c39a083bf 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1alpha1/types_swagger_doc_generated.go +++ b/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1alpha1/types_swagger_doc_generated.go @@ -33,7 +33,7 @@ var map_PriorityClass = map[string]string{ "value": "The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.", "globalDefault": "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.", "description": "description is an arbitrary string that usually provides guidelines on when this priority class should be used.", - "preemptionPolicy": "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset.", + "preemptionPolicy": "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is beta-level, gated by the NonPreemptingPriority feature-gate.", } func (PriorityClass) SwaggerDoc() map[string]string { diff --git a/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1beta1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1beta1/generated.pb.go index 262caf7f1d60..64b1c15057fa 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1beta1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1beta1/generated.pb.go @@ -111,39 +111,38 @@ func init() { } var fileDescriptor_6cd406dede2d3f42 = []byte{ - // 497 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x31, 0x8f, 0xd3, 0x3e, - 0x18, 0xc6, 0xeb, 0xde, 0xbf, 0x52, 0xff, 0xae, 0x2a, 0x95, 0x20, 0xa4, 0xa8, 0xd2, 0xa5, 0x55, - 0x6f, 0xe9, 0x00, 0x36, 0x3d, 0x01, 0x42, 0xba, 0xad, 0x77, 0x02, 0x21, 0x81, 0x28, 0x19, 0x18, - 0x10, 0x03, 0x4e, 0xf2, 0x5e, 0x6a, 0x9a, 0xc4, 0x91, 0xed, 0x44, 0xea, 0xc6, 0x47, 0xe0, 0x43, - 0x31, 0x74, 0xbc, 0xf1, 0xa6, 0x8a, 0x86, 0x8f, 0xc0, 0xc6, 0x84, 0x92, 0x86, 0x4b, 0xdb, 0xc0, - 0xc1, 0x96, 0xf7, 0x7d, 0x7f, 0xcf, 0x63, 0xfb, 0x89, 0x8d, 0x9f, 0x2d, 0x9e, 0x2a, 0xc2, 0x05, - 0x5d, 0x24, 0x0e, 0xc8, 0x08, 0x34, 0x28, 0x9a, 0x42, 0xe4, 0x09, 0x49, 0xcb, 0x01, 0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 0x9f, 0xbf, 0x59, 0x8d, 0x77, 0xc7, - 0xb7, 0x3e, 0xd1, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc5, 0x6c, 0x56, 0x80, 0xdb, 0x03, 0x00, - 0x00, + // 494 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x3f, 0x8f, 0xd3, 0x30, + 0x18, 0xc6, 0xeb, 0x1e, 0x15, 0xc5, 0x55, 0xa5, 0x12, 0x84, 0x14, 0x55, 0x22, 0xad, 0x7a, 0x4b, + 0x07, 0xce, 0xa6, 0x27, 0x40, 0x48, 0xb7, 0x95, 0x13, 0x08, 0x09, 0x44, 0xc9, 0xc0, 0x80, 0x18, + 0x70, 0x92, 0xf7, 0x52, 0xd3, 0x24, 0x8e, 0x6c, 0x27, 0x52, 0x37, 0x3e, 0x02, 0x1f, 0x8a, 0xa1, + 0xe3, 0x8d, 0x37, 0x55, 0x34, 0x7c, 0x04, 0x36, 0x26, 0x94, 0x34, 0x5c, 0xda, 0x86, 0x7f, 0x5b, + 0xfc, 0x3e, 0xbf, 0xe7, 0xb1, 0xfd, 0x24, 0xc1, 0xcf, 0x16, 0x4f, 0x14, 0xe1, 0x82, 0x2e, 0x12, + 0x07, 0x64, 0x04, 0x1a, 0x14, 0x4d, 0x21, 0xf2, 0x84, 0xa4, 0xa5, 0xc0, 0x62, 0x4e, 0x95, 0x3b, + 0x07, 0x2f, 0x09, 0x78, 0xe4, 0xd3, 0x74, 0xe2, 0x80, 0x66, 0x13, 0xea, 0x43, 0x04, 0x92, 0x69, + 0xf0, 0x48, 0x2c, 0x85, 0x16, 0xc6, 0xbd, 0x2d, 0x4e, 0x58, 0xcc, 0x49, 0x85, 0x93, 0x12, 0xef, + 0x9f, 0xf8, 0x5c, 0xcf, 0x13, 0x87, 0xb8, 0x22, 0xa4, 0xbe, 0xf0, 0x05, 0x2d, 0x5c, 0x4e, 0x72, + 0x51, 0xac, 0x8a, 0x45, 0xf1, 0xb4, 0x4d, 0xeb, 0x8f, 0x76, 0x36, 0x77, 0x85, 0x04, 0x9a, 0xd6, + 0x76, 0xec, 0x3f, 0xac, 0x98, 0x90, 0xb9, 0x73, 0x1e, 0x81, 0x5c, 0xd2, 0x78, 0xe1, 0xe7, 0x03, + 0x45, 0x43, 0xd0, 0xec, 0x77, 0x2e, 0xfa, 0x27, 0x97, 0x4c, 0x22, 0xcd, 0x43, 0xa8, 0x19, 0x1e, + 0xff, 0xcb, 0x90, 0xdf, 0x36, 0x64, 0x87, 0xbe, 0xd1, 0xf7, 0x26, 0xee, 0xce, 0x24, 0x17, 0x92, + 0xeb, 0xe5, 0xd3, 0x80, 0x29, 0x65, 0x7c, 0xc0, 0xed, 0xfc, 0x54, 0x1e, 0xd3, 0xcc, 0x44, 0x43, + 0x34, 0xee, 0x9c, 0x3e, 0x20, 0x55, 0x6b, 0xd7, 0xe1, 0x24, 0x5e, 0xf8, 0xf9, 0x40, 0x91, 0x9c, + 0x26, 0xe9, 0x84, 0xbc, 0x76, 0x3e, 0x82, 0xab, 0x5f, 0x81, 0x66, 0x53, 0x63, 0xb5, 0x1e, 0x34, + 0xb2, 0xf5, 0x00, 0x57, 0x33, 0xfb, 0x3a, 0xd5, 0x38, 0xc6, 0xad, 0x94, 0x05, 0x09, 0x98, 0xcd, + 0x21, 0x1a, 0xb7, 0xa6, 0xdd, 0x12, 0x6e, 0xbd, 0xcd, 0x87, 0xf6, 0x56, 0x33, 0xce, 0x70, 0xd7, + 0x0f, 0x84, 0xc3, 0x82, 0x73, 0xb8, 0x60, 0x49, 0xa0, 0xcd, 0xa3, 0x21, 0x1a, 0xb7, 0xa7, 0x77, + 0x4b, 0xb8, 0xfb, 0x7c, 0x57, 0xb4, 0xf7, 0x59, 0xe3, 0x11, 0xee, 0x78, 0xa0, 0x5c, 0xc9, 0x63, + 0xcd, 0x45, 0x64, 0xde, 0x18, 0xa2, 0xf1, 0xad, 0xe9, 0x9d, 0xd2, 0xda, 0x39, 0xaf, 0x24, 0x7b, + 0x97, 0x33, 0x7c, 0xdc, 0x8b, 0x25, 0x40, 0x58, 0xac, 0x66, 0x22, 0xe0, 0xee, 0xd2, 0x6c, 0x15, + 0xde, 0xb3, 0x6c, 0x3d, 0xe8, 0xcd, 0x0e, 0xb4, 0x1f, 0xeb, 0xc1, 0x71, 0xfd, 0x0b, 0x20, 0x87, + 0x98, 0x5d, 0x0b, 0x1d, 0x7d, 0x41, 0xf8, 0xf6, 0x5e, 0xeb, 0x2f, 0xb9, 0xd2, 0xc6, 0xfb, 0x5a, + 0xf3, 0xe4, 0xff, 0x9a, 0xcf, 0xdd, 0x45, 0xef, 0xbd, 0xf2, 0x8a, 0xed, 0x5f, 0x93, 0x9d, 0xd6, + 0xdf, 0xe0, 0x16, 0xd7, 0x10, 0x2a, 0xb3, 0x39, 0x3c, 0x1a, 0x77, 0x4e, 0xef, 0x93, 0xbf, 0xfe, + 0x0a, 0x64, 0xef, 0x78, 0xd5, 0x3b, 0x7a, 0x91, 0x47, 0xd8, 0xdb, 0xa4, 0xe9, 0xc9, 0x6a, 0x63, + 0x35, 0x2e, 0x37, 0x56, 0xe3, 0x6a, 0x63, 0x35, 0x3e, 0x65, 0x16, 0x5a, 0x65, 0x16, 0xba, 0xcc, + 0x2c, 0x74, 0x95, 0x59, 0xe8, 0x6b, 0x66, 0xa1, 0xcf, 0xdf, 0xac, 0xc6, 0xbb, 0x9b, 0x65, 0xe4, + 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1a, 0xc2, 0xc0, 0x1f, 0xc5, 0x03, 0x00, 0x00, } func (m *PriorityClass) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1beta1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1beta1/generated.proto index 44b49ea24638..99bdaabee1e2 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1beta1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1beta1/generated.proto @@ -27,7 +27,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/scheduling/v1beta1"; +option go_package = "v1beta1"; // DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass. // PriorityClass defines mapping from a priority class name to the priority @@ -58,6 +58,7 @@ message PriorityClass { // PreemptionPolicy is the Policy for preempting pods with lower priority. // One of Never, PreemptLowerPriority. // Defaults to PreemptLowerPriority if unset. + // This field is beta-level, gated by the NonPreemptingPriority feature-gate. // +optional optional string preemptionPolicy = 5; } diff --git a/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1beta1/types.go b/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1beta1/types.go index e315e1b35949..d68b4b318791 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1beta1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1beta1/types.go @@ -59,6 +59,7 @@ type PriorityClass struct { // PreemptionPolicy is the Policy for preempting pods with lower priority. // One of Never, PreemptLowerPriority. // Defaults to PreemptLowerPriority if unset. + // This field is beta-level, gated by the NonPreemptingPriority feature-gate. // +optional PreemptionPolicy *apiv1.PreemptionPolicy `json:"preemptionPolicy,omitempty" protobuf:"bytes,5,opt,name=preemptionPolicy"` } diff --git a/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1beta1/types_swagger_doc_generated.go b/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1beta1/types_swagger_doc_generated.go index cbc140f446bc..d576c8401362 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1beta1/types_swagger_doc_generated.go +++ b/cluster-autoscaler/vendor/k8s.io/api/scheduling/v1beta1/types_swagger_doc_generated.go @@ -33,7 +33,7 @@ var map_PriorityClass = map[string]string{ "value": "The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.", "globalDefault": "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.", "description": "description is an arbitrary string that usually provides guidelines on when this priority class should be used.", - "preemptionPolicy": "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset.", + "preemptionPolicy": "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is beta-level, gated by the NonPreemptingPriority feature-gate.", } func (PriorityClass) SwaggerDoc() map[string]string { diff --git a/cluster-autoscaler/vendor/k8s.io/api/storage/v1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/storage/v1/generated.pb.go index a648c426aab1..34a3c34dc248 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/storage/v1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/storage/v1/generated.pb.go @@ -28,8 +28,6 @@ import ( github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" k8s_io_api_core_v1 "k8s.io/api/core/v1" v11 "k8s.io/api/core/v1" - resource "k8s.io/apimachinery/pkg/api/resource" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" math "math" math_bits "math/bits" @@ -244,66 +242,10 @@ func (m *CSINodeSpec) XXX_DiscardUnknown() { var xxx_messageInfo_CSINodeSpec proto.InternalMessageInfo -func (m *CSIStorageCapacity) Reset() { *m = CSIStorageCapacity{} } -func (*CSIStorageCapacity) ProtoMessage() {} -func (*CSIStorageCapacity) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{7} -} -func (m *CSIStorageCapacity) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CSIStorageCapacity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CSIStorageCapacity) XXX_Merge(src proto.Message) { - xxx_messageInfo_CSIStorageCapacity.Merge(m, src) -} -func (m *CSIStorageCapacity) XXX_Size() int { - return m.Size() -} -func (m *CSIStorageCapacity) XXX_DiscardUnknown() { - xxx_messageInfo_CSIStorageCapacity.DiscardUnknown(m) -} - -var xxx_messageInfo_CSIStorageCapacity proto.InternalMessageInfo - -func (m *CSIStorageCapacityList) Reset() { *m = CSIStorageCapacityList{} } -func (*CSIStorageCapacityList) ProtoMessage() {} -func (*CSIStorageCapacityList) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{8} -} -func (m *CSIStorageCapacityList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CSIStorageCapacityList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *CSIStorageCapacityList) XXX_Merge(src proto.Message) { - xxx_messageInfo_CSIStorageCapacityList.Merge(m, src) -} -func (m *CSIStorageCapacityList) XXX_Size() int { - return m.Size() -} -func (m *CSIStorageCapacityList) XXX_DiscardUnknown() { - xxx_messageInfo_CSIStorageCapacityList.DiscardUnknown(m) -} - -var xxx_messageInfo_CSIStorageCapacityList proto.InternalMessageInfo - func (m *StorageClass) Reset() { *m = StorageClass{} } func (*StorageClass) ProtoMessage() {} func (*StorageClass) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{9} + return fileDescriptor_3b530c1983504d8d, []int{7} } func (m *StorageClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -331,7 +273,7 @@ var xxx_messageInfo_StorageClass proto.InternalMessageInfo func (m *StorageClassList) Reset() { *m = StorageClassList{} } func (*StorageClassList) ProtoMessage() {} func (*StorageClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{10} + return fileDescriptor_3b530c1983504d8d, []int{8} } func (m *StorageClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -359,7 +301,7 @@ var xxx_messageInfo_StorageClassList proto.InternalMessageInfo func (m *TokenRequest) Reset() { *m = TokenRequest{} } func (*TokenRequest) ProtoMessage() {} func (*TokenRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{11} + return fileDescriptor_3b530c1983504d8d, []int{9} } func (m *TokenRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -387,7 +329,7 @@ var xxx_messageInfo_TokenRequest proto.InternalMessageInfo func (m *VolumeAttachment) Reset() { *m = VolumeAttachment{} } func (*VolumeAttachment) ProtoMessage() {} func (*VolumeAttachment) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{12} + return fileDescriptor_3b530c1983504d8d, []int{10} } func (m *VolumeAttachment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -415,7 +357,7 @@ var xxx_messageInfo_VolumeAttachment proto.InternalMessageInfo func (m *VolumeAttachmentList) Reset() { *m = VolumeAttachmentList{} } func (*VolumeAttachmentList) ProtoMessage() {} func (*VolumeAttachmentList) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{13} + return fileDescriptor_3b530c1983504d8d, []int{11} } func (m *VolumeAttachmentList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -443,7 +385,7 @@ var xxx_messageInfo_VolumeAttachmentList proto.InternalMessageInfo func (m *VolumeAttachmentSource) Reset() { *m = VolumeAttachmentSource{} } func (*VolumeAttachmentSource) ProtoMessage() {} func (*VolumeAttachmentSource) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{14} + return fileDescriptor_3b530c1983504d8d, []int{12} } func (m *VolumeAttachmentSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -471,7 +413,7 @@ var xxx_messageInfo_VolumeAttachmentSource proto.InternalMessageInfo func (m *VolumeAttachmentSpec) Reset() { *m = VolumeAttachmentSpec{} } func (*VolumeAttachmentSpec) ProtoMessage() {} func (*VolumeAttachmentSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{15} + return fileDescriptor_3b530c1983504d8d, []int{13} } func (m *VolumeAttachmentSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -499,7 +441,7 @@ var xxx_messageInfo_VolumeAttachmentSpec proto.InternalMessageInfo func (m *VolumeAttachmentStatus) Reset() { *m = VolumeAttachmentStatus{} } func (*VolumeAttachmentStatus) ProtoMessage() {} func (*VolumeAttachmentStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{16} + return fileDescriptor_3b530c1983504d8d, []int{14} } func (m *VolumeAttachmentStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -527,7 +469,7 @@ var xxx_messageInfo_VolumeAttachmentStatus proto.InternalMessageInfo func (m *VolumeError) Reset() { *m = VolumeError{} } func (*VolumeError) ProtoMessage() {} func (*VolumeError) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{17} + return fileDescriptor_3b530c1983504d8d, []int{15} } func (m *VolumeError) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -555,7 +497,7 @@ var xxx_messageInfo_VolumeError proto.InternalMessageInfo func (m *VolumeNodeResources) Reset() { *m = VolumeNodeResources{} } func (*VolumeNodeResources) ProtoMessage() {} func (*VolumeNodeResources) Descriptor() ([]byte, []int) { - return fileDescriptor_3b530c1983504d8d, []int{18} + return fileDescriptor_3b530c1983504d8d, []int{16} } func (m *VolumeNodeResources) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -588,8 +530,6 @@ func init() { proto.RegisterType((*CSINodeDriver)(nil), "k8s.io.api.storage.v1.CSINodeDriver") proto.RegisterType((*CSINodeList)(nil), "k8s.io.api.storage.v1.CSINodeList") proto.RegisterType((*CSINodeSpec)(nil), "k8s.io.api.storage.v1.CSINodeSpec") - proto.RegisterType((*CSIStorageCapacity)(nil), "k8s.io.api.storage.v1.CSIStorageCapacity") - proto.RegisterType((*CSIStorageCapacityList)(nil), "k8s.io.api.storage.v1.CSIStorageCapacityList") proto.RegisterType((*StorageClass)(nil), "k8s.io.api.storage.v1.StorageClass") proto.RegisterMapType((map[string]string)(nil), "k8s.io.api.storage.v1.StorageClass.ParametersEntry") proto.RegisterType((*StorageClassList)(nil), "k8s.io.api.storage.v1.StorageClassList") @@ -609,111 +549,101 @@ func init() { } var fileDescriptor_3b530c1983504d8d = []byte{ - // 1651 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xbd, 0x6f, 0x1b, 0xcb, - 0x11, 0xd7, 0x89, 0xd4, 0xd7, 0x52, 0xb2, 0xa4, 0x95, 0xe4, 0x30, 0x2a, 0x48, 0xe1, 0x6c, 0x24, - 0xb2, 0x13, 0x1f, 0x6d, 0xd9, 0x31, 0x0c, 0x07, 0x0e, 0xa0, 0x93, 0xe8, 0x58, 0x88, 0x28, 0x29, - 0x4b, 0xc5, 0x30, 0x82, 0x24, 0xf0, 0xea, 0x6e, 0x45, 0xad, 0xc5, 0xfb, 0xf0, 0xed, 0x92, 0x31, - 0x53, 0x25, 0x4d, 0xba, 0x00, 0x49, 0x1b, 0xe4, 0x8f, 0x48, 0x80, 0xa4, 0x49, 0x99, 0x22, 0x70, - 0x3a, 0x23, 0x95, 0x2b, 0xe2, 0x99, 0xaf, 0x7e, 0xaf, 0x7c, 0x85, 0xaa, 0x87, 0xdd, 0x5b, 0xf2, - 0x3e, 0x78, 0x94, 0xa5, 0x86, 0x1d, 0x77, 0x67, 0xe6, 0x37, 0xb3, 0x3b, 0xbf, 0x99, 0x9d, 0x23, - 0xf8, 0xc9, 0xf9, 0x13, 0x66, 0x50, 0xaf, 0x72, 0xde, 0x3a, 0x21, 0x81, 0x4b, 0x38, 0x61, 0x95, - 0x36, 0x71, 0x6d, 0x2f, 0xa8, 0x28, 0x01, 0xf6, 0x69, 0x85, 0x71, 0x2f, 0xc0, 0x0d, 0x52, 0x69, - 0x3f, 0xa8, 0x34, 0x88, 0x4b, 0x02, 0xcc, 0x89, 0x6d, 0xf8, 0x81, 0xc7, 0x3d, 0xb8, 0x16, 0xaa, - 0x19, 0xd8, 0xa7, 0x86, 0x52, 0x33, 0xda, 0x0f, 0xd6, 0xef, 0x35, 0x28, 0x3f, 0x6b, 0x9d, 0x18, - 0x96, 0xe7, 0x54, 0x1a, 0x5e, 0xc3, 0xab, 0x48, 0xed, 0x93, 0xd6, 0xa9, 0x5c, 0xc9, 0x85, 0xfc, - 0x15, 0xa2, 0xac, 0xeb, 0x31, 0x67, 0x96, 0x17, 0x64, 0x79, 0x5a, 0x7f, 0x14, 0xe9, 0x38, 0xd8, - 0x3a, 0xa3, 0x2e, 0x09, 0x3a, 0x15, 0xff, 0xbc, 0x21, 0x8d, 0x02, 0xc2, 0xbc, 0x56, 0x60, 0x91, - 0x6b, 0x59, 0xb1, 0x8a, 0x43, 0x38, 0xce, 0xf2, 0x55, 0x19, 0x65, 0x15, 0xb4, 0x5c, 0x4e, 0x9d, - 0x61, 0x37, 0x8f, 0x3f, 0x67, 0xc0, 0xac, 0x33, 0xe2, 0xe0, 0xb4, 0x9d, 0xfe, 0x2f, 0x0d, 0xcc, - 0xed, 0xd4, 0xf7, 0x76, 0x03, 0xda, 0x26, 0x01, 0x7c, 0x0d, 0x66, 0x45, 0x44, 0x36, 0xe6, 0xb8, - 0xa8, 0x6d, 0x68, 0x9b, 0x85, 0xad, 0xfb, 0x46, 0x74, 0xbf, 0x03, 0x60, 0xc3, 0x3f, 0x6f, 0x88, - 0x0d, 0x66, 0x08, 0x6d, 0xa3, 0xfd, 0xc0, 0x38, 0x3c, 0x79, 0x43, 0x2c, 0x5e,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2d, 0x9b, 0x12, 0xd7, - 0xea, 0x4f, 0x25, 0x83, 0x40, 0xb6, 0xd5, 0x3e, 0x1a, 0x68, 0x88, 0x51, 0x8e, 0xbc, 0xf3, 0x69, - 0x80, 0x05, 0xc9, 0xea, 0xc4, 0xf2, 0x5c, 0x9b, 0xc9, 0x1b, 0xca, 0x85, 0x9d, 0xb1, 0x9a, 0x16, - 0xa2, 0x61, 0x7d, 0xfd, 0xaf, 0x93, 0x60, 0x29, 0xe4, 0x46, 0x38, 0xc4, 0x3b, 0xc4, 0xe5, 0x63, - 0x68, 0x2a, 0xb5, 0xc4, 0x4c, 0xf7, 0x83, 0x4b, 0x87, 0x9e, 0x28, 0xb0, 0x51, 0xc3, 0x1d, 0xfc, - 0x05, 0x98, 0x66, 0x1c, 0xf3, 0x16, 0x93, 0x4f, 0x5d, 0x61, 0xeb, 0xde, 0x55, 0x01, 0xa5, 0x51, - 0x34, 0xd7, 0x85, 0x6b, 0xa4, 0xc0, 0xf4, 0xff, 0x68, 0x60, 0x35, 0x6d, 0x32, 0x06, 0x86, 0xed, - 0x27, 0x19, 0xf6, 0xfd, 0x2b, 0x1e, 0x66, 0x04, 0xcb, 0xfe, 0xaf, 0x81, 0x9b, 0x43, 0xe7, 0x96, - 0x2f, 0xa9, 0xe8, 0x4b, 0x7e, 0xaa, 0xfb, 0x1d, 0x44, 0x13, 0xb1, 0xec, 0x4b, 0x47, 0x19, 0x72, - 0x94, 0x69, 0x05, 0xdf, 0x80, 0x25, 0xea, 0x36, 0xa9, 0x4b, 0xd4, 0xc3, 0x1b, 0xe5, 0x37, 0xb3, - 0x79, 0xa4, 0x91, 0x65, 0x72, 0x57, 0xc5, 0x7c, 0xb2, 0x97, 0x42, 0x41, 0x43, 0xb8, 0xfa, 0xff, - 0x32, 0x32, 0x23, 0x67, 0x46, 0x51, 0x42, 0x72, 0x87, 0x04, 0x43, 0x25, 0xa4, 0xf6, 0xd1, 0x40, - 0x43, 0xf2, 0x46, 0x5e, 0x85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1a, 0x11, 0xd0, 0x94, - 0x39, 0x27, 0x3a, 0xca, 0x8e, 0xfc, 0x73, 0x26, 0xdc, 0x37, 0x7f, 0xfc, 0xfe, 0x53, 0x69, 0xe2, - 0xc3, 0xa7, 0xd2, 0xc4, 0xc7, 0x4f, 0xa5, 0x89, 0xdf, 0xf7, 0x4a, 0xda, 0xfb, 0x5e, 0x49, 0xfb, - 0xd0, 0x2b, 0x69, 0x1f, 0x7b, 0x25, 0xed, 0x8b, 0x5e, 0x49, 0xfb, 0xf3, 0x97, 0xa5, 0x89, 0x5f, - 0xae, 0x65, 0xfe, 0x31, 0xfa, 0x6d, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd7, 0x6e, 0x72, 0x7b, 0x49, - 0x15, 0x00, 0x00, + // 1500 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xcf, 0xc6, 0xce, 0xaf, 0x71, 0xd2, 0x24, 0x93, 0xf4, 0xfb, 0x35, 0x39, 0xd8, 0xd1, 0xb6, + 0x82, 0x50, 0xe8, 0xba, 0x29, 0xa5, 0xaa, 0x2a, 0x15, 0x29, 0x9b, 0xb8, 0x34, 0x22, 0xbf, 0x34, + 0x0e, 0x15, 0x42, 0x80, 0x3a, 0xd9, 0x9d, 0x38, 0x5b, 0x7b, 0x77, 0xb6, 0x3b, 0x63, 0x53, 0xdf, + 0xe0, 0xc2, 0x0d, 0x09, 0xae, 0x88, 0x3f, 0x02, 0x24, 0xb8, 0x70, 0xe4, 0x54, 0x6e, 0x15, 0xa7, + 0x9e, 0x2c, 0x6a, 0xce, 0xf0, 0x07, 0xe4, 0x84, 0x66, 0x76, 0xec, 0xfd, 0xe1, 0x75, 0x9a, 0x5e, + 0x72, 0xf3, 0xbe, 0x1f, 0x9f, 0xf7, 0x66, 0xde, 0x7b, 0x9f, 0x37, 0x06, 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, 0x91, 0x50, 0x56, 0x8b, 0xea, 0x9b, 0x49, 0x1e, 0x69, 0x64, 0x59, 0xdc, + 0xe5, 0x5e, 0xb7, 0xbc, 0xb0, 0x9d, 0x42, 0x41, 0x43, 0xb8, 0xfa, 0x1f, 0x19, 0x95, 0x91, 0x1b, + 0x57, 0x8c, 0x90, 0x94, 0x90, 0x60, 0x68, 0x84, 0x94, 0x1c, 0x0d, 0x2c, 0x64, 0xdf, 0xc8, 0xab, + 0x50, 0x89, 0x9e, 0xbb, 0x6f, 0xa4, 0x53, 0xac, 0x6f, 0xe4, 0x37, 0x52, 0x60, 0x22, 0x09, 0xf1, + 0xae, 0x92, 0x77, 0x99, 0x4b, 0x26, 0xb1, 0xa7, 0xe4, 0x68, 0x60, 0xa1, 0xff, 0x93, 0xcb, 0x28, + 0x90, 0x6c, 0xc0, 0xd8, 0x69, 0xfa, 0xff, 0x56, 0xd2, 0xa7, 0xb1, 0x07, 0xa7, 0xb1, 0xe1, 0xf7, + 0x1a, 0x80, 0x78, 0x00, 0xb1, 0xdb, 0x6f, 0xd0, 0xb0, 0x8b, 0xaa, 0xaf, 0x35, 0x12, 0xc6, 0xc6, + 0x10, 0x4e, 0xb8, 0x8d, 0x57, 0x54, 0x7c, 0x38, 0x6c, 0x80, 0x32, 0x82, 0x43, 0x1b, 0x14, 0x42, + 0x69, 0x35, 0x08, 0x68, 0xa0, 0xc6, 0x53, 0x3f, 0x33, 0x17, 0x69, 0x69, 0x96, 0xe4, 0xd3, 0x30, + 0x72, 0x3d, 0xed, 0x96, 0x0b, 0x31, 0x3d, 0x8a, 0xc3, 0x8a, 0x28, 0x36, 0x89, 0xa2, 0xe4, 0x5f, + 0x2f, 0xca, 0x16, 0x19, 0x1d, 0x25, 0x06, 0xbb, 0x52, 0x05, 0xff, 0x1f, 0x71, 0x2d, 0xaf, 0xb5, + 0xb3, 0xbe, 0xd1, 0x40, 0x3c, 0x06, 0xdc, 0x01, 0x79, 0xee, 0xa8, 0xa9, 0x4b, 0x3e, 0x9f, 0xcf, + 0x20, 0x92, 0x43, 0xc7, 0x25, 0x11, 0x15, 0x8a, 0x2f, 0x24, 0x51, 0xe0, 0xdb, 0x60, 0xca, 0x25, + 0x8c, 0xe1, 0xba, 0x8a, 0x1c, 0x3d, 0x26, 0x77, 0x43, 0x31, 0xea, 0xeb, 0xf5, 0xdb, 0x60, 0x29, + 0xe3, 0x51, 0x0e, 0xcb, 0x60, 0xc2, 0x92, 0xff, 0x71, 0x45, 0x42, 0x13, 0xe6, 0x8c, 0x60, 0x94, + 0x4d, 0xf9, 0xd7, 0x36, 0x94, 0x9b, 0x6b, 0xcf, 0x5e, 0x96, 0xc6, 0x9e, 0xbf, 0x2c, 0x8d, 0xbd, + 0x78, 0x59, 0x1a, 0xfb, 0xaa, 0x57, 0xd2, 0x9e, 0xf5, 0x4a, 0xda, 0xf3, 0x5e, 0x49, 0x7b, 0xd1, + 0x2b, 0x69, 0x7f, 0xf5, 0x4a, 0xda, 0x77, 0x7f, 0x97, 0xc6, 0x3e, 0x1d, 0x6f, 0xaf, 0xff, 0x17, + 0x00, 0x00, 0xff, 0xff, 0x02, 0xb2, 0x6f, 0xe2, 0x3e, 0x12, 0x00, 0x00, } func (m *CSIDriver) Marshal() (dAtA []byte, err error) { @@ -1080,127 +1010,6 @@ func (m *CSINodeSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *CSIStorageCapacity) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CSIStorageCapacity) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CSIStorageCapacity) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.MaximumVolumeSize != nil { - { - size, err := m.MaximumVolumeSize.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.Capacity != nil { - { - size, err := m.Capacity.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - i -= len(m.StorageClassName) - copy(dAtA[i:], m.StorageClassName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.StorageClassName))) - i-- - dAtA[i] = 0x1a - if m.NodeTopology != nil { - { - size, err := m.NodeTopology.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *CSIStorageCapacityList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CSIStorageCapacityList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CSIStorageCapacityList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - func (m *StorageClass) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1866,48 +1675,6 @@ func (m *CSINodeSpec) Size() (n int) { return n } -func (m *CSIStorageCapacity) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.NodeTopology != nil { - l = m.NodeTopology.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = len(m.StorageClassName) - n += 1 + l + sovGenerated(uint64(l)) - if m.Capacity != nil { - l = m.Capacity.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.MaximumVolumeSize != nil { - l = m.MaximumVolumeSize.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *CSIStorageCapacityList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - func (m *StorageClass) Size() (n int) { if m == nil { return 0 @@ -2207,36 +1974,6 @@ func (this *CSINodeSpec) String() string { }, "") return s } -func (this *CSIStorageCapacity) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CSIStorageCapacity{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `NodeTopology:` + strings.Replace(fmt.Sprintf("%v", this.NodeTopology), "LabelSelector", "v1.LabelSelector", 1) + `,`, - `StorageClassName:` + fmt.Sprintf("%v", this.StorageClassName) + `,`, - `Capacity:` + strings.Replace(fmt.Sprintf("%v", this.Capacity), "Quantity", "resource.Quantity", 1) + `,`, - `MaximumVolumeSize:` + strings.Replace(fmt.Sprintf("%v", this.MaximumVolumeSize), "Quantity", "resource.Quantity", 1) + `,`, - `}`, - }, "") - return s -} -func (this *CSIStorageCapacityList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]CSIStorageCapacity{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "CSIStorageCapacity", "CSIStorageCapacity", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&CSIStorageCapacityList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} func (this *StorageClass) String() string { if this == nil { return "nil" @@ -3364,346 +3101,6 @@ func (m *CSINodeSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *CSIStorageCapacity) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CSIStorageCapacity: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CSIStorageCapacity: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeTopology", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NodeTopology == nil { - m.NodeTopology = &v1.LabelSelector{} - } - if err := m.NodeTopology.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageClassName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StorageClassName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Capacity", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Capacity == nil { - m.Capacity = &resource.Quantity{} - } - if err := m.Capacity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaximumVolumeSize", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaximumVolumeSize == nil { - m.MaximumVolumeSize = &resource.Quantity{} - } - if err := m.MaximumVolumeSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CSIStorageCapacityList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CSIStorageCapacityList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CSIStorageCapacityList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, CSIStorageCapacity{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *StorageClass) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/cluster-autoscaler/vendor/k8s.io/api/storage/v1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/storage/v1/generated.proto index 45417116a1f0..de639354d3d0 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/storage/v1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/storage/v1/generated.proto @@ -22,13 +22,12 @@ syntax = "proto2"; package k8s.io.api.storage.v1; import "k8s.io/api/core/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/api/resource/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/storage/v1"; +option go_package = "v1"; // CSIDriver captures information about a Container Storage Interface (CSI) // volume driver deployed on the cluster. @@ -145,6 +144,9 @@ message CSIDriverSpec { // // This field was immutable in Kubernetes <= 1.22 and now is mutable. // + // This is a beta field and only available when the CSIStorageCapacity + // feature is enabled. The default is false. + // // +optional // +featureGate=CSIStorageCapacity optional bool storageCapacity = 4; @@ -268,100 +270,6 @@ message CSINodeSpec { repeated CSINodeDriver drivers = 1; } -// CSIStorageCapacity stores the result of one CSI GetCapacity call. -// For a given StorageClass, this describes the available capacity in a -// particular topology segment. This can be used when considering where to -// instantiate new PersistentVolumes. -// -// For example this can express things like: -// - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" -// - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" -// -// The following three cases all imply that no capacity is available for -// a certain combination: -// - no object exists with suitable topology and storage class name -// - such an object exists, but the capacity is unset -// - such an object exists, but the capacity is zero -// -// The producer of these objects can decide which approach is more suitable. -// -// They are consumed by the kube-scheduler when a CSI driver opts into -// capacity-aware scheduling with CSIDriverSpec.StorageCapacity. The scheduler -// compares the MaximumVolumeSize against the requested size of pending volumes -// to filter out unsuitable nodes. If MaximumVolumeSize is unset, it falls back -// to a comparison against the less precise Capacity. If that is also unset, -// the scheduler assumes that capacity is insufficient and tries some other -// node. -message CSIStorageCapacity { - // Standard object's metadata. The name has no particular meaning. It must be - // be a DNS subdomain (dots allowed, 253 characters). To ensure that - // there are no conflicts with other CSI drivers on the cluster, the recommendation - // is to use csisc-, a generated name, or a reverse-domain name which ends - // with the unique CSI driver name. - // - // Objects are namespaced. - // - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // NodeTopology defines which nodes have access to the storage - // for which capacity was reported. If not set, the storage is - // not accessible from any node in the cluster. If empty, the - // storage is accessible from all nodes. This field is - // immutable. - // - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector nodeTopology = 2; - - // The name of the StorageClass that the reported capacity applies to. - // It must meet the same requirements as the name of a StorageClass - // object (non-empty, DNS subdomain). If that object no longer exists, - // the CSIStorageCapacity object is obsolete and should be removed by its - // creator. - // This field is immutable. - optional string storageClassName = 3; - - // Capacity is the value reported by the CSI driver in its GetCapacityResponse - // for a GetCapacityRequest with topology and parameters that match the - // previous fields. - // - // The semantic is currently (CSI spec 1.2) defined as: - // The available capacity, in bytes, of the storage that can be used - // to provision volumes. If not set, that information is currently - // unavailable. - // - // +optional - optional k8s.io.apimachinery.pkg.api.resource.Quantity capacity = 4; - - // MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse - // for a GetCapacityRequest with topology and parameters that match the - // previous fields. - // - // This is defined since CSI spec 1.4.0 as the largest size - // that may be used in a - // CreateVolumeRequest.capacity_range.required_bytes field to - // create a volume with the same parameters as those in - // GetCapacityRequest. The corresponding value in the Kubernetes - // API is ResourceRequirements.Requests in a volume claim. - // - // +optional - optional k8s.io.apimachinery.pkg.api.resource.Quantity maximumVolumeSize = 5; -} - -// CSIStorageCapacityList is a collection of CSIStorageCapacity objects. -message CSIStorageCapacityList { - // Standard list metadata - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // Items is the list of CSIStorageCapacity objects. - // +listType=map - // +listMapKey=name - repeated CSIStorageCapacity items = 2; -} - // StorageClass describes the parameters for a class of storage for // which PersistentVolumes can be dynamically provisioned. // diff --git a/cluster-autoscaler/vendor/k8s.io/api/storage/v1/register.go b/cluster-autoscaler/vendor/k8s.io/api/storage/v1/register.go index 094fa2821738..1a2f83d1b869 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/storage/v1/register.go +++ b/cluster-autoscaler/vendor/k8s.io/api/storage/v1/register.go @@ -55,9 +55,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &CSIDriver{}, &CSIDriverList{}, - - &CSIStorageCapacity{}, - &CSIStorageCapacityList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) diff --git a/cluster-autoscaler/vendor/k8s.io/api/storage/v1/types.go b/cluster-autoscaler/vendor/k8s.io/api/storage/v1/types.go index 4812287abf62..6da0657ecc23 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/storage/v1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/api/storage/v1/types.go @@ -18,7 +18,6 @@ package v1 import ( v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -345,6 +344,9 @@ type CSIDriverSpec struct { // // This field was immutable in Kubernetes <= 1.22 and now is mutable. // + // This is a beta field and only available when the CSIStorageCapacity + // feature is enabled. The default is false. + // // +optional // +featureGate=CSIStorageCapacity StorageCapacity *bool `json:"storageCapacity,omitempty" protobuf:"bytes,4,opt,name=storageCapacity"` @@ -558,104 +560,3 @@ type CSINodeList struct { // items is the list of CSINode Items []CSINode `json:"items" protobuf:"bytes,2,rep,name=items"` } - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CSIStorageCapacity stores the result of one CSI GetCapacity call. -// For a given StorageClass, this describes the available capacity in a -// particular topology segment. This can be used when considering where to -// instantiate new PersistentVolumes. -// -// For example this can express things like: -// - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" -// - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" -// -// The following three cases all imply that no capacity is available for -// a certain combination: -// - no object exists with suitable topology and storage class name -// - such an object exists, but the capacity is unset -// - such an object exists, but the capacity is zero -// -// The producer of these objects can decide which approach is more suitable. -// -// They are consumed by the kube-scheduler when a CSI driver opts into -// capacity-aware scheduling with CSIDriverSpec.StorageCapacity. The scheduler -// compares the MaximumVolumeSize against the requested size of pending volumes -// to filter out unsuitable nodes. If MaximumVolumeSize is unset, it falls back -// to a comparison against the less precise Capacity. If that is also unset, -// the scheduler assumes that capacity is insufficient and tries some other -// node. -type CSIStorageCapacity struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. The name has no particular meaning. It must be - // be a DNS subdomain (dots allowed, 253 characters). To ensure that - // there are no conflicts with other CSI drivers on the cluster, the recommendation - // is to use csisc-, a generated name, or a reverse-domain name which ends - // with the unique CSI driver name. - // - // Objects are namespaced. - // - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // NodeTopology defines which nodes have access to the storage - // for which capacity was reported. If not set, the storage is - // not accessible from any node in the cluster. If empty, the - // storage is accessible from all nodes. This field is - // immutable. - // - // +optional - NodeTopology *metav1.LabelSelector `json:"nodeTopology,omitempty" protobuf:"bytes,2,opt,name=nodeTopology"` - - // The name of the StorageClass that the reported capacity applies to. - // It must meet the same requirements as the name of a StorageClass - // object (non-empty, DNS subdomain). If that object no longer exists, - // the CSIStorageCapacity object is obsolete and should be removed by its - // creator. - // This field is immutable. - StorageClassName string `json:"storageClassName" protobuf:"bytes,3,name=storageClassName"` - - // Capacity is the value reported by the CSI driver in its GetCapacityResponse - // for a GetCapacityRequest with topology and parameters that match the - // previous fields. - // - // The semantic is currently (CSI spec 1.2) defined as: - // The available capacity, in bytes, of the storage that can be used - // to provision volumes. If not set, that information is currently - // unavailable. - // - // +optional - Capacity *resource.Quantity `json:"capacity,omitempty" protobuf:"bytes,4,opt,name=capacity"` - - // MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse - // for a GetCapacityRequest with topology and parameters that match the - // previous fields. - // - // This is defined since CSI spec 1.4.0 as the largest size - // that may be used in a - // CreateVolumeRequest.capacity_range.required_bytes field to - // create a volume with the same parameters as those in - // GetCapacityRequest. The corresponding value in the Kubernetes - // API is ResourceRequirements.Requests in a volume claim. - // - // +optional - MaximumVolumeSize *resource.Quantity `json:"maximumVolumeSize,omitempty" protobuf:"bytes,5,opt,name=maximumVolumeSize"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CSIStorageCapacityList is a collection of CSIStorageCapacity objects. -type CSIStorageCapacityList struct { - metav1.TypeMeta `json:",inline"` - // Standard list metadata - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Items is the list of CSIStorageCapacity objects. - // +listType=map - // +listMapKey=name - Items []CSIStorageCapacity `json:"items" protobuf:"bytes,2,rep,name=items"` -} diff --git a/cluster-autoscaler/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go b/cluster-autoscaler/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go index 7a407db46b21..ed5b18cb7a8e 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go +++ b/cluster-autoscaler/vendor/k8s.io/api/storage/v1/types_swagger_doc_generated.go @@ -52,7 +52,7 @@ var map_CSIDriverSpec = map[string]string{ "attachRequired": "attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called.\n\nThis field is immutable.", "podInfoOnMount": "If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" if the volume is an ephemeral inline volume\n defined by a CSIVolumeSource, otherwise \"false\"\n\n\"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver.\n\nThis field is immutable.", "volumeLifecycleModes": "volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. This field is beta.\n\nThis field is immutable.", - "storageCapacity": "If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information.\n\nThe check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.\n\nAlternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.\n\nThis field was immutable in Kubernetes <= 1.22 and now is mutable.", + "storageCapacity": "If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information.\n\nThe check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.\n\nAlternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.\n\nThis field was immutable in Kubernetes <= 1.22 and now is mutable.\n\nThis is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false.", "fsGroupPolicy": "Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details.\n\nThis field is immutable.\n\nDefaults to ReadWriteOnceWithFSType, which will examine each volume to determine if Kubernetes should modify ownership and permissions of the volume. With the default policy the defined fsGroup will only be applied if a fstype is defined and the volume's access mode contains ReadWriteOnce.", "tokenRequests": "TokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: \"csi.storage.k8s.io/serviceAccount.tokens\": {\n \"\": {\n \"token\": ,\n \"expirationTimestamp\": ,\n },\n ...\n}\n\nNote: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically.", "requiresRepublish": "RequiresRepublish indicates the CSI driver wants `NodePublishVolume` being periodically called to reflect any possible change in the mounted volume. This field defaults to false.\n\nNote: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container.", @@ -103,29 +103,6 @@ func (CSINodeSpec) SwaggerDoc() map[string]string { return map_CSINodeSpec } -var map_CSIStorageCapacity = map[string]string{ - "": "CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes.\n\nFor example this can express things like: - StorageClass \"standard\" has \"1234 GiB\" available in \"topology.kubernetes.io/zone=us-east1\" - StorageClass \"localssd\" has \"10 GiB\" available in \"kubernetes.io/hostname=knode-abc123\"\n\nThe following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero\n\nThe producer of these objects can decide which approach is more suitable.\n\nThey are consumed by the kube-scheduler when a CSI driver opts into capacity-aware scheduling with CSIDriverSpec.StorageCapacity. The scheduler compares the MaximumVolumeSize against the requested size of pending volumes to filter out unsuitable nodes. If MaximumVolumeSize is unset, it falls back to a comparison against the less precise Capacity. If that is also unset, the scheduler assumes that capacity is insufficient and tries some other node.", - "metadata": "Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name.\n\nObjects are namespaced.\n\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "nodeTopology": "NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable.", - "storageClassName": "The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable.", - "capacity": "Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThe semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable.", - "maximumVolumeSize": "MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThis is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim.", -} - -func (CSIStorageCapacity) SwaggerDoc() map[string]string { - return map_CSIStorageCapacity -} - -var map_CSIStorageCapacityList = map[string]string{ - "": "CSIStorageCapacityList is a collection of CSIStorageCapacity objects.", - "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "Items is the list of CSIStorageCapacity objects.", -} - -func (CSIStorageCapacityList) SwaggerDoc() map[string]string { - return map_CSIStorageCapacityList -} - var map_StorageClass = map[string]string{ "": "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", diff --git a/cluster-autoscaler/vendor/k8s.io/api/storage/v1/zz_generated.deepcopy.go b/cluster-autoscaler/vendor/k8s.io/api/storage/v1/zz_generated.deepcopy.go index b14b7fbcd878..300f42cbba4b 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/storage/v1/zz_generated.deepcopy.go +++ b/cluster-autoscaler/vendor/k8s.io/api/storage/v1/zz_generated.deepcopy.go @@ -23,7 +23,6 @@ package v1 import ( corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -249,80 +248,6 @@ func (in *CSINodeSpec) DeepCopy() *CSINodeSpec { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CSIStorageCapacity) DeepCopyInto(out *CSIStorageCapacity) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.NodeTopology != nil { - in, out := &in.NodeTopology, &out.NodeTopology - *out = new(metav1.LabelSelector) - (*in).DeepCopyInto(*out) - } - if in.Capacity != nil { - in, out := &in.Capacity, &out.Capacity - x := (*in).DeepCopy() - *out = &x - } - if in.MaximumVolumeSize != nil { - in, out := &in.MaximumVolumeSize, &out.MaximumVolumeSize - x := (*in).DeepCopy() - *out = &x - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIStorageCapacity. -func (in *CSIStorageCapacity) DeepCopy() *CSIStorageCapacity { - if in == nil { - return nil - } - out := new(CSIStorageCapacity) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CSIStorageCapacity) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CSIStorageCapacityList) DeepCopyInto(out *CSIStorageCapacityList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CSIStorageCapacity, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIStorageCapacityList. -func (in *CSIStorageCapacityList) DeepCopy() *CSIStorageCapacityList { - if in == nil { - return nil - } - out := new(CSIStorageCapacityList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CSIStorageCapacityList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *StorageClass) DeepCopyInto(out *StorageClass) { *out = *in diff --git a/cluster-autoscaler/vendor/k8s.io/api/storage/v1alpha1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/storage/v1alpha1/generated.pb.go index 1f3f380108ac..0c82ddad325c 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/storage/v1alpha1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/storage/v1alpha1/generated.pb.go @@ -288,65 +288,65 @@ func init() { } var fileDescriptor_10f856db1e670dc4 = []byte{ - // 925 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x3f, 0x6f, 0x23, 0x45, - 0x14, 0xf7, 0xc6, 0xce, 0x9d, 0x6f, 0x1c, 0xc0, 0x37, 0x32, 0x87, 0xe5, 0x93, 0xd6, 0x91, 0x2b, - 0x83, 0xb8, 0x59, 0x72, 0x20, 0x74, 0xa2, 0xf3, 0x26, 0x29, 0x22, 0x92, 0x00, 0xe3, 0x08, 0x21, - 0xa0, 0x60, 0xbc, 0x7e, 0xd8, 0x13, 0x7b, 0xff, 0x68, 0x67, 0x36, 0xc2, 0x54, 0x54, 0xd4, 0x74, - 0x7c, 0x03, 0x3e, 0x4b, 0x0a, 0x24, 0x4e, 0x54, 0x57, 0x59, 0x64, 0xf9, 0x0e, 0x14, 0x34, 0xa0, - 0x9d, 0x1d, 0xaf, 0x37, 0x5e, 0x27, 0xe7, 0x4b, 0x71, 0x9d, 0xdf, 0x9b, 0xf7, 0x7e, 0xbf, 0xf7, - 0xdf, 0x8b, 0x0e, 0x26, 0xcf, 0x04, 0xe1, 0xbe, 0x35, 0x89, 0x06, 0x10, 0x7a, 0x20, 0x41, 0x58, - 0x17, 0xe0, 0x0d, 0xfd, 0xd0, 0xd2, 0x0f, 0x2c, 0xe0, 0x96, 0x90, 0x7e, 0xc8, 0x46, 0x60, 0x5d, - 0xec, 0xb1, 0x69, 0x30, 0x66, 0x7b, 0xd6, 0x08, 0x3c, 0x08, 0x99, 0x84, 0x21, 0x09, 0x42, 0x5f, - 0xfa, 0xf8, 0x71, 0x6a, 0x4c, 0x58, 0xc0, 0x89, 0x36, 0x26, 0x0b, 0xe3, 0xd6, 0x93, 0x11, 0x97, - 0xe3, 0x68, 0x40, 0x1c, 0xdf, 0xb5, 0x46, 0xfe, 0xc8, 0xb7, 0x94, 0xcf, 0x20, 0xfa, 0x5e, 0x49, - 0x4a, 0x50, 0xbf, 0x52, 0xac, 0x56, 0x27, 0x47, 0xec, 0xf8, 0x61, 0xc2, 0xba, 0xca, 0xd7, 0xfa, - 0x68, 0x69, 0xe3, 0x32, 0x67, 0xcc, 0x3d, 0x08, 0x67, 0x56, 0x30, 0x19, 0x29, 0xa7, 0x10, 0x84, - 0x1f, 0x85, 0x0e, 0xbc, 0x92, 0x97, 0xb0, 0x5c, 0x90, 0x6c, 0x1d, 0x97, 0x75, 0x93, 0x57, 0x18, - 0x79, 0x92, 0xbb, 0x45, 0x9a, 0x8f, 0x5f, 0xe6, 0x20, 0x9c, 0x31, 0xb8, 0x6c, 0xd5, 0xaf, 0xf3, - 0x4f, 0x19, 0xe1, 0xfd, 0xfe, 0x51, 0x3f, 0xad, 0xdf, 0x3e, 0x0b, 0x98, 0xc3, 0xe5, 0x0c, 0x7f, - 0x87, 0xaa, 0x49, 0x68, 0x43, 0x26, 0x59, 0xd3, 0xd8, 0x35, 0xba, 0xb5, 0xa7, 0x1f, 0x90, 0x65, - 0xb9, 0x33, 0x06, 0x12, 0x4c, 0x46, 0x89, 0x42, 0x90, 0xc4, 0x9a, 0x5c, 0xec, 0x91, 0xcf, 0x06, - 0xe7, 0xe0, 0xc8, 0x13, 0x90, 0xcc, 0xc6, 0x97, 0xf3, 0x76, 0x29, 0x9e, 0xb7, 0xd1, 0x52, 0x47, - 0x33, 0x54, 0xcc, 0xd1, 0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0a, 0x7e, 0x17, 0xdd, 0x77, 0x41, 0x08, 0x36, 0xd2, 0xcc, 0xf6, 0x5b, - 0xda, 0xe8, 0xfe, 0x49, 0xaa, 0xa6, 0x8b, 0x77, 0xbb, 0x77, 0x79, 0x65, 0x96, 0x9e, 0x5f, 0x99, - 0xa5, 0x17, 0x57, 0x66, 0xe9, 0xa7, 0xd8, 0x34, 0x2e, 0x63, 0xd3, 0x78, 0x1e, 0x9b, 0xc6, 0x8b, - 0xd8, 0x34, 0xfe, 0x8a, 0x4d, 0xe3, 0x97, 0xbf, 0xcd, 0xd2, 0xd7, 0x8f, 0x6f, 0xf9, 0x0a, 0xfd, - 0x3f, 0x00, 0x00, 0xff, 0xff, 0x1a, 0x8d, 0x17, 0x01, 0xbc, 0x0a, 0x00, 0x00, + // 923 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0xe3, 0x44, + 0x14, 0x8f, 0x9b, 0x74, 0x37, 0x3b, 0x29, 0x90, 0x1d, 0x85, 0x25, 0x0a, 0x92, 0xb3, 0xca, 0x29, + 0x20, 0x76, 0x4c, 0x17, 0x84, 0x56, 0xdc, 0xea, 0xb6, 0x87, 0x8a, 0xb6, 0xc0, 0xa4, 0x42, 0x08, + 0x38, 0x30, 0x71, 0x1e, 0xce, 0x34, 0xf1, 0x1f, 0x79, 0xc6, 0x15, 0xe1, 0xc4, 0x89, 0x33, 0x37, + 0xbe, 0x01, 0x9f, 0xa5, 0x07, 0x24, 0x56, 0x9c, 0xf6, 0x14, 0x51, 0xf3, 0x1d, 0x38, 0x70, 0x01, + 0x79, 0x3c, 0x71, 0xdc, 0x38, 0x2d, 0xd9, 0x1e, 0xf6, 0xe6, 0xf7, 0xe6, 0xbd, 0xdf, 0xef, 0xfd, + 0x4f, 0xd0, 0xc1, 0xe4, 0x99, 0x20, 0x3c, 0xb0, 0x26, 0xf1, 0x10, 0x22, 0x1f, 0x24, 0x08, 0xeb, + 0x02, 0xfc, 0x51, 0x10, 0x59, 0xfa, 0x81, 0x85, 0xdc, 0x12, 0x32, 0x88, 0x98, 0x0b, 0xd6, 0xc5, + 0x2e, 0x9b, 0x86, 0x63, 0xb6, 0x6b, 0xb9, 0xe0, 0x43, 0xc4, 0x24, 0x8c, 0x48, 0x18, 0x05, 0x32, + 0xc0, 0x6f, 0x67, 0xc6, 0x84, 0x85, 0x9c, 0x68, 0x63, 0xb2, 0x30, 0xee, 0x3c, 0x71, 0xb9, 0x1c, + 0xc7, 0x43, 0xe2, 0x04, 0x9e, 0xe5, 0x06, 0x6e, 0x60, 0x29, 0x9f, 0x61, 0xfc, 0x9d, 0x92, 0x94, + 0xa0, 0xbe, 0x32, 0xac, 0x4e, 0xaf, 0x40, 0xec, 0x04, 0x51, 0xca, 0xba, 0xca, 0xd7, 0xf9, 0x70, + 0x69, 0xe3, 0x31, 0x67, 0xcc, 0x7d, 0x88, 0x66, 0x56, 0x38, 0x71, 0x95, 0x53, 0x04, 0x22, 0x88, + 0x23, 0x07, 0x5e, 0xca, 0x4b, 0x58, 0x1e, 0x48, 0xb6, 0x8e, 0xcb, 0xba, 0xc9, 0x2b, 0x8a, 0x7d, + 0xc9, 0xbd, 0x32, 0xcd, 0x47, 0xff, 0xe7, 0x20, 0x9c, 0x31, 0x78, 0x6c, 0xd5, 0xaf, 0xf7, 0x77, + 0x15, 0xe1, 0xfd, 0xc1, 0xd1, 0x20, 0xab, 0xdf, 0x3e, 0x0b, 0x99, 0xc3, 0xe5, 0x0c, 0x7f, 0x8b, + 0xea, 0x69, 0x68, 0x23, 0x26, 0x59, 0xdb, 0x78, 0x6c, 0xf4, 0x1b, 0x4f, 0xdf, 0x27, 0xcb, 0x72, + 0xe7, 0x0c, 0x24, 0x9c, 0xb8, 0xa9, 0x42, 0x90, 0xd4, 0x9a, 0x5c, 0xec, 0x92, 0x4f, 0x87, 0xe7, + 0xe0, 0xc8, 0x13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, 0xce, 0x94, 0x06, 0x22, + 0x9d, 0x46, 0x5e, 0xef, 0x3d, 0xad, 0xa7, 0xb9, 0x85, 0x9a, 0x21, 0x55, 0x8a, 0x35, 0x87, 0x75, + 0x83, 0x19, 0x52, 0xae, 0x85, 0x19, 0x52, 0x32, 0xd5, 0x90, 0x69, 0x28, 0xe9, 0x81, 0x2d, 0x1c, + 0xd2, 0x3c, 0x94, 0x53, 0xad, 0xa7, 0xb9, 0x45, 0xef, 0xdf, 0xea, 0x9a, 0x36, 0xa9, 0x61, 0x2c, + 0xe4, 0x34, 0x52, 0x39, 0xd5, 0x4b, 0x39, 0x8d, 0xf2, 0x9c, 0x46, 0xf8, 0x17, 0x03, 0x61, 0x96, + 0x43, 0x9c, 0x2c, 0x86, 0x35, 0x9b, 0xa8, 0x4f, 0xee, 0xb0, 0x24, 0x64, 0xaf, 0x84, 0x76, 0xe8, + 0xcb, 0x68, 0x66, 0x77, 0x74, 0x14, 0xb8, 0x6c, 0x40, 0xd7, 0x84, 0x80, 0xcf, 0x51, 0x23, 0xd3, + 0x1e, 0x46, 0x51, 0x10, 0xe9, 0xb5, 0xed, 0x6f, 0x10, 0x91, 0xb2, 0xb7, 0xcd, 0x64, 0xde, 0x6d, + 0xec, 0x2d, 0x01, 0xfe, 0x99, 0x77, 0x1b, 0x85, 0x77, 0x5a, 0x04, 0x4f, 0xb9, 0x46, 0xb0, 0xe4, + 0xaa, 0xdd, 0x85, 0xeb, 0x00, 0x6e, 0xe6, 0x2a, 0x80, 0x77, 0x0e, 0xd1, 0x5b, 0x37, 0x94, 0x08, + 0x37, 0x51, 0x75, 0x02, 0xb3, 0x6c, 0x12, 0x69, 0xfa, 0x89, 0x5b, 0x68, 0xfb, 0x82, 0x4d, 0xe3, + 0x6c, 0xe2, 0x1e, 0xd0, 0x4c, 0xf8, 0x78, 0xeb, 0x99, 0xd1, 0xfb, 0xc9, 0x40, 0x45, 0x0e, 0x7c, + 0x8c, 0x6a, 0xe9, 0x7f, 0x12, 0x7d, 0x66, 0xde, 0xdd, 0xec, 0xcc, 0x9c, 0x71, 0x0f, 0x96, 0xe7, + 0x32, 0x95, 0xa8, 0x42, 0xc1, 0xef, 0xa0, 0xfb, 0x1e, 0x08, 0xc1, 0x5c, 0xcd, 0x6c, 0xbf, 0xa1, + 0x8d, 0xee, 0x9f, 0x64, 0x6a, 0xba, 0x78, 0xb7, 0xc9, 0xe5, 0x95, 0x59, 0x79, 0x7e, 0x65, 0x56, + 0x5e, 0x5c, 0x99, 0x95, 0x1f, 0x13, 0xd3, 0xb8, 0x4c, 0x4c, 0xe3, 0x79, 0x62, 0x1a, 0x2f, 0x12, + 0xd3, 0xf8, 0x33, 0x31, 0x8d, 0x9f, 0xff, 0x32, 0x2b, 0x5f, 0xd5, 0x17, 0x85, 0xfb, 0x2f, 0x00, + 0x00, 0xff, 0xff, 0x95, 0x04, 0x69, 0x56, 0xa9, 0x0a, 0x00, 0x00, } func (m *CSIStorageCapacity) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/storage/v1alpha1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/storage/v1alpha1/generated.proto index a5345122607d..78cd16df2339 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/storage/v1alpha1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/storage/v1alpha1/generated.proto @@ -28,7 +28,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/storage/v1alpha1"; +option go_package = "v1alpha1"; // CSIStorageCapacity stores the result of one CSI GetCapacity call. // For a given StorageClass, this describes the available capacity in a @@ -47,13 +47,9 @@ option go_package = "k8s.io/api/storage/v1alpha1"; // // The producer of these objects can decide which approach is more suitable. // -// They are consumed by the kube-scheduler when a CSI driver opts into -// capacity-aware scheduling with CSIDriverSpec.StorageCapacity. The scheduler -// compares the MaximumVolumeSize against the requested size of pending volumes -// to filter out unsuitable nodes. If MaximumVolumeSize is unset, it falls back -// to a comparison against the less precise Capacity. If that is also unset, -// the scheduler assumes that capacity is insufficient and tries some other -// node. +// They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate +// is enabled there and a CSI driver opts into capacity-aware scheduling with +// CSIDriver.StorageCapacity. message CSIStorageCapacity { // Standard object's metadata. The name has no particular meaning. It must be // be a DNS subdomain (dots allowed, 253 characters). To ensure that @@ -91,7 +87,7 @@ message CSIStorageCapacity { // The semantic is currently (CSI spec 1.2) defined as: // The available capacity, in bytes, of the storage that can be used // to provision volumes. If not set, that information is currently - // unavailable. + // unavailable and treated like zero capacity. // // +optional optional k8s.io.apimachinery.pkg.api.resource.Quantity capacity = 4; diff --git a/cluster-autoscaler/vendor/k8s.io/api/storage/v1alpha1/types.go b/cluster-autoscaler/vendor/k8s.io/api/storage/v1alpha1/types.go index fe8c9e3cd0ae..afb0495db541 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/storage/v1alpha1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/api/storage/v1alpha1/types.go @@ -17,7 +17,7 @@ limitations under the License. package v1alpha1 import ( - v1 "k8s.io/api/core/v1" + "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -165,13 +165,9 @@ type VolumeError struct { // // The producer of these objects can decide which approach is more suitable. // -// They are consumed by the kube-scheduler when a CSI driver opts into -// capacity-aware scheduling with CSIDriverSpec.StorageCapacity. The scheduler -// compares the MaximumVolumeSize against the requested size of pending volumes -// to filter out unsuitable nodes. If MaximumVolumeSize is unset, it falls back -// to a comparison against the less precise Capacity. If that is also unset, -// the scheduler assumes that capacity is insufficient and tries some other -// node. +// They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate +// is enabled there and a CSI driver opts into capacity-aware scheduling with +// CSIDriver.StorageCapacity. type CSIStorageCapacity struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. The name has no particular meaning. It must be @@ -210,7 +206,7 @@ type CSIStorageCapacity struct { // The semantic is currently (CSI spec 1.2) defined as: // The available capacity, in bytes, of the storage that can be used // to provision volumes. If not set, that information is currently - // unavailable. + // unavailable and treated like zero capacity. // // +optional Capacity *resource.Quantity `json:"capacity,omitempty" protobuf:"bytes,4,opt,name=capacity"` diff --git a/cluster-autoscaler/vendor/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go b/cluster-autoscaler/vendor/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go index a228a3fec7f5..fa50e02896b1 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go +++ b/cluster-autoscaler/vendor/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go @@ -28,11 +28,11 @@ package v1alpha1 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_CSIStorageCapacity = map[string]string{ - "": "CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes.\n\nFor example this can express things like: - StorageClass \"standard\" has \"1234 GiB\" available in \"topology.kubernetes.io/zone=us-east1\" - StorageClass \"localssd\" has \"10 GiB\" available in \"kubernetes.io/hostname=knode-abc123\"\n\nThe following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero\n\nThe producer of these objects can decide which approach is more suitable.\n\nThey are consumed by the kube-scheduler when a CSI driver opts into capacity-aware scheduling with CSIDriverSpec.StorageCapacity. The scheduler compares the MaximumVolumeSize against the requested size of pending volumes to filter out unsuitable nodes. If MaximumVolumeSize is unset, it falls back to a comparison against the less precise Capacity. If that is also unset, the scheduler assumes that capacity is insufficient and tries some other node.", + "": "CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes.\n\nFor example this can express things like: - StorageClass \"standard\" has \"1234 GiB\" available in \"topology.kubernetes.io/zone=us-east1\" - StorageClass \"localssd\" has \"10 GiB\" available in \"kubernetes.io/hostname=knode-abc123\"\n\nThe following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero\n\nThe producer of these objects can decide which approach is more suitable.\n\nThey are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity.", "metadata": "Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name.\n\nObjects are namespaced.\n\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "nodeTopology": "NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable.", "storageClassName": "The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable.", - "capacity": "Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThe semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable.", + "capacity": "Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThe semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity.", "maximumVolumeSize": "MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThis is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim.", } diff --git a/cluster-autoscaler/vendor/k8s.io/api/storage/v1beta1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/api/storage/v1beta1/generated.pb.go index 379ce8f1836a..72b04d2733dc 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/storage/v1beta1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/api/storage/v1beta1/generated.pb.go @@ -609,111 +609,111 @@ func init() { } var fileDescriptor_7d2980599fd0de80 = []byte{ - // 1654 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcd, 0x6f, 0x1b, 0x37, - 0x16, 0xf7, 0x58, 0xf2, 0x17, 0x65, 0xc7, 0x36, 0xed, 0x64, 0xb5, 0x3a, 0x48, 0x86, 0x16, 0xbb, - 0x71, 0x82, 0xec, 0x28, 0xf1, 0x66, 0x83, 0x20, 0x40, 0x80, 0xf5, 0xd8, 0xde, 0x8d, 0x12, 0xcb, - 0x71, 0x28, 0x23, 0x08, 0x82, 0x3d, 0x2c, 0x35, 0x43, 0xcb, 0x8c, 0x35, 0x1f, 0x19, 0x52, 0xde, - 0xa8, 0xa7, 0xf6, 0xd2, 0x73, 0xd1, 0x43, 0xef, 0x05, 0xfa, 0x2f, 0xb4, 0x40, 0x7b, 0xe9, 0xb1, - 0x01, 0x0a, 0x14, 0x41, 0x4f, 0x39, 0x09, 0x8d, 0xfa, 0x27, 0x14, 0xe8, 0xc1, 0xe8, 0xa1, 0x20, - 0x87, 0xd2, 0x7c, 0x49, 0xb1, 0xdd, 0x83, 0x6e, 0xe2, 0xfb, 0xf8, 0xbd, 0x47, 0xf2, 0xf7, 0x1e, - 0xdf, 0x08, 0x6c, 0x1d, 0xdf, 0x65, 0x3a, 0x75, 0x2b, 0xc7, 0xed, 0x06, 0xf1, 0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, 0xe3, - 0x5a, 0xa4, 0xba, 0x2d, 0x13, 0x98, 0x33, 0x2e, 0x29, 0x9b, 0xe9, 0x3d, 0x29, 0x45, 0x4a, 0x0b, - 0x6f, 0x83, 0x79, 0xee, 0x7a, 0x6e, 0xcb, 0x6d, 0x76, 0x1e, 0x91, 0x4e, 0x9f, 0xa6, 0x4b, 0xbd, - 0x6e, 0x69, 0xfe, 0x20, 0x22, 0x47, 0x31, 0x2b, 0xd8, 0x00, 0x39, 0xdc, 0x6a, 0xb9, 0x26, 0xe6, - 0xb8, 0xd1, 0x22, 0x92, 0x7b, 0xb9, 0x8d, 0xca, 0xfb, 0xf6, 0x18, 0x70, 0x5b, 0x04, 0x47, 0xaa, - 0xb7, 0x33, 0x63, 0xb1, 0xd7, 0x2d, 0xe5, 0x36, 0x43, 0x1c, 0x14, 0x05, 0x2d, 0x7f, 0xa9, 0x81, - 0x9c, 0xda, 0xf5, 0x18, 0x9a, 0xd1, 0x83, 0x78, 0x33, 0xfa, 0xcb, 0x39, 0xee, 0x6b, 0x44, 0x2b, - 0x32, 0x07, 0x69, 0xcb, 0x3e, 0x74, 0x00, 0x66, 0x2c, 0x79, 0x69, 0x2c, 0xaf, 0x49, 0xe8, 0x6b, - 0xe7, 0x80, 0x56, 0xbd, 0x6e, 0x51, 0x05, 0x98, 0x09, 0xd6, 0x0c, 0xf5, 0xa1, 0xca, 0xbf, 0x66, - 0x00, 0xdc, 0xaa, 0x57, 0x13, 0x95, 0x3e, 0x06, 0x5a, 0x53, 0x30, 0x2f, 0x98, 0xd3, 0xe7, 0x86, - 0xa2, 0xf7, 0x3f, 0xce, 0x79, 0x13, 0xb8, 0x41, 0x5a, 0x75, 0xd2, 0x22, 0x26, 0x77, 0xfd, 0x80, - 0x64, 0x7b, 0x11, 0x30, 0x14, 0x83, 0x86, 0xdb, 0x60, 0xa9, 0xdf, 0xb8, 0x5a, 0x98, 0x31, 0x41, - 0xee, 0x7c, 0x46, 0x92, 0x39, 0xaf, 0x52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 0x7c, 0x44, 0x42, 0x53, 0xc6, 0x9c, 0xe8, 0x32, 0x5b, 0xf2, 0x7f, 0x9e, 0x40, 0x6e, 0xfc, 0xeb, - 0xf5, 0xbb, 0xe2, 0xc4, 0x9b, 0x77, 0xc5, 0x89, 0xb7, 0xef, 0x8a, 0x13, 0x1f, 0xf6, 0x8a, 0xda, - 0xeb, 0x5e, 0x51, 0x7b, 0xd3, 0x2b, 0x6a, 0x6f, 0x7b, 0x45, 0xed, 0xa7, 0x5e, 0x51, 0xfb, 0xe4, - 0xe7, 0xe2, 0xc4, 0xf3, 0xc2, 0xe8, 0xff, 0x5d, 0x7f, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x91, 0x4f, - 0x2f, 0xc0, 0xad, 0x15, 0x00, 0x00, + // 1651 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x3b, 0x6f, 0x1b, 0xc7, + 0x16, 0xd6, 0x8a, 0xd4, 0x6b, 0x28, 0x59, 0xd2, 0x48, 0xf6, 0xe5, 0x55, 0x41, 0x0a, 0xbc, 0xb8, + 0xd7, 0xb2, 0x61, 0x2f, 0x6d, 0x5d, 0xc7, 0x30, 0x0c, 0xb8, 0xd0, 0x4a, 0x4a, 0x4c, 0x5b, 0x94, + 0xe5, 0xa1, 0x60, 0x18, 0x46, 0x8a, 0x0c, 0x77, 0x47, 0xd4, 0x58, 0xdc, 0x87, 0x77, 0x86, 0x8a, + 0x99, 0x2a, 0x69, 0x52, 0x07, 0x29, 0xd2, 0x07, 0xc8, 0x5f, 0x48, 0x80, 0xa4, 0x49, 0x19, 0x03, + 0x01, 0x02, 0x23, 0x95, 0x2b, 0x22, 0x66, 0x7e, 0x42, 0x80, 0x14, 0x42, 0x8a, 0x60, 0x66, 0x87, + 0xdc, 0x17, 0x69, 0x49, 0x29, 0xd8, 0x69, 0xcf, 0xe3, 0x3b, 0x67, 0xe6, 0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 0xcd, 0x26, 0xa9, 0xba, 0x16, 0x61, 0xf9, 0xcc, + 0x6a, 0x66, 0x6d, 0xc6, 0x28, 0x77, 0x3b, 0xc5, 0xe5, 0x27, 0x03, 0xf4, 0x27, 0x9d, 0xe2, 0xd2, + 0x00, 0x39, 0x1a, 0x08, 0x06, 0xef, 0x81, 0x79, 0x75, 0x43, 0x9b, 0xd8, 0xc3, 0x26, 0xe5, 0xed, + 0x7c, 0x56, 0x66, 0xb8, 0xd4, 0xed, 0x14, 0xe7, 0x6b, 0x71, 0x15, 0x4a, 0xda, 0xc2, 0xfb, 0x60, + 0xee, 0x80, 0x7d, 0xe0, 0xbb, 0x2d, 0x6f, 0xcf, 0x6d, 0x52, 0xb3, 0x9d, 0x9f, 0x58, 0xd5, 0xd6, + 0x66, 0x8c, 0x52, 0xb7, 0x53, 0x9c, 0x7b, 0xbf, 0x16, 0x51, 0x9c, 0x24, 0x05, 0x28, 0xee, 0x08, + 0x09, 0x98, 0xe3, 0xee, 0x11, 0x71, 0xc4, 0xd5, 0x11, 0xc6, 0x59, 0x7e, 0x52, 0xd6, 0x72, 0xed, + 0x5d, 0xb5, 0xdc, 0x8f, 0x38, 0x18, 0x17, 0x55, 0x39, 0xe7, 0xa2, 0x52, 0x86, 0xe2, 0xa8, 0x70, + 0x13, 0x2c, 0xfa, 0x41, 0x71, 0x18, 0x22, 0x5e, 0xab, 0xde, 0xa4, 0xec, 0x30, 0x3f, 0x25, 0x4f, + 0x7c, 0xb1, 0xdb, 0x29, 0x2e, 0xa2, 0xa4, 0x12, 0xa5, 0xed, 0x4b, 0xdf, 0x69, 0x60, 0x6a, 0xb3, + 0x56, 0xd9, 0x75, 0x2d, 0x32, 0x82, 0xd6, 0xac, 0xc4, 0x5a, 0xf3, 0xf2, 0x29, 0xe4, 0x16, 0x49, + 0x0d, 0x6d, 0xcc, 0x3f, 0x82, 0xc6, 0x14, 0x36, 0x6a, 0xb2, 0xac, 0x82, 0xac, 0x83, 0x6d, 0x22, +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x1b, 0x2c, 0x0d, 0xf8, 0x49, 0x0a, 0x8b, 0x60, 0xc2, 0x94, 0xff, 0xf0, 0x11, + 0x09, 0x4d, 0x18, 0x33, 0x62, 0xca, 0x6c, 0xca, 0xff, 0xf3, 0x04, 0x72, 0xe3, 0xfa, 0xab, 0xb7, + 0x85, 0xb1, 0xd7, 0x6f, 0x0b, 0x63, 0x6f, 0xde, 0x16, 0xc6, 0x3e, 0xed, 0x16, 0xb4, 0x57, 0xdd, + 0x82, 0xf6, 0xba, 0x5b, 0xd0, 0xde, 0x74, 0x0b, 0xda, 0x6f, 0xdd, 0x82, 0xf6, 0xc5, 0xef, 0x85, + 0xb1, 0x67, 0x53, 0xea, 0xbe, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xce, 0xa8, 0xf1, 0x40, 0x9a, + 0x15, 0x00, 0x00, } func (m *CSIDriver) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/api/storage/v1beta1/generated.proto b/cluster-autoscaler/vendor/k8s.io/api/storage/v1beta1/generated.proto index 943900fa6902..bfe8280d53c3 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/storage/v1beta1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/api/storage/v1beta1/generated.proto @@ -28,7 +28,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/api/storage/v1beta1"; +option go_package = "v1beta1"; // CSIDriver captures information about a Container Storage Interface (CSI) // volume driver deployed on the cluster. @@ -146,7 +146,11 @@ message CSIDriverSpec { // // This field was immutable in Kubernetes <= 1.22 and now is mutable. // + // This is a beta field and only available when the CSIStorageCapacity + // feature is enabled. The default is false. + // // +optional + // +featureGate=CSIStorageCapacity optional bool storageCapacity = 4; // Defines if the underlying volume supports changing ownership and @@ -286,13 +290,9 @@ message CSINodeSpec { // // The producer of these objects can decide which approach is more suitable. // -// They are consumed by the kube-scheduler when a CSI driver opts into -// capacity-aware scheduling with CSIDriverSpec.StorageCapacity. The scheduler -// compares the MaximumVolumeSize against the requested size of pending volumes -// to filter out unsuitable nodes. If MaximumVolumeSize is unset, it falls back -// to a comparison against the less precise Capacity. If that is also unset, -// the scheduler assumes that capacity is insufficient and tries some other -// node. +// They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate +// is enabled there and a CSI driver opts into capacity-aware scheduling with +// CSIDriver.StorageCapacity. message CSIStorageCapacity { // Standard object's metadata. The name has no particular meaning. It must be // be a DNS subdomain (dots allowed, 253 characters). To ensure that @@ -330,7 +330,7 @@ message CSIStorageCapacity { // The semantic is currently (CSI spec 1.2) defined as: // The available capacity, in bytes, of the storage that can be used // to provision volumes. If not set, that information is currently - // unavailable. + // unavailable and treated like zero capacity. // // +optional optional k8s.io.apimachinery.pkg.api.resource.Quantity capacity = 4; diff --git a/cluster-autoscaler/vendor/k8s.io/api/storage/v1beta1/types.go b/cluster-autoscaler/vendor/k8s.io/api/storage/v1beta1/types.go index b39414b96059..524d8b53414b 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/storage/v1beta1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/api/storage/v1beta1/types.go @@ -364,7 +364,11 @@ type CSIDriverSpec struct { // // This field was immutable in Kubernetes <= 1.22 and now is mutable. // + // This is a beta field and only available when the CSIStorageCapacity + // feature is enabled. The default is false. + // // +optional + // +featureGate=CSIStorageCapacity StorageCapacity *bool `json:"storageCapacity,omitempty" protobuf:"bytes,4,opt,name=storageCapacity"` // Defines if the underlying volume supports changing ownership and @@ -584,8 +588,6 @@ type CSINodeList struct { // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.21 -// +k8s:prerelease-lifecycle-gen:deprecated=1.24 -// +k8s:prerelease-lifecycle-gen:replacement=storage.k8s.io,v1,CSIStorageCapacity // CSIStorageCapacity stores the result of one CSI GetCapacity call. // For a given StorageClass, this describes the available capacity in a @@ -604,13 +606,9 @@ type CSINodeList struct { // // The producer of these objects can decide which approach is more suitable. // -// They are consumed by the kube-scheduler when a CSI driver opts into -// capacity-aware scheduling with CSIDriverSpec.StorageCapacity. The scheduler -// compares the MaximumVolumeSize against the requested size of pending volumes -// to filter out unsuitable nodes. If MaximumVolumeSize is unset, it falls back -// to a comparison against the less precise Capacity. If that is also unset, -// the scheduler assumes that capacity is insufficient and tries some other -// node. +// They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate +// is enabled there and a CSI driver opts into capacity-aware scheduling with +// CSIDriver.StorageCapacity. type CSIStorageCapacity struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. The name has no particular meaning. It must be @@ -649,7 +647,7 @@ type CSIStorageCapacity struct { // The semantic is currently (CSI spec 1.2) defined as: // The available capacity, in bytes, of the storage that can be used // to provision volumes. If not set, that information is currently - // unavailable. + // unavailable and treated like zero capacity. // // +optional Capacity *resource.Quantity `json:"capacity,omitempty" protobuf:"bytes,4,opt,name=capacity"` @@ -671,8 +669,6 @@ type CSIStorageCapacity struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.21 -// +k8s:prerelease-lifecycle-gen:deprecated=1.24 -// +k8s:prerelease-lifecycle-gen:replacement=storage.k8s.io,v1,CSIStorageCapacityList // CSIStorageCapacityList is a collection of CSIStorageCapacity objects. type CSIStorageCapacityList struct { diff --git a/cluster-autoscaler/vendor/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go b/cluster-autoscaler/vendor/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go index d810b4e4c8bb..f4dbf0fefa74 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go +++ b/cluster-autoscaler/vendor/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go @@ -52,7 +52,7 @@ var map_CSIDriverSpec = map[string]string{ "attachRequired": "attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called.\n\nThis field is immutable.", "podInfoOnMount": "If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \"csi.storage.k8s.io/pod.name\": pod.Name \"csi.storage.k8s.io/pod.namespace\": pod.Namespace \"csi.storage.k8s.io/pod.uid\": string(pod.UID) \"csi.storage.k8s.io/ephemeral\": \"true\" if the volume is an ephemeral inline volume\n defined by a CSIVolumeSource, otherwise \"false\"\n\n\"csi.storage.k8s.io/ephemeral\" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \"Persistent\" and \"Ephemeral\" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver.\n\nThis field is immutable.", "volumeLifecycleModes": "VolumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \"Persistent\", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is \"Ephemeral\". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future.\n\nThis field is immutable.", - "storageCapacity": "If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information.\n\nThe check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.\n\nAlternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.\n\nThis field was immutable in Kubernetes <= 1.22 and now is mutable.", + "storageCapacity": "If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information.\n\nThe check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.\n\nAlternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.\n\nThis field was immutable in Kubernetes <= 1.22 and now is mutable.\n\nThis is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false.", "fsGroupPolicy": "Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. Refer to the specific FSGroupPolicy values for additional details.\n\nThis field is immutable.\n\nDefaults to ReadWriteOnceWithFSType, which will examine each volume to determine if Kubernetes should modify ownership and permissions of the volume. With the default policy the defined fsGroup will only be applied if a fstype is defined and the volume's access mode contains ReadWriteOnce.", "tokenRequests": "TokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: \"csi.storage.k8s.io/serviceAccount.tokens\": {\n \"\": {\n \"token\": ,\n \"expirationTimestamp\": ,\n },\n ...\n}\n\nNote: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically.", "requiresRepublish": "RequiresRepublish indicates the CSI driver wants `NodePublishVolume` being periodically called to reflect any possible change in the mounted volume. This field defaults to false.\n\nNote: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container.", @@ -104,11 +104,11 @@ func (CSINodeSpec) SwaggerDoc() map[string]string { } var map_CSIStorageCapacity = map[string]string{ - "": "CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes.\n\nFor example this can express things like: - StorageClass \"standard\" has \"1234 GiB\" available in \"topology.kubernetes.io/zone=us-east1\" - StorageClass \"localssd\" has \"10 GiB\" available in \"kubernetes.io/hostname=knode-abc123\"\n\nThe following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero\n\nThe producer of these objects can decide which approach is more suitable.\n\nThey are consumed by the kube-scheduler when a CSI driver opts into capacity-aware scheduling with CSIDriverSpec.StorageCapacity. The scheduler compares the MaximumVolumeSize against the requested size of pending volumes to filter out unsuitable nodes. If MaximumVolumeSize is unset, it falls back to a comparison against the less precise Capacity. If that is also unset, the scheduler assumes that capacity is insufficient and tries some other node.", + "": "CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes.\n\nFor example this can express things like: - StorageClass \"standard\" has \"1234 GiB\" available in \"topology.kubernetes.io/zone=us-east1\" - StorageClass \"localssd\" has \"10 GiB\" available in \"kubernetes.io/hostname=knode-abc123\"\n\nThe following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero\n\nThe producer of these objects can decide which approach is more suitable.\n\nThey are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity.", "metadata": "Standard object's metadata. The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name.\n\nObjects are namespaced.\n\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "nodeTopology": "NodeTopology defines which nodes have access to the storage for which capacity was reported. If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable.", "storageClassName": "The name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable.", - "capacity": "Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThe semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable.", + "capacity": "Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThe semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity.", "maximumVolumeSize": "MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.\n\nThis is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim.", } diff --git a/cluster-autoscaler/vendor/k8s.io/api/storage/v1beta1/zz_generated.prerelease-lifecycle.go b/cluster-autoscaler/vendor/k8s.io/api/storage/v1beta1/zz_generated.prerelease-lifecycle.go index c5d23e7d45e1..7b69b2cbca33 100644 --- a/cluster-autoscaler/vendor/k8s.io/api/storage/v1beta1/zz_generated.prerelease-lifecycle.go +++ b/cluster-autoscaler/vendor/k8s.io/api/storage/v1beta1/zz_generated.prerelease-lifecycle.go @@ -133,12 +133,6 @@ func (in *CSIStorageCapacity) APILifecycleDeprecated() (major, minor int) { return 1, 24 } -// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. -// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. -func (in *CSIStorageCapacity) APILifecycleReplacement() schema.GroupVersionKind { - return schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1", Kind: "CSIStorageCapacity"} -} - // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *CSIStorageCapacity) APILifecycleRemoved() (major, minor int) { @@ -157,12 +151,6 @@ func (in *CSIStorageCapacityList) APILifecycleDeprecated() (major, minor int) { return 1, 24 } -// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. -// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. -func (in *CSIStorageCapacityList) APILifecycleReplacement() schema.GroupVersionKind { - return schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1", Kind: "CSIStorageCapacityList"} -} - // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *CSIStorageCapacityList) APILifecycleRemoved() (major, minor int) { diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/errors/OWNERS b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/errors/OWNERS index 155648acb6df..d4c73022fe88 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/errors/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/errors/OWNERS @@ -1,17 +1,20 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - thockin - - lavalamp - - smarterclayton - - wojtek-t - - deads2k - - derekwaynecarr - - caesarxuchao - - mikedanese - - liggitt - - saad-ali - - janetkuo - - tallclair - - dims - - cjcullen +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- brendandburns +- derekwaynecarr +- caesarxuchao +- mikedanese +- liggitt +- saad-ali +- janetkuo +- tallclair +- dims +- hongchaodeng +- krousey +- cjcullen diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/errors/errors.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/errors/errors.go index fab187a6a092..97e17be3941a 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/errors/errors.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/errors/errors.go @@ -523,7 +523,7 @@ func NewGenericServerResponse(code int, verb string, qualifiedResource schema.Gr } // IsNotFound returns true if the specified error was created by NewNotFound. -// It supports wrapped errors and returns false when the error is nil. +// It supports wrapped errors. func IsNotFound(err error) bool { reason, code := reasonAndCodeForError(err) if reason == metav1.StatusReasonNotFound { @@ -536,13 +536,13 @@ func IsNotFound(err error) bool { } // IsAlreadyExists determines if the err is an error which indicates that a specified resource already exists. -// It supports wrapped errors and returns false when the error is nil. +// It supports wrapped errors. func IsAlreadyExists(err error) bool { return ReasonForError(err) == metav1.StatusReasonAlreadyExists } // IsConflict determines if the err is an error which indicates the provided update conflicts. -// It supports wrapped errors and returns false when the error is nil. +// It supports wrapped errors. func IsConflict(err error) bool { reason, code := reasonAndCodeForError(err) if reason == metav1.StatusReasonConflict { @@ -555,7 +555,7 @@ func IsConflict(err error) bool { } // IsInvalid determines if the err is an error which indicates the provided resource is not valid. -// It supports wrapped errors and returns false when the error is nil. +// It supports wrapped errors. func IsInvalid(err error) bool { reason, code := reasonAndCodeForError(err) if reason == metav1.StatusReasonInvalid { @@ -568,7 +568,7 @@ func IsInvalid(err error) bool { } // IsGone is true if the error indicates the requested resource is no longer available. -// It supports wrapped errors and returns false when the error is nil. +// It supports wrapped errors. func IsGone(err error) bool { reason, code := reasonAndCodeForError(err) if reason == metav1.StatusReasonGone { @@ -582,13 +582,13 @@ func IsGone(err error) bool { // IsResourceExpired is true if the error indicates the resource has expired and the current action is // no longer possible. -// It supports wrapped errors and returns false when the error is nil. +// It supports wrapped errors. func IsResourceExpired(err error) bool { return ReasonForError(err) == metav1.StatusReasonExpired } // IsNotAcceptable determines if err is an error which indicates that the request failed due to an invalid Accept header -// It supports wrapped errors and returns false when the error is nil. +// It supports wrapped errors. func IsNotAcceptable(err error) bool { reason, code := reasonAndCodeForError(err) if reason == metav1.StatusReasonNotAcceptable { @@ -601,7 +601,7 @@ func IsNotAcceptable(err error) bool { } // IsUnsupportedMediaType determines if err is an error which indicates that the request failed due to an invalid Content-Type header -// It supports wrapped errors and returns false when the error is nil. +// It supports wrapped errors. func IsUnsupportedMediaType(err error) bool { reason, code := reasonAndCodeForError(err) if reason == metav1.StatusReasonUnsupportedMediaType { @@ -615,7 +615,7 @@ func IsUnsupportedMediaType(err error) bool { // IsMethodNotSupported determines if the err is an error which indicates the provided action could not // be performed because it is not supported by the server. -// It supports wrapped errors and returns false when the error is nil. +// It supports wrapped errors. func IsMethodNotSupported(err error) bool { reason, code := reasonAndCodeForError(err) if reason == metav1.StatusReasonMethodNotAllowed { @@ -628,7 +628,7 @@ func IsMethodNotSupported(err error) bool { } // IsServiceUnavailable is true if the error indicates the underlying service is no longer available. -// It supports wrapped errors and returns false when the error is nil. +// It supports wrapped errors. func IsServiceUnavailable(err error) bool { reason, code := reasonAndCodeForError(err) if reason == metav1.StatusReasonServiceUnavailable { @@ -641,7 +641,7 @@ func IsServiceUnavailable(err error) bool { } // IsBadRequest determines if err is an error which indicates that the request is invalid. -// It supports wrapped errors and returns false when the error is nil. +// It supports wrapped errors. func IsBadRequest(err error) bool { reason, code := reasonAndCodeForError(err) if reason == metav1.StatusReasonBadRequest { @@ -655,7 +655,7 @@ func IsBadRequest(err error) bool { // IsUnauthorized determines if err is an error which indicates that the request is unauthorized and // requires authentication by the user. -// It supports wrapped errors and returns false when the error is nil. +// It supports wrapped errors. func IsUnauthorized(err error) bool { reason, code := reasonAndCodeForError(err) if reason == metav1.StatusReasonUnauthorized { @@ -669,7 +669,7 @@ func IsUnauthorized(err error) bool { // IsForbidden determines if err is an error which indicates that the request is forbidden and cannot // be completed as requested. -// It supports wrapped errors and returns false when the error is nil. +// It supports wrapped errors. func IsForbidden(err error) bool { reason, code := reasonAndCodeForError(err) if reason == metav1.StatusReasonForbidden { @@ -683,7 +683,7 @@ func IsForbidden(err error) bool { // IsTimeout determines if err is an error which indicates that request times out due to long // processing. -// It supports wrapped errors and returns false when the error is nil. +// It supports wrapped errors. func IsTimeout(err error) bool { reason, code := reasonAndCodeForError(err) if reason == metav1.StatusReasonTimeout { @@ -697,7 +697,7 @@ func IsTimeout(err error) bool { // IsServerTimeout determines if err is an error which indicates that the request needs to be retried // by the client. -// It supports wrapped errors and returns false when the error is nil. +// It supports wrapped errors. func IsServerTimeout(err error) bool { // do not check the status code, because no https status code exists that can // be scoped to retryable timeouts. @@ -705,7 +705,7 @@ func IsServerTimeout(err error) bool { } // IsInternalError determines if err is an error which indicates an internal server error. -// It supports wrapped errors and returns false when the error is nil. +// It supports wrapped errors. func IsInternalError(err error) bool { reason, code := reasonAndCodeForError(err) if reason == metav1.StatusReasonInternalError { @@ -719,7 +719,7 @@ func IsInternalError(err error) bool { // IsTooManyRequests determines if err is an error which indicates that there are too many requests // that the server cannot handle. -// It supports wrapped errors and returns false when the error is nil. +// It supports wrapped errors. func IsTooManyRequests(err error) bool { reason, code := reasonAndCodeForError(err) if reason == metav1.StatusReasonTooManyRequests { @@ -737,7 +737,7 @@ func IsTooManyRequests(err error) bool { // IsRequestEntityTooLargeError determines if err is an error which indicates // the request entity is too large. -// It supports wrapped errors and returns false when the error is nil. +// It supports wrapped errors. func IsRequestEntityTooLargeError(err error) bool { reason, code := reasonAndCodeForError(err) if reason == metav1.StatusReasonRequestEntityTooLarge { @@ -755,7 +755,7 @@ func IsRequestEntityTooLargeError(err error) bool { // IsUnexpectedServerError returns true if the server response was not in the expected API format, // and may be the result of another HTTP actor. -// It supports wrapped errors and returns false when the error is nil. +// It supports wrapped errors. func IsUnexpectedServerError(err error) bool { if status := APIStatus(nil); errors.As(err, &status) && status.Status().Details != nil { for _, cause := range status.Status().Details.Causes { @@ -768,7 +768,7 @@ func IsUnexpectedServerError(err error) bool { } // IsUnexpectedObjectError determines if err is due to an unexpected object from the master. -// It supports wrapped errors and returns false when the error is nil. +// It supports wrapped errors. func IsUnexpectedObjectError(err error) bool { uoe := &UnexpectedObjectError{} return err != nil && errors.As(err, &uoe) @@ -778,7 +778,7 @@ func IsUnexpectedObjectError(err error) bool { // suggested seconds to wait, or false if the error does not imply a wait. It does not // address whether the error *should* be retried, since some errors (like a 3xx) may // request delay without retry. -// It supports wrapped errors and returns false when the error is nil. +// It supports wrapped errors. func SuggestsClientDelay(err error) (int, bool) { if t := APIStatus(nil); errors.As(err, &t) && t.Status().Details != nil { switch t.Status().Reason { @@ -795,8 +795,7 @@ func SuggestsClientDelay(err error) (int, bool) { } // ReasonForError returns the HTTP status for a particular error. -// It supports wrapped errors and returns StatusReasonUnknown when -// the error is nil or doesn't have a status. +// It supports wrapped errors. func ReasonForError(err error) metav1.StatusReason { if status := APIStatus(nil); errors.As(err, &status) { return status.Status().Reason diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/meta/OWNERS b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/meta/OWNERS index 1e1330fff279..f929e061d2d7 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/meta/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/meta/OWNERS @@ -1,14 +1,18 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - thockin - - smarterclayton - - wojtek-t - - deads2k - - derekwaynecarr - - caesarxuchao - - mikedanese - - liggitt - - janetkuo - - ncdc - - dims +- thockin +- smarterclayton +- wojtek-t +- deads2k +- brendandburns +- derekwaynecarr +- caesarxuchao +- mikedanese +- liggitt +- janetkuo +- ncdc +- dims +- krousey +- resouer +- mfojtik diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/meta/meta.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/meta/meta.go index 81403393fb60..6a4116a040b4 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/meta/meta.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/meta/meta.go @@ -130,7 +130,7 @@ func AsPartialObjectMetadata(m metav1.Object) *metav1.PartialObjectMetadata { Annotations: m.GetAnnotations(), OwnerReferences: m.GetOwnerReferences(), Finalizers: m.GetFinalizers(), - ZZZ_DeprecatedClusterName: m.GetZZZ_DeprecatedClusterName(), + ClusterName: m.GetClusterName(), ManagedFields: m.GetManagedFields(), }, } diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/meta/restmapper.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/meta/restmapper.go index 91cb98cae4c8..f41b9bf78cec 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/meta/restmapper.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/meta/restmapper.go @@ -521,9 +521,10 @@ func (m *DefaultRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string } // MaybeResetRESTMapper calls Reset() on the mapper if it is a ResettableRESTMapper. -func MaybeResetRESTMapper(mapper RESTMapper) { +func MaybeResetRESTMapper(mapper RESTMapper) bool { m, ok := mapper.(ResettableRESTMapper) if ok { m.Reset() } + return ok } diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/resource/OWNERS b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/resource/OWNERS index d1c9f53074d5..15bded17af86 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/resource/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/resource/OWNERS @@ -1,11 +1,12 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - thockin - - lavalamp - - smarterclayton - - wojtek-t - - derekwaynecarr - - mikedanese - - saad-ali - - janetkuo +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- derekwaynecarr +- mikedanese +- saad-ali +- janetkuo +- xiang90 diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go index 53a25d34490c..172db57fac16 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go @@ -107,8 +107,8 @@ var fileDescriptor_612bba87bd70906c = []byte{ 0x56, 0x5c, 0x52, 0x94, 0x99, 0x97, 0x2e, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0x04, 0xe5, 0x59, 0x89, 0xcc, 0x58, 0x20, 0xcf, 0xd0, 0xb1, 0x50, 0x9e, 0x61, 0xc2, 0x42, 0x79, 0x86, 0x05, 0x0b, 0xe5, 0x19, 0x1a, 0xee, 0x28, 0x30, 0x28, 0xd9, 0x72, 0xf1, 0xc2, 0x74, 0x86, 0x25, 0xe6, 0x94, - 0xa6, 0x92, 0xa6, 0xdd, 0xc9, 0xeb, 0xc4, 0x43, 0x39, 0x86, 0x0b, 0x0f, 0xe5, 0x18, 0x6e, 0x3c, + 0xa6, 0x92, 0xa6, 0xdd, 0x49, 0xef, 0xc4, 0x43, 0x39, 0x86, 0x0b, 0x0f, 0xe5, 0x18, 0x6e, 0x3c, 0x94, 0x63, 0x68, 0x78, 0x24, 0xc7, 0x78, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x37, - 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0x43, 0x94, 0x0a, 0x31, 0x21, - 0x05, 0x08, 0x00, 0x00, 0xff, 0xff, 0x8e, 0x70, 0x98, 0xa3, 0x69, 0x01, 0x00, 0x00, + 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0x43, 0x14, 0x07, 0xcc, 0x5f, + 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x21, 0x76, 0x9f, 0x66, 0x4d, 0x01, 0x00, 0x00, } diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto index 79abc0ff5e72..54240b7b5f2e 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto @@ -22,7 +22,7 @@ syntax = "proto2"; package k8s.io.apimachinery.pkg.api.resource; // Package-wide variables from generator "generated". -option go_package = "k8s.io/apimachinery/pkg/api/resource"; +option go_package = "resource"; // Quantity is a fixed-point representation of a number. // It provides convenient marshaling/unmarshaling in JSON and YAML, diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go index 1ca31d8caf5b..6d43868ba800 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go @@ -397,10 +397,6 @@ func (_ Quantity) OpenAPISchemaType() []string { return []string{"string"} } // the OpenAPI spec of this type. func (_ Quantity) OpenAPISchemaFormat() string { return "" } -// OpenAPIV3OneOfTypes is used by the kube-openapi generator when constructing -// the OpenAPI v3 spec of this type. -func (Quantity) OpenAPIV3OneOfTypes() []string { return []string{"string", "number"} } - // CanonicalizeBytes returns the canonical form of q and its suffix (see comment on Quantity). // // Note about BinarySI: diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta.go index 9a1fe0731464..66e8d677a4e3 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/api/validation/objectmeta.go @@ -40,8 +40,8 @@ var BannedOwners = map[schema.GroupVersionKind]struct{}{ {Group: "", Version: "v1", Kind: "Event"}: {}, } -// ValidateZZZ_DeprecatedClusterName can be used to check whether the given cluster name is valid. -var ValidateZZZ_DeprecatedClusterName = NameIsDNS1035Label +// ValidateClusterName can be used to check whether the given cluster name is valid. +var ValidateClusterName = NameIsDNS1035Label // ValidateAnnotations validates that a set of annotations are correctly defined. func ValidateAnnotations(annotations map[string]string, fldPath *field.Path) field.ErrorList { @@ -184,9 +184,9 @@ func ValidateObjectMetaAccessor(meta metav1.Object, requiresNamespace bool, name allErrs = append(allErrs, field.Forbidden(fldPath.Child("namespace"), "not allowed on this type")) } } - if len(meta.GetZZZ_DeprecatedClusterName()) != 0 { - for _, msg := range ValidateZZZ_DeprecatedClusterName(meta.GetZZZ_DeprecatedClusterName(), false) { - allErrs = append(allErrs, field.Invalid(fldPath.Child("clusterName"), meta.GetZZZ_DeprecatedClusterName(), msg)) + if len(meta.GetClusterName()) != 0 { + for _, msg := range ValidateClusterName(meta.GetClusterName(), false) { + allErrs = append(allErrs, field.Invalid(fldPath.Child("clusterName"), meta.GetClusterName(), msg)) } } @@ -261,7 +261,7 @@ func ValidateObjectMetaAccessorUpdate(newMeta, oldMeta metav1.Object, fldPath *f allErrs = append(allErrs, ValidateImmutableField(newMeta.GetCreationTimestamp(), oldMeta.GetCreationTimestamp(), fldPath.Child("creationTimestamp"))...) allErrs = append(allErrs, ValidateImmutableField(newMeta.GetDeletionTimestamp(), oldMeta.GetDeletionTimestamp(), fldPath.Child("deletionTimestamp"))...) allErrs = append(allErrs, ValidateImmutableField(newMeta.GetDeletionGracePeriodSeconds(), oldMeta.GetDeletionGracePeriodSeconds(), fldPath.Child("deletionGracePeriodSeconds"))...) - allErrs = append(allErrs, ValidateImmutableField(newMeta.GetZZZ_DeprecatedClusterName(), oldMeta.GetZZZ_DeprecatedClusterName(), fldPath.Child("clusterName"))...) + allErrs = append(allErrs, ValidateImmutableField(newMeta.GetClusterName(), oldMeta.GetClusterName(), fldPath.Child("clusterName"))...) allErrs = append(allErrs, v1validation.ValidateLabels(newMeta.GetLabels(), fldPath.Child("labels"))...) allErrs = append(allErrs, ValidateAnnotations(newMeta.GetAnnotations(), fldPath.Child("annotations"))...) diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS index e7e5c152d0b7..5731b9ee20a2 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS @@ -1,16 +1,23 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - thockin - - smarterclayton - - wojtek-t - - deads2k - - caesarxuchao - - liggitt - - sttts - - luxas - - janetkuo - - justinsb - - ncdc - - soltysh - - dims +- thockin +- smarterclayton +- wojtek-t +- deads2k +- brendandburns +- caesarxuchao +- liggitt +- davidopp +- sttts +- quinton-hoole +- luxas +- janetkuo +- justinsb +- ncdc +- soltysh +- dims +- hongchaodeng +- krousey +- therc +- kevin-wangzefeng diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go index 6e5f5e61b3ec..9e7924c12f9e 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go @@ -1326,187 +1326,186 @@ func init() { } var fileDescriptor_cf52fa777ced5367 = []byte{ - // 2879 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x3a, 0xcd, 0x6f, 0x24, 0x47, - 0xbd, 0xee, 0x19, 0x8f, 0x3d, 0xf3, 0x1b, 0x8f, 0x3f, 0x6a, 0xbd, 0xef, 0xcd, 0xfa, 0xe9, 0x79, - 0x9c, 0x4e, 0x14, 0x6d, 0xde, 0x4b, 0xc6, 0xd9, 0x25, 0x44, 0x9b, 0x0d, 0x09, 0x78, 0x3c, 0xeb, - 0x8d, 0x93, 0x75, 0x6c, 0x95, 0x77, 0x17, 0x58, 0x22, 0x48, 0xbb, 0xbb, 0x3c, 0x6e, 0xdc, 0xd3, - 0x3d, 0xa9, 0xea, 0xf1, 0x66, 0xe0, 0x40, 0x0e, 0x20, 0x82, 0x84, 0xa2, 0x70, 0xe3, 0x84, 0x12, - 0xc1, 0x1f, 0x80, 0xb8, 0xc0, 0x1f, 0x80, 0x44, 0x8e, 0x41, 0x5c, 0x22, 0x81, 0x46, 0x89, 0x39, - 0x70, 0x44, 0x5c, 0x7d, 0x01, 0xd5, 0x47, 0x77, 0x57, 0xcf, 0xc7, 0xba, 0x27, 0xbb, 0x44, 0xdc, - 0xa6, 0x7f, 0xdf, 0x55, 0xf5, 0xab, 0xdf, 0x57, 0x0d, 0xec, 0x1c, 0x5f, 0x63, 0x75, 0x37, 0x58, - 0x3f, 0xee, 0x1e, 0x10, 0xea, 0x93, 0x90, 0xb0, 0xf5, 0x13, 0xe2, 0x3b, 0x01, 0x5d, 0x57, 0x08, - 0xab, 0xe3, 0xb6, 0x2d, 0xfb, 0xc8, 0xf5, 0x09, 0xed, 0xad, 0x77, 0x8e, 0x5b, 0x1c, 0xc0, 0xd6, - 0xdb, 0x24, 0xb4, 0xd6, 0x4f, 0xae, 0xac, 0xb7, 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, 0x23, - 0x3f, 0x81, 0x73, 0xfc, 0x29, 0x07, 0x95, 0x5b, 0xd6, 0x01, 0xf1, 0xf6, 0x89, 0x47, 0xec, 0x30, - 0xa0, 0xe8, 0xfb, 0x50, 0x6e, 0x5b, 0xa1, 0x7d, 0x24, 0xa0, 0x51, 0x67, 0xd0, 0xcc, 0x16, 0xec, - 0x52, 0x92, 0xea, 0x3b, 0x89, 0x98, 0x1b, 0x7e, 0x48, 0x7b, 0x8d, 0x0b, 0xca, 0xa4, 0xb2, 0x86, - 0xc1, 0xba, 0x36, 0xd1, 0xce, 0x89, 0xef, 0x1b, 0x6f, 0x77, 0x78, 0xd9, 0x32, 0x79, 0x17, 0x99, - 0x32, 0x01, 0x93, 0xb7, 0xba, 0x2e, 0x25, 0x6d, 0xe2, 0x87, 0x49, 0x3b, 0xb7, 0x33, 0x20, 0x1f, - 0x0f, 0x69, 0x5c, 0x79, 0x19, 0x16, 0x07, 0x8d, 0xe7, 0xf1, 0xe7, 0x98, 0xf4, 0xe4, 0x79, 0x61, - 0xfe, 0x13, 0x2d, 0x43, 0xe1, 0xc4, 0xf2, 0xba, 0xea, 0x36, 0x62, 0xf9, 0x71, 0x3d, 0x77, 0xcd, - 0x30, 0x7f, 0x65, 0x40, 0x75, 0x9c, 0x21, 0xe8, 0x7f, 0x35, 0x41, 0x8d, 0xb2, 0xb2, 0x2a, 0xff, - 0x1a, 0xe9, 0x49, 0xa9, 0x37, 0xa0, 0x18, 0x74, 0x78, 0x4d, 0x11, 0x50, 0x75, 0xea, 0x4f, 0x45, - 0x27, 0xb9, 0xab, 0xe0, 0x67, 0xfd, 0xda, 0xc5, 0x94, 0xf8, 0x08, 0x81, 0x63, 0x56, 0x1e, 0xa9, - 0x85, 0x3d, 0x3c, 0x7b, 0xc4, 0x91, 0xfa, 0xae, 0x80, 0x60, 0x85, 0x31, 0x7f, 0x67, 0xc0, 0xb4, - 0x28, 0xc8, 0xdf, 0x80, 0x22, 0xdf, 0x3f, 0xc7,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0x84, 0xe9, 0xc1, 0xf4, 0x17, 0xd8, 0x8e, 0x7e, 0x0b, 0x4a, 0x49, 0xc3, 0xf0, 0x88, - 0x55, 0x9a, 0x6f, 0x42, 0x91, 0x7b, 0x7c, 0xd4, 0xe8, 0x9e, 0x53, 0x25, 0xa5, 0x6b, 0xaf, 0x5c, - 0x96, 0xda, 0x4b, 0x3c, 0xb2, 0xde, 0xe9, 0x38, 0x0f, 0xf9, 0xc8, 0x9a, 0x7b, 0x98, 0xcc, 0x97, - 0x9f, 0x30, 0xf3, 0x5d, 0x05, 0xf9, 0x47, 0x14, 0x9e, 0x64, 0x64, 0x01, 0xa1, 0x25, 0x19, 0x3d, - 0xff, 0x6b, 0x2f, 0x0c, 0x3f, 0x32, 0x00, 0xc4, 0x28, 0xef, 0xc6, 0x09, 0xf1, 0xc3, 0x0c, 0xcf, - 0xf9, 0x77, 0x60, 0x26, 0x90, 0x1e, 0x29, 0x1f, 0x5a, 0x27, 0x9c, 0x17, 0xc7, 0x17, 0x49, 0xfa, - 0x24, 0x56, 0xc2, 0x1a, 0xaf, 0x7e, 0xf4, 0xd9, 0xea, 0xd4, 0xc7, 0x9f, 0xad, 0x4e, 0x7d, 0xf2, - 0xd9, 0xea, 0xd4, 0x3b, 0xa7, 0xab, 0xc6, 0x47, 0xa7, 0xab, 0xc6, 0xc7, 0xa7, 0xab, 0xc6, 0x27, - 0xa7, 0xab, 0xc6, 0xa7, 0xa7, 0xab, 0xc6, 0xfb, 0x7f, 0x5d, 0x9d, 0xba, 0xf7, 0x44, 0x96, 0x3f, - 0xf8, 0xfd, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x2d, 0x24, 0x60, 0xec, 0x20, 0x28, 0x00, 0x00, + // 2859 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x3a, 0xcb, 0x6f, 0x24, 0x47, + 0xf9, 0xee, 0x19, 0x8f, 0x3d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 0xea, + 0xbb, 0x89, 0x98, 0x9b, 0x7e, 0x48, 0x7b, 0x8d, 0x4b, 0xca, 0xa4, 0xb2, 0x86, 0xc1, 0xba, 0x36, + 0xd1, 0xce, 0x89, 0xef, 0x9b, 0x6f, 0x75, 0x78, 0xd9, 0x32, 0x79, 0x17, 0x99, 0x32, 0x01, 0x93, + 0x37, 0xbb, 0x2e, 0x25, 0x6d, 0xe2, 0x87, 0x49, 0x3b, 0xb7, 0x3b, 0x20, 0x1f, 0x0f, 0x69, 0x5c, + 0x79, 0x09, 0x16, 0x07, 0x8d, 0xe7, 0xf1, 0xe7, 0x84, 0xf4, 0xe4, 0x79, 0x61, 0xfe, 0x13, 0x2d, + 0x43, 0xe1, 0xd4, 0xf2, 0xba, 0xea, 0x36, 0x62, 0xf9, 0x71, 0x23, 0x77, 0xdd, 0x30, 0x7f, 0x63, + 0x40, 0x75, 0x9c, 0x21, 0xe8, 0xf3, 0x9a, 0xa0, 0x46, 0x59, 0x59, 0x95, 0x7f, 0x85, 0xf4, 0xa4, + 0xd4, 0x9b, 0x50, 0x0c, 0x3a, 0xbc, 0xa6, 0x08, 0xa8, 0x3a, 0xf5, 0x27, 0xa3, 0x93, 0xdc, 0x53, + 0xf0, 0xf3, 0x7e, 0xed, 0x72, 0x4a, 0x7c, 0x84, 0xc0, 0x31, 0x2b, 0x8f, 0xd4, 0xc2, 0x1e, 0x9e, + 0x3d, 0xe2, 0x48, 0x7d, 0x4f, 0x40, 0xb0, 0xc2, 0x98, 0x7f, 0x30, 0x60, 0x5a, 0x14, 0xe4, 0xaf, + 0x43, 0x91, 0xef, 0x9f, 0x63, 0x85, 0x96, 0xb0, 0x2b, 0x73, 0x2b, 0xc8, 0xb9, 0x77, 0x49, 0x68, + 0x25, 0xde, 0x16, 0x41, 0x70, 0x2c, 0x11, 0x61, 0x28, 0xb8, 0x21, 0x69, 0x47, 0x07, 0xf9, 0xf4, + 0x58, 0xd1, 0x6a, 0x10, 0x51, 0xc7, 0xd6,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6c, 0x9f, 0x55, + 0x72, 0x96, 0xf1, 0x08, 0x9a, 0xf3, 0x31, 0x70, 0x3c, 0x52, 0x22, 0xba, 0x01, 0xf3, 0xdc, 0x93, + 0x83, 0x6e, 0x18, 0xd5, 0x9d, 0x05, 0x71, 0xdc, 0xe8, 0xac, 0x5f, 0x9b, 0xbf, 0x93, 0xc2, 0xe0, + 0x01, 0x4a, 0xbe, 0xb9, 0x9e, 0xdb, 0x76, 0xc3, 0xea, 0xac, 0x60, 0x89, 0x37, 0xf7, 0x36, 0x07, + 0x62, 0x89, 0x4b, 0x79, 0x60, 0xf1, 0x22, 0x0f, 0x34, 0xff, 0x9c, 0x07, 0x24, 0x6b, 0x6d, 0x47, + 0xd6, 0x53, 0x32, 0xa4, 0xf1, 0x8e, 0x40, 0xd5, 0xea, 0xc6, 0x40, 0x47, 0xa0, 0xca, 0xf4, 0x08, + 0x8f, 0x76, 0xa1, 0x24, 0x43, 0x4b, 0x72, 0x5d, 0xd6, 0x15, 0x71, 0x69, 0x2f, 0x42, 0x9c, 0xf7, + 0x6b, 0x2b, 0x29, 0x35, 0x31, 0x46, 0x74, 0x6b, 0x89, 0x04, 0x74, 0x0d, 0xc0, 0xea, 0xb8, 0xfa, + 0xbc, 0xae, 0x94, 0x4c, 0x6d, 0x92, 0xce, 0x1b, 0x6b, 0x54, 0xe8, 0x65, 0x98, 0x0e, 0x3f, 0x5d, + 0x47, 0x55, 0x14, 0x0d, 0x23, 0xef, 0x9f, 0x84, 0x04, 0xae, 0x5d, 0xf8, 0x33, 0xe3, 0x66, 0xa9, + 0x66, 0x28, 0xd6, 0xbe, 0x1d, 0x63, 0xb0, 0x46, 0x85, 0xbe, 0x05, 0xc5, 0x23, 0x55, 0x8a, 0x8a, + 0x83, 0xc9, 0x1c, 0x22, 0xa3, 0x02, 0x56, 0x8e, 0x0c, 0xa2, 0x2f, 0x1c, 0x4b, 0x43, 0x5f, 0x81, + 0x32, 0xeb, 0x1e, 0xc6, 0xd9, 0x5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x09, 0x4f, 0x32, 0xb2, 0x80, 0xd0, 0x92, 0x8c, 0x9e, 0xff, 0xb5, + 0x37, 0x85, 0x1f, 0x1b, 0x00, 0x62, 0x78, 0x77, 0xf3, 0x94, 0xf8, 0x61, 0x86, 0x07, 0xfc, 0xbb, + 0x30, 0x13, 0x48, 0x8f, 0x94, 0x4f, 0xab, 0x13, 0x4e, 0x88, 0xe3, 0x8b, 0x24, 0x7d, 0x12, 0x2b, + 0x61, 0x8d, 0xab, 0x1f, 0x7c, 0xb2, 0x3a, 0xf5, 0xe1, 0x27, 0xab, 0x53, 0x1f, 0x7d, 0xb2, 0x3a, + 0xf5, 0xf6, 0xd9, 0xaa, 0xf1, 0xc1, 0xd9, 0xaa, 0xf1, 0xe1, 0xd9, 0xaa, 0xf1, 0xd1, 0xd9, 0xaa, + 0xf1, 0xf1, 0xd9, 0xaa, 0xf1, 0xee, 0xdf, 0x57, 0xa7, 0x5e, 0xcb, 0x9d, 0x6e, 0xfc, 0x27, 0x00, + 0x00, 0xff, 0xff, 0x7e, 0xef, 0x1e, 0xdd, 0xf0, 0x27, 0x00, 0x00, } func (m *APIGroup) Marshal() (dAtA []byte, err error) { @@ -2665,9 +2664,9 @@ func (m *ObjectMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x8a } } - i -= len(m.ZZZ_DeprecatedClusterName) - copy(dAtA[i:], m.ZZZ_DeprecatedClusterName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ZZZ_DeprecatedClusterName))) + i -= len(m.ClusterName) + copy(dAtA[i:], m.ClusterName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ClusterName))) i-- dAtA[i] = 0x7a if len(m.Finalizers) > 0 { @@ -4001,7 +4000,7 @@ func (m *ObjectMeta) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } - l = len(m.ZZZ_DeprecatedClusterName) + l = len(m.ClusterName) n += 1 + l + sovGenerated(uint64(l)) if len(m.ManagedFields) > 0 { for _, e := range m.ManagedFields { @@ -4595,7 +4594,7 @@ func (this *ObjectMeta) String() string { `Annotations:` + mapStringForAnnotations + `,`, `OwnerReferences:` + repeatedStringForOwnerReferences + `,`, `Finalizers:` + fmt.Sprintf("%v", this.Finalizers) + `,`, - `ZZZ_DeprecatedClusterName:` + fmt.Sprintf("%v", this.ZZZ_DeprecatedClusterName) + `,`, + `ClusterName:` + fmt.Sprintf("%v", this.ClusterName) + `,`, `ManagedFields:` + repeatedStringForManagedFields + `,`, `}`, }, "") @@ -9214,7 +9213,7 @@ func (m *ObjectMeta) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 15: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ZZZ_DeprecatedClusterName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ClusterName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9242,7 +9241,7 @@ func (m *ObjectMeta) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ZZZ_DeprecatedClusterName = string(dAtA[iNdEx:postIndex]) + m.ClusterName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 17: if wireType != 2 { diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto index b6c77351527d..472fcacb1063 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto @@ -25,7 +25,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/apimachinery/pkg/apis/meta/v1"; +option go_package = "v1"; // APIGroup contains the name, the supported versions, and the preferred version // of a group. @@ -243,25 +243,16 @@ message CreateOptions { // +optional optional string fieldManager = 3; - // fieldValidation instructs the server on how to handle - // objects in the request (POST/PUT/PATCH) containing unknown - // or duplicate fields, provided that the `ServerSideFieldValidation` - // feature gate is also enabled. Valid values are: - // - Ignore: This will ignore any unknown fields that are silently - // dropped from the object, and will ignore all but the last duplicate - // field that the decoder encounters. This is the default behavior - // prior to v1.23 and is the default behavior when the - // `ServerSideFieldValidation` feature gate is disabled. - // - Warn: This will send a warning via the standard warning response - // header for each unknown field that is dropped from the object, and - // for each duplicate field that is encountered. The request will - // still succeed if there are no other errors, and will only persist - // the last of any duplicate fields. This is the default when the - // `ServerSideFieldValidation` feature gate is enabled. - // - Strict: This will fail the request with a BadRequest error if - // any unknown fields would be dropped from the object, or if any - // duplicate fields are present. The error returned from the server - // will contain all unknown and duplicate fields encountered. + // fieldValidation determines how the server should respond to + // unknown/duplicate fields in the object in the request. + // Introduced as alpha in 1.23, older servers or servers with the + // `ServerSideFieldValidation` feature disabled will discard valid values + // specified in this param and not perform any server side field validation. + // Valid values are: + // - Ignore: ignores unknown/duplicate fields. + // - Warn: responds with a warning for each + // unknown/duplicate field, but successfully serves the request. + // - Strict: fails the request on unknown/duplicate fields. // +optional optional string fieldValidation = 4; } @@ -457,7 +448,13 @@ message List { // ListMeta describes metadata that synthetic resources must have, including lists and // various status objects. A resource may have only one of {ObjectMeta, ListMeta}. message ListMeta { - // Deprecated: selfLink is a legacy read-only field that is no longer populated by the system. + // selfLink is a URL representing this object. + // Populated by the system. + // Read-only. + // + // DEPRECATED + // Kubernetes will stop propagating this field in 1.20 release and the field is planned + // to be removed in 1.21 release. // +optional optional string selfLink = 1; @@ -592,11 +589,7 @@ message ManagedFieldsEntry { // set because it cannot be automatically converted. optional string apiVersion = 3; - // Time is the timestamp of when the ManagedFields entry was added. The - // timestamp will also be updated if a field is added, the manager - // changes any of the owned fields value or removes a field. The - // timestamp does not update when a field is removed from the entry - // because another manager took it over. + // Time is timestamp of when these fields were set. It should always be empty if Operation is 'Apply' // +optional optional Time time = 4; @@ -656,7 +649,10 @@ message ObjectMeta { // and may be truncated by the length of the suffix required to make the value // unique on the server. // - // If this field is specified and the generated name exists, the server will return a 409. + // If this field is specified and the generated name exists, the server will + // NOT return a 409 - instead, it will either return 201 Created or 500 with Reason + // ServerTimeout indicating a unique name could not be found in the time allotted, and the client + // should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency @@ -674,7 +670,13 @@ message ObjectMeta { // +optional optional string namespace = 3; - // Deprecated: selfLink is a legacy read-only field that is no longer populated by the system. + // SelfLink is a URL representing this object. + // Populated by the system. + // Read-only. + // + // DEPRECATED + // Kubernetes will stop propagating this field in 1.20 release and the field is planned + // to be removed in 1.21 release. // +optional optional string selfLink = 4; @@ -785,12 +787,9 @@ message ObjectMeta { // +patchStrategy=merge repeated string finalizers = 14; - // Deprecated: ClusterName is a legacy field that was always cleared by - // the system and never used; it will be removed completely in 1.25. - // - // The name in the go struct is changed to help clients detect - // accidental use. - // + // The name of the cluster which the object belongs to. + // This is used to distinguish resources with same name and namespace in different clusters. + // This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. // +optional optional string clusterName = 15; @@ -833,8 +832,6 @@ message OwnerReference { // If true, AND if the owner has the "foregroundDeletion" finalizer, then // the owner cannot be deleted from the key-value store until this // reference is removed. - // See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion - // for how the garbage collector interacts with this field and enforces the foreground deletion. // Defaults to false. // To set this field, a user needs "delete" permission of the owner, // otherwise 422 (Unprocessable Entity) will be returned. @@ -895,25 +892,16 @@ message PatchOptions { // +optional optional string fieldManager = 3; - // fieldValidation instructs the server on how to handle - // objects in the request (POST/PUT/PATCH) containing unknown - // or duplicate fields, provided that the `ServerSideFieldValidation` - // feature gate is also enabled. Valid values are: - // - Ignore: This will ignore any unknown fields that are silently - // dropped from the object, and will ignore all but the last duplicate - // field that the decoder encounters. This is the default behavior - // prior to v1.23 and is the default behavior when the - // `ServerSideFieldValidation` feature gate is disabled. - // - Warn: This will send a warning via the standard warning response - // header for each unknown field that is dropped from the object, and - // for each duplicate field that is encountered. The request will - // still succeed if there are no other errors, and will only persist - // the last of any duplicate fields. This is the default when the - // `ServerSideFieldValidation` feature gate is enabled. - // - Strict: This will fail the request with a BadRequest error if - // any unknown fields would be dropped from the object, or if any - // duplicate fields are present. The error returned from the server - // will contain all unknown and duplicate fields encountered. + // fieldValidation determines how the server should respond to + // unknown/duplicate fields in the object in the request. + // Introduced as alpha in 1.23, older servers or servers with the + // `ServerSideFieldValidation` feature disabled will discard valid values + // specified in this param and not perform any server side field validation. + // Valid values are: + // - Ignore: ignores unknown/duplicate fields. + // - Warn: responds with a warning for each + // unknown/duplicate field, but successfully serves the request. + // - Strict: fails the request on unknown/duplicate fields. // +optional optional string fieldValidation = 4; } @@ -1134,25 +1122,16 @@ message UpdateOptions { // +optional optional string fieldManager = 2; - // fieldValidation instructs the server on how to handle - // objects in the request (POST/PUT/PATCH) containing unknown - // or duplicate fields, provided that the `ServerSideFieldValidation` - // feature gate is also enabled. Valid values are: - // - Ignore: This will ignore any unknown fields that are silently - // dropped from the object, and will ignore all but the last duplicate - // field that the decoder encounters. This is the default behavior - // prior to v1.23 and is the default behavior when the - // `ServerSideFieldValidation` feature gate is disabled. - // - Warn: This will send a warning via the standard warning response - // header for each unknown field that is dropped from the object, and - // for each duplicate field that is encountered. The request will - // still succeed if there are no other errors, and will only persist - // the last of any duplicate fields. This is the default when the - // `ServerSideFieldValidation` feature gate is enabled. - // - Strict: This will fail the request with a BadRequest error if - // any unknown fields would be dropped from the object, or if any - // duplicate fields are present. The error returned from the server - // will contain all unknown and duplicate fields encountered. + // fieldValidation determines how the server should respond to + // unknown/duplicate fields in the object in the request. + // Introduced as alpha in 1.23, older servers or servers with the + // `ServerSideFieldValidation` feature disabled will discard valid values + // specified in this param and not perform any server side field validation. + // Valid values are: + // - Ignore: ignores unknown/duplicate fields. + // - Warn: responds with a warning for each + // unknown/duplicate field, but successfully serves the request. + // - Strict: fails the request on unknown/duplicate fields. // +optional optional string fieldValidation = 3; } diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go index 1ea90de1eda4..2002f91b0cda 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go @@ -59,8 +59,8 @@ type Object interface { SetFinalizers(finalizers []string) GetOwnerReferences() []OwnerReference SetOwnerReferences([]OwnerReference) - GetZZZ_DeprecatedClusterName() string - SetZZZ_DeprecatedClusterName(clusterName string) + GetClusterName() string + SetClusterName(clusterName string) GetManagedFields() []ManagedFieldsEntry SetManagedFields(managedFields []ManagedFieldsEntry) } @@ -172,10 +172,8 @@ func (meta *ObjectMeta) GetOwnerReferences() []OwnerReference { return m func (meta *ObjectMeta) SetOwnerReferences(references []OwnerReference) { meta.OwnerReferences = references } -func (meta *ObjectMeta) GetZZZ_DeprecatedClusterName() string { return meta.ZZZ_DeprecatedClusterName } -func (meta *ObjectMeta) SetZZZ_DeprecatedClusterName(clusterName string) { - meta.ZZZ_DeprecatedClusterName = clusterName -} +func (meta *ObjectMeta) GetClusterName() string { return meta.ClusterName } +func (meta *ObjectMeta) SetClusterName(clusterName string) { meta.ClusterName = clusterName } func (meta *ObjectMeta) GetManagedFields() []ManagedFieldsEntry { return meta.ManagedFields } func (meta *ObjectMeta) SetManagedFields(managedFields []ManagedFieldsEntry) { meta.ManagedFields = managedFields diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go index eb071d410bc5..f9c27c146d47 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go @@ -58,7 +58,13 @@ type TypeMeta struct { // ListMeta describes metadata that synthetic resources must have, including lists and // various status objects. A resource may have only one of {ObjectMeta, ListMeta}. type ListMeta struct { - // Deprecated: selfLink is a legacy read-only field that is no longer populated by the system. + // selfLink is a URL representing this object. + // Populated by the system. + // Read-only. + // + // DEPRECATED + // Kubernetes will stop propagating this field in 1.20 release and the field is planned + // to be removed in 1.21 release. // +optional SelfLink string `json:"selfLink,omitempty" protobuf:"bytes,1,opt,name=selfLink"` @@ -125,7 +131,10 @@ type ObjectMeta struct { // and may be truncated by the length of the suffix required to make the value // unique on the server. // - // If this field is specified and the generated name exists, the server will return a 409. + // If this field is specified and the generated name exists, the server will + // NOT return a 409 - instead, it will either return 201 Created or 500 with Reason + // ServerTimeout indicating a unique name could not be found in the time allotted, and the client + // should retry (optionally after the time indicated in the Retry-After header). // // Applied only if Name is not specified. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency @@ -143,7 +152,13 @@ type ObjectMeta struct { // +optional Namespace string `json:"namespace,omitempty" protobuf:"bytes,3,opt,name=namespace"` - // Deprecated: selfLink is a legacy read-only field that is no longer populated by the system. + // SelfLink is a URL representing this object. + // Populated by the system. + // Read-only. + // + // DEPRECATED + // Kubernetes will stop propagating this field in 1.20 release and the field is planned + // to be removed in 1.21 release. // +optional SelfLink string `json:"selfLink,omitempty" protobuf:"bytes,4,opt,name=selfLink"` @@ -254,14 +269,11 @@ type ObjectMeta struct { // +patchStrategy=merge Finalizers []string `json:"finalizers,omitempty" patchStrategy:"merge" protobuf:"bytes,14,rep,name=finalizers"` - // Deprecated: ClusterName is a legacy field that was always cleared by - // the system and never used; it will be removed completely in 1.25. - // - // The name in the go struct is changed to help clients detect - // accidental use. - // + // The name of the cluster which the object belongs to. + // This is used to distinguish resources with same name and namespace in different clusters. + // This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. // +optional - ZZZ_DeprecatedClusterName string `json:"clusterName,omitempty" protobuf:"bytes,15,opt,name=clusterName"` + ClusterName string `json:"clusterName,omitempty" protobuf:"bytes,15,opt,name=clusterName"` // ManagedFields maps workflow-id and version to the set of fields // that are managed by that workflow. This is mostly for internal @@ -310,8 +322,6 @@ type OwnerReference struct { // If true, AND if the owner has the "foregroundDeletion" finalizer, then // the owner cannot be deleted from the key-value store until this // reference is removed. - // See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion - // for how the garbage collector interacts with this field and enforces the foreground deletion. // Defaults to false. // To set this field, a user needs "delete" permission of the owner, // otherwise 422 (Unprocessable Entity) will be returned. @@ -544,25 +554,16 @@ type CreateOptions struct { // +optional FieldManager string `json:"fieldManager,omitempty" protobuf:"bytes,3,name=fieldManager"` - // fieldValidation instructs the server on how to handle - // objects in the request (POST/PUT/PATCH) containing unknown - // or duplicate fields, provided that the `ServerSideFieldValidation` - // feature gate is also enabled. Valid values are: - // - Ignore: This will ignore any unknown fields that are silently - // dropped from the object, and will ignore all but the last duplicate - // field that the decoder encounters. This is the default behavior - // prior to v1.23 and is the default behavior when the - // `ServerSideFieldValidation` feature gate is disabled. - // - Warn: This will send a warning via the standard warning response - // header for each unknown field that is dropped from the object, and - // for each duplicate field that is encountered. The request will - // still succeed if there are no other errors, and will only persist - // the last of any duplicate fields. This is the default when the - // `ServerSideFieldValidation` feature gate is enabled. - // - Strict: This will fail the request with a BadRequest error if - // any unknown fields would be dropped from the object, or if any - // duplicate fields are present. The error returned from the server - // will contain all unknown and duplicate fields encountered. + // fieldValidation determines how the server should respond to + // unknown/duplicate fields in the object in the request. + // Introduced as alpha in 1.23, older servers or servers with the + // `ServerSideFieldValidation` feature disabled will discard valid values + // specified in this param and not perform any server side field validation. + // Valid values are: + // - Ignore: ignores unknown/duplicate fields. + // - Warn: responds with a warning for each + // unknown/duplicate field, but successfully serves the request. + // - Strict: fails the request on unknown/duplicate fields. // +optional FieldValidation string `json:"fieldValidation,omitempty" protobuf:"bytes,4,name=fieldValidation"` } @@ -599,25 +600,16 @@ type PatchOptions struct { // +optional FieldManager string `json:"fieldManager,omitempty" protobuf:"bytes,3,name=fieldManager"` - // fieldValidation instructs the server on how to handle - // objects in the request (POST/PUT/PATCH) containing unknown - // or duplicate fields, provided that the `ServerSideFieldValidation` - // feature gate is also enabled. Valid values are: - // - Ignore: This will ignore any unknown fields that are silently - // dropped from the object, and will ignore all but the last duplicate - // field that the decoder encounters. This is the default behavior - // prior to v1.23 and is the default behavior when the - // `ServerSideFieldValidation` feature gate is disabled. - // - Warn: This will send a warning via the standard warning response - // header for each unknown field that is dropped from the object, and - // for each duplicate field that is encountered. The request will - // still succeed if there are no other errors, and will only persist - // the last of any duplicate fields. This is the default when the - // `ServerSideFieldValidation` feature gate is enabled. - // - Strict: This will fail the request with a BadRequest error if - // any unknown fields would be dropped from the object, or if any - // duplicate fields are present. The error returned from the server - // will contain all unknown and duplicate fields encountered. + // fieldValidation determines how the server should respond to + // unknown/duplicate fields in the object in the request. + // Introduced as alpha in 1.23, older servers or servers with the + // `ServerSideFieldValidation` feature disabled will discard valid values + // specified in this param and not perform any server side field validation. + // Valid values are: + // - Ignore: ignores unknown/duplicate fields. + // - Warn: responds with a warning for each + // unknown/duplicate field, but successfully serves the request. + // - Strict: fails the request on unknown/duplicate fields. // +optional FieldValidation string `json:"fieldValidation,omitempty" protobuf:"bytes,4,name=fieldValidation"` } @@ -676,25 +668,16 @@ type UpdateOptions struct { // +optional FieldManager string `json:"fieldManager,omitempty" protobuf:"bytes,2,name=fieldManager"` - // fieldValidation instructs the server on how to handle - // objects in the request (POST/PUT/PATCH) containing unknown - // or duplicate fields, provided that the `ServerSideFieldValidation` - // feature gate is also enabled. Valid values are: - // - Ignore: This will ignore any unknown fields that are silently - // dropped from the object, and will ignore all but the last duplicate - // field that the decoder encounters. This is the default behavior - // prior to v1.23 and is the default behavior when the - // `ServerSideFieldValidation` feature gate is disabled. - // - Warn: This will send a warning via the standard warning response - // header for each unknown field that is dropped from the object, and - // for each duplicate field that is encountered. The request will - // still succeed if there are no other errors, and will only persist - // the last of any duplicate fields. This is the default when the - // `ServerSideFieldValidation` feature gate is enabled. - // - Strict: This will fail the request with a BadRequest error if - // any unknown fields would be dropped from the object, or if any - // duplicate fields are present. The error returned from the server - // will contain all unknown and duplicate fields encountered. + // fieldValidation determines how the server should respond to + // unknown/duplicate fields in the object in the request. + // Introduced as alpha in 1.23, older servers or servers with the + // `ServerSideFieldValidation` feature disabled will discard valid values + // specified in this param and not perform any server side field validation. + // Valid values are: + // - Ignore: ignores unknown/duplicate fields. + // - Warn: responds with a warning for each + // unknown/duplicate field, but successfully serves the request. + // - Strict: fails the request on unknown/duplicate fields. // +optional FieldValidation string `json:"fieldValidation,omitempty" protobuf:"bytes,3,name=fieldValidation"` } @@ -1231,11 +1214,7 @@ type ManagedFieldsEntry struct { // APIVersion field. It is necessary to track the version of a field // set because it cannot be automatically converted. APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,3,opt,name=apiVersion"` - // Time is the timestamp of when the ManagedFields entry was added. The - // timestamp will also be updated if a field is added, the manager - // changes any of the owned fields value or removes a field. The - // timestamp does not update when a field is removed from the entry - // because another manager took it over. + // Time is timestamp of when these fields were set. It should always be empty if Operation is 'Apply' // +optional Time *Time `json:"time,omitempty" protobuf:"bytes,4,opt,name=time"` diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go index d002b03c8b2b..088ff01f0bec 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go @@ -115,7 +115,7 @@ var map_CreateOptions = map[string]string{ "": "CreateOptions may be provided when creating an API object.", "dryRun": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", "fieldManager": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - "fieldValidation": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields, provided that the `ServerSideFieldValidation` feature gate is also enabled. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23 and is the default behavior when the `ServerSideFieldValidation` feature gate is disabled. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default when the `ServerSideFieldValidation` feature gate is enabled. - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "fieldValidation": "fieldValidation determines how the server should respond to unknown/duplicate fields in the object in the request. Introduced as alpha in 1.23, older servers or servers with the `ServerSideFieldValidation` feature disabled will discard valid values specified in this param and not perform any server side field validation. Valid values are: - Ignore: ignores unknown/duplicate fields. - Warn: responds with a warning for each unknown/duplicate field, but successfully serves the request. - Strict: fails the request on unknown/duplicate fields.", } func (CreateOptions) SwaggerDoc() map[string]string { @@ -195,7 +195,7 @@ func (List) SwaggerDoc() map[string]string { var map_ListMeta = map[string]string{ "": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", - "selfLink": "Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.", + "selfLink": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", "resourceVersion": "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", "continue": "continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message.", "remainingItemCount": "remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact.", @@ -227,7 +227,7 @@ var map_ManagedFieldsEntry = map[string]string{ "manager": "Manager is an identifier of the workflow managing these fields.", "operation": "Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'.", "apiVersion": "APIVersion defines the version of this resource that this field set applies to. The format is \"group/version\" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted.", - "time": "Time is the timestamp of when the ManagedFields entry was added. The timestamp will also be updated if a field is added, the manager changes any of the owned fields value or removes a field. The timestamp does not update when a field is removed from the entry because another manager took it over.", + "time": "Time is timestamp of when these fields were set. It should always be empty if Operation is 'Apply'", "fieldsType": "FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: \"FieldsV1\"", "fieldsV1": "FieldsV1 holds the first JSON version format as described in the \"FieldsV1\" type.", "subresource": "Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource. The value of this field is used to distinguish between managers, even if they share the same name. For example, a status update will be distinct from a regular update using the same manager name. Note that the APIVersion field is not related to the Subresource field and it always corresponds to the version of the main resource.", @@ -240,9 +240,9 @@ func (ManagedFieldsEntry) SwaggerDoc() map[string]string { var map_ObjectMeta = map[string]string{ "": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", "name": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", - "generateName": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will return a 409.\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency", + "generateName": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency", "namespace": "Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", - "selfLink": "Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.", + "selfLink": "SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", "uid": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", "resourceVersion": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", "generation": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", @@ -253,7 +253,7 @@ var map_ObjectMeta = map[string]string{ "annotations": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", "ownerReferences": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.", "finalizers": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list.", - "clusterName": "Deprecated: ClusterName is a legacy field that was always cleared by the system and never used; it will be removed completely in 1.25.\n\nThe name in the go struct is changed to help clients detect accidental use.", + "clusterName": "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.", "managedFields": "ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like \"ci-cd\". The set of fields is always in the version that the workflow used when modifying the object.", } @@ -268,7 +268,7 @@ var map_OwnerReference = map[string]string{ "name": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", "uid": "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", "controller": "If true, this reference points to the managing controller.", - "blockOwnerDeletion": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion for how the garbage collector interacts with this field and enforces the foreground deletion. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.", + "blockOwnerDeletion": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.", } func (OwnerReference) SwaggerDoc() map[string]string { @@ -307,7 +307,7 @@ var map_PatchOptions = map[string]string{ "dryRun": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", "force": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", "fieldManager": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", - "fieldValidation": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields, provided that the `ServerSideFieldValidation` feature gate is also enabled. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23 and is the default behavior when the `ServerSideFieldValidation` feature gate is disabled. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default when the `ServerSideFieldValidation` feature gate is enabled. - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "fieldValidation": "fieldValidation determines how the server should respond to unknown/duplicate fields in the object in the request. Introduced as alpha in 1.23, older servers or servers with the `ServerSideFieldValidation` feature disabled will discard valid values specified in this param and not perform any server side field validation. Valid values are: - Ignore: ignores unknown/duplicate fields. - Warn: responds with a warning for each unknown/duplicate field, but successfully serves the request. - Strict: fails the request on unknown/duplicate fields.", } func (PatchOptions) SwaggerDoc() map[string]string { @@ -452,7 +452,7 @@ var map_UpdateOptions = map[string]string{ "": "UpdateOptions may be provided when updating an API object. All fields in UpdateOptions should also be present in PatchOptions.", "dryRun": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", "fieldManager": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - "fieldValidation": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields, provided that the `ServerSideFieldValidation` feature gate is also enabled. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23 and is the default behavior when the `ServerSideFieldValidation` feature gate is disabled. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default when the `ServerSideFieldValidation` feature gate is enabled. - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "fieldValidation": "fieldValidation determines how the server should respond to unknown/duplicate fields in the object in the request. Introduced as alpha in 1.23, older servers or servers with the `ServerSideFieldValidation` feature disabled will discard valid values specified in this param and not perform any server side field validation. Valid values are: - Ignore: ignores unknown/duplicate fields. - Warn: responds with a warning for each unknown/duplicate field, but successfully serves the request. - Strict: fails the request on unknown/duplicate fields.", } func (UpdateOptions) SwaggerDoc() map[string]string { diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go index 2e33283ef221..d26c6cff4e6f 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go @@ -340,7 +340,6 @@ func (s unstructuredJSONScheme) Decode(data []byte, _ *schema.GroupVersionKind, if len(gvk.Kind) == 0 { return nil, &gvk, runtime.NewMissingKindErr(string(data)) } - // TODO(109023): require apiVersion here as well return obj, &gvk, nil } diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go index f0fad90fd47c..d1903394d7f2 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go @@ -444,11 +444,11 @@ func (u *Unstructured) SetFinalizers(finalizers []string) { u.setNestedStringSlice(finalizers, "metadata", "finalizers") } -func (u *Unstructured) GetZZZ_DeprecatedClusterName() string { +func (u *Unstructured) GetClusterName() string { return getNestedString(u.Object, "metadata", "clusterName") } -func (u *Unstructured) SetZZZ_DeprecatedClusterName(clusterName string) { +func (u *Unstructured) SetClusterName(clusterName string) { if len(clusterName) == 0 { RemoveNestedField(u.Object, "metadata", "clusterName") return diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go index a2abc67c151b..a5a94967966c 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go @@ -82,26 +82,26 @@ func init() { var fileDescriptor_90ec10f86b91f9a8 = []byte{ // 317 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x41, 0x4b, 0xf3, 0x30, - 0x1c, 0xc6, 0x9b, 0xf7, 0x65, 0x30, 0x3a, 0x04, 0xd9, 0x69, 0xee, 0x90, 0x0d, 0x4f, 0xdb, 0xc1, - 0x84, 0x0d, 0x11, 0xc1, 0xdb, 0x6e, 0x82, 0x32, 0xd9, 0x51, 0x3c, 0x98, 0x76, 0x7f, 0xbb, 0x58, - 0xd3, 0x94, 0xe4, 0xdf, 0x81, 0x37, 0x3f, 0x82, 0x1f, 0x6b, 0xc7, 0x1d, 0x07, 0xc2, 0x70, 0xf5, - 0x8b, 0x48, 0xda, 0x2a, 0x32, 0x14, 0x7a, 0xeb, 0xf3, 0x94, 0xdf, 0x2f, 0x4f, 0x20, 0xfe, 0x2c, - 0x3e, 0xb7, 0x4c, 0x6a, 0x1e, 0x67, 0x01, 0x98, 0x04, 0x10, 0x2c, 0x5f, 0x42, 0x32, 0xd7, 0x86, - 0x57, 0x3f, 0x44, 0x2a, 0x95, 0x08, 0x17, 0x32, 0x01, 0xf3, 0xcc, 0xd3, 0x38, 0x72, 0x85, 0xe5, - 0x0a, 0x50, 0xf0, 0xe5, 0x28, 0x00, 0x14, 0x23, 0x1e, 0x41, 0x02, 0x46, 0x20, 0xcc, 0x59, 0x6a, - 0x34, 0xea, 0xf6, 0xb0, 0x44, 0xd9, 0x4f, 0x94, 0xa5, 0x71, 0xe4, 0x0a, 0xcb, 0x1c, 0xca, 0x2a, - 0xb4, 0x7b, 0x12, 0x49, 0x5c, 0x64, 0x01, 0x0b, 0xb5, 0xe2, 0x91, 0x8e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, 0x13, 0x81, 0xe2, + 0x52, 0x5a, 0x6c, 0xde, 0x85, 0x75, 0x55, 0xe5, 0xd6, 0xbf, 0x2e, 0xe9, 0x35, 0x86, 0x8c, 0xed, + 0x72, 0x71, 0xe6, 0x69, 0x6f, 0x1a, 0x1d, 0xcc, 0x57, 0x9d, 0xc0, 0xad, 0x3a, 0xf5, 0xaf, 0x66, + 0xfc, 0x6d, 0x6c, 0xde, 0x87, 0x35, 0x89, 0xa0, 0x6c, 0x8b, 0x74, 0xff, 0xf7, 0x1a, 0xc3, 0xf3, + 0xdd, 0xd4, 0xbf, 0xae, 0x1d, 0xed, 0x57, 0xe7, 0xd4, 0x2e, 0xbc, 0x71, 0xbc, 0x11, 0x8f, 0xfa, + 0xf3, 0x35, 0x0d, 0x16, 0x6b, 0x1a, 0x2c, 0xd7, 0x34, 0x78, 0x71, 0x94, 0xcc, 0x1d, 0x25, 0x0b, + 0x47, 0xc9, 0xd2, 0x51, 0xf2, 0xee, 0x28, 0x79, 0xfd, 0xa0, 0xc1, 0xed, 0x5e, 0xf5, 0x52, 0x9f, + 0x01, 0x00, 0x00, 0xff, 0xff, 0xf7, 0x82, 0x5b, 0x80, 0x29, 0x02, 0x00, 0x00, } func (m *PartialObjectMetadataList) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto index d14d42591bba..a209dd45672a 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto @@ -25,7 +25,7 @@ import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/apimachinery/pkg/apis/meta/v1beta1"; +option go_package = "v1beta1"; // PartialObjectMetadataList contains a list of objects containing only their metadata. // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/conversion/converter.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/conversion/converter.go index d9b5772278fa..ed51a25e3385 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/conversion/converter.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/conversion/converter.go @@ -179,7 +179,7 @@ func (c *Converter) RegisterGeneratedUntypedConversionFunc(a, b interface{}, fn func (c *Converter) RegisterIgnoredConversion(from, to interface{}) error { typeFrom := reflect.TypeOf(from) typeTo := reflect.TypeOf(to) - if typeFrom.Kind() != reflect.Ptr { + if reflect.TypeOf(from).Kind() != reflect.Ptr { return fmt.Errorf("expected pointer arg for 'from' param 0, got: %v", typeFrom) } if typeTo.Kind() != reflect.Ptr { diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/labels/selector.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/labels/selector.go index 2434429b9f86..9eea34579b80 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/labels/selector.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/labels/selector.go @@ -22,12 +22,12 @@ import ( "strconv" "strings" + "github.com/google/go-cmp/cmp" "k8s.io/apimachinery/pkg/selection" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/validation" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/klog/v2" - stringslices "k8s.io/utils/strings/slices" ) var ( @@ -288,7 +288,7 @@ func (r Requirement) Equal(x Requirement) bool { if r.operator != x.operator { return false } - return stringslices.Equal(r.strValues, x.strValues) + return cmp.Equal(r.strValues, x.strValues) } // Empty returns true if the internalSelector doesn't restrict selection space diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/allocator.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/allocator.go deleted file mode 100644 index 0d00d8c3a3b1..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/allocator.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package runtime - -import ( - "sync" -) - -// AllocatorPool simply stores Allocator objects to avoid additional memory allocations -// by caching created but unused items for later reuse, relieving pressure on the garbage collector. -// -// Usage: -// memoryAllocator := runtime.AllocatorPool.Get().(*runtime.Allocator) -// defer runtime.AllocatorPool.Put(memoryAllocator) -// -// A note for future: -// consider introducing multiple pools for storing buffers of different sizes -// perhaps this could allow us to be more efficient. -var AllocatorPool = sync.Pool{ - New: func() interface{} { - return &Allocator{} - }, -} - -// Allocator knows how to allocate memory -// It exists to make the cost of object serialization cheaper. -// In some cases, it allows for allocating memory only once and then reusing it. -// This approach puts less load on GC and leads to less fragmented memory in general. -type Allocator struct { - buf []byte -} - -var _ MemoryAllocator = &Allocator{} - -// Allocate reserves memory for n bytes only if the underlying array doesn't have enough capacity -// otherwise it returns previously allocated block of memory. -// -// Note that the returned array is not zeroed, it is the caller's -// responsibility to clean the memory if needed. -func (a *Allocator) Allocate(n uint64) []byte { - if uint64(cap(a.buf)) >= n { - a.buf = a.buf[:n] - return a.buf - } - // grow the buffer - size := uint64(2*cap(a.buf)) + n - a.buf = make([]byte, size, size) - a.buf = a.buf[:n] - return a.buf -} - -// SimpleAllocator a wrapper around make([]byte) -// conforms to the MemoryAllocator interface -type SimpleAllocator struct{} - -var _ MemoryAllocator = &SimpleAllocator{} - -func (sa *SimpleAllocator) Allocate(n uint64) []byte { - return make([]byte, n, n) -} diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/converter.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/converter.go index b640a9e768fa..b99492a891f0 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/converter.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/converter.go @@ -705,13 +705,24 @@ func mapToUnstructured(sv, dv reflect.Value) error { } if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 { if st.Key().Kind() == reflect.String { - dv.Set(reflect.MakeMap(mapStringInterfaceType)) - dv = dv.Elem() - dt = dv.Type() + switch st.Elem().Kind() { + // TODO It should be possible to reuse the slice for primitive types. + // However, it is panicing in the following form. + // case reflect.String, reflect.Bool, + // reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + // reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + // sv.Set(sv) + // return nil + default: + // We need to do a proper conversion. + } } + dv.Set(reflect.MakeMap(mapStringInterfaceType)) + dv = dv.Elem() + dt = dv.Type() } if dt.Kind() != reflect.Map { - return fmt.Errorf("cannot convert map to: %v", dt.Kind()) + return fmt.Errorf("cannot convert struct to: %v", dt.Kind()) } if !st.Key().AssignableTo(dt.Key()) && !st.Key().ConvertibleTo(dt.Key()) { @@ -752,9 +763,20 @@ func sliceToUnstructured(sv, dv reflect.Value) error { return nil } if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 { - dv.Set(reflect.MakeSlice(reflect.SliceOf(dt), sv.Len(), sv.Cap())) - dv = dv.Elem() - dt = dv.Type() + switch st.Elem().Kind() { + // TODO It should be possible to reuse the slice for primitive types. + // However, it is panicing in the following form. + // case reflect.String, reflect.Bool, + // reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + // reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + // sv.Set(sv) + // return nil + default: + // We need to do a proper conversion. + dv.Set(reflect.MakeSlice(reflect.SliceOf(dt), sv.Len(), sv.Cap())) + dv = dv.Elem() + dt = dv.Type() + } } if dt.Kind() != reflect.Slice { return fmt.Errorf("cannot convert slice to: %v", dt.Kind()) diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go index ec677a7d9629..ac428d6103a9 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go @@ -137,31 +137,31 @@ func init() { } var fileDescriptor_9d3c45d7f546725c = []byte{ - // 380 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xcf, 0xaa, 0x13, 0x31, - 0x14, 0xc6, 0x27, 0xb7, 0x85, 0x7b, 0x4d, 0x0b, 0x57, 0xe2, 0xc2, 0xd1, 0x45, 0xe6, 0xd2, 0x95, - 0x77, 0x61, 0x02, 0x17, 0x04, 0xb7, 0x9d, 0x52, 0x50, 0x44, 0x90, 0xe0, 0x1f, 0x70, 0x65, 0x3a, - 0x13, 0xa7, 0x61, 0xe8, 0xc9, 0x90, 0x66, 0x1c, 0xbb, 0xf3, 0x11, 0x7c, 0xac, 0x2e, 0xbb, 0xec, - 0xaa, 0xd8, 0xf1, 0x21, 0xdc, 0x4a, 0xd3, 0xb4, 0x56, 0x5d, 0x74, 0x97, 0x73, 0xbe, 0xef, 0xf7, - 0x9d, 0x73, 0x20, 0xf8, 0x45, 0xf9, 0x7c, 0xce, 0xb4, 0xe1, 0x65, 0x3d, 0x51, 0x16, 0x94, 0x53, - 0x73, 0xfe, 0x45, 0x41, 0x6e, 0x2c, 0x0f, 0x82, 0xac, 0xf4, 0x4c, 0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, 0x10, 0x5f, 0x67, 0x06, 0x9c, 0x02, 0x37, 0x86, 0xcc, 0xe4, 0x1a, 0x8a, 0xb8, 0xe3, 0x97, - 0x7d, 0x18, 0xf2, 0xae, 0x47, 0x7f, 0xcb, 0xe2, 0x5f, 0x3f, 0x79, 0x86, 0x7b, 0xa1, 0xb5, 0x1b, - 0x1d, 0x77, 0x3d, 0xfe, 0x20, 0xe0, 0xbd, 0xd1, 0x1f, 0x49, 0x9c, 0xfa, 0xd2, 0xf1, 0x72, 0x4b, - 0xa3, 0xd5, 0x96, 0x46, 0xeb, 0x2d, 0x8d, 0xbe, 0xb5, 0x14, 0x2d, 0x5b, 0x8a, 0x56, 0x2d, 0x45, - 0xeb, 0x96, 0xa2, 0x1f, 0x2d, 0x45, 0xdf, 0x7f, 0xd2, 0xe8, 0x63, 0x72, 0xe6, 0xb7, 0xfc, 0x0e, - 0x00, 0x00, 0xff, 0xff, 0x1f, 0x32, 0xd5, 0x68, 0x68, 0x02, 0x00, 0x00, + // 378 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x8f, 0x4f, 0xab, 0x13, 0x31, + 0x14, 0xc5, 0x27, 0xaf, 0x85, 0x3e, 0xd3, 0xc2, 0x93, 0xb8, 0x70, 0x74, 0x91, 0x79, 0x74, 0xe5, + 0x5b, 0xbc, 0x04, 0x1e, 0x08, 0x6e, 0x3b, 0xa5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 0xc1, + 0xa3, 0xd7, 0x2f, 0x82, 0x22, 0xce, 0x5c, 0xe4, 0x1a, 0x77, 0x4b, 0x0d, 0x79, 0x7c, 0xe1, 0xdd, + 0x83, 0xe0, 0xee, 0xbe, 0xd4, 0x90, 0x0b, 0xaf, 0x0c, 0x7f, 0x22, 0xdc, 0x7b, 0x0b, 0x25, 0x98, + 0x06, 0xc8, 0x7b, 0x7c, 0xe9, 0xc2, 0x36, 0x9f, 0xdf, 0xbf, 0xbb, 0x61, 0xff, 0xe9, 0xce, 0x8e, + 0xe7, 0xa5, 0xf7, 0x43, 0xf8, 0xe9, 0x60, 0x71, 0x0a, 0x3b, 0x36, 0xbc, 0xf8, 0xb7, 0x21, 0x19, + 0xe1, 0xab, 0xcc, 0x80, 0x53, 0xe0, 0x26, 0x90, 0x99, 0x5c, 0x43, 0x11, 0x77, 0xfc, 0xb1, 0x0f, + 0x43, 0xde, 0xd5, 0xf8, 0x4f, 0x59, 0xfc, 0xed, 0x27, 0x4f, 0x71, 0x3f, 0x8c, 0xf6, 0xab, 0xe3, + 0xae, 0xc7, 0x1f, 0x04, 0xbc, 0x3f, 0xfe, 0x2d, 0x89, 0x73, 0x5f, 0x7a, 0xbb, 0xda, 0xd1, 0x68, + 0xbd, 0xa3, 0xd1, 0x66, 0x47, 0xa3, 0xaf, 0x2d, 0x45, 0xab, 0x96, 0xa2, 0x75, 0x4b, 0xd1, 0xa6, + 0xa5, 0xe8, 0x7b, 0x4b, 0xd1, 0xb7, 0x1f, 0x34, 0xfa, 0xd0, 0x0b, 0x45, 0x7f, 0x05, 0x00, 0x00, + 0xff, 0xff, 0xe3, 0x33, 0x18, 0x0b, 0x50, 0x02, 0x00, 0x00, } func (m *RawExtension) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto index de634e2c64e4..3b25391fa354 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto @@ -22,7 +22,7 @@ syntax = "proto2"; package k8s.io.apimachinery.pkg.runtime; // Package-wide variables from generator "generated". -option go_package = "k8s.io/apimachinery/pkg/runtime"; +option go_package = "runtime"; // RawExtension is used to hold extensions in external versions. // diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go index 710a977952f2..b324b76c676c 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go @@ -69,24 +69,6 @@ type Encoder interface { Identifier() Identifier } -// MemoryAllocator is responsible for allocating memory. -// By encapsulating memory allocation into its own interface, we can reuse the memory -// across many operations in places we know it can significantly improve the performance. -type MemoryAllocator interface { - // Allocate reserves memory for n bytes. - // Note that implementations of this method are not required to zero the returned array. - // It is the caller's responsibility to clean the memory if needed. - Allocate(n uint64) []byte -} - -// EncoderWithAllocator serializes objects in a way that allows callers to manage any additional memory allocations. -type EncoderWithAllocator interface { - Encoder - // EncodeWithAllocator writes an object to a stream as Encode does. - // In addition, it allows for providing a memory allocator for efficient memory usage during object serialization - EncodeWithAllocator(obj Object, w io.Writer, memAlloc MemoryAllocator) error -} - // Decoder attempts to load an object from data. type Decoder interface { // Decode attempts to deserialize the provided data using either the innate typing of the scheme or the @@ -171,7 +153,7 @@ type NegotiatedSerializer interface { // EncoderForVersion returns an encoder that ensures objects being written to the provided // serializer are in the provided group version. EncoderForVersion(serializer Encoder, gv GroupVersioner) Encoder - // DecoderToVersion returns a decoder that ensures objects being read by the provided + // DecoderForVersion returns a decoder that ensures objects being read by the provided // serializer are in the provided group version by default. DecoderToVersion(serializer Decoder, gv GroupVersioner) Decoder } @@ -225,12 +207,6 @@ type NestedObjectEncoder interface { // NestedObjectDecoder is an optional interface that objects may implement to be given // an opportunity to decode any nested Objects / RawExtensions during serialization. -// It is possible for DecodeNestedObjects to return a non-nil error but for the decoding -// to have succeeded in the case of strict decoding errors (e.g. unknown/duplicate fields). -// As such it is important for callers of DecodeNestedObjects to check to confirm whether -// an error is a runtime.StrictDecodingError before short circuiting. -// Similarly, implementations of DecodeNestedObjects should ensure that a runtime.StrictDecodingError -// is only returned when the rest of decoding has succeeded. type NestedObjectDecoder interface { DecodeNestedObjects(d Decoder) error } @@ -308,11 +284,14 @@ type ResourceVersioner interface { ResourceVersion(obj Object) (string, error) } -// Namer provides methods for retrieving name and namespace of an API object. -type Namer interface { - // Name returns the name of a given object. +// SelfLinker provides methods for setting and retrieving the SelfLink field of an API object. +type SelfLinker interface { + SetSelfLink(obj Object, selfLink string) error + SelfLink(obj Object) (string, error) + + // Knowing Name is sometimes necessary to use a SelfLinker. Name(obj Object) (string, error) - // Namespace returns the name of a given object. + // Knowing Namespace is sometimes necessary to use a SelfLinker Namespace(obj Object) (string, error) } diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go index 46b1e787bdea..29d3ac45bea9 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go @@ -43,17 +43,17 @@ func init() { } var fileDescriptor_0462724132518e0d = []byte{ - // 186 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0xce, 0xad, 0x8e, 0xc3, 0x30, - 0x0c, 0xc0, 0xf1, 0x84, 0x1e, 0x3c, 0x78, 0xc0, 0xb0, 0xec, 0x62, 0x7a, 0xf8, 0xf0, 0xa4, 0xf1, - 0xb1, 0xb4, 0xf5, 0xd2, 0x28, 0xca, 0x87, 0xd2, 0x64, 0xd2, 0xd8, 0x1e, 0x61, 0x8f, 0x55, 0x58, - 0x58, 0xb8, 0x66, 0x2f, 0x32, 0x29, 0x2d, 0x18, 0x1c, 0xf3, 0x5f, 0xd6, 0xcf, 0xf2, 0xd7, 0xd1, - 0xfc, 0x8d, 0x42, 0x7b, 0x34, 0xb9, 0xa5, 0xe8, 0x28, 0xd1, 0x88, 0x17, 0x72, 0xbd, 0x8f, 0xb8, - 0x2f, 0x64, 0xd0, 0x56, 0x76, 0x83, 0x76, 0x14, 0xaf, 0x18, 0x8c, 0xc2, 0x98, 0x5d, 0xd2, 0x96, - 0x70, 0xec, 0x06, 0xb2, 0x12, 0x15, 0x39, 0x8a, 0x32, 0x51, 0x2f, 0x42, 0xf4, 0xc9, 0x7f, 0x37, - 0x9b, 0x13, 0xef, 0x4e, 0x04, 0xa3, 0xc4, 0xee, 0xc4, 0xe6, 0x7e, 0x7e, 0x95, 0x4e, 0x43, 0x6e, - 0x45, 0xe7, 0x2d, 0x2a, 0xaf, 0x3c, 0x56, 0xde, 0xe6, 0x73, 0xad, 0x1a, 0x75, 0xda, 0xce, 0xfe, - 0x1f, 0xa6, 0x15, 0xd8, 0xbc, 0x02, 0x5b, 0x56, 0x60, 0xb7, 0x02, 0x7c, 0x2a, 0xc0, 0xe7, 0x02, - 0x7c, 0x29, 0xc0, 0x1f, 0x05, 0xf8, 0xfd, 0x09, 0xec, 0xd4, 0x7c, 0xf6, 0xf4, 0x2b, 0x00, 0x00, - 0xff, 0xff, 0x12, 0xb4, 0xae, 0x48, 0xf6, 0x00, 0x00, 0x00, + // 185 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0xcc, 0xaf, 0x6e, 0xc3, 0x30, + 0x10, 0xc7, 0x71, 0x9b, 0x0c, 0x0c, 0x0e, 0x0e, 0x1c, 0x1c, 0xda, 0x7c, 0x74, 0xb8, 0x2f, 0x50, + 0x5e, 0xe6, 0x24, 0x57, 0xc7, 0xb2, 0xfc, 0x47, 0x8e, 0x5d, 0xa9, 0xac, 0x8f, 0xd0, 0xc7, 0x0a, + 0x0c, 0x0c, 0x6c, 0xdc, 0x17, 0xa9, 0x64, 0x07, 0x94, 0xdd, 0x4f, 0xa7, 0xcf, 0xf7, 0xf3, 0x68, + 0xfe, 0x27, 0xa1, 0x3d, 0x9a, 0xdc, 0x51, 0x74, 0x94, 0x68, 0xc2, 0x0b, 0xb9, 0xc1, 0x47, 0xdc, + 0x1f, 0x32, 0x68, 0x2b, 0xfb, 0x51, 0x3b, 0x8a, 0x57, 0x0c, 0x46, 0x61, 0xcc, 0x2e, 0x69, 0x4b, + 0x38, 0xf5, 0x23, 0x59, 0x89, 0x8a, 0x1c, 0x45, 0x99, 0x68, 0x10, 0x21, 0xfa, 0xe4, 0xbf, 0x7e, + 0x9a, 0x13, 0xef, 0x4e, 0x04, 0xa3, 0xc4, 0xee, 0x44, 0x73, 0xdf, 0x7f, 0x4a, 0xa7, 0x31, 0x77, + 0xa2, 0xf7, 0x16, 0x95, 0x57, 0x1e, 0x2b, 0xef, 0xf2, 0xb9, 0xae, 0x3a, 0xea, 0xd5, 0xb2, 0x87, + 0xdf, 0x79, 0x03, 0xb6, 0x6c, 0xc0, 0xd6, 0x0d, 0xd8, 0xad, 0x00, 0x9f, 0x0b, 0xf0, 0xa5, 0x00, + 0x5f, 0x0b, 0xf0, 0x47, 0x01, 0x7e, 0x7f, 0x02, 0x3b, 0x7d, 0xb4, 0xf8, 0x2b, 0x00, 0x00, 0xff, + 0xff, 0xba, 0x7e, 0x65, 0xf4, 0xd6, 0x00, 0x00, 0x00, } diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto index 01a9c01e5c83..c50766a4b7b2 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto @@ -22,5 +22,5 @@ syntax = "proto2"; package k8s.io.apimachinery.pkg.runtime.schema; // Package-wide variables from generator "generated". -option go_package = "k8s.io/apimachinery/pkg/runtime/schema"; +option go_package = "schema"; diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go index a9d656f8ea42..f5da6b12f44b 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go @@ -44,11 +44,11 @@ import ( // Schemes are not expected to change at runtime and are only threadsafe after // registration is complete. type Scheme struct { - // gvkToType allows one to figure out the go type of an object with + // versionMap allows one to figure out the go type of an object with // the given version and name. gvkToType map[schema.GroupVersionKind]reflect.Type - // typeToGVK allows one to find metadata for a given go object. + // typeToGroupVersion allows one to find metadata for a given go object. // The reflect.Type we index by should *not* be a pointer. typeToGVK map[reflect.Type][]schema.GroupVersionKind @@ -64,7 +64,7 @@ type Scheme struct { // resource field labels in that version to internal version. fieldLabelConversionFuncs map[schema.GroupVersionKind]FieldLabelConversionFunc - // defaulterFuncs is a map to funcs to be called with an object to provide defaulting + // defaulterFuncs is an array of interfaces to be called with an object to provide defaulting // the provided object must be a pointer. defaulterFuncs map[reflect.Type]func(interface{}) diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go index 1ae4a32eb720..6c082f660eee 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go @@ -166,20 +166,7 @@ func (s *Serializer) Decode(originalData []byte, gvk *schema.GroupVersionKind, i strictErrs, err := s.unmarshal(into, data, originalData) if err != nil { return nil, actual, err - } - - // when decoding directly into a provided unstructured object, - // extract the actual gvk decoded from the provided data, - // and ensure it is non-empty. - if isUnstructured { - *actual = into.GetObjectKind().GroupVersionKind() - if len(actual.Kind) == 0 { - return nil, actual, runtime.NewMissingKindErr(string(originalData)) - } - // TODO(109023): require apiVersion here as well once unstructuredJSONScheme#Decode does - } - - if len(strictErrs) > 0 { + } else if len(strictErrs) > 0 { return into, actual, runtime.NewStrictDecodingError(strictErrs) } return into, actual, nil @@ -274,9 +261,9 @@ func (s *Serializer) unmarshal(into runtime.Object, data, originalData []byte) ( var strictJSONErrs []error if u, isUnstructured := into.(runtime.Unstructured); isUnstructured { // Unstructured is a custom unmarshaler that gets delegated - // to, so in order to detect strict JSON errors we need + // to, so inorder to detect strict JSON errors we need // to unmarshal directly into the object. - m := map[string]interface{}{} + m := u.UnstructuredContent() strictJSONErrs, err = kjson.UnmarshalStrict(data, &m) u.SetUnstructuredContent(m) } else { diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/protobuf.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/protobuf.go index c63e6dc63f6b..8358d77c39ee 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/protobuf.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/protobuf.go @@ -30,7 +30,6 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer/recognizer" "k8s.io/apimachinery/pkg/util/framer" - "k8s.io/klog/v2" ) var ( @@ -87,7 +86,6 @@ type Serializer struct { } var _ runtime.Serializer = &Serializer{} -var _ runtime.EncoderWithAllocator = &Serializer{} var _ recognizer.RecognizingDecoder = &Serializer{} const serializerIdentifier runtime.Identifier = "protobuf" @@ -163,36 +161,22 @@ func (s *Serializer) Decode(originalData []byte, gvk *schema.GroupVersionKind, i return unmarshalToObject(s.typer, s.creater, &actual, into, unk.Raw) } -// EncodeWithAllocator writes an object to the provided writer. -// In addition, it allows for providing a memory allocator for efficient memory usage during object serialization. -func (s *Serializer) EncodeWithAllocator(obj runtime.Object, w io.Writer, memAlloc runtime.MemoryAllocator) error { - return s.encode(obj, w, memAlloc) -} - // Encode serializes the provided object to the given writer. func (s *Serializer) Encode(obj runtime.Object, w io.Writer) error { - return s.encode(obj, w, &runtime.SimpleAllocator{}) -} - -func (s *Serializer) encode(obj runtime.Object, w io.Writer, memAlloc runtime.MemoryAllocator) error { if co, ok := obj.(runtime.CacheableObject); ok { - return co.CacheEncode(s.Identifier(), func(obj runtime.Object, w io.Writer) error { return s.doEncode(obj, w, memAlloc) }, w) + return co.CacheEncode(s.Identifier(), s.doEncode, w) } - return s.doEncode(obj, w, memAlloc) + return s.doEncode(obj, w) } -func (s *Serializer) doEncode(obj runtime.Object, w io.Writer, memAlloc runtime.MemoryAllocator) error { - if memAlloc == nil { - klog.Error("a mandatory memory allocator wasn't provided, this might have a negative impact on performance, check invocations of EncodeWithAllocator method, falling back on runtime.SimpleAllocator") - memAlloc = &runtime.SimpleAllocator{} - } +func (s *Serializer) doEncode(obj runtime.Object, w io.Writer) error { prefixSize := uint64(len(s.prefix)) var unk runtime.Unknown switch t := obj.(type) { case *runtime.Unknown: estimatedSize := prefixSize + uint64(t.Size()) - data := memAlloc.Allocate(estimatedSize) + data := make([]byte, estimatedSize) i, err := t.MarshalTo(data[prefixSize:]) if err != nil { return err @@ -212,11 +196,11 @@ func (s *Serializer) doEncode(obj runtime.Object, w io.Writer, memAlloc runtime. switch t := obj.(type) { case bufferedMarshaller: - // this path performs a single allocation during write only when the Allocator wasn't provided - // it also requires the caller to implement the more efficient Size and MarshalToSizedBuffer methods + // this path performs a single allocation during write but requires the caller to implement + // the more efficient Size and MarshalToSizedBuffer methods encodedSize := uint64(t.Size()) estimatedSize := prefixSize + estimateUnknownSize(&unk, encodedSize) - data := memAlloc.Allocate(estimatedSize) + data := make([]byte, estimatedSize) i, err := unk.NestedMarshalTo(data[prefixSize:], t, encodedSize) if err != nil { @@ -237,7 +221,7 @@ func (s *Serializer) doEncode(obj runtime.Object, w io.Writer, memAlloc runtime. unk.Raw = data estimatedSize := prefixSize + uint64(unk.Size()) - data = memAlloc.Allocate(estimatedSize) + data = make([]byte, estimatedSize) i, err := unk.MarshalTo(data[prefixSize:]) if err != nil { @@ -411,33 +395,19 @@ func unmarshalToObject(typer runtime.ObjectTyper, creater runtime.ObjectCreater, // Encode serializes the provided object to the given writer. Overrides is ignored. func (s *RawSerializer) Encode(obj runtime.Object, w io.Writer) error { - return s.encode(obj, w, &runtime.SimpleAllocator{}) -} - -// EncodeWithAllocator writes an object to the provided writer. -// In addition, it allows for providing a memory allocator for efficient memory usage during object serialization. -func (s *RawSerializer) EncodeWithAllocator(obj runtime.Object, w io.Writer, memAlloc runtime.MemoryAllocator) error { - return s.encode(obj, w, memAlloc) -} - -func (s *RawSerializer) encode(obj runtime.Object, w io.Writer, memAlloc runtime.MemoryAllocator) error { if co, ok := obj.(runtime.CacheableObject); ok { - return co.CacheEncode(s.Identifier(), func(obj runtime.Object, w io.Writer) error { return s.doEncode(obj, w, memAlloc) }, w) + return co.CacheEncode(s.Identifier(), s.doEncode, w) } - return s.doEncode(obj, w, memAlloc) + return s.doEncode(obj, w) } -func (s *RawSerializer) doEncode(obj runtime.Object, w io.Writer, memAlloc runtime.MemoryAllocator) error { - if memAlloc == nil { - klog.Error("a mandatory memory allocator wasn't provided, this might have a negative impact on performance, check invocations of EncodeWithAllocator method, falling back on runtime.SimpleAllocator") - memAlloc = &runtime.SimpleAllocator{} - } +func (s *RawSerializer) doEncode(obj runtime.Object, w io.Writer) error { switch t := obj.(type) { case bufferedReverseMarshaller: - // this path performs a single allocation during write only when the Allocator wasn't provided - // it also requires the caller to implement the more efficient Size and MarshalToSizedBuffer methods + // this path performs a single allocation during write but requires the caller to implement + // the more efficient Size and MarshalToSizedBuffer methods encodedSize := uint64(t.Size()) - data := memAlloc.Allocate(encodedSize) + data := make([]byte, encodedSize) n, err := t.MarshalToSizedBuffer(data) if err != nil { @@ -447,10 +417,10 @@ func (s *RawSerializer) doEncode(obj runtime.Object, w io.Writer, memAlloc runti return err case bufferedMarshaller: - // this path performs a single allocation during write only when the Allocator wasn't provided - // it also requires the caller to implement the more efficient Size and MarshalTo methods + // this path performs a single allocation during write but requires the caller to implement + // the more efficient Size and MarshalTo methods encodedSize := uint64(t.Size()) - data := memAlloc.Allocate(encodedSize) + data := make([]byte, encodedSize) n, err := t.MarshalTo(data) if err != nil { diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming.go index 87b3fec3f2db..971c46d496a3 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming.go @@ -134,23 +134,3 @@ func (e *encoder) Encode(obj runtime.Object) error { e.buf.Reset() return err } - -type encoderWithAllocator struct { - writer io.Writer - encoder runtime.EncoderWithAllocator - memAllocator runtime.MemoryAllocator -} - -// NewEncoderWithAllocator returns a new streaming encoder -func NewEncoderWithAllocator(w io.Writer, e runtime.EncoderWithAllocator, a runtime.MemoryAllocator) Encoder { - return &encoderWithAllocator{ - writer: w, - encoder: e, - memAllocator: a, - } -} - -// Encode writes the provided object to the nested writer -func (e *encoderWithAllocator) Encode(obj runtime.Object) error { - return e.encoder.EncodeWithAllocator(obj, e.writer, e.memAllocator) -} diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go index 4466331829eb..ea7c580bd6b0 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go @@ -89,8 +89,6 @@ type codec struct { originalSchemeName string } -var _ runtime.EncoderWithAllocator = &codec{} - var identifiersMap sync.Map type codecIdentifier struct { @@ -135,34 +133,24 @@ func (c *codec) Decode(data []byte, defaultGVK *schema.GroupVersionKind, into ru } } - var strictDecodingErrs []error + var strictDecodingErr error obj, gvk, err := c.decoder.Decode(data, defaultGVK, decodeInto) if err != nil { - if strictErr, ok := runtime.AsStrictDecodingError(err); obj != nil && ok { - // save the strictDecodingError and let the caller decide what to do with it - strictDecodingErrs = append(strictDecodingErrs, strictErr.Errors()...) + if obj != nil && runtime.IsStrictDecodingError(err) { + // save the strictDecodingError and the caller decide what to do with it + strictDecodingErr = err } else { return nil, gvk, err } } + // TODO: look into strict handling of nested object decoding if d, ok := obj.(runtime.NestedObjectDecoder); ok { if err := d.DecodeNestedObjects(runtime.WithoutVersionDecoder{c.decoder}); err != nil { - if strictErr, ok := runtime.AsStrictDecodingError(err); ok { - // save the strictDecodingError let and the caller decide what to do with it - strictDecodingErrs = append(strictDecodingErrs, strictErr.Errors()...) - } else { - return nil, gvk, err - - } + return nil, gvk, err } } - // aggregate the strict decoding errors into one - var strictDecodingErr error - if len(strictDecodingErrs) > 0 { - strictDecodingErr = runtime.NewStrictDecodingError(strictDecodingErrs) - } // if we specify a target, use generic conversion. if into != nil { // perform defaulting if requested @@ -194,40 +182,19 @@ func (c *codec) Decode(data []byte, defaultGVK *schema.GroupVersionKind, into ru return out, gvk, strictDecodingErr } -// EncodeWithAllocator ensures the provided object is output in the appropriate group and version, invoking -// conversion if necessary. Unversioned objects (according to the ObjectTyper) are output as is. -// In addition, it allows for providing a memory allocator for efficient memory usage during object serialization. -func (c *codec) EncodeWithAllocator(obj runtime.Object, w io.Writer, memAlloc runtime.MemoryAllocator) error { - return c.encode(obj, w, memAlloc) -} - // Encode ensures the provided object is output in the appropriate group and version, invoking // conversion if necessary. Unversioned objects (according to the ObjectTyper) are output as is. func (c *codec) Encode(obj runtime.Object, w io.Writer) error { - return c.encode(obj, w, nil) -} - -func (c *codec) encode(obj runtime.Object, w io.Writer, memAlloc runtime.MemoryAllocator) error { if co, ok := obj.(runtime.CacheableObject); ok { - return co.CacheEncode(c.Identifier(), func(obj runtime.Object, w io.Writer) error { return c.doEncode(obj, w, memAlloc) }, w) + return co.CacheEncode(c.Identifier(), c.doEncode, w) } - return c.doEncode(obj, w, memAlloc) + return c.doEncode(obj, w) } -func (c *codec) doEncode(obj runtime.Object, w io.Writer, memAlloc runtime.MemoryAllocator) error { - encodeFn := c.encoder.Encode - if memAlloc != nil { - if encoder, supportsAllocator := c.encoder.(runtime.EncoderWithAllocator); supportsAllocator { - encodeFn = func(obj runtime.Object, w io.Writer) error { - return encoder.EncodeWithAllocator(obj, w, memAlloc) - } - } else { - klog.V(6).Infof("a memory allocator was provided but the encoder %s doesn't implement the runtime.EncoderWithAllocator, using regular encoder.Encode method", c.encoder.Identifier()) - } - } +func (c *codec) doEncode(obj runtime.Object, w io.Writer) error { switch obj := obj.(type) { case *runtime.Unknown: - return encodeFn(obj, w) + return c.encoder.Encode(obj, w) case runtime.Unstructured: // An unstructured list can contain objects of multiple group version kinds. don't short-circuit just // because the top-level type matches our desired destination type. actually send the object to the converter @@ -236,14 +203,14 @@ func (c *codec) doEncode(obj runtime.Object, w io.Writer, memAlloc runtime.Memor // avoid conversion roundtrip if GVK is the right one already or is empty (yes, this is a hack, but the old behaviour we rely on in kubectl) objGVK := obj.GetObjectKind().GroupVersionKind() if len(objGVK.Version) == 0 { - return encodeFn(obj, w) + return c.encoder.Encode(obj, w) } targetGVK, ok := c.encodeVersion.KindForGroupVersionKinds([]schema.GroupVersionKind{objGVK}) if !ok { return runtime.NewNotRegisteredGVKErrForTarget(c.originalSchemeName, objGVK, c.encodeVersion) } if targetGVK == objGVK { - return encodeFn(obj, w) + return c.encoder.Encode(obj, w) } } } @@ -265,7 +232,7 @@ func (c *codec) doEncode(obj runtime.Object, w io.Writer, memAlloc runtime.Memor } } objectKind.SetGroupVersionKind(gvks[0]) - return encodeFn(obj, w) + return c.encoder.Encode(obj, w) } // Perform a conversion if necessary @@ -281,7 +248,7 @@ func (c *codec) doEncode(obj runtime.Object, w io.Writer, memAlloc runtime.Memor } // Conversion is responsible for setting the proper group, version, and kind onto the outgoing object - return encodeFn(out, w) + return c.encoder.Encode(out, w) } // Identifier implements runtime.Encoder interface. diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper.go index 9ec3685015f0..086e4bcf0b94 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper.go @@ -22,7 +22,6 @@ import ( "context" "crypto/tls" "encoding/base64" - "errors" "fmt" "io" "io/ioutil" @@ -33,7 +32,6 @@ import ( "strings" "time" - "golang.org/x/net/proxy" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -67,6 +65,12 @@ type SpdyRoundTripper struct { // Used primarily for mocking the proxy discovery in tests. proxier func(req *http.Request) (*url.URL, error) + // followRedirects indicates if the round tripper should examine responses for redirects and + // follow them. + followRedirects bool + // requireSameHostRedirects restricts redirect following to only follow redirects to the same host + // as the original request. + requireSameHostRedirects bool // pingPeriod is a period for sending Ping frames over established // connections. pingPeriod time.Duration @@ -78,31 +82,37 @@ var _ utilnet.Dialer = &SpdyRoundTripper{} // NewRoundTripper creates a new SpdyRoundTripper that will use the specified // tlsConfig. -func NewRoundTripper(tlsConfig *tls.Config) *SpdyRoundTripper { +func NewRoundTripper(tlsConfig *tls.Config, followRedirects, requireSameHostRedirects bool) *SpdyRoundTripper { return NewRoundTripperWithConfig(RoundTripperConfig{ - TLS: tlsConfig, + TLS: tlsConfig, + FollowRedirects: followRedirects, + RequireSameHostRedirects: requireSameHostRedirects, }) } // NewRoundTripperWithProxy creates a new SpdyRoundTripper that will use the // specified tlsConfig and proxy func. -func NewRoundTripperWithProxy(tlsConfig *tls.Config, proxier func(*http.Request) (*url.URL, error)) *SpdyRoundTripper { +func NewRoundTripperWithProxy(tlsConfig *tls.Config, followRedirects, requireSameHostRedirects bool, proxier func(*http.Request) (*url.URL, error)) *SpdyRoundTripper { return NewRoundTripperWithConfig(RoundTripperConfig{ - TLS: tlsConfig, - Proxier: proxier, + TLS: tlsConfig, + FollowRedirects: followRedirects, + RequireSameHostRedirects: requireSameHostRedirects, + Proxier: proxier, }) } -// NewRoundTripperWithConfig creates a new SpdyRoundTripper with the specified +// NewRoundTripperWithProxy creates a new SpdyRoundTripper with the specified // configuration. func NewRoundTripperWithConfig(cfg RoundTripperConfig) *SpdyRoundTripper { if cfg.Proxier == nil { cfg.Proxier = utilnet.NewProxierWithNoProxyCIDR(http.ProxyFromEnvironment) } return &SpdyRoundTripper{ - tlsConfig: cfg.TLS, - proxier: cfg.Proxier, - pingPeriod: cfg.PingPeriod, + tlsConfig: cfg.TLS, + followRedirects: cfg.FollowRedirects, + requireSameHostRedirects: cfg.RequireSameHostRedirects, + proxier: cfg.Proxier, + pingPeriod: cfg.PingPeriod, } } @@ -115,6 +125,9 @@ type RoundTripperConfig struct { // PingPeriod is a period for sending SPDY Pings on the connection. // Optional. PingPeriod time.Duration + + FollowRedirects bool + RequireSameHostRedirects bool } // TLSClientConfig implements pkg/util/net.TLSClientConfigHolder for proper TLS checking during @@ -150,18 +163,6 @@ func (s *SpdyRoundTripper) dial(req *http.Request) (net.Conn, error) { return s.dialWithoutProxy(req.Context(), req.URL) } - switch proxyURL.Scheme { - case "socks5": - return s.dialWithSocks5Proxy(req, proxyURL) - case "https", "http", "": - return s.dialWithHttpProxy(req, proxyURL) - } - - return nil, fmt.Errorf("proxy URL scheme not supported: %s", proxyURL.Scheme) -} - -// dialWithHttpProxy dials the host specified by url through an http or an https proxy. -func (s *SpdyRoundTripper) dialWithHttpProxy(req *http.Request, proxyURL *url.URL) (net.Conn, error) { // ensure we use a canonical host with proxyReq targetHost := netutil.CanonicalAddr(req.URL) @@ -172,14 +173,12 @@ func (s *SpdyRoundTripper) dialWithHttpProxy(req *http.Request, proxyURL *url.UR Host: targetHost, } - proxyReq = *proxyReq.WithContext(req.Context()) - if pa := s.proxyAuth(proxyURL); pa != "" { proxyReq.Header = http.Header{} proxyReq.Header.Set("Proxy-Authorization", pa) } - proxyDialConn, err := s.dialWithoutProxy(proxyReq.Context(), proxyURL) + proxyDialConn, err := s.dialWithoutProxy(req.Context(), proxyURL) if err != nil { return nil, err } @@ -195,59 +194,10 @@ func (s *SpdyRoundTripper) dialWithHttpProxy(req *http.Request, proxyURL *url.UR rwc, _ := proxyClientConn.Hijack() - if req.URL.Scheme == "https" { - return s.tlsConn(proxyReq.Context(), rwc, targetHost) - } - return rwc, nil -} - -// dialWithSocks5Proxy dials the host specified by url through a socks5 proxy. -func (s *SpdyRoundTripper) dialWithSocks5Proxy(req *http.Request, proxyURL *url.URL) (net.Conn, error) { - // ensure we use a canonical host with proxyReq - targetHost := netutil.CanonicalAddr(req.URL) - proxyDialAddr := netutil.CanonicalAddr(proxyURL) - - var auth *proxy.Auth - if proxyURL.User != nil { - pass, _ := proxyURL.User.Password() - auth = &proxy.Auth{ - User: proxyURL.User.Username(), - Password: pass, - } - } - - dialer := s.Dialer - if dialer == nil { - dialer = &net.Dialer{ - Timeout: 30 * time.Second, - } + if req.URL.Scheme != "https" { + return rwc, nil } - proxyDialer, err := proxy.SOCKS5("tcp", proxyDialAddr, auth, dialer) - if err != nil { - return nil, err - } - - // According to the implementation of proxy.SOCKS5, the type assertion will always succeed - contextDialer, ok := proxyDialer.(proxy.ContextDialer) - if !ok { - return nil, errors.New("SOCKS5 Dialer must implement ContextDialer") - } - - proxyDialConn, err := contextDialer.DialContext(req.Context(), "tcp", targetHost) - if err != nil { - return nil, err - } - - if req.URL.Scheme == "https" { - return s.tlsConn(req.Context(), proxyDialConn, targetHost) - } - return proxyDialConn, nil -} - -// tlsConn returns a TLS client side connection using rwc as the underlying transport. -func (s *SpdyRoundTripper) tlsConn(ctx context.Context, rwc net.Conn, targetHost string) (net.Conn, error) { - host, _, err := net.SplitHostPort(targetHost) if err != nil { return nil, err @@ -265,7 +215,7 @@ func (s *SpdyRoundTripper) tlsConn(ctx context.Context, rwc net.Conn, targetHost tlsConn := tls.Client(rwc, tlsConfig) // need to manually call Handshake() so we can call VerifyHostname() below - if err := tlsConn.HandshakeContext(ctx); err != nil { + if err := tlsConn.Handshake(); err != nil { return nil, err } @@ -350,9 +300,13 @@ func (s *SpdyRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) err error ) - clone := utilnet.CloneRequest(req) - clone.Header = header - conn, err = s.Dial(clone) + if s.followRedirects { + conn, rawResponse, err = utilnet.ConnectWithRedirects(req.Method, req.URL, header, req.Body, s, s.requireSameHostRedirects) + } else { + clone := utilnet.CloneRequest(req) + clone.Header = header + conn, err = s.Dial(clone) + } if err != nil { return nil, err } diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go index 8f9ced93fb61..a4792034abfb 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go @@ -78,25 +78,25 @@ func init() { var fileDescriptor_94e046ae3ce6121c = []byte{ // 292 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0xb1, 0x4a, 0x03, 0x31, - 0x1c, 0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+ 0x17, 0x41, 0x8f, 0x83, 0xf6, 0xc3, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x52, 0xa0, 0xb5, 0xc9, + 0x64, 0x01, 0x00, 0x00, } func (m *IntOrString) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto index 7c63c5e45af5..a76f79851f9a 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto @@ -22,7 +22,7 @@ syntax = "proto2"; package k8s.io.apimachinery.pkg.util.intstr; // Package-wide variables from generator "generated". -option go_package = "k8s.io/apimachinery/pkg/util/intstr"; +option go_package = "intstr"; // IntOrString is a type that can hold an int32 or a string. When used in // JSON or YAML marshalling and unmarshalling, it produces or consumes the diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go index c27380c19c60..c0e8927fe4e3 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go @@ -131,10 +131,6 @@ func (IntOrString) OpenAPISchemaType() []string { return []string{"string"} } // the OpenAPI spec of this type. func (IntOrString) OpenAPISchemaFormat() string { return "int-or-string" } -// OpenAPIV3OneOfTypes is used by the kube-openapi generator when constructing -// the OpenAPI v3 spec of this type. -func (IntOrString) OpenAPIV3OneOfTypes() []string { return []string{"integer", "string"} } - func ValueOrDefault(intOrPercent *IntOrString, defaultValue IntOrString) *IntOrString { if intOrPercent == nil { return &defaultValue diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/managedfields/gvkparser.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/managedfields/gvkparser.go index 408739c50f97..0cc228af936c 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/managedfields/gvkparser.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/managedfields/gvkparser.go @@ -22,7 +22,6 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/kube-openapi/pkg/schemaconv" "k8s.io/kube-openapi/pkg/util/proto" - smdschema "sigs.k8s.io/structured-merge-diff/v4/schema" "sigs.k8s.io/structured-merge-diff/v4/typed" ) @@ -59,7 +58,7 @@ func NewGVKParser(models proto.Models, preserveUnknownFields bool) (*GvkParser, parser := GvkParser{ gvks: map[schema.GroupVersionKind]string{}, } - parser.parser = typed.Parser{Schema: smdschema.Schema{Types: typeSchema.Types}} + parser.parser = typed.Parser{Schema: *typeSchema} for _, modelName := range models.ListModels() { model := models.LookupModel(modelName) if model == nil { diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/mergepatch/OWNERS b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/mergepatch/OWNERS index 349bc69d6582..3f72c69ba396 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/mergepatch/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/mergepatch/OWNERS @@ -1,6 +1,7 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - pwittrock +- pwittrock reviewers: - - apelisse +- mengqiy +- apelisse diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/net/http.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/net/http.go index 8cc1810af133..04432b175d66 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/net/http.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/net/http.go @@ -17,6 +17,7 @@ limitations under the License. package net import ( + "bufio" "bytes" "context" "crypto/tls" @@ -445,6 +446,104 @@ type Dialer interface { Dial(req *http.Request) (net.Conn, error) } +// ConnectWithRedirects uses dialer to send req, following up to 10 redirects (relative to +// originalLocation). It returns the opened net.Conn and the raw response bytes. +// If requireSameHostRedirects is true, only redirects to the same host are permitted. +func ConnectWithRedirects(originalMethod string, originalLocation *url.URL, header http.Header, originalBody io.Reader, dialer Dialer, requireSameHostRedirects bool) (net.Conn, []byte, error) { + const ( + maxRedirects = 9 // Fail on the 10th redirect + maxResponseSize = 16384 // play it safe to allow the potential for lots of / large headers + ) + + var ( + location = originalLocation + method = originalMethod + intermediateConn net.Conn + rawResponse = bytes.NewBuffer(make([]byte, 0, 256)) + body = originalBody + ) + + defer func() { + if intermediateConn != nil { + intermediateConn.Close() + } + }() + +redirectLoop: + for redirects := 0; ; redirects++ { + if redirects > maxRedirects { + return nil, nil, fmt.Errorf("too many redirects (%d)", redirects) + } + + req, err := http.NewRequest(method, location.String(), body) + if err != nil { + return nil, nil, err + } + + req.Header = header + + intermediateConn, err = dialer.Dial(req) + if err != nil { + return nil, nil, err + } + + // Peek at the backend response. + rawResponse.Reset() + respReader := bufio.NewReader(io.TeeReader( + io.LimitReader(intermediateConn, maxResponseSize), // Don't read more than maxResponseSize bytes. + rawResponse)) // Save the raw response. + resp, err := http.ReadResponse(respReader, nil) + if err != nil { + // Unable to read the backend response; let the client handle it. + klog.Warningf("Error reading backend response: %v", err) + break redirectLoop + } + + switch resp.StatusCode { + case http.StatusFound: + // Redirect, continue. + default: + // Don't redirect. + break redirectLoop + } + + // Redirected requests switch to "GET" according to the HTTP spec: + // https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3 + method = "GET" + // don't send a body when following redirects + body = nil + + resp.Body.Close() // not used + + // Prepare to follow the redirect. + redirectStr := resp.Header.Get("Location") + if redirectStr == "" { + return nil, nil, fmt.Errorf("%d response missing Location header", resp.StatusCode) + } + // We have to parse relative to the current location, NOT originalLocation. For example, + // if we request http://foo.com/a and get back "http://bar.com/b", the result should be + // http://bar.com/b. If we then make that request and get back a redirect to "/c", the result + // should be http://bar.com/c, not http://foo.com/c. + location, err = location.Parse(redirectStr) + if err != nil { + return nil, nil, fmt.Errorf("malformed Location header: %v", err) + } + + // Only follow redirects to the same host. Otherwise, propagate the redirect response back. + if requireSameHostRedirects && location.Hostname() != originalLocation.Hostname() { + return nil, nil, fmt.Errorf("hostname mismatch: expected %s, found %s", originalLocation.Hostname(), location.Hostname()) + } + + // Reset the connection. + intermediateConn.Close() + intermediateConn = nil + } + + connToReturn := intermediateConn + intermediateConn = nil // Don't close the connection when we return it. + return connToReturn, rawResponse.Bytes(), nil +} + // CloneRequest creates a shallow copy of the request along with a deep copy of the Headers. func CloneRequest(req *http.Request) *http.Request { r := new(http.Request) diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/proxy/transport.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/proxy/transport.go index b92009937036..28c654676eef 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/proxy/transport.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/proxy/transport.go @@ -83,7 +83,7 @@ type Transport struct { // RoundTrip implements the http.RoundTripper interface func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) { // Add reverse proxy headers. - forwardedURI := path.Join(t.PathPrepend, req.URL.EscapedPath()) + forwardedURI := path.Join(t.PathPrepend, req.URL.Path) if strings.HasSuffix(req.URL.Path, "/") { forwardedURI = forwardedURI + "/" } @@ -106,11 +106,7 @@ func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) { } if redirect := resp.Header.Get("Location"); redirect != "" { - targetURL, err := url.Parse(redirect) - if err != nil { - return nil, errors.NewInternalError(fmt.Errorf("error trying to parse Location header: %v", err)) - } - resp.Header.Set("Location", t.rewriteURL(targetURL, req.URL, req.Host)) + resp.Header.Set("Location", t.rewriteURL(redirect, req.URL, req.Host)) return resp, nil } @@ -132,8 +128,14 @@ func (rt *Transport) WrappedRoundTripper() http.RoundTripper { // rewriteURL rewrites a single URL to go through the proxy, if the URL refers // to the same host as sourceURL, which is the page on which the target URL -// occurred, or if the URL matches the sourceRequestHost. -func (t *Transport) rewriteURL(url *url.URL, sourceURL *url.URL, sourceRequestHost string) string { +// occurred, or if the URL matches the sourceRequestHost. If any error occurs (e.g. +// parsing), it returns targetURL. +func (t *Transport) rewriteURL(targetURL string, sourceURL *url.URL, sourceRequestHost string) string { + url, err := url.Parse(targetURL) + if err != nil { + return targetURL + } + // Example: // When API server processes a proxy request to a service (e.g. /api/v1/namespace/foo/service/bar/proxy/), // the sourceURL.Host (i.e. req.URL.Host) is the endpoint IP address of the service. The @@ -149,7 +151,7 @@ func (t *Transport) rewriteURL(url *url.URL, sourceURL *url.URL, sourceRequestHo isDifferentHost := url.Host != "" && url.Host != sourceURL.Host && url.Host != sourceRequestHost isRelative := !strings.HasPrefix(url.Path, "/") if isDifferentHost || isRelative { - return url.String() + return targetURL } // Do not rewrite scheme and host if the Transport has empty scheme and host @@ -176,7 +178,7 @@ func (t *Transport) rewriteURL(url *url.URL, sourceURL *url.URL, sourceRequestHo // rewriteHTML scans the HTML for tags with url-valued attributes, and updates // those values with the urlRewriter function. The updated HTML is output to the // writer. -func rewriteHTML(reader io.Reader, writer io.Writer, urlRewriter func(*url.URL) string) error { +func rewriteHTML(reader io.Reader, writer io.Writer, urlRewriter func(string) string) error { // Note: This assumes the content is UTF-8. tokenizer := html.NewTokenizer(reader) @@ -191,14 +193,7 @@ func rewriteHTML(reader io.Reader, writer io.Writer, urlRewriter func(*url.URL) if urlAttrs, ok := atomsToAttrs[token.DataAtom]; ok { for i, attr := range token.Attr { if urlAttrs.Has(attr.Key) { - url, err := url.Parse(attr.Val) - if err != nil { - // Do not rewrite the URL if it isn't valid. It is intended not - // to error here to prevent the inability to understand the - // content of the body to cause a fatal error. - continue - } - token.Attr[i].Val = urlRewriter(url) + token.Attr[i].Val = urlRewriter(attr.Val) } } } @@ -253,7 +248,7 @@ func (t *Transport) rewriteResponse(req *http.Request, resp *http.Response) (*ht return resp, nil } - urlRewriter := func(targetUrl *url.URL) string { + urlRewriter := func(targetUrl string) string { return t.rewriteURL(targetUrl, req.URL, req.Host) } err := rewriteHTML(reader, writer, urlRewriter) diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go index f56c17ca3cdc..e84548017f54 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go @@ -69,6 +69,11 @@ type UpgradeAwareHandler struct { UpgradeTransport UpgradeRequestRoundTripper // WrapTransport indicates whether the provided Transport should be wrapped with default proxy transport behavior (URL rewriting, X-Forwarded-* header setting) WrapTransport bool + // InterceptRedirects determines whether the proxy should sniff backend responses for redirects, + // following them as necessary. + InterceptRedirects bool + // RequireSameHostRedirects only allows redirects to the same host. It is only used if InterceptRedirects=true. + RequireSameHostRedirects bool // UseRequestLocation will use the incoming request URL when talking to the backend server. UseRequestLocation bool // UseLocationHost overrides the HTTP host header in requests to the backend server to use the Host from Location. @@ -305,12 +310,17 @@ func (h *UpgradeAwareHandler) tryUpgrade(w http.ResponseWriter, req *http.Reques // Only append X-Forwarded-For in the upgrade path, since httputil.NewSingleHostReverseProxy // handles this in the non-upgrade path. utilnet.AppendForwardedForHeader(clone) - klog.V(6).Infof("Connecting to backend proxy (direct dial) %s\n Headers: %v", &location, clone.Header) - if h.UseLocationHost { - clone.Host = h.Location.Host + if h.InterceptRedirects { + klog.V(6).Infof("Connecting to backend proxy (intercepting redirects) %s\n Headers: %v", &location, clone.Header) + backendConn, rawResponse, err = utilnet.ConnectWithRedirects(req.Method, &location, clone.Header, req.Body, utilnet.DialerFunc(h.DialForUpgrade), h.RequireSameHostRedirects) + } else { + klog.V(6).Infof("Connecting to backend proxy (direct dial) %s\n Headers: %v", &location, clone.Header) + if h.UseLocationHost { + clone.Host = h.Location.Host + } + clone.URL = &location + backendConn, err = h.DialForUpgrade(clone) } - clone.URL = &location - backendConn, err = h.DialForUpgrade(clone) if err != nil { klog.V(6).Infof("Proxy connection error: %v", err) h.Responder.Error(w, req, err) diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go index 9f834fa538df..035c52811c5e 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go @@ -27,10 +27,9 @@ import ( ) var ( - // ReallyCrash controls the behavior of HandleCrash and defaults to - // true. It's exposed so components can optionally set to false - // to restore prior behavior. This flag is mostly used for tests to validate - // crash conditions. + // ReallyCrash controls the behavior of HandleCrash and now defaults + // true. It's still exposed so components can optionally set to false + // to restore prior behavior. ReallyCrash = true ) diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/OWNERS b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/OWNERS index 4443bafd137b..cfee199fa08d 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/OWNERS @@ -1,8 +1,8 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - pwittrock +- pwittrock +- mengqiy reviewers: - - apelisse -emeritus_approvers: - - mengqiy +- mengqiy +- apelisse diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go index 6fb36973213f..1aedaa1563f8 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go @@ -1330,9 +1330,6 @@ func mergeMap(original, patch map[string]interface{}, schema LookupPatchMeta, me if !ok { if !isDeleteList { // If it's not in the original document, just take the patch value. - if mergeOptions.IgnoreUnmatchedNulls { - discardNullValuesFromPatch(patchV) - } original[k] = patchV } continue @@ -1342,9 +1339,6 @@ func mergeMap(original, patch map[string]interface{}, schema LookupPatchMeta, me patchType := reflect.TypeOf(patchV) if originalType != patchType { if !isDeleteList { - if mergeOptions.IgnoreUnmatchedNulls { - discardNullValuesFromPatch(patchV) - } original[k] = patchV } continue @@ -1381,25 +1375,6 @@ func mergeMap(original, patch map[string]interface{}, schema LookupPatchMeta, me return original, nil } -// discardNullValuesFromPatch discards all null property values from patch. -// It traverses all slices and map types. -func discardNullValuesFromPatch(patchV interface{}) { - switch patchV := patchV.(type) { - case map[string]interface{}: - for k, v := range patchV { - if v == nil { - delete(patchV, k) - } else { - discardNullValuesFromPatch(v) - } - } - case []interface{}: - for _, v := range patchV { - discardNullValuesFromPatch(v) - } - } -} - // mergeMapHandler handles how to merge `patchV` whose key is `key` with `original` respecting // fieldPatchStrategy and mergeOptions. func mergeMapHandler(original, patch interface{}, schema LookupPatchMeta, diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go index b7abf39b5d56..2ed368f56937 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go @@ -42,24 +42,12 @@ func (v *Error) Error() string { return fmt.Sprintf("%s: %s", v.Field, v.ErrorBody()) } -type omitValueType struct{} - -var omitValue = omitValueType{} - // ErrorBody returns the error message without the field name. This is useful // for building nice-looking higher-level error reporting. func (v *Error) ErrorBody() string { var s string - switch { - case v.Type == ErrorTypeRequired: - s = v.Type.String() - case v.Type == ErrorTypeForbidden: - s = v.Type.String() - case v.Type == ErrorTypeTooLong: - s = v.Type.String() - case v.Type == ErrorTypeInternal: - s = v.Type.String() - case v.BadValue == omitValue: + switch v.Type { + case ErrorTypeRequired, ErrorTypeForbidden, ErrorTypeTooLong, ErrorTypeInternal: s = v.Type.String() default: value := v.BadValue @@ -135,8 +123,6 @@ const ( // ErrorTypeInternal is used to report other errors that are not related // to user input. See InternalError(). ErrorTypeInternal ErrorType = "InternalError" - // ErrorTypeTypeInvalid is for the value did not match the schema type for that field - ErrorTypeTypeInvalid ErrorType = "FieldValueTypeInvalid" ) // String converts a ErrorType into its corresponding canonical error message. @@ -160,18 +146,11 @@ func (t ErrorType) String() string { return "Too many" case ErrorTypeInternal: return "Internal error" - case ErrorTypeTypeInvalid: - return "Invalid value" default: panic(fmt.Sprintf("unrecognized validation error: %q", string(t))) } } -// TypeInvalid returns a *Error indicating "type is invalid" -func TypeInvalid(field *Path, value interface{}, detail string) *Error { - return &Error{ErrorTypeTypeInvalid, field.String(), value, detail} -} - // NotFound returns a *Error indicating "value not found". This is // used to report failure to find a requested value (e.g. looking up an ID). func NotFound(field *Path, value interface{}) *Error { @@ -228,40 +207,11 @@ func TooLong(field *Path, value interface{}, maxLength int) *Error { return &Error{ErrorTypeTooLong, field.String(), value, fmt.Sprintf("must have at most %d bytes", maxLength)} } -// TooLongMaxLength returns a *Error indicating "too long". This is used to -// report that the given value is too long. This is similar to -// Invalid, but the returned error will not include the too-long -// value. If maxLength is negative, no max length will be included in the message. -func TooLongMaxLength(field *Path, value interface{}, maxLength int) *Error { - var msg string - if maxLength >= 0 { - msg = fmt.Sprintf("may not be longer than %d", maxLength) - } else { - msg = "value is too long" - } - return &Error{ErrorTypeTooLong, field.String(), value, msg} -} - // TooMany returns a *Error indicating "too many". This is used to // report that a given list has too many items. This is similar to TooLong, // but the returned error indicates quantity instead of length. func TooMany(field *Path, actualQuantity, maxQuantity int) *Error { - var msg string - - if maxQuantity >= 0 { - msg = fmt.Sprintf("must have at most %d items", maxQuantity) - } else { - msg = "has too many items" - } - - var actual interface{} - if actualQuantity >= 0 { - actual = actualQuantity - } else { - actual = omitValue - } - - return &Error{ErrorTypeTooMany, field.String(), actual, msg} + return &Error{ErrorTypeTooMany, field.String(), actualQuantity, fmt.Sprintf("must have at most %d items", maxQuantity)} } // InternalError returns a *Error indicating "internal error". This is used diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/watch/watch.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/watch/watch.go index b6c7bbfa8faf..fd0550e4a7a4 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/watch/watch.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/pkg/watch/watch.go @@ -27,11 +27,11 @@ import ( // Interface can be implemented by anything that knows how to watch and report changes. type Interface interface { - // Stop stops watching. Will close the channel returned by ResultChan(). Releases + // Stops watching. Will close the channel returned by ResultChan(). Releases // any resources used by the watch. Stop() - // ResultChan returns a chan which will receive all the events. If an error occurs + // Returns a chan which will receive all the events. If an error occurs // or Stop() is called, the implementation will close this channel and // release any resources used by the watch. ResultChan() <-chan Event diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/third_party/forked/golang/json/OWNERS b/cluster-autoscaler/vendor/k8s.io/apimachinery/third_party/forked/golang/json/OWNERS index 349bc69d6582..3f72c69ba396 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/third_party/forked/golang/json/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/third_party/forked/golang/json/OWNERS @@ -1,6 +1,7 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - pwittrock +- pwittrock reviewers: - - apelisse +- mengqiy +- apelisse diff --git a/cluster-autoscaler/vendor/k8s.io/apimachinery/third_party/forked/golang/netutil/addr.go b/cluster-autoscaler/vendor/k8s.io/apimachinery/third_party/forked/golang/netutil/addr.go index bd26f427e3f6..c70f431c2726 100644 --- a/cluster-autoscaler/vendor/k8s.io/apimachinery/third_party/forked/golang/netutil/addr.go +++ b/cluster-autoscaler/vendor/k8s.io/apimachinery/third_party/forked/golang/netutil/addr.go @@ -12,9 +12,8 @@ func hasPort(s string) bool { return strings.LastIndex(s, ":") > strings.LastInd // FROM: http://golang.org/src/net/http/transport.go var portMap = map[string]string{ - "http": "80", - "https": "443", - "socks5": "1080", + "http": "80", + "https": "443", } // FROM: http://golang.org/src/net/http/transport.go diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/audit.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/audit.go index 7c0993f0908f..02694b0a9140 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/audit.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/audit.go @@ -19,13 +19,19 @@ package admission import ( "context" "fmt" + "sync" + auditinternal "k8s.io/apiserver/pkg/apis/audit" "k8s.io/apiserver/pkg/audit" ) // auditHandler logs annotations set by other admission handlers type auditHandler struct { Interface + // TODO: move the lock near the Annotations field of the audit event so it is always protected from concurrent access. + // to protect the 'Annotations' map of the audit event from concurrent writes + mutex sync.Mutex + ae *auditinternal.Event } var _ Interface = &auditHandler{} @@ -36,11 +42,11 @@ var _ ValidationInterface = &auditHandler{} // of attribute into the audit event. Attributes passed to the Admit and // Validate function must be instance of privateAnnotationsGetter or // AnnotationsGetter, otherwise an error is returned. -func WithAudit(i Interface) Interface { +func WithAudit(i Interface, ae *auditinternal.Event) Interface { if i == nil { return i } - return &auditHandler{Interface: i} + return &auditHandler{Interface: i, ae: ae} } func (handler *auditHandler) Admit(ctx context.Context, a Attributes, o ObjectInterfaces) error { @@ -53,7 +59,7 @@ func (handler *auditHandler) Admit(ctx context.Context, a Attributes, o ObjectIn var err error if mutator, ok := handler.Interface.(MutationInterface); ok { err = mutator.Admit(ctx, a, o) - handler.logAnnotations(ctx, a) + handler.logAnnotations(a) } return err } @@ -68,7 +74,7 @@ func (handler *auditHandler) Validate(ctx context.Context, a Attributes, o Objec var err error if validator, ok := handler.Interface.(ValidationInterface); ok { err = validator.Validate(ctx, a, o) - handler.logAnnotations(ctx, a) + handler.logAnnotations(a) } return err } @@ -82,21 +88,23 @@ func ensureAnnotationGetter(a Attributes) error { return fmt.Errorf("attributes must be an instance of privateAnnotationsGetter or AnnotationsGetter") } -func (handler *auditHandler) logAnnotations(ctx context.Context, a Attributes) { - ae := audit.AuditEventFrom(ctx) - if ae == nil { +func (handler *auditHandler) logAnnotations(a Attributes) { + if handler.ae == nil { return } + handler.mutex.Lock() + defer handler.mutex.Unlock() - var annotations map[string]string switch a := a.(type) { case privateAnnotationsGetter: - annotations = a.getAnnotations(ae.Level) + for key, value := range a.getAnnotations(handler.ae.Level) { + audit.LogAnnotation(handler.ae, key, value) + } case AnnotationsGetter: - annotations = a.GetAnnotations(ae.Level) + for key, value := range a.GetAnnotations(handler.ae.Level) { + audit.LogAnnotation(handler.ae, key, value) + } default: // this will never happen, because we have already checked it in ensureAnnotationGetter } - - audit.AddAuditAnnotationsMap(ctx, annotations) } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/interfaces.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/interfaces.go index ba979c973f1c..8882680b2c59 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/interfaces.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/interfaces.go @@ -52,7 +52,7 @@ type Attributes interface { IsDryRun() bool // GetObject is the object from the incoming request prior to default values being applied GetObject() runtime.Object - // GetOldObject is the existing object. Only populated for UPDATE and DELETE requests. + // GetOldObject is the existing object. Only populated for UPDATE requests. GetOldObject() runtime.Object // GetKind is the type of object being manipulated. For example: Pod GetKind() schema.GroupVersionKind diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/metrics/metrics.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/metrics/metrics.go index 8482aea880b2..757e26882d5e 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/metrics/metrics.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/metrics/metrics.go @@ -116,7 +116,6 @@ type AdmissionMetrics struct { controller *metricSet webhook *metricSet webhookRejection *metrics.CounterVec - webhookFailOpen *metrics.CounterVec webhookRequest *metrics.CounterVec } @@ -197,16 +196,6 @@ func newAdmissionMetrics() *AdmissionMetrics { }, []string{"name", "type", "operation", "error_type", "rejection_code"}) - webhookFailOpen := metrics.NewCounterVec( - &metrics.CounterOpts{ - Namespace: namespace, - Subsystem: subsystem, - Name: "webhook_fail_open_count", - Help: "Admission webhook fail open count, identified by name and broken out for each admission type (validating or mutating).", - StabilityLevel: metrics.ALPHA, - }, - []string{"name", "type"}) - webhookRequest := metrics.NewCounterVec( &metrics.CounterOpts{ Namespace: namespace, @@ -221,9 +210,8 @@ func newAdmissionMetrics() *AdmissionMetrics { controller.mustRegister() webhook.mustRegister() legacyregistry.MustRegister(webhookRejection) - legacyregistry.MustRegister(webhookFailOpen) legacyregistry.MustRegister(webhookRequest) - return &AdmissionMetrics{step: step, controller: controller, webhook: webhook, webhookRejection: webhookRejection, webhookFailOpen: webhookFailOpen, webhookRequest: webhookRequest} + return &AdmissionMetrics{step: step, controller: controller, webhook: webhook, webhookRejection: webhookRejection, webhookRequest: webhookRequest} } func (m *AdmissionMetrics) reset() { @@ -262,11 +250,6 @@ func (m *AdmissionMetrics) ObserveWebhookRejection(ctx context.Context, name, st m.webhookRejection.WithContext(ctx).WithLabelValues(name, stepType, operation, string(errorType), strconv.Itoa(rejectionCode)).Inc() } -// ObserveWebhookFailOpen records validating or mutating webhook that fail open. -func (m *AdmissionMetrics) ObserveWebhookFailOpen(ctx context.Context, name, stepType string) { - m.webhookFailOpen.WithContext(ctx).WithLabelValues(name, stepType).Inc() -} - type metricSet struct { latencies *metrics.HistogramVec latenciesSummary *metrics.SummaryVec diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/dispatcher.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/dispatcher.go index 60ecec1098cb..16642c183e22 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/dispatcher.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/dispatcher.go @@ -178,7 +178,7 @@ func (a *mutatingDispatcher) Dispatch(ctx context.Context, attr admission.Attrib if callErr, ok := err.(*webhookutil.ErrCallingWebhook); ok { if ignoreClientCallFailures { klog.Warningf("Failed calling webhook, failing open %v: %v", hook.Name, callErr) - admissionmetrics.Metrics.ObserveWebhookFailOpen(ctx, hook.Name, "admit") + annotator.addFailedOpenAnnotation() utilruntime.HandleError(callErr) @@ -265,9 +265,9 @@ func (a *mutatingDispatcher) callAttrMutatingHook(ctx context.Context, h *admiss } do := func() { err = r.Do(ctx).Into(response) } - if wd, ok := endpointsrequest.LatencyTrackersFrom(ctx); ok { + if wd, ok := endpointsrequest.WebhookDurationFrom(ctx); ok { tmp := do - do = func() { wd.MutatingWebhookTracker.Track(tmp) } + do = func() { wd.AdmitTracker.Track(tmp) } } do() if err != nil { diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/dispatcher.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/dispatcher.go index a11da8b94c08..56099695a6cb 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/dispatcher.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/dispatcher.go @@ -140,7 +140,7 @@ func (d *validatingDispatcher) Dispatch(ctx context.Context, attr admission.Attr if callErr, ok := err.(*webhookutil.ErrCallingWebhook); ok { if ignoreClientCallFailures { klog.Warningf("Failed calling webhook, failing open %v: %v", hook.Name, callErr) - admissionmetrics.Metrics.ObserveWebhookFailOpen(ctx, hook.Name, "validating") + key := fmt.Sprintf("%sround_0_index_%d", ValidatingAuditAnnotationFailedOpenKeyPrefix, idx) value := hook.Name if err := versionedAttr.Attributes.AddAnnotation(key, value); err != nil { @@ -232,9 +232,9 @@ func (d *validatingDispatcher) callHook(ctx context.Context, h *v1.ValidatingWeb } do := func() { err = r.Do(ctx).Into(response) } - if wd, ok := endpointsrequest.LatencyTrackersFrom(ctx); ok { + if wd, ok := endpointsrequest.WebhookDurationFrom(ctx); ok { tmp := do - do = func() { wd.ValidatingWebhookTracker.Track(tmp) } + do = func() { wd.ValidateTracker.Track(tmp) } } do() if err != nil { diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/OWNERS b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/OWNERS index 72f9f9c6904a..7a21104f6dfb 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/OWNERS @@ -2,7 +2,8 @@ # approval on api packages bubbles to api-approvers reviewers: - - sig-auth-audit-approvers - - sig-auth-audit-reviewers +- sig-auth-audit-approvers +- sig-auth-audit-reviewers labels: - - sig/auth +- sig/auth + diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/install/install.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/install/install.go index 6911f1270171..6e7d5bc824ed 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/install/install.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/install/install.go @@ -23,11 +23,15 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apiserver/pkg/apis/audit" "k8s.io/apiserver/pkg/apis/audit/v1" + "k8s.io/apiserver/pkg/apis/audit/v1alpha1" + "k8s.io/apiserver/pkg/apis/audit/v1beta1" ) // Install registers the API group and adds types to a scheme func Install(scheme *runtime.Scheme) { utilruntime.Must(audit.AddToScheme(scheme)) utilruntime.Must(v1.AddToScheme(scheme)) - utilruntime.Must(scheme.SetVersionPriority(v1.SchemeGroupVersion)) + utilruntime.Must(v1beta1.AddToScheme(scheme)) + utilruntime.Must(v1alpha1.AddToScheme(scheme)) + utilruntime.Must(scheme.SetVersionPriority(v1.SchemeGroupVersion, v1beta1.SchemeGroupVersion, v1alpha1.SchemeGroupVersion)) } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/types.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/types.go index f369b2229b98..596e0220260c 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/types.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/types.go @@ -98,12 +98,6 @@ type Event struct { // +optional ImpersonatedUser *authnv1.UserInfo // Source IPs, from where the request originated and intermediate proxies. - // The source IPs are listed from (in order): - // 1. X-Forwarded-For request header IPs - // 2. X-Real-Ip header, if not present in the X-Forwarded-For list - // 3. The remote address for the connection, if it doesn't match the last - // IP in the list up to here (X-Forwarded-For or X-Real-Ip). - // Note: All but the last IP can be arbitrarily set by the client. // +optional SourceIPs []string // UserAgent records the user agent string reported by the client. diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1/generated.pb.go index d7454c7a55c7..32b1e98e2ca8 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1/generated.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1/generated.pb.go @@ -261,88 +261,88 @@ func init() { } var fileDescriptor_4982ac40a460d730 = []byte{ - // 1288 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0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b, 0x92, 0x5e, 0xd8, 0x33, 0x96, 0xab, - 0x95, 0x60, 0xef, 0x03, 0xb7, 0x1a, 0x25, 0x95, 0x71, 0x2e, 0xb2, 0x90, 0x58, 0x11, 0x1f, 0xa0, - 0xac, 0xc3, 0x61, 0xc4, 0xf4, 0x55, 0x59, 0x98, 0x0f, 0x96, 0x2e, 0x4c, 0x63, 0x23, 0xda, 0xba, - 0x4d, 0xc1, 0x27, 0xa1, 0x4c, 0xed, 0x17, 0x0d, 0x15, 0x9f, 0xfa, 0x6e, 0xe0, 0x11, 0x08, 0x57, - 0x09, 0xc3, 0xef, 0xa1, 0x6c, 0x4f, 0x58, 0xd4, 0x5d, 0x11, 0xf3, 0x42, 0x58, 0xe8, 0x13, 0xab, - 0xc9, 0x8f, 0x18, 0x32, 0x17, 0xb5, 0x9a, 0x62, 0x19, 0x92, 0xf8, 0xf1, 0x03, 0x31, 0x9d, 0xe1, - 0xe1, 0xc0, 0x1a, 0x01, 0xd3, 0x33, 0x92, 0xa0, 0x66, 0x2e, 0xe5, 0x20, 0xb3, 0xb8, 0xda, 0xaf, - 0x19, 0xb4, 0x39, 0xb7, 0x6e, 0xf0, 0x2e, 0xca, 0x45, 0x20, 0x95, 0x61, 0x5c, 0xaf, 0x48, 0x8b, - 0xc4, 0x08, 0xb1, 0x15, 0xa9, 0x90, 0xf2, 0x2c, 0x5b, 0xbd, 0xb9, 0x64, 0x2b, 0x1e, 0x44, 0x0e, - 0x92, 0x60, 0xc4, 0x4d, 0x22, 0x0e, 0xea, 0xaa, 0x8a, 0xf7, 0xbf, 0xc0, 0x12, 0xe9, 0xc1, 0x0d, - 0x94, 0x09, 0x9c, 0xae, 0xba, 0x98, 0xee, 0x2a, 0x40, 0xa6, 0xbd, 0xec, 0xad, 0x28, 0xc8, 0xe2, - 0x21, 0x2c, 0xcf, 0x91, 0x15, 0x55, 0x77, 0x56, 0xfc, 0x10, 0xf5, 0xa3, 0x66, 0x58, 0xe9, 0x18, - 0x21, 0x6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x1f, 0x9f, 0x15, 0x94, 0x15, 0xdf, 0x28, 0xd1, - 0x56, 0xc9, 0x0b, 0xa4, 0xf8, 0x7e, 0x61, 0x24, 0xb4, 0x63, 0x03, 0x21, 0xf1, 0x43, 0x8e, 0x46, - 0xf4, 0x76, 0x8a, 0xe2, 0xed, 0xb4, 0x63, 0x2b, 0x49, 0x21, 0x84, 0xa0, 0xf8, 0x02, 0x14, 0x2f, - 0x22, 0x16, 0x14, 0x1f, 0x86, 0x8c, 0x84, 0x76, 0x6c, 0xa7, 0x77, 0x59, 0x56, 0xd6, 0x60, 0x6f, - 0x99, 0x1a, 0xcc, 0xee, 0xcd, 0x64, 0xaf, 0x5c, 0xba, 0x03, 0x0d, 0x84, 0xe2, 0x25, 0xc3, 0xf4, - 0x1b, 0x49, 0xd6, 0xf1, 0x16, 0x62, 0x24, 0x85, 0xc0, 0x9f, 0xa3, 0x4d, 0xea, 0xd2, 0x48, 0xaa, - 0x4d, 0x9e, 0x33, 0x7d, 0x5d, 0x92, 0x6e, 0x89, 0xd9, 0x3d, 0x98, 0x75, 0x91, 0x79, 0xec, 0x5c, - 0x0b, 0xe7, 0x96, 0x6f, 0xe1, 0x2f, 0x2f, 0x6b, 0xe1, 0xbc, 0x6c, 0xe1, 0xb7, 0x96, 0x6d, 0xdf, - 0xc6, 0xb3, 0xd3, 0xb3, 0xf2, 0xca, 0xeb, 0xb3, 0xf2, 0xca, 0x9b, 0xb3, 0xf2, 0xca, 0x8f, 0xd3, - 0xb2, 0x76, 0x3a, 0x2d, 0x6b, 0xaf, 0xa7, 0x65, 0xed, 0xcd, 0xb4, 0xac, 0xfd, 0x39, 0x2d, 0x6b, - 0x3f, 0xff, 0x55, 0x5e, 0xf9, 0xb6, 0x76, 0xf5, 0x5f, 0xbe, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, - 0xef, 0x9b, 0x7d, 0x75, 0x30, 0x0e, 0x00, 0x00, + // 1287 bytes of a gzipped FileDescriptorProto + 0x1f, 0x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xab, 0x86, 0xf2, 0x32, 0xf8, 0x53, + 0x87, 0x71, 0xfc, 0x2d, 0xca, 0x89, 0xb7, 0xef, 0x59, 0xdc, 0x92, 0xf4, 0xc2, 0x81, 0xb1, 0x5a, + 0xad, 0x04, 0xfb, 0x19, 0x70, 0xab, 0x59, 0x52, 0x19, 0xe7, 0x22, 0x0b, 0x89, 0x15, 0xf1, 0x21, + 0xca, 0x3a, 0x1c, 0xc6, 0x4c, 0x5f, 0x97, 0x85, 0x79, 0x6f, 0xe5, 0xc2, 0x34, 0xb7, 0xa2, 0xad, + 0xdb, 0x12, 0x7c, 0x12, 0xca, 0xd4, 0x7e, 0xd6, 0x50, 0xf1, 0x89, 0xef, 0x06, 0x1e, 0x81, 0x70, + 0x95, 0x30, 0xfc, 0x0e, 0xca, 0xf6, 0x85, 0x45, 0xdd, 0x15, 0x31, 0x2f, 0x84, 0x85, 0x3e, 0xb1, + 0x9a, 0xfc, 0x88, 0x21, 0x73, 0x51, 0xab, 0x29, 0x96, 0x21, 0x89, 0x1f, 0xdf, 0x17, 0xd3, 0x19, + 0x1e, 0x0e, 0xad, 0x31, 0x30, 0x3d, 0x23, 0x09, 0x6a, 0xe6, 0x52, 0x0e, 0x32, 0x8f, 0xab, 0xfd, + 0x92, 0x41, 0xdb, 0x0b, 0xeb, 0x06, 0xef, 0xa1, 0x5c, 0x04, 0x52, 0x19, 0xc6, 0xf5, 0x8a, 0xb4, + 0x48, 0x8c, 0x10, 0x5b, 0x91, 0x0a, 0x29, 0xcf, 0xb2, 0xd5, 0x97, 0x4b, 0xb6, 0xe2, 0x61, 0xe4, + 0x20, 0x09, 0x46, 0xdc, 0x24, 0xe2, 0xa0, 0xae, 0xaa, 0x78, 0xff, 0x0b, 0x2c, 0x91, 0x1e, 0xdc, + 0x44, 0x99, 0xc0, 0xe9, 0xa9, 0x8b, 0xe9, 0xae, 0x02, 0x64, 0x3a, 0xab, 0xde, 0x8a, 0x82, 0x2c, + 0x5e, 0xc2, 0xf2,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6a, + 0x8e, 0x8a, 0xae, 0x10, 0x0e, 0x00, 0x00, } func (m *Event) Marshal() (dAtA []byte, err error) { diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1/generated.proto b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1/generated.proto index 8cdb12cdf967..0c20506501a4 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1/generated.proto +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1/generated.proto @@ -27,7 +27,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "k8s.io/apiserver/pkg/apis/audit/v1"; +option go_package = "v1"; // Event captures all the information that can be included in an API audit log. message Event { @@ -55,12 +55,6 @@ message Event { optional k8s.io.api.authentication.v1.UserInfo impersonatedUser = 7; // Source IPs, from where the request originated and intermediate proxies. - // The source IPs are listed from (in order): - // 1. X-Forwarded-For request header IPs - // 2. X-Real-Ip header, if not present in the X-Forwarded-For list - // 3. The remote address for the connection, if it doesn't match the last - // IP in the list up to here (X-Forwarded-For or X-Real-Ip). - // Note: All but the last IP can be arbitrarily set by the client. // +optional repeated string sourceIPs = 8; diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1/types.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1/types.go index 27f4729eaafc..3f70ebaa5167 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1/types.go @@ -91,12 +91,6 @@ type Event struct { // +optional ImpersonatedUser *authnv1.UserInfo `json:"impersonatedUser,omitempty" protobuf:"bytes,7,opt,name=impersonatedUser"` // Source IPs, from where the request originated and intermediate proxies. - // The source IPs are listed from (in order): - // 1. X-Forwarded-For request header IPs - // 2. X-Real-Ip header, if not present in the X-Forwarded-For list - // 3. The remote address for the connection, if it doesn't match the last - // IP in the list up to here (X-Forwarded-For or X-Real-Ip). - // Note: All but the last IP can be arbitrarily set by the client. // +optional SourceIPs []string `json:"sourceIPs,omitempty" protobuf:"bytes,8,rep,name=sourceIPs"` // UserAgent records the user agent string reported by the client. diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/conversion.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/conversion.go new file mode 100644 index 000000000000..78e5eab09dc1 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/conversion.go @@ -0,0 +1,78 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + "strings" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apiserver/pkg/apis/audit" +) + +func Convert_audit_ObjectReference_To_v1alpha1_ObjectReference(in *audit.ObjectReference, out *ObjectReference, s conversion.Scope) error { + // Begin by copying all fields + if err := autoConvert_audit_ObjectReference_To_v1alpha1_ObjectReference(in, out, s); err != nil { + return err + } + // empty string means the core api group + if in.APIGroup == "" { + out.APIVersion = in.APIVersion + } else { + out.APIVersion = in.APIGroup + "/" + in.APIVersion + } + return nil +} + +func Convert_v1alpha1_ObjectReference_To_audit_ObjectReference(in *ObjectReference, out *audit.ObjectReference, s conversion.Scope) error { + // Begin by copying all fields + if err := autoConvert_v1alpha1_ObjectReference_To_audit_ObjectReference(in, out, s); err != nil { + return err + } + i := strings.LastIndex(in.APIVersion, "/") + if i == -1 { + // In fact it should always contain a "/" + out.APIVersion = in.APIVersion + } else { + out.APIGroup = in.APIVersion[:i] + out.APIVersion = in.APIVersion[i+1:] + } + return nil +} + +func Convert_v1alpha1_Event_To_audit_Event(in *Event, out *audit.Event, s conversion.Scope) error { + if err := autoConvert_v1alpha1_Event_To_audit_Event(in, out, s); err != nil { + return err + } + if out.StageTimestamp.IsZero() { + out.StageTimestamp = metav1.NewMicroTime(in.CreationTimestamp.Time) + } + if out.RequestReceivedTimestamp.IsZero() { + out.RequestReceivedTimestamp = metav1.NewMicroTime(in.Timestamp.Time) + } + return nil +} + +func Convert_audit_Event_To_v1alpha1_Event(in *audit.Event, out *Event, s conversion.Scope) error { + if err := autoConvert_audit_Event_To_v1alpha1_Event(in, out, s); err != nil { + return err + } + out.CreationTimestamp = metav1.NewTime(in.StageTimestamp.Time) + out.Timestamp = metav1.NewTime(in.RequestReceivedTimestamp.Time) + return nil + +} diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/doc.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/doc.go new file mode 100644 index 000000000000..ea9194afe8b1 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/doc.go @@ -0,0 +1,26 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +k8s:deepcopy-gen=package +// +k8s:protobuf-gen=package +// +k8s:conversion-gen=k8s.io/apiserver/pkg/apis/audit +// +k8s:openapi-gen=true +// +k8s:prerelease-lifecycle-gen=true +// +k8s:defaulter-gen=TypeMeta + +// +groupName=audit.k8s.io + +package v1alpha1 // import "k8s.io/apiserver/pkg/apis/audit/v1alpha1" diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/generated.pb.go new file mode 100644 index 000000000000..84ceca0b7b30 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/generated.pb.go @@ -0,0 +1,3288 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/generated.proto + +package v1alpha1 + +import ( + fmt "fmt" + + io "io" + + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + v11 "k8s.io/api/authentication/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" + + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +func (m *Event) Reset() { *m = Event{} } +func (*Event) ProtoMessage() {} +func (*Event) Descriptor() ([]byte, []int) { + return fileDescriptor_46c0b2c8ea67b187, []int{0} +} +func (m *Event) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Event) XXX_Merge(src proto.Message) { + xxx_messageInfo_Event.Merge(m, src) +} +func (m *Event) XXX_Size() int { + return m.Size() +} +func (m *Event) XXX_DiscardUnknown() { + xxx_messageInfo_Event.DiscardUnknown(m) +} + +var xxx_messageInfo_Event proto.InternalMessageInfo + +func (m *EventList) Reset() { *m = EventList{} } +func (*EventList) ProtoMessage() {} +func (*EventList) Descriptor() ([]byte, []int) { + return fileDescriptor_46c0b2c8ea67b187, []int{1} +} +func (m *EventList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EventList) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventList.Merge(m, src) +} +func (m *EventList) XXX_Size() int { + return m.Size() +} +func (m *EventList) XXX_DiscardUnknown() { + xxx_messageInfo_EventList.DiscardUnknown(m) +} + +var xxx_messageInfo_EventList proto.InternalMessageInfo + +func (m *GroupResources) Reset() { *m = GroupResources{} } +func (*GroupResources) ProtoMessage() {} +func (*GroupResources) Descriptor() ([]byte, []int) { + return fileDescriptor_46c0b2c8ea67b187, []int{2} +} +func (m *GroupResources) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GroupResources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *GroupResources) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupResources.Merge(m, src) +} +func (m *GroupResources) XXX_Size() int { + return m.Size() +} +func (m *GroupResources) XXX_DiscardUnknown() { + xxx_messageInfo_GroupResources.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupResources proto.InternalMessageInfo + +func (m *ObjectReference) Reset() { *m = ObjectReference{} } +func (*ObjectReference) ProtoMessage() {} +func (*ObjectReference) Descriptor() ([]byte, []int) { + return fileDescriptor_46c0b2c8ea67b187, []int{3} +} +func (m *ObjectReference) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ObjectReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ObjectReference) XXX_Merge(src proto.Message) { + xxx_messageInfo_ObjectReference.Merge(m, src) +} +func (m *ObjectReference) XXX_Size() int { + return m.Size() +} +func (m *ObjectReference) XXX_DiscardUnknown() { + xxx_messageInfo_ObjectReference.DiscardUnknown(m) +} + +var xxx_messageInfo_ObjectReference proto.InternalMessageInfo + +func (m *Policy) Reset() { *m = Policy{} } +func (*Policy) ProtoMessage() {} +func (*Policy) Descriptor() ([]byte, []int) { + return fileDescriptor_46c0b2c8ea67b187, []int{4} +} +func (m *Policy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Policy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Policy) XXX_Merge(src proto.Message) { + xxx_messageInfo_Policy.Merge(m, src) +} +func (m *Policy) XXX_Size() int { + return m.Size() +} +func (m *Policy) XXX_DiscardUnknown() { + xxx_messageInfo_Policy.DiscardUnknown(m) +} + +var xxx_messageInfo_Policy proto.InternalMessageInfo + +func (m *PolicyList) Reset() { *m = PolicyList{} } +func (*PolicyList) ProtoMessage() {} +func (*PolicyList) Descriptor() ([]byte, []int) { + return fileDescriptor_46c0b2c8ea67b187, []int{5} +} +func (m *PolicyList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PolicyList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *PolicyList) XXX_Merge(src proto.Message) { + xxx_messageInfo_PolicyList.Merge(m, src) +} +func (m *PolicyList) XXX_Size() int { + return m.Size() +} +func (m *PolicyList) XXX_DiscardUnknown() { + xxx_messageInfo_PolicyList.DiscardUnknown(m) +} + +var xxx_messageInfo_PolicyList proto.InternalMessageInfo + +func (m *PolicyRule) Reset() { *m = PolicyRule{} } +func (*PolicyRule) ProtoMessage() {} +func (*PolicyRule) Descriptor() ([]byte, []int) { + return fileDescriptor_46c0b2c8ea67b187, []int{6} +} +func (m *PolicyRule) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PolicyRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *PolicyRule) XXX_Merge(src proto.Message) { + xxx_messageInfo_PolicyRule.Merge(m, src) +} +func (m *PolicyRule) XXX_Size() int { + return m.Size() +} +func (m *PolicyRule) XXX_DiscardUnknown() { + xxx_messageInfo_PolicyRule.DiscardUnknown(m) +} + +var xxx_messageInfo_PolicyRule proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Event)(nil), "k8s.io.apiserver.pkg.apis.audit.v1alpha1.Event") + proto.RegisterMapType((map[string]string)(nil), "k8s.io.apiserver.pkg.apis.audit.v1alpha1.Event.AnnotationsEntry") + proto.RegisterType((*EventList)(nil), "k8s.io.apiserver.pkg.apis.audit.v1alpha1.EventList") + proto.RegisterType((*GroupResources)(nil), "k8s.io.apiserver.pkg.apis.audit.v1alpha1.GroupResources") + proto.RegisterType((*ObjectReference)(nil), "k8s.io.apiserver.pkg.apis.audit.v1alpha1.ObjectReference") + proto.RegisterType((*Policy)(nil), "k8s.io.apiserver.pkg.apis.audit.v1alpha1.Policy") + proto.RegisterType((*PolicyList)(nil), "k8s.io.apiserver.pkg.apis.audit.v1alpha1.PolicyList") + proto.RegisterType((*PolicyRule)(nil), "k8s.io.apiserver.pkg.apis.audit.v1alpha1.PolicyRule") +} + +func init() { + proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/generated.proto", fileDescriptor_46c0b2c8ea67b187) +} + +var fileDescriptor_46c0b2c8ea67b187 = []byte{ + // 1306 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0xc6, 0x71, 0xe3, 0x9d, 0x34, 0x4e, 0x32, 0x2d, 0x74, 0xc9, 0xc1, 0x0e, 0x41, 0x42, + 0x11, 0x84, 0xdd, 0xb6, 0x2a, 0xb4, 0x20, 0x81, 0x88, 0x69, 0x29, 0x96, 0xda, 0xb4, 0x4c, 0xea, + 0x4a, 0xfc, 0x39, 0x30, 0xb6, 0x5f, 0xec, 0xc5, 0xf6, 0xec, 0xb2, 0x33, 0xeb, 0x2a, 0x37, 0x0e, + 0xbd, 0x22, 0x71, 0xe7, 0x43, 0xf0, 0x11, 0x10, 0x27, 0x7a, 0xec, 0xb1, 0x27, 0x8b, 0x9a, 0x6f, + 0xd1, 0x13, 0x9a, 0xd9, 0xd9, 0x9d, 0xb5, 0x13, 0x8b, 0x0d, 0x87, 0xde, 0x66, 0xde, 0xfb, 0xbd, + 0xdf, 0x7b, 0xf3, 0xe6, 0xcd, 0x7b, 0x83, 0xbe, 0x1e, 0xdc, 0xe2, 0xae, 0x1f, 0x78, 0x83, 0xb8, + 0x0d, 0x11, 0x03, 0x01, 0xdc, 0x1b, 0x03, 0xeb, 0x06, 0x91,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5, 0x43, 0x48, 0xeb, 0xfc, + 0x46, 0xf1, 0x3a, 0x4f, 0x42, 0x24, 0xf1, 0x10, 0x4c, 0xd1, 0xca, 0x1d, 0x27, 0x09, 0x23, 0xbe, + 0x89, 0x50, 0x30, 0xf2, 0x85, 0xea, 0x46, 0x69, 0x11, 0x5e, 0x51, 0x81, 0x64, 0x52, 0xf3, 0x3f, + 0xc9, 0x41, 0xf1, 0x5d, 0xb4, 0x25, 0x77, 0xf7, 0x29, 0xa3, 0x3d, 0xe8, 0x7e, 0xe9, 0xc3, 0xb0, + 0xcb, 0x55, 0x01, 0x54, 0x1a, 0x6f, 0x69, 0x4f, 0x5b, 0x0f, 0xe6, 0x01, 0xe4, 0xb4, 0xcd, 0xee, + 0x9f, 0x16, 0x42, 0x49, 0x98, 0xaf, 0xa1, 0x63, 0xb4, 0x66, 0x3b, 0xc6, 0xd5, 0xf3, 0x66, 0x72, + 0x41, 0xcb, 0x78, 0xba, 0x92, 0x9e, 0x41, 0x26, 0xd7, 0xfc, 0x64, 0xad, 0x22, 0x3f, 0xd9, 0x3a, + 0x2a, 0xcb, 0x3f, 0x49, 0xda, 0x33, 0x6c, 0x89, 0x94, 0xff, 0x15, 0x4e, 0x12, 0x39, 0x76, 0x11, + 0x92, 0x0b, 0xd5, 0x6c, 0xd2, 0x3b, 0xaa, 0xca, 0x3b, 0x6a, 0x65, 0x52, 0x92, 0x43, 0x48, 0x42, + 0xf9, 0xe3, 0x93, 0xd7, 0x91, 0x11, 0xca, 0x8f, 0x20, 0x27, 0x89, 0x1c, 0xfb, 0xf9, 0x4e, 0x55, + 0x56, 0x99, 0xb8, 0x55, 0x3c, 0x13, 0xb3, 0xbd, 0xd1, 0xf4, 0x8e, 0x33, 0xfb, 0x9c, 0x8b, 0x50, + 0xd6, 0x48, 0xb8, 0x73, 0xc1, 0xc4, 0x9e, 0x75, 0x1a, 0x4e, 0x72, 0x08, 0xfc, 0x29, 0xda, 0x60, + 0x01, 0x4b, 0xa9, 0x5a, 0xe4, 0x1e, 0x77, 0x56, 0x95, 0xd1, 0x25, 0xf9, 0x9a, 0x0f, 0x67, 0x55, + 0x64, 0x1e, 0x3b, 0x57, 0xce, 0x95, 0xe2, 0xe5, 0xfc, 0xc5, 0x59, 0xe5, 0x6c, 0xab, 0x72, 0x7e, + 0xa3, 0x68, 0x29, 0x37, 0xdc, 0x67, 0x2f, 0x6b, 0x4b, 0xcf, 0x5f, 0xd6, 0x96, 0x5e, 0xbc, 0xac, + 0x2d, 0xfd, 0x3c, 0xad, 0x59, 0xcf, 0xa6, 0x35, 0xeb, 0xf9, 0xb4, 0x66, 0xbd, 0x98, 0xd6, 0xac, + 0xbf, 0xa7, 0x35, 0xeb, 0xd7, 0x7f, 0x6a, 0x4b, 0xdf, 0x56, 0xd2, 0x4c, 0xfe, 0x1b, 0x00, 0x00, + 0xff, 0xff, 0x3a, 0xc5, 0x5b, 0x91, 0xd7, 0x0e, 0x00, 0x00, +} + +func (m *Event) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Event) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.UserAgent) + copy(dAtA[i:], m.UserAgent) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.UserAgent))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x92 + if len(m.Annotations) > 0 { + keysForAnnotations := make([]string, 0, len(m.Annotations)) + for k := range m.Annotations { + keysForAnnotations = append(keysForAnnotations, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + for iNdEx := len(keysForAnnotations) - 1; iNdEx >= 0; iNdEx-- { + v := m.Annotations[string(keysForAnnotations[iNdEx])] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintGenerated(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(keysForAnnotations[iNdEx]) + copy(dAtA[i:], keysForAnnotations[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(keysForAnnotations[iNdEx]))) + i-- + dAtA[i] = 0xa + i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a + } + } + { + size, err := m.StageTimestamp.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + { + size, err := m.RequestReceivedTimestamp.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x7a + if m.ResponseObject != nil { + { + size, err := m.ResponseObject.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x72 + } + if m.RequestObject != nil { + { + size, err := m.RequestObject.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6a + } + if m.ResponseStatus != nil { + { + size, err := m.ResponseStatus.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + } + if m.ObjectRef != nil { + { + size, err := m.ObjectRef.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } + if len(m.SourceIPs) > 0 { + for iNdEx := len(m.SourceIPs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.SourceIPs[iNdEx]) + copy(dAtA[i:], m.SourceIPs[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.SourceIPs[iNdEx]))) + i-- + dAtA[i] = 0x52 + } + } + if m.ImpersonatedUser != nil { + { + size, err := m.ImpersonatedUser.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + { + size, err := m.User.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + i -= len(m.Verb) + copy(dAtA[i:], m.Verb) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Verb))) + i-- + dAtA[i] = 0x3a + i -= len(m.RequestURI) + copy(dAtA[i:], m.RequestURI) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.RequestURI))) + i-- + dAtA[i] = 0x32 + i -= len(m.Stage) + copy(dAtA[i:], m.Stage) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Stage))) + i-- + dAtA[i] = 0x2a + i -= len(m.AuditID) + copy(dAtA[i:], m.AuditID) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.AuditID))) + i-- + dAtA[i] = 0x22 + { + size, err := m.Timestamp.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + i -= len(m.Level) + copy(dAtA[i:], m.Level) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Level))) + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *EventList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *GroupResources) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GroupResources) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GroupResources) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ResourceNames) > 0 { + for iNdEx := len(m.ResourceNames) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ResourceNames[iNdEx]) + copy(dAtA[i:], m.ResourceNames[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceNames[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Resources) > 0 { + for iNdEx := len(m.Resources) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Resources[iNdEx]) + copy(dAtA[i:], m.Resources[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resources[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + i -= len(m.Group) + copy(dAtA[i:], m.Group) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ObjectReference) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ObjectReference) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ObjectReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Subresource) + copy(dAtA[i:], m.Subresource) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Subresource))) + i-- + dAtA[i] = 0x3a + i -= len(m.ResourceVersion) + copy(dAtA[i:], m.ResourceVersion) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceVersion))) + i-- + dAtA[i] = 0x32 + i -= len(m.APIVersion) + copy(dAtA[i:], m.APIVersion) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion))) + i-- + dAtA[i] = 0x2a + i -= len(m.UID) + copy(dAtA[i:], m.UID) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID))) + i-- + dAtA[i] = 0x22 + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x1a + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0x12 + i -= len(m.Resource) + copy(dAtA[i:], m.Resource) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Policy) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Policy) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Policy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i-- + if m.OmitManagedFields { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + if len(m.OmitStages) > 0 { + for iNdEx := len(m.OmitStages) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.OmitStages[iNdEx]) + copy(dAtA[i:], m.OmitStages[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.OmitStages[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Rules) > 0 { + for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Rules[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *PolicyList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PolicyList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PolicyList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *PolicyRule) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PolicyRule) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PolicyRule) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.OmitManagedFields != nil { + i-- + if *m.OmitManagedFields { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 + } + if len(m.OmitStages) > 0 { + for iNdEx := len(m.OmitStages) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.OmitStages[iNdEx]) + copy(dAtA[i:], m.OmitStages[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.OmitStages[iNdEx]))) + i-- + dAtA[i] = 0x42 + } + } + if len(m.NonResourceURLs) > 0 { + for iNdEx := len(m.NonResourceURLs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.NonResourceURLs[iNdEx]) + copy(dAtA[i:], m.NonResourceURLs[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.NonResourceURLs[iNdEx]))) + i-- + dAtA[i] = 0x3a + } + } + if len(m.Namespaces) > 0 { + for iNdEx := len(m.Namespaces) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Namespaces[iNdEx]) + copy(dAtA[i:], m.Namespaces[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespaces[iNdEx]))) + i-- + dAtA[i] = 0x32 + } + } + if len(m.Resources) > 0 { + for iNdEx := len(m.Resources) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Resources[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if len(m.Verbs) > 0 { + for iNdEx := len(m.Verbs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Verbs[iNdEx]) + copy(dAtA[i:], m.Verbs[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Verbs[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.UserGroups) > 0 { + for iNdEx := len(m.UserGroups) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.UserGroups[iNdEx]) + copy(dAtA[i:], m.UserGroups[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.UserGroups[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Users) > 0 { + for iNdEx := len(m.Users) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Users[iNdEx]) + copy(dAtA[i:], m.Users[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Users[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + i -= len(m.Level) + copy(dAtA[i:], m.Level) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Level))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { + offset -= sovGenerated(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Event) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Level) + n += 1 + l + sovGenerated(uint64(l)) + l = m.Timestamp.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.AuditID) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Stage) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.RequestURI) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Verb) + n += 1 + l + sovGenerated(uint64(l)) + l = m.User.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.ImpersonatedUser != nil { + l = m.ImpersonatedUser.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.SourceIPs) > 0 { + for _, s := range m.SourceIPs { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.ObjectRef != nil { + l = m.ObjectRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.ResponseStatus != nil { + l = m.ResponseStatus.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.RequestObject != nil { + l = m.RequestObject.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.ResponseObject != nil { + l = m.ResponseObject.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + l = m.RequestReceivedTimestamp.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.StageTimestamp.Size() + n += 2 + l + sovGenerated(uint64(l)) + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 2 + sovGenerated(uint64(mapEntrySize)) + } + } + l = len(m.UserAgent) + n += 2 + l + sovGenerated(uint64(l)) + return n +} + +func (m *EventList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *GroupResources) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Group) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Resources) > 0 { + for _, s := range m.Resources { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.ResourceNames) > 0 { + for _, s := range m.ResourceNames { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ObjectReference) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Resource) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Namespace) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.UID) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.APIVersion) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.ResourceVersion) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Subresource) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *Policy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Rules) > 0 { + for _, e := range m.Rules { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.OmitStages) > 0 { + for _, s := range m.OmitStages { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + n += 2 + return n +} + +func (m *PolicyList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *PolicyRule) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Level) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Users) > 0 { + for _, s := range m.Users { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.UserGroups) > 0 { + for _, s := range m.UserGroups { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Verbs) > 0 { + for _, s := range m.Verbs { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Namespaces) > 0 { + for _, s := range m.Namespaces { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.NonResourceURLs) > 0 { + for _, s := range m.NonResourceURLs { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.OmitStages) > 0 { + for _, s := range m.OmitStages { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.OmitManagedFields != nil { + n += 2 + } + return n +} + +func sovGenerated(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Event) String() string { + if this == nil { + return "nil" + } + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + s := strings.Join([]string{`&Event{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Level:` + fmt.Sprintf("%v", this.Level) + `,`, + `Timestamp:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Timestamp), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, + `AuditID:` + fmt.Sprintf("%v", this.AuditID) + `,`, + `Stage:` + fmt.Sprintf("%v", this.Stage) + `,`, + `RequestURI:` + fmt.Sprintf("%v", this.RequestURI) + `,`, + `Verb:` + fmt.Sprintf("%v", this.Verb) + `,`, + `User:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.User), "UserInfo", "v11.UserInfo", 1), `&`, ``, 1) + `,`, + `ImpersonatedUser:` + strings.Replace(fmt.Sprintf("%v", this.ImpersonatedUser), "UserInfo", "v11.UserInfo", 1) + `,`, + `SourceIPs:` + fmt.Sprintf("%v", this.SourceIPs) + `,`, + `ObjectRef:` + strings.Replace(this.ObjectRef.String(), "ObjectReference", "ObjectReference", 1) + `,`, + `ResponseStatus:` + strings.Replace(fmt.Sprintf("%v", this.ResponseStatus), "Status", "v1.Status", 1) + `,`, + `RequestObject:` + strings.Replace(fmt.Sprintf("%v", this.RequestObject), "Unknown", "runtime.Unknown", 1) + `,`, + `ResponseObject:` + strings.Replace(fmt.Sprintf("%v", this.ResponseObject), "Unknown", "runtime.Unknown", 1) + `,`, + `RequestReceivedTimestamp:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.RequestReceivedTimestamp), "MicroTime", "v1.MicroTime", 1), `&`, ``, 1) + `,`, + `StageTimestamp:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.StageTimestamp), "MicroTime", "v1.MicroTime", 1), `&`, ``, 1) + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `UserAgent:` + fmt.Sprintf("%v", this.UserAgent) + `,`, + `}`, + }, "") + return s +} +func (this *EventList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]Event{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Event", "Event", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&EventList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *GroupResources) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GroupResources{`, + `Group:` + fmt.Sprintf("%v", this.Group) + `,`, + `Resources:` + fmt.Sprintf("%v", this.Resources) + `,`, + `ResourceNames:` + fmt.Sprintf("%v", this.ResourceNames) + `,`, + `}`, + }, "") + return s +} +func (this *ObjectReference) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ObjectReference{`, + `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `UID:` + fmt.Sprintf("%v", this.UID) + `,`, + `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `Subresource:` + fmt.Sprintf("%v", this.Subresource) + `,`, + `}`, + }, "") + return s +} +func (this *Policy) String() string { + if this == nil { + return "nil" + } + repeatedStringForRules := "[]PolicyRule{" + for _, f := range this.Rules { + repeatedStringForRules += strings.Replace(strings.Replace(f.String(), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + "," + } + repeatedStringForRules += "}" + s := strings.Join([]string{`&Policy{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Rules:` + repeatedStringForRules + `,`, + `OmitStages:` + fmt.Sprintf("%v", this.OmitStages) + `,`, + `OmitManagedFields:` + fmt.Sprintf("%v", this.OmitManagedFields) + `,`, + `}`, + }, "") + return s +} +func (this *PolicyList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]Policy{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Policy", "Policy", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&PolicyList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *PolicyRule) String() string { + if this == nil { + return "nil" + } + repeatedStringForResources := "[]GroupResources{" + for _, f := range this.Resources { + repeatedStringForResources += strings.Replace(strings.Replace(f.String(), "GroupResources", "GroupResources", 1), `&`, ``, 1) + "," + } + repeatedStringForResources += "}" + s := strings.Join([]string{`&PolicyRule{`, + `Level:` + fmt.Sprintf("%v", this.Level) + `,`, + `Users:` + fmt.Sprintf("%v", this.Users) + `,`, + `UserGroups:` + fmt.Sprintf("%v", this.UserGroups) + `,`, + `Verbs:` + fmt.Sprintf("%v", this.Verbs) + `,`, + `Resources:` + repeatedStringForResources + `,`, + `Namespaces:` + fmt.Sprintf("%v", this.Namespaces) + `,`, + `NonResourceURLs:` + fmt.Sprintf("%v", this.NonResourceURLs) + `,`, + `OmitStages:` + fmt.Sprintf("%v", this.OmitStages) + `,`, + `OmitManagedFields:` + valueToStringGenerated(this.OmitManagedFields) + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Event) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Event: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Level = Level(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Timestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AuditID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AuditID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stage", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Stage = Stage(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestURI", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestURI = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Verb", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Verb = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.User.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ImpersonatedUser", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ImpersonatedUser == nil { + m.ImpersonatedUser = &v11.UserInfo{} + } + if err := m.ImpersonatedUser.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceIPs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourceIPs = append(m.SourceIPs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ObjectRef == nil { + m.ObjectRef = &ObjectReference{} + } + if err := m.ObjectRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseStatus", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResponseStatus == nil { + m.ResponseStatus = &v1.Status{} + } + if err := m.ResponseStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestObject", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RequestObject == nil { + m.RequestObject = &runtime.Unknown{} + } + if err := m.RequestObject.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseObject", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResponseObject == nil { + m.ResponseObject = &runtime.Unknown{} + } + if err := m.ResponseObject.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestReceivedTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.RequestReceivedTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StageTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.StageTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Annotations == nil { + m.Annotations = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthGenerated + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthGenerated + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Annotations[mapkey] = mapvalue + iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserAgent", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserAgent = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, Event{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GroupResources) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GroupResources: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GroupResources: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Group = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceNames", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceNames = append(m.ResourceNames, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ObjectReference) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ObjectReference: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ObjectReference: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resource = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.APIVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Subresource", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Subresource = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Policy) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Policy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Policy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Rules = append(m.Rules, PolicyRule{}) + if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OmitStages", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OmitStages = append(m.OmitStages, Stage(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OmitManagedFields", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.OmitManagedFields = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PolicyList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PolicyList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PolicyList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, Policy{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PolicyRule) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PolicyRule: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PolicyRule: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Level = Level(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Users", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Users = append(m.Users, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserGroups", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserGroups = append(m.UserGroups, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Verbs = append(m.Verbs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, GroupResources{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespaces", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespaces = append(m.Namespaces, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonResourceURLs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonResourceURLs = append(m.NonResourceURLs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OmitStages", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OmitStages = append(m.OmitStages, Stage(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OmitManagedFields", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.OmitManagedFields = &b + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenerated(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenerated + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") +) diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/generated.proto b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/generated.proto new file mode 100644 index 000000000000..5c457e381dbd --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/generated.proto @@ -0,0 +1,274 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = "proto2"; + +package k8s.io.apiserver.pkg.apis.audit.v1alpha1; + +import "k8s.io/api/authentication/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; + +// Package-wide variables from generator "generated". +option go_package = "v1alpha1"; + +// DEPRECATED - This group version of Event is deprecated by audit.k8s.io/v1/Event. See the release notes for +// more information. +// Event captures all the information that can be included in an API audit log. +message Event { + // ObjectMeta is included for interoperability with API infrastructure. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // AuditLevel at which event was generated + optional string level = 2; + + // Time the request reached the apiserver. + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time timestamp = 3; + + // Unique audit ID, generated for each request. + optional string auditID = 4; + + // Stage of the request handling when this event instance was generated. + optional string stage = 5; + + // RequestURI is the request URI as sent by the client to a server. + optional string requestURI = 6; + + // Verb is the kubernetes verb associated with the request. + // For non-resource requests, this is the lower-cased HTTP method. + optional string verb = 7; + + // Authenticated user information. + optional k8s.io.api.authentication.v1.UserInfo user = 8; + + // Impersonated user information. + // +optional + optional k8s.io.api.authentication.v1.UserInfo impersonatedUser = 9; + + // Source IPs, from where the request originated and intermediate proxies. + // +optional + repeated string sourceIPs = 10; + + // UserAgent records the user agent string reported by the client. + // Note that the UserAgent is provided by the client, and must not be trusted. + // +optional + optional string userAgent = 18; + + // Object reference this request is targeted at. + // Does not apply for List-type requests, or non-resource requests. + // +optional + optional ObjectReference objectRef = 11; + + // The response status, populated even when the ResponseObject is not a Status type. + // For successful responses, this will only include the Code and StatusSuccess. + // For non-status type error responses, this will be auto-populated with the error Message. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Status responseStatus = 12; + + // API object from the request, in JSON format. The RequestObject is recorded as-is in the request + // (possibly re-encoded as JSON), prior to version conversion, defaulting, admission or + // merging. It is an external versioned object type, and may not be a valid object on its own. + // Omitted for non-resource requests. Only logged at Request Level and higher. + // +optional + optional k8s.io.apimachinery.pkg.runtime.Unknown requestObject = 13; + + // API object returned in the response, in JSON. The ResponseObject is recorded after conversion + // to the external type, and serialized as JSON. Omitted for non-resource requests. Only logged + // at Response Level. + // +optional + optional k8s.io.apimachinery.pkg.runtime.Unknown responseObject = 14; + + // Time the request reached the apiserver. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime requestReceivedTimestamp = 15; + + // Time the request reached current audit stage. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime stageTimestamp = 16; + + // Annotations is an unstructured key value map stored with an audit event that may be set by + // plugins invoked in the request serving chain, including authentication, authorization and + // admission plugins. Note that these annotations are for the audit event, and do not correspond + // to the metadata.annotations of the submitted object. Keys should uniquely identify the informing + // component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values + // should be short. Annotations are included in the Metadata level. + // +optional + map annotations = 17; +} + +// EventList is a list of audit Events. +message EventList { + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + repeated Event items = 2; +} + +// GroupResources represents resource kinds in an API group. +message GroupResources { + // Group is the name of the API group that contains the resources. + // The empty string represents the core API group. + // +optional + optional string group = 1; + + // Resources is a list of resources this rule applies to. + // + // For example: + // 'pods' matches pods. + // 'pods/log' matches the log subresource of pods. + // '*' matches all resources and their subresources. + // 'pods/*' matches all subresources of pods. + // '*/scale' matches all scale subresources. + // + // If wildcard is present, the validation rule will ensure resources do not + // overlap with each other. + // + // An empty list implies all resources and subresources in this API groups apply. + // +optional + repeated string resources = 2; + + // ResourceNames is a list of resource instance names that the policy matches. + // Using this field requires Resources to be specified. + // An empty list implies that every instance of the resource is matched. + // +optional + repeated string resourceNames = 3; +} + +// ObjectReference contains enough information to let you inspect or modify the referred object. +message ObjectReference { + // +optional + optional string resource = 1; + + // +optional + optional string namespace = 2; + + // +optional + optional string name = 3; + + // +optional + optional string uid = 4; + + // +optional + optional string apiVersion = 5; + + // +optional + optional string resourceVersion = 6; + + // +optional + optional string subresource = 7; +} + +// DEPRECATED - This group version of Policy is deprecated by audit.k8s.io/v1/Policy. See the release notes for +// more information. +// Policy defines the configuration of audit logging, and the rules for how different request +// categories are logged. +message Policy { + // ObjectMeta is included for interoperability with API infrastructure. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Rules specify the audit Level a request should be recorded at. + // A request may match multiple rules, in which case the FIRST matching rule is used. + // The default audit level is None, but can be overridden by a catch-all rule at the end of the list. + // PolicyRules are strictly ordered. + repeated PolicyRule rules = 2; + + // OmitStages is a list of stages for which no events are created. Note that this can also + // be specified per rule in which case the union of both are omitted. + // +optional + repeated string omitStages = 3; + + // OmitManagedFields indicates whether to omit the managed fields of the request + // and response bodies from being written to the API audit log. + // This is used as a global default - a value of 'true' will omit the managed fileds, + // otherwise the managed fields will be included in the API audit log. + // Note that this can also be specified per rule in which case the value specified + // in a rule will override the global default. + // +optional + optional bool omitManagedFields = 4; +} + +// PolicyList is a list of audit Policies. +message PolicyList { + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + repeated Policy items = 2; +} + +// PolicyRule maps requests based off metadata to an audit Level. +// Requests must match the rules of every field (an intersection of rules). +message PolicyRule { + // The Level that requests matching this rule are recorded at. + optional string level = 1; + + // The users (by authenticated user name) this rule applies to. + // An empty list implies every user. + // +optional + repeated string users = 2; + + // The user groups this rule applies to. A user is considered matching + // if it is a member of any of the UserGroups. + // An empty list implies every user group. + // +optional + repeated string userGroups = 3; + + // The verbs that match this rule. + // An empty list implies every verb. + // +optional + repeated string verbs = 4; + + // Resources that this rule matches. An empty list implies all kinds in all API groups. + // +optional + repeated GroupResources resources = 5; + + // Namespaces that this rule matches. + // The empty string "" matches non-namespaced resources. + // An empty list implies every namespace. + // +optional + repeated string namespaces = 6; + + // NonResourceURLs is a set of URL paths that should be audited. + // *s are allowed, but only as the full, final step in the path. + // Examples: + // "/metrics" - Log requests for apiserver metrics + // "/healthz*" - Log all health checks + // +optional + repeated string nonResourceURLs = 7; + + // OmitStages is a list of stages for which no events are created. Note that this can also + // be specified policy wide in which case the union of both are omitted. + // An empty list means no restrictions will apply. + // +optional + repeated string omitStages = 8; + + // OmitManagedFields indicates whether to omit the managed fields of the request + // and response bodies from being written to the API audit log. + // - a value of 'true' will drop the managed fields from the API audit log + // - a value of 'false' indicates that the managed fileds should be included + // in the API audit log + // Note that the value, if specified, in this rule will override the global default + // If a value is not specified then the global default specified in + // Policy.OmitManagedFields will stand. + // +optional + optional bool omitManagedFields = 9; +} + diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/register.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/register.go new file mode 100644 index 000000000000..903e6a4ae7f8 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/register.go @@ -0,0 +1,58 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the group name use in this package +const GroupName = "audit.k8s.io" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder runtime.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + AddToScheme = localSchemeBuilder.AddToScheme +) + +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + localSchemeBuilder.Register(addKnownTypes) +} + +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &Event{}, + &EventList{}, + &Policy{}, + &PolicyList{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/types.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/types.go new file mode 100644 index 000000000000..f108b9bc58ff --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/types.go @@ -0,0 +1,323 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + authnv1 "k8s.io/api/authentication/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" +) + +// Header keys used by the audit system. +const ( + // Header to hold the audit ID as the request is propagated through the serving hierarchy. The + // Audit-ID header should be set by the first server to receive the request (e.g. the federation + // server or kube-aggregator). + // + // Audit ID is also returned to client by http response header. + // It's not guaranteed Audit-Id http header is sent for all requests. When kube-apiserver didn't + // audit the events according to the audit policy, no Audit-ID is returned. Also, for request to + // pods/exec, pods/attach, pods/proxy, kube-apiserver works like a proxy and redirect the request + // to kubelet node, users will only get http headers sent from kubelet node, so no Audit-ID is + // sent when users run command like "kubectl exec" or "kubectl attach". + HeaderAuditID = "Audit-ID" +) + +// Level defines the amount of information logged during auditing +type Level string + +// Valid audit levels +const ( + // LevelNone disables auditing + LevelNone Level = "None" + // LevelMetadata provides the basic level of auditing. + LevelMetadata Level = "Metadata" + // LevelRequest provides Metadata level of auditing, and additionally + // logs the request object (does not apply for non-resource requests). + LevelRequest Level = "Request" + // LevelRequestResponse provides Request level of auditing, and additionally + // logs the response object (does not apply for non-resource requests). + LevelRequestResponse Level = "RequestResponse" +) + +// Stage defines the stages in request handling that audit events may be generated. +type Stage string + +// Valid audit stages. +const ( + // The stage for events generated as soon as the audit handler receives the request, and before it + // is delegated down the handler chain. + StageRequestReceived Stage = "RequestReceived" + // The stage for events generated once the response headers are sent, but before the response body + // is sent. This stage is only generated for long-running requests (e.g. watch). + StageResponseStarted Stage = "ResponseStarted" + // The stage for events generated once the response body has been completed, and no more bytes + // will be sent. + StageResponseComplete Stage = "ResponseComplete" + // The stage for events generated when a panic occurred. + StagePanic Stage = "Panic" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.7 +// +k8s:prerelease-lifecycle-gen:deprecated=1.21 +// +k8s:prerelease-lifecycle-gen:replacement=audit.k8s.io,v1,Event + +// DEPRECATED - This group version of Event is deprecated by audit.k8s.io/v1/Event. See the release notes for +// more information. +// Event captures all the information that can be included in an API audit log. +type Event struct { + metav1.TypeMeta `json:",inline"` + // ObjectMeta is included for interoperability with API infrastructure. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // AuditLevel at which event was generated + Level Level `json:"level" protobuf:"bytes,2,opt,name=level,casttype=Level"` + + // Time the request reached the apiserver. + Timestamp metav1.Time `json:"timestamp" protobuf:"bytes,3,opt,name=timestamp"` + // Unique audit ID, generated for each request. + AuditID types.UID `json:"auditID" protobuf:"bytes,4,opt,name=auditID,casttype=k8s.io/apimachinery/pkg/types.UID"` + // Stage of the request handling when this event instance was generated. + Stage Stage `json:"stage" protobuf:"bytes,5,opt,name=stage,casttype=Stage"` + + // RequestURI is the request URI as sent by the client to a server. + RequestURI string `json:"requestURI" protobuf:"bytes,6,opt,name=requestURI"` + // Verb is the kubernetes verb associated with the request. + // For non-resource requests, this is the lower-cased HTTP method. + Verb string `json:"verb" protobuf:"bytes,7,opt,name=verb"` + // Authenticated user information. + User authnv1.UserInfo `json:"user" protobuf:"bytes,8,opt,name=user"` + // Impersonated user information. + // +optional + ImpersonatedUser *authnv1.UserInfo `json:"impersonatedUser,omitempty" protobuf:"bytes,9,opt,name=impersonatedUser"` + // Source IPs, from where the request originated and intermediate proxies. + // +optional + SourceIPs []string `json:"sourceIPs,omitempty" protobuf:"bytes,10,rep,name=sourceIPs"` + // UserAgent records the user agent string reported by the client. + // Note that the UserAgent is provided by the client, and must not be trusted. + // +optional + UserAgent string `json:"userAgent,omitempty" protobuf:"bytes,18,opt,name=userAgent"` + // Object reference this request is targeted at. + // Does not apply for List-type requests, or non-resource requests. + // +optional + ObjectRef *ObjectReference `json:"objectRef,omitempty" protobuf:"bytes,11,opt,name=objectRef"` + // The response status, populated even when the ResponseObject is not a Status type. + // For successful responses, this will only include the Code and StatusSuccess. + // For non-status type error responses, this will be auto-populated with the error Message. + // +optional + ResponseStatus *metav1.Status `json:"responseStatus,omitempty" protobuf:"bytes,12,opt,name=responseStatus"` + + // API object from the request, in JSON format. The RequestObject is recorded as-is in the request + // (possibly re-encoded as JSON), prior to version conversion, defaulting, admission or + // merging. It is an external versioned object type, and may not be a valid object on its own. + // Omitted for non-resource requests. Only logged at Request Level and higher. + // +optional + RequestObject *runtime.Unknown `json:"requestObject,omitempty" protobuf:"bytes,13,opt,name=requestObject"` + // API object returned in the response, in JSON. The ResponseObject is recorded after conversion + // to the external type, and serialized as JSON. Omitted for non-resource requests. Only logged + // at Response Level. + // +optional + ResponseObject *runtime.Unknown `json:"responseObject,omitempty" protobuf:"bytes,14,opt,name=responseObject"` + // Time the request reached the apiserver. + // +optional + RequestReceivedTimestamp metav1.MicroTime `json:"requestReceivedTimestamp" protobuf:"bytes,15,opt,name=requestReceivedTimestamp"` + // Time the request reached current audit stage. + // +optional + StageTimestamp metav1.MicroTime `json:"stageTimestamp" protobuf:"bytes,16,opt,name=stageTimestamp"` + + // Annotations is an unstructured key value map stored with an audit event that may be set by + // plugins invoked in the request serving chain, including authentication, authorization and + // admission plugins. Note that these annotations are for the audit event, and do not correspond + // to the metadata.annotations of the submitted object. Keys should uniquely identify the informing + // component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values + // should be short. Annotations are included in the Metadata level. + // +optional + Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,17,rep,name=annotations"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.7 +// +k8s:prerelease-lifecycle-gen:deprecated=1.21 +// +k8s:prerelease-lifecycle-gen:replacement=audit.k8s.io,v1,EventList + +// EventList is a list of audit Events. +type EventList struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Items []Event `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.7 +// +k8s:prerelease-lifecycle-gen:deprecated=1.21 +// +k8s:prerelease-lifecycle-gen:replacement=audit.k8s.io,v1,Policy + +// DEPRECATED - This group version of Policy is deprecated by audit.k8s.io/v1/Policy. See the release notes for +// more information. +// Policy defines the configuration of audit logging, and the rules for how different request +// categories are logged. +type Policy struct { + metav1.TypeMeta `json:",inline"` + // ObjectMeta is included for interoperability with API infrastructure. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Rules specify the audit Level a request should be recorded at. + // A request may match multiple rules, in which case the FIRST matching rule is used. + // The default audit level is None, but can be overridden by a catch-all rule at the end of the list. + // PolicyRules are strictly ordered. + Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"` + + // OmitStages is a list of stages for which no events are created. Note that this can also + // be specified per rule in which case the union of both are omitted. + // +optional + OmitStages []Stage `json:"omitStages,omitempty" protobuf:"bytes,3,rep,name=omitStages"` + + // OmitManagedFields indicates whether to omit the managed fields of the request + // and response bodies from being written to the API audit log. + // This is used as a global default - a value of 'true' will omit the managed fileds, + // otherwise the managed fields will be included in the API audit log. + // Note that this can also be specified per rule in which case the value specified + // in a rule will override the global default. + // +optional + OmitManagedFields bool `json:"omitManagedFields,omitempty" protobuf:"varint,4,opt,name=omitManagedFields"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.7 +// +k8s:prerelease-lifecycle-gen:deprecated=1.21 +// +k8s:prerelease-lifecycle-gen:replacement=audit.k8s.io,v1,PolicyList + +// PolicyList is a list of audit Policies. +type PolicyList struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Items []Policy `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// PolicyRule maps requests based off metadata to an audit Level. +// Requests must match the rules of every field (an intersection of rules). +type PolicyRule struct { + // The Level that requests matching this rule are recorded at. + Level Level `json:"level" protobuf:"bytes,1,opt,name=level,casttype=Level"` + + // The users (by authenticated user name) this rule applies to. + // An empty list implies every user. + // +optional + Users []string `json:"users,omitempty" protobuf:"bytes,2,rep,name=users"` + // The user groups this rule applies to. A user is considered matching + // if it is a member of any of the UserGroups. + // An empty list implies every user group. + // +optional + UserGroups []string `json:"userGroups,omitempty" protobuf:"bytes,3,rep,name=userGroups"` + + // The verbs that match this rule. + // An empty list implies every verb. + // +optional + Verbs []string `json:"verbs,omitempty" protobuf:"bytes,4,rep,name=verbs"` + + // Rules can apply to API resources (such as "pods" or "secrets"), + // non-resource URL paths (such as "/api"), or neither, but not both. + // If neither is specified, the rule is treated as a default for all URLs. + + // Resources that this rule matches. An empty list implies all kinds in all API groups. + // +optional + Resources []GroupResources `json:"resources,omitempty" protobuf:"bytes,5,rep,name=resources"` + // Namespaces that this rule matches. + // The empty string "" matches non-namespaced resources. + // An empty list implies every namespace. + // +optional + Namespaces []string `json:"namespaces,omitempty" protobuf:"bytes,6,rep,name=namespaces"` + + // NonResourceURLs is a set of URL paths that should be audited. + // *s are allowed, but only as the full, final step in the path. + // Examples: + // "/metrics" - Log requests for apiserver metrics + // "/healthz*" - Log all health checks + // +optional + NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,7,rep,name=nonResourceURLs"` + + // OmitStages is a list of stages for which no events are created. Note that this can also + // be specified policy wide in which case the union of both are omitted. + // An empty list means no restrictions will apply. + // +optional + OmitStages []Stage `json:"omitStages,omitempty" protobuf:"bytes,8,rep,name=omitStages"` + + // OmitManagedFields indicates whether to omit the managed fields of the request + // and response bodies from being written to the API audit log. + // - a value of 'true' will drop the managed fields from the API audit log + // - a value of 'false' indicates that the managed fileds should be included + // in the API audit log + // Note that the value, if specified, in this rule will override the global default + // If a value is not specified then the global default specified in + // Policy.OmitManagedFields will stand. + // +optional + OmitManagedFields *bool `json:"omitManagedFields,omitempty" protobuf:"varint,9,opt,name=omitManagedFields"` +} + +// GroupResources represents resource kinds in an API group. +type GroupResources struct { + // Group is the name of the API group that contains the resources. + // The empty string represents the core API group. + // +optional + Group string `json:"group,omitempty" protobuf:"bytes,1,opt,name=group"` + // Resources is a list of resources this rule applies to. + // + // For example: + // 'pods' matches pods. + // 'pods/log' matches the log subresource of pods. + // '*' matches all resources and their subresources. + // 'pods/*' matches all subresources of pods. + // '*/scale' matches all scale subresources. + // + // If wildcard is present, the validation rule will ensure resources do not + // overlap with each other. + // + // An empty list implies all resources and subresources in this API groups apply. + // +optional + Resources []string `json:"resources,omitempty" protobuf:"bytes,2,rep,name=resources"` + // ResourceNames is a list of resource instance names that the policy matches. + // Using this field requires Resources to be specified. + // An empty list implies that every instance of the resource is matched. + // +optional + ResourceNames []string `json:"resourceNames,omitempty" protobuf:"bytes,3,rep,name=resourceNames"` +} + +// ObjectReference contains enough information to let you inspect or modify the referred object. +type ObjectReference struct { + // +optional + Resource string `json:"resource,omitempty" protobuf:"bytes,1,opt,name=resource"` + // +optional + Namespace string `json:"namespace,omitempty" protobuf:"bytes,2,opt,name=namespace"` + // +optional + Name string `json:"name,omitempty" protobuf:"bytes,3,opt,name=name"` + // +optional + UID types.UID `json:"uid,omitempty" protobuf:"bytes,4,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"` + // +optional + APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,5,opt,name=apiVersion"` + // +optional + ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,6,opt,name=resourceVersion"` + // +optional + Subresource string `json:"subresource,omitempty" protobuf:"bytes,7,opt,name=subresource"` +} diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/zz_generated.conversion.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/zz_generated.conversion.go new file mode 100644 index 000000000000..de9e938d479c --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,344 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + unsafe "unsafe" + + v1 "k8s.io/api/authentication/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + types "k8s.io/apimachinery/pkg/types" + audit "k8s.io/apiserver/pkg/apis/audit" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*EventList)(nil), (*audit.EventList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_EventList_To_audit_EventList(a.(*EventList), b.(*audit.EventList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.EventList)(nil), (*EventList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_EventList_To_v1alpha1_EventList(a.(*audit.EventList), b.(*EventList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*GroupResources)(nil), (*audit.GroupResources)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_GroupResources_To_audit_GroupResources(a.(*GroupResources), b.(*audit.GroupResources), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.GroupResources)(nil), (*GroupResources)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_GroupResources_To_v1alpha1_GroupResources(a.(*audit.GroupResources), b.(*GroupResources), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Policy)(nil), (*audit.Policy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Policy_To_audit_Policy(a.(*Policy), b.(*audit.Policy), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.Policy)(nil), (*Policy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_Policy_To_v1alpha1_Policy(a.(*audit.Policy), b.(*Policy), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PolicyList)(nil), (*audit.PolicyList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_PolicyList_To_audit_PolicyList(a.(*PolicyList), b.(*audit.PolicyList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.PolicyList)(nil), (*PolicyList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_PolicyList_To_v1alpha1_PolicyList(a.(*audit.PolicyList), b.(*PolicyList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PolicyRule)(nil), (*audit.PolicyRule)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_PolicyRule_To_audit_PolicyRule(a.(*PolicyRule), b.(*audit.PolicyRule), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.PolicyRule)(nil), (*PolicyRule)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_PolicyRule_To_v1alpha1_PolicyRule(a.(*audit.PolicyRule), b.(*PolicyRule), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*audit.Event)(nil), (*Event)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_Event_To_v1alpha1_Event(a.(*audit.Event), b.(*Event), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*audit.ObjectReference)(nil), (*ObjectReference)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_ObjectReference_To_v1alpha1_ObjectReference(a.(*audit.ObjectReference), b.(*ObjectReference), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*Event)(nil), (*audit.Event)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Event_To_audit_Event(a.(*Event), b.(*audit.Event), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*ObjectReference)(nil), (*audit.ObjectReference)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ObjectReference_To_audit_ObjectReference(a.(*ObjectReference), b.(*audit.ObjectReference), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_Event_To_audit_Event(in *Event, out *audit.Event, s conversion.Scope) error { + // WARNING: in.ObjectMeta requires manual conversion: does not exist in peer-type + out.Level = audit.Level(in.Level) + // WARNING: in.Timestamp requires manual conversion: does not exist in peer-type + out.AuditID = types.UID(in.AuditID) + out.Stage = audit.Stage(in.Stage) + out.RequestURI = in.RequestURI + out.Verb = in.Verb + out.User = in.User + out.ImpersonatedUser = (*v1.UserInfo)(unsafe.Pointer(in.ImpersonatedUser)) + out.SourceIPs = *(*[]string)(unsafe.Pointer(&in.SourceIPs)) + out.UserAgent = in.UserAgent + if in.ObjectRef != nil { + in, out := &in.ObjectRef, &out.ObjectRef + *out = new(audit.ObjectReference) + if err := Convert_v1alpha1_ObjectReference_To_audit_ObjectReference(*in, *out, s); err != nil { + return err + } + } else { + out.ObjectRef = nil + } + out.ResponseStatus = (*metav1.Status)(unsafe.Pointer(in.ResponseStatus)) + out.RequestObject = (*runtime.Unknown)(unsafe.Pointer(in.RequestObject)) + out.ResponseObject = (*runtime.Unknown)(unsafe.Pointer(in.ResponseObject)) + out.RequestReceivedTimestamp = in.RequestReceivedTimestamp + out.StageTimestamp = in.StageTimestamp + out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) + return nil +} + +func autoConvert_audit_Event_To_v1alpha1_Event(in *audit.Event, out *Event, s conversion.Scope) error { + out.Level = Level(in.Level) + out.AuditID = types.UID(in.AuditID) + out.Stage = Stage(in.Stage) + out.RequestURI = in.RequestURI + out.Verb = in.Verb + out.User = in.User + out.ImpersonatedUser = (*v1.UserInfo)(unsafe.Pointer(in.ImpersonatedUser)) + out.SourceIPs = *(*[]string)(unsafe.Pointer(&in.SourceIPs)) + out.UserAgent = in.UserAgent + if in.ObjectRef != nil { + in, out := &in.ObjectRef, &out.ObjectRef + *out = new(ObjectReference) + if err := Convert_audit_ObjectReference_To_v1alpha1_ObjectReference(*in, *out, s); err != nil { + return err + } + } else { + out.ObjectRef = nil + } + out.ResponseStatus = (*metav1.Status)(unsafe.Pointer(in.ResponseStatus)) + out.RequestObject = (*runtime.Unknown)(unsafe.Pointer(in.RequestObject)) + out.ResponseObject = (*runtime.Unknown)(unsafe.Pointer(in.ResponseObject)) + out.RequestReceivedTimestamp = in.RequestReceivedTimestamp + out.StageTimestamp = in.StageTimestamp + out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) + return nil +} + +func autoConvert_v1alpha1_EventList_To_audit_EventList(in *EventList, out *audit.EventList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]audit.Event, len(*in)) + for i := range *in { + if err := Convert_v1alpha1_Event_To_audit_Event(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha1_EventList_To_audit_EventList is an autogenerated conversion function. +func Convert_v1alpha1_EventList_To_audit_EventList(in *EventList, out *audit.EventList, s conversion.Scope) error { + return autoConvert_v1alpha1_EventList_To_audit_EventList(in, out, s) +} + +func autoConvert_audit_EventList_To_v1alpha1_EventList(in *audit.EventList, out *EventList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Event, len(*in)) + for i := range *in { + if err := Convert_audit_Event_To_v1alpha1_Event(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_audit_EventList_To_v1alpha1_EventList is an autogenerated conversion function. +func Convert_audit_EventList_To_v1alpha1_EventList(in *audit.EventList, out *EventList, s conversion.Scope) error { + return autoConvert_audit_EventList_To_v1alpha1_EventList(in, out, s) +} + +func autoConvert_v1alpha1_GroupResources_To_audit_GroupResources(in *GroupResources, out *audit.GroupResources, s conversion.Scope) error { + out.Group = in.Group + out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources)) + out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames)) + return nil +} + +// Convert_v1alpha1_GroupResources_To_audit_GroupResources is an autogenerated conversion function. +func Convert_v1alpha1_GroupResources_To_audit_GroupResources(in *GroupResources, out *audit.GroupResources, s conversion.Scope) error { + return autoConvert_v1alpha1_GroupResources_To_audit_GroupResources(in, out, s) +} + +func autoConvert_audit_GroupResources_To_v1alpha1_GroupResources(in *audit.GroupResources, out *GroupResources, s conversion.Scope) error { + out.Group = in.Group + out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources)) + out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames)) + return nil +} + +// Convert_audit_GroupResources_To_v1alpha1_GroupResources is an autogenerated conversion function. +func Convert_audit_GroupResources_To_v1alpha1_GroupResources(in *audit.GroupResources, out *GroupResources, s conversion.Scope) error { + return autoConvert_audit_GroupResources_To_v1alpha1_GroupResources(in, out, s) +} + +func autoConvert_v1alpha1_ObjectReference_To_audit_ObjectReference(in *ObjectReference, out *audit.ObjectReference, s conversion.Scope) error { + out.Resource = in.Resource + out.Namespace = in.Namespace + out.Name = in.Name + out.UID = types.UID(in.UID) + out.APIVersion = in.APIVersion + out.ResourceVersion = in.ResourceVersion + out.Subresource = in.Subresource + return nil +} + +func autoConvert_audit_ObjectReference_To_v1alpha1_ObjectReference(in *audit.ObjectReference, out *ObjectReference, s conversion.Scope) error { + out.Resource = in.Resource + out.Namespace = in.Namespace + out.Name = in.Name + out.UID = types.UID(in.UID) + // WARNING: in.APIGroup requires manual conversion: does not exist in peer-type + out.APIVersion = in.APIVersion + out.ResourceVersion = in.ResourceVersion + out.Subresource = in.Subresource + return nil +} + +func autoConvert_v1alpha1_Policy_To_audit_Policy(in *Policy, out *audit.Policy, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Rules = *(*[]audit.PolicyRule)(unsafe.Pointer(&in.Rules)) + out.OmitStages = *(*[]audit.Stage)(unsafe.Pointer(&in.OmitStages)) + out.OmitManagedFields = in.OmitManagedFields + return nil +} + +// Convert_v1alpha1_Policy_To_audit_Policy is an autogenerated conversion function. +func Convert_v1alpha1_Policy_To_audit_Policy(in *Policy, out *audit.Policy, s conversion.Scope) error { + return autoConvert_v1alpha1_Policy_To_audit_Policy(in, out, s) +} + +func autoConvert_audit_Policy_To_v1alpha1_Policy(in *audit.Policy, out *Policy, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Rules = *(*[]PolicyRule)(unsafe.Pointer(&in.Rules)) + out.OmitStages = *(*[]Stage)(unsafe.Pointer(&in.OmitStages)) + out.OmitManagedFields = in.OmitManagedFields + return nil +} + +// Convert_audit_Policy_To_v1alpha1_Policy is an autogenerated conversion function. +func Convert_audit_Policy_To_v1alpha1_Policy(in *audit.Policy, out *Policy, s conversion.Scope) error { + return autoConvert_audit_Policy_To_v1alpha1_Policy(in, out, s) +} + +func autoConvert_v1alpha1_PolicyList_To_audit_PolicyList(in *PolicyList, out *audit.PolicyList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]audit.Policy)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha1_PolicyList_To_audit_PolicyList is an autogenerated conversion function. +func Convert_v1alpha1_PolicyList_To_audit_PolicyList(in *PolicyList, out *audit.PolicyList, s conversion.Scope) error { + return autoConvert_v1alpha1_PolicyList_To_audit_PolicyList(in, out, s) +} + +func autoConvert_audit_PolicyList_To_v1alpha1_PolicyList(in *audit.PolicyList, out *PolicyList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]Policy)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_audit_PolicyList_To_v1alpha1_PolicyList is an autogenerated conversion function. +func Convert_audit_PolicyList_To_v1alpha1_PolicyList(in *audit.PolicyList, out *PolicyList, s conversion.Scope) error { + return autoConvert_audit_PolicyList_To_v1alpha1_PolicyList(in, out, s) +} + +func autoConvert_v1alpha1_PolicyRule_To_audit_PolicyRule(in *PolicyRule, out *audit.PolicyRule, s conversion.Scope) error { + out.Level = audit.Level(in.Level) + out.Users = *(*[]string)(unsafe.Pointer(&in.Users)) + out.UserGroups = *(*[]string)(unsafe.Pointer(&in.UserGroups)) + out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs)) + out.Resources = *(*[]audit.GroupResources)(unsafe.Pointer(&in.Resources)) + out.Namespaces = *(*[]string)(unsafe.Pointer(&in.Namespaces)) + out.NonResourceURLs = *(*[]string)(unsafe.Pointer(&in.NonResourceURLs)) + out.OmitStages = *(*[]audit.Stage)(unsafe.Pointer(&in.OmitStages)) + out.OmitManagedFields = (*bool)(unsafe.Pointer(in.OmitManagedFields)) + return nil +} + +// Convert_v1alpha1_PolicyRule_To_audit_PolicyRule is an autogenerated conversion function. +func Convert_v1alpha1_PolicyRule_To_audit_PolicyRule(in *PolicyRule, out *audit.PolicyRule, s conversion.Scope) error { + return autoConvert_v1alpha1_PolicyRule_To_audit_PolicyRule(in, out, s) +} + +func autoConvert_audit_PolicyRule_To_v1alpha1_PolicyRule(in *audit.PolicyRule, out *PolicyRule, s conversion.Scope) error { + out.Level = Level(in.Level) + out.Users = *(*[]string)(unsafe.Pointer(&in.Users)) + out.UserGroups = *(*[]string)(unsafe.Pointer(&in.UserGroups)) + out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs)) + out.Resources = *(*[]GroupResources)(unsafe.Pointer(&in.Resources)) + out.Namespaces = *(*[]string)(unsafe.Pointer(&in.Namespaces)) + out.NonResourceURLs = *(*[]string)(unsafe.Pointer(&in.NonResourceURLs)) + out.OmitStages = *(*[]Stage)(unsafe.Pointer(&in.OmitStages)) + out.OmitManagedFields = (*bool)(unsafe.Pointer(in.OmitManagedFields)) + return nil +} + +// Convert_audit_PolicyRule_To_v1alpha1_PolicyRule is an autogenerated conversion function. +func Convert_audit_PolicyRule_To_v1alpha1_PolicyRule(in *audit.PolicyRule, out *PolicyRule, s conversion.Scope) error { + return autoConvert_audit_PolicyRule_To_v1alpha1_PolicyRule(in, out, s) +} diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/zz_generated.deepcopy.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 000000000000..5f99185eeb62 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,299 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/api/authentication/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Event) DeepCopyInto(out *Event) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Timestamp.DeepCopyInto(&out.Timestamp) + in.User.DeepCopyInto(&out.User) + if in.ImpersonatedUser != nil { + in, out := &in.ImpersonatedUser, &out.ImpersonatedUser + *out = new(v1.UserInfo) + (*in).DeepCopyInto(*out) + } + if in.SourceIPs != nil { + in, out := &in.SourceIPs, &out.SourceIPs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ObjectRef != nil { + in, out := &in.ObjectRef, &out.ObjectRef + *out = new(ObjectReference) + **out = **in + } + if in.ResponseStatus != nil { + in, out := &in.ResponseStatus, &out.ResponseStatus + *out = new(metav1.Status) + (*in).DeepCopyInto(*out) + } + if in.RequestObject != nil { + in, out := &in.RequestObject, &out.RequestObject + *out = new(runtime.Unknown) + (*in).DeepCopyInto(*out) + } + if in.ResponseObject != nil { + in, out := &in.ResponseObject, &out.ResponseObject + *out = new(runtime.Unknown) + (*in).DeepCopyInto(*out) + } + in.RequestReceivedTimestamp.DeepCopyInto(&out.RequestReceivedTimestamp) + in.StageTimestamp.DeepCopyInto(&out.StageTimestamp) + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Event. +func (in *Event) DeepCopy() *Event { + if in == nil { + return nil + } + out := new(Event) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Event) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EventList) DeepCopyInto(out *EventList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Event, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventList. +func (in *EventList) DeepCopy() *EventList { + if in == nil { + return nil + } + out := new(EventList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *EventList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GroupResources) DeepCopyInto(out *GroupResources) { + *out = *in + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ResourceNames != nil { + in, out := &in.ResourceNames, &out.ResourceNames + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupResources. +func (in *GroupResources) DeepCopy() *GroupResources { + if in == nil { + return nil + } + out := new(GroupResources) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ObjectReference) DeepCopyInto(out *ObjectReference) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectReference. +func (in *ObjectReference) DeepCopy() *ObjectReference { + if in == nil { + return nil + } + out := new(ObjectReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Policy) DeepCopyInto(out *Policy) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]PolicyRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.OmitStages != nil { + in, out := &in.OmitStages, &out.OmitStages + *out = make([]Stage, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Policy. +func (in *Policy) DeepCopy() *Policy { + if in == nil { + return nil + } + out := new(Policy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Policy) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PolicyList) DeepCopyInto(out *PolicyList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Policy, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyList. +func (in *PolicyList) DeepCopy() *PolicyList { + if in == nil { + return nil + } + out := new(PolicyList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PolicyList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PolicyRule) DeepCopyInto(out *PolicyRule) { + *out = *in + if in.Users != nil { + in, out := &in.Users, &out.Users + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.UserGroups != nil { + in, out := &in.UserGroups, &out.UserGroups + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Verbs != nil { + in, out := &in.Verbs, &out.Verbs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]GroupResources, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Namespaces != nil { + in, out := &in.Namespaces, &out.Namespaces + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.NonResourceURLs != nil { + in, out := &in.NonResourceURLs, &out.NonResourceURLs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.OmitStages != nil { + in, out := &in.OmitStages, &out.OmitStages + *out = make([]Stage, len(*in)) + copy(*out, *in) + } + if in.OmitManagedFields != nil { + in, out := &in.OmitManagedFields, &out.OmitManagedFields + *out = new(bool) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyRule. +func (in *PolicyRule) DeepCopy() *PolicyRule { + if in == nil { + return nil + } + out := new(PolicyRule) + in.DeepCopyInto(out) + return out +} diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/zz_generated.defaults.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/zz_generated.defaults.go new file mode 100644 index 000000000000..5070cb91b90f --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/zz_generated.defaults.go @@ -0,0 +1,33 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/zz_generated.prerelease-lifecycle.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/zz_generated.prerelease-lifecycle.go new file mode 100644 index 000000000000..d1a38ca83b55 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,122 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + schema "k8s.io/apimachinery/pkg/runtime/schema" +) + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *Event) APILifecycleIntroduced() (major, minor int) { + return 1, 7 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *Event) APILifecycleDeprecated() (major, minor int) { + return 1, 21 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *Event) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "audit.k8s.io", Version: "v1", Kind: "Event"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *Event) APILifecycleRemoved() (major, minor int) { + return 1, 24 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *EventList) APILifecycleIntroduced() (major, minor int) { + return 1, 7 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *EventList) APILifecycleDeprecated() (major, minor int) { + return 1, 21 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *EventList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "audit.k8s.io", Version: "v1", Kind: "EventList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *EventList) APILifecycleRemoved() (major, minor int) { + return 1, 24 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *Policy) APILifecycleIntroduced() (major, minor int) { + return 1, 7 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *Policy) APILifecycleDeprecated() (major, minor int) { + return 1, 21 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *Policy) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "audit.k8s.io", Version: "v1", Kind: "Policy"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *Policy) APILifecycleRemoved() (major, minor int) { + return 1, 24 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *PolicyList) APILifecycleIntroduced() (major, minor int) { + return 1, 7 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *PolicyList) APILifecycleDeprecated() (major, minor int) { + return 1, 21 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *PolicyList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "audit.k8s.io", Version: "v1", Kind: "PolicyList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *PolicyList) APILifecycleRemoved() (major, minor int) { + return 1, 24 +} diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/conversion.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/conversion.go new file mode 100644 index 000000000000..bccdcb72437b --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/conversion.go @@ -0,0 +1,45 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apiserver/pkg/apis/audit" +) + +func Convert_v1beta1_Event_To_audit_Event(in *Event, out *audit.Event, s conversion.Scope) error { + if err := autoConvert_v1beta1_Event_To_audit_Event(in, out, s); err != nil { + return err + } + if out.StageTimestamp.IsZero() { + out.StageTimestamp = metav1.NewMicroTime(in.CreationTimestamp.Time) + } + if out.RequestReceivedTimestamp.IsZero() { + out.RequestReceivedTimestamp = metav1.NewMicroTime(in.Timestamp.Time) + } + return nil +} + +func Convert_audit_Event_To_v1beta1_Event(in *audit.Event, out *Event, s conversion.Scope) error { + if err := autoConvert_audit_Event_To_v1beta1_Event(in, out, s); err != nil { + return err + } + out.CreationTimestamp = metav1.NewTime(in.StageTimestamp.Time) + out.Timestamp = metav1.NewTime(in.RequestReceivedTimestamp.Time) + return nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/doc.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/doc.go new file mode 100644 index 000000000000..5ad5f251aa15 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/doc.go @@ -0,0 +1,26 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +k8s:deepcopy-gen=package +// +k8s:protobuf-gen=package +// +k8s:conversion-gen=k8s.io/apiserver/pkg/apis/audit +// +k8s:openapi-gen=true +// +k8s:prerelease-lifecycle-gen=true +// +k8s:defaulter-gen=TypeMeta + +// +groupName=audit.k8s.io + +package v1beta1 // import "k8s.io/apiserver/pkg/apis/audit/v1beta1" diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/generated.pb.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/generated.pb.go new file mode 100644 index 000000000000..ef04b4463eab --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/generated.pb.go @@ -0,0 +1,3329 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/generated.proto + +package v1beta1 + +import ( + fmt "fmt" + + io "io" + + proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + v11 "k8s.io/api/authentication/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + + math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" + + k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +func (m *Event) Reset() { *m = Event{} } +func (*Event) ProtoMessage() {} +func (*Event) Descriptor() ([]byte, []int) { + return fileDescriptor_c7e4d52063960930, []int{0} +} +func (m *Event) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Event) XXX_Merge(src proto.Message) { + xxx_messageInfo_Event.Merge(m, src) +} +func (m *Event) XXX_Size() int { + return m.Size() +} +func (m *Event) XXX_DiscardUnknown() { + xxx_messageInfo_Event.DiscardUnknown(m) +} + +var xxx_messageInfo_Event proto.InternalMessageInfo + +func (m *EventList) Reset() { *m = EventList{} } +func (*EventList) ProtoMessage() {} +func (*EventList) Descriptor() ([]byte, []int) { + return fileDescriptor_c7e4d52063960930, []int{1} +} +func (m *EventList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *EventList) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventList.Merge(m, src) +} +func (m *EventList) XXX_Size() int { + return m.Size() +} +func (m *EventList) XXX_DiscardUnknown() { + xxx_messageInfo_EventList.DiscardUnknown(m) +} + +var xxx_messageInfo_EventList proto.InternalMessageInfo + +func (m *GroupResources) Reset() { *m = GroupResources{} } +func (*GroupResources) ProtoMessage() {} +func (*GroupResources) Descriptor() ([]byte, []int) { + return fileDescriptor_c7e4d52063960930, []int{2} +} +func (m *GroupResources) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GroupResources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *GroupResources) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupResources.Merge(m, src) +} +func (m *GroupResources) XXX_Size() int { + return m.Size() +} +func (m *GroupResources) XXX_DiscardUnknown() { + xxx_messageInfo_GroupResources.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupResources proto.InternalMessageInfo + +func (m *ObjectReference) Reset() { *m = ObjectReference{} } +func (*ObjectReference) ProtoMessage() {} +func (*ObjectReference) Descriptor() ([]byte, []int) { + return fileDescriptor_c7e4d52063960930, []int{3} +} +func (m *ObjectReference) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ObjectReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *ObjectReference) XXX_Merge(src proto.Message) { + xxx_messageInfo_ObjectReference.Merge(m, src) +} +func (m *ObjectReference) XXX_Size() int { + return m.Size() +} +func (m *ObjectReference) XXX_DiscardUnknown() { + xxx_messageInfo_ObjectReference.DiscardUnknown(m) +} + +var xxx_messageInfo_ObjectReference proto.InternalMessageInfo + +func (m *Policy) Reset() { *m = Policy{} } +func (*Policy) ProtoMessage() {} +func (*Policy) Descriptor() ([]byte, []int) { + return fileDescriptor_c7e4d52063960930, []int{4} +} +func (m *Policy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Policy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *Policy) XXX_Merge(src proto.Message) { + xxx_messageInfo_Policy.Merge(m, src) +} +func (m *Policy) XXX_Size() int { + return m.Size() +} +func (m *Policy) XXX_DiscardUnknown() { + xxx_messageInfo_Policy.DiscardUnknown(m) +} + +var xxx_messageInfo_Policy proto.InternalMessageInfo + +func (m *PolicyList) Reset() { *m = PolicyList{} } +func (*PolicyList) ProtoMessage() {} +func (*PolicyList) Descriptor() ([]byte, []int) { + return fileDescriptor_c7e4d52063960930, []int{5} +} +func (m *PolicyList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PolicyList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *PolicyList) XXX_Merge(src proto.Message) { + xxx_messageInfo_PolicyList.Merge(m, src) +} +func (m *PolicyList) XXX_Size() int { + return m.Size() +} +func (m *PolicyList) XXX_DiscardUnknown() { + xxx_messageInfo_PolicyList.DiscardUnknown(m) +} + +var xxx_messageInfo_PolicyList proto.InternalMessageInfo + +func (m *PolicyRule) Reset() { *m = PolicyRule{} } +func (*PolicyRule) ProtoMessage() {} +func (*PolicyRule) Descriptor() ([]byte, []int) { + return fileDescriptor_c7e4d52063960930, []int{6} +} +func (m *PolicyRule) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PolicyRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *PolicyRule) XXX_Merge(src proto.Message) { + xxx_messageInfo_PolicyRule.Merge(m, src) +} +func (m *PolicyRule) XXX_Size() int { + return m.Size() +} +func (m *PolicyRule) XXX_DiscardUnknown() { + xxx_messageInfo_PolicyRule.DiscardUnknown(m) +} + +var xxx_messageInfo_PolicyRule proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Event)(nil), "k8s.io.apiserver.pkg.apis.audit.v1beta1.Event") + proto.RegisterMapType((map[string]string)(nil), "k8s.io.apiserver.pkg.apis.audit.v1beta1.Event.AnnotationsEntry") + proto.RegisterType((*EventList)(nil), "k8s.io.apiserver.pkg.apis.audit.v1beta1.EventList") + proto.RegisterType((*GroupResources)(nil), "k8s.io.apiserver.pkg.apis.audit.v1beta1.GroupResources") + proto.RegisterType((*ObjectReference)(nil), "k8s.io.apiserver.pkg.apis.audit.v1beta1.ObjectReference") + proto.RegisterType((*Policy)(nil), "k8s.io.apiserver.pkg.apis.audit.v1beta1.Policy") + proto.RegisterType((*PolicyList)(nil), "k8s.io.apiserver.pkg.apis.audit.v1beta1.PolicyList") + proto.RegisterType((*PolicyRule)(nil), "k8s.io.apiserver.pkg.apis.audit.v1beta1.PolicyRule") +} + +func init() { + proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/generated.proto", fileDescriptor_c7e4d52063960930) +} + +var fileDescriptor_c7e4d52063960930 = []byte{ + // 1320 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0xc6, 0x71, 0xe3, 0x9d, 0x34, 0x4e, 0x32, 0x2d, 0x74, 0xc9, 0xc1, 0x0e, 0x41, 0x82, + 0x08, 0xd2, 0xdd, 0xb6, 0x14, 0x5a, 0x21, 0x01, 0x8a, 0x69, 0x29, 0x96, 0xda, 0x34, 0x9a, 0xd4, + 0x15, 0x02, 0x0e, 0x8c, 0xed, 0x17, 0x7b, 0x89, 0x3d, 0xbb, 0xec, 0xcc, 0x1a, 0xe5, 0x86, 0xc4, + 0x19, 0x89, 0x3b, 0x9f, 0x81, 0x0b, 0x1f, 0x00, 0x71, 0x42, 0x3d, 0xf6, 0xd8, 0x53, 0x44, 0xcd, + 0xb7, 0xe8, 0x09, 0xcd, 0xec, 0xec, 0xce, 0x7a, 0x53, 0x8b, 0x0d, 0x87, 0xde, 0x76, 0xde, 0xfb, + 0xbd, 0xdf, 0x7b, 0xf3, 0xf6, 0xfd, 0x19, 0x74, 0x70, 0x7c, 0x9b, 0xbb, 0x7e, 0xe0, 0x1d, 0xc7, + 0x5d, 0x88, 0x18, 0x08, 0xe0, 0xde, 0x04, 0x58, 0x3f, 0x88, 0x3c, 0xad, 0xa0, 0xa1, 0xcf, 0x21, + 0x9a, 0x40, 0xe4, 0x85, 0xc7, 0x03, 0x75, 0xf2, 0x68, 0xdc, 0xf7, 0x85, 0x37, 0xb9, 0xde, 0x05, + 0x41, 0xaf, 0x7b, 0x03, 0x60, 0x10, 0x51, 0x01, 0x7d, 0x37, 0x8c, 0x02, 0x11, 0xe0, 0x77, 0x12, + 0x43, 0x37, 0x33, 0x74, 0xc3, 0xe3, 0x81, 0x3a, 0xb9, 0xca, 0xd0, 0xd5, 0x86, 0x9b, 0x57, 0x07, + 0xbe, 0x18, 0xc6, 0x5d, 0xb7, 0x17, 0x8c, 0xbd, 0x41, 0x30, 0x08, 0x3c, 0x65, 0xdf, 0x8d, 0x8f, + 0xd4, 0x49, 0x1d, 0xd4, 0x57, 0xc2, 0xbb, 0xb9, 0x6b, 0x02, 0xf2, 0x68, 0x2c, 0x86, 0xc0, 0x84, + 0xdf, 0xa3, 0xc2, 0x0f, 0x98, 0x37, 0x39, 0x13, 0xc5, 0xe6, 0x4d, 0x83, 0x1e, 0xd3, 0xde, 0xd0, + 0x67, 0x10, 0x9d, 0x98, 0x1b, 0x8c, 0x41, 0xd0, 0x97, 0x59, 0x79, 0xf3, 0xac, 0xa2, 0x98, 0x09, + 0x7f, 0x0c, 0x67, 0x0c, 0x3e, 0xfc, 0x2f, 0x03, 0xde, 0x1b, 0xc2, 0x98, 0x16, 0xed, 0xb6, 0x7f, + 0xbb, 0x88, 0xaa, 0x77, 0x27, 0xc0, 0x04, 0xfe, 0x16, 0xd5, 0x64, 0x34, 0x7d, 0x2a, 0xa8, 0x63, + 0x6d, 0x59, 0x3b, 0x2b, 0x37, 0xae, 0xb9, 0x26, 0x83, 0x19, 0xa9, 0x49, 0xa2, 0x44, 0xbb, 0x93, + 0xeb, 0xee, 0xc3, 0xee, 0x77, 0xd0, 0x13, 0x0f, 0x40, 0xd0, 0x16, 0x7e, 0x72, 0xda, 0x5c, 0x98, + 0x9e, 0x36, 0x91, 0x91, 0x91, 0x8c, 0x15, 0xef, 0xa2, 0xea, 0x08, 0x26, 0x30, 0x72, 0x16, 0xb7, + 0xac, 0x1d, 0xbb, 0xf5, 0xba, 0x06, 0x57, 0xef, 0x4b, 0xe1, 0x8b, 0xf4, 0x83, 0x24, 0x20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b, 0x80, 0x3b, 0x68, 0xab, 0xb2, 0x63, 0xb7, 0x56, 0xe5, 0x4f, + 0x3b, 0x4c, 0x85, 0xc4, 0xe8, 0xb1, 0x87, 0x6c, 0x19, 0xde, 0xde, 0x00, 0x98, 0x70, 0xb0, 0xca, + 0x43, 0xf6, 0x97, 0x3b, 0xa9, 0x82, 0x18, 0x0c, 0x06, 0x64, 0x07, 0xaa, 0x10, 0x09, 0x1c, 0x39, + 0x2b, 0xea, 0x02, 0xb7, 0xdd, 0x92, 0x53, 0x41, 0x97, 0x35, 0x81, 0x23, 0x88, 0x80, 0xf5, 0x20, + 0x89, 0x2b, 0x13, 0x12, 0xc3, 0x8c, 0x87, 0xa8, 0x1e, 0x01, 0x0f, 0x03, 0xc6, 0xe1, 0x50, 0x50, + 0x11, 0x73, 0xe7, 0xa2, 0xf2, 0xb5, 0x5b, 0xae, 0x5c, 0x13, 0x9b, 0x16, 0x9e, 0x9e, 0x36, 0xeb, + 0x64, 0x86, 0x87, 0x14, 0x78, 0x31, 0x45, 0xab, 0xba, 0x24, 0x92, 0x40, 0x9c, 0x55, 0xe5, 0x68, + 0x67, 0xae, 0x23, 0xdd, 0xfd, 0x6e, 0x87, 0x1d, 0xb3, 0xe0, 0x07, 0xd6, 0xda, 0x98, 0x9e, 0x36, + 0x57, 0x49, 0x9e, 0x82, 0xcc, 0x32, 0xe2, 0xbe, 0xb9, 0x8c, 0xf6, 0x51, 0x3f, 0xa7, 0x8f, 0x99, + 0x8b, 0x68, 0x27, 0x05, 0x4e, 0xfc, 0xb3, 0x85, 0x1c, 0xed, 0x97, 0x40, 0x0f, 0xfc, 0x09, 0xf4, + 0xb3, 0x3e, 0x75, 0xd6, 0x94, 0x43, 0xaf, 0x5c, 0xf6, 0x1e, 0xf8, 0xbd, 0x28, 0x50, 0x1d, 0xbf, + 0xa5, 0x6b, 0xc1, 0x21, 0x73, 0x88, 0xc9, 0x5c, 0x97, 0x38, 0x40, 0x75, 0xd5, 0x9a, 0x26,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x53, 0x51, 0x06, 0xba, 0xfb, 0x72, 0x0a, 0x32, 0x8b, 0xdb, + 0xfe, 0xbd, 0x82, 0xd6, 0x0a, 0x83, 0x07, 0xef, 0xa2, 0x5a, 0x0a, 0xd2, 0x11, 0x66, 0x49, 0x4b, + 0xb9, 0x48, 0x86, 0x90, 0x43, 0x92, 0x49, 0xaa, 0x90, 0xf6, 0xf4, 0xef, 0x33, 0x43, 0x72, 0x3f, + 0x55, 0x10, 0x83, 0x91, 0x8b, 0x45, 0x1e, 0xd4, 0x8a, 0xcd, 0x2d, 0x16, 0x89, 0x25, 0x4a, 0x83, + 0x5b, 0xa8, 0x12, 0xfb, 0x7d, 0xbd, 0x28, 0xaf, 0x69, 0x40, 0xa5, 0x53, 0x76, 0x49, 0x4a, 0x63, + 0x79, 0x09, 0x1a, 0xfa, 0x2a, 0xa3, 0x7a, 0x47, 0x66, 0x97, 0xd8, 0x3b, 0x68, 0x27, 0x99, 0xce, + 0x10, 0x72, 0x41, 0xd2, 0xd0, 0x7f, 0x0c, 0x11, 0xf7, 0x03, 0x56, 0x5c, 0x90, 0x7b, 0x07, 0x6d, + 0xad, 0x21, 0x39, 0x14, 0xde, 0x43, 0x6b, 0x69, 0x12, 0x52, 0xc3, 0x64, 0x57, 0x5e, 0xd1, 0x86, + 0x6b, 0x64, 0x56, 0x4d, 0x8a, 0x78, 0xfc, 0x01, 0x5a, 0xe1, 0x71, 0x37, 0x4b, 0x76, 0x4d, 0x99, + 0x67, 0x3d, 0x75, 0x68, 0x54, 0x24, 0x8f, 0xdb, 0xfe, 0x6b, 0x11, 0x5d, 0x38, 0x08, 0x46, 0x7e, + 0xef, 0xe4, 0x15, 0x3c, 0xa2, 0xbe, 0x44, 0xd5, 0x28, 0x1e, 0x41, 0xda, 0x14, 0xef, 0x97, 0x6e, + 0x8a, 0x24, 0x42, 0x12, 0x8f, 0xc0, 0x54, 0xb8, 0x3c, 0x71, 0x92, 0x10, 0xe2, 0x5b, 0x08, 0x05, + 0x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x3f, 0x7b, 0x59, 0x31, 0xdb, 0xaa, 0x98, 0x5f, 0x2b, 0x5b, + 0xc8, 0xad, 0xab, 0x4f, 0x9e, 0x37, 0x16, 0x9e, 0x3e, 0x6f, 0x2c, 0x3c, 0x7b, 0xde, 0x58, 0xf8, + 0x71, 0xda, 0xb0, 0x9e, 0x4c, 0x1b, 0xd6, 0xd3, 0x69, 0xc3, 0x7a, 0x36, 0x6d, 0x58, 0x7f, 0x4f, + 0x1b, 0xd6, 0x2f, 0xff, 0x34, 0x16, 0xbe, 0x5a, 0xd6, 0x89, 0xfc, 0x37, 0x00, 0x00, 0xff, 0xff, + 0x21, 0x57, 0x33, 0x77, 0xfc, 0x0e, 0x00, 0x00, +} + +func (m *Event) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Event) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.UserAgent) + copy(dAtA[i:], m.UserAgent) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.UserAgent))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x92 + if len(m.Annotations) > 0 { + keysForAnnotations := make([]string, 0, len(m.Annotations)) + for k := range m.Annotations { + keysForAnnotations = append(keysForAnnotations, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + for iNdEx := len(keysForAnnotations) - 1; iNdEx >= 0; iNdEx-- { + v := m.Annotations[string(keysForAnnotations[iNdEx])] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintGenerated(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(keysForAnnotations[iNdEx]) + copy(dAtA[i:], keysForAnnotations[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(keysForAnnotations[iNdEx]))) + i-- + dAtA[i] = 0xa + i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a + } + } + { + size, err := m.StageTimestamp.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + { + size, err := m.RequestReceivedTimestamp.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x7a + if m.ResponseObject != nil { + { + size, err := m.ResponseObject.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x72 + } + if m.RequestObject != nil { + { + size, err := m.RequestObject.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6a + } + if m.ResponseStatus != nil { + { + size, err := m.ResponseStatus.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + } + if m.ObjectRef != nil { + { + size, err := m.ObjectRef.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } + if len(m.SourceIPs) > 0 { + for iNdEx := len(m.SourceIPs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.SourceIPs[iNdEx]) + copy(dAtA[i:], m.SourceIPs[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.SourceIPs[iNdEx]))) + i-- + dAtA[i] = 0x52 + } + } + if m.ImpersonatedUser != nil { + { + size, err := m.ImpersonatedUser.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + { + size, err := m.User.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + i -= len(m.Verb) + copy(dAtA[i:], m.Verb) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Verb))) + i-- + dAtA[i] = 0x3a + i -= len(m.RequestURI) + copy(dAtA[i:], m.RequestURI) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.RequestURI))) + i-- + dAtA[i] = 0x32 + i -= len(m.Stage) + copy(dAtA[i:], m.Stage) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Stage))) + i-- + dAtA[i] = 0x2a + i -= len(m.AuditID) + copy(dAtA[i:], m.AuditID) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.AuditID))) + i-- + dAtA[i] = 0x22 + { + size, err := m.Timestamp.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + i -= len(m.Level) + copy(dAtA[i:], m.Level) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Level))) + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *EventList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *GroupResources) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GroupResources) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GroupResources) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ResourceNames) > 0 { + for iNdEx := len(m.ResourceNames) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ResourceNames[iNdEx]) + copy(dAtA[i:], m.ResourceNames[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceNames[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Resources) > 0 { + for iNdEx := len(m.Resources) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Resources[iNdEx]) + copy(dAtA[i:], m.Resources[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resources[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + i -= len(m.Group) + copy(dAtA[i:], m.Group) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ObjectReference) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ObjectReference) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ObjectReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Subresource) + copy(dAtA[i:], m.Subresource) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Subresource))) + i-- + dAtA[i] = 0x42 + i -= len(m.ResourceVersion) + copy(dAtA[i:], m.ResourceVersion) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceVersion))) + i-- + dAtA[i] = 0x3a + i -= len(m.APIVersion) + copy(dAtA[i:], m.APIVersion) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion))) + i-- + dAtA[i] = 0x32 + i -= len(m.APIGroup) + copy(dAtA[i:], m.APIGroup) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroup))) + i-- + dAtA[i] = 0x2a + i -= len(m.UID) + copy(dAtA[i:], m.UID) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID))) + i-- + dAtA[i] = 0x22 + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x1a + i -= len(m.Namespace) + copy(dAtA[i:], m.Namespace) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) + i-- + dAtA[i] = 0x12 + i -= len(m.Resource) + copy(dAtA[i:], m.Resource) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Policy) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Policy) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Policy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i-- + if m.OmitManagedFields { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + if len(m.OmitStages) > 0 { + for iNdEx := len(m.OmitStages) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.OmitStages[iNdEx]) + copy(dAtA[i:], m.OmitStages[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.OmitStages[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Rules) > 0 { + for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Rules[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *PolicyList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PolicyList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PolicyList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *PolicyRule) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PolicyRule) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PolicyRule) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.OmitManagedFields != nil { + i-- + if *m.OmitManagedFields { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 + } + if len(m.OmitStages) > 0 { + for iNdEx := len(m.OmitStages) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.OmitStages[iNdEx]) + copy(dAtA[i:], m.OmitStages[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.OmitStages[iNdEx]))) + i-- + dAtA[i] = 0x42 + } + } + if len(m.NonResourceURLs) > 0 { + for iNdEx := len(m.NonResourceURLs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.NonResourceURLs[iNdEx]) + copy(dAtA[i:], m.NonResourceURLs[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.NonResourceURLs[iNdEx]))) + i-- + dAtA[i] = 0x3a + } + } + if len(m.Namespaces) > 0 { + for iNdEx := len(m.Namespaces) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Namespaces[iNdEx]) + copy(dAtA[i:], m.Namespaces[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespaces[iNdEx]))) + i-- + dAtA[i] = 0x32 + } + } + if len(m.Resources) > 0 { + for iNdEx := len(m.Resources) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Resources[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if len(m.Verbs) > 0 { + for iNdEx := len(m.Verbs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Verbs[iNdEx]) + copy(dAtA[i:], m.Verbs[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Verbs[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.UserGroups) > 0 { + for iNdEx := len(m.UserGroups) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.UserGroups[iNdEx]) + copy(dAtA[i:], m.UserGroups[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.UserGroups[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Users) > 0 { + for iNdEx := len(m.Users) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Users[iNdEx]) + copy(dAtA[i:], m.Users[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Users[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + i -= len(m.Level) + copy(dAtA[i:], m.Level) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Level))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { + offset -= sovGenerated(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Event) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Level) + n += 1 + l + sovGenerated(uint64(l)) + l = m.Timestamp.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.AuditID) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Stage) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.RequestURI) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Verb) + n += 1 + l + sovGenerated(uint64(l)) + l = m.User.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.ImpersonatedUser != nil { + l = m.ImpersonatedUser.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.SourceIPs) > 0 { + for _, s := range m.SourceIPs { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.ObjectRef != nil { + l = m.ObjectRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.ResponseStatus != nil { + l = m.ResponseStatus.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.RequestObject != nil { + l = m.RequestObject.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.ResponseObject != nil { + l = m.ResponseObject.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + l = m.RequestReceivedTimestamp.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.StageTimestamp.Size() + n += 2 + l + sovGenerated(uint64(l)) + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 2 + sovGenerated(uint64(mapEntrySize)) + } + } + l = len(m.UserAgent) + n += 2 + l + sovGenerated(uint64(l)) + return n +} + +func (m *EventList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *GroupResources) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Group) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Resources) > 0 { + for _, s := range m.Resources { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.ResourceNames) > 0 { + for _, s := range m.ResourceNames { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ObjectReference) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Resource) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Namespace) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.UID) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.APIGroup) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.APIVersion) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.ResourceVersion) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Subresource) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *Policy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Rules) > 0 { + for _, e := range m.Rules { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.OmitStages) > 0 { + for _, s := range m.OmitStages { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + n += 2 + return n +} + +func (m *PolicyList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *PolicyRule) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Level) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Users) > 0 { + for _, s := range m.Users { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.UserGroups) > 0 { + for _, s := range m.UserGroups { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Verbs) > 0 { + for _, s := range m.Verbs { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Namespaces) > 0 { + for _, s := range m.Namespaces { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.NonResourceURLs) > 0 { + for _, s := range m.NonResourceURLs { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.OmitStages) > 0 { + for _, s := range m.OmitStages { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.OmitManagedFields != nil { + n += 2 + } + return n +} + +func sovGenerated(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Event) String() string { + if this == nil { + return "nil" + } + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + s := strings.Join([]string{`&Event{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Level:` + fmt.Sprintf("%v", this.Level) + `,`, + `Timestamp:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Timestamp), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, + `AuditID:` + fmt.Sprintf("%v", this.AuditID) + `,`, + `Stage:` + fmt.Sprintf("%v", this.Stage) + `,`, + `RequestURI:` + fmt.Sprintf("%v", this.RequestURI) + `,`, + `Verb:` + fmt.Sprintf("%v", this.Verb) + `,`, + `User:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.User), "UserInfo", "v11.UserInfo", 1), `&`, ``, 1) + `,`, + `ImpersonatedUser:` + strings.Replace(fmt.Sprintf("%v", this.ImpersonatedUser), "UserInfo", "v11.UserInfo", 1) + `,`, + `SourceIPs:` + fmt.Sprintf("%v", this.SourceIPs) + `,`, + `ObjectRef:` + strings.Replace(this.ObjectRef.String(), "ObjectReference", "ObjectReference", 1) + `,`, + `ResponseStatus:` + strings.Replace(fmt.Sprintf("%v", this.ResponseStatus), "Status", "v1.Status", 1) + `,`, + `RequestObject:` + strings.Replace(fmt.Sprintf("%v", this.RequestObject), "Unknown", "runtime.Unknown", 1) + `,`, + `ResponseObject:` + strings.Replace(fmt.Sprintf("%v", this.ResponseObject), "Unknown", "runtime.Unknown", 1) + `,`, + `RequestReceivedTimestamp:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.RequestReceivedTimestamp), "MicroTime", "v1.MicroTime", 1), `&`, ``, 1) + `,`, + `StageTimestamp:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.StageTimestamp), "MicroTime", "v1.MicroTime", 1), `&`, ``, 1) + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `UserAgent:` + fmt.Sprintf("%v", this.UserAgent) + `,`, + `}`, + }, "") + return s +} +func (this *EventList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]Event{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Event", "Event", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&EventList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *GroupResources) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GroupResources{`, + `Group:` + fmt.Sprintf("%v", this.Group) + `,`, + `Resources:` + fmt.Sprintf("%v", this.Resources) + `,`, + `ResourceNames:` + fmt.Sprintf("%v", this.ResourceNames) + `,`, + `}`, + }, "") + return s +} +func (this *ObjectReference) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ObjectReference{`, + `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `UID:` + fmt.Sprintf("%v", this.UID) + `,`, + `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`, + `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `Subresource:` + fmt.Sprintf("%v", this.Subresource) + `,`, + `}`, + }, "") + return s +} +func (this *Policy) String() string { + if this == nil { + return "nil" + } + repeatedStringForRules := "[]PolicyRule{" + for _, f := range this.Rules { + repeatedStringForRules += strings.Replace(strings.Replace(f.String(), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + "," + } + repeatedStringForRules += "}" + s := strings.Join([]string{`&Policy{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Rules:` + repeatedStringForRules + `,`, + `OmitStages:` + fmt.Sprintf("%v", this.OmitStages) + `,`, + `OmitManagedFields:` + fmt.Sprintf("%v", this.OmitManagedFields) + `,`, + `}`, + }, "") + return s +} +func (this *PolicyList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]Policy{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Policy", "Policy", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&PolicyList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *PolicyRule) String() string { + if this == nil { + return "nil" + } + repeatedStringForResources := "[]GroupResources{" + for _, f := range this.Resources { + repeatedStringForResources += strings.Replace(strings.Replace(f.String(), "GroupResources", "GroupResources", 1), `&`, ``, 1) + "," + } + repeatedStringForResources += "}" + s := strings.Join([]string{`&PolicyRule{`, + `Level:` + fmt.Sprintf("%v", this.Level) + `,`, + `Users:` + fmt.Sprintf("%v", this.Users) + `,`, + `UserGroups:` + fmt.Sprintf("%v", this.UserGroups) + `,`, + `Verbs:` + fmt.Sprintf("%v", this.Verbs) + `,`, + `Resources:` + repeatedStringForResources + `,`, + `Namespaces:` + fmt.Sprintf("%v", this.Namespaces) + `,`, + `NonResourceURLs:` + fmt.Sprintf("%v", this.NonResourceURLs) + `,`, + `OmitStages:` + fmt.Sprintf("%v", this.OmitStages) + `,`, + `OmitManagedFields:` + valueToStringGenerated(this.OmitManagedFields) + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Event) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Event: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Level = Level(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Timestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AuditID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AuditID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stage", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Stage = Stage(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestURI", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestURI = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Verb", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Verb = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.User.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ImpersonatedUser", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ImpersonatedUser == nil { + m.ImpersonatedUser = &v11.UserInfo{} + } + if err := m.ImpersonatedUser.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceIPs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourceIPs = append(m.SourceIPs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ObjectRef == nil { + m.ObjectRef = &ObjectReference{} + } + if err := m.ObjectRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseStatus", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResponseStatus == nil { + m.ResponseStatus = &v1.Status{} + } + if err := m.ResponseStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestObject", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RequestObject == nil { + m.RequestObject = &runtime.Unknown{} + } + if err := m.RequestObject.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseObject", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResponseObject == nil { + m.ResponseObject = &runtime.Unknown{} + } + if err := m.ResponseObject.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestReceivedTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.RequestReceivedTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StageTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.StageTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Annotations == nil { + m.Annotations = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthGenerated + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthGenerated + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Annotations[mapkey] = mapvalue + iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserAgent", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserAgent = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, Event{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GroupResources) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GroupResources: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GroupResources: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Group = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceNames", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceNames = append(m.ResourceNames, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ObjectReference) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ObjectReference: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ObjectReference: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resource = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field APIGroup", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.APIGroup = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.APIVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Subresource", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Subresource = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Policy) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Policy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Policy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Rules = append(m.Rules, PolicyRule{}) + if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OmitStages", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OmitStages = append(m.OmitStages, Stage(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OmitManagedFields", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.OmitManagedFields = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PolicyList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PolicyList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PolicyList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, Policy{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PolicyRule) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PolicyRule: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PolicyRule: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Level = Level(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Users", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Users = append(m.Users, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserGroups", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserGroups = append(m.UserGroups, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Verbs = append(m.Verbs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, GroupResources{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespaces", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespaces = append(m.Namespaces, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonResourceURLs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonResourceURLs = append(m.NonResourceURLs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OmitStages", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OmitStages = append(m.OmitStages, Stage(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OmitManagedFields", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.OmitManagedFields = &b + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenerated(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenerated + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenerated + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenerated + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") +) diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/generated.proto b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/generated.proto new file mode 100644 index 000000000000..e78039fdd526 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/generated.proto @@ -0,0 +1,283 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = "proto2"; + +package k8s.io.apiserver.pkg.apis.audit.v1beta1; + +import "k8s.io/api/authentication/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; + +// Package-wide variables from generator "generated". +option go_package = "v1beta1"; + +// DEPRECATED - This group version of Event is deprecated by audit.k8s.io/v1/Event. See the release notes for +// more information. +// Event captures all the information that can be included in an API audit log. +message Event { + // ObjectMeta is included for interoperability with API infrastructure. + // +optional + // DEPRECATED: Use StageTimestamp which supports micro second instead of ObjectMeta.CreateTimestamp + // and the rest of the object is not used + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // AuditLevel at which event was generated + optional string level = 2; + + // Time the request reached the apiserver. + // DEPRECATED: Use RequestReceivedTimestamp which supports micro second instead. + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time timestamp = 3; + + // Unique audit ID, generated for each request. + optional string auditID = 4; + + // Stage of the request handling when this event instance was generated. + optional string stage = 5; + + // RequestURI is the request URI as sent by the client to a server. + optional string requestURI = 6; + + // Verb is the kubernetes verb associated with the request. + // For non-resource requests, this is the lower-cased HTTP method. + optional string verb = 7; + + // Authenticated user information. + optional k8s.io.api.authentication.v1.UserInfo user = 8; + + // Impersonated user information. + // +optional + optional k8s.io.api.authentication.v1.UserInfo impersonatedUser = 9; + + // Source IPs, from where the request originated and intermediate proxies. + // +optional + repeated string sourceIPs = 10; + + // UserAgent records the user agent string reported by the client. + // Note that the UserAgent is provided by the client, and must not be trusted. + // +optional + optional string userAgent = 18; + + // Object reference this request is targeted at. + // Does not apply for List-type requests, or non-resource requests. + // +optional + optional ObjectReference objectRef = 11; + + // The response status, populated even when the ResponseObject is not a Status type. + // For successful responses, this will only include the Code and StatusSuccess. + // For non-status type error responses, this will be auto-populated with the error Message. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Status responseStatus = 12; + + // API object from the request, in JSON format. The RequestObject is recorded as-is in the request + // (possibly re-encoded as JSON), prior to version conversion, defaulting, admission or + // merging. It is an external versioned object type, and may not be a valid object on its own. + // Omitted for non-resource requests. Only logged at Request Level and higher. + // +optional + optional k8s.io.apimachinery.pkg.runtime.Unknown requestObject = 13; + + // API object returned in the response, in JSON. The ResponseObject is recorded after conversion + // to the external type, and serialized as JSON. Omitted for non-resource requests. Only logged + // at Response Level. + // +optional + optional k8s.io.apimachinery.pkg.runtime.Unknown responseObject = 14; + + // Time the request reached the apiserver. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime requestReceivedTimestamp = 15; + + // Time the request reached current audit stage. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime stageTimestamp = 16; + + // Annotations is an unstructured key value map stored with an audit event that may be set by + // plugins invoked in the request serving chain, including authentication, authorization and + // admission plugins. Note that these annotations are for the audit event, and do not correspond + // to the metadata.annotations of the submitted object. Keys should uniquely identify the informing + // component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values + // should be short. Annotations are included in the Metadata level. + // +optional + map annotations = 17; +} + +// EventList is a list of audit Events. +message EventList { + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + repeated Event items = 2; +} + +// GroupResources represents resource kinds in an API group. +message GroupResources { + // Group is the name of the API group that contains the resources. + // The empty string represents the core API group. + // +optional + optional string group = 1; + + // Resources is a list of resources this rule applies to. + // + // For example: + // 'pods' matches pods. + // 'pods/log' matches the log subresource of pods. + // '*' matches all resources and their subresources. + // 'pods/*' matches all subresources of pods. + // '*/scale' matches all scale subresources. + // + // If wildcard is present, the validation rule will ensure resources do not + // overlap with each other. + // + // An empty list implies all resources and subresources in this API groups apply. + // +optional + repeated string resources = 2; + + // ResourceNames is a list of resource instance names that the policy matches. + // Using this field requires Resources to be specified. + // An empty list implies that every instance of the resource is matched. + // +optional + repeated string resourceNames = 3; +} + +// ObjectReference contains enough information to let you inspect or modify the referred object. +message ObjectReference { + // +optional + optional string resource = 1; + + // +optional + optional string namespace = 2; + + // +optional + optional string name = 3; + + // +optional + optional string uid = 4; + + // APIGroup is the name of the API group that contains the referred object. + // The empty string represents the core API group. + // +optional + optional string apiGroup = 5; + + // APIVersion is the version of the API group that contains the referred object. + // +optional + optional string apiVersion = 6; + + // +optional + optional string resourceVersion = 7; + + // +optional + optional string subresource = 8; +} + +// DEPRECATED - This group version of Policy is deprecated by audit.k8s.io/v1/Policy. See the release notes for +// more information. +// Policy defines the configuration of audit logging, and the rules for how different request +// categories are logged. +message Policy { + // ObjectMeta is included for interoperability with API infrastructure. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Rules specify the audit Level a request should be recorded at. + // A request may match multiple rules, in which case the FIRST matching rule is used. + // The default audit level is None, but can be overridden by a catch-all rule at the end of the list. + // PolicyRules are strictly ordered. + repeated PolicyRule rules = 2; + + // OmitStages is a list of stages for which no events are created. Note that this can also + // be specified per rule in which case the union of both are omitted. + // +optional + repeated string omitStages = 3; + + // OmitManagedFields indicates whether to omit the managed fields of the request + // and response bodies from being written to the API audit log. + // This is used as a global default - a value of 'true' will omit the managed fileds, + // otherwise the managed fields will be included in the API audit log. + // Note that this can also be specified per rule in which case the value specified + // in a rule will override the global default. + // +optional + optional bool omitManagedFields = 4; +} + +// PolicyList is a list of audit Policies. +message PolicyList { + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + repeated Policy items = 2; +} + +// PolicyRule maps requests based off metadata to an audit Level. +// Requests must match the rules of every field (an intersection of rules). +message PolicyRule { + // The Level that requests matching this rule are recorded at. + optional string level = 1; + + // The users (by authenticated user name) this rule applies to. + // An empty list implies every user. + // +optional + repeated string users = 2; + + // The user groups this rule applies to. A user is considered matching + // if it is a member of any of the UserGroups. + // An empty list implies every user group. + // +optional + repeated string userGroups = 3; + + // The verbs that match this rule. + // An empty list implies every verb. + // +optional + repeated string verbs = 4; + + // Resources that this rule matches. An empty list implies all kinds in all API groups. + // +optional + repeated GroupResources resources = 5; + + // Namespaces that this rule matches. + // The empty string "" matches non-namespaced resources. + // An empty list implies every namespace. + // +optional + repeated string namespaces = 6; + + // NonResourceURLs is a set of URL paths that should be audited. + // *s are allowed, but only as the full, final step in the path. + // Examples: + // "/metrics" - Log requests for apiserver metrics + // "/healthz*" - Log all health checks + // +optional + repeated string nonResourceURLs = 7; + + // OmitStages is a list of stages for which no events are created. Note that this can also + // be specified policy wide in which case the union of both are omitted. + // An empty list means no restrictions will apply. + // +optional + repeated string omitStages = 8; + + // OmitManagedFields indicates whether to omit the managed fields of the request + // and response bodies from being written to the API audit log. + // - a value of 'true' will drop the managed fields from the API audit log + // - a value of 'false' indicates that the managed fileds should be included + // in the API audit log + // Note that the value, if specified, in this rule will override the global default + // If a value is not specified then the global default specified in + // Policy.OmitManagedFields will stand. + // +optional + optional bool omitManagedFields = 9; +} + diff --git a/cluster-autoscaler/vendor/k8s.io/kubelet/pkg/apis/credentialprovider/v1beta1/register.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/register.go similarity index 56% rename from cluster-autoscaler/vendor/k8s.io/kubelet/pkg/apis/credentialprovider/v1beta1/register.go rename to cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/register.go index 75ec067cb03c..1bb1a50f2943 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubelet/pkg/apis/credentialprovider/v1beta1/register.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/register.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Kubernetes Authors. +Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -23,23 +23,35 @@ import ( ) // GroupName is the group name use in this package -const GroupName = "credentialprovider.kubelet.k8s.io" +const GroupName = "audit.k8s.io" // SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + var ( - SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} + SchemeBuilder runtime.SchemeBuilder localSchemeBuilder = &SchemeBuilder + AddToScheme = localSchemeBuilder.AddToScheme ) -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + localSchemeBuilder.Register(addKnownTypes) +} func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &CredentialProviderRequest{}, - &CredentialProviderResponse{}, + &Event{}, + &EventList{}, + &Policy{}, + &PolicyList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/types.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/types.go new file mode 100644 index 000000000000..fcca2bcb864b --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/types.go @@ -0,0 +1,324 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + authnv1 "k8s.io/api/authentication/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" +) + +// Header keys used by the audit system. +const ( + // Header to hold the audit ID as the request is propagated through the serving hierarchy. The + // Audit-ID header should be set by the first server to receive the request (e.g. the federation + // server or kube-aggregator). + HeaderAuditID = "Audit-ID" +) + +// Level defines the amount of information logged during auditing +type Level string + +// Valid audit levels +const ( + // LevelNone disables auditing + LevelNone Level = "None" + // LevelMetadata provides the basic level of auditing. + LevelMetadata Level = "Metadata" + // LevelRequest provides Metadata level of auditing, and additionally + // logs the request object (does not apply for non-resource requests). + LevelRequest Level = "Request" + // LevelRequestResponse provides Request level of auditing, and additionally + // logs the response object (does not apply for non-resource requests). + LevelRequestResponse Level = "RequestResponse" +) + +// Stage defines the stages in request handling that audit events may be generated. +type Stage string + +// Valid audit stages. +const ( + // The stage for events generated as soon as the audit handler receives the request, and before it + // is delegated down the handler chain. + StageRequestReceived Stage = "RequestReceived" + // The stage for events generated once the response headers are sent, but before the response body + // is sent. This stage is only generated for long-running requests (e.g. watch). + StageResponseStarted Stage = "ResponseStarted" + // The stage for events generated once the response body has been completed, and no more bytes + // will be sent. + StageResponseComplete Stage = "ResponseComplete" + // The stage for events generated when a panic occurred. + StagePanic Stage = "Panic" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.8 +// +k8s:prerelease-lifecycle-gen:deprecated=1.21 +// +k8s:prerelease-lifecycle-gen:replacement=audit.k8s.io,v1,Event + +// DEPRECATED - This group version of Event is deprecated by audit.k8s.io/v1/Event. See the release notes for +// more information. +// Event captures all the information that can be included in an API audit log. +type Event struct { + metav1.TypeMeta `json:",inline"` + // ObjectMeta is included for interoperability with API infrastructure. + // +optional + // DEPRECATED: Use StageTimestamp which supports micro second instead of ObjectMeta.CreateTimestamp + // and the rest of the object is not used + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // AuditLevel at which event was generated + Level Level `json:"level" protobuf:"bytes,2,opt,name=level,casttype=Level"` + + // Time the request reached the apiserver. + // DEPRECATED: Use RequestReceivedTimestamp which supports micro second instead. + Timestamp metav1.Time `json:"timestamp" protobuf:"bytes,3,opt,name=timestamp"` + // Unique audit ID, generated for each request. + AuditID types.UID `json:"auditID" protobuf:"bytes,4,opt,name=auditID,casttype=k8s.io/apimachinery/pkg/types.UID"` + // Stage of the request handling when this event instance was generated. + Stage Stage `json:"stage" protobuf:"bytes,5,opt,name=stage,casttype=Stage"` + + // RequestURI is the request URI as sent by the client to a server. + RequestURI string `json:"requestURI" protobuf:"bytes,6,opt,name=requestURI"` + // Verb is the kubernetes verb associated with the request. + // For non-resource requests, this is the lower-cased HTTP method. + Verb string `json:"verb" protobuf:"bytes,7,opt,name=verb"` + // Authenticated user information. + User authnv1.UserInfo `json:"user" protobuf:"bytes,8,opt,name=user"` + // Impersonated user information. + // +optional + ImpersonatedUser *authnv1.UserInfo `json:"impersonatedUser,omitempty" protobuf:"bytes,9,opt,name=impersonatedUser"` + // Source IPs, from where the request originated and intermediate proxies. + // +optional + SourceIPs []string `json:"sourceIPs,omitempty" protobuf:"bytes,10,rep,name=sourceIPs"` + // UserAgent records the user agent string reported by the client. + // Note that the UserAgent is provided by the client, and must not be trusted. + // +optional + UserAgent string `json:"userAgent,omitempty" protobuf:"bytes,18,opt,name=userAgent"` + // Object reference this request is targeted at. + // Does not apply for List-type requests, or non-resource requests. + // +optional + ObjectRef *ObjectReference `json:"objectRef,omitempty" protobuf:"bytes,11,opt,name=objectRef"` + // The response status, populated even when the ResponseObject is not a Status type. + // For successful responses, this will only include the Code and StatusSuccess. + // For non-status type error responses, this will be auto-populated with the error Message. + // +optional + ResponseStatus *metav1.Status `json:"responseStatus,omitempty" protobuf:"bytes,12,opt,name=responseStatus"` + + // API object from the request, in JSON format. The RequestObject is recorded as-is in the request + // (possibly re-encoded as JSON), prior to version conversion, defaulting, admission or + // merging. It is an external versioned object type, and may not be a valid object on its own. + // Omitted for non-resource requests. Only logged at Request Level and higher. + // +optional + RequestObject *runtime.Unknown `json:"requestObject,omitempty" protobuf:"bytes,13,opt,name=requestObject"` + // API object returned in the response, in JSON. The ResponseObject is recorded after conversion + // to the external type, and serialized as JSON. Omitted for non-resource requests. Only logged + // at Response Level. + // +optional + ResponseObject *runtime.Unknown `json:"responseObject,omitempty" protobuf:"bytes,14,opt,name=responseObject"` + // Time the request reached the apiserver. + // +optional + RequestReceivedTimestamp metav1.MicroTime `json:"requestReceivedTimestamp" protobuf:"bytes,15,opt,name=requestReceivedTimestamp"` + // Time the request reached current audit stage. + // +optional + StageTimestamp metav1.MicroTime `json:"stageTimestamp" protobuf:"bytes,16,opt,name=stageTimestamp"` + + // Annotations is an unstructured key value map stored with an audit event that may be set by + // plugins invoked in the request serving chain, including authentication, authorization and + // admission plugins. Note that these annotations are for the audit event, and do not correspond + // to the metadata.annotations of the submitted object. Keys should uniquely identify the informing + // component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values + // should be short. Annotations are included in the Metadata level. + // +optional + Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,17,rep,name=annotations"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.8 +// +k8s:prerelease-lifecycle-gen:deprecated=1.21 +// +k8s:prerelease-lifecycle-gen:replacement=audit.k8s.io,v1,EventList + +// EventList is a list of audit Events. +type EventList struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Items []Event `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.8 +// +k8s:prerelease-lifecycle-gen:deprecated=1.21 +// +k8s:prerelease-lifecycle-gen:replacement=audit.k8s.io,v1,Policy + +// DEPRECATED - This group version of Policy is deprecated by audit.k8s.io/v1/Policy. See the release notes for +// more information. +// Policy defines the configuration of audit logging, and the rules for how different request +// categories are logged. +type Policy struct { + metav1.TypeMeta `json:",inline"` + // ObjectMeta is included for interoperability with API infrastructure. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Rules specify the audit Level a request should be recorded at. + // A request may match multiple rules, in which case the FIRST matching rule is used. + // The default audit level is None, but can be overridden by a catch-all rule at the end of the list. + // PolicyRules are strictly ordered. + Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"` + + // OmitStages is a list of stages for which no events are created. Note that this can also + // be specified per rule in which case the union of both are omitted. + // +optional + OmitStages []Stage `json:"omitStages,omitempty" protobuf:"bytes,3,rep,name=omitStages"` + + // OmitManagedFields indicates whether to omit the managed fields of the request + // and response bodies from being written to the API audit log. + // This is used as a global default - a value of 'true' will omit the managed fileds, + // otherwise the managed fields will be included in the API audit log. + // Note that this can also be specified per rule in which case the value specified + // in a rule will override the global default. + // +optional + OmitManagedFields bool `json:"omitManagedFields,omitempty" protobuf:"varint,4,opt,name=omitManagedFields"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.8 +// +k8s:prerelease-lifecycle-gen:deprecated=1.21 +// +k8s:prerelease-lifecycle-gen:replacement=audit.k8s.io,v1,PolicyList + +// PolicyList is a list of audit Policies. +type PolicyList struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Items []Policy `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// PolicyRule maps requests based off metadata to an audit Level. +// Requests must match the rules of every field (an intersection of rules). +type PolicyRule struct { + // The Level that requests matching this rule are recorded at. + Level Level `json:"level" protobuf:"bytes,1,opt,name=level,casttype=Level"` + + // The users (by authenticated user name) this rule applies to. + // An empty list implies every user. + // +optional + Users []string `json:"users,omitempty" protobuf:"bytes,2,rep,name=users"` + // The user groups this rule applies to. A user is considered matching + // if it is a member of any of the UserGroups. + // An empty list implies every user group. + // +optional + UserGroups []string `json:"userGroups,omitempty" protobuf:"bytes,3,rep,name=userGroups"` + + // The verbs that match this rule. + // An empty list implies every verb. + // +optional + Verbs []string `json:"verbs,omitempty" protobuf:"bytes,4,rep,name=verbs"` + + // Rules can apply to API resources (such as "pods" or "secrets"), + // non-resource URL paths (such as "/api"), or neither, but not both. + // If neither is specified, the rule is treated as a default for all URLs. + + // Resources that this rule matches. An empty list implies all kinds in all API groups. + // +optional + Resources []GroupResources `json:"resources,omitempty" protobuf:"bytes,5,rep,name=resources"` + // Namespaces that this rule matches. + // The empty string "" matches non-namespaced resources. + // An empty list implies every namespace. + // +optional + Namespaces []string `json:"namespaces,omitempty" protobuf:"bytes,6,rep,name=namespaces"` + + // NonResourceURLs is a set of URL paths that should be audited. + // *s are allowed, but only as the full, final step in the path. + // Examples: + // "/metrics" - Log requests for apiserver metrics + // "/healthz*" - Log all health checks + // +optional + NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,7,rep,name=nonResourceURLs"` + + // OmitStages is a list of stages for which no events are created. Note that this can also + // be specified policy wide in which case the union of both are omitted. + // An empty list means no restrictions will apply. + // +optional + OmitStages []Stage `json:"omitStages,omitempty" protobuf:"bytes,8,rep,name=omitStages"` + + // OmitManagedFields indicates whether to omit the managed fields of the request + // and response bodies from being written to the API audit log. + // - a value of 'true' will drop the managed fields from the API audit log + // - a value of 'false' indicates that the managed fileds should be included + // in the API audit log + // Note that the value, if specified, in this rule will override the global default + // If a value is not specified then the global default specified in + // Policy.OmitManagedFields will stand. + // +optional + OmitManagedFields *bool `json:"omitManagedFields,omitempty" protobuf:"varint,9,opt,name=omitManagedFields"` +} + +// GroupResources represents resource kinds in an API group. +type GroupResources struct { + // Group is the name of the API group that contains the resources. + // The empty string represents the core API group. + // +optional + Group string `json:"group,omitempty" protobuf:"bytes,1,opt,name=group"` + // Resources is a list of resources this rule applies to. + // + // For example: + // 'pods' matches pods. + // 'pods/log' matches the log subresource of pods. + // '*' matches all resources and their subresources. + // 'pods/*' matches all subresources of pods. + // '*/scale' matches all scale subresources. + // + // If wildcard is present, the validation rule will ensure resources do not + // overlap with each other. + // + // An empty list implies all resources and subresources in this API groups apply. + // +optional + Resources []string `json:"resources,omitempty" protobuf:"bytes,2,rep,name=resources"` + // ResourceNames is a list of resource instance names that the policy matches. + // Using this field requires Resources to be specified. + // An empty list implies that every instance of the resource is matched. + // +optional + ResourceNames []string `json:"resourceNames,omitempty" protobuf:"bytes,3,rep,name=resourceNames"` +} + +// ObjectReference contains enough information to let you inspect or modify the referred object. +type ObjectReference struct { + // +optional + Resource string `json:"resource,omitempty" protobuf:"bytes,1,opt,name=resource"` + // +optional + Namespace string `json:"namespace,omitempty" protobuf:"bytes,2,opt,name=namespace"` + // +optional + Name string `json:"name,omitempty" protobuf:"bytes,3,opt,name=name"` + // +optional + UID types.UID `json:"uid,omitempty" protobuf:"bytes,4,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"` + // APIGroup is the name of the API group that contains the referred object. + // The empty string represents the core API group. + // +optional + APIGroup string `json:"apiGroup,omitempty" protobuf:"bytes,5,opt,name=apiGroup"` + // APIVersion is the version of the API group that contains the referred object. + // +optional + APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,6,opt,name=apiVersion"` + // +optional + ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,7,opt,name=resourceVersion"` + // +optional + Subresource string `json:"subresource,omitempty" protobuf:"bytes,8,opt,name=subresource"` +} diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/zz_generated.conversion.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/zz_generated.conversion.go new file mode 100644 index 000000000000..33bfc76e322c --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/zz_generated.conversion.go @@ -0,0 +1,339 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1beta1 + +import ( + unsafe "unsafe" + + v1 "k8s.io/api/authentication/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + types "k8s.io/apimachinery/pkg/types" + audit "k8s.io/apiserver/pkg/apis/audit" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*EventList)(nil), (*audit.EventList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_EventList_To_audit_EventList(a.(*EventList), b.(*audit.EventList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.EventList)(nil), (*EventList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_EventList_To_v1beta1_EventList(a.(*audit.EventList), b.(*EventList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*GroupResources)(nil), (*audit.GroupResources)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_GroupResources_To_audit_GroupResources(a.(*GroupResources), b.(*audit.GroupResources), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.GroupResources)(nil), (*GroupResources)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_GroupResources_To_v1beta1_GroupResources(a.(*audit.GroupResources), b.(*GroupResources), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ObjectReference)(nil), (*audit.ObjectReference)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ObjectReference_To_audit_ObjectReference(a.(*ObjectReference), b.(*audit.ObjectReference), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.ObjectReference)(nil), (*ObjectReference)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_ObjectReference_To_v1beta1_ObjectReference(a.(*audit.ObjectReference), b.(*ObjectReference), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Policy)(nil), (*audit.Policy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Policy_To_audit_Policy(a.(*Policy), b.(*audit.Policy), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.Policy)(nil), (*Policy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_Policy_To_v1beta1_Policy(a.(*audit.Policy), b.(*Policy), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PolicyList)(nil), (*audit.PolicyList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_PolicyList_To_audit_PolicyList(a.(*PolicyList), b.(*audit.PolicyList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.PolicyList)(nil), (*PolicyList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_PolicyList_To_v1beta1_PolicyList(a.(*audit.PolicyList), b.(*PolicyList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PolicyRule)(nil), (*audit.PolicyRule)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_PolicyRule_To_audit_PolicyRule(a.(*PolicyRule), b.(*audit.PolicyRule), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.PolicyRule)(nil), (*PolicyRule)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_PolicyRule_To_v1beta1_PolicyRule(a.(*audit.PolicyRule), b.(*PolicyRule), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*audit.Event)(nil), (*Event)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_Event_To_v1beta1_Event(a.(*audit.Event), b.(*Event), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*Event)(nil), (*audit.Event)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Event_To_audit_Event(a.(*Event), b.(*audit.Event), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1beta1_Event_To_audit_Event(in *Event, out *audit.Event, s conversion.Scope) error { + // WARNING: in.ObjectMeta requires manual conversion: does not exist in peer-type + out.Level = audit.Level(in.Level) + // WARNING: in.Timestamp requires manual conversion: does not exist in peer-type + out.AuditID = types.UID(in.AuditID) + out.Stage = audit.Stage(in.Stage) + out.RequestURI = in.RequestURI + out.Verb = in.Verb + out.User = in.User + out.ImpersonatedUser = (*v1.UserInfo)(unsafe.Pointer(in.ImpersonatedUser)) + out.SourceIPs = *(*[]string)(unsafe.Pointer(&in.SourceIPs)) + out.UserAgent = in.UserAgent + out.ObjectRef = (*audit.ObjectReference)(unsafe.Pointer(in.ObjectRef)) + out.ResponseStatus = (*metav1.Status)(unsafe.Pointer(in.ResponseStatus)) + out.RequestObject = (*runtime.Unknown)(unsafe.Pointer(in.RequestObject)) + out.ResponseObject = (*runtime.Unknown)(unsafe.Pointer(in.ResponseObject)) + out.RequestReceivedTimestamp = in.RequestReceivedTimestamp + out.StageTimestamp = in.StageTimestamp + out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) + return nil +} + +func autoConvert_audit_Event_To_v1beta1_Event(in *audit.Event, out *Event, s conversion.Scope) error { + out.Level = Level(in.Level) + out.AuditID = types.UID(in.AuditID) + out.Stage = Stage(in.Stage) + out.RequestURI = in.RequestURI + out.Verb = in.Verb + out.User = in.User + out.ImpersonatedUser = (*v1.UserInfo)(unsafe.Pointer(in.ImpersonatedUser)) + out.SourceIPs = *(*[]string)(unsafe.Pointer(&in.SourceIPs)) + out.UserAgent = in.UserAgent + out.ObjectRef = (*ObjectReference)(unsafe.Pointer(in.ObjectRef)) + out.ResponseStatus = (*metav1.Status)(unsafe.Pointer(in.ResponseStatus)) + out.RequestObject = (*runtime.Unknown)(unsafe.Pointer(in.RequestObject)) + out.ResponseObject = (*runtime.Unknown)(unsafe.Pointer(in.ResponseObject)) + out.RequestReceivedTimestamp = in.RequestReceivedTimestamp + out.StageTimestamp = in.StageTimestamp + out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) + return nil +} + +func autoConvert_v1beta1_EventList_To_audit_EventList(in *EventList, out *audit.EventList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]audit.Event, len(*in)) + for i := range *in { + if err := Convert_v1beta1_Event_To_audit_Event(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1beta1_EventList_To_audit_EventList is an autogenerated conversion function. +func Convert_v1beta1_EventList_To_audit_EventList(in *EventList, out *audit.EventList, s conversion.Scope) error { + return autoConvert_v1beta1_EventList_To_audit_EventList(in, out, s) +} + +func autoConvert_audit_EventList_To_v1beta1_EventList(in *audit.EventList, out *EventList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Event, len(*in)) + for i := range *in { + if err := Convert_audit_Event_To_v1beta1_Event(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_audit_EventList_To_v1beta1_EventList is an autogenerated conversion function. +func Convert_audit_EventList_To_v1beta1_EventList(in *audit.EventList, out *EventList, s conversion.Scope) error { + return autoConvert_audit_EventList_To_v1beta1_EventList(in, out, s) +} + +func autoConvert_v1beta1_GroupResources_To_audit_GroupResources(in *GroupResources, out *audit.GroupResources, s conversion.Scope) error { + out.Group = in.Group + out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources)) + out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames)) + return nil +} + +// Convert_v1beta1_GroupResources_To_audit_GroupResources is an autogenerated conversion function. +func Convert_v1beta1_GroupResources_To_audit_GroupResources(in *GroupResources, out *audit.GroupResources, s conversion.Scope) error { + return autoConvert_v1beta1_GroupResources_To_audit_GroupResources(in, out, s) +} + +func autoConvert_audit_GroupResources_To_v1beta1_GroupResources(in *audit.GroupResources, out *GroupResources, s conversion.Scope) error { + out.Group = in.Group + out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources)) + out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames)) + return nil +} + +// Convert_audit_GroupResources_To_v1beta1_GroupResources is an autogenerated conversion function. +func Convert_audit_GroupResources_To_v1beta1_GroupResources(in *audit.GroupResources, out *GroupResources, s conversion.Scope) error { + return autoConvert_audit_GroupResources_To_v1beta1_GroupResources(in, out, s) +} + +func autoConvert_v1beta1_ObjectReference_To_audit_ObjectReference(in *ObjectReference, out *audit.ObjectReference, s conversion.Scope) error { + out.Resource = in.Resource + out.Namespace = in.Namespace + out.Name = in.Name + out.UID = types.UID(in.UID) + out.APIGroup = in.APIGroup + out.APIVersion = in.APIVersion + out.ResourceVersion = in.ResourceVersion + out.Subresource = in.Subresource + return nil +} + +// Convert_v1beta1_ObjectReference_To_audit_ObjectReference is an autogenerated conversion function. +func Convert_v1beta1_ObjectReference_To_audit_ObjectReference(in *ObjectReference, out *audit.ObjectReference, s conversion.Scope) error { + return autoConvert_v1beta1_ObjectReference_To_audit_ObjectReference(in, out, s) +} + +func autoConvert_audit_ObjectReference_To_v1beta1_ObjectReference(in *audit.ObjectReference, out *ObjectReference, s conversion.Scope) error { + out.Resource = in.Resource + out.Namespace = in.Namespace + out.Name = in.Name + out.UID = types.UID(in.UID) + out.APIGroup = in.APIGroup + out.APIVersion = in.APIVersion + out.ResourceVersion = in.ResourceVersion + out.Subresource = in.Subresource + return nil +} + +// Convert_audit_ObjectReference_To_v1beta1_ObjectReference is an autogenerated conversion function. +func Convert_audit_ObjectReference_To_v1beta1_ObjectReference(in *audit.ObjectReference, out *ObjectReference, s conversion.Scope) error { + return autoConvert_audit_ObjectReference_To_v1beta1_ObjectReference(in, out, s) +} + +func autoConvert_v1beta1_Policy_To_audit_Policy(in *Policy, out *audit.Policy, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Rules = *(*[]audit.PolicyRule)(unsafe.Pointer(&in.Rules)) + out.OmitStages = *(*[]audit.Stage)(unsafe.Pointer(&in.OmitStages)) + out.OmitManagedFields = in.OmitManagedFields + return nil +} + +// Convert_v1beta1_Policy_To_audit_Policy is an autogenerated conversion function. +func Convert_v1beta1_Policy_To_audit_Policy(in *Policy, out *audit.Policy, s conversion.Scope) error { + return autoConvert_v1beta1_Policy_To_audit_Policy(in, out, s) +} + +func autoConvert_audit_Policy_To_v1beta1_Policy(in *audit.Policy, out *Policy, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Rules = *(*[]PolicyRule)(unsafe.Pointer(&in.Rules)) + out.OmitStages = *(*[]Stage)(unsafe.Pointer(&in.OmitStages)) + out.OmitManagedFields = in.OmitManagedFields + return nil +} + +// Convert_audit_Policy_To_v1beta1_Policy is an autogenerated conversion function. +func Convert_audit_Policy_To_v1beta1_Policy(in *audit.Policy, out *Policy, s conversion.Scope) error { + return autoConvert_audit_Policy_To_v1beta1_Policy(in, out, s) +} + +func autoConvert_v1beta1_PolicyList_To_audit_PolicyList(in *PolicyList, out *audit.PolicyList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]audit.Policy)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1beta1_PolicyList_To_audit_PolicyList is an autogenerated conversion function. +func Convert_v1beta1_PolicyList_To_audit_PolicyList(in *PolicyList, out *audit.PolicyList, s conversion.Scope) error { + return autoConvert_v1beta1_PolicyList_To_audit_PolicyList(in, out, s) +} + +func autoConvert_audit_PolicyList_To_v1beta1_PolicyList(in *audit.PolicyList, out *PolicyList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]Policy)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_audit_PolicyList_To_v1beta1_PolicyList is an autogenerated conversion function. +func Convert_audit_PolicyList_To_v1beta1_PolicyList(in *audit.PolicyList, out *PolicyList, s conversion.Scope) error { + return autoConvert_audit_PolicyList_To_v1beta1_PolicyList(in, out, s) +} + +func autoConvert_v1beta1_PolicyRule_To_audit_PolicyRule(in *PolicyRule, out *audit.PolicyRule, s conversion.Scope) error { + out.Level = audit.Level(in.Level) + out.Users = *(*[]string)(unsafe.Pointer(&in.Users)) + out.UserGroups = *(*[]string)(unsafe.Pointer(&in.UserGroups)) + out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs)) + out.Resources = *(*[]audit.GroupResources)(unsafe.Pointer(&in.Resources)) + out.Namespaces = *(*[]string)(unsafe.Pointer(&in.Namespaces)) + out.NonResourceURLs = *(*[]string)(unsafe.Pointer(&in.NonResourceURLs)) + out.OmitStages = *(*[]audit.Stage)(unsafe.Pointer(&in.OmitStages)) + out.OmitManagedFields = (*bool)(unsafe.Pointer(in.OmitManagedFields)) + return nil +} + +// Convert_v1beta1_PolicyRule_To_audit_PolicyRule is an autogenerated conversion function. +func Convert_v1beta1_PolicyRule_To_audit_PolicyRule(in *PolicyRule, out *audit.PolicyRule, s conversion.Scope) error { + return autoConvert_v1beta1_PolicyRule_To_audit_PolicyRule(in, out, s) +} + +func autoConvert_audit_PolicyRule_To_v1beta1_PolicyRule(in *audit.PolicyRule, out *PolicyRule, s conversion.Scope) error { + out.Level = Level(in.Level) + out.Users = *(*[]string)(unsafe.Pointer(&in.Users)) + out.UserGroups = *(*[]string)(unsafe.Pointer(&in.UserGroups)) + out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs)) + out.Resources = *(*[]GroupResources)(unsafe.Pointer(&in.Resources)) + out.Namespaces = *(*[]string)(unsafe.Pointer(&in.Namespaces)) + out.NonResourceURLs = *(*[]string)(unsafe.Pointer(&in.NonResourceURLs)) + out.OmitStages = *(*[]Stage)(unsafe.Pointer(&in.OmitStages)) + out.OmitManagedFields = (*bool)(unsafe.Pointer(in.OmitManagedFields)) + return nil +} + +// Convert_audit_PolicyRule_To_v1beta1_PolicyRule is an autogenerated conversion function. +func Convert_audit_PolicyRule_To_v1beta1_PolicyRule(in *audit.PolicyRule, out *PolicyRule, s conversion.Scope) error { + return autoConvert_audit_PolicyRule_To_v1beta1_PolicyRule(in, out, s) +} diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/zz_generated.deepcopy.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/zz_generated.deepcopy.go new file mode 100644 index 000000000000..ee7f8b90eadb --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/zz_generated.deepcopy.go @@ -0,0 +1,299 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1 "k8s.io/api/authentication/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Event) DeepCopyInto(out *Event) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Timestamp.DeepCopyInto(&out.Timestamp) + in.User.DeepCopyInto(&out.User) + if in.ImpersonatedUser != nil { + in, out := &in.ImpersonatedUser, &out.ImpersonatedUser + *out = new(v1.UserInfo) + (*in).DeepCopyInto(*out) + } + if in.SourceIPs != nil { + in, out := &in.SourceIPs, &out.SourceIPs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ObjectRef != nil { + in, out := &in.ObjectRef, &out.ObjectRef + *out = new(ObjectReference) + **out = **in + } + if in.ResponseStatus != nil { + in, out := &in.ResponseStatus, &out.ResponseStatus + *out = new(metav1.Status) + (*in).DeepCopyInto(*out) + } + if in.RequestObject != nil { + in, out := &in.RequestObject, &out.RequestObject + *out = new(runtime.Unknown) + (*in).DeepCopyInto(*out) + } + if in.ResponseObject != nil { + in, out := &in.ResponseObject, &out.ResponseObject + *out = new(runtime.Unknown) + (*in).DeepCopyInto(*out) + } + in.RequestReceivedTimestamp.DeepCopyInto(&out.RequestReceivedTimestamp) + in.StageTimestamp.DeepCopyInto(&out.StageTimestamp) + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Event. +func (in *Event) DeepCopy() *Event { + if in == nil { + return nil + } + out := new(Event) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Event) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EventList) DeepCopyInto(out *EventList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Event, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventList. +func (in *EventList) DeepCopy() *EventList { + if in == nil { + return nil + } + out := new(EventList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *EventList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GroupResources) DeepCopyInto(out *GroupResources) { + *out = *in + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ResourceNames != nil { + in, out := &in.ResourceNames, &out.ResourceNames + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupResources. +func (in *GroupResources) DeepCopy() *GroupResources { + if in == nil { + return nil + } + out := new(GroupResources) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ObjectReference) DeepCopyInto(out *ObjectReference) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectReference. +func (in *ObjectReference) DeepCopy() *ObjectReference { + if in == nil { + return nil + } + out := new(ObjectReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Policy) DeepCopyInto(out *Policy) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]PolicyRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.OmitStages != nil { + in, out := &in.OmitStages, &out.OmitStages + *out = make([]Stage, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Policy. +func (in *Policy) DeepCopy() *Policy { + if in == nil { + return nil + } + out := new(Policy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Policy) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PolicyList) DeepCopyInto(out *PolicyList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Policy, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyList. +func (in *PolicyList) DeepCopy() *PolicyList { + if in == nil { + return nil + } + out := new(PolicyList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PolicyList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PolicyRule) DeepCopyInto(out *PolicyRule) { + *out = *in + if in.Users != nil { + in, out := &in.Users, &out.Users + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.UserGroups != nil { + in, out := &in.UserGroups, &out.UserGroups + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Verbs != nil { + in, out := &in.Verbs, &out.Verbs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]GroupResources, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Namespaces != nil { + in, out := &in.Namespaces, &out.Namespaces + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.NonResourceURLs != nil { + in, out := &in.NonResourceURLs, &out.NonResourceURLs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.OmitStages != nil { + in, out := &in.OmitStages, &out.OmitStages + *out = make([]Stage, len(*in)) + copy(*out, *in) + } + if in.OmitManagedFields != nil { + in, out := &in.OmitManagedFields, &out.OmitManagedFields + *out = new(bool) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyRule. +func (in *PolicyRule) DeepCopy() *PolicyRule { + if in == nil { + return nil + } + out := new(PolicyRule) + in.DeepCopyInto(out) + return out +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubelet/pkg/apis/credentialprovider/v1beta1/zz_generated.defaults.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/zz_generated.defaults.go similarity index 100% rename from cluster-autoscaler/vendor/k8s.io/kubelet/pkg/apis/credentialprovider/v1beta1/zz_generated.defaults.go rename to cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/zz_generated.defaults.go diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/zz_generated.prerelease-lifecycle.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/zz_generated.prerelease-lifecycle.go new file mode 100644 index 000000000000..0a0dc6669f35 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1/zz_generated.prerelease-lifecycle.go @@ -0,0 +1,122 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. + +package v1beta1 + +import ( + schema "k8s.io/apimachinery/pkg/runtime/schema" +) + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *Event) APILifecycleIntroduced() (major, minor int) { + return 1, 8 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *Event) APILifecycleDeprecated() (major, minor int) { + return 1, 21 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *Event) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "audit.k8s.io", Version: "v1", Kind: "Event"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *Event) APILifecycleRemoved() (major, minor int) { + return 1, 24 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *EventList) APILifecycleIntroduced() (major, minor int) { + return 1, 8 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *EventList) APILifecycleDeprecated() (major, minor int) { + return 1, 21 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *EventList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "audit.k8s.io", Version: "v1", Kind: "EventList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *EventList) APILifecycleRemoved() (major, minor int) { + return 1, 24 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *Policy) APILifecycleIntroduced() (major, minor int) { + return 1, 8 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *Policy) APILifecycleDeprecated() (major, minor int) { + return 1, 21 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *Policy) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "audit.k8s.io", Version: "v1", Kind: "Policy"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *Policy) APILifecycleRemoved() (major, minor int) { + return 1, 24 +} + +// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. +func (in *PolicyList) APILifecycleIntroduced() (major, minor int) { + return 1, 8 +} + +// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. +func (in *PolicyList) APILifecycleDeprecated() (major, minor int) { + return 1, 21 +} + +// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. +// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. +func (in *PolicyList) APILifecycleReplacement() schema.GroupVersionKind { + return schema.GroupVersionKind{Group: "audit.k8s.io", Version: "v1", Kind: "PolicyList"} +} + +// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. +// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. +func (in *PolicyList) APILifecycleRemoved() (major, minor int) { + return 1, 24 +} diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/flowcontrol/bootstrap/default.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/flowcontrol/bootstrap/default.go index 3644a04490af..8ae15a0ec7da 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/flowcontrol/bootstrap/default.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/apis/flowcontrol/bootstrap/default.go @@ -73,7 +73,6 @@ var ( SuggestedFlowSchemaProbes, // references "exempt" priority-level SuggestedFlowSchemaSystemLeaderElection, // references "leader-election" priority-level SuggestedFlowSchemaWorkloadLeaderElection, // references "leader-election" priority-level - SuggestedFlowSchemaEndpointsController, // references "workload-high" priority-level SuggestedFlowSchemaKubeControllerManager, // references "workload-high" priority-level SuggestedFlowSchemaKubeScheduler, // references "workload-high" priority-level SuggestedFlowSchemaKubeSystemServiceAccounts, // references "workload-high" priority-level @@ -264,33 +263,40 @@ var ( }) ) -// Suggested FlowSchema objects. -// Ordered by matching precedence, so that their interactions are easier -// to follow while reading this source. +// Suggested FlowSchema objects var ( - // the following flow schema exempts probes - SuggestedFlowSchemaProbes = newFlowSchema( - "probes", "exempt", 2, - "", // distinguisherMethodType + SuggestedFlowSchemaSystemNodes = newFlowSchema( + "system-nodes", "system", 500, + flowcontrol.FlowDistinguisherMethodByUserType, flowcontrol.PolicyRulesWithSubjects{ - Subjects: groups(user.AllUnauthenticated, user.AllAuthenticated), + Subjects: groups(user.NodesGroup), // the nodes group + ResourceRules: []flowcontrol.ResourcePolicyRule{resourceRule( + []string{flowcontrol.VerbAll}, + []string{flowcontrol.APIGroupAll}, + []string{flowcontrol.ResourceAll}, + []string{flowcontrol.NamespaceEvery}, + true)}, NonResourceRules: []flowcontrol.NonResourcePolicyRule{ nonResourceRule( - []string{"get"}, - []string{"/healthz", "/readyz", "/livez"}), + []string{flowcontrol.VerbAll}, + []string{flowcontrol.NonResourceAll}), }, }, ) - SuggestedFlowSchemaSystemLeaderElection = newFlowSchema( - "system-leader-election", "leader-election", 100, + SuggestedFlowSchemaSystemNodeHigh = newFlowSchema( + "system-node-high", "node-high", 400, flowcontrol.FlowDistinguisherMethodByUserType, flowcontrol.PolicyRulesWithSubjects{ - Subjects: append( - users(user.KubeControllerManager, user.KubeScheduler), - kubeSystemServiceAccount(flowcontrol.NameAll)...), + Subjects: groups(user.NodesGroup), // the nodes group ResourceRules: []flowcontrol.ResourcePolicyRule{ resourceRule( - []string{"get", "create", "update"}, + []string{flowcontrol.VerbAll}, + []string{corev1.GroupName}, + []string{"nodes", "nodes/status"}, + []string{flowcontrol.NamespaceEvery}, + true), + resourceRule( + []string{flowcontrol.VerbAll}, []string{coordinationv1.GroupName}, []string{"leases"}, []string{flowcontrol.NamespaceEvery}, @@ -298,31 +304,29 @@ var ( }, }, ) - // We add an explicit rule for endpoint-controller with high precedence - // to ensure that those calls won't get caught by the following - // flow-schema. - // - // TODO(#80289): Get rid of this rule once we get rid of support for - // using endpoints and configmaps objects for leader election. - SuggestedFlowSchemaEndpointsController = newFlowSchema( - "endpoint-controller", "workload-high", 150, + SuggestedFlowSchemaSystemLeaderElection = newFlowSchema( + "system-leader-election", "leader-election", 100, flowcontrol.FlowDistinguisherMethodByUserType, flowcontrol.PolicyRulesWithSubjects{ Subjects: append( - users(user.KubeControllerManager), - kubeSystemServiceAccount("endpoint-controller", "endpointslicemirroring-controller")...), + users(user.KubeControllerManager, user.KubeScheduler), + kubeSystemServiceAccount(flowcontrol.NameAll)...), ResourceRules: []flowcontrol.ResourcePolicyRule{ resourceRule( []string{"get", "create", "update"}, []string{corev1.GroupName}, - []string{"endpoints"}, + []string{"endpoints", "configmaps"}, + []string{"kube-system"}, + false), + resourceRule( + []string{"get", "create", "update"}, + []string{coordinationv1.GroupName}, + []string{"leases"}, []string{flowcontrol.NamespaceEvery}, false), }, }, ) - // TODO(#80289): Get rid of this rule once we get rid of support for - // using endpoints and configmaps objects for leader election. SuggestedFlowSchemaWorkloadLeaderElection = newFlowSchema( "workload-leader-election", "leader-election", 200, flowcontrol.FlowDistinguisherMethodByUserType, @@ -344,45 +348,6 @@ var ( }, }, ) - SuggestedFlowSchemaSystemNodeHigh = newFlowSchema( - "system-node-high", "node-high", 400, - flowcontrol.FlowDistinguisherMethodByUserType, - flowcontrol.PolicyRulesWithSubjects{ - Subjects: groups(user.NodesGroup), // the nodes group - ResourceRules: []flowcontrol.ResourcePolicyRule{ - resourceRule( - []string{flowcontrol.VerbAll}, - []string{corev1.GroupName}, - []string{"nodes", "nodes/status"}, - []string{flowcontrol.NamespaceEvery}, - true), - resourceRule( - []string{flowcontrol.VerbAll}, - []string{coordinationv1.GroupName}, - []string{"leases"}, - []string{flowcontrol.NamespaceEvery}, - false), - }, - }, - ) - SuggestedFlowSchemaSystemNodes = newFlowSchema( - "system-nodes", "system", 500, - flowcontrol.FlowDistinguisherMethodByUserType, - flowcontrol.PolicyRulesWithSubjects{ - Subjects: groups(user.NodesGroup), // the nodes group - ResourceRules: []flowcontrol.ResourcePolicyRule{resourceRule( - []string{flowcontrol.VerbAll}, - []string{flowcontrol.APIGroupAll}, - []string{flowcontrol.ResourceAll}, - []string{flowcontrol.NamespaceEvery}, - true)}, - NonResourceRules: []flowcontrol.NonResourcePolicyRule{ - nonResourceRule( - []string{flowcontrol.VerbAll}, - []string{flowcontrol.NonResourceAll}), - }, - }, - ) SuggestedFlowSchemaKubeControllerManager = newFlowSchema( "kube-controller-manager", "workload-high", 800, flowcontrol.FlowDistinguisherMethodByNamespaceType, @@ -473,6 +438,19 @@ var ( }, }, ) + // the following flow schema exempts probes + SuggestedFlowSchemaProbes = newFlowSchema( + "probes", "exempt", 2, + "", // distinguisherMethodType + flowcontrol.PolicyRulesWithSubjects{ + Subjects: groups(user.AllUnauthenticated, user.AllAuthenticated), + NonResourceRules: []flowcontrol.NonResourcePolicyRule{ + nonResourceRule( + []string{"get"}, + []string{"/healthz", "/readyz", "/livez"}), + }, + }, + ) ) func newPriorityLevelConfiguration(name string, spec flowcontrol.PriorityLevelConfigurationSpec) *flowcontrol.PriorityLevelConfiguration { diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/audit/OWNERS b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/audit/OWNERS index 60f38f133f15..c3486ad5ded0 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/audit/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/audit/OWNERS @@ -1,8 +1,9 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - sig-auth-audit-approvers +- sig-auth-audit-approvers reviewers: - - sig-auth-audit-reviewers +- sig-auth-audit-reviewers labels: - - sig/auth +- sig/auth + diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/audit/context.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/audit/context.go index df429af37d57..eada7add9a84 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/audit/context.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/audit/context.go @@ -18,11 +18,9 @@ package audit import ( "context" - "sync" auditinternal "k8s.io/apiserver/pkg/apis/audit" genericapirequest "k8s.io/apiserver/pkg/endpoints/request" - "k8s.io/klog/v2" ) // The key type is unexported to prevent collisions @@ -30,15 +28,15 @@ type key int const ( // auditAnnotationsKey is the context key for the audit annotations. - // TODO: consolidate all audit info under the AuditContext, rather than storing 3 separate keys. + // TODO: it's wasteful to store the audit annotations under a separate key, we + // copy the request context twice for audit purposes. We should move the audit + // annotations under AuditContext so we can get rid of the additional request + // context copy. auditAnnotationsKey key = iota // auditKey is the context key for storing the audit event that is being // captured and the evaluated policy that applies to the given request. auditKey - - // auditAnnotationsMutexKey is the context key for the audit annotations mutex. - auditAnnotationsMutexKey ) // annotations = *[]annotation instead of a map to preserve order of insertions @@ -56,7 +54,6 @@ func WithAuditAnnotations(parent context.Context) context.Context { if _, ok := parent.Value(auditAnnotationsKey).(*[]annotation); ok { return parent } - parent = withAuditAnnotationsMutex(parent) var annotations []annotation // avoid allocations until we actually need it return genericapirequest.WithValue(parent, auditAnnotationsKey, &annotations) @@ -70,126 +67,35 @@ func WithAuditAnnotations(parent context.Context) context.Context { // Handlers that are unaware of their position in the overall request flow should // prefer AddAuditAnnotation over LogAnnotation to avoid dropping annotations. func AddAuditAnnotation(ctx context.Context, key, value string) { - mutex, ok := auditAnnotationsMutex(ctx) - if !ok { - // auditing is not enabled - return - } - - mutex.Lock() - defer mutex.Unlock() - - ae := AuditEventFrom(ctx) - var ctxAnnotations *[]annotation - if ae == nil { - ctxAnnotations, _ = ctx.Value(auditAnnotationsKey).(*[]annotation) - } - - addAuditAnnotationLocked(ae, ctxAnnotations, key, value) -} - -// AddAuditAnnotations is a bulk version of AddAuditAnnotation. Refer to AddAuditAnnotation for -// restrictions on when this can be called. -// keysAndValues are the key-value pairs to add, and must have an even number of items. -func AddAuditAnnotations(ctx context.Context, keysAndValues ...string) { - mutex, ok := auditAnnotationsMutex(ctx) - if !ok { - // auditing is not enabled + // use the audit event directly if we have it + if ae := AuditEventFrom(ctx); ae != nil { + LogAnnotation(ae, key, value) return } - mutex.Lock() - defer mutex.Unlock() - - ae := AuditEventFrom(ctx) - var ctxAnnotations *[]annotation - if ae == nil { - ctxAnnotations, _ = ctx.Value(auditAnnotationsKey).(*[]annotation) - } - - if len(keysAndValues)%2 != 0 { - klog.Errorf("Dropping mismatched audit annotation %q", keysAndValues[len(keysAndValues)-1]) - } - for i := 0; i < len(keysAndValues); i += 2 { - addAuditAnnotationLocked(ae, ctxAnnotations, keysAndValues[i], keysAndValues[i+1]) - } -} - -// AddAuditAnnotationsMap is a bulk version of AddAuditAnnotation. Refer to AddAuditAnnotation for -// restrictions on when this can be called. -func AddAuditAnnotationsMap(ctx context.Context, annotations map[string]string) { - mutex, ok := auditAnnotationsMutex(ctx) + annotations, ok := ctx.Value(auditAnnotationsKey).(*[]annotation) if !ok { - // auditing is not enabled - return - } - - mutex.Lock() - defer mutex.Unlock() - - ae := AuditEventFrom(ctx) - var ctxAnnotations *[]annotation - if ae == nil { - ctxAnnotations, _ = ctx.Value(auditAnnotationsKey).(*[]annotation) + return // adding audit annotation is not supported at this call site } - for k, v := range annotations { - addAuditAnnotationLocked(ae, ctxAnnotations, k, v) - } -} - -// addAuditAnnotationLocked is the shared code for recording an audit annotation. This method should -// only be called while the auditAnnotationsMutex is locked. -func addAuditAnnotationLocked(ae *auditinternal.Event, annotations *[]annotation, key, value string) { - if ae != nil { - logAnnotation(ae, key, value) - } else if annotations != nil { - *annotations = append(*annotations, annotation{key: key, value: value}) - } + *annotations = append(*annotations, annotation{key: key, value: value}) } // This is private to prevent reads/write to the slice from outside of this package. // The audit event should be directly read to get access to the annotations. -func addAuditAnnotationsFrom(ctx context.Context, ev *auditinternal.Event) { - mutex, ok := auditAnnotationsMutex(ctx) - if !ok { - // auditing is not enabled - return - } - - mutex.Lock() - defer mutex.Unlock() - +func auditAnnotationsFrom(ctx context.Context) []annotation { annotations, ok := ctx.Value(auditAnnotationsKey).(*[]annotation) if !ok { - return // no annotations to copy + return nil // adding audit annotation is not supported at this call site } - for _, kv := range *annotations { - logAnnotation(ev, kv.key, kv.value) - } -} - -// LogAnnotation fills in the Annotations according to the key value pair. -func logAnnotation(ae *auditinternal.Event, key, value string) { - if ae == nil || ae.Level.Less(auditinternal.LevelMetadata) { - return - } - if ae.Annotations == nil { - ae.Annotations = make(map[string]string) - } - if v, ok := ae.Annotations[key]; ok && v != value { - klog.Warningf("Failed to set annotations[%q] to %q for audit:%q, it has already been set to %q", key, value, ae.AuditID, ae.Annotations[key]) - return - } - ae.Annotations[key] = value + return *annotations } // WithAuditContext returns a new context that stores the pair of the audit // configuration object that applies to the given request and // the audit event that is going to be written to the API audit log. func WithAuditContext(parent context.Context, ev *AuditContext) context.Context { - parent = withAuditAnnotationsMutex(parent) return genericapirequest.WithValue(parent, auditKey, ev) } @@ -208,18 +114,3 @@ func AuditContextFrom(ctx context.Context) *AuditContext { ev, _ := ctx.Value(auditKey).(*AuditContext) return ev } - -// WithAuditAnnotationMutex adds a mutex for guarding context.AddAuditAnnotation. -func withAuditAnnotationsMutex(parent context.Context) context.Context { - if _, ok := parent.Value(auditAnnotationsMutexKey).(*sync.Mutex); ok { - return parent - } - var mutex sync.Mutex - return genericapirequest.WithValue(parent, auditAnnotationsMutexKey, &mutex) -} - -// AuditAnnotationsMutex returns the audit annotations mutex from the context. -func auditAnnotationsMutex(ctx context.Context) (*sync.Mutex, bool) { - mutex, ok := ctx.Value(auditAnnotationsMutexKey).(*sync.Mutex) - return mutex, ok -} diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/audit/policy/reader.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/audit/policy/reader.go index e4d5b10fb9b5..257375a76df8 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/audit/policy/reader.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/audit/policy/reader.go @@ -23,6 +23,8 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" auditinternal "k8s.io/apiserver/pkg/apis/audit" auditv1 "k8s.io/apiserver/pkg/apis/audit/v1" + auditv1alpha1 "k8s.io/apiserver/pkg/apis/audit/v1alpha1" + auditv1beta1 "k8s.io/apiserver/pkg/apis/audit/v1beta1" "k8s.io/apiserver/pkg/apis/audit/validation" "k8s.io/apiserver/pkg/audit" @@ -31,6 +33,8 @@ import ( var ( apiGroupVersions = []schema.GroupVersion{ + auditv1beta1.SchemeGroupVersion, + auditv1alpha1.SchemeGroupVersion, auditv1.SchemeGroupVersion, } apiGroupVersionSet = map[schema.GroupVersion]bool{} @@ -74,6 +78,10 @@ func LoadPolicyFromBytes(policyDef []byte) (*auditinternal.Policy, error) { return nil, fmt.Errorf("unknown group version field %v in policy", gvk) } + if gv != auditv1.SchemeGroupVersion { + klog.Warningf("%q is deprecated and will be removed in a future release, use %q instead", gv, auditv1.SchemeGroupVersion) + } + if err := validation.ValidatePolicy(policy); err != nil { return nil, err.ToAggregate() } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/audit/request.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/audit/request.go index 57a10e62b026..cdfd535f7e86 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/audit/request.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/audit/request.go @@ -87,7 +87,9 @@ func NewEventFromRequest(req *http.Request, requestReceivedTimestamp time.Time, } } - addAuditAnnotationsFrom(req.Context(), ev) + for _, kv := range auditAnnotationsFrom(req.Context()) { + LogAnnotation(ev, kv.key, kv.value) + } return ev, nil } @@ -194,11 +196,9 @@ func LogResponseObject(ctx context.Context, obj runtime.Object, gv schema.GroupV if status, ok := obj.(*metav1.Status); ok { // selectively copy the bounded fields. ae.ResponseStatus = &metav1.Status{ - Status: status.Status, - Message: status.Message, - Reason: status.Reason, - Details: status.Details, - Code: status.Code, + Status: status.Status, + Reason: status.Reason, + Code: status.Code, } } @@ -243,6 +243,21 @@ func encodeObject(obj runtime.Object, gv schema.GroupVersion, serializer runtime }, nil } +// LogAnnotation fills in the Annotations according to the key value pair. +func LogAnnotation(ae *auditinternal.Event, key, value string) { + if ae == nil || ae.Level.Less(auditinternal.LevelMetadata) { + return + } + if ae.Annotations == nil { + ae.Annotations = make(map[string]string) + } + if v, ok := ae.Annotations[key]; ok && v != value { + klog.Warningf("Failed to set annotations[%q] to %q for audit:%q, it has already been set to %q", key, value, ae.AuditID, ae.Annotations[key]) + return + } + ae.Annotations[key] = value +} + // truncate User-Agent if too long, otherwise return it directly. func maybeTruncateUserAgent(req *http.Request) string { ua := req.UserAgent() diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/audit/scheme.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/audit/scheme.go index 1ebbc64be4e1..031759ec75f8 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/audit/scheme.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/audit/scheme.go @@ -25,6 +25,8 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" auditinternal "k8s.io/apiserver/pkg/apis/audit" "k8s.io/apiserver/pkg/apis/audit/v1" + "k8s.io/apiserver/pkg/apis/audit/v1alpha1" + "k8s.io/apiserver/pkg/apis/audit/v1beta1" ) var Scheme = runtime.NewScheme() @@ -33,6 +35,8 @@ var Codecs = serializer.NewCodecFactory(Scheme) func init() { metav1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) utilruntime.Must(v1.AddToScheme(Scheme)) + utilruntime.Must(v1alpha1.AddToScheme(Scheme)) + utilruntime.Must(v1beta1.AddToScheme(Scheme)) utilruntime.Must(auditinternal.AddToScheme(Scheme)) - utilruntime.Must(Scheme.SetVersionPriority(v1.SchemeGroupVersion)) + utilruntime.Must(Scheme.SetVersionPriority(v1.SchemeGroupVersion, v1beta1.SchemeGroupVersion, v1alpha1.SchemeGroupVersion)) } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/authentication/request/headerrequest/requestheader_controller.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/authentication/request/headerrequest/requestheader_controller.go index d8c4090b12a5..561b6fba9ba2 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/authentication/request/headerrequest/requestheader_controller.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/authentication/request/headerrequest/requestheader_controller.go @@ -162,29 +162,29 @@ func (c *RequestHeaderAuthRequestController) AllowedClientNames() []string { } // Run starts RequestHeaderAuthRequestController controller and blocks until stopCh is closed. -func (c *RequestHeaderAuthRequestController) Run(ctx context.Context, workers int) { +func (c *RequestHeaderAuthRequestController) Run(workers int, stopCh <-chan struct{}) { defer utilruntime.HandleCrash() defer c.queue.ShutDown() klog.Infof("Starting %s", c.name) defer klog.Infof("Shutting down %s", c.name) - go c.configmapInformer.Run(ctx.Done()) + go c.configmapInformer.Run(stopCh) // wait for caches to fill before starting your work - if !cache.WaitForNamedCacheSync(c.name, ctx.Done(), c.configmapInformerSynced) { + if !cache.WaitForNamedCacheSync(c.name, stopCh, c.configmapInformerSynced) { return } // doesn't matter what workers say, only start one. - go wait.Until(c.runWorker, time.Second, ctx.Done()) + go wait.Until(c.runWorker, time.Second, stopCh) - <-ctx.Done() + <-stopCh } // // RunOnce runs a single sync loop -func (c *RequestHeaderAuthRequestController) RunOnce(ctx context.Context) error { - configMap, err := c.client.CoreV1().ConfigMaps(c.configmapNamespace).Get(ctx, c.configmapName, metav1.GetOptions{}) +func (c *RequestHeaderAuthRequestController) RunOnce() error { + configMap, err := c.client.CoreV1().ConfigMaps(c.configmapNamespace).Get(context.TODO(), c.configmapName, metav1.GetOptions{}) switch { case errors.IsNotFound(err): // ignore, authConfigMap is nil now diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/authentication/request/x509/OWNERS b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/authentication/request/x509/OWNERS index 3c3b94c58c3f..3cf03643835a 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/authentication/request/x509/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/authentication/request/x509/OWNERS @@ -1,8 +1,9 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - sig-auth-certificates-approvers +- sig-auth-certificates-approvers reviewers: - - sig-auth-certificates-reviewers +- sig-auth-certificates-reviewers labels: - - sig/auth +- sig/auth + diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/filters/OWNERS b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/filters/OWNERS index 3e4862a50ed1..05259ce35382 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/filters/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/filters/OWNERS @@ -1,6 +1,6 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - deads2k - - sttts - - soltysh +- deads2k +- sttts +- soltysh diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/filters/audit.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/filters/audit.go index b539072e6017..5a97c7d47f55 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/filters/audit.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/filters/audit.go @@ -154,33 +154,6 @@ func evaluatePolicyAndCreateAuditEvent(req *http.Request, policy audit.PolicyRul }, nil } -// writeLatencyToAnnotation writes the latency incurred in different -// layers of the apiserver to the annotations of the audit object. -// it should be invoked after ev.StageTimestamp has been set appropriately. -func writeLatencyToAnnotation(ctx context.Context, ev *auditinternal.Event) { - // we will track latency in annotation only when the total latency - // of the given request exceeds 500ms, this is in keeping with the - // traces in rest/handlers for create, delete, update, - // get, list, and deletecollection. - const threshold = 500 * time.Millisecond - latency := ev.StageTimestamp.Time.Sub(ev.RequestReceivedTimestamp.Time) - if latency <= threshold { - return - } - - // if we are tracking latency incurred inside different layers within - // the apiserver, add these as annotation to the audit event object. - layerLatencies := request.AuditAnnotationsFromLatencyTrackers(ctx) - if len(layerLatencies) == 0 { - // latency tracking is not enabled for this request - return - } - - // record the total latency for this request, for convenience. - layerLatencies["apiserver.latency.k8s.io/total"] = latency.String() - audit.AddAuditAnnotationsMap(ctx, layerLatencies) -} - func processAuditEvent(ctx context.Context, sink audit.Sink, ev *auditinternal.Event, omitStages []auditinternal.Stage) bool { for _, stage := range omitStages { if ev.Stage == stage { @@ -188,16 +161,11 @@ func processAuditEvent(ctx context.Context, sink audit.Sink, ev *auditinternal.E } } - switch { - case ev.Stage == auditinternal.StageRequestReceived: + if ev.Stage == auditinternal.StageRequestReceived { ev.StageTimestamp = metav1.NewMicroTime(ev.RequestReceivedTimestamp.Time) - case ev.Stage == auditinternal.StageResponseComplete: - ev.StageTimestamp = metav1.NewMicroTime(time.Now()) - writeLatencyToAnnotation(ctx, ev) - default: + } else { ev.StageTimestamp = metav1.NewMicroTime(time.Now()) } - audit.ObserveEvent(ctx) return sink.ProcessEvents(ev) } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/filters/authorization.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/filters/authorization.go index fba588283901..395d9332a1fb 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/filters/authorization.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/filters/authorization.go @@ -49,6 +49,7 @@ func WithAuthorization(handler http.Handler, a authorizer.Authorizer, s runtime. } return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { ctx := req.Context() + ae := audit.AuditEventFrom(ctx) attributes, err := GetAuthorizerAttributes(ctx) if err != nil { @@ -58,22 +59,20 @@ func WithAuthorization(handler http.Handler, a authorizer.Authorizer, s runtime. authorized, reason, err := a.Authorize(ctx, attributes) // an authorizer like RBAC could encounter evaluation errors and still allow the request, so authorizer decision is checked before error here. if authorized == authorizer.DecisionAllow { - audit.AddAuditAnnotations(ctx, - decisionAnnotationKey, decisionAllow, - reasonAnnotationKey, reason) + audit.LogAnnotation(ae, decisionAnnotationKey, decisionAllow) + audit.LogAnnotation(ae, reasonAnnotationKey, reason) handler.ServeHTTP(w, req) return } if err != nil { - audit.AddAuditAnnotation(ctx, reasonAnnotationKey, reasonError) + audit.LogAnnotation(ae, reasonAnnotationKey, reasonError) responsewriters.InternalError(w, req, err) return } klog.V(4).InfoS("Forbidden", "URI", req.RequestURI, "Reason", reason) - audit.AddAuditAnnotations(ctx, - decisionAnnotationKey, decisionForbid, - reasonAnnotationKey, reason) + audit.LogAnnotation(ae, decisionAnnotationKey, decisionForbid) + audit.LogAnnotation(ae, reasonAnnotationKey, reason) responsewriters.Forbidden(ctx, attributes, w, req, reason, s) }) } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/filters/webhook_duration.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/filters/webhook_duration.go index 8ac47422a4ee..e81b340eba71 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/filters/webhook_duration.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/filters/webhook_duration.go @@ -17,64 +17,17 @@ limitations under the License. package filters import ( - "context" - "fmt" "net/http" - "time" - "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apiserver/pkg/endpoints/request" - "k8s.io/apiserver/pkg/endpoints/responsewriter" ) -var ( - watchVerbs = sets.NewString("watch") -) - -// WithLatencyTrackers adds a LatencyTrackers instance to the -// context associated with a request so that we can measure latency -// incurred in various components within the apiserver. -func WithLatencyTrackers(handler http.Handler) http.Handler { +// WithWebhookDuration adds WebhookDuration trackers to the +// context associated with a request. +func WithWebhookDuration(handler http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { ctx := req.Context() - requestInfo, ok := request.RequestInfoFrom(ctx) - if !ok { - handleError(w, req, http.StatusInternalServerError, fmt.Errorf("no RequestInfo found in context, handler chain must be wrong")) - return - } - - if watchVerbs.Has(requestInfo.Verb) { - handler.ServeHTTP(w, req) - return - } - - req = req.WithContext(request.WithLatencyTrackers(ctx)) - w = responsewriter.WrapForHTTP1Or2(&writeLatencyTracker{ - ResponseWriter: w, - ctx: req.Context(), - }) - + req = req.WithContext(request.WithWebhookDuration(ctx)) handler.ServeHTTP(w, req) }) } - -var _ http.ResponseWriter = &writeLatencyTracker{} -var _ responsewriter.UserProvidedDecorator = &writeLatencyTracker{} - -type writeLatencyTracker struct { - http.ResponseWriter - ctx context.Context -} - -func (wt *writeLatencyTracker) Unwrap() http.ResponseWriter { - return wt.ResponseWriter -} - -func (wt *writeLatencyTracker) Write(bs []byte) (int, error) { - startedAt := time.Now() - defer func() { - request.TrackResponseWriteLatency(wt.ctx, time.Since(startedAt)) - }() - - return wt.ResponseWriter.Write(bs) -} diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/groupversion.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/groupversion.go index 94b1788ef220..a6f17e84acb7 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/groupversion.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/groupversion.go @@ -79,7 +79,7 @@ type APIGroupVersion struct { Convertor runtime.ObjectConvertor ConvertabilityChecker ConvertabilityChecker Defaulter runtime.ObjectDefaulter - Namer runtime.Namer + Linker runtime.SelfLinker UnsafeConvertor runtime.ObjectConvertor TypeConverter fieldmanager.TypeConverter diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/create.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/create.go index 19ca0dae9f5f..21f0b0273152 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/create.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/create.go @@ -47,7 +47,7 @@ import ( utiltrace "k8s.io/utils/trace" ) -var namespaceGVR = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "namespaces"} +var namespaceGVK = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Namespace"} func createHandler(r rest.NamedCreater, scope *RequestScope, admit admission.Interface, includeName bool) http.HandlerFunc { return func(w http.ResponseWriter, req *http.Request) { @@ -152,25 +152,17 @@ func createHandler(r rest.NamedCreater, scope *RequestScope, admit admission.Int if len(name) == 0 { _, name, _ = scope.Namer.ObjectName(obj) } - if len(namespace) == 0 && scope.Resource == namespaceGVR { + if len(namespace) == 0 && *gvk == namespaceGVK { namespace = name } ctx = request.WithNamespace(ctx, namespace) - admit = admission.WithAudit(admit) + ae := audit.AuditEventFrom(ctx) + admit = admission.WithAudit(admit, ae) audit.LogRequestObject(req.Context(), obj, objGV, scope.Resource, scope.Subresource, scope.Serializer) userInfo, _ := request.UserFrom(ctx) - // if this object supports namespace info - if objectMeta, err := meta.Accessor(obj); err == nil { - // ensure namespace on the object is correct, or error if a conflicting namespace was set in the object - if err := rest.EnsureObjectNamespaceMatchesRequestNamespace(rest.ExpectedNamespaceForResource(namespace, scope.Resource), objectMeta); err != nil { - scope.err(err, w, req) - return - } - } - trace.Step("About to store object in database") admissionAttributes := admission.NewAttributesRecord(obj, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Create, options, dryrun.IsDryRun(options.DryRun), userInfo) requestFunc := func() (runtime.Object, error) { @@ -223,8 +215,6 @@ func createHandler(r rest.NamedCreater, scope *RequestScope, admit admission.Int status.Code = int32(code) } - trace.Step("About to write a response") - defer trace.Step("Writing http response done") transformResponseObject(ctx, scope, trace, req, w, code, outputMediaType, result) } } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/delete.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/delete.go index 99979fc14b53..05ccd3930876 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/delete.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/delete.go @@ -67,7 +67,8 @@ func DeleteResource(r rest.GracefulDeleter, allowsOptions bool, scope *RequestSc defer cancel() ctx = request.WithNamespace(ctx, namespace) - admit = admission.WithAudit(admit) + ae := audit.AuditEventFrom(ctx) + admit = admission.WithAudit(admit, ae) outputMediaType, _, err := negotiation.NegotiateOutputMediaType(req, scope.Serializer, scope) if err != nil { @@ -160,8 +161,6 @@ func DeleteResource(r rest.GracefulDeleter, allowsOptions bool, scope *RequestSc } } - trace.Step("About to write a response") - defer trace.Step("Writing http response done") transformResponseObject(ctx, scope, trace, req, w, status, outputMediaType, result) } } @@ -189,6 +188,7 @@ func DeleteCollection(r rest.CollectionDeleter, checkBody bool, scope *RequestSc defer cancel() ctx = request.WithNamespace(ctx, namespace) + ae := audit.AuditEventFrom(ctx) outputMediaType, _, err := negotiation.NegotiateOutputMediaType(req, scope.Serializer, scope) if err != nil { @@ -266,7 +266,7 @@ func DeleteCollection(r rest.CollectionDeleter, checkBody bool, scope *RequestSc } options.TypeMeta.SetGroupVersionKind(metav1.SchemeGroupVersion.WithKind("DeleteOptions")) - admit = admission.WithAudit(admit) + admit = admission.WithAudit(admit, ae) userInfo, _ := request.UserFrom(ctx) staticAdmissionAttrs := admission.NewAttributesRecord(nil, nil, scope.Kind, namespace, "", scope.Resource, scope.Subresource, admission.Delete, options, dryrun.IsDryRun(options.DryRun), userInfo) result, err := finisher.FinishRequest(ctx, func() (runtime.Object, error) { @@ -289,8 +289,6 @@ func DeleteCollection(r rest.CollectionDeleter, checkBody bool, scope *RequestSc } } - trace.Step("About to write a response") - defer trace.Step("Writing http response done") transformResponseObject(ctx, scope, trace, req, w, http.StatusOK, outputMediaType, result) } } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/OWNERS b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/OWNERS index 6fa55f81ce38..a7470137b87d 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/OWNERS @@ -1,6 +1,5 @@ approvers: - - apelisse +- jennybuckley +- apelisse reviewers: - - kwiesmueller -emeritus_approvers: - - jennybuckley +- kwiesmueller diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/get.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/get.go index c1aa8dd4aa22..6c09b4965356 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/get.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/get.go @@ -76,8 +76,8 @@ func getResourceHandler(scope *RequestScope, getter getterFunc) http.HandlerFunc } trace.Step("About to write a response") - defer trace.Step("Writing http response done") transformResponseObject(ctx, scope, trace, req, w, http.StatusOK, outputMediaType, result) + trace.Step("Transformed response object") } } @@ -281,7 +281,8 @@ func ListResource(r rest.Lister, rw rest.Watcher, scope *RequestScope, forceWatc return } trace.Step("Listing from storage done") - defer trace.Step("Writing http response done", utiltrace.Field{"count", meta.LenList(result)}) + transformResponseObject(ctx, scope, trace, req, w, http.StatusOK, outputMediaType, result) + trace.Step("Writing http response done", utiltrace.Field{"count", meta.LenList(result)}) } } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/namer.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/namer.go index a9fe8fe2189e..2eb0c174dc97 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/namer.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/namer.go @@ -19,6 +19,8 @@ package handlers import ( "fmt" "net/http" + "net/url" + "strings" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" @@ -36,16 +38,31 @@ type ScopeNamer interface { // ObjectName returns the namespace and name from an object if they exist, or an error if the object // does not support names. ObjectName(obj runtime.Object) (namespace, name string, err error) + // SetSelfLink sets the provided URL onto the object. The method should return nil if the object + // does not support selfLinks. + SetSelfLink(obj runtime.Object, url string) error + // GenerateLink creates an encoded URI for a given runtime object that represents the canonical path + // and query. + GenerateLink(requestInfo *request.RequestInfo, obj runtime.Object) (uri string, err error) + // GenerateListLink creates an encoded URI for a list that represents the canonical path and query. + GenerateListLink(req *http.Request) (uri string, err error) } type ContextBasedNaming struct { - Namer runtime.Namer + SelfLinker runtime.SelfLinker ClusterScoped bool + + SelfLinkPathPrefix string + SelfLinkPathSuffix string } // ContextBasedNaming implements ScopeNamer var _ ScopeNamer = ContextBasedNaming{} +func (n ContextBasedNaming) SetSelfLink(obj runtime.Object, url string) error { + return n.SelfLinker.SetSelfLink(obj, url) +} + func (n ContextBasedNaming) Namespace(req *http.Request) (namespace string, err error) { requestInfo, ok := request.RequestInfoFrom(req.Context()) if !ok { @@ -66,15 +83,64 @@ func (n ContextBasedNaming) Name(req *http.Request) (namespace, name string, err return requestInfo.Namespace, requestInfo.Name, nil } +// fastURLPathEncode encodes the provided path as a URL path +func fastURLPathEncode(path string) string { + for _, r := range []byte(path) { + switch { + case r >= '-' && r <= '9', r >= 'A' && r <= 'Z', r >= 'a' && r <= 'z': + // characters within this range do not require escaping + default: + var u url.URL + u.Path = path + return u.EscapedPath() + } + } + return path +} + +func (n ContextBasedNaming) GenerateLink(requestInfo *request.RequestInfo, obj runtime.Object) (uri string, err error) { + namespace, name, err := n.ObjectName(obj) + if err == errEmptyName && len(requestInfo.Name) > 0 { + name = requestInfo.Name + } else if err != nil { + return "", err + } + if len(namespace) == 0 && len(requestInfo.Namespace) > 0 { + namespace = requestInfo.Namespace + } + + if n.ClusterScoped { + return n.SelfLinkPathPrefix + url.QueryEscape(name) + n.SelfLinkPathSuffix, nil + } + + builder := strings.Builder{} + builder.Grow(len(n.SelfLinkPathPrefix) + len(namespace) + len(requestInfo.Resource) + len(name) + len(n.SelfLinkPathSuffix) + 8) + builder.WriteString(n.SelfLinkPathPrefix) + builder.WriteString(namespace) + builder.WriteByte('/') + builder.WriteString(requestInfo.Resource) + builder.WriteByte('/') + builder.WriteString(name) + builder.WriteString(n.SelfLinkPathSuffix) + return fastURLPathEncode(builder.String()), nil +} + +func (n ContextBasedNaming) GenerateListLink(req *http.Request) (uri string, err error) { + if len(req.URL.RawPath) > 0 { + return req.URL.RawPath, nil + } + return fastURLPathEncode(req.URL.Path), nil +} + func (n ContextBasedNaming) ObjectName(obj runtime.Object) (namespace, name string, err error) { - name, err = n.Namer.Name(obj) + name, err = n.SelfLinker.Name(obj) if err != nil { return "", "", err } if len(name) == 0 { return "", "", errEmptyName } - namespace, err = n.Namer.Namespace(obj) + namespace, err = n.SelfLinker.Namespace(obj) if err != nil { return "", "", err } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/patch.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/patch.go index 5a2af674cd8b..6803baaa6088 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/patch.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/patch.go @@ -124,7 +124,8 @@ func PatchResource(r rest.Patcher, scope *RequestScope, admit admission.Interfac } options.TypeMeta.SetGroupVersionKind(metav1.SchemeGroupVersion.WithKind("PatchOptions")) - admit = admission.WithAudit(admit) + ae := audit.AuditEventFrom(ctx) + admit = admission.WithAudit(admit, ae) audit.LogRequestPatch(req.Context(), patchBytes) trace.Step("Recorded the audit event") @@ -235,13 +236,16 @@ func PatchResource(r rest.Patcher, scope *RequestScope, admit admission.Interfac } trace.Step("Object stored in database") + if err := setObjectSelfLink(ctx, result, req, scope.Namer); err != nil { + scope.err(err, w, req) + return + } + trace.Step("Self-link added") + status := http.StatusOK if wasCreated { status = http.StatusCreated } - - trace.Step("About to write a response") - defer trace.Step("Writing http response done") transformResponseObject(ctx, scope, trace, req, w, status, outputMediaType, result) } } @@ -575,14 +579,6 @@ func (p *patcher) applyPatch(ctx context.Context, _, currentObject runtime.Objec return nil, errors.NewConflict(p.resource.GroupResource(), p.name, fmt.Errorf("uid mismatch: the provided object specified uid %s, and no existing object was found", accessor.GetUID())) } - // if this object supports namespace info - if objectMeta, err := meta.Accessor(objToUpdate); err == nil { - // ensure namespace on the object is correct, or error if a conflicting namespace was set in the object - if err := rest.EnsureObjectNamespaceMatchesRequestNamespace(rest.ExpectedNamespaceForResource(p.namespace, p.resource), objectMeta); err != nil { - return nil, err - } - } - if err := checkName(objToUpdate, p.name, p.namespace, p.namer); err != nil { return nil, err } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/response.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/response.go index f5f311020ee1..f9b38e07d378 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/response.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/response.go @@ -31,7 +31,6 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" "k8s.io/apiserver/pkg/endpoints/handlers/responsewriters" - endpointsrequest "k8s.io/apiserver/pkg/endpoints/request" utiltrace "k8s.io/utils/trace" ) @@ -60,14 +59,8 @@ func doTransformObject(ctx context.Context, obj runtime.Object, opts interface{} if _, ok := obj.(*metav1.Status); ok { return obj, nil } - - // ensure that for empty lists we don't return items. - // This is safe to modify without deep-copying the object, as - // List objects themselves are never cached. - if meta.IsListType(obj) && meta.LenList(obj) == 0 { - if err := meta.SetList(obj, []runtime.Object{}); err != nil { - return nil, err - } + if err := setObjectSelfLink(ctx, obj, req, scope.Namer); err != nil { + return nil, err } switch target := mediaType.Convert; { @@ -135,13 +128,7 @@ func transformResponseObject(ctx context.Context, scope *RequestScope, trace *ut scope.err(err, w, req) return } - - var obj runtime.Object - do := func() { - obj, err = transformObject(ctx, result, options, mediaType, scope, req) - } - endpointsrequest.TrackTransformResponseObjectLatency(ctx, do) - + obj, err := transformObject(ctx, result, options, mediaType, scope, req) if err != nil { scope.err(err, w, req) return @@ -257,9 +244,9 @@ func asPartialObjectMetadataList(result runtime.Object, groupVersion schema.Grou if err != nil { return nil, err } + list.SelfLink = li.GetSelfLink() list.ResourceVersion = li.GetResourceVersion() list.Continue = li.GetContinue() - list.RemainingItemCount = li.GetRemainingItemCount() return list, nil case groupVersion == metav1.SchemeGroupVersion: @@ -277,9 +264,9 @@ func asPartialObjectMetadataList(result runtime.Object, groupVersion schema.Grou if err != nil { return nil, err } + list.SelfLink = li.GetSelfLink() list.ResourceVersion = li.GetResourceVersion() list.Continue = li.GetContinue() - list.RemainingItemCount = li.GetRemainingItemCount() return list, nil default: diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/writers.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/writers.go index 87ab7b4dfe42..0e4b98b83975 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/writers.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/writers.go @@ -36,7 +36,6 @@ import ( "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" "k8s.io/apiserver/pkg/endpoints/metrics" "k8s.io/apiserver/pkg/endpoints/request" - endpointsrequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/registry/rest" utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/apiserver/pkg/util/flushwriter" @@ -272,9 +271,7 @@ func WriteObjectNegotiated(s runtime.NegotiatedSerializer, restrictions negotiat audit.LogResponseObject(req.Context(), object, gv, s) encoder := s.EncoderForVersion(serializer.Serializer, gv) - endpointsrequest.TrackSerializeResponseObjectLatency(req.Context(), func() { - SerializeObject(serializer.MediaType, encoder, w, req, statusCode, object) - }) + SerializeObject(serializer.MediaType, encoder, w, req, statusCode, object) } // ErrorNegotiated renders an error to the response. Returns the HTTP status code of the error. diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/rest.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/rest.go index e413661e7607..c5fd95e89491 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/rest.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/rest.go @@ -39,6 +39,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/apiserver/pkg/admission" + "k8s.io/apiserver/pkg/audit" "k8s.io/apiserver/pkg/authorization/authorizer" "k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager" "k8s.io/apiserver/pkg/endpoints/handlers/responsewriters" @@ -48,6 +49,7 @@ import ( "k8s.io/apiserver/pkg/registry/rest" utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/apiserver/pkg/warning" + "k8s.io/klog/v2" ) const ( @@ -190,7 +192,8 @@ func ConnectResource(connecter rest.Connecter, scope *RequestScope, admit admiss } ctx := req.Context() ctx = request.WithNamespace(ctx, namespace) - admit = admission.WithAudit(admit) + ae := audit.AuditEventFrom(ctx) + admit = admission.WithAudit(admit, ae) opts, subpath, subpathKey := connecter.NewConnectOptions() if err := getRequestOptions(req, scope, opts, subpath, subpathKey, isSubresource); err != nil { @@ -257,6 +260,18 @@ func transformDecodeError(typer runtime.ObjectTyper, baseErr error, into runtime return errors.NewBadRequest(fmt.Sprintf("the object provided is unrecognized (must be of type %s): %v (%s)", objGVK.Kind, baseErr, summary)) } +// setSelfLink sets the self link of an object (or the child items in a list) to the base URL of the request +// plus the path and query generated by the provided linkFunc +func setSelfLink(obj runtime.Object, requestInfo *request.RequestInfo, namer ScopeNamer) error { + // TODO: SelfLink generation should return a full URL? + uri, err := namer.GenerateLink(requestInfo, obj) + if err != nil { + return nil + } + + return namer.SetSelfLink(obj, uri) +} + func hasUID(obj runtime.Object) (bool, error) { if obj == nil { return false, nil @@ -354,6 +369,58 @@ func dedupOwnerReferencesAndAddWarning(obj runtime.Object, requestContext contex } } +// setObjectSelfLink sets the self link of an object as needed. +// TODO: remove the need for the namer LinkSetters by requiring objects implement either Object or List +// interfaces +func setObjectSelfLink(ctx context.Context, obj runtime.Object, req *http.Request, namer ScopeNamer) error { + if utilfeature.DefaultFeatureGate.Enabled(features.RemoveSelfLink) { + // Ensure that for empty lists we don't return items. + if meta.IsListType(obj) && meta.LenList(obj) == 0 { + if err := meta.SetList(obj, []runtime.Object{}); err != nil { + return err + } + } + return nil + } + + // We only generate list links on objects that implement ListInterface - historically we duck typed this + // check via reflection, but as we move away from reflection we require that you not only carry Items but + // ListMeta into order to be identified as a list. + if !meta.IsListType(obj) { + requestInfo, ok := request.RequestInfoFrom(ctx) + if !ok { + return fmt.Errorf("missing requestInfo") + } + return setSelfLink(obj, requestInfo, namer) + } + + uri, err := namer.GenerateListLink(req) + if err != nil { + return err + } + if err := namer.SetSelfLink(obj, uri); err != nil { + klog.V(4).InfoS("Unable to set self link on object", "error", err) + } + requestInfo, ok := request.RequestInfoFrom(ctx) + if !ok { + return fmt.Errorf("missing requestInfo") + } + + count := 0 + err = meta.EachListItem(obj, func(obj runtime.Object) error { + count++ + return setSelfLink(obj, requestInfo, namer) + }) + + if count == 0 { + if err := meta.SetList(obj, []runtime.Object{}); err != nil { + return err + } + } + + return err +} + func summarizeData(data []byte, maxLength int) string { switch { case len(data) == 0: diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/update.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/update.go index 36f3d31ea235..96eda0b9c82c 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/update.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/update.go @@ -135,17 +135,9 @@ func UpdateResource(r rest.Updater, scope *RequestScope, admit admission.Interfa } trace.Step("Conversion done") + ae := audit.AuditEventFrom(ctx) audit.LogRequestObject(req.Context(), obj, objGV, scope.Resource, scope.Subresource, scope.Serializer) - admit = admission.WithAudit(admit) - - // if this object supports namespace info - if objectMeta, err := meta.Accessor(obj); err == nil { - // ensure namespace on the object is correct, or error if a conflicting namespace was set in the object - if err := rest.EnsureObjectNamespaceMatchesRequestNamespace(rest.ExpectedNamespaceForResource(namespace, scope.Resource), objectMeta); err != nil { - scope.err(err, w, req) - return - } - } + admit = admission.WithAudit(admit, ae) if err := checkName(obj, name, namespace, scope.Namer); err != nil { scope.err(err, w, req) @@ -249,8 +241,6 @@ func UpdateResource(r rest.Updater, scope *RequestScope, admit admission.Interfa status = http.StatusCreated } - trace.Step("About to write a response") - defer trace.Step("Writing http response done") transformResponseObject(ctx, scope, trace, req, w, status, outputMediaType, result) } } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/watch.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/watch.go index c155b925f788..818d94ae4c88 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/watch.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/handlers/watch.go @@ -19,13 +19,10 @@ package handlers import ( "bytes" "fmt" - "io" "net/http" "reflect" "time" - "golang.org/x/net/websocket" - "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -35,6 +32,8 @@ import ( "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" "k8s.io/apiserver/pkg/endpoints/metrics" "k8s.io/apiserver/pkg/util/wsstream" + + "golang.org/x/net/websocket" ) // nothing will ever be sent down this channel @@ -188,17 +187,7 @@ func (s *WatchServer) ServeHTTP(w http.ResponseWriter, req *http.Request) { s.Scope.err(errors.NewBadRequest(err.Error()), w, req) return } - - var e streaming.Encoder - var memoryAllocator runtime.MemoryAllocator - - if encoder, supportsAllocator := s.Encoder.(runtime.EncoderWithAllocator); supportsAllocator { - memoryAllocator = runtime.AllocatorPool.Get().(*runtime.Allocator) - defer runtime.AllocatorPool.Put(memoryAllocator) - e = streaming.NewEncoderWithAllocator(framer, encoder, memoryAllocator) - } else { - e = streaming.NewEncoder(framer, s.Encoder) - } + e := streaming.NewEncoder(framer, s.Encoder) // ensure the connection times out timeoutCh, cleanup := s.TimeoutFactory.TimeoutCh() @@ -217,19 +206,6 @@ func (s *WatchServer) ServeHTTP(w http.ResponseWriter, req *http.Request) { ch := s.Watching.ResultChan() done := req.Context().Done() - embeddedEncodeFn := s.EmbeddedEncoder.Encode - if encoder, supportsAllocator := s.EmbeddedEncoder.(runtime.EncoderWithAllocator); supportsAllocator { - if memoryAllocator == nil { - // don't put the allocator inside the embeddedEncodeFn as that would allocate memory on every call. - // instead, we allocate the buffer for the entire watch session and release it when we close the connection. - memoryAllocator = runtime.AllocatorPool.Get().(*runtime.Allocator) - defer runtime.AllocatorPool.Put(memoryAllocator) - } - embeddedEncodeFn = func(obj runtime.Object, w io.Writer) error { - return encoder.EncodeWithAllocator(obj, w, memoryAllocator) - } - } - for { select { case <-done: @@ -244,7 +220,7 @@ func (s *WatchServer) ServeHTTP(w http.ResponseWriter, req *http.Request) { metrics.WatchEvents.WithContext(req.Context()).WithLabelValues(kind.Group, kind.Version, kind.Kind).Inc() obj := s.Fixup(event.Object) - if err := embeddedEncodeFn(obj, buf); err != nil { + if err := s.EmbeddedEncoder.Encode(obj, buf); err != nil { // unexpected error utilruntime.HandleError(fmt.Errorf("unable to encode watch object %T: %v", obj, err)) return diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/installer.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/installer.go index e4b2221fcdd8..13d703afb287 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/installer.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/installer.go @@ -19,6 +19,7 @@ package endpoints import ( "fmt" "net/http" + gpath "path" "reflect" "sort" "strings" @@ -427,8 +428,10 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag apiResource.Namespaced = false apiResource.Kind = resourceKind namer := handlers.ContextBasedNaming{ - Namer: a.group.Namer, - ClusterScoped: true, + SelfLinker: a.group.Linker, + ClusterScoped: true, + SelfLinkPathPrefix: gpath.Join(a.prefix, resource) + "/", + SelfLinkPathSuffix: suffix, } // Handler for standard REST verbs (GET, PUT, POST and DELETE). @@ -474,8 +477,10 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag apiResource.Namespaced = true apiResource.Kind = resourceKind namer := handlers.ContextBasedNaming{ - Namer: a.group.Namer, - ClusterScoped: false, + SelfLinker: a.group.Linker, + ClusterScoped: false, + SelfLinkPathPrefix: gpath.Join(a.prefix, namespaceParamName) + "/", + SelfLinkPathSuffix: itemPathSuffix, } actions = appendIf(actions, action{"LIST", resourcePath, resourceParams, namer, false}, isLister) diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/metrics/OWNERS b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/metrics/OWNERS index 43fbd5333641..9454593c8871 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/metrics/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/metrics/OWNERS @@ -1,6 +1,8 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - wojtek-t +- wojtek-t +- jimmidyson + approvers: - - logicalhan +- logicalhan diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go index 671fb02c5b45..7dd40a373c39 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go @@ -122,19 +122,6 @@ var ( }, []string{"verb", "group", "version", "resource", "subresource", "scope", "component"}, ) - fieldValidationRequestLatencies = compbasemetrics.NewHistogramVec( - &compbasemetrics.HistogramOpts{ - Name: "field_validation_request_duration_seconds", - Help: "Response latency distribution in seconds for each field validation value and whether field validation is enabled or not", - // This metric is supplementary to the requestLatencies metric. - // It measures request durations for the various field validation - // values. - Buckets: []float64{0.05, 0.1, 0.2, 0.4, 0.6, 0.8, 1.0, 1.25, 1.5, 2, 3, - 4, 5, 6, 8, 10, 15, 20, 30, 45, 60}, - StabilityLevel: compbasemetrics.ALPHA, - }, - []string{"field_validation", "enabled"}, - ) responseSizes = compbasemetrics.NewHistogramVec( &compbasemetrics.HistogramOpts{ Name: "apiserver_response_sizes", @@ -145,13 +132,12 @@ var ( }, []string{"verb", "group", "version", "resource", "subresource", "scope", "component"}, ) - // droppedRequests is a number of requests dropped with 'Try again later' response" - droppedRequests = compbasemetrics.NewCounterVec( + // DroppedRequests is a number of requests dropped with 'Try again later' response" + DroppedRequests = compbasemetrics.NewCounterVec( &compbasemetrics.CounterOpts{ - Name: "apiserver_dropped_requests_total", - Help: "Number of requests dropped with 'Try again later' response. Use apiserver_request_total and/or apiserver_request_terminations_total metrics instead.", - StabilityLevel: compbasemetrics.ALPHA, - DeprecatedVersion: "1.24.0", + Name: "apiserver_dropped_requests_total", + Help: "Number of requests dropped with 'Try again later' response", + StabilityLevel: compbasemetrics.ALPHA, }, []string{"request_kind"}, ) @@ -274,9 +260,8 @@ var ( longRunningRequestGauge, requestLatencies, requestSloLatencies, - fieldValidationRequestLatencies, responseSizes, - droppedRequests, + DroppedRequests, TLSHandshakeErrors, RegisteredWatchers, WatchEvents, @@ -418,33 +403,6 @@ func RecordRequestAbort(req *http.Request, requestInfo *request.RequestInfo) { requestAbortsTotal.WithContext(req.Context()).WithLabelValues(reportedVerb, group, version, resource, subresource, scope).Inc() } -// RecordDroppedRequest records that the request was rejected via http.TooManyRequests. -func RecordDroppedRequest(req *http.Request, requestInfo *request.RequestInfo, component string, isMutatingRequest bool) { - if requestInfo == nil { - requestInfo = &request.RequestInfo{Verb: req.Method, Path: req.URL.Path} - } - scope := CleanScope(requestInfo) - dryRun := cleanDryRun(req.URL) - - // We don't use verb from , as this may be propagated from - // InstrumentRouteFunc which is registered in installer.go with predefined - // list of verbs (different than those translated to RequestInfo). - // However, we need to tweak it e.g. to differentiate GET from LIST. - reportedVerb := cleanVerb(CanonicalVerb(strings.ToUpper(req.Method), scope), getVerbIfWatch(req), req) - - if requestInfo.IsResourceRequest { - requestCounter.WithContext(req.Context()).WithLabelValues(reportedVerb, dryRun, requestInfo.APIGroup, requestInfo.APIVersion, requestInfo.Resource, requestInfo.Subresource, scope, component, codeToString(http.StatusTooManyRequests)).Inc() - } else { - requestCounter.WithContext(req.Context()).WithLabelValues(reportedVerb, dryRun, "", "", "", requestInfo.Subresource, scope, component, codeToString(http.StatusTooManyRequests)).Inc() - } - - if isMutatingRequest { - droppedRequests.WithContext(req.Context()).WithLabelValues(MutatingKind).Inc() - } else { - droppedRequests.WithContext(req.Context()).WithLabelValues(ReadOnlyKind).Inc() - } -} - // RecordRequestTermination records that the request was terminated early as part of a resource // preservation or apiserver self-defense mechanism (e.g. timeouts, maxinflight throttling, // proxyHandler errors). RecordRequestTermination should only be called zero or one times @@ -524,12 +482,8 @@ func MonitorRequest(req *http.Request, verb, group, version, resource, subresour } } requestLatencies.WithContext(req.Context()).WithLabelValues(reportedVerb, dryRun, group, version, resource, subresource, scope, component).Observe(elapsedSeconds) - fieldValidation := cleanFieldValidation(req.URL) - fieldValidationEnabled := strconv.FormatBool(utilfeature.DefaultFeatureGate.Enabled(features.ServerSideFieldValidation)) - fieldValidationRequestLatencies.WithContext(req.Context()).WithLabelValues(fieldValidation, fieldValidationEnabled) - - if wd, ok := request.LatencyTrackersFrom(req.Context()); ok { - sloLatency := elapsedSeconds - (wd.MutatingWebhookTracker.GetLatency() + wd.ValidatingWebhookTracker.GetLatency()).Seconds() + if wd, ok := request.WebhookDurationFrom(req.Context()); ok { + sloLatency := elapsedSeconds - (wd.AdmitTracker.GetLatency() + wd.ValidateTracker.GetLatency()).Seconds() requestSloLatencies.WithContext(req.Context()).WithLabelValues(reportedVerb, group, version, resource, subresource, scope, component).Observe(sloLatency) } // We are only interested in response sizes of read requests. @@ -608,7 +562,7 @@ func CanonicalVerb(verb string, scope string) string { // LIST and APPLY from PATCH. func CleanVerb(verb string, request *http.Request) string { reportedVerb := verb - if suggestedVerb := getVerbIfWatch(request); suggestedVerb == "WATCH" { + if verb == "LIST" && checkIfWatch(request) { reportedVerb = "WATCH" } // normalize the legacy WATCHLIST to WATCH to ensure users aren't surprised by metrics @@ -639,19 +593,27 @@ func cleanVerb(verb, suggestedVerb string, request *http.Request) string { return OtherRequestMethod } -// getVerbIfWatch additionally ensures that GET or List would be transformed to WATCH +//getVerbIfWatch additionally ensures that GET or List would be transformed to WATCH func getVerbIfWatch(req *http.Request) string { if strings.ToUpper(req.Method) == "GET" || strings.ToUpper(req.Method) == "LIST" { - // see apimachinery/pkg/runtime/conversion.go Convert_Slice_string_To_bool - if values := req.URL.Query()["watch"]; len(values) > 0 { - if value := strings.ToLower(values[0]); value != "0" && value != "false" { - return "WATCH" - } + if checkIfWatch(req) { + return "WATCH" } } return "" } +//checkIfWatch check request is watch +func checkIfWatch(req *http.Request) bool { + // see apimachinery/pkg/runtime/conversion.go Convert_Slice_string_To_bool + if values := req.URL.Query()["watch"]; len(values) > 0 { + if value := strings.ToLower(values[0]); value != "0" && value != "false" { + return true + } + } + return false +} + func cleanDryRun(u *url.URL) string { // avoid allocating when we don't see dryRun in the query if !strings.Contains(u.RawQuery, "dryRun") { @@ -668,21 +630,6 @@ func cleanDryRun(u *url.URL) string { return strings.Join(utilsets.NewString(dryRun...).List(), ",") } -func cleanFieldValidation(u *url.URL) string { - // avoid allocating when we don't see dryRun in the query - if !strings.Contains(u.RawQuery, "fieldValidation") { - return "" - } - fieldValidation := u.Query()["fieldValidation"] - if len(fieldValidation) != 1 { - return "invalid" - } - if errs := validation.ValidateFieldValidation(nil, fieldValidation[0]); len(errs) > 0 { - return "invalid" - } - return fieldValidation[0] -} - var _ http.ResponseWriter = (*ResponseWriterDelegator)(nil) var _ responsewriter.UserProvidedDecorator = (*ResponseWriterDelegator)(nil) diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/request/OWNERS b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/request/OWNERS index 87c80edbbb1a..4da107c8c38e 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/request/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/request/OWNERS @@ -1,4 +1,4 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - sttts +- sttts diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/request/webhook_duration.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/request/webhook_duration.go index 120bc46bf8b6..209b33cdf117 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/request/webhook_duration.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/endpoints/request/webhook_duration.go @@ -35,20 +35,9 @@ func maxDuration(d1 time.Duration, d2 time.Duration) time.Duration { return d2 } -// DurationTracker is a simple interface for tracking functions duration, -// it is safe for concurrent use by multiple goroutines. +// DurationTracker is a simple interface for tracking functions duration type DurationTracker interface { - // Track measures time spent in the given function f and - // aggregates measured duration using aggregateFunction. - // if Track is invoked with f from multiple goroutines concurrently, - // then f must be safe to be invoked concurrently by multiple goroutines. - Track(f func()) - - // TrackDuration tracks latency from the specified duration - // and aggregate it using aggregateFunction - TrackDuration(time.Duration) - - // GetLatency returns the total latency incurred so far + Track(func()) GetLatency() time.Duration } @@ -75,14 +64,6 @@ func (t *durationTracker) Track(f func()) { f() } -// TrackDuration tracks latency from the given duration -// using aggregateFunction -func (t *durationTracker) TrackDuration(d time.Duration) { - t.mu.Lock() - defer t.mu.Unlock() - t.latency = t.aggregateFunction(t.latency, d) -} - // GetLatency returns aggregated latency tracked by a tracker func (t *durationTracker) GetLatency() time.Duration { t.mu.Lock() @@ -104,169 +85,38 @@ func newMaxLatencyTracker(c clock.Clock) DurationTracker { } } -// LatencyTrackers stores trackers used to measure latecny incurred in -// components within the apiserver. -type LatencyTrackers struct { - // MutatingWebhookTracker tracks the latency incurred in mutating webhook(s). - // Since mutating webhooks are done sequentially, latency - // is aggregated using sum function. - MutatingWebhookTracker DurationTracker - - // ValidatingWebhookTracker tracks the latency incurred in validating webhook(s). - // Validate webhooks are done in parallel, so max function is used. - ValidatingWebhookTracker DurationTracker - - // StorageTracker tracks the latency incurred inside the storage layer, - // it accounts for the time it takes to send data to the underlying - // storage layer (etcd) and get the complete response back. - // If a request involves N (N>=1) round trips to the underlying - // stogare layer, the latency will account for the total duration - // from these N round trips. - // It does not include the time incurred in admission, or validation. - StorageTracker DurationTracker - - // TransformTracker tracks the latency incurred in transforming the - // response object(s) returned from the underlying storage layer. - // This includes transforming the object to user's desired form - // (ie. as Table), and also setting appropriate API level fields. - // This does not include the latency incurred in serialization - // (json or protobuf) of the response object or writing - // of it to the http ResponseWriter object. - TransformTracker DurationTracker - - // SerializationTracker tracks the latency incurred in serialization - // (json or protobuf) of the response object. - // NOTE: serialization and writing of the serialized raw bytes to the - // associated http ResponseWriter object are interleaved, and hence - // the latency measured here will include the time spent writing the - // serialized raw bytes to the http ResponseWriter object. - SerializationTracker DurationTracker - - // ResponseWriteTracker tracks the latency incurred in writing the - // serialized raw bytes to the http ResponseWriter object (via the - // Write method) associated with the request. - // The Write method can be invoked multiple times, so we use a - // latency tracker that sums up the duration from each call. - ResponseWriteTracker DurationTracker +// WebhookDuration stores trackers used to measure webhook request durations. +// Since admit webhooks are done sequentially duration is aggregated using +// sum function. Validate webhooks are done in parallel so max function +// is used. +type WebhookDuration struct { + AdmitTracker DurationTracker + ValidateTracker DurationTracker } -type latencyTrackersKeyType int +type webhookDurationKeyType int -// latencyTrackersKey is the key that associates a LatencyTrackers -// instance with the request context. -const latencyTrackersKey latencyTrackersKeyType = iota +// webhookDurationKey is the WebhookDuration (the time the request spent waiting +// for the webhooks to finish) key for the context. +const webhookDurationKey webhookDurationKeyType = iota -// WithLatencyTrackers returns a copy of parent context to which an -// instance of LatencyTrackers is added. -func WithLatencyTrackers(parent context.Context) context.Context { - return WithLatencyTrackersAndCustomClock(parent, clock.RealClock{}) +// WithWebhookDuration returns a copy of parent context to which the +// WebhookDuration trackers are added. +func WithWebhookDuration(parent context.Context) context.Context { + return WithWebhookDurationAndCustomClock(parent, clock.RealClock{}) } -// WithLatencyTrackersAndCustomClock returns a copy of parent context to which -// an instance of LatencyTrackers is added. Tracers use given clock. -func WithLatencyTrackersAndCustomClock(parent context.Context, c clock.Clock) context.Context { - return WithValue(parent, latencyTrackersKey, &LatencyTrackers{ - MutatingWebhookTracker: newSumLatencyTracker(c), - ValidatingWebhookTracker: newMaxLatencyTracker(c), - StorageTracker: newSumLatencyTracker(c), - TransformTracker: newSumLatencyTracker(c), - SerializationTracker: newSumLatencyTracker(c), - ResponseWriteTracker: newSumLatencyTracker(c), +// WithWebhookDurationAndCustomClock returns a copy of parent context to which +// the WebhookDuration trackers are added. Tracers use given clock. +func WithWebhookDurationAndCustomClock(parent context.Context, c clock.Clock) context.Context { + return WithValue(parent, webhookDurationKey, &WebhookDuration{ + AdmitTracker: newSumLatencyTracker(c), + ValidateTracker: newMaxLatencyTracker(c), }) } -// LatencyTrackersFrom returns the associated LatencyTrackers instance -// from the specified context. -func LatencyTrackersFrom(ctx context.Context) (*LatencyTrackers, bool) { - wd, ok := ctx.Value(latencyTrackersKey).(*LatencyTrackers) +// WebhookDurationFrom returns the value of the WebhookDuration key from the specified context. +func WebhookDurationFrom(ctx context.Context) (*WebhookDuration, bool) { + wd, ok := ctx.Value(webhookDurationKey).(*WebhookDuration) return wd, ok && wd != nil } - -// TrackTransformResponseObjectLatency is used to track latency incurred -// inside the function that takes an object returned from the underlying -// storage layer (etcd) and performs any necessary transformations -// of the response object. This does not include the latency incurred in -// serialization (json or protobuf) of the response object or writing of -// it to the http ResponseWriter object. -// When called multiple times, the latency incurred inside the -// transform func each time will be summed up. -func TrackTransformResponseObjectLatency(ctx context.Context, transform func()) { - if tracker, ok := LatencyTrackersFrom(ctx); ok { - tracker.TransformTracker.Track(transform) - return - } - - transform() -} - -// TrackStorageLatency is used to track latency incurred -// inside the underlying storage layer. -// When called multiple times, the latency provided will be summed up. -func TrackStorageLatency(ctx context.Context, d time.Duration) { - if tracker, ok := LatencyTrackersFrom(ctx); ok { - tracker.StorageTracker.TrackDuration(d) - } -} - -// TrackSerializeResponseObjectLatency is used to track latency incurred in -// serialization (json or protobuf) of the response object. -// When called multiple times, the latency provided will be summed up. -func TrackSerializeResponseObjectLatency(ctx context.Context, f func()) { - if tracker, ok := LatencyTrackersFrom(ctx); ok { - tracker.SerializationTracker.Track(f) - return - } - - f() -} - -// TrackResponseWriteLatency is used to track latency incurred in writing -// the serialized raw bytes to the http ResponseWriter object (via the -// Write method) associated with the request. -// When called multiple times, the latency provided will be summed up. -func TrackResponseWriteLatency(ctx context.Context, d time.Duration) { - if tracker, ok := LatencyTrackersFrom(ctx); ok { - tracker.ResponseWriteTracker.TrackDuration(d) - } -} - -// AuditAnnotationsFromLatencyTrackers will inspect each latency tracker -// associated with the request context and return a set of audit -// annotations that can be added to the API audit entry. -func AuditAnnotationsFromLatencyTrackers(ctx context.Context) map[string]string { - const ( - transformLatencyKey = "apiserver.latency.k8s.io/transform-response-object" - storageLatencyKey = "apiserver.latency.k8s.io/etcd" - serializationLatencyKey = "apiserver.latency.k8s.io/serialize-response-object" - responseWriteLatencyKey = "apiserver.latency.k8s.io/response-write" - mutatingWebhookLatencyKey = "apiserver.latency.k8s.io/mutating-webhook" - validatingWebhookLatencyKey = "apiserver.latency.k8s.io/validating-webhook" - ) - - tracker, ok := LatencyTrackersFrom(ctx) - if !ok { - return nil - } - - annotations := map[string]string{} - if latency := tracker.TransformTracker.GetLatency(); latency != 0 { - annotations[transformLatencyKey] = latency.String() - } - if latency := tracker.StorageTracker.GetLatency(); latency != 0 { - annotations[storageLatencyKey] = latency.String() - } - if latency := tracker.SerializationTracker.GetLatency(); latency != 0 { - annotations[serializationLatencyKey] = latency.String() - } - if latency := tracker.ResponseWriteTracker.GetLatency(); latency != 0 { - annotations[responseWriteLatencyKey] = latency.String() - } - if latency := tracker.MutatingWebhookTracker.GetLatency(); latency != 0 { - annotations[mutatingWebhookLatencyKey] = latency.String() - } - if latency := tracker.ValidatingWebhookTracker.GetLatency(); latency != 0 { - annotations[validatingWebhookLatencyKey] = latency.String() - } - - return annotations -} diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/features/OWNERS b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/features/OWNERS index 3e1dd9f081d6..05b08249aed3 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/features/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/features/OWNERS @@ -1,4 +1,4 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - feature-approvers +- feature-approvers diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/features/kube_features.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/features/kube_features.go index 01820d127afb..ffab26970c75 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/features/kube_features.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/features/kube_features.go @@ -30,6 +30,26 @@ const ( // // alpha: v1.4 // MyFeature() bool + // owner: @tallclair + // alpha: v1.5 + // beta: v1.6 + // deprecated: v1.18 + // + // StreamingProxyRedirects controls whether the apiserver should intercept (and follow) + // redirects from the backend (Kubelet) for streaming requests (exec/attach/port-forward). + // + // This feature is deprecated, and will be removed in v1.24. + StreamingProxyRedirects featuregate.Feature = "StreamingProxyRedirects" + + // owner: @tallclair + // alpha: v1.12 + // beta: v1.14 + // deprecated: v1.22 + // + // ValidateProxyRedirects controls whether the apiserver should validate that redirects are only + // followed to the same host. Only used if StreamingProxyRedirects is enabled. + ValidateProxyRedirects featuregate.Feature = "ValidateProxyRedirects" + // owner: @tallclair // alpha: v1.7 // beta: v1.8 @@ -104,18 +124,15 @@ const ( WatchBookmark featuregate.Feature = "WatchBookmark" // owner: @MikeSpreitzer @yue9944882 - // alpha: v1.18 - // beta: v1.20 + // alpha: v1.15 + // // - // Enables managing request concurrency with prioritization and fairness at each server. - // The FeatureGate was introduced in release 1.15 but the feature - // was not really implemented before 1.18. + // Enables managing request concurrency with prioritization and fairness at each server APIPriorityAndFairness featuregate.Feature = "APIPriorityAndFairness" // owner: @wojtek-t // alpha: v1.16 // beta: v1.20 - // GA: v1.24 // // Deprecates and removes SelfLink from ObjectMeta and ListMeta. RemoveSelfLink featuregate.Feature = "RemoveSelfLink" @@ -128,10 +145,16 @@ const ( // Allows label and field based indexes in apiserver watch cache to accelerate list operations. SelectorIndex featuregate.Feature = "SelectorIndex" + // owner: @liggitt + // beta: v1.19 + // GA: v1.22 + // + // Allows sending warning headers in API responses. + WarningHeaders featuregate.Feature = "WarningHeaders" + // owner: @wojtek-t // alpha: v1.20 // beta: v1.21 - // GA: v1.24 // // Allows for updating watchcache resource version with progress notify events. EfficientWatchResumption featuregate.Feature = "EfficientWatchResumption" @@ -151,7 +174,6 @@ const ( // owner: @jiahuif // kep: http://kep.k8s.io/2887 // alpha: v1.23 - // beta: v1.24 // // Enables populating "enum" field of OpenAPI schemas // in the spec returned from kube-apiserver. @@ -167,7 +189,6 @@ const ( // owner: @jefftree // kep: http://kep.k8s.io/2896 // alpha: v1.23 - // beta: v1.24 // // Enables kubernetes to publish OpenAPI v3 OpenAPIV3 featuregate.Feature = "OpenAPIV3" @@ -188,6 +209,8 @@ func init() { // To add a new feature, define a key for it above and add it here. The features will be // available throughout Kubernetes binaries. var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{ + StreamingProxyRedirects: {Default: false, PreRelease: featuregate.Deprecated}, + ValidateProxyRedirects: {Default: true, PreRelease: featuregate.Deprecated}, AdvancedAuditing: {Default: true, PreRelease: featuregate.GA}, APIResponseCompression: {Default: true, PreRelease: featuregate.Beta}, APIListChunking: {Default: true, PreRelease: featuregate.Beta}, @@ -198,13 +221,14 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS StorageVersionAPI: {Default: false, PreRelease: featuregate.Alpha}, WatchBookmark: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, APIPriorityAndFairness: {Default: true, PreRelease: featuregate.Beta}, - RemoveSelfLink: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, + RemoveSelfLink: {Default: true, PreRelease: featuregate.Beta}, SelectorIndex: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, - EfficientWatchResumption: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, + WarningHeaders: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, + EfficientWatchResumption: {Default: true, PreRelease: featuregate.Beta}, APIServerIdentity: {Default: false, PreRelease: featuregate.Alpha}, APIServerTracing: {Default: false, PreRelease: featuregate.Alpha}, - OpenAPIEnums: {Default: true, PreRelease: featuregate.Beta}, + OpenAPIEnums: {Default: false, PreRelease: featuregate.Alpha}, CustomResourceValidationExpressions: {Default: false, PreRelease: featuregate.Alpha}, - OpenAPIV3: {Default: true, PreRelease: featuregate.Beta}, + OpenAPIV3: {Default: false, PreRelease: featuregate.Alpha}, ServerSideFieldValidation: {Default: false, PreRelease: featuregate.Alpha}, } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/quota/v1/OWNERS b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/quota/v1/OWNERS index 104836035afd..d812b5d3ee63 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/quota/v1/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/quota/v1/OWNERS @@ -1,13 +1,13 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - deads2k - - derekwaynecarr +- deads2k +- derekwaynecarr +- vishh reviewers: - - deads2k - - derekwaynecarr - - smarterclayton +- deads2k +- derekwaynecarr +- smarterclayton +- vishh labels: - - sig/api-machinery -emeritus_approvers: - - vishh +- sig/api-machinery diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/generic/OWNERS b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/generic/OWNERS index 29d730907f9c..bf987ec8959e 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/generic/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/generic/OWNERS @@ -1,19 +1,26 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - thockin - - lavalamp - - smarterclayton - - wojtek-t - - deads2k - - yujuhong - - derekwaynecarr - - caesarxuchao - - mikedanese - - liggitt - - saad-ali - - janetkuo - - pwittrock - - ncdc - - dims - - enj +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- yujuhong +- derekwaynecarr +- caesarxuchao +- mikedanese +- liggitt +- davidopp +- saad-ali +- janetkuo +- pwittrock +- ncdc +- piosz +- dims +- hongchaodeng +- krousey +- xiang90 +- resouer +- sdminonne +- enj diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/generic/registry/dryrun.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/generic/registry/dryrun.go index 186537d19d7b..e25684a8a53b 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/generic/registry/dryrun.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/generic/registry/dryrun.go @@ -60,12 +60,20 @@ func (s *DryRunnableStorage) Watch(ctx context.Context, key string, opts storage return s.Storage.Watch(ctx, key, opts) } +func (s *DryRunnableStorage) WatchList(ctx context.Context, key string, opts storage.ListOptions) (watch.Interface, error) { + return s.Storage.WatchList(ctx, key, opts) +} + func (s *DryRunnableStorage) Get(ctx context.Context, key string, opts storage.GetOptions, objPtr runtime.Object) error { return s.Storage.Get(ctx, key, opts, objPtr) } -func (s *DryRunnableStorage) GetList(ctx context.Context, key string, opts storage.ListOptions, listObj runtime.Object) error { - return s.Storage.GetList(ctx, key, opts, listObj) +func (s *DryRunnableStorage) GetToList(ctx context.Context, key string, opts storage.ListOptions, listObj runtime.Object) error { + return s.Storage.GetToList(ctx, key, opts, listObj) +} + +func (s *DryRunnableStorage) List(ctx context.Context, key string, opts storage.ListOptions, listObj runtime.Object) error { + return s.Storage.List(ctx, key, opts, listObj) } func (s *DryRunnableStorage) GuaranteedUpdate( diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/generic/registry/storage_factory.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/generic/registry/storage_factory.go index 60ad5a9b6a92..6a4426ee6091 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/generic/registry/storage_factory.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/generic/registry/storage_factory.go @@ -49,9 +49,8 @@ func StorageWithCacher() generic.StorageDecorator { if err != nil { return s, d, err } - if klogV := klog.V(5); klogV.Enabled() { - //nolint:logcheck // It complains about the key/value pairs because it cannot check them. - klogV.InfoS("Storage caching is enabled", objectTypeToArgs(newFunc())...) + if klog.V(5).Enabled() { + klog.InfoS("Storage caching is enabled", objectTypeToArgs(newFunc())...) } cacherConfig := cacherstorage.Config{ diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/generic/registry/store.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/generic/registry/store.go index 2d9a7599e88c..4397f631e883 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/generic/registry/store.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/generic/registry/store.go @@ -343,22 +343,16 @@ func (e *Store) ListPredicate(ctx context.Context, p storage.SelectionPredicate, p.Continue = options.Continue list := e.NewListFunc() qualifiedResource := e.qualifiedResourceFromContext(ctx) - storageOpts := storage.ListOptions{ - ResourceVersion: options.ResourceVersion, - ResourceVersionMatch: options.ResourceVersionMatch, - Predicate: p, - Recursive: true, - } + storageOpts := storage.ListOptions{ResourceVersion: options.ResourceVersion, ResourceVersionMatch: options.ResourceVersionMatch, Predicate: p} if name, ok := p.MatchesSingle(); ok { if key, err := e.KeyFunc(ctx, name); err == nil { - storageOpts.Recursive = false - err := e.Storage.GetList(ctx, key, storageOpts, list) + err := e.Storage.GetToList(ctx, key, storageOpts, list) return list, storeerr.InterpretListError(err, qualifiedResource) } // if we cannot extract a key based on the current context, the optimization is skipped } - err := e.Storage.GetList(ctx, e.KeyRootFunc(ctx), storageOpts, list) + err := e.Storage.List(ctx, e.KeyRootFunc(ctx), storageOpts, list) return list, storeerr.InterpretListError(err, qualifiedResource) } @@ -1246,19 +1240,23 @@ func (e *Store) Watch(ctx context.Context, options *metainternalversion.ListOpti // WatchPredicate starts a watch for the items that matches. func (e *Store) WatchPredicate(ctx context.Context, p storage.SelectionPredicate, resourceVersion string) (watch.Interface, error) { - storageOpts := storage.ListOptions{ResourceVersion: resourceVersion, Predicate: p, Recursive: true} - - key := e.KeyRootFunc(ctx) + storageOpts := storage.ListOptions{ResourceVersion: resourceVersion, Predicate: p} if name, ok := p.MatchesSingle(); ok { - if k, err := e.KeyFunc(ctx, name); err == nil { - key = k - storageOpts.Recursive = false + if key, err := e.KeyFunc(ctx, name); err == nil { + w, err := e.Storage.Watch(ctx, key, storageOpts) + if err != nil { + return nil, err + } + if e.Decorator != nil { + return newDecoratedWatcher(ctx, w, e.Decorator), nil + } + return w, nil } // if we cannot extract a key based on the current context, the // optimization is skipped } - w, err := e.Storage.Watch(ctx, key, storageOpts) + w, err := e.Storage.WatchList(ctx, e.KeyRootFunc(ctx), storageOpts) if err != nil { return nil, err } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/rest/OWNERS b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/rest/OWNERS index 4dd70bd88825..f1366aa97658 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/rest/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/rest/OWNERS @@ -1,16 +1,20 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - thockin - - smarterclayton - - wojtek-t - - deads2k - - derekwaynecarr - - caesarxuchao - - mikedanese - - liggitt - - justinsb - - ncdc - - dims - - ingvagabund - - enj +- thockin +- smarterclayton +- wojtek-t +- deads2k +- brendandburns +- derekwaynecarr +- caesarxuchao +- mikedanese +- liggitt +- justinsb +- ncdc +- dims +- hongchaodeng +- krousey +- ingvagabund +- sdminonne +- enj diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/rest/create.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/rest/create.go index 83d5e576aa3b..942ee4774c0a 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/rest/create.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/rest/create.go @@ -18,7 +18,6 @@ package rest import ( "context" - "fmt" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" @@ -100,15 +99,13 @@ func BeforeCreate(strategy RESTCreateStrategy, ctx context.Context, obj runtime. return kerr } - // ensure namespace on the object is correct, or error if a conflicting namespace was set in the object - requestNamespace, ok := genericapirequest.NamespaceFrom(ctx) - if !ok { - return errors.NewInternalError(fmt.Errorf("no namespace information found in request context")) - } - if err := EnsureObjectNamespaceMatchesRequestNamespace(ExpectedNamespaceForScope(requestNamespace, strategy.NamespaceScoped()), objectMeta); err != nil { - return err + if strategy.NamespaceScoped() { + if !ValidNamespace(ctx, objectMeta) { + return errors.NewBadRequest("the namespace of the provided object does not match the namespace sent on the request") + } + } else if len(objectMeta.GetNamespace()) > 0 { + objectMeta.SetNamespace(metav1.NamespaceNone) } - objectMeta.SetDeletionTimestamp(nil) objectMeta.SetDeletionGracePeriodSeconds(nil) strategy.PrepareForCreate(ctx, obj) @@ -123,10 +120,9 @@ func BeforeCreate(strategy RESTCreateStrategy, ctx context.Context, obj runtime. objectMeta.SetManagedFields(nil) } - // ZZZ_DeprecatedClusterName is ignored and should not be saved - if len(objectMeta.GetZZZ_DeprecatedClusterName()) > 0 { - objectMeta.SetZZZ_DeprecatedClusterName("") - warning.AddWarning(ctx, "", "metadata.clusterName was specified. This field is not preserved and will be removed from the schema in 1.25") + // ClusterName is ignored and should not be saved + if len(objectMeta.GetClusterName()) > 0 { + objectMeta.SetClusterName("") } if errs := strategy.Validate(ctx, obj); len(errs) > 0 { diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/rest/meta.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/rest/meta.go index 6741b3da3423..add6044ab0c5 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/rest/meta.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/rest/meta.go @@ -17,10 +17,11 @@ limitations under the License. package rest import ( - "k8s.io/apimachinery/pkg/api/errors" + "context" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/uuid" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" ) // FillObjectMetaSystemFields populates fields that are managed by the system on ObjectMeta. @@ -30,44 +31,13 @@ func FillObjectMetaSystemFields(meta metav1.Object) { meta.SetSelfLink("") } -// EnsureObjectNamespaceMatchesRequestNamespace returns an error if obj.Namespace and requestNamespace -// are both populated and do not match. If either is unpopulated, it modifies obj as needed to ensure -// obj.GetNamespace() == requestNamespace. -func EnsureObjectNamespaceMatchesRequestNamespace(requestNamespace string, obj metav1.Object) error { - objNamespace := obj.GetNamespace() - switch { - case objNamespace == requestNamespace: - // already matches, no-op - return nil - - case objNamespace == metav1.NamespaceNone: - // unset, default to request namespace - obj.SetNamespace(requestNamespace) - return nil - - case requestNamespace == metav1.NamespaceNone: - // cluster-scoped, clear namespace - obj.SetNamespace(metav1.NamespaceNone) - return nil - - default: - // mismatch, error - return errors.NewBadRequest("the namespace of the provided object does not match the namespace sent on the request") - } -} - -// ExpectedNamespaceForScope returns the expected namespace for a resource, given the request namespace and resource scope. -func ExpectedNamespaceForScope(requestNamespace string, namespaceScoped bool) string { - if namespaceScoped { - return requestNamespace - } - return "" -} - -// ExpectedNamespaceForResource returns the expected namespace for a resource, given the request namespace. -func ExpectedNamespaceForResource(requestNamespace string, resource schema.GroupVersionResource) string { - if resource.Resource == "namespaces" && resource.Group == "" { - return "" +// ValidNamespace returns false if the namespace on the context differs from +// the resource. If the resource has no namespace, it is set to the value in +// the context. +func ValidNamespace(ctx context.Context, resource metav1.Object) bool { + ns, ok := genericapirequest.NamespaceFrom(ctx) + if len(resource.GetNamespace()) == 0 { + resource.SetNamespace(ns) } - return requestNamespace + return ns == resource.GetNamespace() && ok } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/rest/table.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/rest/table.go index 58d280300660..d90ae70762b7 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/rest/table.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/rest/table.go @@ -70,11 +70,13 @@ func (c defaultTableConvertor) ConvertToTable(ctx context.Context, object runtim } if m, err := meta.ListAccessor(object); err == nil { table.ResourceVersion = m.GetResourceVersion() + table.SelfLink = m.GetSelfLink() table.Continue = m.GetContinue() table.RemainingItemCount = m.GetRemainingItemCount() } else { if m, err := meta.CommonAccessor(object); err == nil { table.ResourceVersion = m.GetResourceVersion() + table.SelfLink = m.GetSelfLink() } } if opt, ok := tableOptions.(*metav1.TableOptions); !ok || !opt.NoHeaders { diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/rest/update.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/rest/update.go index e5ae7af0ebba..ffcca33c05ee 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/rest/update.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/registry/rest/update.go @@ -28,7 +28,6 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/apiserver/pkg/admission" - genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/features" utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/apiserver/pkg/warning" @@ -111,14 +110,12 @@ func BeforeUpdate(strategy RESTUpdateStrategy, ctx context.Context, obj, old run if kerr != nil { return kerr } - - // ensure namespace on the object is correct, or error if a conflicting namespace was set in the object - requestNamespace, ok := genericapirequest.NamespaceFrom(ctx) - if !ok { - return errors.NewInternalError(fmt.Errorf("no namespace information found in request context")) - } - if err := EnsureObjectNamespaceMatchesRequestNamespace(ExpectedNamespaceForScope(requestNamespace, strategy.NamespaceScoped()), objectMeta); err != nil { - return err + if strategy.NamespaceScoped() { + if !ValidNamespace(ctx, objectMeta) { + return errors.NewBadRequest("the namespace of the provided object does not match the namespace sent on the request") + } + } else if len(objectMeta.GetNamespace()) > 0 { + objectMeta.SetNamespace(metav1.NamespaceNone) } // Ensure requests cannot update generation @@ -136,10 +133,9 @@ func BeforeUpdate(strategy RESTUpdateStrategy, ctx context.Context, obj, old run strategy.PrepareForUpdate(ctx, obj, old) - // ZZZ_DeprecatedClusterName is ignored and should not be saved - if len(objectMeta.GetZZZ_DeprecatedClusterName()) > 0 { - objectMeta.SetZZZ_DeprecatedClusterName("") - warning.AddWarning(ctx, "", "metadata.clusterName was specified. This field is not preserved and will be removed from the schema in 1.25") + // ClusterName is ignored and should not be saved + if len(objectMeta.GetClusterName()) > 0 { + objectMeta.SetClusterName("") } // Use the existing UID if none is provided if len(objectMeta.GetUID()) == 0 { diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/config.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/config.go index f2ea85b82f98..fb3179c4628e 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/config.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/config.go @@ -171,8 +171,6 @@ type Config struct { Serializer runtime.NegotiatedSerializer // OpenAPIConfig will be used in generating OpenAPI spec. This is nil by default. Use DefaultOpenAPIConfig for "working" defaults. OpenAPIConfig *openapicommon.Config - // OpenAPIV3Config will be used in generating OpenAPI V3 spec. This is nil by default. Use DefaultOpenAPIV3Config for "working" defaults. - OpenAPIV3Config *openapicommon.Config // SkipOpenAPIInstallation avoids installing the OpenAPI handler if set to true. SkipOpenAPIInstallation bool @@ -361,9 +359,6 @@ func NewConfig(codecs serializer.CodecFactory) *Config { // A request body might be encoded in json, and is converted to // proto when persisted in etcd, so we allow 2x as the largest request // body size to be accepted and decoded in a write request. - // If this constant is changed, maxRequestSizeBytes in apiextensions-apiserver/third_party/forked/celopenapi/model/schemas.go - // should be changed to reflect the new value, if the two haven't - // been wired together already somehow. MaxRequestBodyBytes: int64(3 * 1024 * 1024), // Default to treating watch as a long-running operation @@ -384,7 +379,6 @@ func NewRecommendedConfig(codecs serializer.CodecFactory) *RecommendedConfig { } } -// DefaultOpenAPIConfig provides the default OpenAPIConfig used to build the OpenAPI V2 spec func DefaultOpenAPIConfig(getDefinitions openapicommon.GetOpenAPIDefinitions, defNamer *apiopenapi.DefinitionNamer) *openapicommon.Config { return &openapicommon.Config{ ProtocolList: []string{"https"}, @@ -405,17 +399,6 @@ func DefaultOpenAPIConfig(getDefinitions openapicommon.GetOpenAPIDefinitions, de } } -// DefaultOpenAPIV3Config provides the default OpenAPIV3Config used to build the OpenAPI V3 spec -func DefaultOpenAPIV3Config(getDefinitions openapicommon.GetOpenAPIDefinitions, defNamer *apiopenapi.DefinitionNamer) *openapicommon.Config { - defaultConfig := DefaultOpenAPIConfig(getDefinitions, defNamer) - defaultConfig.Definitions = getDefinitions(func(name string) spec.Ref { - defName, _ := defaultConfig.GetDefinitionName(name) - return spec.MustCreateRef("#/components/schemas/" + openapicommon.EscapeJsonPointer(defName)) - }) - - return defaultConfig -} - func (c *AuthenticationInfo) ApplyClientCert(clientCA dynamiccertificates.CAContentProvider, servingInfo *SecureServingInfo) error { if servingInfo == nil { return nil @@ -489,45 +472,6 @@ func (c *Config) AddPostStartHookOrDie(name string, hook PostStartHookFunc) { } } -func completeOpenAPI(config *openapicommon.Config, version *version.Info) { - if config == nil { - return - } - if config.SecurityDefinitions != nil { - // Setup OpenAPI security: all APIs will have the same authentication for now. - config.DefaultSecurity = []map[string][]string{} - keys := []string{} - for k := range *config.SecurityDefinitions { - keys = append(keys, k) - } - sort.Strings(keys) - for _, k := range keys { - config.DefaultSecurity = append(config.DefaultSecurity, map[string][]string{k: {}}) - } - if config.CommonResponses == nil { - config.CommonResponses = map[int]spec.Response{} - } - if _, exists := config.CommonResponses[http.StatusUnauthorized]; !exists { - config.CommonResponses[http.StatusUnauthorized] = spec.Response{ - ResponseProps: spec.ResponseProps{ - Description: "Unauthorized", - }, - } - } - } - // make sure we populate info, and info.version, if not manually set - if config.Info == nil { - config.Info = &spec.Info{} - } - if config.Info.Version == "" { - if version != nil { - config.Info.Version = strings.Split(version.String(), "-")[0] - } else { - config.Info.Version = "unversioned" - } - } -} - // Complete fills in any fields not set that are required to have valid data and can be derived // from other fields. If you're going to `ApplyOptions`, do that first. It's mutating the receiver. func (c *Config) Complete(informers informers.SharedInformerFactory) CompletedConfig { @@ -547,9 +491,42 @@ func (c *Config) Complete(informers informers.SharedInformerFactory) CompletedCo c.ExternalAddress = net.JoinHostPort(c.ExternalAddress, strconv.Itoa(port)) } - completeOpenAPI(c.OpenAPIConfig, c.Version) - completeOpenAPI(c.OpenAPIV3Config, c.Version) + if c.OpenAPIConfig != nil { + if c.OpenAPIConfig.SecurityDefinitions != nil { + // Setup OpenAPI security: all APIs will have the same authentication for now. + c.OpenAPIConfig.DefaultSecurity = []map[string][]string{} + keys := []string{} + for k := range *c.OpenAPIConfig.SecurityDefinitions { + keys = append(keys, k) + } + sort.Strings(keys) + for _, k := range keys { + c.OpenAPIConfig.DefaultSecurity = append(c.OpenAPIConfig.DefaultSecurity, map[string][]string{k: {}}) + } + if c.OpenAPIConfig.CommonResponses == nil { + c.OpenAPIConfig.CommonResponses = map[int]spec.Response{} + } + if _, exists := c.OpenAPIConfig.CommonResponses[http.StatusUnauthorized]; !exists { + c.OpenAPIConfig.CommonResponses[http.StatusUnauthorized] = spec.Response{ + ResponseProps: spec.ResponseProps{ + Description: "Unauthorized", + }, + } + } + } + // make sure we populate info, and info.version, if not manually set + if c.OpenAPIConfig.Info == nil { + c.OpenAPIConfig.Info = &spec.Info{} + } + if c.OpenAPIConfig.Info.Version == "" { + if c.Version != nil { + c.OpenAPIConfig.Info.Version = strings.Split(c.Version.String(), "-")[0] + } else { + c.OpenAPIConfig.Info.Version = "unversioned" + } + } + } if c.DiscoveryAddresses == nil { c.DiscoveryAddresses = discovery.DefaultAddresses{DefaultAddress: c.ExternalAddress} } @@ -626,7 +603,6 @@ func (c completedConfig) New(name string, delegationTarget DelegationTarget) (*G ExternalAddress: c.ExternalAddress, openAPIConfig: c.OpenAPIConfig, - openAPIV3Config: c.OpenAPIV3Config, skipOpenAPIInstallation: c.SkipOpenAPIInstallation, postStartHooks: map[string]postStartHookEntry{}, @@ -786,7 +762,8 @@ func BuildHandlerChainWithStorageVersionPrecondition(apiHandler http.Handler, c } func DefaultBuildHandlerChain(apiHandler http.Handler, c *Config) http.Handler { - handler := filterlatency.TrackCompleted(apiHandler) + handler := genericapifilters.WithWebhookDuration(apiHandler) + handler = filterlatency.TrackCompleted(handler) handler = genericapifilters.WithAuthorization(handler, c.Authorization.Authorizer, c.Serializer) handler = filterlatency.TrackStarted(handler, "authorization") @@ -838,7 +815,6 @@ func DefaultBuildHandlerChain(apiHandler http.Handler, c *Config) http.Handler { if utilfeature.DefaultFeatureGate.Enabled(genericfeatures.APIServerTracing) { handler = genericapifilters.WithTracing(handler, c.TracerProvider) } - handler = genericapifilters.WithLatencyTrackers(handler) handler = genericapifilters.WithRequestInfo(handler, c.RequestInfoResolver) handler = genericapifilters.WithRequestReceivedTimestamp(handler) handler = genericapifilters.WithMuxAndDiscoveryComplete(handler, c.lifecycleSignals.MuxAndDiscoveryComplete.Signaled()) diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/configmap_cafile_content.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/configmap_cafile_content.go index 428fd66bae7d..b09474bc4fea 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/configmap_cafile_content.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/configmap_cafile_content.go @@ -18,7 +18,6 @@ package dynamiccertificates import ( "bytes" - "context" "crypto/x509" "fmt" "sync/atomic" @@ -187,7 +186,7 @@ func (c *ConfigMapCAController) hasCAChanged(caBundle []byte) bool { } // RunOnce runs a single sync loop -func (c *ConfigMapCAController) RunOnce(ctx context.Context) error { +func (c *ConfigMapCAController) RunOnce() error { // Ignore the error when running once because when using a dynamically loaded ca file, because we think it's better to have nothing for // a brief time than completely crash. If crashing is necessary, higher order logic like a healthcheck and cause failures. _ = c.loadCABundle() @@ -195,7 +194,7 @@ func (c *ConfigMapCAController) RunOnce(ctx context.Context) error { } // Run starts the kube-apiserver and blocks until stopCh is closed. -func (c *ConfigMapCAController) Run(ctx context.Context, workers int) { +func (c *ConfigMapCAController) Run(workers int, stopCh <-chan struct{}) { defer utilruntime.HandleCrash() defer c.queue.ShutDown() @@ -203,23 +202,23 @@ func (c *ConfigMapCAController) Run(ctx context.Context, workers int) { defer klog.InfoS("Shutting down controller", "name", c.name) // we have a personal informer that is narrowly scoped, start it. - go c.configMapInformer.Run(ctx.Done()) + go c.configMapInformer.Run(stopCh) // wait for your secondary caches to fill before starting your work - if !cache.WaitForNamedCacheSync(c.name, ctx.Done(), c.preRunCaches...) { + if !cache.WaitForNamedCacheSync(c.name, stopCh, c.preRunCaches...) { return } // doesn't matter what workers say, only start one. - go wait.Until(c.runWorker, time.Second, ctx.Done()) + go wait.Until(c.runWorker, time.Second, stopCh) // start timer that rechecks every minute, just in case. this also serves to prime the controller quickly. go wait.PollImmediateUntil(FileRefreshDuration, func() (bool, error) { c.queue.Add(workItemKey) return false, nil - }, ctx.Done()) + }, stopCh) - <-ctx.Done() + <-stopCh } func (c *ConfigMapCAController) runWorker() { diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/dynamic_cafile_content.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/dynamic_cafile_content.go index 58761acd925d..fb1515c182a7 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/dynamic_cafile_content.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/dynamic_cafile_content.go @@ -18,7 +18,6 @@ package dynamiccertificates import ( "bytes" - "context" "crypto/x509" "fmt" "io/ioutil" @@ -40,10 +39,10 @@ var FileRefreshDuration = 1 * time.Minute // ControllerRunner is a generic interface for starting a controller type ControllerRunner interface { // RunOnce runs the sync loop a single time. This useful for synchronous priming - RunOnce(ctx context.Context) error + RunOnce() error // Run should be called a go .Run - Run(ctx context.Context, workers int) + Run(workers int, stopCh <-chan struct{}) } // DynamicFileCAContent provides a CAContentProvider that can dynamically react to new file content @@ -145,12 +144,12 @@ func (c *DynamicFileCAContent) hasCAChanged(caBundle []byte) bool { } // RunOnce runs a single sync loop -func (c *DynamicFileCAContent) RunOnce(ctx context.Context) error { +func (c *DynamicFileCAContent) RunOnce() error { return c.loadCABundle() } // Run starts the controller and blocks until stopCh is closed. -func (c *DynamicFileCAContent) Run(ctx context.Context, workers int) { +func (c *DynamicFileCAContent) Run(workers int, stopCh <-chan struct{}) { defer utilruntime.HandleCrash() defer c.queue.ShutDown() @@ -158,16 +157,16 @@ func (c *DynamicFileCAContent) Run(ctx context.Context, workers int) { defer klog.InfoS("Shutting down controller", "name", c.name) // doesn't matter what workers say, only start one. - go wait.Until(c.runWorker, time.Second, ctx.Done()) + go wait.Until(c.runWorker, time.Second, stopCh) // start the loop that watches the CA file until stopCh is closed. go wait.Until(func() { - if err := c.watchCAFile(ctx.Done()); err != nil { + if err := c.watchCAFile(stopCh); err != nil { klog.ErrorS(err, "Failed to watch CA file, will retry later") } - }, time.Minute, ctx.Done()) + }, time.Minute, stopCh) - <-ctx.Done() + <-stopCh } func (c *DynamicFileCAContent) watchCAFile(stopCh <-chan struct{}) error { diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/dynamic_serving_content.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/dynamic_serving_content.go index 9ff1abb64941..00117176b0ac 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/dynamic_serving_content.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/dynamic_serving_content.go @@ -17,7 +17,6 @@ limitations under the License. package dynamiccertificates import ( - "context" "crypto/tls" "fmt" "io/ioutil" @@ -120,12 +119,12 @@ func (c *DynamicCertKeyPairContent) loadCertKeyPair() error { } // RunOnce runs a single sync loop -func (c *DynamicCertKeyPairContent) RunOnce(ctx context.Context) error { +func (c *DynamicCertKeyPairContent) RunOnce() error { return c.loadCertKeyPair() } -// Run starts the controller and blocks until context is killed. -func (c *DynamicCertKeyPairContent) Run(ctx context.Context, workers int) { +// Run starts the controller and blocks until stopCh is closed. +func (c *DynamicCertKeyPairContent) Run(workers int, stopCh <-chan struct{}) { defer utilruntime.HandleCrash() defer c.queue.ShutDown() @@ -133,16 +132,16 @@ func (c *DynamicCertKeyPairContent) Run(ctx context.Context, workers int) { defer klog.InfoS("Shutting down controller", "name", c.name) // doesn't matter what workers say, only start one. - go wait.Until(c.runWorker, time.Second, ctx.Done()) + go wait.Until(c.runWorker, time.Second, stopCh) // start the loop that watches the cert and key files until stopCh is closed. go wait.Until(func() { - if err := c.watchCertKeyFile(ctx.Done()); err != nil { + if err := c.watchCertKeyFile(stopCh); err != nil { klog.ErrorS(err, "Failed to watch cert and key file, will retry later") } - }, time.Minute, ctx.Done()) + }, time.Minute, stopCh) - <-ctx.Done() + <-stopCh } func (c *DynamicCertKeyPairContent) watchCertKeyFile(stopCh <-chan struct{}) error { diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/union_content.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/union_content.go index 57622bd34ecc..e10b112bc074 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/union_content.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/dynamiccertificates/union_content.go @@ -18,7 +18,6 @@ package dynamiccertificates import ( "bytes" - "context" "crypto/x509" "strings" @@ -82,11 +81,11 @@ func (c unionCAContent) AddListener(listener Listener) { } // AddListener adds a listener to be notified when the CA content changes. -func (c unionCAContent) RunOnce(ctx context.Context) error { +func (c unionCAContent) RunOnce() error { errors := []error{} for _, curr := range c { if controller, ok := curr.(ControllerRunner); ok { - if err := controller.RunOnce(ctx); err != nil { + if err := controller.RunOnce(); err != nil { errors = append(errors, err) } } @@ -96,10 +95,10 @@ func (c unionCAContent) RunOnce(ctx context.Context) error { } // Run runs the controller -func (c unionCAContent) Run(ctx context.Context, workers int) { +func (c unionCAContent) Run(workers int, stopCh <-chan struct{}) { for _, curr := range c { if controller, ok := curr.(ControllerRunner); ok { - go controller.Run(ctx, workers) + go controller.Run(workers, stopCh) } } } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/filters/OWNERS b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/filters/OWNERS index 010b7838e301..c5f73991a315 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/filters/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/filters/OWNERS @@ -1,5 +1,5 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - sttts - - dims +- sttts +- dims diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/filters/maxinflight.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/filters/maxinflight.go index 6f03b09f60e4..71d8a534bbc7 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/filters/maxinflight.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/filters/maxinflight.go @@ -198,7 +198,11 @@ func WithMaxInFlightLimit( } } // We need to split this data between buckets used for throttling. - metrics.RecordDroppedRequest(r, requestInfo, metrics.APIServerComponent, isMutatingRequest) + if isMutatingRequest { + metrics.DroppedRequests.WithContext(ctx).WithLabelValues(metrics.MutatingKind).Inc() + } else { + metrics.DroppedRequests.WithContext(ctx).WithLabelValues(metrics.ReadOnlyKind).Inc() + } metrics.RecordRequestTermination(r, requestInfo, metrics.APIServerComponent, http.StatusTooManyRequests) tooManyRequests(r, w) } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/filters/priority-and-fairness.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/filters/priority-and-fairness.go index 66e4007d30f8..8b95021c747e 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/filters/priority-and-fairness.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/filters/priority-and-fairness.go @@ -101,7 +101,7 @@ func WithPriorityAndFairness( } var classification *PriorityAndFairnessClassification - noteFn := func(fs *flowcontrol.FlowSchema, pl *flowcontrol.PriorityLevelConfiguration, flowDistinguisher string) { + estimateWork := func(fs *flowcontrol.FlowSchema, pl *flowcontrol.PriorityLevelConfiguration, flowDistinguisher string) flowcontrolrequest.WorkEstimate { classification = &PriorityAndFairnessClassification{ FlowSchemaName: fs.Name, FlowSchemaUID: fs.UID, @@ -110,30 +110,8 @@ func WithPriorityAndFairness( httplog.AddKeyValue(ctx, "apf_pl", truncateLogField(pl.Name)) httplog.AddKeyValue(ctx, "apf_fs", truncateLogField(fs.Name)) - } - // estimateWork is called, if at all, after noteFn - estimateWork := func() flowcontrolrequest.WorkEstimate { - if classification == nil { - // workEstimator is being invoked before classification of - // the request has completed, we should never be here though. - klog.ErrorS(fmt.Errorf("workEstimator is being invoked before classification of the request has completed"), - "Using empty FlowSchema and PriorityLevelConfiguration name", "verb", r.Method, "URI", r.RequestURI) - - return workEstimator(r, "", "") - } - - workEstimate := workEstimator(r, classification.FlowSchemaName, classification.PriorityLevelName) - - fcmetrics.ObserveWorkEstimatedSeats(classification.PriorityLevelName, classification.FlowSchemaName, workEstimate.MaxSeats()) - // nolint:logcheck // Not using the result of klog.V - // inside the if branch is okay, we just use it to - // determine whether the additional information should - // be added. - if klog.V(4).Enabled() { - httplog.AddKeyValue(ctx, "apf_iseats", workEstimate.InitialSeats) - httplog.AddKeyValue(ctx, "apf_fseats", workEstimate.FinalSeats) - } - return workEstimate + httplog.AddKeyValue(ctx, "apf_fd", truncateLogField(flowDistinguisher)) + return workEstimator(r, fs.Name, pl.Name) } var served bool @@ -257,7 +235,7 @@ func WithPriorityAndFairness( // Note that Handle will return irrespective of whether the request // executes or is rejected. In the latter case, the function will return // without calling the passed `execute` function. - fcIfc.Handle(handleCtx, digest, noteFn, estimateWork, queueNote, execute) + fcIfc.Handle(handleCtx, digest, estimateWork, queueNote, execute) }() select { @@ -288,13 +266,17 @@ func WithPriorityAndFairness( handler.ServeHTTP(w, r) } - fcIfc.Handle(ctx, digest, noteFn, estimateWork, queueNote, execute) + fcIfc.Handle(ctx, digest, estimateWork, queueNote, execute) } if !served { setResponseHeaders(classification, w) - epmetrics.RecordDroppedRequest(r, requestInfo, epmetrics.APIServerComponent, isMutatingRequest) + if isMutatingRequest { + epmetrics.DroppedRequests.WithContext(ctx).WithLabelValues(epmetrics.MutatingKind).Inc() + } else { + epmetrics.DroppedRequests.WithContext(ctx).WithLabelValues(epmetrics.ReadOnlyKind).Inc() + } epmetrics.RecordRequestTermination(r, requestInfo, epmetrics.APIServerComponent, http.StatusTooManyRequests) tooManyRequests(r, w) } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/filters/timeout.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/filters/timeout.go index dff4a01d1978..7487fbf1ec7c 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/filters/timeout.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/filters/timeout.go @@ -93,10 +93,6 @@ func (t *timeoutHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { resultCh := make(chan interface{}) var tw timeoutWriter tw, w = newTimeoutWriter(w) - - // Make a copy of request and work on it in new goroutine - // to avoid race condition when accessing/modifying request (e.g. headers) - rCopy := r.Clone(r.Context()) go func() { defer func() { err := recover() @@ -111,7 +107,7 @@ func (t *timeoutHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { } resultCh <- err }() - t.handler.ServeHTTP(w, rCopy) + t.handler.ServeHTTP(w, r) }() select { case err := <-resultCh: @@ -142,7 +138,7 @@ func (t *timeoutHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { }() }() - defer postTimeoutFn() + postTimeoutFn() tw.timeout(err) } } @@ -153,7 +149,7 @@ type timeoutWriter interface { } func newTimeoutWriter(w http.ResponseWriter) (timeoutWriter, http.ResponseWriter) { - base := &baseTimeoutWriter{w: w, handlerHeaders: w.Header().Clone()} + base := &baseTimeoutWriter{w: w} wrapped := responsewriter.WrapForHTTP1Or2(base) return base, wrapped @@ -165,9 +161,6 @@ var _ responsewriter.UserProvidedDecorator = &baseTimeoutWriter{} type baseTimeoutWriter struct { w http.ResponseWriter - // headers written by the normal handler - handlerHeaders http.Header - mu sync.Mutex // if the timeout handler has timeout timedOut bool @@ -189,7 +182,7 @@ func (tw *baseTimeoutWriter) Header() http.Header { return http.Header{} } - return tw.handlerHeaders + return tw.w.Header() } func (tw *baseTimeoutWriter) Write(p []byte) (int, error) { @@ -203,10 +196,7 @@ func (tw *baseTimeoutWriter) Write(p []byte) (int, error) { return 0, http.ErrHijacked } - if !tw.wroteHeader { - copyHeaders(tw.w.Header(), tw.handlerHeaders) - tw.wroteHeader = true - } + tw.wroteHeader = true return tw.w.Write(p) } @@ -231,17 +221,10 @@ func (tw *baseTimeoutWriter) WriteHeader(code int) { return } - copyHeaders(tw.w.Header(), tw.handlerHeaders) tw.wroteHeader = true tw.w.WriteHeader(code) } -func copyHeaders(dst, src http.Header) { - for k, v := range src { - dst[k] = v - } -} - func (tw *baseTimeoutWriter) timeout(err *apierrors.StatusError) { tw.mu.Lock() defer tw.mu.Unlock() diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/filters/wrap.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/filters/wrap.go index b31f262edf5e..d9e7b8d296ee 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/filters/wrap.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/filters/wrap.go @@ -41,7 +41,8 @@ func WithPanicRecovery(handler http.Handler, resolver request.RequestInfoResolve // the client sees an interrupted response but the server doesn't log // an error, panic with the value ErrAbortHandler. // - // Note that HandleCrash function is actually crashing, after calling the handlers + // Note that the ReallyCrash variable controls the behaviour of the HandleCrash function + // So it might actually crash, after calling the handlers if info, err := resolver.NewRequestInfo(req); err != nil { metrics.RecordRequestAbort(req, nil) } else { diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/genericapiserver.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/genericapiserver.go index b8435792856a..954c61756dfc 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/genericapiserver.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/genericapiserver.go @@ -135,9 +135,6 @@ type GenericAPIServer struct { // Enable swagger and/or OpenAPI if these configs are non-nil. openAPIConfig *openapicommon.Config - // Enable swagger and/or OpenAPI V3 if these configs are non-nil. - openAPIV3Config *openapicommon.Config - // SkipOpenAPIInstallation indicates not to install the OpenAPI handler // during PrepareRun. // Set this to true when the specific API Server has its own OpenAPI handler @@ -354,12 +351,9 @@ func (s *GenericAPIServer) PrepareRun() preparedGenericAPIServer { s.OpenAPIVersionedService, s.StaticOpenAPISpec = routes.OpenAPI{ Config: s.openAPIConfig, }.InstallV2(s.Handler.GoRestfulContainer, s.Handler.NonGoRestfulMux) - } - - if s.openAPIV3Config != nil && !s.skipOpenAPIInstallation { if utilfeature.DefaultFeatureGate.Enabled(features.OpenAPIV3) { s.OpenAPIV3VersionedService = routes.OpenAPI{ - Config: s.openAPIV3Config, + Config: s.openAPIConfig, }.InstallV3(s.Handler.GoRestfulContainer, s.Handler.NonGoRestfulMux) } } @@ -429,7 +423,7 @@ func (s preparedGenericAPIServer) Run(stopCh <-chan struct{}) error { // close socket after delayed stopCh drainedCh := s.lifecycleSignals.InFlightRequestsDrained - delayedStopOrDrainedCh := delayedStopCh.Signaled() + stopHttpServerCh := delayedStopCh.Signaled() shutdownTimeout := s.ShutdownTimeout if s.ShutdownSendRetryAfter { // when this mode is enabled, we do the following: @@ -438,20 +432,11 @@ func (s preparedGenericAPIServer) Run(stopCh <-chan struct{}) error { // - once drained, http Server Shutdown is invoked with a timeout of 2s, // net/http waits for 1s for the peer to respond to a GO_AWAY frame, so // we should wait for a minimum of 2s - delayedStopOrDrainedCh = drainedCh.Signaled() + stopHttpServerCh = drainedCh.Signaled() shutdownTimeout = 2 * time.Second klog.V(1).InfoS("[graceful-termination] using HTTP Server shutdown timeout", "ShutdownTimeout", shutdownTimeout) } - // pre-shutdown hooks need to finish before we stop the http server - preShutdownHooksHasStoppedCh, stopHttpServerCh := make(chan struct{}), make(chan struct{}) - go func() { - defer close(stopHttpServerCh) - - <-delayedStopOrDrainedCh - <-preShutdownHooksHasStoppedCh - }() - stoppedCh, listenerStoppedCh, err := s.NonBlockingRun(stopHttpServerCh, shutdownTimeout) if err != nil { return err @@ -477,12 +462,8 @@ func (s preparedGenericAPIServer) Run(stopCh <-chan struct{}) error { klog.V(1).Info("[graceful-termination] waiting for shutdown to be initiated") <-stopCh - // run shutdown hooks directly. This includes deregistering from - // the kubernetes endpoint in case of kube-apiserver. - func() { - defer close(preShutdownHooksHasStoppedCh) - err = s.RunPreShutdownHooks() - }() + // run shutdown hooks directly. This includes deregistering from the kubernetes endpoint in case of kube-apiserver. + err = s.RunPreShutdownHooks() if err != nil { return err } @@ -519,7 +500,7 @@ func (s preparedGenericAPIServer) NonBlockingRun(stopCh <-chan struct{}, shutdow var listenerStoppedCh <-chan struct{} if s.SecureServingInfo != nil && s.Handler != nil { var err error - stoppedCh, listenerStoppedCh, err = s.SecureServingInfo.Serve(s.Handler, shutdownTimeout, internalStopCh) + stoppedCh, listenerStoppedCh, err = s.SecureServingInfo.ServeWithListenerStopped(s.Handler, shutdownTimeout, internalStopCh) if err != nil { close(internalStopCh) close(auditStopCh) @@ -558,10 +539,7 @@ func (s *GenericAPIServer) installAPIResources(apiPrefix string, apiGroupInfo *A continue } - apiGroupVersion, err := s.getAPIGroupVersion(apiGroupInfo, groupVersion, apiPrefix) - if err != nil { - return err - } + apiGroupVersion := s.getAPIGroupVersion(apiGroupInfo, groupVersion, apiPrefix) if apiGroupInfo.OptionsExternalVersion != nil { apiGroupVersion.OptionsExternalVersion = apiGroupInfo.OptionsExternalVersion } @@ -674,18 +652,15 @@ func (s *GenericAPIServer) InstallAPIGroup(apiGroupInfo *APIGroupInfo) error { return s.InstallAPIGroups(apiGroupInfo) } -func (s *GenericAPIServer) getAPIGroupVersion(apiGroupInfo *APIGroupInfo, groupVersion schema.GroupVersion, apiPrefix string) (*genericapi.APIGroupVersion, error) { +func (s *GenericAPIServer) getAPIGroupVersion(apiGroupInfo *APIGroupInfo, groupVersion schema.GroupVersion, apiPrefix string) *genericapi.APIGroupVersion { storage := make(map[string]rest.Storage) for k, v := range apiGroupInfo.VersionedResourcesStorageMap[groupVersion.Version] { - if strings.ToLower(k) != k { - return nil, fmt.Errorf("resource names must be lowercase only, not %q", k) - } - storage[k] = v + storage[strings.ToLower(k)] = v } version := s.newAPIGroupVersion(apiGroupInfo, groupVersion) version.Root = apiPrefix version.Storage = storage - return version, nil + return version } func (s *GenericAPIServer) newAPIGroupVersion(apiGroupInfo *APIGroupInfo, groupVersion schema.GroupVersion) *genericapi.APIGroupVersion { @@ -701,7 +676,7 @@ func (s *GenericAPIServer) newAPIGroupVersion(apiGroupInfo *APIGroupInfo, groupV UnsafeConvertor: runtime.UnsafeObjectConvertor(apiGroupInfo.Scheme), Defaulter: apiGroupInfo.Scheme, Typer: apiGroupInfo.Scheme, - Namer: runtime.Namer(meta.NewAccessor()), + Linker: runtime.SelfLinker(meta.NewAccessor()), EquivalentResourceRegistry: s.EquivalentResourceRegistry, diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/handler.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/handler.go index 23b72a3ac1bc..85d8af1ce3f6 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/handler.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/handler.go @@ -59,7 +59,7 @@ type APIServerHandler struct { // which we don't fit into and it still muddies up swagger. Trying to switch the webservices into a route doesn't work because the // containing webservice faces all the same problems listed above. // This leads to the crazy thing done here. Our mux does what we need, so we'll place it in front of gorestful. It will introspect to - // decide if the route is likely to be handled by goresful and route there if needed. Otherwise, it goes to NonGoRestfulMux mux in + // decide if the route is likely to be handled by goresful and route there if needed. Otherwise, it goes to PostGoRestful mux in // order to handle "normal" paths and delegation. Hopefully no API consumers will ever have to deal with this level of detail. I think // we should consider completely removing gorestful. // Other servers should only use this opaquely to delegate to an API server. diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/healthz/healthz.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/healthz/healthz.go index 3a7280f67983..e19505e9c1f0 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/healthz/healthz.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/healthz/healthz.go @@ -29,7 +29,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apiserver/pkg/endpoints/metrics" - "k8s.io/apiserver/pkg/server/httplog" + "k8s.io/apiserver/pkg/endpoints/responsewriter" "k8s.io/klog/v2" ) @@ -255,8 +255,7 @@ func handleRootHealth(name string, firstTimeHealthy func(), checks ...HealthChec // always be verbose on failure if len(failedChecks) > 0 { klog.V(2).Infof("%s check failed: %s\n%v", strings.Join(failedChecks, ","), name, failedVerboseLogOutput.String()) - httplog.SetStacktracePredicate(r.Context(), func(int) bool { return false }) - http.Error(w, fmt.Sprintf("%s%s check failed", individualCheckOutput.String(), name), http.StatusInternalServerError) + http.Error(responsewriter.GetOriginal(w), fmt.Sprintf("%s%s check failed", individualCheckOutput.String(), name), http.StatusInternalServerError) return } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/httplog/httplog.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/httplog/httplog.go index 5a290fb63b1d..8ac036f9b2de 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/httplog/httplog.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/httplog/httplog.go @@ -95,12 +95,10 @@ func DefaultStacktracePred(status int) bool { return (status < http.StatusOK || status >= http.StatusInternalServerError) && status != http.StatusSwitchingProtocols } -const withLoggingLevel = 3 - // WithLogging wraps the handler with logging. func WithLogging(handler http.Handler, pred StacktracePred) http.Handler { return withLogging(handler, pred, func() bool { - return klog.V(withLoggingLevel).Enabled() + return klog.V(3).Enabled() }) } @@ -228,14 +226,6 @@ func AddKeyValue(ctx context.Context, key string, value interface{}) { } } -// SetStacktracePredicate sets a custom stacktrace predicate for the -// logger associated with the given request context. -func SetStacktracePredicate(ctx context.Context, pred StacktracePred) { - if rl := respLoggerFromContext(ctx); rl != nil { - rl.StacktraceWhen(pred) - } -} - // Log is intended to be called once at the end of your request handler, via defer func (rl *respLogger) Log() { latency := time.Since(rl.startTime) @@ -282,7 +272,7 @@ func (rl *respLogger) Log() { } } - klog.V(withLoggingLevel).InfoSDepth(1, "HTTP", keysAndValues...) + klog.InfoSDepth(1, "HTTP", keysAndValues...) } // Header implements http.ResponseWriter. diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/mux/OWNERS b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/mux/OWNERS index 87c80edbbb1a..4da107c8c38e 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/mux/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/mux/OWNERS @@ -1,4 +1,4 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - sttts +- sttts diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/mux/pathrecorder.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/mux/pathrecorder.go index beb7a8d807c3..cb4941f0261a 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/mux/pathrecorder.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/mux/pathrecorder.go @@ -103,11 +103,10 @@ func (m *PathRecorderMux) ListedPaths() []string { } func (m *PathRecorderMux) trackCallers(path string) { - stack := string(debug.Stack()) if existingStack, ok := m.pathStacks[path]; ok { - utilruntime.HandleError(fmt.Errorf("duplicate path registration of %q: original registration from %v\n\nnew registration from %v", path, existingStack, stack)) + utilruntime.HandleError(fmt.Errorf("registered %q from %v", path, existingStack)) } - m.pathStacks[path] = stack + m.pathStacks[path] = string(debug.Stack()) } // refreshMuxLocked creates a new mux and must be called while locked. Otherwise the view of handlers may diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/OWNERS b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/OWNERS index 4105e64af83d..702015ad1028 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/OWNERS @@ -1,13 +1,15 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - smarterclayton - - wojtek-t - - deads2k - - liggitt - - sttts - - soltysh - - dims - - cjcullen - - ping035627 - - enj +- smarterclayton +- wojtek-t +- deads2k +- liggitt +- sttts +- jlowdermilk +- soltysh +- dims +- cjcullen +- ping035627 +- xiangpengzhao +- enj diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/audit.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/audit.go index 06e7f940862b..fde8e8eb08ff 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/audit.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/audit.go @@ -32,6 +32,8 @@ import ( "k8s.io/apimachinery/pkg/util/sets" auditinternal "k8s.io/apiserver/pkg/apis/audit" auditv1 "k8s.io/apiserver/pkg/apis/audit/v1" + auditv1alpha1 "k8s.io/apiserver/pkg/apis/audit/v1alpha1" + auditv1beta1 "k8s.io/apiserver/pkg/apis/audit/v1beta1" "k8s.io/apiserver/pkg/audit" "k8s.io/apiserver/pkg/audit/policy" "k8s.io/apiserver/pkg/server" @@ -233,6 +235,8 @@ func validateBackendBatchOptions(pluginName string, options AuditBatchOptions) e } var knownGroupVersions = []schema.GroupVersion{ + auditv1alpha1.SchemeGroupVersion, + auditv1beta1.SchemeGroupVersion, auditv1.SchemeGroupVersion, } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/authentication.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/authentication.go index 8ff771af080d..a82b4a7391db 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/authentication.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/authentication.go @@ -17,7 +17,6 @@ limitations under the License. package options import ( - "context" "fmt" "strings" "time" @@ -388,10 +387,7 @@ func (s *DelegatingAuthenticationOptions) createRequestHeaderConfig(client kuber } // look up authentication configuration in the cluster and in case of an err defer to authentication-tolerate-lookup-failure flag - // We are passing the context to ProxyCerts.RunOnce as it needs to implement RunOnce(ctx) however the - // context is not used at all. So passing a empty context shouldn't be a problem - ctx := context.TODO() - if err := dynamicRequestHeaderProvider.RunOnce(ctx); err != nil { + if err := dynamicRequestHeaderProvider.RunOnce(); err != nil { return nil, err } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/authentication_dynamic_request_header.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/authentication_dynamic_request_header.go index 0dac34021871..e2beb5c23824 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/authentication_dynamic_request_header.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/authentication_dynamic_request_header.go @@ -17,7 +17,6 @@ limitations under the License. package options import ( - "context" "fmt" "k8s.io/apimachinery/pkg/util/errors" @@ -65,15 +64,15 @@ func newDynamicRequestHeaderController(client kubernetes.Interface) (*DynamicReq }, nil } -func (c *DynamicRequestHeaderController) RunOnce(ctx context.Context) error { +func (c *DynamicRequestHeaderController) RunOnce() error { errs := []error{} - errs = append(errs, c.ConfigMapCAController.RunOnce(ctx)) - errs = append(errs, c.RequestHeaderAuthRequestController.RunOnce(ctx)) + errs = append(errs, c.ConfigMapCAController.RunOnce()) + errs = append(errs, c.RequestHeaderAuthRequestController.RunOnce()) return errors.NewAggregate(errs) } -func (c *DynamicRequestHeaderController) Run(ctx context.Context, workers int) { - go c.ConfigMapCAController.Run(ctx, workers) - go c.RequestHeaderAuthRequestController.Run(ctx, workers) - <-ctx.Done() +func (c *DynamicRequestHeaderController) Run(workers int, stopCh <-chan struct{}) { + go c.ConfigMapCAController.Run(workers, stopCh) + go c.RequestHeaderAuthRequestController.Run(workers, stopCh) + <-stopCh } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/encryptionconfig/OWNERS b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/encryptionconfig/OWNERS index d2ea8ec60ca8..71edc3ecdcc3 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/encryptionconfig/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/encryptionconfig/OWNERS @@ -1,8 +1,9 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - sig-auth-encryption-at-rest-approvers +- sig-auth-encryption-at-rest-approvers reviewers: - - sig-auth-encryption-at-rest-reviewers +- sig-auth-encryption-at-rest-reviewers labels: - - sig/auth +- sig/auth + diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/encryptionconfig/config.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/encryptionconfig/config.go index 6b7857e35408..fd0c95c22ac4 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/encryptionconfig/config.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/encryptionconfig/config.go @@ -17,7 +17,6 @@ limitations under the License. package encryptionconfig import ( - "context" "crypto/aes" "crypto/cipher" "encoding/base64" @@ -33,7 +32,6 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer" - utilerrors "k8s.io/apimachinery/pkg/util/errors" apiserverconfig "k8s.io/apiserver/pkg/apis/config" apiserverconfigv1 "k8s.io/apiserver/pkg/apis/config/v1" "k8s.io/apiserver/pkg/apis/config/validation" @@ -367,13 +365,7 @@ func secretboxPrefixTransformer(config *apiserverconfig.SecretboxConfiguration) } func envelopePrefixTransformer(config *apiserverconfig.KMSConfiguration, envelopeService envelope.Service, prefix string) (value.PrefixTransformer, error) { - baseTransformerFunc := func(block cipher.Block) value.Transformer { - // v1.24: write using AES-CBC only but support reads via AES-CBC and AES-GCM (so we can move to AES-GCM) - // TODO(aramase): swap this ordering in v1.25 - return unionTransformers{aestransformer.NewCBCTransformer(block), aestransformer.NewGCMTransformer(block)} - } - - envelopeTransformer, err := envelope.NewEnvelopeTransformer(envelopeService, int(*config.CacheSize), baseTransformerFunc) + envelopeTransformer, err := envelope.NewEnvelopeTransformer(envelopeService, int(*config.CacheSize), aestransformer.NewCBCTransformer) if err != nil { return value.PrefixTransformer{}, err } @@ -382,27 +374,3 @@ func envelopePrefixTransformer(config *apiserverconfig.KMSConfiguration, envelop Prefix: []byte(prefix + config.Name + ":"), }, nil } - -type unionTransformers []value.Transformer - -func (u unionTransformers) TransformFromStorage(ctx context.Context, data []byte, dataCtx value.Context) (out []byte, stale bool, err error) { - var errs []error - for i, transformer := range u { - result, stale, err := transformer.TransformFromStorage(ctx, data, dataCtx) - if err != nil { - errs = append(errs, err) - continue - } - // when i != 0, we have transformed the data from storage using the new transformer, - // we want to issue a write to etcd even if the contents of the data haven't changed - return result, stale || i != 0, nil - } - if err := utilerrors.Reduce(utilerrors.NewAggregate(errs)); err != nil { - return nil, false, err - } - return nil, false, fmt.Errorf("unionTransformers: unable to transform from storage") -} - -func (u unionTransformers) TransformToStorage(ctx context.Context, data []byte, dataCtx value.Context) (out []byte, err error) { - return u[0].TransformToStorage(ctx, data, dataCtx) -} diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/etcd.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/etcd.go index 41075fea2474..dfadadbcadf0 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/etcd.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/etcd.go @@ -148,6 +148,10 @@ func (s *EtcdOptions) AddFlags(fs *pflag.FlagSet) { fs.StringVar(&s.StorageConfig.Type, "storage-backend", s.StorageConfig.Type, "The storage backend for persistence. Options: 'etcd3' (default).") + dummyCacheSize := 0 + fs.IntVar(&dummyCacheSize, "deserialization-cache-size", 0, "Number of deserialized json objects to cache in memory.") + fs.MarkDeprecated("deserialization-cache-size", "the deserialization cache was dropped in 1.13 with support for etcd2") + fs.StringSliceVar(&s.StorageConfig.Transport.ServerList, "etcd-servers", s.StorageConfig.Transport.ServerList, "List of etcd servers to connect with (scheme://ip:port), comma separated.") @@ -163,6 +167,10 @@ func (s *EtcdOptions) AddFlags(fs *pflag.FlagSet) { fs.StringVar(&s.StorageConfig.Transport.TrustedCAFile, "etcd-cafile", s.StorageConfig.Transport.TrustedCAFile, "SSL Certificate Authority file used to secure etcd communication.") + fs.StringVar(&s.EncryptionProviderConfigFilepath, "experimental-encryption-provider-config", s.EncryptionProviderConfigFilepath, + "The file containing configuration for encryption providers to be used for storing secrets in etcd") + fs.MarkDeprecated("experimental-encryption-provider-config", "use --encryption-provider-config.") + fs.StringVar(&s.EncryptionProviderConfigFilepath, "encryption-provider-config", s.EncryptionProviderConfigFilepath, "The file containing configuration for encryption providers to be used for storing secrets in etcd") diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/feature.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/feature.go index e8a624184218..235635ea9b62 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/feature.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/feature.go @@ -46,6 +46,9 @@ func (o *FeatureOptions) AddFlags(fs *pflag.FlagSet) { "Enable profiling via web interface host:port/debug/pprof/") fs.BoolVar(&o.EnableContentionProfiling, "contention-profiling", o.EnableContentionProfiling, "Enable lock contention profiling, if profiling is enabled") + dummy := false + fs.BoolVar(&dummy, "enable-swagger-ui", dummy, "Enables swagger ui on the apiserver at /swagger-ui") + fs.MarkDeprecated("enable-swagger-ui", "swagger 1.2 support has been removed") } func (o *FeatureOptions) ApplyTo(c *server.Config) error { diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/server_run_options.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/server_run_options.go index c100d062019d..07a887a53991 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/server_run_options.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/options/server_run_options.go @@ -151,11 +151,11 @@ func (s *ServerRunOptions) Validate() []error { } if s.JSONPatchMaxCopyBytes < 0 { - errors = append(errors, fmt.Errorf("ServerRunOptions.JSONPatchMaxCopyBytes can not be negative value")) + errors = append(errors, fmt.Errorf("--json-patch-max-copy-bytes can not be negative value")) } if s.MaxRequestBodyBytes < 0 { - errors = append(errors, fmt.Errorf("ServerRunOptions.MaxRequestBodyBytes can not be negative value")) + errors = append(errors, fmt.Errorf("--max-resource-write-bytes can not be negative value")) } if err := validateHSTSDirectives(s.HSTSDirectives); err != nil { @@ -202,6 +202,11 @@ func (s *ServerRunOptions) AddUniversalFlags(fs *pflag.FlagSet) { "List of directives for HSTS, comma separated. If this list is empty, then HSTS directives will not "+ "be added. Example: 'max-age=31536000,includeSubDomains,preload'") + deprecatedTargetRAMMB := 0 + fs.IntVar(&deprecatedTargetRAMMB, "target-ram-mb", deprecatedTargetRAMMB, + "DEPRECATED: Memory limit for apiserver in MB (used to configure sizes of caches, etc.)") + fs.MarkDeprecated("target-ram-mb", "This flag will be removed in v1.23") + fs.StringVar(&s.ExternalHost, "external-hostname", s.ExternalHost, "The hostname to use when generating externalized URLs for this master (e.g. Swagger API Docs or OpenID Discovery).") diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/resourceconfig/helpers.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/resourceconfig/helpers.go index e90aa9161997..bfcce54b8d5e 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/resourceconfig/helpers.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/resourceconfig/helpers.go @@ -26,6 +26,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" serverstore "k8s.io/apiserver/pkg/server/storage" cliflag "k8s.io/component-base/cli/flag" + "k8s.io/klog/v2" ) // GroupVersionRegistry provides access to registered group versions. @@ -64,7 +65,7 @@ var ( betaPattern = regexp.MustCompile(`^v\d+beta\d+$`) alphaPattern = regexp.MustCompile(`^v\d+alpha\d+$`) - groupVersionMatchers = map[string]func(gv schema.GroupVersion) bool{ + matchers = map[string]func(gv schema.GroupVersion) bool{ // allows users to address all api versions APIAll: func(gv schema.GroupVersion) bool { return true }, // allows users to address all api versions in the form v[0-9]+ @@ -75,7 +76,7 @@ var ( APIAlpha: func(gv schema.GroupVersion) bool { return alphaPattern.MatchString(gv.Version) }, } - groupVersionMatchersOrder = []string{APIAll, APIGA, APIBeta, APIAlpha} + matcherOrder = []string{APIAll, APIGA, APIBeta, APIAlpha} ) // MergeAPIResourceConfigs merges the given defaultAPIResourceConfig with the given resourceConfigOverrides. @@ -89,42 +90,29 @@ func MergeAPIResourceConfigs( resourceConfig := defaultAPIResourceConfig overrides := resourceConfigOverrides - for _, flag := range groupVersionMatchersOrder { + for _, flag := range matcherOrder { if value, ok := overrides[flag]; ok { if value == "false" { - resourceConfig.DisableMatchingVersions(groupVersionMatchers[flag]) + resourceConfig.DisableMatchingVersions(matchers[flag]) } else if value == "true" { - resourceConfig.EnableMatchingVersions(groupVersionMatchers[flag]) + resourceConfig.EnableMatchingVersions(matchers[flag]) } else { return nil, fmt.Errorf("invalid value %v=%v", flag, value) } } } - type versionEnablementPreference struct { - key string - enabled bool - groupVersion schema.GroupVersion - } - type resourceEnablementPreference struct { - key string - enabled bool - groupVersionResource schema.GroupVersionResource - } - versionPreferences := []versionEnablementPreference{} - resourcePreferences := []resourceEnablementPreference{} - // "={true|false} allows users to enable/disable API. // This takes preference over api/all, if specified. // Iterate through all group/version overrides specified in runtimeConfig. for key := range overrides { // Have already handled them above. Can skip them here. - if _, ok := groupVersionMatchers[key]; ok { + if _, ok := matchers[key]; ok { continue } tokens := strings.Split(key, "/") - if len(tokens) < 2 || len(tokens) > 3 { + if len(tokens) < 2 { continue } groupVersionString := tokens[0] + "/" + tokens[1] @@ -133,6 +121,13 @@ func MergeAPIResourceConfigs( return nil, fmt.Errorf("invalid key %s", key) } + // individual resource enablement/disablement is only supported in the extensions/v1beta1 API group for legacy reasons. + // all other API groups are expected to contain coherent sets of resources that are enabled/disabled together. + if len(tokens) > 2 && (groupVersion != schema.GroupVersion{Group: "extensions", Version: "v1beta1"}) { + klog.Warningf("ignoring invalid key %s, individual resource enablement/disablement is not supported in %s, and will prevent starting in future releases", key, groupVersion.String()) + continue + } + // Exclude group not registered into the registry. if !registry.IsGroupRegistered(groupVersion.Group) { continue @@ -146,45 +141,22 @@ func MergeAPIResourceConfigs( if err != nil { return nil, err } - - switch len(tokens) { - case 2: - versionPreferences = append(versionPreferences, versionEnablementPreference{ - key: key, - enabled: enabled, - groupVersion: groupVersion, - }) - case 3: - if strings.ToLower(tokens[2]) != tokens[2] { - return nil, fmt.Errorf("invalid key %v: group/version/resource and resource is always lowercase plural, not %q", key, tokens[2]) - } - resourcePreferences = append(resourcePreferences, resourceEnablementPreference{ - key: key, - enabled: enabled, - groupVersionResource: groupVersion.WithResource(tokens[2]), - }) + if enabled { + // enable the groupVersion for "group/version=true" and "group/version/resource=true" + resourceConfig.EnableVersions(groupVersion) + } else if len(tokens) == 2 { + // disable the groupVersion only for "group/version=false", not "group/version/resource=false" + resourceConfig.DisableVersions(groupVersion) } - } - // apply version preferences first, so that we can remove the hardcoded resource preferences that are being overridden - for _, versionPreference := range versionPreferences { - if versionPreference.enabled { - // enable the groupVersion for "group/version=true" - resourceConfig.EnableVersions(versionPreference.groupVersion) - - } else { - // disable the groupVersion only for "group/version=false" - resourceConfig.DisableVersions(versionPreference.groupVersion) + if len(tokens) < 3 { + continue } - } - - // apply resource preferences last, so they have the highest priority - for _, resourcePreference := range resourcePreferences { - if resourcePreference.enabled { - // enable the resource for "group/version/resource=true" - resourceConfig.EnableResources(resourcePreference.groupVersionResource) + groupVersionResource := groupVersion.WithResource(tokens[2]) + if enabled { + resourceConfig.EnableResources(groupVersionResource) } else { - resourceConfig.DisableResources(resourcePreference.groupVersionResource) + resourceConfig.DisableResources(groupVersionResource) } } @@ -210,7 +182,7 @@ func getRuntimeConfigValue(overrides cliflag.ConfigurationMap, apiKey string, de func ParseGroups(resourceConfig cliflag.ConfigurationMap) ([]string, error) { groups := []string{} for key := range resourceConfig { - if _, ok := groupVersionMatchers[key]; ok { + if _, ok := matchers[key]; ok { continue } tokens := strings.Split(key, "/") diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/routes/OWNERS b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/routes/OWNERS index 87c80edbbb1a..4da107c8c38e 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/routes/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/routes/OWNERS @@ -1,4 +1,4 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - sttts +- sttts diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/secure_serving.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/secure_serving.go index 64bcc87ebf17..5626cb3a90f6 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/secure_serving.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/secure_serving.go @@ -93,45 +93,36 @@ func (s *SecureServingInfo) tlsConfig(stopCh <-chan struct{}) (*tls.Config, erro if s.Cert != nil { s.Cert.AddListener(dynamicCertificateController) } - // generate a context from stopCh. This is to avoid modifying files which are relying on apiserver - // TODO: See if we can pass ctx to the current method - ctx, cancel := context.WithCancel(context.Background()) - go func() { - select { - case <-stopCh: - cancel() // stopCh closed, so cancel our context - case <-ctx.Done(): - } - }() + // start controllers if possible if controller, ok := s.ClientCA.(dynamiccertificates.ControllerRunner); ok { // runonce to try to prime data. If this fails, it's ok because we fail closed. // Files are required to be populated already, so this is for convenience. - if err := controller.RunOnce(ctx); err != nil { + if err := controller.RunOnce(); err != nil { klog.Warningf("Initial population of client CA failed: %v", err) } - go controller.Run(ctx, 1) + go controller.Run(1, stopCh) } if controller, ok := s.Cert.(dynamiccertificates.ControllerRunner); ok { // runonce to try to prime data. If this fails, it's ok because we fail closed. // Files are required to be populated already, so this is for convenience. - if err := controller.RunOnce(ctx); err != nil { + if err := controller.RunOnce(); err != nil { klog.Warningf("Initial population of default serving certificate failed: %v", err) } - go controller.Run(ctx, 1) + go controller.Run(1, stopCh) } for _, sniCert := range s.SNICerts { sniCert.AddListener(dynamicCertificateController) if controller, ok := sniCert.(dynamiccertificates.ControllerRunner); ok { // runonce to try to prime data. If this fails, it's ok because we fail closed. // Files are required to be populated already, so this is for convenience. - if err := controller.RunOnce(ctx); err != nil { + if err := controller.RunOnce(); err != nil { klog.Warningf("Initial population of SNI serving certificate failed: %v", err) } - go controller.Run(ctx, 1) + go controller.Run(1, stopCh) } } @@ -151,8 +142,73 @@ func (s *SecureServingInfo) tlsConfig(stopCh <-chan struct{}) (*tls.Config, erro // Serve runs the secure http server. It fails only if certificates cannot be loaded or the initial listen call fails. // The actual server loop (stoppable by closing stopCh) runs in a go routine, i.e. Serve does not block. // It returns a stoppedCh that is closed when all non-hijacked active requests have been processed. +func (s *SecureServingInfo) Serve(handler http.Handler, shutdownTimeout time.Duration, stopCh <-chan struct{}) (<-chan struct{}, error) { + if s.Listener == nil { + return nil, fmt.Errorf("listener must not be nil") + } + + tlsConfig, err := s.tlsConfig(stopCh) + if err != nil { + return nil, err + } + + secureServer := &http.Server{ + Addr: s.Listener.Addr().String(), + Handler: handler, + MaxHeaderBytes: 1 << 20, + TLSConfig: tlsConfig, + + IdleTimeout: 90 * time.Second, // matches http.DefaultTransport keep-alive timeout + ReadHeaderTimeout: 32 * time.Second, // just shy of requestTimeoutUpperBound + } + + // At least 99% of serialized resources in surveyed clusters were smaller than 256kb. + // This should be big enough to accommodate most API POST requests in a single frame, + // and small enough to allow a per connection buffer of this size multiplied by `MaxConcurrentStreams`. + const resourceBody99Percentile = 256 * 1024 + + http2Options := &http2.Server{ + IdleTimeout: 90 * time.Second, // matches http.DefaultTransport keep-alive timeout + } + + // shrink the per-stream buffer and max framesize from the 1MB default while still accommodating most API POST requests in a single frame + http2Options.MaxUploadBufferPerStream = resourceBody99Percentile + http2Options.MaxReadFrameSize = resourceBody99Percentile + + // use the overridden concurrent streams setting or make the default of 250 explicit so we can size MaxUploadBufferPerConnection appropriately + if s.HTTP2MaxStreamsPerConnection > 0 { + http2Options.MaxConcurrentStreams = uint32(s.HTTP2MaxStreamsPerConnection) + } else { + http2Options.MaxConcurrentStreams = 250 + } + + // increase the connection buffer size from the 1MB default to handle the specified number of concurrent streams + http2Options.MaxUploadBufferPerConnection = http2Options.MaxUploadBufferPerStream * int32(http2Options.MaxConcurrentStreams) + + if !s.DisableHTTP2 { + // apply settings to the server + if err := http2.ConfigureServer(secureServer, http2Options); err != nil { + return nil, fmt.Errorf("error configuring http2: %v", err) + } + } + + // use tlsHandshakeErrorWriter to handle messages of tls handshake error + tlsErrorWriter := &tlsHandshakeErrorWriter{os.Stderr} + tlsErrorLogger := log.New(tlsErrorWriter, "", 0) + secureServer.ErrorLog = tlsErrorLogger + + klog.Infof("Serving securely on %s", secureServer.Addr) + stoppedCh, _, err := RunServer(secureServer, s.Listener, shutdownTimeout, stopCh) + return stoppedCh, err +} + +// ServeWithListenerStopped runs the secure http server. It fails only if certificates cannot be loaded or the initial listen call fails. +// The actual server loop (stoppable by closing stopCh) runs in a go routine, i.e. ServeWithListenerStopped does not block. +// It returns a stoppedCh that is closed when all non-hijacked active requests have been processed. // It returns a listenerStoppedCh that is closed when the underlying http Server has stopped listening. -func (s *SecureServingInfo) Serve(handler http.Handler, shutdownTimeout time.Duration, stopCh <-chan struct{}) (<-chan struct{}, <-chan struct{}, error) { +// TODO: do a follow up PR to remove this function, change 'Serve' to return listenerStoppedCh +// and update all components that call 'Serve' +func (s *SecureServingInfo) ServeWithListenerStopped(handler http.Handler, shutdownTimeout time.Duration, stopCh <-chan struct{}) (<-chan struct{}, <-chan struct{}, error) { if s.Listener == nil { return nil, nil, fmt.Errorf("listener must not be nil") } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/storage/resource_config.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/storage/resource_config.go index ce8d1822aa09..bd85ac230b25 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/storage/resource_config.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/storage/resource_config.go @@ -22,8 +22,9 @@ import ( // APIResourceConfigSource is the interface to determine which groups and versions are enabled type APIResourceConfigSource interface { + VersionEnabled(version schema.GroupVersion) bool ResourceEnabled(resource schema.GroupVersionResource) bool - AnyResourceForGroupEnabled(group string) bool + AnyVersionForGroupEnabled(group string) bool } var _ APIResourceConfigSource = &ResourceConfig{} @@ -37,74 +38,52 @@ func NewResourceConfig() *ResourceConfig { return &ResourceConfig{GroupVersionConfigs: map[schema.GroupVersion]bool{}, ResourceConfigs: map[schema.GroupVersionResource]bool{}} } -// DisableMatchingVersions disables all group/versions for which the matcher function returns true. -// This will remove any preferences previously set on individual resources. -func (o *ResourceConfig) DisableMatchingVersions(matcher func(gv schema.GroupVersion) bool) { - for version := range o.GroupVersionConfigs { - if matcher(version) { - o.GroupVersionConfigs[version] = false - o.removeMatchingResourcePreferences(resourceMatcherForVersion(version)) - } +// DisableAll disables all group/versions. It does not modify individual resource enablement/disablement. +func (o *ResourceConfig) DisableAll() { + for k := range o.GroupVersionConfigs { + o.GroupVersionConfigs[k] = false } } -// EnableMatchingVersions enables all group/versions for which the matcher function returns true. -// This will remove any preferences previously set on individual resources. -func (o *ResourceConfig) EnableMatchingVersions(matcher func(gv schema.GroupVersion) bool) { - for version := range o.GroupVersionConfigs { - if matcher(version) { - o.GroupVersionConfigs[version] = true - o.removeMatchingResourcePreferences(resourceMatcherForVersion(version)) - } +// EnableAll enables all group/versions. It does not modify individual resource enablement/disablement. +func (o *ResourceConfig) EnableAll() { + for k := range o.GroupVersionConfigs { + o.GroupVersionConfigs[k] = true } } -// resourceMatcherForVersion matches resources in the specified version -func resourceMatcherForVersion(gv schema.GroupVersion) func(gvr schema.GroupVersionResource) bool { - return func(gvr schema.GroupVersionResource) bool { - return gv == gvr.GroupVersion() +// DisableMatchingVersions disables all group/versions for which the matcher function returns true. It does not modify individual resource enablement/disablement. +func (o *ResourceConfig) DisableMatchingVersions(matcher func(gv schema.GroupVersion) bool) { + for k := range o.GroupVersionConfigs { + if matcher(k) { + o.GroupVersionConfigs[k] = false + } } } -// removeMatchingResourcePreferences removes individual resource preferences that match. This is useful when an override of a version or level enablement should -// override the previously individual preferences. -func (o *ResourceConfig) removeMatchingResourcePreferences(matcher func(gvr schema.GroupVersionResource) bool) { - keysToRemove := []schema.GroupVersionResource{} - for k := range o.ResourceConfigs { +// EnableMatchingVersions enables all group/versions for which the matcher function returns true. It does not modify individual resource enablement/disablement. +func (o *ResourceConfig) EnableMatchingVersions(matcher func(gv schema.GroupVersion) bool) { + for k := range o.GroupVersionConfigs { if matcher(k) { - keysToRemove = append(keysToRemove, k) + o.GroupVersionConfigs[k] = true } } - for _, k := range keysToRemove { - delete(o.ResourceConfigs, k) - } } // DisableVersions disables the versions entirely. -// This will remove any preferences previously set on individual resources. func (o *ResourceConfig) DisableVersions(versions ...schema.GroupVersion) { for _, version := range versions { o.GroupVersionConfigs[version] = false - - // a preference about a version takes priority over the previously set resources - o.removeMatchingResourcePreferences(resourceMatcherForVersion(version)) } } -// EnableVersions enables all resources in a given groupVersion. -// This will remove any preferences previously set on individual resources. func (o *ResourceConfig) EnableVersions(versions ...schema.GroupVersion) { for _, version := range versions { o.GroupVersionConfigs[version] = true - - // a preference about a version takes priority over the previously set resources - o.removeMatchingResourcePreferences(resourceMatcherForVersion(version)) } - } -// TODO this must be removed and we enable/disable individual resources. -func (o *ResourceConfig) versionEnabled(version schema.GroupVersion) bool { +func (o *ResourceConfig) VersionEnabled(version schema.GroupVersion) bool { enabled, _ := o.GroupVersionConfigs[version] return enabled } @@ -122,32 +101,24 @@ func (o *ResourceConfig) EnableResources(resources ...schema.GroupVersionResourc } func (o *ResourceConfig) ResourceEnabled(resource schema.GroupVersionResource) bool { - // if a resource is explicitly set, that takes priority over the preference of the version. - resourceEnabled, explicitlySet := o.ResourceConfigs[resource] - if explicitlySet { - return resourceEnabled - } - - if !o.versionEnabled(resource.GroupVersion()) { + if !o.VersionEnabled(resource.GroupVersion()) { return false } - // they are enabled by default. - return true + resourceEnabled, explicitlySet := o.ResourceConfigs[resource] + if !explicitlySet { + return true + } + return resourceEnabled } -func (o *ResourceConfig) AnyResourceForGroupEnabled(group string) bool { +func (o *ResourceConfig) AnyVersionForGroupEnabled(group string) bool { for version := range o.GroupVersionConfigs { if version.Group == group { - if o.versionEnabled(version) { + if o.VersionEnabled(version) { return true } } } - for resource := range o.ResourceConfigs { - if resource.Group == group && o.ResourceEnabled(resource) { - return true - } - } return false } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/storage/storage_factory.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/storage/storage_factory.go index d8de4cd84fb4..3b8c71de1fa6 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/storage/storage_factory.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/server/storage/storage_factory.go @@ -240,8 +240,7 @@ func getAllResourcesAlias(resource schema.GroupResource) schema.GroupResource { func (s *DefaultStorageFactory) getStorageGroupResource(groupResource schema.GroupResource) schema.GroupResource { for _, potentialStorageResource := range s.Overrides[groupResource].cohabitatingResources { - // TODO deads2k or liggitt determine if have ever stored any of our cohabitating resources in a different location on new clusters - if s.APIResourceConfigSource.AnyResourceForGroupEnabled(potentialStorageResource.Group) { + if s.APIResourceConfigSource.AnyVersionForGroupEnabled(potentialStorageResource.Group) { return potentialStorageResource } } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/OWNERS b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/OWNERS index 1d8fc58ca1fe..2426b1c0c203 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/OWNERS @@ -1,20 +1,24 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - lavalamp - - liggitt - - wojtek-t +- lavalamp +- liggitt +- timothysc +- wojtek-t +- xiang90 reviewers: - - lavalamp - - smarterclayton - - wojtek-t - - deads2k - - caesarxuchao - - mikedanese - - liggitt - - ncdc - - ingvagabund - - enj -emeritus_approvers: - - xiang90 - - timothysc +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- caesarxuchao +- mikedanese +- liggitt +- ncdc +- timothysc +- hongchaodeng +- krousey +- xiang90 +- ingvagabund +- resouer +- enj diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/cacher/cacher.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/cacher/cacher.go index 84940ab0cd7e..217fa72588c1 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/cacher/cacher.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/cacher/cacher.go @@ -408,7 +408,6 @@ func (c *Cacher) startCaching(stopChannel <-chan struct{}) { successfulList = true c.ready.set(true) klog.V(1).Infof("cacher (%v): initialized", c.objectType.String()) - watchCacheInitializations.WithLabelValues(c.objectType.String()).Inc() }) defer func() { if successfulList { @@ -509,7 +508,7 @@ func (c *Cacher) Watch(ctx context.Context, key string, opts storage.ListOptions // underlying watchCache is calling processEvent under its lock. c.watchCache.RLock() defer c.watchCache.RUnlock() - cacheInterval, err := c.watchCache.getAllEventsSinceLocked(watchRV) + initEvents, err := c.watchCache.GetAllEventsSinceThreadUnsafe(watchRV) if err != nil { // To match the uncached watch implementation, once we have passed authn/authz/admission, // and successfully parsed a resource version, other errors must fail with a watch event of type ERROR, @@ -531,10 +530,15 @@ func (c *Cacher) Watch(ctx context.Context, key string, opts storage.ListOptions c.watcherIdx++ }() - go watcher.processInterval(ctx, cacheInterval, watchRV) + go watcher.processEvents(ctx, initEvents, watchRV) return watcher, nil } +// WatchList implements storage.Interface. +func (c *Cacher) WatchList(ctx context.Context, key string, opts storage.ListOptions) (watch.Interface, error) { + return c.Watch(ctx, key, opts) +} + // Get implements storage.Interface. func (c *Cacher) Get(ctx context.Context, key string, opts storage.GetOptions, objPtr runtime.Object) error { if opts.ResourceVersion == "" { @@ -604,27 +608,77 @@ func shouldDelegateList(opts storage.ListOptions) bool { return resourceVersion == "" || hasContinuation || hasLimit || opts.ResourceVersionMatch == metav1.ResourceVersionMatchExact } -func (c *Cacher) listItems(listRV uint64, key string, pred storage.SelectionPredicate, trace *utiltrace.Trace, recursive bool) ([]interface{}, uint64, string, error) { - if !recursive { - obj, exists, readResourceVersion, err := c.watchCache.WaitUntilFreshAndGet(listRV, key, trace) - if err != nil { - return nil, 0, "", err +// GetToList implements storage.Interface. +func (c *Cacher) GetToList(ctx context.Context, key string, opts storage.ListOptions, listObj runtime.Object) error { + resourceVersion := opts.ResourceVersion + pred := opts.Predicate + if shouldDelegateList(opts) { + return c.storage.GetToList(ctx, key, opts, listObj) + } + + // If resourceVersion is specified, serve it from cache. + // It's guaranteed that the returned value is at least that + // fresh as the given resourceVersion. + listRV, err := c.versioner.ParseResourceVersion(resourceVersion) + if err != nil { + return err + } + + if listRV == 0 && !c.ready.check() { + // If Cacher is not yet initialized and we don't require any specific + // minimal resource version, simply forward the request to storage. + return c.storage.GetToList(ctx, key, opts, listObj) + } + + trace := utiltrace.New("cacher list", utiltrace.Field{"type", c.objectType.String()}) + defer trace.LogIfLong(500 * time.Millisecond) + + c.ready.wait() + trace.Step("Ready") + + // List elements with at least 'listRV' from cache. + listPtr, err := meta.GetItemsPtr(listObj) + if err != nil { + return err + } + listVal, err := conversion.EnforcePtr(listPtr) + if err != nil { + return err + } + if listVal.Kind() != reflect.Slice { + return fmt.Errorf("need a pointer to slice, got %v", listVal.Kind()) + } + filter := filterWithAttrsFunction(key, pred) + + obj, exists, readResourceVersion, err := c.watchCache.WaitUntilFreshAndGet(listRV, key, trace) + if err != nil { + return err + } + trace.Step("Got from cache") + + if exists { + elem, ok := obj.(*storeElement) + if !ok { + return fmt.Errorf("non *storeElement returned from storage: %v", obj) } - if exists { - return []interface{}{obj}, readResourceVersion, "", nil + if filter(elem.Key, elem.Labels, elem.Fields) { + listVal.Set(reflect.Append(listVal, reflect.ValueOf(elem.Object).Elem())) } - return nil, readResourceVersion, "", nil } - return c.watchCache.WaitUntilFreshAndList(listRV, pred.MatcherIndex(), trace) + if c.versioner != nil { + if err := c.versioner.UpdateList(listObj, readResourceVersion, "", nil); err != nil { + return err + } + } + return nil } -// GetList implements storage.Interface -func (c *Cacher) GetList(ctx context.Context, key string, opts storage.ListOptions, listObj runtime.Object) error { - recursive := opts.Recursive +// List implements storage.Interface. +func (c *Cacher) List(ctx context.Context, key string, opts storage.ListOptions, listObj runtime.Object) error { resourceVersion := opts.ResourceVersion pred := opts.Predicate if shouldDelegateList(opts) { - return c.storage.GetList(ctx, key, opts, listObj) + return c.storage.List(ctx, key, opts, listObj) } // If resourceVersion is specified, serve it from cache. @@ -638,10 +692,10 @@ func (c *Cacher) GetList(ctx context.Context, key string, opts storage.ListOptio if listRV == 0 && !c.ready.check() { // If Cacher is not yet initialized and we don't require any specific // minimal resource version, simply forward the request to storage. - return c.storage.GetList(ctx, key, opts, listObj) + return c.storage.List(ctx, key, opts, listObj) } - trace := utiltrace.New("cacher list", utiltrace.Field{Key: "type", Value: c.objectType.String()}) + trace := utiltrace.New("cacher list", utiltrace.Field{"type", c.objectType.String()}) defer trace.LogIfLong(500 * time.Millisecond) c.ready.wait() @@ -661,11 +715,11 @@ func (c *Cacher) GetList(ctx context.Context, key string, opts storage.ListOptio } filter := filterWithAttrsFunction(key, pred) - objs, readResourceVersion, indexUsed, err := c.listItems(listRV, key, pred, trace, recursive) + objs, readResourceVersion, indexUsed, err := c.watchCache.WaitUntilFreshAndList(listRV, pred.MatcherIndex(), trace) if err != nil { return err } - trace.Step("Listed items from cache", utiltrace.Field{Key: "count", Value: len(objs)}) + trace.Step("Listed items from cache", utiltrace.Field{"count", len(objs)}) if len(objs) > listVal.Cap() && pred.Label.Empty() && pred.Field.Empty() { // Resize the slice appropriately, since we already know that none // of the elements will be filtered out. @@ -681,7 +735,7 @@ func (c *Cacher) GetList(ctx context.Context, key string, opts storage.ListOptio listVal.Set(reflect.Append(listVal, reflect.ValueOf(elem.Object).Elem())) } } - trace.Step("Filtered items", utiltrace.Field{Key: "count", Value: listVal.Len()}) + trace.Step("Filtered items", utiltrace.Field{"count", listVal.Len()}) if c.versioner != nil { if err := c.versioner.UpdateList(listObj, readResourceVersion, "", nil); err != nil { return err @@ -773,7 +827,6 @@ func (c *Cacher) dispatchEvents() { c.dispatchEvent(&event) } lastProcessedResourceVersion = event.ResourceVersion - eventsCounter.WithLabelValues(c.objectType.String()).Inc() case <-bookmarkTimer.C(): bookmarkTimer.Reset(wait.Jitter(time.Second, 0.25)) // Never send a bookmark event if we did not see an event here, this is fine @@ -818,11 +871,11 @@ func setCachingObjects(event *watchCacheEvent, versioner storage.Versioner) { // Don't wrap Object for delete events - these are not to deliver any // events. Only wrap PrevObject. if object, err := newCachingObject(event.PrevObject); err == nil { - // Update resource version of the object. + // Update resource version of the underlying object. // event.PrevObject is used to deliver DELETE watch events and // for them, we set resourceVersion to instead of // the resourceVersion of the last modification of the object. - updateResourceVersion(object, versioner, event.ResourceVersion) + updateResourceVersionIfNeeded(object.object, versioner, event.ResourceVersion) event.PrevObject = object } else { klog.Errorf("couldn't create cachingObject from: %#v", event.Object) @@ -851,14 +904,14 @@ func (c *Cacher) dispatchEvent(event *watchCacheEvent) { // from it justifies increased memory usage, so for now we drop the cached // serializations after dispatching this event. // - // Given that CachingObject is just wrapping the object and not perfoming - // deep-copying (until some field is explicitly being modified), we create - // it unconditionally to ensure safety and reduce deep-copying. - // - // Make a shallow copy to allow overwriting Object and PrevObject. - wcEvent := *event - setCachingObjects(&wcEvent, c.versioner) - event = &wcEvent + // Given the deep-copies that are done to create cachingObjects, + // we try to cache serializations only if there are at least 3 watchers. + if len(c.watchersBuffer) >= 3 { + // Make a shallow copy to allow overwriting Object and PrevObject. + wcEvent := *event + setCachingObjects(&wcEvent, c.versioner) + event = &wcEvent + } c.blockedWatchers = c.blockedWatchers[:0] for _, watcher := range c.watchersBuffer { @@ -977,7 +1030,7 @@ func (c *Cacher) finishDispatching() { defer c.Unlock() c.dispatching = false for _, watcher := range c.watchersToStop { - watcher.stopLocked() + watcher.stopThreadUnsafe() } c.watchersToStop = c.watchersToStop[:0] } @@ -985,14 +1038,14 @@ func (c *Cacher) finishDispatching() { func (c *Cacher) terminateAllWatchers() { c.Lock() defer c.Unlock() - c.watchers.terminateAll(c.objectType, c.stopWatcherLocked) + c.watchers.terminateAll(c.objectType, c.stopWatcherThreadUnsafe) } -func (c *Cacher) stopWatcherLocked(watcher *cacheWatcher) { +func (c *Cacher) stopWatcherThreadUnsafe(watcher *cacheWatcher) { if c.dispatching { c.watchersToStop = append(c.watchersToStop, watcher) } else { - watcher.stopLocked() + watcher.stopThreadUnsafe() } } @@ -1022,9 +1075,9 @@ func forgetWatcher(c *Cacher, index int, triggerValue string, triggerSupported b defer c.Unlock() // It's possible that the watcher is already not in the structure (e.g. in case of - // simultaneous Stop() and terminateAllWatchers(), but it is safe to call stopLocked() + // simultaneous Stop() and terminateAllWatchers(), but it is safe to call stopThreadUnsafe() // on a watcher multiple times. - c.watchers.deleteWatcher(index, triggerValue, triggerSupported, c.stopWatcherLocked) + c.watchers.deleteWatcher(index, triggerValue, triggerSupported, c.stopWatcherThreadUnsafe) } } @@ -1072,12 +1125,7 @@ func (lw *cacherListerWatcher) List(options metav1.ListOptions) (runtime.Object, Continue: options.Continue, } - storageOpts := storage.ListOptions{ - ResourceVersionMatch: options.ResourceVersionMatch, - Predicate: pred, - Recursive: true, - } - if err := lw.storage.GetList(context.TODO(), lw.resourcePrefix, storageOpts, list); err != nil { + if err := lw.storage.List(context.TODO(), lw.resourcePrefix, storage.ListOptions{ResourceVersionMatch: options.ResourceVersionMatch, Predicate: pred}, list); err != nil { return nil, err } return list, nil @@ -1088,10 +1136,11 @@ func (lw *cacherListerWatcher) Watch(options metav1.ListOptions) (watch.Interfac opts := storage.ListOptions{ ResourceVersion: options.ResourceVersion, Predicate: storage.Everything, - Recursive: true, - ProgressNotify: true, } - return lw.storage.Watch(context.TODO(), lw.resourcePrefix, opts) + if utilfeature.DefaultFeatureGate.Enabled(features.EfficientWatchResumption) { + opts.ProgressNotify = true + } + return lw.storage.WatchList(context.TODO(), lw.resourcePrefix, opts) } // errWatcher implements watch.Interface to return a single error @@ -1182,8 +1231,8 @@ func (c *cacheWatcher) Stop() { c.forget() } -// we rely on the fact that stopLocked is actually protected by Cacher.Lock() -func (c *cacheWatcher) stopLocked() { +// we rely on the fact that stopThredUnsafe is actually protected by Cacher.Lock() +func (c *cacheWatcher) stopThreadUnsafe() { if !c.stopped { c.stopped = true close(c.done) @@ -1255,17 +1304,20 @@ func (c *cacheWatcher) nextBookmarkTime(now time.Time, bookmarkFrequency time.Du return heartbeatTime, true } -func getMutableObject(object runtime.Object) runtime.Object { - if _, ok := object.(*cachingObject); ok { +func getEventObject(object runtime.Object) runtime.Object { + if _, ok := object.(runtime.CacheableObject); ok { // It is safe to return without deep-copy, because the underlying - // object will lazily perform deep-copy on the first try to change - // any of its fields. + // object was already deep-copied during construction. return object } return object.DeepCopyObject() } -func updateResourceVersion(object runtime.Object, versioner storage.Versioner, resourceVersion uint64) { +func updateResourceVersionIfNeeded(object runtime.Object, versioner storage.Versioner, resourceVersion uint64) { + if _, ok := object.(*cachingObject); ok { + // We assume that for cachingObject resourceVersion was already propagated before. + return + } if err := versioner.UpdateObject(object, resourceVersion); err != nil { utilruntime.HandleError(fmt.Errorf("failure to version api object (%d) %#v: %v", resourceVersion, object, err)) } @@ -1288,17 +1340,13 @@ func (c *cacheWatcher) convertToWatchEvent(event *watchCacheEvent) *watch.Event switch { case curObjPasses && !oldObjPasses: - return &watch.Event{Type: watch.Added, Object: getMutableObject(event.Object)} + return &watch.Event{Type: watch.Added, Object: getEventObject(event.Object)} case curObjPasses && oldObjPasses: - return &watch.Event{Type: watch.Modified, Object: getMutableObject(event.Object)} + return &watch.Event{Type: watch.Modified, Object: getEventObject(event.Object)} case !curObjPasses && oldObjPasses: // return a delete event with the previous object content, but with the event's resource version - oldObj := getMutableObject(event.PrevObject) - // We know that if oldObj is cachingObject (which can only be set via - // setCachingObjects), its resourceVersion is already set correctly and - // we don't need to update it. However, since cachingObject efficiently - // handles noop updates, we avoid this microoptimization here. - updateResourceVersion(oldObj, c.versioner, event.ResourceVersion) + oldObj := getEventObject(event.PrevObject) + updateResourceVersionIfNeeded(oldObj, c.versioner, event.ResourceVersion) return &watch.Event{Type: watch.Deleted, Object: oldObj} } @@ -1320,7 +1368,7 @@ func (c *cacheWatcher) sendWatchCacheEvent(event *watchCacheEvent) { // would give us non-determinism. // At the same time, we don't want to block infinitely on putting // to c.result, when c.done is already closed. - // + // This ensures that with c.done already close, we at most once go // into the next select after this. With that, no matter which // statement we choose there, we will deliver only consecutive @@ -1337,10 +1385,8 @@ func (c *cacheWatcher) sendWatchCacheEvent(event *watchCacheEvent) { } } -func (c *cacheWatcher) processInterval(ctx context.Context, cacheInterval *watchCacheInterval, resourceVersion uint64) { +func (c *cacheWatcher) processEvents(ctx context.Context, initEvents []*watchCacheEvent, resourceVersion uint64) { defer utilruntime.HandleCrash() - defer close(c.result) - defer c.Stop() // Check how long we are processing initEvents. // As long as these are not processed, we are not processing @@ -1357,46 +1403,22 @@ func (c *cacheWatcher) processInterval(ctx context.Context, cacheInterval *watch // consider increase size of result buffer in those cases. const initProcessThreshold = 500 * time.Millisecond startTime := time.Now() - - initEventCount := 0 - for { - event, err := cacheInterval.Next() - if err != nil { - // An error indicates that the cache interval - // has been invalidated and can no longer serve - // events. - // - // Initially we considered sending an "out-of-history" - // Error event in this case, but because historically - // such events weren't sent out of the watchCache, we - // decided not to. This is still ok, because on watch - // closure, the watcher will try to re-instantiate the - // watch and then will get an explicit "out-of-history" - // window. There is potential for optimization, but for - // now, in order to be on the safe side and not break - // custom clients, the cost of it is something that we - // are fully accepting. - klog.Warningf("couldn't retrieve watch event to serve: %#v", err) - return - } - if event == nil { - break - } + for _, event := range initEvents { c.sendWatchCacheEvent(event) - // With some events already sent, update resourceVersion so that - // events that were buffered and not yet processed won't be delivered - // to this watcher second time causing going back in time. - resourceVersion = event.ResourceVersion - initEventCount++ } objType := c.objectType.String() - if initEventCount > 0 { - initCounter.WithLabelValues(objType).Add(float64(initEventCount)) + if len(initEvents) > 0 { + initCounter.WithLabelValues(objType).Add(float64(len(initEvents))) + // With some events already sent, update resourceVersion + // so that events that were buffered and not yet processed + // won't be delivered to this watcher second time causing + // going back in time. + resourceVersion = initEvents[len(initEvents)-1].ResourceVersion } processingTime := time.Since(startTime) if processingTime > initProcessThreshold { - klog.V(2).Infof("processing %d initEvents of %s (%s) took %v", initEventCount, objType, c.identifier, processingTime) + klog.V(2).Infof("processing %d initEvents of %s (%s) took %v", len(initEvents), objType, c.identifier, processingTime) } c.process(ctx, resourceVersion) @@ -1411,6 +1433,8 @@ func (c *cacheWatcher) process(ctx context.Context, resourceVersion uint64) { // process, but we're leaving this to the tuning phase. utilflowcontrol.WatchInitialized(ctx) + defer close(c.result) + defer c.Stop() for { select { case event, ok := <-c.input: diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/cacher/caching_object.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/cacher/caching_object.go index 2e3ea6a7da6f..752a28714c30 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/cacher/caching_object.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/cacher/caching_object.go @@ -60,20 +60,11 @@ type serializationsCache map[runtime.Identifier]*serializationResult // so that each of those is computed exactly once. // // cachingObject implements the metav1.Object interface (accessors for -// all metadata fields). +// all metadata fields). However, setters for all fields except from +// SelfLink (which is set lately in the path) are ignored. type cachingObject struct { lock sync.RWMutex - // deepCopied defines whether the object below has already been - // deep copied. The operation is performed lazily on the first - // setXxx operation. - // - // The lazy deep-copy make is useful, as effectively the only - // case when we are setting some fields are ResourceVersion for - // DELETE events, so in all other cases we can effectively avoid - // performing any deep copies. - deepCopied bool - // Object for which serializations are cached. object metaRuntimeInterface @@ -89,10 +80,7 @@ type cachingObject struct { // metav1.Object type. func newCachingObject(object runtime.Object) (*cachingObject, error) { if obj, ok := object.(metaRuntimeInterface); ok { - result := &cachingObject{ - object: obj, - deepCopied: false, - } + result := &cachingObject{object: obj.DeepCopyObject().(metaRuntimeInterface)} result.serializations.Store(make(serializationsCache)) return result, nil } @@ -137,10 +125,6 @@ func (o *cachingObject) CacheEncode(id runtime.Identifier, encode func(runtime.O result := o.getSerializationResult(id) result.once.Do(func() { buffer := bytes.NewBuffer(nil) - // TODO(wojtek-t): This is currently making a copy to avoid races - // in cases where encoding is making subtle object modifications, - // e.g. #82497 - // Figure out if we can somehow avoid this under some conditions. result.err = encode(o.GetObject(), buffer) result.raw = buffer.Bytes() }) @@ -173,9 +157,7 @@ func (o *cachingObject) DeepCopyObject() runtime.Object { // DeepCopyObject on cachingObject is not expected to be called anywhere. // However, to be on the safe-side, we implement it, though given the // cache is only an optimization we ignore copying it. - result := &cachingObject{ - deepCopied: true, - } + result := &cachingObject{} result.serializations.Store(make(serializationsCache)) o.lock.RLock() @@ -233,10 +215,6 @@ func (o *cachingObject) conditionalSet(isNoop func() bool, set func()) { if isNoop() { return } - if !o.deepCopied { - o.object = o.object.DeepCopyObject().(metaRuntimeInterface) - o.deepCopied = true - } o.invalidateCacheLocked() set() } @@ -395,15 +373,15 @@ func (o *cachingObject) SetOwnerReferences(references []metav1.OwnerReference) { func() { o.object.SetOwnerReferences(references) }, ) } -func (o *cachingObject) GetZZZ_DeprecatedClusterName() string { +func (o *cachingObject) GetClusterName() string { o.lock.RLock() defer o.lock.RUnlock() - return o.object.GetZZZ_DeprecatedClusterName() + return o.object.GetClusterName() } -func (o *cachingObject) SetZZZ_DeprecatedClusterName(clusterName string) { +func (o *cachingObject) SetClusterName(clusterName string) { o.conditionalSet( - func() bool { return o.object.GetZZZ_DeprecatedClusterName() == clusterName }, - func() { o.object.SetZZZ_DeprecatedClusterName(clusterName) }, + func() bool { return o.object.GetClusterName() == clusterName }, + func() { o.object.SetClusterName(clusterName) }, ) } func (o *cachingObject) GetManagedFields() []metav1.ManagedFieldsEntry { diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/cacher/metrics.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/cacher/metrics.go index 798db0ba5e25..4d41889f2a44 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/cacher/metrics.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/cacher/metrics.go @@ -21,11 +21,6 @@ import ( "k8s.io/component-base/metrics/legacyregistry" ) -const ( - namespace = "apiserver" - subsystem = "watch_cache" -) - /* * By default, all the following metrics are defined as falling under * ALPHA stability level https://github.com/kubernetes/enhancements/blob/master/keps/sig-instrumentation/1209-metrics-stability/kubernetes-control-plane-metrics-stability.md#stability-classes) @@ -38,18 +33,7 @@ var ( initCounter = metrics.NewCounterVec( &metrics.CounterOpts{ Name: "apiserver_init_events_total", - Help: "Counter of init events processed in watch cache broken by resource type.", - StabilityLevel: metrics.ALPHA, - }, - []string{"resource"}, - ) - - eventsCounter = metrics.NewCounterVec( - &metrics.CounterOpts{ - Namespace: namespace, - Subsystem: subsystem, - Name: "events_dispatched_total", - Help: "Counter of events dispatched in watch cache broken by resource type.", + Help: "Counter of init events processed in watchcache broken by resource type.", StabilityLevel: metrics.ALPHA, }, []string{"resource"}, @@ -90,27 +74,14 @@ var ( }, []string{"resource"}, ) - - watchCacheInitializations = metrics.NewCounterVec( - &metrics.CounterOpts{ - Namespace: namespace, - Subsystem: subsystem, - Name: "watch_cache_initializations_total", - Help: "Counter of watch cache initializations broken by resource type.", - StabilityLevel: metrics.ALPHA, - }, - []string{"resource"}, - ) ) func init() { legacyregistry.MustRegister(initCounter) - legacyregistry.MustRegister(eventsCounter) legacyregistry.MustRegister(terminatedWatchersCounter) legacyregistry.MustRegister(watchCacheCapacityIncreaseTotal) legacyregistry.MustRegister(watchCacheCapacityDecreaseTotal) legacyregistry.MustRegister(watchCacheCapacity) - legacyregistry.MustRegister(watchCacheInitializations) } // recordsWatchCacheCapacityChange record watchCache capacity resize(increase or decrease) operations. diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/cacher/watch_cache.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/cacher/watch_cache.go index 3c9bd926893a..f52bdd053e95 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/cacher/watch_cache.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/cacher/watch_cache.go @@ -189,9 +189,6 @@ type watchCache struct { // cacher's objectType. objectType reflect.Type - - // For testing cache interval invalidation. - indexValidator indexValidator } func newWatchCache( @@ -222,8 +219,6 @@ func newWatchCache( objType := objectType.String() watchCacheCapacity.WithLabelValues(objType).Set(float64(wc.capacity)) wc.cond = sync.NewCond(wc.RLocker()) - wc.indexValidator = wc.isIndexValidLocked - return wc } @@ -573,21 +568,7 @@ func (w *watchCache) SetOnReplace(onReplace func()) { w.onReplace = onReplace } -func (w *watchCache) Resync() error { - // Nothing to do - return nil -} - -// isIndexValidLocked checks if a given index is still valid. -// This assumes that the lock is held. -func (w *watchCache) isIndexValidLocked(index int) bool { - return index >= w.startIndex -} - -// getAllEventsSinceLocked returns a watchCacheInterval that can be used to -// retrieve events since a certain resourceVersion. This function assumes to -// be called under the watchCache lock. -func (w *watchCache) getAllEventsSinceLocked(resourceVersion uint64) (*watchCacheInterval, error) { +func (w *watchCache) GetAllEventsSinceThreadUnsafe(resourceVersion uint64) ([]*watchCacheEvent, error) { size := w.endIndex - w.startIndex var oldest uint64 switch { @@ -613,11 +594,27 @@ func (w *watchCache) getAllEventsSinceLocked(resourceVersion uint64) (*watchCach // current state and only then start watching from that point. // // TODO: In v2 api, we should stop returning the current state - #13969. - ci, err := newCacheIntervalFromStore(w.resourceVersion, w.store, w.getAttrsFunc) - if err != nil { - return nil, err + allItems := w.store.List() + result := make([]*watchCacheEvent, len(allItems)) + for i, item := range allItems { + elem, ok := item.(*storeElement) + if !ok { + return nil, fmt.Errorf("not a storeElement: %v", elem) + } + objLabels, objFields, err := w.getAttrsFunc(elem.Object) + if err != nil { + return nil, err + } + result[i] = &watchCacheEvent{ + Type: watch.Added, + Object: elem.Object, + ObjLabels: objLabels, + ObjFields: objFields, + Key: elem.Key, + ResourceVersion: w.resourceVersion, + } } - return ci, nil + return result, nil } if resourceVersion < oldest-1 { return nil, errors.NewResourceExpired(fmt.Sprintf("too old resource version: %d (%d)", resourceVersion, oldest-1)) @@ -628,9 +625,14 @@ func (w *watchCache) getAllEventsSinceLocked(resourceVersion uint64) (*watchCach return w.cache[(w.startIndex+i)%w.capacity].ResourceVersion > resourceVersion } first := sort.Search(size, f) - indexerFunc := func(i int) *watchCacheEvent { - return w.cache[i%w.capacity] + result := make([]*watchCacheEvent, size-first) + for i := 0; i < size-first; i++ { + result[i] = w.cache[(w.startIndex+first+i)%w.capacity] } - ci := newCacheInterval(w.startIndex+first, w.endIndex, indexerFunc, w.indexValidator, &w.RWMutex) - return ci, nil + return result, nil +} + +func (w *watchCache) Resync() error { + // Nothing to do + return nil } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/cacher/watch_cache_interval.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/cacher/watch_cache_interval.go deleted file mode 100644 index 833d10e153a1..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/cacher/watch_cache_interval.go +++ /dev/null @@ -1,224 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cacher - -import ( - "fmt" - "sync" - - "k8s.io/apimachinery/pkg/fields" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/tools/cache" -) - -// watchCacheInterval serves as an abstraction over a source -// of watchCacheEvents. It maintains a window of events over -// an underlying source and these events can be served using -// the exposed Next() API. The main intent for doing things -// this way is to introduce an upper bound of memory usage -// for starting a watch and reduce the maximum possible time -// interval for which the lock would be held while events are -// copied over. -// -// The source of events for the interval is typically either -// the watchCache circular buffer, if events being retrieved -// need to be for resource versions > 0 or the underlying -// implementation of Store, if resource version = 0. -// -// Furthermore, an interval can be either valid or invalid at -// any given point of time. The notion of validity makes sense -// only in cases where the window of events in the underlying -// source can change over time - i.e. for watchCache circular -// buffer. When the circular buffer is full and an event needs -// to be popped off, watchCache::startIndex is incremented. In -// this case, an interval tracking that popped event is valid -// only if it has already been copied to its internal buffer. -// However, for efficiency we perform that lazily and we mark -// an interval as invalid iff we need to copy events from the -// watchCache and we end up needing events that have already -// been popped off. This translates to the following condition: -// watchCacheInterval::startIndex >= watchCache::startIndex. -// When this condition becomes false, the interval is no longer -// valid and should not be used to retrieve and serve elements -// from the underlying source. -type watchCacheInterval struct { - // startIndex denotes the starting point of the interval - // being considered. The value is the index in the actual - // source of watchCacheEvents. If the source of events is - // the watchCache, then this must be used modulo capacity. - startIndex int - - // endIndex denotes the ending point of the interval being - // considered. The value is the index in the actual source - // of events. If the source of the events is the watchCache, - // then this should be used modulo capacity. - endIndex int - - // indexer is meant to inject behaviour for how an event must - // be retrieved from the underlying source given an index. - indexer indexerFunc - - // indexValidator is used to check if a given index is still - // valid perspective. If it is deemed that the index is not - // valid, then this interval can no longer be used to serve - // events. Use of indexValidator is warranted only in cases - // where the window of events in the underlying source can - // change over time. Furthermore, an interval is invalid if - // its startIndex no longer coincides with the startIndex of - // underlying source. - indexValidator indexValidator - - // buffer holds watchCacheEvents that this interval returns on - // a call to Next(). This exists mainly to reduce acquiring the - // lock on each invocation of Next(). - buffer *watchCacheIntervalBuffer - - // lock effectively protects access to the underlying source - // of events through - indexer and indexValidator. - // - // Given that indexer and indexValidator only read state, if - // possible, Locker obtained through RLocker() is provided. - lock sync.Locker -} - -type attrFunc func(runtime.Object) (labels.Set, fields.Set, error) -type indexerFunc func(int) *watchCacheEvent -type indexValidator func(int) bool - -func newCacheInterval(startIndex, endIndex int, indexer indexerFunc, indexValidator indexValidator, locker sync.Locker) *watchCacheInterval { - return &watchCacheInterval{ - startIndex: startIndex, - endIndex: endIndex, - indexer: indexer, - indexValidator: indexValidator, - buffer: &watchCacheIntervalBuffer{buffer: make([]*watchCacheEvent, bufferSize)}, - lock: locker, - } -} - -// newCacheIntervalFromStore is meant to handle the case of rv=0, such that the events -// returned by Next() need to be events from a List() done on the underlying store of -// the watch cache. -func newCacheIntervalFromStore(resourceVersion uint64, store cache.Indexer, getAttrsFunc attrFunc) (*watchCacheInterval, error) { - buffer := &watchCacheIntervalBuffer{} - allItems := store.List() - buffer.buffer = make([]*watchCacheEvent, len(allItems)) - for i, item := range allItems { - elem, ok := item.(*storeElement) - if !ok { - return nil, fmt.Errorf("not a storeElement: %v", elem) - } - objLabels, objFields, err := getAttrsFunc(elem.Object) - if err != nil { - return nil, err - } - buffer.buffer[i] = &watchCacheEvent{ - Type: watch.Added, - Object: elem.Object, - ObjLabels: objLabels, - ObjFields: objFields, - Key: elem.Key, - ResourceVersion: resourceVersion, - } - buffer.endIndex++ - } - ci := &watchCacheInterval{ - startIndex: 0, - // Simulate that we already have all the events we're looking for. - endIndex: 0, - buffer: buffer, - } - - return ci, nil -} - -// Next returns the next item in the cache interval provided the cache -// interval is still valid. An error is returned if the interval is -// invalidated. -func (wci *watchCacheInterval) Next() (*watchCacheEvent, error) { - // if there are items in the buffer to return, return from - // the buffer. - if event, exists := wci.buffer.next(); exists { - return event, nil - } - // check if there are still other events in this interval - // that can be processed. - if wci.startIndex >= wci.endIndex { - return nil, nil - } - wci.lock.Lock() - defer wci.lock.Unlock() - - if valid := wci.indexValidator(wci.startIndex); !valid { - return nil, fmt.Errorf("cache interval invalidated, interval startIndex: %d", wci.startIndex) - } - - wci.fillBuffer() - if event, exists := wci.buffer.next(); exists { - return event, nil - } - return nil, nil -} - -func (wci *watchCacheInterval) fillBuffer() { - wci.buffer.startIndex = 0 - wci.buffer.endIndex = 0 - for wci.startIndex < wci.endIndex && !wci.buffer.isFull() { - event := wci.indexer(wci.startIndex) - if event == nil { - break - } - wci.buffer.buffer[wci.buffer.endIndex] = event - wci.buffer.endIndex++ - wci.startIndex++ - } -} - -const bufferSize = 100 - -// watchCacheIntervalBuffer is used to reduce acquiring -// the lock on each invocation of watchCacheInterval.Next(). -type watchCacheIntervalBuffer struct { - // buffer is used to hold watchCacheEvents that - // the interval returns on a call to Next(). - buffer []*watchCacheEvent - // The first element of buffer is defined by startIndex, - // its last element is defined by endIndex. - startIndex int - endIndex int -} - -// next returns the next event present in the interval buffer provided -// it is not empty. -func (wcib *watchCacheIntervalBuffer) next() (*watchCacheEvent, bool) { - if wcib.isEmpty() { - return nil, false - } - next := wcib.buffer[wcib.startIndex] - wcib.startIndex++ - return next, true -} - -func (wcib *watchCacheIntervalBuffer) isFull() bool { - return wcib.endIndex >= bufferSize -} - -func (wcib *watchCacheIntervalBuffer) isEmpty() bool { - return wcib.startIndex == wcib.endIndex -} diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/errors.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/errors.go index ed4f4d0d0e8e..9c72d59fbf97 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/errors.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/errors.go @@ -97,8 +97,8 @@ func IsNotFound(err error) bool { return isErrCode(err, ErrCodeKeyNotFound) } -// IsExist returns true if and only if err is "key" already exists error. -func IsExist(err error) bool { +// IsNodeExist returns true if and only if err is an node already exist error. +func IsNodeExist(err error) bool { return isErrCode(err, ErrCodeKeyExists) } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/errors/storage.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/errors/storage.go index 89f345398012..fd3b35ed06fe 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/errors/storage.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/errors/storage.go @@ -56,7 +56,7 @@ func InterpretGetError(err error, qualifiedResource schema.GroupResource, name s // operation into the appropriate API error. func InterpretCreateError(err error, qualifiedResource schema.GroupResource, name string) error { switch { - case storage.IsExist(err): + case storage.IsNodeExist(err): return errors.NewAlreadyExists(qualifiedResource, name) case storage.IsUnreachable(err): return errors.NewServerTimeout(qualifiedResource, "create", 2) // TODO: make configurable or handled at a higher level @@ -71,7 +71,7 @@ func InterpretCreateError(err error, qualifiedResource schema.GroupResource, nam // operation into the appropriate API error. func InterpretUpdateError(err error, qualifiedResource schema.GroupResource, name string) error { switch { - case storage.IsConflict(err), storage.IsExist(err), storage.IsInvalidObj(err): + case storage.IsConflict(err), storage.IsNodeExist(err), storage.IsInvalidObj(err): return errors.NewConflict(qualifiedResource, name, err) case storage.IsUnreachable(err): return errors.NewServerTimeout(qualifiedResource, "update", 2) // TODO: make configurable or handled at a higher level @@ -92,7 +92,7 @@ func InterpretDeleteError(err error, qualifiedResource schema.GroupResource, nam return errors.NewNotFound(qualifiedResource, name) case storage.IsUnreachable(err): return errors.NewServerTimeout(qualifiedResource, "delete", 2) // TODO: make configurable or handled at a higher level - case storage.IsConflict(err), storage.IsExist(err), storage.IsInvalidObj(err): + case storage.IsConflict(err), storage.IsNodeExist(err), storage.IsInvalidObj(err): return errors.NewConflict(qualifiedResource, name, err) case storage.IsInternalError(err): return errors.NewInternalError(err) diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/etcd3/OWNERS b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/etcd3/OWNERS index 6b7e2928ea13..bdb4d402aa6f 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/etcd3/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/etcd3/OWNERS @@ -1,4 +1,6 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - wojtek-t +- wojtek-t +- timothysc +- hongchaodeng diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/etcd3/api_object_versioner.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/etcd3/api_object_versioner.go index a5e88fd01c5f..c42fc6e08eae 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/etcd3/api_object_versioner.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/etcd3/api_object_versioner.go @@ -60,7 +60,7 @@ func (a APIObjectVersioner) UpdateList(obj runtime.Object, resourceVersion uint6 return nil } -// PrepareObjectForStorage clears resourceVersion and selfLink prior to writing to etcd. +// PrepareObjectForStorage clears resource version and self link prior to writing to etcd. func (a APIObjectVersioner) PrepareObjectForStorage(obj runtime.Object) error { accessor, err := meta.Accessor(obj) if err != nil { diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/etcd3/latency_tracker.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/etcd3/latency_tracker.go deleted file mode 100644 index a387b79cc597..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/etcd3/latency_tracker.go +++ /dev/null @@ -1,107 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package etcd3 - -import ( - "context" - "time" - - clientv3 "go.etcd.io/etcd/client/v3" - endpointsrequest "k8s.io/apiserver/pkg/endpoints/request" -) - -// NewETCDLatencyTracker returns an implementation of -// clientv3.KV that times the calls from the specified -// 'delegate' KV instance in order to track latency incurred. -func NewETCDLatencyTracker(delegate clientv3.KV) clientv3.KV { - return &clientV3KVLatencyTracker{KV: delegate} -} - -// clientV3KVLatencyTracker decorates a clientv3.KV instance and times -// each call so we can track the latency an API request incurs in etcd -// round trips (the time it takes to send data to etcd and get the -// complete response back) -// -// If an API request involves N (N>=1) round trips to etcd, then we will sum -// up the latenciy incurred in each roundtrip. - -// It uses the context associated with the request in flight, so there -// are no states shared among the requests in flight, and so there is no -// concurrency overhead. -// If the goroutine executing the request handler makes concurrent calls -// to the underlying storage layer, that is protected since the latency -// tracking function TrackStorageLatency is thread safe. -// -// NOTE: Compact is an asynchronous process and is not associated with -// any request, so we will not be tracking its latency. -type clientV3KVLatencyTracker struct { - clientv3.KV -} - -func (c *clientV3KVLatencyTracker) Put(ctx context.Context, key, val string, opts ...clientv3.OpOption) (*clientv3.PutResponse, error) { - startedAt := time.Now() - defer func() { - endpointsrequest.TrackStorageLatency(ctx, time.Since(startedAt)) - }() - - return c.KV.Put(ctx, key, val, opts...) -} - -func (c *clientV3KVLatencyTracker) Get(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.GetResponse, error) { - startedAt := time.Now() - defer func() { - endpointsrequest.TrackStorageLatency(ctx, time.Since(startedAt)) - }() - - return c.KV.Get(ctx, key, opts...) -} - -func (c *clientV3KVLatencyTracker) Delete(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.DeleteResponse, error) { - startedAt := time.Now() - defer func() { - endpointsrequest.TrackStorageLatency(ctx, time.Since(startedAt)) - }() - - return c.KV.Delete(ctx, key, opts...) -} - -func (c *clientV3KVLatencyTracker) Do(ctx context.Context, op clientv3.Op) (clientv3.OpResponse, error) { - startedAt := time.Now() - defer func() { - endpointsrequest.TrackStorageLatency(ctx, time.Since(startedAt)) - }() - - return c.KV.Do(ctx, op) -} - -func (c *clientV3KVLatencyTracker) Txn(ctx context.Context) clientv3.Txn { - return &clientV3TxnTracker{ctx: ctx, Txn: c.KV.Txn(ctx)} -} - -type clientV3TxnTracker struct { - ctx context.Context - clientv3.Txn -} - -func (t *clientV3TxnTracker) Commit() (*clientv3.TxnResponse, error) { - startedAt := time.Now() - defer func() { - endpointsrequest.TrackStorageLatency(t.ctx, time.Since(startedAt)) - }() - - return t.Txn.Commit() -} diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/etcd3/logger.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/etcd3/logger.go index 773d12f6f156..26be6ead90f3 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/etcd3/logger.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/etcd3/logger.go @@ -32,20 +32,20 @@ type klogWrapper struct{} const klogWrapperDepth = 4 func (klogWrapper) Info(args ...interface{}) { - if klogV := klog.V(5); klogV.Enabled() { - klogV.InfoSDepth(klogWrapperDepth, fmt.Sprint(args...)) + if klog.V(5).Enabled() { + klog.InfoDepth(klogWrapperDepth, args...) } } func (klogWrapper) Infoln(args ...interface{}) { - if klogV := klog.V(5); klogV.Enabled() { - klogV.InfoSDepth(klogWrapperDepth, fmt.Sprintln(args...)) + if klog.V(5).Enabled() { + klog.InfoDepth(klogWrapperDepth, fmt.Sprintln(args...)) } } func (klogWrapper) Infof(format string, args ...interface{}) { - if klogV := klog.V(5); klogV.Enabled() { - klog.V(5).InfoSDepth(klogWrapperDepth, fmt.Sprintf(format, args...)) + if klog.V(5).Enabled() { + klog.InfoDepth(klogWrapperDepth, fmt.Sprintf(format, args...)) } } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/etcd3/store.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/etcd3/store.go index 75a6c3b58b88..37d411c774fe 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/etcd3/store.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/etcd3/store.go @@ -48,13 +48,6 @@ import ( utiltrace "k8s.io/utils/trace" ) -const ( - // maxLimit is a maximum page limit increase used when fetching objects from etcd. - // This limit is used only for increasing page size by kube-apiserver. If request - // specifies larger limit initially, it won't be changed. - maxLimit = 10000 -) - // authenticatedDataString satisfies the value.Context interface. It uses the key to // authenticate the stored data. This does not defend against reuse of previously // encrypted values under the same key, but will prevent an attacker from using an @@ -143,7 +136,7 @@ func (s *store) Get(ctx context.Context, key string, opts storage.GetOptions, ou } kv := getResp.Kvs[0] - data, _, err := s.transformer.TransformFromStorage(ctx, kv.Value, authenticatedDataString(key)) + data, _, err := s.transformer.TransformFromStorage(kv.Value, authenticatedDataString(key)) if err != nil { return storage.NewInternalError(err.Error()) } @@ -170,7 +163,7 @@ func (s *store) Create(ctx context.Context, key string, obj, out runtime.Object, return err } - newData, err := s.transformer.TransformToStorage(ctx, data, authenticatedDataString(key)) + newData, err := s.transformer.TransformToStorage(data, authenticatedDataString(key)) if err != nil { return storage.NewInternalError(err.Error()) } @@ -218,7 +211,7 @@ func (s *store) conditionalDelete( if err != nil { return nil, err } - return s.getState(ctx, getResp, key, v, false) + return s.getState(getResp, key, v, false) } var origState *objState @@ -303,7 +296,7 @@ func (s *store) conditionalDelete( if !txnResp.Succeeded { getResp := (*clientv3.GetResponse)(txnResp.Responses[0].GetResponseRange()) klog.V(4).Infof("deletion of %s failed because of a conflict, going to retry", key) - origState, err = s.getState(ctx, getResp, key, v, false) + origState, err = s.getState(getResp, key, v, false) if err != nil { return err } @@ -334,7 +327,7 @@ func (s *store) GuaranteedUpdate( if err != nil { return nil, err } - return s.getState(ctx, getResp, key, v, ignoreNotFound) + return s.getState(getResp, key, v, ignoreNotFound) } var origState *objState @@ -422,7 +415,7 @@ func (s *store) GuaranteedUpdate( } } - newData, err := s.transformer.TransformToStorage(ctx, data, transformContext) + newData, err := s.transformer.TransformToStorage(data, transformContext) if err != nil { return storage.NewInternalError(err.Error()) } @@ -449,7 +442,7 @@ func (s *store) GuaranteedUpdate( if !txnResp.Succeeded { getResp := (*clientv3.GetResponse)(txnResp.Responses[0].GetResponseRange()) klog.V(4).Infof("GuaranteedUpdate of %s failed because of a conflict, going to retry", key) - origState, err = s.getState(ctx, getResp, key, v, ignoreNotFound) + origState, err = s.getState(getResp, key, v, ignoreNotFound) if err != nil { return err } @@ -463,6 +456,62 @@ func (s *store) GuaranteedUpdate( } } +// GetToList implements storage.Interface.GetToList. +func (s *store) GetToList(ctx context.Context, key string, listOpts storage.ListOptions, listObj runtime.Object) error { + resourceVersion := listOpts.ResourceVersion + match := listOpts.ResourceVersionMatch + pred := listOpts.Predicate + trace := utiltrace.New("GetToList etcd3", + utiltrace.Field{"key", key}, + utiltrace.Field{"resourceVersion", resourceVersion}, + utiltrace.Field{"resourceVersionMatch", match}, + utiltrace.Field{"limit", pred.Limit}, + utiltrace.Field{"continue", pred.Continue}) + defer trace.LogIfLong(500 * time.Millisecond) + listPtr, err := meta.GetItemsPtr(listObj) + if err != nil { + return err + } + v, err := conversion.EnforcePtr(listPtr) + if err != nil || v.Kind() != reflect.Slice { + return fmt.Errorf("need ptr to slice: %v", err) + } + + newItemFunc := getNewItemFunc(listObj, v) + + key = path.Join(s.pathPrefix, key) + startTime := time.Now() + var opts []clientv3.OpOption + if len(resourceVersion) > 0 && match == metav1.ResourceVersionMatchExact { + rv, err := s.versioner.ParseResourceVersion(resourceVersion) + if err != nil { + return apierrors.NewBadRequest(fmt.Sprintf("invalid resource version: %v", err)) + } + opts = append(opts, clientv3.WithRev(int64(rv))) + } + + getResp, err := s.client.KV.Get(ctx, key, opts...) + metrics.RecordEtcdRequestLatency("get", getTypeName(listPtr), startTime) + if err != nil { + return err + } + if err = s.validateMinimumResourceVersion(resourceVersion, uint64(getResp.Header.Revision)); err != nil { + return err + } + + if len(getResp.Kvs) > 0 { + data, _, err := s.transformer.TransformFromStorage(getResp.Kvs[0].Value, authenticatedDataString(key)) + if err != nil { + return storage.NewInternalError(err.Error()) + } + if err := appendListItem(v, data, uint64(getResp.Kvs[0].ModRevision), pred, s.codec, s.versioner, newItemFunc); err != nil { + return err + } + } + // update version with cluster level revision + return s.versioner.UpdateList(listObj, uint64(getResp.Header.Revision), "", nil) +} + func getNewItemFunc(listObj runtime.Object, v reflect.Value) func() runtime.Object { // For unstructured lists with a target group/version, preserve the group/version in the instantiated list items if unstructuredList, isUnstructured := listObj.(*unstructured.UnstructuredList); isUnstructured { @@ -559,13 +608,12 @@ func encodeContinue(key, keyPrefix string, resourceVersion int64) (string, error return base64.RawURLEncoding.EncodeToString(out), nil } -// GetList implements storage.Interface. -func (s *store) GetList(ctx context.Context, key string, opts storage.ListOptions, listObj runtime.Object) error { - recursive := opts.Recursive +// List implements storage.Interface.List. +func (s *store) List(ctx context.Context, key string, opts storage.ListOptions, listObj runtime.Object) error { resourceVersion := opts.ResourceVersion match := opts.ResourceVersionMatch pred := opts.Predicate - trace := utiltrace.New(fmt.Sprintf("List(recursive=%v) etcd3", recursive), + trace := utiltrace.New("List etcd3", utiltrace.Field{"key", key}, utiltrace.Field{"resourceVersion", resourceVersion}, utiltrace.Field{"resourceVersionMatch", match}, @@ -580,24 +628,24 @@ func (s *store) GetList(ctx context.Context, key string, opts storage.ListOption if err != nil || v.Kind() != reflect.Slice { return fmt.Errorf("need ptr to slice: %v", err) } - key = path.Join(s.pathPrefix, key) - // For recursive lists, we need to make sure the key ended with "/" so that we only - // get children "directories". e.g. if we have key "/a", "/a/b", "/ab", getting keys - // with prefix "/a" will return all three, while with prefix "/a/" will return only - // "/a/b" which is the correct answer. - if recursive && !strings.HasSuffix(key, "/") { + if s.pathPrefix != "" { + key = path.Join(s.pathPrefix, key) + } + // We need to make sure the key ended with "/" so that we only get children "directories". + // e.g. if we have key "/a", "/a/b", "/ab", getting keys with prefix "/a" will return all three, + // while with prefix "/a/" will return only "/a/b" which is the correct answer. + if !strings.HasSuffix(key, "/") { key += "/" } keyPrefix := key // set the appropriate clientv3 options to filter the returned data set - var limitOption *clientv3.OpOption - var limit int64 = pred.Limit + var paging bool options := make([]clientv3.OpOption, 0, 4) if s.pagingEnabled && pred.Limit > 0 { - options = append(options, clientv3.WithLimit(limit)) - limitOption = &options[len(options)-1] + paging = true + options = append(options, clientv3.WithLimit(pred.Limit)) } newItemFunc := getNewItemFunc(listObj, v) @@ -614,7 +662,7 @@ func (s *store) GetList(ctx context.Context, key string, opts storage.ListOption var returnedRV, continueRV, withRev int64 var continueKey string switch { - case recursive && s.pagingEnabled && len(pred.Continue) > 0: + case s.pagingEnabled && len(pred.Continue) > 0: continueKey, continueRV, err = decodeContinue(pred.Continue, keyPrefix) if err != nil { return apierrors.NewBadRequest(fmt.Sprintf("invalid continue token: %v", err)) @@ -635,7 +683,7 @@ func (s *store) GetList(ctx context.Context, key string, opts storage.ListOption withRev = continueRV returnedRV = continueRV } - case recursive && s.pagingEnabled && pred.Limit > 0: + case s.pagingEnabled && pred.Limit > 0: if fromRV != nil { switch match { case metav1.ResourceVersionMatchNotOlderThan: @@ -671,9 +719,7 @@ func (s *store) GetList(ctx context.Context, key string, opts storage.ListOption } } - if recursive { - options = append(options, clientv3.WithPrefix()) - } + options = append(options, clientv3.WithPrefix()) } if withRev != 0 { options = append(options, clientv3.WithRev(withRev)) @@ -694,11 +740,7 @@ func (s *store) GetList(ctx context.Context, key string, opts storage.ListOption for { startTime := time.Now() getResp, err = s.client.KV.Get(ctx, key, options...) - if recursive { - metrics.RecordEtcdRequestLatency("list", getTypeName(listPtr), startTime) - } else { - metrics.RecordEtcdRequestLatency("get", getTypeName(listPtr), startTime) - } + metrics.RecordEtcdRequestLatency("list", getTypeName(listPtr), startTime) if err != nil { return interpretListError(err, len(pred.Continue) > 0, continueKey, keyPrefix) } @@ -722,13 +764,13 @@ func (s *store) GetList(ctx context.Context, key string, opts storage.ListOption // take items from the response until the bucket is full, filtering as we go for i, kv := range getResp.Kvs { - if limitOption != nil && int64(v.Len()) >= pred.Limit { + if paging && int64(v.Len()) >= pred.Limit { hasMore = true break } lastKey = kv.Key - data, _, err := s.transformer.TransformFromStorage(ctx, kv.Value, authenticatedDataString(kv.Key)) + data, _, err := s.transformer.TransformFromStorage(kv.Value, authenticatedDataString(kv.Key)) if err != nil { return storage.NewInternalErrorf("unable to transform key %q: %v", kv.Key, err) } @@ -748,23 +790,13 @@ func (s *store) GetList(ctx context.Context, key string, opts storage.ListOption } // no more results remain or we didn't request paging - if !hasMore || limitOption == nil { + if !hasMore || !paging { break } // we're paging but we have filled our bucket if int64(v.Len()) >= pred.Limit { break } - - if limit < maxLimit { - // We got incomplete result due to field/label selector dropping the object. - // Double page size to reduce total number of calls to etcd. - limit *= 2 - if limit > maxLimit { - limit = maxLimit - } - *limitOption = clientv3.WithLimit(limit) - } key = string(lastKey) + "\x00" if withRev == 0 { withRev = returnedRV @@ -830,15 +862,24 @@ func growSlice(v reflect.Value, maxCapacity int, sizes ...int) { // Watch implements storage.Interface.Watch. func (s *store) Watch(ctx context.Context, key string, opts storage.ListOptions) (watch.Interface, error) { + return s.watch(ctx, key, opts, false) +} + +// WatchList implements storage.Interface.WatchList. +func (s *store) WatchList(ctx context.Context, key string, opts storage.ListOptions) (watch.Interface, error) { + return s.watch(ctx, key, opts, true) +} + +func (s *store) watch(ctx context.Context, key string, opts storage.ListOptions, recursive bool) (watch.Interface, error) { rev, err := s.versioner.ParseResourceVersion(opts.ResourceVersion) if err != nil { return nil, err } key = path.Join(s.pathPrefix, key) - return s.watcher.Watch(ctx, key, int64(rev), opts.Recursive, opts.ProgressNotify, opts.Predicate) + return s.watcher.Watch(ctx, key, int64(rev), recursive, opts.ProgressNotify, opts.Predicate) } -func (s *store) getState(ctx context.Context, getResp *clientv3.GetResponse, key string, v reflect.Value, ignoreNotFound bool) (*objState, error) { +func (s *store) getState(getResp *clientv3.GetResponse, key string, v reflect.Value, ignoreNotFound bool) (*objState, error) { state := &objState{ meta: &storage.ResponseMeta{}, } @@ -857,7 +898,7 @@ func (s *store) getState(ctx context.Context, getResp *clientv3.GetResponse, key return nil, err } } else { - data, stale, err := s.transformer.TransformFromStorage(ctx, getResp.Kvs[0].Value, authenticatedDataString(key)) + data, stale, err := s.transformer.TransformFromStorage(getResp.Kvs[0].Value, authenticatedDataString(key)) if err != nil { return nil, storage.NewInternalError(err.Error()) } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/etcd3/watcher.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/etcd3/watcher.go index 3241970f6e71..d37991a05237 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/etcd3/watcher.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/etcd3/watcher.go @@ -426,7 +426,7 @@ func (wc *watchChan) prepareObjs(e *event) (curObj runtime.Object, oldObj runtim } if !e.isDeleted { - data, _, err := wc.watcher.transformer.TransformFromStorage(wc.ctx, e.value, authenticatedDataString(e.key)) + data, _, err := wc.watcher.transformer.TransformFromStorage(e.value, authenticatedDataString(e.key)) if err != nil { return nil, nil, err } @@ -441,7 +441,7 @@ func (wc *watchChan) prepareObjs(e *event) (curObj runtime.Object, oldObj runtim // we need the object only to compute whether it was filtered out // before). if len(e.prevValue) > 0 && (e.isDeleted || !wc.acceptAll()) { - data, _, err := wc.watcher.transformer.TransformFromStorage(wc.ctx, e.prevValue, authenticatedDataString(e.key)) + data, _, err := wc.watcher.transformer.TransformFromStorage(e.prevValue, authenticatedDataString(e.key)) if err != nil { return nil, nil, err } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/interfaces.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/interfaces.go index 6e77ea700db0..176e52a599fa 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/interfaces.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/interfaces.go @@ -183,20 +183,33 @@ type Interface interface { // and send it in an "ADDED" event, before watch starts. Watch(ctx context.Context, key string, opts ListOptions) (watch.Interface, error) - // Get unmarshals object found at key into objPtr. On a not found error, will either + // WatchList begins watching the specified key's items. Items are decoded into API + // objects and any item selected by 'p' are sent down to returned watch.Interface. + // resourceVersion may be used to specify what version to begin watching, + // which should be the current resourceVersion, and no longer rv+1 + // (e.g. reconnecting without missing any updates). + // If resource version is "0", this interface will list current objects directory defined by key + // and send them in "ADDED" events, before watch starts. + WatchList(ctx context.Context, key string, opts ListOptions) (watch.Interface, error) + + // Get unmarshals json found at key into objPtr. On a not found error, will either // return a zero object of the requested type, or an error, depending on 'opts.ignoreNotFound'. // Treats empty responses and nil response nodes exactly like a not found error. // The returned contents may be delayed, but it is guaranteed that they will // match 'opts.ResourceVersion' according 'opts.ResourceVersionMatch'. Get(ctx context.Context, key string, opts GetOptions, objPtr runtime.Object) error - // GetList unmarshalls objects found at key into a *List api object (an object - // that satisfies runtime.IsList definition). - // If 'opts.Recursive' is false, 'key' is used as an exact match. If `opts.Recursive' - // is true, 'key' is used as a prefix. + // GetToList unmarshals json found at key and opaque it into *List api object + // (an object that satisfies the runtime.IsList definition). + // The returned contents may be delayed, but it is guaranteed that they will + // match 'opts.ResourceVersion' according 'opts.ResourceVersionMatch'. + GetToList(ctx context.Context, key string, opts ListOptions, listObj runtime.Object) error + + // List unmarshalls jsons found at directory defined by key and opaque them + // into *List api object (an object that satisfies runtime.IsList definition). // The returned contents may be delayed, but it is guaranteed that they will // match 'opts.ResourceVersion' according 'opts.ResourceVersionMatch'. - GetList(ctx context.Context, key string, opts ListOptions, listObj runtime.Object) error + List(ctx context.Context, key string, opts ListOptions, listObj runtime.Object) error // GuaranteedUpdate keeps calling 'tryUpdate()' to update key 'key' (of type 'ptrToType') // retrying the update until success if there is index conflict. @@ -261,9 +274,6 @@ type ListOptions struct { ResourceVersionMatch metav1.ResourceVersionMatch // Predicate provides the selection rules for the list operation. Predicate SelectionPredicate - // Recursive determines whether the list or watch is defined for a single object located at the - // given key, or for the whole set of objects with the given key as a prefix. - Recursive bool // ProgressNotify determines whether storage-originated bookmark (progress notify) events should // be delivered to the users. The option is ignored for non-watch requests. ProgressNotify bool diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/storagebackend/OWNERS b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/storagebackend/OWNERS index c29de755d0b8..dbef228c1a7f 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/storagebackend/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/storagebackend/OWNERS @@ -1,6 +1,8 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - lavalamp - - smarterclayton - - wojtek-t +- lavalamp +- smarterclayton +- wojtek-t +- timothysc +- hongchaodeng diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go index f54c9421f204..63e18699d6b5 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go @@ -261,9 +261,6 @@ func newETCD3Storage(c storagebackend.ConfigForResource, newFunc func() runtime. return nil, nil, err } - // decorate the KV instance so we can track etcd latency per request. - client.KV = etcd3.NewETCDLatencyTracker(client.KV) - stopDBSizeMonitor, err := startDBSizeMonitorPerEndpoint(client, c.DBMetricPollInterval) if err != nil { return nil, nil, err diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/aes/aes.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/aes/aes.go index 69930c039082..daa82f711fe5 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/aes/aes.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/aes/aes.go @@ -19,7 +19,6 @@ package aes import ( "bytes" - "context" "crypto/aes" "crypto/cipher" "crypto/rand" @@ -53,7 +52,7 @@ func NewGCMTransformer(block cipher.Block) value.Transformer { return &gcm{block: block} } -func (t *gcm) TransformFromStorage(ctx context.Context, data []byte, dataCtx value.Context) ([]byte, bool, error) { +func (t *gcm) TransformFromStorage(data []byte, context value.Context) ([]byte, bool, error) { aead, err := cipher.NewGCM(t.block) if err != nil { return nil, false, err @@ -62,11 +61,11 @@ func (t *gcm) TransformFromStorage(ctx context.Context, data []byte, dataCtx val if len(data) < nonceSize { return nil, false, fmt.Errorf("the stored data was shorter than the required size") } - result, err := aead.Open(nil, data[:nonceSize], data[nonceSize:], dataCtx.AuthenticatedData()) + result, err := aead.Open(nil, data[:nonceSize], data[nonceSize:], context.AuthenticatedData()) return result, false, err } -func (t *gcm) TransformToStorage(ctx context.Context, data []byte, dataCtx value.Context) ([]byte, error) { +func (t *gcm) TransformToStorage(data []byte, context value.Context) ([]byte, error) { aead, err := cipher.NewGCM(t.block) if err != nil { return nil, err @@ -80,7 +79,7 @@ func (t *gcm) TransformToStorage(ctx context.Context, data []byte, dataCtx value if n != nonceSize { return nil, fmt.Errorf("unable to read sufficient random bytes") } - cipherText := aead.Seal(result[nonceSize:nonceSize], result[:nonceSize], data, dataCtx.AuthenticatedData()) + cipherText := aead.Seal(result[nonceSize:nonceSize], result[:nonceSize], data, context.AuthenticatedData()) return result[:nonceSize+len(cipherText)], nil } @@ -96,12 +95,12 @@ func NewCBCTransformer(block cipher.Block) value.Transformer { } var ( - ErrInvalidBlockSize = fmt.Errorf("the stored data is not a multiple of the block size") + errInvalidBlockSize = fmt.Errorf("the stored data is not a multiple of the block size") errInvalidPKCS7Data = errors.New("invalid PKCS7 data (empty or not padded)") errInvalidPKCS7Padding = errors.New("invalid padding on input") ) -func (t *cbc) TransformFromStorage(ctx context.Context, data []byte, dataCtx value.Context) ([]byte, bool, error) { +func (t *cbc) TransformFromStorage(data []byte, context value.Context) ([]byte, bool, error) { blockSize := aes.BlockSize if len(data) < blockSize { return nil, false, fmt.Errorf("the stored data was shorter than the required size") @@ -110,7 +109,7 @@ func (t *cbc) TransformFromStorage(ctx context.Context, data []byte, dataCtx val data = data[blockSize:] if len(data)%blockSize != 0 { - return nil, false, ErrInvalidBlockSize + return nil, false, errInvalidBlockSize } result := make([]byte, len(data)) @@ -134,7 +133,7 @@ func (t *cbc) TransformFromStorage(ctx context.Context, data []byte, dataCtx val return result[:size], false, nil } -func (t *cbc) TransformToStorage(ctx context.Context, data []byte, dataCtx value.Context) ([]byte, error) { +func (t *cbc) TransformToStorage(data []byte, context value.Context) ([]byte, error) { blockSize := aes.BlockSize paddingSize := blockSize - (len(data) % blockSize) result := make([]byte, blockSize+len(data)+paddingSize) diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/envelope.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/envelope.go index 9173eb065256..357ea0582373 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/envelope.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/envelope.go @@ -18,7 +18,6 @@ limitations under the License. package envelope import ( - "context" "crypto/aes" "crypto/cipher" "crypto/rand" @@ -80,7 +79,7 @@ func NewEnvelopeTransformer(envelopeService Service, cacheSize int, baseTransfor } // TransformFromStorage decrypts data encrypted by this transformer using envelope encryption. -func (t *envelopeTransformer) TransformFromStorage(ctx context.Context, data []byte, dataCtx value.Context) ([]byte, bool, error) { +func (t *envelopeTransformer) TransformFromStorage(data []byte, context value.Context) ([]byte, bool, error) { recordArrival(fromStorageLabel, time.Now()) // Read the 16 bit length-of-DEK encoded at the start of the encrypted DEK. 16 bits can @@ -114,11 +113,11 @@ func (t *envelopeTransformer) TransformFromStorage(ctx context.Context, data []b } } - return transformer.TransformFromStorage(ctx, encData, dataCtx) + return transformer.TransformFromStorage(encData, context) } // TransformToStorage encrypts data to be written to disk using envelope encryption. -func (t *envelopeTransformer) TransformToStorage(ctx context.Context, data []byte, dataCtx value.Context) ([]byte, error) { +func (t *envelopeTransformer) TransformToStorage(data []byte, context value.Context) ([]byte, error) { recordArrival(toStorageLabel, time.Now()) newKey, err := generateKey(32) if err != nil { @@ -138,7 +137,7 @@ func (t *envelopeTransformer) TransformToStorage(ctx context.Context, data []byt return nil, err } - result, err := transformer.TransformToStorage(ctx, data, dataCtx) + result, err := transformer.TransformToStorage(data, context) if err != nil { return nil, err } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/identity/identity.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/identity/identity.go index 7bdd5f6823ed..e322bd9b17c6 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/identity/identity.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/identity/identity.go @@ -18,7 +18,6 @@ package identity import ( "bytes" - "context" "fmt" "k8s.io/apiserver/pkg/storage/value" @@ -35,17 +34,17 @@ func NewEncryptCheckTransformer() value.Transformer { } // TransformFromStorage returns the input bytes if the data is not encrypted -func (identityTransformer) TransformFromStorage(ctx context.Context, data []byte, dataCtx value.Context) ([]byte, bool, error) { +func (identityTransformer) TransformFromStorage(b []byte, context value.Context) ([]byte, bool, error) { // identityTransformer has to return an error if the data is encoded using another transformer. // JSON data starts with '{'. Protobuf data has a prefix 'k8s[\x00-\xFF]'. // Prefix 'k8s:enc:' is reserved for encrypted data on disk. - if bytes.HasPrefix(data, []byte("k8s:enc:")) { + if bytes.HasPrefix(b, []byte("k8s:enc:")) { return []byte{}, false, fmt.Errorf("identity transformer tried to read encrypted data") } - return data, false, nil + return b, false, nil } // TransformToStorage implements the Transformer interface for identityTransformer -func (identityTransformer) TransformToStorage(ctx context.Context, data []byte, dataCtx value.Context) ([]byte, error) { - return data, nil +func (identityTransformer) TransformToStorage(b []byte, context value.Context) ([]byte, error) { + return b, nil } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/secretbox/secretbox.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/secretbox/secretbox.go index 9aec8acd39e8..0eaa6282457e 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/secretbox/secretbox.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/value/encrypt/secretbox/secretbox.go @@ -18,7 +18,6 @@ limitations under the License. package secretbox import ( - "context" "crypto/rand" "fmt" @@ -42,7 +41,7 @@ func NewSecretboxTransformer(key [32]byte) value.Transformer { return &secretboxTransformer{key: key} } -func (t *secretboxTransformer) TransformFromStorage(ctx context.Context, data []byte, dataCtx value.Context) ([]byte, bool, error) { +func (t *secretboxTransformer) TransformFromStorage(data []byte, context value.Context) ([]byte, bool, error) { if len(data) < (secretbox.Overhead + nonceSize) { return nil, false, fmt.Errorf("the stored data was shorter than the required size") } @@ -57,7 +56,7 @@ func (t *secretboxTransformer) TransformFromStorage(ctx context.Context, data [] return result, false, nil } -func (t *secretboxTransformer) TransformToStorage(ctx context.Context, data []byte, dataCtx value.Context) ([]byte, error) { +func (t *secretboxTransformer) TransformToStorage(data []byte, context value.Context) ([]byte, error) { var nonce [nonceSize]byte n, err := rand.Read(nonce[:]) if err != nil { diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/value/transformer.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/value/transformer.go index 3c0ca7a60da2..3bc41cd9a247 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/value/transformer.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storage/value/transformer.go @@ -19,7 +19,6 @@ package value import ( "bytes" - "context" "fmt" "sync" "time" @@ -46,9 +45,9 @@ type Transformer interface { // TransformFromStorage may transform the provided data from its underlying storage representation or return an error. // Stale is true if the object on disk is stale and a write to etcd should be issued, even if the contents of the object // have not changed. - TransformFromStorage(ctx context.Context, data []byte, dataCtx Context) (out []byte, stale bool, err error) + TransformFromStorage(data []byte, context Context) (out []byte, stale bool, err error) // TransformToStorage may transform the provided data into the appropriate form in storage or return an error. - TransformToStorage(ctx context.Context, data []byte, dataCtx Context) (out []byte, err error) + TransformToStorage(data []byte, context Context) (out []byte, err error) } type identityTransformer struct{} @@ -56,11 +55,11 @@ type identityTransformer struct{} // IdentityTransformer performs no transformation of the provided data. var IdentityTransformer Transformer = identityTransformer{} -func (identityTransformer) TransformFromStorage(ctx context.Context, data []byte, dataCtx Context) ([]byte, bool, error) { - return data, false, nil +func (identityTransformer) TransformFromStorage(b []byte, ctx Context) ([]byte, bool, error) { + return b, false, nil } -func (identityTransformer) TransformToStorage(ctx context.Context, data []byte, dataCtx Context) ([]byte, error) { - return data, nil +func (identityTransformer) TransformToStorage(b []byte, ctx Context) ([]byte, error) { + return b, nil } // DefaultContext is a simple implementation of Context for a slice of bytes. @@ -87,17 +86,17 @@ func (t *MutableTransformer) Set(transformer Transformer) { t.lock.Unlock() } -func (t *MutableTransformer) TransformFromStorage(ctx context.Context, data []byte, dataCtx Context) (out []byte, stale bool, err error) { +func (t *MutableTransformer) TransformFromStorage(data []byte, context Context) (out []byte, stale bool, err error) { t.lock.RLock() transformer := t.transformer t.lock.RUnlock() - return transformer.TransformFromStorage(ctx, data, dataCtx) + return transformer.TransformFromStorage(data, context) } -func (t *MutableTransformer) TransformToStorage(ctx context.Context, data []byte, dataCtx Context) (out []byte, err error) { +func (t *MutableTransformer) TransformToStorage(data []byte, context Context) (out []byte, err error) { t.lock.RLock() transformer := t.transformer t.lock.RUnlock() - return transformer.TransformToStorage(ctx, data, dataCtx) + return transformer.TransformToStorage(data, context) } // PrefixTransformer holds a transformer interface and the prefix that the transformation is located under. @@ -130,12 +129,12 @@ func NewPrefixTransformers(err error, transformers ...PrefixTransformer) Transfo // TransformFromStorage finds the first transformer with a prefix matching the provided data and returns // the result of transforming the value. It will always mark any transformation as stale that is not using // the first transformer. -func (t *prefixTransformers) TransformFromStorage(ctx context.Context, data []byte, dataCtx Context) ([]byte, bool, error) { +func (t *prefixTransformers) TransformFromStorage(data []byte, context Context) ([]byte, bool, error) { start := time.Now() var errs []error for i, transformer := range t.transformers { if bytes.HasPrefix(data, transformer.Prefix) { - result, stale, err := transformer.Transformer.TransformFromStorage(ctx, data[len(transformer.Prefix):], dataCtx) + result, stale, err := transformer.Transformer.TransformFromStorage(data[len(transformer.Prefix):], context) // To migrate away from encryption, user can specify an identity transformer higher up // (in the config file) than the encryption transformer. In that scenario, the identity transformer needs to // identify (during reads from disk) whether the data being read is encrypted or not. If the data is encrypted, @@ -195,12 +194,12 @@ func (t *prefixTransformers) TransformFromStorage(ctx context.Context, data []by } // TransformToStorage uses the first transformer and adds its prefix to the data. -func (t *prefixTransformers) TransformToStorage(ctx context.Context, data []byte, dataCtx Context) ([]byte, error) { +func (t *prefixTransformers) TransformToStorage(data []byte, context Context) ([]byte, error) { start := time.Now() transformer := t.transformers[0] prefixedData := make([]byte, len(transformer.Prefix), len(data)+len(transformer.Prefix)) copy(prefixedData, transformer.Prefix) - result, err := transformer.Transformer.TransformToStorage(ctx, data, dataCtx) + result, err := transformer.Transformer.TransformToStorage(data, context) RecordTransformation("to_storage", string(transformer.Prefix), start, err) if err != nil { return nil, err diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storageversion/OWNERS b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storageversion/OWNERS index 869b3da0dcab..ca9aa135841b 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storageversion/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/storageversion/OWNERS @@ -1,5 +1,5 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - caesarxuchao - - roycaihw +- caesarxuchao +- roycaihw diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/OWNERS b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/OWNERS index 2556c589fd12..50a230fcadb1 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/OWNERS @@ -1,15 +1,15 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - lavalamp - - deads2k - - yue9944882 - - MikeSpreitzer +- lavalamp +- deads2k +- yue9944882 +- MikeSpreitzer reviewers: - - lavalamp - - deads2k - - yue9944882 - - MikeSpreitzer +- lavalamp +- deads2k +- yue9944882 +- MikeSpreitzer labels: - - sig/api-machinery - - area/apiserver +- sig/api-machinery +- area/apiserver diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/apf_controller.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/apf_controller.go index 63a4d7962bc4..3b2b4a1738eb 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/apf_controller.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/apf_controller.go @@ -440,8 +440,8 @@ func (cfgCtlr *configController) digestConfigObjects(newPLs []*flowcontrol.Prior // should never happen because these conditions are created here and well formed panic(fmt.Sprintf("Failed to json.Marshall(%#+v): %s", fsu.condition, err.Error())) } - if klogV := klog.V(4); klogV.Enabled() { - klogV.Infof("%s writing Condition %s to FlowSchema %s, which had ResourceVersion=%s, because its previous value was %s, diff: %s", + if klog.V(4).Enabled() { + klog.V(4).Infof("%s writing Condition %s to FlowSchema %s, which had ResourceVersion=%s, because its previous value was %s, diff: %s", cfgCtlr.name, fsu.condition, fsu.flowSchema.Name, fsu.flowSchema.ResourceVersion, fcfmt.Fmt(fsu.oldValue), cmp.Diff(fsu.oldValue, fsu.condition)) } fsIfc := cfgCtlr.flowcontrolClient.FlowSchemas() @@ -539,7 +539,7 @@ func (meal *cfgMeal) digestNewPLsLocked(newPLs []*flowcontrol.PriorityLevelConfi state := meal.cfgCtlr.priorityLevelStates[pl.Name] if state == nil { labelValues := []string{pl.Name} - state = &priorityLevelState{reqsObsPair: meal.cfgCtlr.reqsObsPairGenerator.Generate(1, 1, labelValues), execSeatsObs: meal.cfgCtlr.execSeatsObsGenerator.Generate(0, 1, labelValues)} + state = &priorityLevelState{reqsObsPair: meal.cfgCtlr.reqsObsPairGenerator.Generate(1, 1, labelValues), execSeatsObs: meal.cfgCtlr.execSeatsObsGenerator.Generate(1, 1, labelValues)} } qsCompleter, err := queueSetCompleterForPL(meal.cfgCtlr.queueSetFactory, state.queues, pl, meal.cfgCtlr.requestWaitLimit, state.reqsObsPair, state.execSeatsObs) if err != nil { @@ -608,10 +608,9 @@ func (meal *cfgMeal) digestFlowSchemasLocked(newFSs []*flowcontrol.FlowSchema) { } meal.cfgCtlr.flowSchemas = fsSeq - klogV := klog.V(5) - if klogV.Enabled() { + if klog.V(5).Enabled() { for _, fs := range fsSeq { - klogV.Infof("Using FlowSchema %s", fcfmt.Fmt(fs)) + klog.Infof("Using FlowSchema %s", fcfmt.Fmt(fs)) } } } @@ -770,7 +769,7 @@ func (meal *cfgMeal) imaginePL(proto *flowcontrol.PriorityLevelConfiguration, re klog.V(3).Infof("No %s PriorityLevelConfiguration found, imagining one", proto.Name) labelValues := []string{proto.Name} reqsObsPair := meal.cfgCtlr.reqsObsPairGenerator.Generate(1, 1, labelValues) - execSeatsObs := meal.cfgCtlr.execSeatsObsGenerator.Generate(0, 1, labelValues) + execSeatsObs := meal.cfgCtlr.execSeatsObsGenerator.Generate(1, 1, labelValues) qsCompleter, err := queueSetCompleterForPL(meal.cfgCtlr.queueSetFactory, nil, proto, requestWaitLimit, reqsObsPair, execSeatsObs) if err != nil { // This can not happen because proto is one of the mandatory @@ -800,10 +799,7 @@ func (immediateRequest) Finish(execute func()) bool { // The returned bool indicates whether the request is exempt from // limitation. The startWaitingTime is when the request started // waiting in its queue, or `Time{}` if this did not happen. -func (cfgCtlr *configController) startRequest(ctx context.Context, rd RequestDigest, - noteFn func(fs *flowcontrol.FlowSchema, pl *flowcontrol.PriorityLevelConfiguration, flowDistinguisher string), - workEstimator func() fcrequest.WorkEstimate, - queueNoteFn fq.QueueNoteFn) (fs *flowcontrol.FlowSchema, pl *flowcontrol.PriorityLevelConfiguration, isExempt bool, req fq.Request, startWaitingTime time.Time) { +func (cfgCtlr *configController) startRequest(ctx context.Context, rd RequestDigest, workEstimator func(fs *flowcontrol.FlowSchema, pl *flowcontrol.PriorityLevelConfiguration, flowDistinguisher string) fcrequest.WorkEstimate, queueNoteFn fq.QueueNoteFn) (fs *flowcontrol.FlowSchema, pl *flowcontrol.PriorityLevelConfiguration, isExempt bool, req fq.Request, startWaitingTime time.Time) { klog.V(7).Infof("startRequest(%#+v)", rd) cfgCtlr.lock.RLock() defer cfgCtlr.lock.RUnlock() @@ -834,7 +830,6 @@ func (cfgCtlr *configController) startRequest(ctx context.Context, rd RequestDig plName := selectedFlowSchema.Spec.PriorityLevelConfiguration.Name plState := cfgCtlr.priorityLevelStates[plName] if plState.pl.Spec.Type == flowcontrol.PriorityLevelEnablementExempt { - noteFn(selectedFlowSchema, plState.pl, "") klog.V(7).Infof("startRequest(%#+v) => fsName=%q, distMethod=%#+v, plName=%q, immediate", rd, selectedFlowSchema.Name, selectedFlowSchema.Spec.DistinguisherMethod, plName) return selectedFlowSchema, plState.pl, true, immediateRequest{}, time.Time{} } @@ -848,10 +843,7 @@ func (cfgCtlr *configController) startRequest(ctx context.Context, rd RequestDig flowDistinguisher = computeFlowDistinguisher(rd, selectedFlowSchema.Spec.DistinguisherMethod) hashValue = hashFlowID(selectedFlowSchema.Name, flowDistinguisher) } - - noteFn(selectedFlowSchema, plState.pl, flowDistinguisher) - workEstimate := workEstimator() - + workEstimate := workEstimator(selectedFlowSchema, plState.pl, flowDistinguisher) startWaitingTime = time.Now() klog.V(7).Infof("startRequest(%#+v) => fsName=%q, distMethod=%#+v, plName=%q, numQueues=%d", rd, selectedFlowSchema.Name, selectedFlowSchema.Spec.DistinguisherMethod, plName, numQueues) req, idle := plState.queues.StartRequest(ctx, &workEstimate, hashValue, flowDistinguisher, selectedFlowSchema.Name, rd.RequestInfo, rd.User, queueNoteFn) diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/apf_filter.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/apf_filter.go index d8b17d27924f..67149fd836f6 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/apf_filter.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/apf_filter.go @@ -21,7 +21,6 @@ import ( "strconv" "time" - "k8s.io/apiserver/pkg/server/httplog" "k8s.io/apiserver/pkg/server/mux" fq "k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing" "k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/eventclock" @@ -43,14 +42,10 @@ const ConfigConsumerAsFieldManager = "api-priority-and-fairness-config-consumer- // Interface defines how the API Priority and Fairness filter interacts with the underlying system. type Interface interface { // Handle takes care of queuing and dispatching a request - // characterized by the given digest. The given `noteFn` will be - // invoked with the results of request classification. - // The given `workEstimator` is called, if at all, after noteFn. - // `workEstimator` will be invoked only when the request - // is classified as non 'exempt'. - // 'workEstimator', when invoked, must return the - // work parameters for the request. - // If the request is queued then `queueNoteFn` will be called twice, + // characterized by the given digest. The given `workEstimator` will be + // invoked with the results of request classification and must return the + // work parameters for the request. If the + // request is queued then `queueNoteFn` will be called twice, // first with `true` and then with `false`; otherwise // `queueNoteFn` will not be called at all. If Handle decides // that the request should be executed then `execute()` will be @@ -60,8 +55,7 @@ type Interface interface { // ctx is cancelled or times out. Handle(ctx context.Context, requestDigest RequestDigest, - noteFn func(fs *flowcontrol.FlowSchema, pl *flowcontrol.PriorityLevelConfiguration, flowDistinguisher string), - workEstimator func() fcrequest.WorkEstimate, + workEstimator func(fs *flowcontrol.FlowSchema, pl *flowcontrol.PriorityLevelConfiguration, flowDistinguisher string) fcrequest.WorkEstimate, queueNoteFn fq.QueueNoteFn, execFn func(), ) @@ -156,11 +150,10 @@ func NewTestable(config TestableConfig) Interface { } func (cfgCtlr *configController) Handle(ctx context.Context, requestDigest RequestDigest, - noteFn func(fs *flowcontrol.FlowSchema, pl *flowcontrol.PriorityLevelConfiguration, flowDistinguisher string), - workEstimator func() fcrequest.WorkEstimate, + workEstimator func(fs *flowcontrol.FlowSchema, pl *flowcontrol.PriorityLevelConfiguration, flowDistinguisher string) fcrequest.WorkEstimate, queueNoteFn fq.QueueNoteFn, execFn func()) { - fs, pl, isExempt, req, startWaitingTime := cfgCtlr.startRequest(ctx, requestDigest, noteFn, workEstimator, queueNoteFn) + fs, pl, isExempt, req, startWaitingTime := cfgCtlr.startRequest(ctx, requestDigest, workEstimator, queueNoteFn) queued := startWaitingTime != time.Time{} if req == nil { if queued { @@ -187,9 +180,7 @@ func (cfgCtlr *configController) Handle(ctx context.Context, requestDigest Reque executed = true startExecutionTime := time.Now() defer func() { - executionTime := time.Since(startExecutionTime) - httplog.AddKeyValue(ctx, "apf_execution_time", executionTime) - metrics.ObserveExecutionDuration(ctx, pl.Name, fs.Name, executionTime) + metrics.ObserveExecutionDuration(ctx, pl.Name, fs.Name, time.Since(startExecutionTime)) }() execFn() }) diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset/queueset.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset/queueset.go index d3864d44bb33..440975faf3b5 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset/queueset.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset/queueset.go @@ -573,9 +573,9 @@ func (qs *queueSet) shuffleShardLocked(hashValue uint64, descr1, descr2 interfac bestQueueIdx = queueIdx } } - if klogV := klog.V(6); klogV.Enabled() { + if klog.V(6).Enabled() { chosenQueue := qs.queues[bestQueueIdx] - klogV.Infof("QS(%s) at t=%s R=%v: For request %#+v %#+v chose queue %d, with sum: %#v & %d seats in use & nextDispatchR=%v", qs.qCfg.Name, qs.clock.Now().Format(nsTimeFmt), qs.currentR, descr1, descr2, bestQueueIdx, chosenQueue.requests.QueueSum(), chosenQueue.seatsInUse, chosenQueue.nextDispatchR) + klog.V(6).Infof("QS(%s) at t=%s R=%v: For request %#+v %#+v chose queue %d, with sum: %#v & %d seats in use & nextDispatchR=%v", qs.qCfg.Name, qs.clock.Now().Format(nsTimeFmt), qs.currentR, descr1, descr2, bestQueueIdx, chosenQueue.requests.QueueSum(), chosenQueue.seatsInUse, chosenQueue.nextDispatchR) } return bestQueueIdx } @@ -637,9 +637,8 @@ func (qs *queueSet) enqueueLocked(request *request) { if queue.requests.Length() == 0 && queue.requestsExecuting == 0 { // the queue’s start R is set to the virtual time. queue.nextDispatchR = qs.currentR - klogV := klog.V(6) - if klogV.Enabled() { - klogV.Infof("QS(%s) at t=%s R=%v: initialized queue %d start R due to request %#+v %#+v", qs.qCfg.Name, now.Format(nsTimeFmt), queue.nextDispatchR, queue.index, request.descr1, request.descr2) + if klog.V(6).Enabled() { + klog.Infof("QS(%s) at t=%s R=%v: initialized queue %d start R due to request %#+v %#+v", qs.qCfg.Name, now.Format(nsTimeFmt), queue.nextDispatchR, queue.index, request.descr1, request.descr2) } } request.removeFromQueueLocked = queue.requests.Enqueue(request) @@ -677,9 +676,8 @@ func (qs *queueSet) dispatchSansQueueLocked(ctx context.Context, workEstimate *f metrics.AddRequestConcurrencyInUse(qs.qCfg.Name, fsName, req.MaxSeats()) qs.reqsObsPair.RequestsExecuting.Add(1) qs.execSeatsObs.Add(float64(req.MaxSeats())) - klogV := klog.V(5) - if klogV.Enabled() { - klogV.Infof("QS(%s) at t=%s R=%v: immediate dispatch of request %q %#+v %#+v, qs will have %d executing", qs.qCfg.Name, now.Format(nsTimeFmt), qs.currentR, fsName, descr1, descr2, qs.totRequestsExecuting) + if klog.V(5).Enabled() { + klog.Infof("QS(%s) at t=%s R=%v: immediate dispatch of request %q %#+v %#+v, qs will have %d executing", qs.qCfg.Name, now.Format(nsTimeFmt), qs.currentR, fsName, descr1, descr2, qs.totRequestsExecuting) } return req } @@ -719,9 +717,8 @@ func (qs *queueSet) dispatchLocked() bool { metrics.AddRequestConcurrencyInUse(qs.qCfg.Name, request.fsName, request.MaxSeats()) qs.reqsObsPair.RequestsExecuting.Add(1) qs.execSeatsObs.Add(float64(request.MaxSeats())) - klogV := klog.V(6) - if klogV.Enabled() { - klogV.Infof("QS(%s) at t=%s R=%v: dispatching request %#+v %#+v work %v from queue %d with start R %v, queue will have %d waiting & %d requests occupying %d seats, set will have %d seats occupied", + if klog.V(6).Enabled() { + klog.Infof("QS(%s) at t=%s R=%v: dispatching request %#+v %#+v work %v from queue %d with start R %v, queue will have %d waiting & %d requests occupying %d seats, set will have %d seats occupied", qs.qCfg.Name, request.startTime.Format(nsTimeFmt), qs.currentR, request.descr1, request.descr2, request.workEstimate, queue.index, queue.nextDispatchR, queue.requests.Length(), queue.requestsExecuting, queue.seatsInUse, qs.totSeatsInUse) } @@ -795,12 +792,10 @@ func (qs *queueSet) findDispatchQueueLocked() (*queue, *request) { if !qs.canAccommodateSeatsLocked(oldestReqFromMinQueue.MaxSeats()) { // since we have not picked the queue with the minimum virtual finish // time, we are not going to advance the round robin index here. - klogV := klog.V(4) - if klogV.Enabled() { - klogV.Infof("QS(%s): request %v %v seats %d cannot be dispatched from queue %d, waiting for currently executing requests to complete, %d requests are occupying %d seats and the limit is %d", + if klog.V(4).Enabled() { + klog.Infof("QS(%s): request %v %v seats %d cannot be dispatched from queue %d, waiting for currently executing requests to complete, %d requests are occupying %d seats and the limit is %d", qs.qCfg.Name, oldestReqFromMinQueue.descr1, oldestReqFromMinQueue.descr2, oldestReqFromMinQueue.MaxSeats(), minQueue.index, qs.totRequestsExecuting, qs.totSeatsInUse, qs.dCfg.ConcurrencyLimit) } - metrics.AddDispatchWithNoAccommodation(qs.qCfg.Name, oldestReqFromMinQueue.fsName) return nil, nil } oldestReqFromMinQueue.removeFromQueueLocked() @@ -881,29 +876,28 @@ func (qs *queueSet) finishRequestLocked(r *request) { } defer func() { - klogV := klog.V(6) if r.workEstimate.AdditionalLatency <= 0 { // release the seats allocated to this request immediately releaseSeatsLocked() - if !klogV.Enabled() { + if !klog.V(6).Enabled() { } else if r.queue != nil { - klogV.Infof("QS(%s) at t=%s R=%v: request %#+v %#+v finished all use of %d seats, adjusted queue %d start R to %v due to service time %.9fs, queue will have %d requests with %#v waiting & %d requests occupying %d seats", + klog.Infof("QS(%s) at t=%s R=%v: request %#+v %#+v finished all use of %d seats, adjusted queue %d start R to %v due to service time %.9fs, queue will have %d requests with %#v waiting & %d requests occupying %d seats", qs.qCfg.Name, now.Format(nsTimeFmt), qs.currentR, r.descr1, r.descr2, r.workEstimate.MaxSeats(), r.queue.index, r.queue.nextDispatchR, actualServiceDuration.Seconds(), r.queue.requests.Length(), r.queue.requests.QueueSum(), r.queue.requestsExecuting, r.queue.seatsInUse) } else { - klogV.Infof("QS(%s) at t=%s R=%v: request %#+v %#+v finished all use of %d seats, qs will have %d requests occupying %d seats", qs.qCfg.Name, now.Format(nsTimeFmt), qs.currentR, r.descr1, r.descr2, r.workEstimate.InitialSeats, qs.totRequestsExecuting, qs.totSeatsInUse) + klog.Infof("QS(%s) at t=%s R=%v: request %#+v %#+v finished all use of %d seats, qs will have %d requests occupying %d seats", qs.qCfg.Name, now.Format(nsTimeFmt), qs.currentR, r.descr1, r.descr2, r.workEstimate.InitialSeats, qs.totRequestsExecuting, qs.totSeatsInUse) } return } additionalLatency := r.workEstimate.AdditionalLatency - if !klogV.Enabled() { + if !klog.V(6).Enabled() { } else if r.queue != nil { - klogV.Infof("QS(%s) at t=%s R=%v: request %#+v %#+v finished main use of %d seats but lingering on %d seats for %v seconds, adjusted queue %d start R to %v due to service time %.9fs, queue will have %d requests with %#v waiting & %d requests occupying %d seats", + klog.Infof("QS(%s) at t=%s R=%v: request %#+v %#+v finished main use of %d seats but lingering on %d seats for %v seconds, adjusted queue %d start R to %v due to service time %.9fs, queue will have %d requests with %#v waiting & %d requests occupying %d seats", qs.qCfg.Name, now.Format(nsTimeFmt), qs.currentR, r.descr1, r.descr2, r.workEstimate.InitialSeats, r.workEstimate.FinalSeats, additionalLatency.Seconds(), r.queue.index, r.queue.nextDispatchR, actualServiceDuration.Seconds(), r.queue.requests.Length(), r.queue.requests.QueueSum(), r.queue.requestsExecuting, r.queue.seatsInUse) } else { - klogV.Infof("QS(%s) at t=%s R=%v: request %#+v %#+v finished main use of %d seats but lingering on %d seats for %v seconds, qs will have %d requests occupying %d seats", qs.qCfg.Name, now.Format(nsTimeFmt), qs.currentR, r.descr1, r.descr2, r.workEstimate.InitialSeats, r.workEstimate.FinalSeats, additionalLatency.Seconds(), qs.totRequestsExecuting, qs.totSeatsInUse) + klog.Infof("QS(%s) at t=%s R=%v: request %#+v %#+v finished main use of %d seats but lingering on %d seats for %v seconds, qs will have %d requests occupying %d seats", qs.qCfg.Name, now.Format(nsTimeFmt), qs.currentR, r.descr1, r.descr2, r.workEstimate.InitialSeats, r.workEstimate.FinalSeats, additionalLatency.Seconds(), qs.totRequestsExecuting, qs.totSeatsInUse) } // EventAfterDuration will execute the event func in a new goroutine, // so the seats allocated to this request will be released after @@ -914,13 +908,13 @@ func (qs *queueSet) finishRequestLocked(r *request) { defer qs.lock.Unlock() now := qs.clock.Now() releaseSeatsLocked() - if !klogV.Enabled() { + if !klog.V(6).Enabled() { } else if r.queue != nil { - klogV.Infof("QS(%s) at t=%s R=%v: request %#+v %#+v finished lingering on %d seats, queue %d will have %d requests with %#v waiting & %d requests occupying %d seats", + klog.Infof("QS(%s) at t=%s R=%v: request %#+v %#+v finished lingering on %d seats, queue %d will have %d requests with %#v waiting & %d requests occupying %d seats", qs.qCfg.Name, now.Format(nsTimeFmt), qs.currentR, r.descr1, r.descr2, r.workEstimate.FinalSeats, r.queue.index, r.queue.requests.Length(), r.queue.requests.QueueSum(), r.queue.requestsExecuting, r.queue.seatsInUse) } else { - klogV.Infof("QS(%s) at t=%s R=%v: request %#+v %#+v finished lingering on %d seats, qs will have %d requests occupying %d seats", qs.qCfg.Name, now.Format(nsTimeFmt), qs.currentR, r.descr1, r.descr2, r.workEstimate.FinalSeats, qs.totRequestsExecuting, qs.totSeatsInUse) + klog.Infof("QS(%s) at t=%s R=%v: request %#+v %#+v finished lingering on %d seats, qs will have %d requests occupying %d seats", qs.qCfg.Name, now.Format(nsTimeFmt), qs.currentR, r.descr1, r.descr2, r.workEstimate.FinalSeats, qs.totRequestsExecuting, qs.totSeatsInUse) } qs.dispatchAsMuchAsPossibleLocked() }, additionalLatency) @@ -951,8 +945,8 @@ func (qs *queueSet) boundNextDispatchLocked(queue *queue) { } var virtualStartBound = oldestReqFromMinQueue.arrivalR if queue.nextDispatchR < virtualStartBound { - if klogV := klog.V(4); klogV.Enabled() { - klogV.InfoS("AntiWindup tweaked queue", "QS", qs.qCfg.Name, "queue", queue.index, "time", qs.clock.Now().Format(nsTimeFmt), "requestDescr1", oldestReqFromMinQueue.descr1, "requestDescr2", oldestReqFromMinQueue.descr2, "newVirtualStart", virtualStartBound, "deltaVirtualStart", (virtualStartBound - queue.nextDispatchR)) + if klog.V(4).Enabled() { + klog.InfoS("AntiWindup tweaked queue", "QS", qs.qCfg.Name, "queue", queue.index, "time", qs.clock.Now().Format(nsTimeFmt), "requestDescr1", oldestReqFromMinQueue.descr1, "requestDescr2", oldestReqFromMinQueue.descr2, "newVirtualStart", virtualStartBound, "deltaVirtualStart", (virtualStartBound - queue.nextDispatchR)) } queue.nextDispatchR = virtualStartBound } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/metrics/metrics.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/metrics/metrics.go index f52b569b2bb1..88f812490baa 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/metrics/metrics.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/metrics/metrics.go @@ -23,7 +23,6 @@ import ( "sync" "time" - apirequest "k8s.io/apiserver/pkg/endpoints/request" compbasemetrics "k8s.io/component-base/metrics" "k8s.io/component-base/metrics/legacyregistry" basemetricstestutil "k8s.io/component-base/metrics/testutil" @@ -90,7 +89,7 @@ var ( Namespace: namespace, Subsystem: subsystem, Name: "rejected_requests_total", - Help: "Number of requests rejected by API Priority and Fairness subsystem", + Help: "Number of requests rejected by API Priority and Fairness system", StabilityLevel: compbasemetrics.ALPHA, }, []string{priorityLevel, flowSchema, "reason"}, @@ -100,7 +99,7 @@ var ( Namespace: namespace, Subsystem: subsystem, Name: "dispatched_requests_total", - Help: "Number of requests executed by API Priority and Fairness subsystem", + Help: "Number of requests released by API Priority and Fairness system for service", StabilityLevel: compbasemetrics.ALPHA, }, []string{priorityLevel, flowSchema}, @@ -111,7 +110,7 @@ var ( Namespace: namespace, Subsystem: subsystem, Name: "priority_level_seat_count_samples", - Help: "Periodic observations of number of seats occupied for any stage of execution (but only initial stage for WATCHes)", + Help: "Periodic observations of the number of requests", Buckets: []float64{0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1}, ConstLabels: map[string]string{phase: "executing"}, StabilityLevel: compbasemetrics.ALPHA, @@ -120,7 +119,7 @@ var ( Namespace: namespace, Subsystem: subsystem, Name: "priority_level_seat_count_watermarks", - Help: "Watermarks of the number of seats occupied for any stage of execution (but only initial stage for WATCHes)", + Help: "Watermarks of the number of requests", Buckets: []float64{0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1}, ConstLabels: map[string]string{phase: "executing"}, StabilityLevel: compbasemetrics.ALPHA, @@ -133,7 +132,7 @@ var ( Namespace: namespace, Subsystem: subsystem, Name: "priority_level_request_count_samples", - Help: "Periodic observations of the number of requests waiting or in any stage of execution (but only initial stage for WATCHes)", + Help: "Periodic observations of the number of requests", Buckets: []float64{0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1}, StabilityLevel: compbasemetrics.ALPHA, }, @@ -141,7 +140,7 @@ var ( Namespace: namespace, Subsystem: subsystem, Name: "priority_level_request_count_watermarks", - Help: "Watermarks of the number of requests waiting or in any stage of execution (but only initial stage for WATCHes)", + Help: "Watermarks of the number of requests", Buckets: []float64{0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1}, StabilityLevel: compbasemetrics.ALPHA, }, @@ -153,7 +152,7 @@ var ( Namespace: namespace, Subsystem: subsystem, Name: "read_vs_write_request_count_samples", - Help: "Periodic observations of the number of requests waiting or in regular stage of execution", + Help: "Periodic observations of the number of requests", Buckets: []float64{0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1}, StabilityLevel: compbasemetrics.ALPHA, }, @@ -161,7 +160,7 @@ var ( Namespace: namespace, Subsystem: subsystem, Name: "read_vs_write_request_count_watermarks", - Help: "Watermarks of the number of requests waiting or in regular stage of execution", + Help: "Watermarks of the number of requests", Buckets: []float64{0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1}, StabilityLevel: compbasemetrics.ALPHA, }, @@ -222,7 +221,7 @@ var ( Namespace: namespace, Subsystem: subsystem, Name: "current_inqueue_requests", - Help: "Number of requests currently pending in queues of the API Priority and Fairness subsystem", + Help: "Number of requests currently pending in queues of the API Priority and Fairness system", StabilityLevel: compbasemetrics.ALPHA, }, []string{priorityLevel, flowSchema}, @@ -232,7 +231,7 @@ var ( Namespace: namespace, Subsystem: subsystem, Name: "request_queue_length_after_enqueue", - Help: "Length of queue in the API Priority and Fairness subsystem, as seen by each request after it is enqueued", + Help: "Length of queue in the API Priority and Fairness system, as seen by each request after it is enqueued", Buckets: queueLengthBuckets, StabilityLevel: compbasemetrics.ALPHA, }, @@ -243,7 +242,7 @@ var ( Namespace: namespace, Subsystem: subsystem, Name: "request_concurrency_limit", - Help: "Shared concurrency limit in the API Priority and Fairness subsystem", + Help: "Shared concurrency limit in the API Priority and Fairness system", StabilityLevel: compbasemetrics.ALPHA, }, []string{priorityLevel}, @@ -253,7 +252,7 @@ var ( Namespace: namespace, Subsystem: subsystem, Name: "current_executing_requests", - Help: "Number of requests in initial (for a WATCH) or any (for a non-WATCH) execution stage in the API Priority and Fairness subsystem", + Help: "Number of requests in regular execution phase in the API Priority and Fairness system", StabilityLevel: compbasemetrics.ALPHA, }, []string{priorityLevel, flowSchema}, @@ -263,7 +262,7 @@ var ( Namespace: namespace, Subsystem: subsystem, Name: "request_concurrency_in_use", - Help: "Concurrency (number of seats) occupied by the currently executing (initial stage for a WATCH, any stage otherwise) requests in the API Priority and Fairness subsystem", + Help: "Concurrency (number of seats) occupided by the currently executing (all phases count) requests in the API Priority and Fairness system", StabilityLevel: compbasemetrics.ALPHA, }, []string{priorityLevel, flowSchema}, @@ -284,11 +283,11 @@ var ( Namespace: namespace, Subsystem: subsystem, Name: "request_execution_seconds", - Help: "Duration of initial stage (for a WATCH) or any (for a non-WATCH) stage of request execution in the API Priority and Fairness subsystem", + Help: "Duration of regular phase of request execution in the API Priority and Fairness system", Buckets: requestDurationSecondsBuckets, StabilityLevel: compbasemetrics.ALPHA, }, - []string{priorityLevel, flowSchema, "type"}, + []string{priorityLevel, flowSchema}, ) watchCountSamples = compbasemetrics.NewHistogramVec( &compbasemetrics.HistogramOpts{ @@ -311,29 +310,6 @@ var ( }, []string{priorityLevel, "success"}, ) - apiserverWorkEstimatedSeats = compbasemetrics.NewHistogramVec( - &compbasemetrics.HistogramOpts{ - Namespace: namespace, - Subsystem: subsystem, - Name: "work_estimated_seats", - Help: "Number of estimated seats (maximum of initial and final seats) associated with requests in API Priority and Fairness", - // the upper bound comes from the maximum number of seats a request - // can occupy which is currently set at 10. - Buckets: []float64{1, 2, 4, 10}, - StabilityLevel: compbasemetrics.ALPHA, - }, - []string{priorityLevel, flowSchema}, - ) - apiserverDispatchWithNoAccommodation = compbasemetrics.NewCounterVec( - &compbasemetrics.CounterOpts{ - Namespace: namespace, - Subsystem: subsystem, - Name: "request_dispatch_no_accommodation_total", - Help: "Number of times a dispatch attempt resulted in a non accommodation due to lack of available seats", - StabilityLevel: compbasemetrics.ALPHA, - }, - []string{priorityLevel, flowSchema}, - ) metrics = Registerables{ apiserverRejectedRequestsTotal, @@ -352,8 +328,6 @@ var ( apiserverRequestExecutionSeconds, watchCountSamples, apiserverEpochAdvances, - apiserverWorkEstimatedSeats, - apiserverDispatchWithNoAccommodation, }. Append(PriorityLevelExecutionSeatsObserverGenerator.metrics()...). Append(PriorityLevelConcurrencyObserverPairGenerator.metrics()...). @@ -418,11 +392,7 @@ func ObserveWaitingDuration(ctx context.Context, priorityLevel, flowSchema, exec // ObserveExecutionDuration observes the execution duration for flow control func ObserveExecutionDuration(ctx context.Context, priorityLevel, flowSchema string, executionTime time.Duration) { - reqType := "regular" - if requestInfo, ok := apirequest.RequestInfoFrom(ctx); ok && requestInfo.Verb == "watch" { - reqType = requestInfo.Verb - } - apiserverRequestExecutionSeconds.WithContext(ctx).WithLabelValues(priorityLevel, flowSchema, reqType).Observe(executionTime.Seconds()) + apiserverRequestExecutionSeconds.WithContext(ctx).WithLabelValues(priorityLevel, flowSchema).Observe(executionTime.Seconds()) } // ObserveWatchCount notes a sampling of a watch count @@ -434,14 +404,3 @@ func ObserveWatchCount(ctx context.Context, priorityLevel, flowSchema string, co func AddEpochAdvance(ctx context.Context, priorityLevel string, success bool) { apiserverEpochAdvances.WithContext(ctx).WithLabelValues(priorityLevel, strconv.FormatBool(success)).Inc() } - -// ObserveWorkEstimatedSeats notes a sampling of estimated seats associated with a request -func ObserveWorkEstimatedSeats(priorityLevel, flowSchema string, seats int) { - apiserverWorkEstimatedSeats.WithLabelValues(priorityLevel, flowSchema).Observe(float64(seats)) -} - -// AddDispatchWithNoAccommodation keeps track of number of times dispatch attempt results -// in a non accommodation due to lack of available seats. -func AddDispatchWithNoAccommodation(priorityLevel, flowSchema string) { - apiserverDispatchWithNoAccommodation.WithLabelValues(priorityLevel, flowSchema).Inc() -} diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/request/list_work_estimator.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/request/list_work_estimator.go index 50125715c8a1..7fcc0903e83a 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/request/list_work_estimator.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/request/list_work_estimator.go @@ -68,23 +68,17 @@ func (e *listWorkEstimator) estimate(r *http.Request, flowSchemaName, priorityLe // pruner will eventually remove the CRD from the cache. return WorkEstimate{InitialSeats: maximumSeats} case err == ObjectCountNotFoundErr: - // there are multiple scenarios in which we can see this error: + // there are two scenarios in which we can see this error: // a. the type is truly unknown, a typo on the caller's part. // b. the count has gone stale for too long and the pruner // has removed the type from the cache. - // c. the type is an aggregated resource that is served by a - // different apiserver (thus its object count is not updated) - // we don't have a way to distinguish between those situations. - // However, in case c, the request is delegated to a different apiserver, - // and thus its cost for our server is minimal. To avoid the situation - // when aggregated API calls are overestimated, we allocate the minimum - // possible seats (see #109106 as an example when being more conservative - // led to problems). - return WorkEstimate{InitialSeats: minimumSeats} + // we don't have a way to distinguish between a and b. b seems to indicate + // to a more severe case of degradation, although b can naturally trigger + // when a CRD is removed. let's be conservative and allocate maximum seats. + return WorkEstimate{InitialSeats: maximumSeats} case err != nil: // we should never be here since Get returns either ObjectCountStaleErr or // ObjectCountNotFoundErr, return maximumSeats to be on the safe side. - klog.ErrorS(err, "Unexpected error from object count tracker") return WorkEstimate{InitialSeats: maximumSeats} } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/request/mutating_work_estimator.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/request/mutating_work_estimator.go index 45f47686a602..1c6c441e27c6 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/request/mutating_work_estimator.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/request/mutating_work_estimator.go @@ -30,7 +30,7 @@ const ( eventAdditionalDuration = 5 * time.Millisecond // TODO(wojtekt): Remove it once we tune the algorithm to not fail // scalability tests. - enableMutatingWorkEstimator = true + enableMutatingWorkEstimator = false ) func newMutatingWorkEstimator(countFn watchCountGetterFunc) WorkEstimatorFunc { diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/request/width.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/request/width.go index c9f1d155c4a4..675433c2c317 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/request/width.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/flowcontrol/request/width.go @@ -30,10 +30,6 @@ const ( minimumSeats = 1 // the maximum number of seats a request can occupy - // - // NOTE: work_estimate_seats_samples metric uses the value of maximumSeats - // as the upper bound, so when we change maximumSeats we should also - // update the buckets of the metric. maximumSeats = 10 ) diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/openapi/proto.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/openapi/proto.go index 162812f145d9..49c76fa8b68d 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/openapi/proto.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/openapi/proto.go @@ -19,7 +19,7 @@ package openapi import ( "encoding/json" - openapi_v2 "github.com/google/gnostic/openapiv2" + openapi_v2 "github.com/googleapis/gnostic/openapiv2" "k8s.io/kube-openapi/pkg/util/proto" "k8s.io/kube-openapi/pkg/validation/spec" diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/webhook/client.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/webhook/client.go index 514fd9551cc0..3ad774ef84db 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/webhook/client.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/webhook/client.go @@ -148,11 +148,8 @@ func (cm *ClientManager) HookClient(cc ClientConfig) (*rest.RESTClient, error) { cfg.ContentConfig.ContentType = runtime.ContentTypeJSON // Add a transport wrapper that allows detection of TLS connections to - // servers with serving certificates with deprecated characteristics - cfg.Wrap(x509metrics.NewDeprecatedCertificateRoundTripperWrapperConstructor( - x509MissingSANCounter, - x509InsecureSHA1Counter, - )) + // servers without SAN extension in their serving certificates + cfg.Wrap(x509metrics.NewMissingSANRoundTripperWrapperConstructor(x509MissingSANCounter)) client, err := rest.UnversionedRESTClientFor(cfg) if err == nil { diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/webhook/gencerts.sh b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/webhook/gencerts.sh index a6426a959191..f99895e298ae 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/webhook/gencerts.sh +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/webhook/gencerts.sh @@ -23,14 +23,6 @@ set -e CN_BASE="webhook_tests" -cat > intermediate_ca.conf << EOF -[ v3_ca ] -subjectKeyIdentifier=hash -authorityKeyIdentifier=keyid:always,issuer -basicConstraints = critical,CA:true -keyUsage = cRLSign, keyCertSign -EOF - cat > server.conf << EOF [req] req_extensions = v3_req @@ -79,15 +71,6 @@ openssl req -x509 -new -nodes -key caKey.pem -days 100000 -out caCert.pem -subj openssl genrsa -out badCAKey.pem 2048 openssl req -x509 -new -nodes -key badCAKey.pem -days 100000 -out badCACert.pem -subj "/CN=${CN_BASE}_ca" -# Create an intermediate certificate authority -openssl genrsa -out caKeyInter.pem 2048 -openssl req -new -nodes -key caKeyInter.pem -days 100000 -out caCertInter.csr -subj "/CN=${CN_BASE}_intermediate_ca" -openssl x509 -req -in caCertInter.csr -CA caCert.pem -CAkey caKey.pem -CAcreateserial -out caCertInter.pem -days 100000 -extensions v3_ca -extfile intermediate_ca.conf - -# Create an intermediate certificate authority with sha1 signature -openssl req -new -nodes -key caKeyInter.pem -days 100000 -out caCertInterSHA1.csr -subj "/CN=${CN_BASE}_intermediate_ca" -openssl x509 -sha1 -req -in caCertInterSHA1.csr -CA caCert.pem -CAkey caKey.pem -CAcreateserial -out caCertInterSHA1.pem -days 100000 -extensions v3_ca -extfile intermediate_ca.conf - # Create a server certiticate openssl genrsa -out serverKey.pem 2048 openssl req -new -key serverKey.pem -out server.csr -subj "/CN=${CN_BASE}_server" -config server.conf @@ -97,14 +80,6 @@ openssl x509 -req -in server.csr -CA caCert.pem -CAkey caKey.pem -CAcreateserial openssl req -new -key serverKey.pem -out serverNoSAN.csr -subj "/CN=localhost" -config server_no_san.conf openssl x509 -req -in serverNoSAN.csr -CA caCert.pem -CAkey caKey.pem -CAcreateserial -out serverCertNoSAN.pem -days 100000 -extensions v3_req -extfile server_no_san.conf -# Create a server certiticate with SHA1 signature signed by OK intermediate CA -openssl req -new -key serverKey.pem -out serverSHA1.csr -subj "/CN=localhost" -config server.conf -openssl x509 -sha1 -req -in serverSHA1.csr -CA caCertInter.pem -CAkey caKeyInter.pem -CAcreateserial -out sha1ServerCertInter.pem -days 100000 -extensions v3_req -extfile server.conf - -# Create a server certiticate signed by SHA1-signed intermediate CA -openssl req -new -key serverKey.pem -out serverInterSHA1.csr -subj "/CN=localhost" -config server.conf -openssl x509 -req -in serverInterSHA1.csr -CA caCertInterSHA1.pem -CAkey caKeyInter.pem -CAcreateserial -out serverCertInterSHA1.pem -days 100000 -extensions v3_req -extfile server.conf - # Create a client certiticate openssl genrsa -out clientKey.pem 2048 openssl req -new -key clientKey.pem -out client.csr -subj "/CN=${CN_BASE}_client" -config client.conf @@ -135,7 +110,7 @@ limitations under the License. package webhook EOF -for file in caKey caCert badCAKey badCACert caCertInter caCertInterSHA1 serverKey serverCert serverCertNoSAN clientKey clientCert sha1ServerCertInter serverCertInterSHA1; do +for file in caKey caCert badCAKey badCACert serverKey serverCert serverCertNoSAN clientKey clientCert; do data=$(cat ${file}.pem) echo "" >> $outfile echo "var $file = []byte(\`$data\`)" >> $outfile diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/webhook/metrics.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/webhook/metrics.go index 67fc8fabe05f..c3085226cfee 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/webhook/metrics.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/webhook/metrics.go @@ -34,19 +34,6 @@ var x509MissingSANCounter = metrics.NewCounter( }, ) -var x509InsecureSHA1Counter = metrics.NewCounter( - &metrics.CounterOpts{ - Subsystem: "webhooks", - Namespace: "apiserver", - Name: "x509_insecure_sha1_total", - Help: "Counts the number of requests to servers with insecure SHA1 signatures " + - "in their serving certificate OR the number of connection failures " + - "due to the insecure SHA1 signatures (either/or, based on the runtime environment)", - StabilityLevel: metrics.ALPHA, - }, -) - func init() { legacyregistry.MustRegister(x509MissingSANCounter) - legacyregistry.MustRegister(x509InsecureSHA1Counter) } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/webhook/webhook.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/webhook/webhook.go index 06a74c1cd311..a17ab8f48f75 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/webhook/webhook.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/webhook/webhook.go @@ -72,23 +72,43 @@ func DefaultShouldRetry(err error) bool { return false } -// NewGenericWebhook creates a new GenericWebhook from the provided rest.Config. -func NewGenericWebhook(scheme *runtime.Scheme, codecFactory serializer.CodecFactory, config *rest.Config, groupVersions []schema.GroupVersion, retryBackoff wait.Backoff) (*GenericWebhook, error) { +// NewGenericWebhook creates a new GenericWebhook from the provided kubeconfig file. +func NewGenericWebhook(scheme *runtime.Scheme, codecFactory serializer.CodecFactory, kubeConfigFile string, groupVersions []schema.GroupVersion, retryBackoff wait.Backoff, customDial utilnet.DialFunc) (*GenericWebhook, error) { + return newGenericWebhook(scheme, codecFactory, kubeConfigFile, groupVersions, retryBackoff, defaultRequestTimeout, customDial) +} + +func newGenericWebhook(scheme *runtime.Scheme, codecFactory serializer.CodecFactory, kubeConfigFile string, groupVersions []schema.GroupVersion, retryBackoff wait.Backoff, requestTimeout time.Duration, customDial utilnet.DialFunc) (*GenericWebhook, error) { for _, groupVersion := range groupVersions { if !scheme.IsVersionRegistered(groupVersion) { return nil, fmt.Errorf("webhook plugin requires enabling extension resource: %s", groupVersion) } } - clientConfig := rest.CopyConfig(config) + loadingRules := clientcmd.NewDefaultClientConfigLoadingRules() + loadingRules.ExplicitPath = kubeConfigFile + loader := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(loadingRules, &clientcmd.ConfigOverrides{}) + + clientConfig, err := loader.ClientConfig() + if err != nil { + return nil, err + } + + // Kubeconfigs can't set a timeout, this can only be set through a command line flag. + // + // https://github.com/kubernetes/client-go/blob/master/tools/clientcmd/overrides.go + // + // Set this to something reasonable so request to webhooks don't hang forever. + clientConfig.Timeout = requestTimeout + + // Avoid client-side rate limiting talking to the webhook backend. + // Rate limiting should happen when deciding how many requests to serve. + clientConfig.QPS = -1 codec := codecFactory.LegacyCodec(groupVersions...) clientConfig.ContentConfig.NegotiatedSerializer = serializer.NegotiatedSerializerWrapper(runtime.SerializerInfo{Serializer: codec}) - clientConfig.Wrap(x509metrics.NewDeprecatedCertificateRoundTripperWrapperConstructor( - x509MissingSANCounter, - x509InsecureSHA1Counter, - )) + clientConfig.Dial = customDial + clientConfig.Wrap(x509metrics.NewMissingSANRoundTripperWrapperConstructor(x509MissingSANCounter)) restClient, err := rest.UnversionedRESTClientFor(clientConfig) if err != nil { @@ -142,29 +162,3 @@ func WithExponentialBackoff(ctx context.Context, retryBackoff wait.Backoff, webh return nil } } - -func LoadKubeconfig(kubeConfigFile string, customDial utilnet.DialFunc) (*rest.Config, error) { - loadingRules := clientcmd.NewDefaultClientConfigLoadingRules() - loadingRules.ExplicitPath = kubeConfigFile - loader := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(loadingRules, &clientcmd.ConfigOverrides{}) - - clientConfig, err := loader.ClientConfig() - if err != nil { - return nil, err - } - - clientConfig.Dial = customDial - - // Kubeconfigs can't set a timeout, this can only be set through a command line flag. - // - // https://github.com/kubernetes/client-go/blob/master/tools/clientcmd/overrides.go - // - // Set this to something reasonable so request to webhooks don't hang forever. - clientConfig.Timeout = defaultRequestTimeout - - // Avoid client-side rate limiting talking to the webhook backend. - // Rate limiting should happen when deciding how many requests to serve. - clientConfig.QPS = -1 - - return clientConfig, nil -} diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/x509metrics/missing_san.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/x509metrics/missing_san.go new file mode 100644 index 000000000000..d16daec25119 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/x509metrics/missing_san.go @@ -0,0 +1,92 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package x509metrics + +import ( + "crypto/x509" + "errors" + "net/http" + "strings" + + utilnet "k8s.io/apimachinery/pkg/util/net" + "k8s.io/component-base/metrics" +) + +var _ utilnet.RoundTripperWrapper = &x509MissingSANErrorMetricsRTWrapper{} + +type x509MissingSANErrorMetricsRTWrapper struct { + rt http.RoundTripper + + counter *metrics.Counter +} + +// NewMissingSANRoundTripperWrapperConstructor returns a RoundTripper wrapper that's usable +// within ClientConfig.Wrap that increases the `metricCounter` whenever: +// 1. we get a x509.HostnameError with string `x509: certificate relies on legacy Common Name field` +// which indicates an error caused by the deprecation of Common Name field when veryfing remote +// hostname +// 2. the server certificate in response contains no SAN. This indicates that this binary run +// with the GODEBUG=x509ignoreCN=0 in env +func NewMissingSANRoundTripperWrapperConstructor(metricCounter *metrics.Counter) func(rt http.RoundTripper) http.RoundTripper { + return func(rt http.RoundTripper) http.RoundTripper { + return &x509MissingSANErrorMetricsRTWrapper{ + rt: rt, + counter: metricCounter, + } + } +} + +func (w *x509MissingSANErrorMetricsRTWrapper) RoundTrip(req *http.Request) (*http.Response, error) { + resp, err := w.rt.RoundTrip(req) + checkForHostnameError(err, w.counter) + checkRespForNoSAN(resp, w.counter) + return resp, err +} + +func (w *x509MissingSANErrorMetricsRTWrapper) WrappedRoundTripper() http.RoundTripper { + return w.rt +} + +// checkForHostnameError increases the metricCounter when we're running w/o GODEBUG=x509ignoreCN=0 +// and the client reports a HostnameError about the legacy CN fields +func checkForHostnameError(err error, metricCounter *metrics.Counter) { + if err != nil && errors.As(err, &x509.HostnameError{}) && strings.Contains(err.Error(), "x509: certificate relies on legacy Common Name field") { + // increase the count of registered failures due to Go 1.15 x509 cert Common Name deprecation + metricCounter.Inc() + } +} + +// checkRespForNoSAN increases the metricCounter when the server response contains +// a leaf certificate w/o the SAN extension +func checkRespForNoSAN(resp *http.Response, metricCounter *metrics.Counter) { + if resp != nil && resp.TLS != nil && len(resp.TLS.PeerCertificates) > 0 { + if serverCert := resp.TLS.PeerCertificates[0]; !hasSAN(serverCert) { + metricCounter.Inc() + } + } +} + +func hasSAN(c *x509.Certificate) bool { + sanOID := []int{2, 5, 29, 17} + + for _, e := range c.Extensions { + if e.Id.Equal(sanOID) { + return true + } + } + return false +} diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/x509metrics/server_cert_deprecations.go b/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/x509metrics/server_cert_deprecations.go deleted file mode 100644 index 9f1e34c4d447..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/pkg/util/x509metrics/server_cert_deprecations.go +++ /dev/null @@ -1,225 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package x509metrics - -import ( - "crypto/x509" - "errors" - "fmt" - "net/http" - "reflect" - "strings" - - utilnet "k8s.io/apimachinery/pkg/util/net" - "k8s.io/apiserver/pkg/audit" - "k8s.io/component-base/metrics" - "k8s.io/klog/v2" -) - -var _ utilnet.RoundTripperWrapper = &x509DeprecatedCertificateMetricsRTWrapper{} - -type x509DeprecatedCertificateMetricsRTWrapper struct { - rt http.RoundTripper - - checkers []deprecatedCertificateAttributeChecker -} - -type deprecatedCertificateAttributeChecker interface { - // CheckRoundTripError returns true if the err is an error specific - // to this deprecated certificate attribute - CheckRoundTripError(err error) bool - // CheckPeerCertificates returns true if the deprecated attribute/value pair - // was found in a given certificate in the http.Response.TLS.PeerCertificates bundle - CheckPeerCertificates(certs []*x509.Certificate) bool - // IncreaseCounter increases the counter internal to this interface - // Use the req to derive and log information useful for troubleshooting the certificate issue - IncreaseMetricsCounter(req *http.Request) -} - -// counterRaiser is a helper structure to include in certificate deprecation checkers. -// It implements the IncreaseMetricsCounter() method so that, when included in the checker, -// it does not have to be reimplemented. -type counterRaiser struct { - counter *metrics.Counter - // programmatic id used in log and audit annotations prefixes - id string - // human readable explanation - reason string -} - -func (c *counterRaiser) IncreaseMetricsCounter(req *http.Request) { - if req != nil && req.URL != nil { - if hostname := req.URL.Hostname(); len(hostname) > 0 { - prefix := fmt.Sprintf("%s.invalid-cert.kubernetes.io", c.id) - klog.Infof("%s: invalid certificate detected connecting to %q: %s", prefix, hostname, c.reason) - audit.AddAuditAnnotation(req.Context(), prefix+"/"+hostname, c.reason) - } - } - c.counter.Inc() -} - -// NewDeprecatedCertificateRoundTripperWrapperConstructor returns a RoundTripper wrapper that's usable within ClientConfig.Wrap. -// -// It increases the `missingSAN` counter whenever: -// 1. we get a x509.HostnameError with string `x509: certificate relies on legacy Common Name field` -// which indicates an error caused by the deprecation of Common Name field when veryfing remote -// hostname -// 2. the server certificate in response contains no SAN. This indicates that this binary run -// with the GODEBUG=x509ignoreCN=0 in env -// -// It increases the `sha1` counter whenever: -// 1. we get a x509.InsecureAlgorithmError with string `SHA1` -// which indicates an error caused by an insecure SHA1 signature -// 2. the server certificate in response contains a SHA1WithRSA or ECDSAWithSHA1 signature. -// This indicates that this binary run with the GODEBUG=x509sha1=1 in env -func NewDeprecatedCertificateRoundTripperWrapperConstructor(missingSAN, sha1 *metrics.Counter) func(rt http.RoundTripper) http.RoundTripper { - return func(rt http.RoundTripper) http.RoundTripper { - return &x509DeprecatedCertificateMetricsRTWrapper{ - rt: rt, - checkers: []deprecatedCertificateAttributeChecker{ - NewSANDeprecatedChecker(missingSAN), - NewSHA1SignatureDeprecatedChecker(sha1), - }, - } - } -} - -func (w *x509DeprecatedCertificateMetricsRTWrapper) RoundTrip(req *http.Request) (*http.Response, error) { - resp, err := w.rt.RoundTrip(req) - - if err != nil { - for _, checker := range w.checkers { - if checker.CheckRoundTripError(err) { - checker.IncreaseMetricsCounter(req) - } - } - } else if resp != nil { - if resp.TLS != nil && len(resp.TLS.PeerCertificates) > 0 { - for _, checker := range w.checkers { - if checker.CheckPeerCertificates(resp.TLS.PeerCertificates) { - checker.IncreaseMetricsCounter(req) - } - } - } - } - - return resp, err -} - -func (w *x509DeprecatedCertificateMetricsRTWrapper) WrappedRoundTripper() http.RoundTripper { - return w.rt -} - -var _ deprecatedCertificateAttributeChecker = &missingSANChecker{} - -type missingSANChecker struct { - counterRaiser -} - -func NewSANDeprecatedChecker(counter *metrics.Counter) *missingSANChecker { - return &missingSANChecker{ - counterRaiser: counterRaiser{ - counter: counter, - id: "missing-san", - reason: "relies on a legacy Common Name field instead of the SAN extension for subject validation", - }, - } -} - -// CheckRoundTripError returns true when we're running w/o GODEBUG=x509ignoreCN=0 -// and the client reports a HostnameError about the legacy CN fields -func (c *missingSANChecker) CheckRoundTripError(err error) bool { - if err != nil && errors.As(err, &x509.HostnameError{}) && strings.Contains(err.Error(), "x509: certificate relies on legacy Common Name field") { - // increase the count of registered failures due to Go 1.15 x509 cert Common Name deprecation - return true - } - - return false -} - -// CheckPeerCertificates returns true when the server response contains -// a leaf certificate w/o the SAN extension -func (c *missingSANChecker) CheckPeerCertificates(peerCertificates []*x509.Certificate) bool { - if len(peerCertificates) > 0 { - if serverCert := peerCertificates[0]; !hasSAN(serverCert) { - return true - } - } - - return false -} - -func hasSAN(c *x509.Certificate) bool { - sanOID := []int{2, 5, 29, 17} - - for _, e := range c.Extensions { - if e.Id.Equal(sanOID) { - return true - } - } - return false -} - -type sha1SignatureChecker struct { - *counterRaiser -} - -func NewSHA1SignatureDeprecatedChecker(counter *metrics.Counter) *sha1SignatureChecker { - return &sha1SignatureChecker{ - counterRaiser: &counterRaiser{ - counter: counter, - id: "insecure-sha1", - reason: "uses an insecure SHA-1 signature", - }, - } -} - -// CheckRoundTripError returns true when we're running w/o GODEBUG=x509sha1=1 -// and the client reports an InsecureAlgorithmError about a SHA1 signature -func (c *sha1SignatureChecker) CheckRoundTripError(err error) bool { - var unknownAuthorityError x509.UnknownAuthorityError - if err == nil { - return false - } - if !errors.As(err, &unknownAuthorityError) { - return false - } - - errMsg := err.Error() - if strIdx := strings.Index(errMsg, "x509: cannot verify signature: insecure algorithm"); strIdx != -1 && strings.Contains(errMsg[strIdx:], "SHA1") { - // increase the count of registered failures due to Go 1.18 x509 sha1 signature deprecation - return true - } - - return false -} - -// CheckPeerCertificates returns true when the server response contains -// a non-root non-self-signed certificate with a deprecated SHA1 signature -func (c *sha1SignatureChecker) CheckPeerCertificates(peerCertificates []*x509.Certificate) bool { - // check all received non-self-signed certificates for deprecated signing algorithms - for _, cert := range peerCertificates { - if cert.SignatureAlgorithm == x509.SHA1WithRSA || cert.SignatureAlgorithm == x509.ECDSAWithSHA1 { - // the SHA-1 deprecation does not involve self-signed root certificates - if !reflect.DeepEqual(cert.Issuer, cert.Subject) { - return true - } - } - } - - return false -} diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/plugin/pkg/audit/truncate/truncate.go b/cluster-autoscaler/vendor/k8s.io/apiserver/plugin/pkg/audit/truncate/truncate.go index 42a40e3ebeae..de1c2d9f74be 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/plugin/pkg/audit/truncate/truncate.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/plugin/pkg/audit/truncate/truncate.go @@ -126,12 +126,7 @@ func truncate(e *auditinternal.Event) *auditinternal.Event { newEvent.RequestObject = nil newEvent.ResponseObject = nil - - if newEvent.Annotations == nil { - newEvent.Annotations = make(map[string]string) - } - newEvent.Annotations[annotationKey] = annotationValue - + audit.LogAnnotation(newEvent, annotationKey, annotationValue) return newEvent } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/plugin/pkg/audit/webhook/webhook.go b/cluster-autoscaler/vendor/k8s.io/apiserver/plugin/pkg/audit/webhook/webhook.go index b476aa61ca4d..0a2aa7078795 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/plugin/pkg/audit/webhook/webhook.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/plugin/pkg/audit/webhook/webhook.go @@ -63,12 +63,8 @@ func retryOnError(err error) bool { } func loadWebhook(configFile string, groupVersion schema.GroupVersion, retryBackoff wait.Backoff, customDial utilnet.DialFunc) (*webhook.GenericWebhook, error) { - clientConfig, err := webhook.LoadKubeconfig(configFile, customDial) - if err != nil { - return nil, err - } - w, err := webhook.NewGenericWebhook(audit.Scheme, audit.Codecs, clientConfig, - []schema.GroupVersion{groupVersion}, retryBackoff) + w, err := webhook.NewGenericWebhook(audit.Scheme, audit.Codecs, configFile, + []schema.GroupVersion{groupVersion}, retryBackoff, customDial) if err != nil { return nil, err } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook/webhook.go b/cluster-autoscaler/vendor/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook/webhook.go index 7d19b4b7ab25..0cafa4d73e41 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook/webhook.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook/webhook.go @@ -29,6 +29,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + utilnet "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apiserver/pkg/authentication/authenticator" "k8s.io/apiserver/pkg/authentication/user" @@ -69,12 +70,12 @@ func NewFromInterface(tokenReview authenticationv1client.AuthenticationV1Interfa return newWithBackoff(tokenReviewClient, retryBackoff, implicitAuds, requestTimeout, metrics) } -// New creates a new WebhookTokenAuthenticator from the provided rest -// config. It is recommend to wrap this authenticator with the token cache +// New creates a new WebhookTokenAuthenticator from the provided kubeconfig +// file. It is recommend to wrap this authenticator with the token cache // authenticator implemented in // k8s.io/apiserver/pkg/authentication/token/cache. -func New(config *rest.Config, version string, implicitAuds authenticator.Audiences, retryBackoff wait.Backoff) (*WebhookTokenAuthenticator, error) { - tokenReview, err := tokenReviewInterfaceFromConfig(config, version, retryBackoff) +func New(kubeConfigFile string, version string, implicitAuds authenticator.Audiences, retryBackoff wait.Backoff, customDial utilnet.DialFunc) (*WebhookTokenAuthenticator, error) { + tokenReview, err := tokenReviewInterfaceFromKubeconfig(kubeConfigFile, version, retryBackoff, customDial) if err != nil { return nil, err } @@ -136,7 +137,7 @@ func (w *WebhookTokenAuthenticator) AuthenticateToken(ctx context.Context, token start := time.Now() result, statusCode, tokenReviewErr = w.tokenReview.Create(ctx, r, metav1.CreateOptions{}) - latency := time.Since(start) + latency := time.Now().Sub(start) if statusCode != 0 { w.metrics.RecordRequestTotal(ctx, strconv.Itoa(statusCode)) @@ -194,10 +195,10 @@ func (w *WebhookTokenAuthenticator) AuthenticateToken(ctx context.Context, token }, true, nil } -// tokenReviewInterfaceFromConfig builds a client from the specified kubeconfig file, +// tokenReviewInterfaceFromKubeconfig builds a client from the specified kubeconfig file, // and returns a TokenReviewInterface that uses that client. Note that the client submits TokenReview // requests to the exact path specified in the kubeconfig file, so arbitrary non-API servers can be targeted. -func tokenReviewInterfaceFromConfig(config *rest.Config, version string, retryBackoff wait.Backoff) (tokenReviewer, error) { +func tokenReviewInterfaceFromKubeconfig(kubeConfigFile string, version string, retryBackoff wait.Backoff, customDial utilnet.DialFunc) (tokenReviewer, error) { localScheme := runtime.NewScheme() if err := scheme.AddToScheme(localScheme); err != nil { return nil, err @@ -209,7 +210,7 @@ func tokenReviewInterfaceFromConfig(config *rest.Config, version string, retryBa if err := localScheme.SetVersionPriority(groupVersions...); err != nil { return nil, err } - gw, err := webhook.NewGenericWebhook(localScheme, scheme.Codecs, config, groupVersions, retryBackoff) + gw, err := webhook.NewGenericWebhook(localScheme, scheme.Codecs, kubeConfigFile, groupVersions, retryBackoff, customDial) if err != nil { return nil, err } @@ -220,7 +221,7 @@ func tokenReviewInterfaceFromConfig(config *rest.Config, version string, retryBa if err := localScheme.SetVersionPriority(groupVersions...); err != nil { return nil, err } - gw, err := webhook.NewGenericWebhook(localScheme, scheme.Codecs, config, groupVersions, retryBackoff) + gw, err := webhook.NewGenericWebhook(localScheme, scheme.Codecs, kubeConfigFile, groupVersions, retryBackoff, customDial) if err != nil { return nil, err } diff --git a/cluster-autoscaler/vendor/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go b/cluster-autoscaler/vendor/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go index bae5f0e40192..b7970139306c 100644 --- a/cluster-autoscaler/vendor/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go +++ b/cluster-autoscaler/vendor/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go @@ -30,6 +30,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/cache" + utilnet "k8s.io/apimachinery/pkg/util/net" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/authorization/authorizer" @@ -92,8 +93,8 @@ func NewFromInterface(subjectAccessReview authorizationv1client.AuthorizationV1I // // For additional HTTP configuration, refer to the kubeconfig documentation // https://kubernetes.io/docs/user-guide/kubeconfig-file/. -func New(config *rest.Config, version string, authorizedTTL, unauthorizedTTL time.Duration, retryBackoff wait.Backoff) (*WebhookAuthorizer, error) { - subjectAccessReview, err := subjectAccessReviewInterfaceFromConfig(config, version, retryBackoff) +func New(kubeConfigFile string, version string, authorizedTTL, unauthorizedTTL time.Duration, retryBackoff wait.Backoff, customDial utilnet.DialFunc) (*WebhookAuthorizer, error) { + subjectAccessReview, err := subjectAccessReviewInterfaceFromKubeconfig(kubeConfigFile, version, retryBackoff, customDial) if err != nil { return nil, err } @@ -205,7 +206,7 @@ func (w *WebhookAuthorizer) Authorize(ctx context.Context, attr authorizer.Attri start := time.Now() result, statusCode, sarErr = w.subjectAccessReview.Create(ctx, r, metav1.CreateOptions{}) - latency := time.Since(start) + latency := time.Now().Sub(start) if statusCode != 0 { w.metrics.RecordRequestTotal(ctx, strconv.Itoa(statusCode)) @@ -268,10 +269,10 @@ func convertToSARExtra(extra map[string][]string) map[string]authorizationv1.Ext return ret } -// subjectAccessReviewInterfaceFromConfig builds a client from the specified kubeconfig file, +// subjectAccessReviewInterfaceFromKubeconfig builds a client from the specified kubeconfig file, // and returns a SubjectAccessReviewInterface that uses that client. Note that the client submits SubjectAccessReview // requests to the exact path specified in the kubeconfig file, so arbitrary non-API servers can be targeted. -func subjectAccessReviewInterfaceFromConfig(config *rest.Config, version string, retryBackoff wait.Backoff) (subjectAccessReviewer, error) { +func subjectAccessReviewInterfaceFromKubeconfig(kubeConfigFile string, version string, retryBackoff wait.Backoff, customDial utilnet.DialFunc) (subjectAccessReviewer, error) { localScheme := runtime.NewScheme() if err := scheme.AddToScheme(localScheme); err != nil { return nil, err @@ -283,7 +284,7 @@ func subjectAccessReviewInterfaceFromConfig(config *rest.Config, version string, if err := localScheme.SetVersionPriority(groupVersions...); err != nil { return nil, err } - gw, err := webhook.NewGenericWebhook(localScheme, scheme.Codecs, config, groupVersions, retryBackoff) + gw, err := webhook.NewGenericWebhook(localScheme, scheme.Codecs, kubeConfigFile, groupVersions, retryBackoff, customDial) if err != nil { return nil, err } @@ -294,7 +295,7 @@ func subjectAccessReviewInterfaceFromConfig(config *rest.Config, version string, if err := localScheme.SetVersionPriority(groupVersions...); err != nil { return nil, err } - gw, err := webhook.NewGenericWebhook(localScheme, scheme.Codecs, config, groupVersions, retryBackoff) + gw, err := webhook.NewGenericWebhook(localScheme, scheme.Codecs, kubeConfigFile, groupVersions, retryBackoff, customDial) if err != nil { return nil, err } diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/mutatingwebhookconfiguration.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/mutatingwebhookconfiguration.go index 61c8f667d20d..7ae061e3ca20 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/mutatingwebhookconfiguration.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/mutatingwebhookconfiguration.go @@ -123,6 +123,15 @@ func (b *MutatingWebhookConfigurationApplyConfiguration) WithNamespace(value str return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *MutatingWebhookConfigurationApplyConfiguration) WithSelfLink(value string) *MutatingWebhookConfigurationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -232,6 +241,15 @@ func (b *MutatingWebhookConfigurationApplyConfiguration) WithFinalizers(values . return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *MutatingWebhookConfigurationApplyConfiguration) WithClusterName(value string) *MutatingWebhookConfigurationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *MutatingWebhookConfigurationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingwebhookconfiguration.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingwebhookconfiguration.go index 811bfdf0b64d..ae19ed81edcb 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingwebhookconfiguration.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1/validatingwebhookconfiguration.go @@ -123,6 +123,15 @@ func (b *ValidatingWebhookConfigurationApplyConfiguration) WithNamespace(value s return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *ValidatingWebhookConfigurationApplyConfiguration) WithSelfLink(value string) *ValidatingWebhookConfigurationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -232,6 +241,15 @@ func (b *ValidatingWebhookConfigurationApplyConfiguration) WithFinalizers(values return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *ValidatingWebhookConfigurationApplyConfiguration) WithClusterName(value string) *ValidatingWebhookConfigurationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *ValidatingWebhookConfigurationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingwebhookconfiguration.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingwebhookconfiguration.go index 10dd034e2592..178745c23424 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingwebhookconfiguration.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/mutatingwebhookconfiguration.go @@ -123,6 +123,15 @@ func (b *MutatingWebhookConfigurationApplyConfiguration) WithNamespace(value str return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *MutatingWebhookConfigurationApplyConfiguration) WithSelfLink(value string) *MutatingWebhookConfigurationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -232,6 +241,15 @@ func (b *MutatingWebhookConfigurationApplyConfiguration) WithFinalizers(values . return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *MutatingWebhookConfigurationApplyConfiguration) WithClusterName(value string) *MutatingWebhookConfigurationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *MutatingWebhookConfigurationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingwebhookconfiguration.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingwebhookconfiguration.go index 75f1b9d716ad..e60d997f8a4d 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingwebhookconfiguration.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1/validatingwebhookconfiguration.go @@ -123,6 +123,15 @@ func (b *ValidatingWebhookConfigurationApplyConfiguration) WithNamespace(value s return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *ValidatingWebhookConfigurationApplyConfiguration) WithSelfLink(value string) *ValidatingWebhookConfigurationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -232,6 +241,15 @@ func (b *ValidatingWebhookConfigurationApplyConfiguration) WithFinalizers(values return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *ValidatingWebhookConfigurationApplyConfiguration) WithClusterName(value string) *ValidatingWebhookConfigurationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *ValidatingWebhookConfigurationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1/storageversion.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1/storageversion.go index 6b9f1783902f..180b7762597a 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1/storageversion.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1/storageversion.go @@ -124,6 +124,15 @@ func (b *StorageVersionApplyConfiguration) WithNamespace(value string) *StorageV return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *StorageVersionApplyConfiguration) WithSelfLink(value string) *StorageVersionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -233,6 +242,15 @@ func (b *StorageVersionApplyConfiguration) WithFinalizers(values ...string) *Sto return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *StorageVersionApplyConfiguration) WithClusterName(value string) *StorageVersionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *StorageVersionApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1/controllerrevision.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1/controllerrevision.go index c4e2085078f6..28a0c582b83a 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1/controllerrevision.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1/controllerrevision.go @@ -127,6 +127,15 @@ func (b *ControllerRevisionApplyConfiguration) WithNamespace(value string) *Cont return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *ControllerRevisionApplyConfiguration) WithSelfLink(value string) *ControllerRevisionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -236,6 +245,15 @@ func (b *ControllerRevisionApplyConfiguration) WithFinalizers(values ...string) return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *ControllerRevisionApplyConfiguration) WithClusterName(value string) *ControllerRevisionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *ControllerRevisionApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1/daemonset.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1/daemonset.go index cc9fdcd5dd90..6dd8c6e889ee 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1/daemonset.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1/daemonset.go @@ -126,6 +126,15 @@ func (b *DaemonSetApplyConfiguration) WithNamespace(value string) *DaemonSetAppl return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *DaemonSetApplyConfiguration) WithSelfLink(value string) *DaemonSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *DaemonSetApplyConfiguration) WithFinalizers(values ...string) *DaemonSe return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *DaemonSetApplyConfiguration) WithClusterName(value string) *DaemonSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *DaemonSetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1/deployment.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1/deployment.go index 13edda7727a1..d33321c52b79 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1/deployment.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1/deployment.go @@ -126,6 +126,15 @@ func (b *DeploymentApplyConfiguration) WithNamespace(value string) *DeploymentAp return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *DeploymentApplyConfiguration) WithSelfLink(value string) *DeploymentApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *DeploymentApplyConfiguration) WithFinalizers(values ...string) *Deploym return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *DeploymentApplyConfiguration) WithClusterName(value string) *DeploymentApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *DeploymentApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1/replicaset.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1/replicaset.go index 4e7818e535fc..0affbf82f29d 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1/replicaset.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1/replicaset.go @@ -126,6 +126,15 @@ func (b *ReplicaSetApplyConfiguration) WithNamespace(value string) *ReplicaSetAp return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *ReplicaSetApplyConfiguration) WithSelfLink(value string) *ReplicaSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *ReplicaSetApplyConfiguration) WithFinalizers(values ...string) *Replica return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *ReplicaSetApplyConfiguration) WithClusterName(value string) *ReplicaSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *ReplicaSetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1/rollingupdatestatefulsetstrategy.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1/rollingupdatestatefulsetstrategy.go index c1b5dea85523..2090d88ed9d5 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1/rollingupdatestatefulsetstrategy.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1/rollingupdatestatefulsetstrategy.go @@ -18,15 +18,10 @@ limitations under the License. package v1 -import ( - intstr "k8s.io/apimachinery/pkg/util/intstr" -) - // RollingUpdateStatefulSetStrategyApplyConfiguration represents an declarative configuration of the RollingUpdateStatefulSetStrategy type for use // with apply. type RollingUpdateStatefulSetStrategyApplyConfiguration struct { - Partition *int32 `json:"partition,omitempty"` - MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` + Partition *int32 `json:"partition,omitempty"` } // RollingUpdateStatefulSetStrategyApplyConfiguration constructs an declarative configuration of the RollingUpdateStatefulSetStrategy type for use with @@ -42,11 +37,3 @@ func (b *RollingUpdateStatefulSetStrategyApplyConfiguration) WithPartition(value b.Partition = &value return b } - -// WithMaxUnavailable sets the MaxUnavailable field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MaxUnavailable field is set to the value of the last call. -func (b *RollingUpdateStatefulSetStrategyApplyConfiguration) WithMaxUnavailable(value intstr.IntOrString) *RollingUpdateStatefulSetStrategyApplyConfiguration { - b.MaxUnavailable = &value - return b -} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1/statefulset.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1/statefulset.go index 24041d99f87d..7cb5ec12c19b 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1/statefulset.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1/statefulset.go @@ -126,6 +126,15 @@ func (b *StatefulSetApplyConfiguration) WithNamespace(value string) *StatefulSet return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *StatefulSetApplyConfiguration) WithSelfLink(value string) *StatefulSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *StatefulSetApplyConfiguration) WithFinalizers(values ...string) *Statef return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *StatefulSetApplyConfiguration) WithClusterName(value string) *StatefulSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *StatefulSetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta1/controllerrevision.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta1/controllerrevision.go index 827c06359848..bcdfa44b2d32 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta1/controllerrevision.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta1/controllerrevision.go @@ -127,6 +127,15 @@ func (b *ControllerRevisionApplyConfiguration) WithNamespace(value string) *Cont return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *ControllerRevisionApplyConfiguration) WithSelfLink(value string) *ControllerRevisionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -236,6 +245,15 @@ func (b *ControllerRevisionApplyConfiguration) WithFinalizers(values ...string) return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *ControllerRevisionApplyConfiguration) WithClusterName(value string) *ControllerRevisionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *ControllerRevisionApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta1/deployment.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta1/deployment.go index e22f76b6654f..eddab1789888 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta1/deployment.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta1/deployment.go @@ -126,6 +126,15 @@ func (b *DeploymentApplyConfiguration) WithNamespace(value string) *DeploymentAp return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *DeploymentApplyConfiguration) WithSelfLink(value string) *DeploymentApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *DeploymentApplyConfiguration) WithFinalizers(values ...string) *Deploym return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *DeploymentApplyConfiguration) WithClusterName(value string) *DeploymentApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *DeploymentApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta1/rollingupdatestatefulsetstrategy.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta1/rollingupdatestatefulsetstrategy.go index 8989a08d2c96..64273f61834d 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta1/rollingupdatestatefulsetstrategy.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta1/rollingupdatestatefulsetstrategy.go @@ -18,15 +18,10 @@ limitations under the License. package v1beta1 -import ( - intstr "k8s.io/apimachinery/pkg/util/intstr" -) - // RollingUpdateStatefulSetStrategyApplyConfiguration represents an declarative configuration of the RollingUpdateStatefulSetStrategy type for use // with apply. type RollingUpdateStatefulSetStrategyApplyConfiguration struct { - Partition *int32 `json:"partition,omitempty"` - MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` + Partition *int32 `json:"partition,omitempty"` } // RollingUpdateStatefulSetStrategyApplyConfiguration constructs an declarative configuration of the RollingUpdateStatefulSetStrategy type for use with @@ -42,11 +37,3 @@ func (b *RollingUpdateStatefulSetStrategyApplyConfiguration) WithPartition(value b.Partition = &value return b } - -// WithMaxUnavailable sets the MaxUnavailable field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MaxUnavailable field is set to the value of the last call. -func (b *RollingUpdateStatefulSetStrategyApplyConfiguration) WithMaxUnavailable(value intstr.IntOrString) *RollingUpdateStatefulSetStrategyApplyConfiguration { - b.MaxUnavailable = &value - return b -} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulset.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulset.go index ed5cfab41c88..a4f64cd85bb4 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulset.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta1/statefulset.go @@ -126,6 +126,15 @@ func (b *StatefulSetApplyConfiguration) WithNamespace(value string) *StatefulSet return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *StatefulSetApplyConfiguration) WithSelfLink(value string) *StatefulSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *StatefulSetApplyConfiguration) WithFinalizers(values ...string) *Statef return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *StatefulSetApplyConfiguration) WithClusterName(value string) *StatefulSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *StatefulSetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta2/controllerrevision.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta2/controllerrevision.go index 4abab6851ca8..f5d906162a12 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta2/controllerrevision.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta2/controllerrevision.go @@ -127,6 +127,15 @@ func (b *ControllerRevisionApplyConfiguration) WithNamespace(value string) *Cont return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *ControllerRevisionApplyConfiguration) WithSelfLink(value string) *ControllerRevisionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -236,6 +245,15 @@ func (b *ControllerRevisionApplyConfiguration) WithFinalizers(values ...string) return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *ControllerRevisionApplyConfiguration) WithClusterName(value string) *ControllerRevisionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *ControllerRevisionApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta2/daemonset.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta2/daemonset.go index 906a8ca46e9e..92708f0a8b10 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta2/daemonset.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta2/daemonset.go @@ -126,6 +126,15 @@ func (b *DaemonSetApplyConfiguration) WithNamespace(value string) *DaemonSetAppl return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *DaemonSetApplyConfiguration) WithSelfLink(value string) *DaemonSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *DaemonSetApplyConfiguration) WithFinalizers(values ...string) *DaemonSe return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *DaemonSetApplyConfiguration) WithClusterName(value string) *DaemonSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *DaemonSetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta2/deployment.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta2/deployment.go index 7e39e67510cd..ad0c509db5fc 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta2/deployment.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta2/deployment.go @@ -126,6 +126,15 @@ func (b *DeploymentApplyConfiguration) WithNamespace(value string) *DeploymentAp return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *DeploymentApplyConfiguration) WithSelfLink(value string) *DeploymentApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *DeploymentApplyConfiguration) WithFinalizers(values ...string) *Deploym return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *DeploymentApplyConfiguration) WithClusterName(value string) *DeploymentApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *DeploymentApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta2/replicaset.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta2/replicaset.go index d9303e1b22e5..e2998f2c33a6 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta2/replicaset.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta2/replicaset.go @@ -126,6 +126,15 @@ func (b *ReplicaSetApplyConfiguration) WithNamespace(value string) *ReplicaSetAp return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *ReplicaSetApplyConfiguration) WithSelfLink(value string) *ReplicaSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *ReplicaSetApplyConfiguration) WithFinalizers(values ...string) *Replica return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *ReplicaSetApplyConfiguration) WithClusterName(value string) *ReplicaSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *ReplicaSetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta2/rollingupdatestatefulsetstrategy.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta2/rollingupdatestatefulsetstrategy.go index 4a12e51c0a2a..f828ef70d493 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta2/rollingupdatestatefulsetstrategy.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta2/rollingupdatestatefulsetstrategy.go @@ -18,15 +18,10 @@ limitations under the License. package v1beta2 -import ( - intstr "k8s.io/apimachinery/pkg/util/intstr" -) - // RollingUpdateStatefulSetStrategyApplyConfiguration represents an declarative configuration of the RollingUpdateStatefulSetStrategy type for use // with apply. type RollingUpdateStatefulSetStrategyApplyConfiguration struct { - Partition *int32 `json:"partition,omitempty"` - MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` + Partition *int32 `json:"partition,omitempty"` } // RollingUpdateStatefulSetStrategyApplyConfiguration constructs an declarative configuration of the RollingUpdateStatefulSetStrategy type for use with @@ -42,11 +37,3 @@ func (b *RollingUpdateStatefulSetStrategyApplyConfiguration) WithPartition(value b.Partition = &value return b } - -// WithMaxUnavailable sets the MaxUnavailable field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MaxUnavailable field is set to the value of the last call. -func (b *RollingUpdateStatefulSetStrategyApplyConfiguration) WithMaxUnavailable(value intstr.IntOrString) *RollingUpdateStatefulSetStrategyApplyConfiguration { - b.MaxUnavailable = &value - return b -} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta2/scale.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta2/scale.go index 0e89668cb3b6..d4901edf9beb 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta2/scale.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta2/scale.go @@ -37,10 +37,7 @@ type ScaleApplyConfiguration struct { // ScaleApplyConfiguration constructs an declarative configuration of the Scale type for use with // apply. func Scale() *ScaleApplyConfiguration { - b := &ScaleApplyConfiguration{} - b.WithKind("Scale") - b.WithAPIVersion("apps/v1beta2") - return b + return &ScaleApplyConfiguration{} } // WithKind sets the Kind field in the declarative configuration to the given value @@ -86,6 +83,15 @@ func (b *ScaleApplyConfiguration) WithNamespace(value string) *ScaleApplyConfigu return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *ScaleApplyConfiguration) WithSelfLink(value string) *ScaleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -195,6 +201,15 @@ func (b *ScaleApplyConfiguration) WithFinalizers(values ...string) *ScaleApplyCo return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *ScaleApplyConfiguration) WithClusterName(value string) *ScaleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *ScaleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulset.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulset.go index 03d5428b4b6b..0a242310cca3 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulset.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/apps/v1beta2/statefulset.go @@ -126,6 +126,15 @@ func (b *StatefulSetApplyConfiguration) WithNamespace(value string) *StatefulSet return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *StatefulSetApplyConfiguration) WithSelfLink(value string) *StatefulSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *StatefulSetApplyConfiguration) WithFinalizers(values ...string) *Statef return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *StatefulSetApplyConfiguration) WithClusterName(value string) *StatefulSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *StatefulSetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/autoscaling/v1/horizontalpodautoscaler.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/autoscaling/v1/horizontalpodautoscaler.go index 38fa2058412b..bf04b01313f1 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/autoscaling/v1/horizontalpodautoscaler.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/autoscaling/v1/horizontalpodautoscaler.go @@ -126,6 +126,15 @@ func (b *HorizontalPodAutoscalerApplyConfiguration) WithNamespace(value string) return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *HorizontalPodAutoscalerApplyConfiguration) WithSelfLink(value string) *HorizontalPodAutoscalerApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *HorizontalPodAutoscalerApplyConfiguration) WithFinalizers(values ...str return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *HorizontalPodAutoscalerApplyConfiguration) WithClusterName(value string) *HorizontalPodAutoscalerApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *HorizontalPodAutoscalerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/autoscaling/v1/scale.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/autoscaling/v1/scale.go index f770922803c6..2d2cfeb972fc 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/autoscaling/v1/scale.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/autoscaling/v1/scale.go @@ -36,10 +36,7 @@ type ScaleApplyConfiguration struct { // ScaleApplyConfiguration constructs an declarative configuration of the Scale type for use with // apply. func Scale() *ScaleApplyConfiguration { - b := &ScaleApplyConfiguration{} - b.WithKind("Scale") - b.WithAPIVersion("autoscaling/v1") - return b + return &ScaleApplyConfiguration{} } // WithKind sets the Kind field in the declarative configuration to the given value @@ -85,6 +82,15 @@ func (b *ScaleApplyConfiguration) WithNamespace(value string) *ScaleApplyConfigu return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *ScaleApplyConfiguration) WithSelfLink(value string) *ScaleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -194,6 +200,15 @@ func (b *ScaleApplyConfiguration) WithFinalizers(values ...string) *ScaleApplyCo return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *ScaleApplyConfiguration) WithClusterName(value string) *ScaleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *ScaleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscaler.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscaler.go index 31061de85ef1..af805488ecc7 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscaler.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2/horizontalpodautoscaler.go @@ -126,6 +126,15 @@ func (b *HorizontalPodAutoscalerApplyConfiguration) WithNamespace(value string) return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *HorizontalPodAutoscalerApplyConfiguration) WithSelfLink(value string) *HorizontalPodAutoscalerApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *HorizontalPodAutoscalerApplyConfiguration) WithFinalizers(values ...str return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *HorizontalPodAutoscalerApplyConfiguration) WithClusterName(value string) *HorizontalPodAutoscalerApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *HorizontalPodAutoscalerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscaler.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscaler.go index 66b8d5f738f8..e2c24646be46 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscaler.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/horizontalpodautoscaler.go @@ -126,6 +126,15 @@ func (b *HorizontalPodAutoscalerApplyConfiguration) WithNamespace(value string) return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *HorizontalPodAutoscalerApplyConfiguration) WithSelfLink(value string) *HorizontalPodAutoscalerApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *HorizontalPodAutoscalerApplyConfiguration) WithFinalizers(values ...str return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *HorizontalPodAutoscalerApplyConfiguration) WithClusterName(value string) *HorizontalPodAutoscalerApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *HorizontalPodAutoscalerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscaler.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscaler.go index 1c750cb1644e..381925b23bc6 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscaler.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/autoscaling/v2beta2/horizontalpodautoscaler.go @@ -126,6 +126,15 @@ func (b *HorizontalPodAutoscalerApplyConfiguration) WithNamespace(value string) return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *HorizontalPodAutoscalerApplyConfiguration) WithSelfLink(value string) *HorizontalPodAutoscalerApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *HorizontalPodAutoscalerApplyConfiguration) WithFinalizers(values ...str return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *HorizontalPodAutoscalerApplyConfiguration) WithClusterName(value string) *HorizontalPodAutoscalerApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *HorizontalPodAutoscalerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/batch/v1/cronjob.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/batch/v1/cronjob.go index 5225a5a0798a..749163cc30cd 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/batch/v1/cronjob.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/batch/v1/cronjob.go @@ -126,6 +126,15 @@ func (b *CronJobApplyConfiguration) WithNamespace(value string) *CronJobApplyCon return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *CronJobApplyConfiguration) WithSelfLink(value string) *CronJobApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *CronJobApplyConfiguration) WithFinalizers(values ...string) *CronJobApp return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *CronJobApplyConfiguration) WithClusterName(value string) *CronJobApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *CronJobApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/batch/v1/cronjobspec.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/batch/v1/cronjobspec.go index 22a34dcb6186..eaf3ba8e65ee 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/batch/v1/cronjobspec.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/batch/v1/cronjobspec.go @@ -26,7 +26,6 @@ import ( // with apply. type CronJobSpecApplyConfiguration struct { Schedule *string `json:"schedule,omitempty"` - TimeZone *string `json:"timeZone,omitempty"` StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty"` ConcurrencyPolicy *v1.ConcurrencyPolicy `json:"concurrencyPolicy,omitempty"` Suspend *bool `json:"suspend,omitempty"` @@ -49,14 +48,6 @@ func (b *CronJobSpecApplyConfiguration) WithSchedule(value string) *CronJobSpecA return b } -// WithTimeZone sets the TimeZone field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TimeZone field is set to the value of the last call. -func (b *CronJobSpecApplyConfiguration) WithTimeZone(value string) *CronJobSpecApplyConfiguration { - b.TimeZone = &value - return b -} - // WithStartingDeadlineSeconds sets the StartingDeadlineSeconds field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the StartingDeadlineSeconds field is set to the value of the last call. diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/batch/v1/job.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/batch/v1/job.go index fb10ba3968ab..bb84a58b02d0 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/batch/v1/job.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/batch/v1/job.go @@ -126,6 +126,15 @@ func (b *JobApplyConfiguration) WithNamespace(value string) *JobApplyConfigurati return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *JobApplyConfiguration) WithSelfLink(value string) *JobApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *JobApplyConfiguration) WithFinalizers(values ...string) *JobApplyConfig return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *JobApplyConfiguration) WithClusterName(value string) *JobApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *JobApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/batch/v1/jobtemplatespec.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/batch/v1/jobtemplatespec.go index b37a81568087..46df3722f106 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/batch/v1/jobtemplatespec.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/batch/v1/jobtemplatespec.go @@ -64,6 +64,15 @@ func (b *JobTemplateSpecApplyConfiguration) WithNamespace(value string) *JobTemp return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *JobTemplateSpecApplyConfiguration) WithSelfLink(value string) *JobTemplateSpecApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -173,6 +182,15 @@ func (b *JobTemplateSpecApplyConfiguration) WithFinalizers(values ...string) *Jo return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *JobTemplateSpecApplyConfiguration) WithClusterName(value string) *JobTemplateSpecApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *JobTemplateSpecApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/batch/v1beta1/cronjob.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/batch/v1beta1/cronjob.go index 1d735a8407be..8b16bc55c204 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/batch/v1beta1/cronjob.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/batch/v1beta1/cronjob.go @@ -126,6 +126,15 @@ func (b *CronJobApplyConfiguration) WithNamespace(value string) *CronJobApplyCon return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *CronJobApplyConfiguration) WithSelfLink(value string) *CronJobApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *CronJobApplyConfiguration) WithFinalizers(values ...string) *CronJobApp return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *CronJobApplyConfiguration) WithClusterName(value string) *CronJobApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *CronJobApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/batch/v1beta1/cronjobspec.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/batch/v1beta1/cronjobspec.go index 68c0777de01b..7ca431b1e6e5 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/batch/v1beta1/cronjobspec.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/batch/v1beta1/cronjobspec.go @@ -26,7 +26,6 @@ import ( // with apply. type CronJobSpecApplyConfiguration struct { Schedule *string `json:"schedule,omitempty"` - TimeZone *string `json:"timeZone,omitempty"` StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty"` ConcurrencyPolicy *v1beta1.ConcurrencyPolicy `json:"concurrencyPolicy,omitempty"` Suspend *bool `json:"suspend,omitempty"` @@ -49,14 +48,6 @@ func (b *CronJobSpecApplyConfiguration) WithSchedule(value string) *CronJobSpecA return b } -// WithTimeZone sets the TimeZone field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TimeZone field is set to the value of the last call. -func (b *CronJobSpecApplyConfiguration) WithTimeZone(value string) *CronJobSpecApplyConfiguration { - b.TimeZone = &value - return b -} - // WithStartingDeadlineSeconds sets the StartingDeadlineSeconds field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the StartingDeadlineSeconds field is set to the value of the last call. diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/batch/v1beta1/jobtemplatespec.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/batch/v1beta1/jobtemplatespec.go index f925d65a7e02..bad60e1fbf87 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/batch/v1beta1/jobtemplatespec.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/batch/v1beta1/jobtemplatespec.go @@ -65,6 +65,15 @@ func (b *JobTemplateSpecApplyConfiguration) WithNamespace(value string) *JobTemp return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *JobTemplateSpecApplyConfiguration) WithSelfLink(value string) *JobTemplateSpecApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -174,6 +183,15 @@ func (b *JobTemplateSpecApplyConfiguration) WithFinalizers(values ...string) *Jo return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *JobTemplateSpecApplyConfiguration) WithClusterName(value string) *JobTemplateSpecApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *JobTemplateSpecApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/certificates/v1/certificatesigningrequest.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/certificates/v1/certificatesigningrequest.go index 3d02c0be808b..9d46541b7488 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/certificates/v1/certificatesigningrequest.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/certificates/v1/certificatesigningrequest.go @@ -124,6 +124,15 @@ func (b *CertificateSigningRequestApplyConfiguration) WithNamespace(value string return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *CertificateSigningRequestApplyConfiguration) WithSelfLink(value string) *CertificateSigningRequestApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -233,6 +242,15 @@ func (b *CertificateSigningRequestApplyConfiguration) WithFinalizers(values ...s return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *CertificateSigningRequestApplyConfiguration) WithClusterName(value string) *CertificateSigningRequestApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *CertificateSigningRequestApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/certificates/v1beta1/certificatesigningrequest.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/certificates/v1beta1/certificatesigningrequest.go index 83a0edc18f4d..907b81983e8d 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/certificates/v1beta1/certificatesigningrequest.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/certificates/v1beta1/certificatesigningrequest.go @@ -124,6 +124,15 @@ func (b *CertificateSigningRequestApplyConfiguration) WithNamespace(value string return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *CertificateSigningRequestApplyConfiguration) WithSelfLink(value string) *CertificateSigningRequestApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -233,6 +242,15 @@ func (b *CertificateSigningRequestApplyConfiguration) WithFinalizers(values ...s return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *CertificateSigningRequestApplyConfiguration) WithClusterName(value string) *CertificateSigningRequestApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *CertificateSigningRequestApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/coordination/v1/lease.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/coordination/v1/lease.go index 618f12fb21ae..fcaddb663b49 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/coordination/v1/lease.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/coordination/v1/lease.go @@ -125,6 +125,15 @@ func (b *LeaseApplyConfiguration) WithNamespace(value string) *LeaseApplyConfigu return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *LeaseApplyConfiguration) WithSelfLink(value string) *LeaseApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -234,6 +243,15 @@ func (b *LeaseApplyConfiguration) WithFinalizers(values ...string) *LeaseApplyCo return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *LeaseApplyConfiguration) WithClusterName(value string) *LeaseApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *LeaseApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/coordination/v1beta1/lease.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/coordination/v1beta1/lease.go index 867e0f58baca..f63ddc29eece 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/coordination/v1beta1/lease.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/coordination/v1beta1/lease.go @@ -125,6 +125,15 @@ func (b *LeaseApplyConfiguration) WithNamespace(value string) *LeaseApplyConfigu return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *LeaseApplyConfiguration) WithSelfLink(value string) *LeaseApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -234,6 +243,15 @@ func (b *LeaseApplyConfiguration) WithFinalizers(values ...string) *LeaseApplyCo return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *LeaseApplyConfiguration) WithClusterName(value string) *LeaseApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *LeaseApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/componentstatus.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/componentstatus.go index 300e526942f8..6983a689b2f4 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/componentstatus.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/componentstatus.go @@ -123,6 +123,15 @@ func (b *ComponentStatusApplyConfiguration) WithNamespace(value string) *Compone return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *ComponentStatusApplyConfiguration) WithSelfLink(value string) *ComponentStatusApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -232,6 +241,15 @@ func (b *ComponentStatusApplyConfiguration) WithFinalizers(values ...string) *Co return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *ComponentStatusApplyConfiguration) WithClusterName(value string) *ComponentStatusApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *ComponentStatusApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/configmap.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/configmap.go index f4cc7024d216..0664c18498b2 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/configmap.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/configmap.go @@ -127,6 +127,15 @@ func (b *ConfigMapApplyConfiguration) WithNamespace(value string) *ConfigMapAppl return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *ConfigMapApplyConfiguration) WithSelfLink(value string) *ConfigMapApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -236,6 +245,15 @@ func (b *ConfigMapApplyConfiguration) WithFinalizers(values ...string) *ConfigMa return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *ConfigMapApplyConfiguration) WithClusterName(value string) *ConfigMapApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *ConfigMapApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/endpoints.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/endpoints.go index b98fed085824..b3b302fe2612 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/endpoints.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/endpoints.go @@ -125,6 +125,15 @@ func (b *EndpointsApplyConfiguration) WithNamespace(value string) *EndpointsAppl return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *EndpointsApplyConfiguration) WithSelfLink(value string) *EndpointsApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -234,6 +243,15 @@ func (b *EndpointsApplyConfiguration) WithFinalizers(values ...string) *Endpoint return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *EndpointsApplyConfiguration) WithClusterName(value string) *EndpointsApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *EndpointsApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/event.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/event.go index 60aff6b5b24f..3a0c53694586 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/event.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/event.go @@ -138,6 +138,15 @@ func (b *EventApplyConfiguration) WithNamespace(value string) *EventApplyConfigu return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *EventApplyConfiguration) WithSelfLink(value string) *EventApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -247,6 +256,15 @@ func (b *EventApplyConfiguration) WithFinalizers(values ...string) *EventApplyCo return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *EventApplyConfiguration) WithClusterName(value string) *EventApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *EventApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/limitrange.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/limitrange.go index eaf635c76aad..03207b8ec1b5 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/limitrange.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/limitrange.go @@ -125,6 +125,15 @@ func (b *LimitRangeApplyConfiguration) WithNamespace(value string) *LimitRangeAp return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *LimitRangeApplyConfiguration) WithSelfLink(value string) *LimitRangeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -234,6 +243,15 @@ func (b *LimitRangeApplyConfiguration) WithFinalizers(values ...string) *LimitRa return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *LimitRangeApplyConfiguration) WithClusterName(value string) *LimitRangeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *LimitRangeApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/namespace.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/namespace.go index bdc9ef167c3a..ec29bcfd99ea 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/namespace.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/namespace.go @@ -124,6 +124,15 @@ func (b *NamespaceApplyConfiguration) WithNamespace(value string) *NamespaceAppl return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *NamespaceApplyConfiguration) WithSelfLink(value string) *NamespaceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -233,6 +242,15 @@ func (b *NamespaceApplyConfiguration) WithFinalizers(values ...string) *Namespac return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *NamespaceApplyConfiguration) WithClusterName(value string) *NamespaceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *NamespaceApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/node.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/node.go index 047f4ac1cb3b..b26e9f499c3f 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/node.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/node.go @@ -124,6 +124,15 @@ func (b *NodeApplyConfiguration) WithNamespace(value string) *NodeApplyConfigura return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *NodeApplyConfiguration) WithSelfLink(value string) *NodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -233,6 +242,15 @@ func (b *NodeApplyConfiguration) WithFinalizers(values ...string) *NodeApplyConf return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *NodeApplyConfiguration) WithClusterName(value string) *NodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *NodeApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolume.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolume.go index 2599c197e8e8..dcef6020f828 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolume.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolume.go @@ -124,6 +124,15 @@ func (b *PersistentVolumeApplyConfiguration) WithNamespace(value string) *Persis return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *PersistentVolumeApplyConfiguration) WithSelfLink(value string) *PersistentVolumeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -233,6 +242,15 @@ func (b *PersistentVolumeApplyConfiguration) WithFinalizers(values ...string) *P return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *PersistentVolumeApplyConfiguration) WithClusterName(value string) *PersistentVolumeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *PersistentVolumeApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaim.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaim.go index a0a001701878..8ed20fa29c7e 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaim.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaim.go @@ -126,6 +126,15 @@ func (b *PersistentVolumeClaimApplyConfiguration) WithNamespace(value string) *P return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *PersistentVolumeClaimApplyConfiguration) WithSelfLink(value string) *PersistentVolumeClaimApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *PersistentVolumeClaimApplyConfiguration) WithFinalizers(values ...strin return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *PersistentVolumeClaimApplyConfiguration) WithClusterName(value string) *PersistentVolumeClaimApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *PersistentVolumeClaimApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimtemplate.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimtemplate.go index 894d04f0b4e1..ac1b6bf0155c 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimtemplate.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/persistentvolumeclaimtemplate.go @@ -64,6 +64,15 @@ func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithNamespace(value st return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithSelfLink(value string) *PersistentVolumeClaimTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -173,6 +182,15 @@ func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithFinalizers(values return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *PersistentVolumeClaimTemplateApplyConfiguration) WithClusterName(value string) *PersistentVolumeClaimTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *PersistentVolumeClaimTemplateApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/pod.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/pod.go index 7210bd9836e1..c3649829a785 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/pod.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/pod.go @@ -126,6 +126,15 @@ func (b *PodApplyConfiguration) WithNamespace(value string) *PodApplyConfigurati return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *PodApplyConfiguration) WithSelfLink(value string) *PodApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *PodApplyConfiguration) WithFinalizers(values ...string) *PodApplyConfig return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *PodApplyConfiguration) WithClusterName(value string) *PodApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *PodApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/podtemplate.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/podtemplate.go index 7fe51d9e1b35..1460977c0c91 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/podtemplate.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/podtemplate.go @@ -125,6 +125,15 @@ func (b *PodTemplateApplyConfiguration) WithNamespace(value string) *PodTemplate return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *PodTemplateApplyConfiguration) WithSelfLink(value string) *PodTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -234,6 +243,15 @@ func (b *PodTemplateApplyConfiguration) WithFinalizers(values ...string) *PodTem return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *PodTemplateApplyConfiguration) WithClusterName(value string) *PodTemplateApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *PodTemplateApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/podtemplatespec.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/podtemplatespec.go index 82878a9aceac..ff06ea4b33a4 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/podtemplatespec.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/podtemplatespec.go @@ -64,6 +64,15 @@ func (b *PodTemplateSpecApplyConfiguration) WithNamespace(value string) *PodTemp return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *PodTemplateSpecApplyConfiguration) WithSelfLink(value string) *PodTemplateSpecApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -173,6 +182,15 @@ func (b *PodTemplateSpecApplyConfiguration) WithFinalizers(values ...string) *Po return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *PodTemplateSpecApplyConfiguration) WithClusterName(value string) *PodTemplateSpecApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *PodTemplateSpecApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/replicationcontroller.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/replicationcontroller.go index 7cd71460a9f9..6dd6ae267592 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/replicationcontroller.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/replicationcontroller.go @@ -126,6 +126,15 @@ func (b *ReplicationControllerApplyConfiguration) WithNamespace(value string) *R return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *ReplicationControllerApplyConfiguration) WithSelfLink(value string) *ReplicationControllerApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *ReplicationControllerApplyConfiguration) WithFinalizers(values ...strin return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *ReplicationControllerApplyConfiguration) WithClusterName(value string) *ReplicationControllerApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *ReplicationControllerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/resourcequota.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/resourcequota.go index 6b22ebdc59a7..5cfb1988b12b 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/resourcequota.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/resourcequota.go @@ -126,6 +126,15 @@ func (b *ResourceQuotaApplyConfiguration) WithNamespace(value string) *ResourceQ return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *ResourceQuotaApplyConfiguration) WithSelfLink(value string) *ResourceQuotaApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *ResourceQuotaApplyConfiguration) WithFinalizers(values ...string) *Reso return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *ResourceQuotaApplyConfiguration) WithClusterName(value string) *ResourceQuotaApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *ResourceQuotaApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/secret.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/secret.go index 3f7e1eb03908..00d789f4163e 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/secret.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/secret.go @@ -128,6 +128,15 @@ func (b *SecretApplyConfiguration) WithNamespace(value string) *SecretApplyConfi return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *SecretApplyConfiguration) WithSelfLink(value string) *SecretApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -237,6 +246,15 @@ func (b *SecretApplyConfiguration) WithFinalizers(values ...string) *SecretApply return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *SecretApplyConfiguration) WithClusterName(value string) *SecretApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *SecretApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/service.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/service.go index 3fa11952372d..31b47311fff9 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/service.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/service.go @@ -126,6 +126,15 @@ func (b *ServiceApplyConfiguration) WithNamespace(value string) *ServiceApplyCon return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *ServiceApplyConfiguration) WithSelfLink(value string) *ServiceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *ServiceApplyConfiguration) WithFinalizers(values ...string) *ServiceApp return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *ServiceApplyConfiguration) WithClusterName(value string) *ServiceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *ServiceApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/serviceaccount.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/serviceaccount.go index 53a819375054..459d025ebbf6 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/serviceaccount.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/serviceaccount.go @@ -127,6 +127,15 @@ func (b *ServiceAccountApplyConfiguration) WithNamespace(value string) *ServiceA return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *ServiceAccountApplyConfiguration) WithSelfLink(value string) *ServiceAccountApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -236,6 +245,15 @@ func (b *ServiceAccountApplyConfiguration) WithFinalizers(values ...string) *Ser return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *ServiceAccountApplyConfiguration) WithClusterName(value string) *ServiceAccountApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *ServiceAccountApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/topologyspreadconstraint.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/topologyspreadconstraint.go index 867cc89f20c1..ac8b82eead8b 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/topologyspreadconstraint.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/core/v1/topologyspreadconstraint.go @@ -30,7 +30,6 @@ type TopologySpreadConstraintApplyConfiguration struct { TopologyKey *string `json:"topologyKey,omitempty"` WhenUnsatisfiable *v1.UnsatisfiableConstraintAction `json:"whenUnsatisfiable,omitempty"` LabelSelector *metav1.LabelSelectorApplyConfiguration `json:"labelSelector,omitempty"` - MinDomains *int32 `json:"minDomains,omitempty"` } // TopologySpreadConstraintApplyConfiguration constructs an declarative configuration of the TopologySpreadConstraint type for use with @@ -70,11 +69,3 @@ func (b *TopologySpreadConstraintApplyConfiguration) WithLabelSelector(value *me b.LabelSelector = value return b } - -// WithMinDomains sets the MinDomains field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MinDomains field is set to the value of the last call. -func (b *TopologySpreadConstraintApplyConfiguration) WithMinDomains(value int32) *TopologySpreadConstraintApplyConfiguration { - b.MinDomains = &value - return b -} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/discovery/v1/endpointslice.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/discovery/v1/endpointslice.go index 640613753d9e..6feaab25dc6c 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/discovery/v1/endpointslice.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/discovery/v1/endpointslice.go @@ -127,6 +127,15 @@ func (b *EndpointSliceApplyConfiguration) WithNamespace(value string) *EndpointS return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *EndpointSliceApplyConfiguration) WithSelfLink(value string) *EndpointSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -236,6 +245,15 @@ func (b *EndpointSliceApplyConfiguration) WithFinalizers(values ...string) *Endp return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *EndpointSliceApplyConfiguration) WithClusterName(value string) *EndpointSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *EndpointSliceApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointslice.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointslice.go index 74a24773ccd5..bacc1134db3f 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointslice.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/discovery/v1beta1/endpointslice.go @@ -127,6 +127,15 @@ func (b *EndpointSliceApplyConfiguration) WithNamespace(value string) *EndpointS return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *EndpointSliceApplyConfiguration) WithSelfLink(value string) *EndpointSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -236,6 +245,15 @@ func (b *EndpointSliceApplyConfiguration) WithFinalizers(values ...string) *Endp return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *EndpointSliceApplyConfiguration) WithClusterName(value string) *EndpointSliceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *EndpointSliceApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/events/v1/event.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/events/v1/event.go index 767e3dfc7315..19cc9e0adc5e 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/events/v1/event.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/events/v1/event.go @@ -139,6 +139,15 @@ func (b *EventApplyConfiguration) WithNamespace(value string) *EventApplyConfigu return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *EventApplyConfiguration) WithSelfLink(value string) *EventApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -248,6 +257,15 @@ func (b *EventApplyConfiguration) WithFinalizers(values ...string) *EventApplyCo return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *EventApplyConfiguration) WithClusterName(value string) *EventApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *EventApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/events/v1beta1/event.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/events/v1beta1/event.go index cfc4a851f3a8..f02bdd2b988b 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/events/v1beta1/event.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/events/v1beta1/event.go @@ -139,6 +139,15 @@ func (b *EventApplyConfiguration) WithNamespace(value string) *EventApplyConfigu return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *EventApplyConfiguration) WithSelfLink(value string) *EventApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -248,6 +257,15 @@ func (b *EventApplyConfiguration) WithFinalizers(values ...string) *EventApplyCo return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *EventApplyConfiguration) WithClusterName(value string) *EventApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *EventApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/daemonset.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/daemonset.go index eae399d323f4..1455873258e3 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/daemonset.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/daemonset.go @@ -126,6 +126,15 @@ func (b *DaemonSetApplyConfiguration) WithNamespace(value string) *DaemonSetAppl return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *DaemonSetApplyConfiguration) WithSelfLink(value string) *DaemonSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *DaemonSetApplyConfiguration) WithFinalizers(values ...string) *DaemonSe return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *DaemonSetApplyConfiguration) WithClusterName(value string) *DaemonSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *DaemonSetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/deployment.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/deployment.go index 878083f82126..e64e4ca38098 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/deployment.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/deployment.go @@ -126,6 +126,15 @@ func (b *DeploymentApplyConfiguration) WithNamespace(value string) *DeploymentAp return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *DeploymentApplyConfiguration) WithSelfLink(value string) *DeploymentApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *DeploymentApplyConfiguration) WithFinalizers(values ...string) *Deploym return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *DeploymentApplyConfiguration) WithClusterName(value string) *DeploymentApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *DeploymentApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingress.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingress.go index 46c541048d88..df4fbc2cd18a 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingress.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/ingress.go @@ -126,6 +126,15 @@ func (b *IngressApplyConfiguration) WithNamespace(value string) *IngressApplyCon return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *IngressApplyConfiguration) WithSelfLink(value string) *IngressApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *IngressApplyConfiguration) WithFinalizers(values ...string) *IngressApp return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *IngressApplyConfiguration) WithClusterName(value string) *IngressApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *IngressApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicy.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicy.go index 81c84d2d46f0..965292516041 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicy.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicy.go @@ -32,8 +32,7 @@ import ( type NetworkPolicyApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *NetworkPolicySpecApplyConfiguration `json:"spec,omitempty"` - Status *NetworkPolicyStatusApplyConfiguration `json:"status,omitempty"` + Spec *NetworkPolicySpecApplyConfiguration `json:"spec,omitempty"` } // NetworkPolicy constructs an declarative configuration of the NetworkPolicy type for use with @@ -126,6 +125,15 @@ func (b *NetworkPolicyApplyConfiguration) WithNamespace(value string) *NetworkPo return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *NetworkPolicyApplyConfiguration) WithSelfLink(value string) *NetworkPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +243,15 @@ func (b *NetworkPolicyApplyConfiguration) WithFinalizers(values ...string) *Netw return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *NetworkPolicyApplyConfiguration) WithClusterName(value string) *NetworkPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *NetworkPolicyApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} @@ -248,11 +265,3 @@ func (b *NetworkPolicyApplyConfiguration) WithSpec(value *NetworkPolicySpecApply b.Spec = value return b } - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *NetworkPolicyApplyConfiguration) WithStatus(value *NetworkPolicyStatusApplyConfiguration) *NetworkPolicyApplyConfiguration { - b.Status = value - return b -} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicystatus.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicystatus.go deleted file mode 100644 index 99c89b09b092..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/networkpolicystatus.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -import ( - v1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// NetworkPolicyStatusApplyConfiguration represents an declarative configuration of the NetworkPolicyStatus type for use -// with apply. -type NetworkPolicyStatusApplyConfiguration struct { - Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` -} - -// NetworkPolicyStatusApplyConfiguration constructs an declarative configuration of the NetworkPolicyStatus type for use with -// apply. -func NetworkPolicyStatus() *NetworkPolicyStatusApplyConfiguration { - return &NetworkPolicyStatusApplyConfiguration{} -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *NetworkPolicyStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *NetworkPolicyStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.Conditions = append(b.Conditions, *values[i]) - } - return b -} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/podsecuritypolicy.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/podsecuritypolicy.go index c70906cfafd7..cceec69f995a 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/podsecuritypolicy.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/podsecuritypolicy.go @@ -123,6 +123,15 @@ func (b *PodSecurityPolicyApplyConfiguration) WithNamespace(value string) *PodSe return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *PodSecurityPolicyApplyConfiguration) WithSelfLink(value string) *PodSecurityPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -232,6 +241,15 @@ func (b *PodSecurityPolicyApplyConfiguration) WithFinalizers(values ...string) * return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *PodSecurityPolicyApplyConfiguration) WithClusterName(value string) *PodSecurityPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *PodSecurityPolicyApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/replicaset.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/replicaset.go index b2afc835d834..b57cefc9da68 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/replicaset.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/replicaset.go @@ -126,6 +126,15 @@ func (b *ReplicaSetApplyConfiguration) WithNamespace(value string) *ReplicaSetAp return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *ReplicaSetApplyConfiguration) WithSelfLink(value string) *ReplicaSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *ReplicaSetApplyConfiguration) WithFinalizers(values ...string) *Replica return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *ReplicaSetApplyConfiguration) WithClusterName(value string) *ReplicaSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *ReplicaSetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/scale.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/scale.go index 60a1a8430c1a..701145825dab 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/scale.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/extensions/v1beta1/scale.go @@ -37,10 +37,7 @@ type ScaleApplyConfiguration struct { // ScaleApplyConfiguration constructs an declarative configuration of the Scale type for use with // apply. func Scale() *ScaleApplyConfiguration { - b := &ScaleApplyConfiguration{} - b.WithKind("Scale") - b.WithAPIVersion("extensions/v1beta1") - return b + return &ScaleApplyConfiguration{} } // WithKind sets the Kind field in the declarative configuration to the given value @@ -86,6 +83,15 @@ func (b *ScaleApplyConfiguration) WithNamespace(value string) *ScaleApplyConfigu return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *ScaleApplyConfiguration) WithSelfLink(value string) *ScaleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -195,6 +201,15 @@ func (b *ScaleApplyConfiguration) WithFinalizers(values ...string) *ScaleApplyCo return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *ScaleApplyConfiguration) WithClusterName(value string) *ScaleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *ScaleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1/flowschema.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1/flowschema.go index 20251d08bff3..2a76cf32eb6a 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1/flowschema.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1/flowschema.go @@ -124,6 +124,15 @@ func (b *FlowSchemaApplyConfiguration) WithNamespace(value string) *FlowSchemaAp return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *FlowSchemaApplyConfiguration) WithSelfLink(value string) *FlowSchemaApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -233,6 +242,15 @@ func (b *FlowSchemaApplyConfiguration) WithFinalizers(values ...string) *FlowSch return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *FlowSchemaApplyConfiguration) WithClusterName(value string) *FlowSchemaApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *FlowSchemaApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1/prioritylevelconfiguration.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1/prioritylevelconfiguration.go index a40db75dcb55..4f36afe53cac 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1/prioritylevelconfiguration.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1/prioritylevelconfiguration.go @@ -124,6 +124,15 @@ func (b *PriorityLevelConfigurationApplyConfiguration) WithNamespace(value strin return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *PriorityLevelConfigurationApplyConfiguration) WithSelfLink(value string) *PriorityLevelConfigurationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -233,6 +242,15 @@ func (b *PriorityLevelConfigurationApplyConfiguration) WithFinalizers(values ... return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *PriorityLevelConfigurationApplyConfiguration) WithClusterName(value string) *PriorityLevelConfigurationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *PriorityLevelConfigurationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/flowschema.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/flowschema.go index f44313f54ef1..794ff25a7b2c 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/flowschema.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/flowschema.go @@ -124,6 +124,15 @@ func (b *FlowSchemaApplyConfiguration) WithNamespace(value string) *FlowSchemaAp return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *FlowSchemaApplyConfiguration) WithSelfLink(value string) *FlowSchemaApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -233,6 +242,15 @@ func (b *FlowSchemaApplyConfiguration) WithFinalizers(values ...string) *FlowSch return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *FlowSchemaApplyConfiguration) WithClusterName(value string) *FlowSchemaApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *FlowSchemaApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfiguration.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfiguration.go index 84324dbfdcee..57d1cd397de0 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfiguration.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1/prioritylevelconfiguration.go @@ -124,6 +124,15 @@ func (b *PriorityLevelConfigurationApplyConfiguration) WithNamespace(value strin return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *PriorityLevelConfigurationApplyConfiguration) WithSelfLink(value string) *PriorityLevelConfigurationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -233,6 +242,15 @@ func (b *PriorityLevelConfigurationApplyConfiguration) WithFinalizers(values ... return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *PriorityLevelConfigurationApplyConfiguration) WithClusterName(value string) *PriorityLevelConfigurationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *PriorityLevelConfigurationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/flowschema.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/flowschema.go index 63a5f0aa30c7..323d7241d31b 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/flowschema.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/flowschema.go @@ -124,6 +124,15 @@ func (b *FlowSchemaApplyConfiguration) WithNamespace(value string) *FlowSchemaAp return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *FlowSchemaApplyConfiguration) WithSelfLink(value string) *FlowSchemaApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -233,6 +242,15 @@ func (b *FlowSchemaApplyConfiguration) WithFinalizers(values ...string) *FlowSch return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *FlowSchemaApplyConfiguration) WithClusterName(value string) *FlowSchemaApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *FlowSchemaApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfiguration.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfiguration.go index 3256b3630064..4ac11bba65be 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfiguration.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2/prioritylevelconfiguration.go @@ -124,6 +124,15 @@ func (b *PriorityLevelConfigurationApplyConfiguration) WithNamespace(value strin return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *PriorityLevelConfigurationApplyConfiguration) WithSelfLink(value string) *PriorityLevelConfigurationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -233,6 +242,15 @@ func (b *PriorityLevelConfigurationApplyConfiguration) WithFinalizers(values ... return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *PriorityLevelConfigurationApplyConfiguration) WithClusterName(value string) *PriorityLevelConfigurationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *PriorityLevelConfigurationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/internal/internal.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/internal/internal.go index f8e9eec8ff91..824c5e9582e0 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/internal/internal.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/internal/internal.go @@ -862,9 +862,6 @@ var schemaYAML = typed.YAMLObject(`types: - name: io.k8s.api.apps.v1.RollingUpdateStatefulSetStrategy map: fields: - - name: maxUnavailable - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - name: partition type: scalar: numeric @@ -1165,9 +1162,6 @@ var schemaYAML = typed.YAMLObject(`types: - name: io.k8s.api.apps.v1beta1.RollingUpdateStatefulSetStrategy map: fields: - - name: maxUnavailable - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - name: partition type: scalar: numeric @@ -1666,9 +1660,6 @@ var schemaYAML = typed.YAMLObject(`types: - name: io.k8s.api.apps.v1beta2.RollingUpdateStatefulSetStrategy map: fields: - - name: maxUnavailable - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - name: partition type: scalar: numeric @@ -2956,9 +2947,6 @@ var schemaYAML = typed.YAMLObject(`types: - name: suspend type: scalar: boolean - - name: timeZone - type: - scalar: string - name: io.k8s.api.batch.v1.CronJobStatus map: fields: @@ -3160,9 +3148,6 @@ var schemaYAML = typed.YAMLObject(`types: - name: suspend type: scalar: boolean - - name: timeZone - type: - scalar: string - name: io.k8s.api.batch.v1beta1.CronJobStatus map: fields: @@ -6859,9 +6844,6 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: numeric default: 0 - - name: minDomains - type: - scalar: numeric - name: topologyKey type: scalar: string @@ -7853,10 +7835,6 @@ var schemaYAML = typed.YAMLObject(`types: type: namedType: io.k8s.api.extensions.v1beta1.NetworkPolicySpec default: {} - - name: status - type: - namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyStatus - default: {} - name: io.k8s.api.extensions.v1beta1.NetworkPolicyEgressRule map: fields: @@ -7936,17 +7914,6 @@ var schemaYAML = typed.YAMLObject(`types: elementType: scalar: string elementRelationship: atomic -- name: io.k8s.api.extensions.v1beta1.NetworkPolicyStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: associative - keys: - - type - name: io.k8s.api.extensions.v1beta1.PodSecurityPolicy map: fields: @@ -9416,10 +9383,6 @@ var schemaYAML = typed.YAMLObject(`types: type: namedType: io.k8s.api.networking.v1.NetworkPolicySpec default: {} - - name: status - type: - namedType: io.k8s.api.networking.v1.NetworkPolicyStatus - default: {} - name: io.k8s.api.networking.v1.NetworkPolicyEgressRule map: fields: @@ -9499,17 +9462,6 @@ var schemaYAML = typed.YAMLObject(`types: elementType: scalar: string elementRelationship: atomic -- name: io.k8s.api.networking.v1.NetworkPolicyStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: associative - keys: - - type - name: io.k8s.api.networking.v1.ServiceBackendPort map: fields: @@ -10887,32 +10839,6 @@ var schemaYAML = typed.YAMLObject(`types: elementRelationship: associative keys: - name -- name: io.k8s.api.storage.v1.CSIStorageCapacity - map: - fields: - - name: apiVersion - type: - scalar: string - - name: capacity - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: kind - type: - scalar: string - - name: maximumVolumeSize - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: nodeTopology - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: storageClassName - type: - scalar: string - default: "" - name: io.k8s.api.storage.v1.StorageClass map: fields: diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/meta/v1/deleteoptions.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/meta/v1/deleteoptions.go index 7a1d23114d09..289bef43de30 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/meta/v1/deleteoptions.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/meta/v1/deleteoptions.go @@ -36,10 +36,7 @@ type DeleteOptionsApplyConfiguration struct { // DeleteOptionsApplyConfiguration constructs an declarative configuration of the DeleteOptions type for use with // apply. func DeleteOptions() *DeleteOptionsApplyConfiguration { - b := &DeleteOptionsApplyConfiguration{} - b.WithKind("DeleteOptions") - b.WithAPIVersion("meta.k8s.io/v1") - return b + return &DeleteOptionsApplyConfiguration{} } // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/meta/v1/objectmeta.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/meta/v1/objectmeta.go index 9b290e968011..0aeaeba27411 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/meta/v1/objectmeta.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/meta/v1/objectmeta.go @@ -29,6 +29,7 @@ type ObjectMetaApplyConfiguration struct { Name *string `json:"name,omitempty"` GenerateName *string `json:"generateName,omitempty"` Namespace *string `json:"namespace,omitempty"` + SelfLink *string `json:"selfLink,omitempty"` UID *types.UID `json:"uid,omitempty"` ResourceVersion *string `json:"resourceVersion,omitempty"` Generation *int64 `json:"generation,omitempty"` @@ -39,6 +40,7 @@ type ObjectMetaApplyConfiguration struct { Annotations map[string]string `json:"annotations,omitempty"` OwnerReferences []OwnerReferenceApplyConfiguration `json:"ownerReferences,omitempty"` Finalizers []string `json:"finalizers,omitempty"` + ClusterName *string `json:"clusterName,omitempty"` } // ObjectMetaApplyConfiguration constructs an declarative configuration of the ObjectMeta type for use with @@ -71,6 +73,14 @@ func (b *ObjectMetaApplyConfiguration) WithNamespace(value string) *ObjectMetaAp return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *ObjectMetaApplyConfiguration) WithSelfLink(value string) *ObjectMetaApplyConfiguration { + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -169,3 +179,11 @@ func (b *ObjectMetaApplyConfiguration) WithFinalizers(values ...string) *ObjectM } return b } + +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *ObjectMetaApplyConfiguration) WithClusterName(value string) *ObjectMetaApplyConfiguration { + b.ClusterName = &value + return b +} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/networking/v1/ingress.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/networking/v1/ingress.go index b5146902d4f7..74c0bb273d09 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/networking/v1/ingress.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/networking/v1/ingress.go @@ -126,6 +126,15 @@ func (b *IngressApplyConfiguration) WithNamespace(value string) *IngressApplyCon return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *IngressApplyConfiguration) WithSelfLink(value string) *IngressApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *IngressApplyConfiguration) WithFinalizers(values ...string) *IngressApp return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *IngressApplyConfiguration) WithClusterName(value string) *IngressApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *IngressApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/networking/v1/ingressclass.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/networking/v1/ingressclass.go index e33d0b2d9fd2..5b36992e45b0 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/networking/v1/ingressclass.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/networking/v1/ingressclass.go @@ -123,6 +123,15 @@ func (b *IngressClassApplyConfiguration) WithNamespace(value string) *IngressCla return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *IngressClassApplyConfiguration) WithSelfLink(value string) *IngressClassApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -232,6 +241,15 @@ func (b *IngressClassApplyConfiguration) WithFinalizers(values ...string) *Ingre return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *IngressClassApplyConfiguration) WithClusterName(value string) *IngressClassApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *IngressClassApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicy.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicy.go index 101510e45f80..7091d7cfd503 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicy.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicy.go @@ -32,8 +32,7 @@ import ( type NetworkPolicyApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *NetworkPolicySpecApplyConfiguration `json:"spec,omitempty"` - Status *NetworkPolicyStatusApplyConfiguration `json:"status,omitempty"` + Spec *NetworkPolicySpecApplyConfiguration `json:"spec,omitempty"` } // NetworkPolicy constructs an declarative configuration of the NetworkPolicy type for use with @@ -126,6 +125,15 @@ func (b *NetworkPolicyApplyConfiguration) WithNamespace(value string) *NetworkPo return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *NetworkPolicyApplyConfiguration) WithSelfLink(value string) *NetworkPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +243,15 @@ func (b *NetworkPolicyApplyConfiguration) WithFinalizers(values ...string) *Netw return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *NetworkPolicyApplyConfiguration) WithClusterName(value string) *NetworkPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *NetworkPolicyApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} @@ -248,11 +265,3 @@ func (b *NetworkPolicyApplyConfiguration) WithSpec(value *NetworkPolicySpecApply b.Spec = value return b } - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *NetworkPolicyApplyConfiguration) WithStatus(value *NetworkPolicyStatusApplyConfiguration) *NetworkPolicyApplyConfiguration { - b.Status = value - return b -} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicystatus.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicystatus.go deleted file mode 100644 index 032de18eda4e..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/networking/v1/networkpolicystatus.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// NetworkPolicyStatusApplyConfiguration represents an declarative configuration of the NetworkPolicyStatus type for use -// with apply. -type NetworkPolicyStatusApplyConfiguration struct { - Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` -} - -// NetworkPolicyStatusApplyConfiguration constructs an declarative configuration of the NetworkPolicyStatus type for use with -// apply. -func NetworkPolicyStatus() *NetworkPolicyStatusApplyConfiguration { - return &NetworkPolicyStatusApplyConfiguration{} -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *NetworkPolicyStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *NetworkPolicyStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.Conditions = append(b.Conditions, *values[i]) - } - return b -} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingress.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingress.go index 56f65c30a9e9..6b87d1ff3c67 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingress.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingress.go @@ -126,6 +126,15 @@ func (b *IngressApplyConfiguration) WithNamespace(value string) *IngressApplyCon return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *IngressApplyConfiguration) WithSelfLink(value string) *IngressApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *IngressApplyConfiguration) WithFinalizers(values ...string) *IngressApp return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *IngressApplyConfiguration) WithClusterName(value string) *IngressApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *IngressApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressclass.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressclass.go index b65d4b3073db..3a13cd083422 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressclass.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/networking/v1beta1/ingressclass.go @@ -123,6 +123,15 @@ func (b *IngressClassApplyConfiguration) WithNamespace(value string) *IngressCla return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *IngressClassApplyConfiguration) WithSelfLink(value string) *IngressClassApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -232,6 +241,15 @@ func (b *IngressClassApplyConfiguration) WithFinalizers(values ...string) *Ingre return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *IngressClassApplyConfiguration) WithClusterName(value string) *IngressClassApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *IngressClassApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/node/v1/runtimeclass.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/node/v1/runtimeclass.go index 3c9d1fc467d5..1521f2cef56f 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/node/v1/runtimeclass.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/node/v1/runtimeclass.go @@ -125,6 +125,15 @@ func (b *RuntimeClassApplyConfiguration) WithNamespace(value string) *RuntimeCla return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *RuntimeClassApplyConfiguration) WithSelfLink(value string) *RuntimeClassApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -234,6 +243,15 @@ func (b *RuntimeClassApplyConfiguration) WithFinalizers(values ...string) *Runti return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *RuntimeClassApplyConfiguration) WithClusterName(value string) *RuntimeClassApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *RuntimeClassApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/node/v1alpha1/runtimeclass.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/node/v1alpha1/runtimeclass.go index e680e12deb5c..295e763d76b1 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/node/v1alpha1/runtimeclass.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/node/v1alpha1/runtimeclass.go @@ -123,6 +123,15 @@ func (b *RuntimeClassApplyConfiguration) WithNamespace(value string) *RuntimeCla return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *RuntimeClassApplyConfiguration) WithSelfLink(value string) *RuntimeClassApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -232,6 +241,15 @@ func (b *RuntimeClassApplyConfiguration) WithFinalizers(values ...string) *Runti return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *RuntimeClassApplyConfiguration) WithClusterName(value string) *RuntimeClassApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *RuntimeClassApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/node/v1beta1/runtimeclass.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/node/v1beta1/runtimeclass.go index f5487665c32a..2424e205e3d3 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/node/v1beta1/runtimeclass.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/node/v1beta1/runtimeclass.go @@ -125,6 +125,15 @@ func (b *RuntimeClassApplyConfiguration) WithNamespace(value string) *RuntimeCla return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *RuntimeClassApplyConfiguration) WithSelfLink(value string) *RuntimeClassApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -234,6 +243,15 @@ func (b *RuntimeClassApplyConfiguration) WithFinalizers(values ...string) *Runti return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *RuntimeClassApplyConfiguration) WithClusterName(value string) *RuntimeClassApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *RuntimeClassApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/policy/v1/eviction.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/policy/v1/eviction.go index 76a9533a6fd2..07bda7467ef6 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/policy/v1/eviction.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/policy/v1/eviction.go @@ -125,6 +125,15 @@ func (b *EvictionApplyConfiguration) WithNamespace(value string) *EvictionApplyC return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *EvictionApplyConfiguration) WithSelfLink(value string) *EvictionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -234,6 +243,15 @@ func (b *EvictionApplyConfiguration) WithFinalizers(values ...string) *EvictionA return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *EvictionApplyConfiguration) WithClusterName(value string) *EvictionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *EvictionApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/policy/v1/poddisruptionbudget.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/policy/v1/poddisruptionbudget.go index 6b547c26953a..888c20f60638 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/policy/v1/poddisruptionbudget.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/policy/v1/poddisruptionbudget.go @@ -126,6 +126,15 @@ func (b *PodDisruptionBudgetApplyConfiguration) WithNamespace(value string) *Pod return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *PodDisruptionBudgetApplyConfiguration) WithSelfLink(value string) *PodDisruptionBudgetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *PodDisruptionBudgetApplyConfiguration) WithFinalizers(values ...string) return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *PodDisruptionBudgetApplyConfiguration) WithClusterName(value string) *PodDisruptionBudgetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *PodDisruptionBudgetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/policy/v1beta1/eviction.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/policy/v1beta1/eviction.go index d2a361d1b577..e1f0f137ee40 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/policy/v1beta1/eviction.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/policy/v1beta1/eviction.go @@ -125,6 +125,15 @@ func (b *EvictionApplyConfiguration) WithNamespace(value string) *EvictionApplyC return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *EvictionApplyConfiguration) WithSelfLink(value string) *EvictionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -234,6 +243,15 @@ func (b *EvictionApplyConfiguration) WithFinalizers(values ...string) *EvictionA return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *EvictionApplyConfiguration) WithClusterName(value string) *EvictionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *EvictionApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/policy/v1beta1/poddisruptionbudget.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/policy/v1beta1/poddisruptionbudget.go index cef51a279cc3..fc28026f5d1e 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/policy/v1beta1/poddisruptionbudget.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/policy/v1beta1/poddisruptionbudget.go @@ -126,6 +126,15 @@ func (b *PodDisruptionBudgetApplyConfiguration) WithNamespace(value string) *Pod return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *PodDisruptionBudgetApplyConfiguration) WithSelfLink(value string) *PodDisruptionBudgetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *PodDisruptionBudgetApplyConfiguration) WithFinalizers(values ...string) return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *PodDisruptionBudgetApplyConfiguration) WithClusterName(value string) *PodDisruptionBudgetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *PodDisruptionBudgetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/policy/v1beta1/podsecuritypolicy.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/policy/v1beta1/podsecuritypolicy.go index 46cfc4de1ec0..0500824c9b3b 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/policy/v1beta1/podsecuritypolicy.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/policy/v1beta1/podsecuritypolicy.go @@ -123,6 +123,15 @@ func (b *PodSecurityPolicyApplyConfiguration) WithNamespace(value string) *PodSe return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *PodSecurityPolicyApplyConfiguration) WithSelfLink(value string) *PodSecurityPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -232,6 +241,15 @@ func (b *PodSecurityPolicyApplyConfiguration) WithFinalizers(values ...string) * return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *PodSecurityPolicyApplyConfiguration) WithClusterName(value string) *PodSecurityPolicyApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *PodSecurityPolicyApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1/clusterrole.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1/clusterrole.go index 3a5660fe1963..1b4b515963d1 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1/clusterrole.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1/clusterrole.go @@ -124,6 +124,15 @@ func (b *ClusterRoleApplyConfiguration) WithNamespace(value string) *ClusterRole return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *ClusterRoleApplyConfiguration) WithSelfLink(value string) *ClusterRoleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -233,6 +242,15 @@ func (b *ClusterRoleApplyConfiguration) WithFinalizers(values ...string) *Cluste return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *ClusterRoleApplyConfiguration) WithClusterName(value string) *ClusterRoleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *ClusterRoleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1/clusterrolebinding.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1/clusterrolebinding.go index 625ad72c44e6..d17fc6e55a38 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1/clusterrolebinding.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1/clusterrolebinding.go @@ -124,6 +124,15 @@ func (b *ClusterRoleBindingApplyConfiguration) WithNamespace(value string) *Clus return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *ClusterRoleBindingApplyConfiguration) WithSelfLink(value string) *ClusterRoleBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -233,6 +242,15 @@ func (b *ClusterRoleBindingApplyConfiguration) WithFinalizers(values ...string) return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *ClusterRoleBindingApplyConfiguration) WithClusterName(value string) *ClusterRoleBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *ClusterRoleBindingApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1/role.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1/role.go index 97df25fb658a..854441bbd99d 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1/role.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1/role.go @@ -125,6 +125,15 @@ func (b *RoleApplyConfiguration) WithNamespace(value string) *RoleApplyConfigura return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *RoleApplyConfiguration) WithSelfLink(value string) *RoleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -234,6 +243,15 @@ func (b *RoleApplyConfiguration) WithFinalizers(values ...string) *RoleApplyConf return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *RoleApplyConfiguration) WithClusterName(value string) *RoleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *RoleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1/rolebinding.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1/rolebinding.go index 7270f07e49ac..88075a70d0b8 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1/rolebinding.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1/rolebinding.go @@ -126,6 +126,15 @@ func (b *RoleBindingApplyConfiguration) WithNamespace(value string) *RoleBinding return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *RoleBindingApplyConfiguration) WithSelfLink(value string) *RoleBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *RoleBindingApplyConfiguration) WithFinalizers(values ...string) *RoleBi return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *RoleBindingApplyConfiguration) WithClusterName(value string) *RoleBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *RoleBindingApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/clusterrole.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/clusterrole.go index 19b1180fadba..ae9cfc474903 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/clusterrole.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/clusterrole.go @@ -124,6 +124,15 @@ func (b *ClusterRoleApplyConfiguration) WithNamespace(value string) *ClusterRole return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *ClusterRoleApplyConfiguration) WithSelfLink(value string) *ClusterRoleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -233,6 +242,15 @@ func (b *ClusterRoleApplyConfiguration) WithFinalizers(values ...string) *Cluste return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *ClusterRoleApplyConfiguration) WithClusterName(value string) *ClusterRoleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *ClusterRoleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/clusterrolebinding.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/clusterrolebinding.go index a1723efc35ab..f5a2c03bb6ab 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/clusterrolebinding.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/clusterrolebinding.go @@ -124,6 +124,15 @@ func (b *ClusterRoleBindingApplyConfiguration) WithNamespace(value string) *Clus return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *ClusterRoleBindingApplyConfiguration) WithSelfLink(value string) *ClusterRoleBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -233,6 +242,15 @@ func (b *ClusterRoleBindingApplyConfiguration) WithFinalizers(values ...string) return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *ClusterRoleBindingApplyConfiguration) WithClusterName(value string) *ClusterRoleBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *ClusterRoleBindingApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/role.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/role.go index cd256397a207..ec5bebceccaf 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/role.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/role.go @@ -125,6 +125,15 @@ func (b *RoleApplyConfiguration) WithNamespace(value string) *RoleApplyConfigura return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *RoleApplyConfiguration) WithSelfLink(value string) *RoleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -234,6 +243,15 @@ func (b *RoleApplyConfiguration) WithFinalizers(values ...string) *RoleApplyConf return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *RoleApplyConfiguration) WithClusterName(value string) *RoleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *RoleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/rolebinding.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/rolebinding.go index a0ec20d0b14f..930f9489ff26 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/rolebinding.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1alpha1/rolebinding.go @@ -126,6 +126,15 @@ func (b *RoleBindingApplyConfiguration) WithNamespace(value string) *RoleBinding return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *RoleBindingApplyConfiguration) WithSelfLink(value string) *RoleBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *RoleBindingApplyConfiguration) WithFinalizers(values ...string) *RoleBi return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *RoleBindingApplyConfiguration) WithClusterName(value string) *RoleBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *RoleBindingApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1beta1/clusterrole.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1beta1/clusterrole.go index cf714ecc278f..1574f8f6606e 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1beta1/clusterrole.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1beta1/clusterrole.go @@ -124,6 +124,15 @@ func (b *ClusterRoleApplyConfiguration) WithNamespace(value string) *ClusterRole return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *ClusterRoleApplyConfiguration) WithSelfLink(value string) *ClusterRoleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -233,6 +242,15 @@ func (b *ClusterRoleApplyConfiguration) WithFinalizers(values ...string) *Cluste return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *ClusterRoleApplyConfiguration) WithClusterName(value string) *ClusterRoleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *ClusterRoleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1beta1/clusterrolebinding.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1beta1/clusterrolebinding.go index b97cbcba2f45..152a23b4927f 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1beta1/clusterrolebinding.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1beta1/clusterrolebinding.go @@ -124,6 +124,15 @@ func (b *ClusterRoleBindingApplyConfiguration) WithNamespace(value string) *Clus return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *ClusterRoleBindingApplyConfiguration) WithSelfLink(value string) *ClusterRoleBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -233,6 +242,15 @@ func (b *ClusterRoleBindingApplyConfiguration) WithFinalizers(values ...string) return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *ClusterRoleBindingApplyConfiguration) WithClusterName(value string) *ClusterRoleBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *ClusterRoleBindingApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1beta1/role.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1beta1/role.go index 53a751eb3445..dc6ff2a40f57 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1beta1/role.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1beta1/role.go @@ -125,6 +125,15 @@ func (b *RoleApplyConfiguration) WithNamespace(value string) *RoleApplyConfigura return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *RoleApplyConfiguration) WithSelfLink(value string) *RoleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -234,6 +243,15 @@ func (b *RoleApplyConfiguration) WithFinalizers(values ...string) *RoleApplyConf return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *RoleApplyConfiguration) WithClusterName(value string) *RoleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *RoleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1beta1/rolebinding.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1beta1/rolebinding.go index ecccdf91b133..aeef6ec8fab1 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1beta1/rolebinding.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/rbac/v1beta1/rolebinding.go @@ -126,6 +126,15 @@ func (b *RoleBindingApplyConfiguration) WithNamespace(value string) *RoleBinding return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *RoleBindingApplyConfiguration) WithSelfLink(value string) *RoleBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -235,6 +244,15 @@ func (b *RoleBindingApplyConfiguration) WithFinalizers(values ...string) *RoleBi return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *RoleBindingApplyConfiguration) WithClusterName(value string) *RoleBindingApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *RoleBindingApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/scheduling/v1/priorityclass.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/scheduling/v1/priorityclass.go index b57e8ba57dc7..5d528ea7cf82 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/scheduling/v1/priorityclass.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/scheduling/v1/priorityclass.go @@ -127,6 +127,15 @@ func (b *PriorityClassApplyConfiguration) WithNamespace(value string) *PriorityC return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *PriorityClassApplyConfiguration) WithSelfLink(value string) *PriorityClassApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -236,6 +245,15 @@ func (b *PriorityClassApplyConfiguration) WithFinalizers(values ...string) *Prio return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *PriorityClassApplyConfiguration) WithClusterName(value string) *PriorityClassApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *PriorityClassApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/scheduling/v1alpha1/priorityclass.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/scheduling/v1alpha1/priorityclass.go index 0cd09d5d1ce5..2b2aac316567 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/scheduling/v1alpha1/priorityclass.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/scheduling/v1alpha1/priorityclass.go @@ -127,6 +127,15 @@ func (b *PriorityClassApplyConfiguration) WithNamespace(value string) *PriorityC return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *PriorityClassApplyConfiguration) WithSelfLink(value string) *PriorityClassApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -236,6 +245,15 @@ func (b *PriorityClassApplyConfiguration) WithFinalizers(values ...string) *Prio return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *PriorityClassApplyConfiguration) WithClusterName(value string) *PriorityClassApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *PriorityClassApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/scheduling/v1beta1/priorityclass.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/scheduling/v1beta1/priorityclass.go index 98cfb14c7057..14b1feea62dc 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/scheduling/v1beta1/priorityclass.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/scheduling/v1beta1/priorityclass.go @@ -127,6 +127,15 @@ func (b *PriorityClassApplyConfiguration) WithNamespace(value string) *PriorityC return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *PriorityClassApplyConfiguration) WithSelfLink(value string) *PriorityClassApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -236,6 +245,15 @@ func (b *PriorityClassApplyConfiguration) WithFinalizers(values ...string) *Prio return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *PriorityClassApplyConfiguration) WithClusterName(value string) *PriorityClassApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *PriorityClassApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1/csidriver.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1/csidriver.go index aeead0861c77..cf9073a0fd31 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1/csidriver.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1/csidriver.go @@ -123,6 +123,15 @@ func (b *CSIDriverApplyConfiguration) WithNamespace(value string) *CSIDriverAppl return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *CSIDriverApplyConfiguration) WithSelfLink(value string) *CSIDriverApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -232,6 +241,15 @@ func (b *CSIDriverApplyConfiguration) WithFinalizers(values ...string) *CSIDrive return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *CSIDriverApplyConfiguration) WithClusterName(value string) *CSIDriverApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *CSIDriverApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1/csinode.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1/csinode.go index d8296e485616..e65582d8908c 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1/csinode.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1/csinode.go @@ -123,6 +123,15 @@ func (b *CSINodeApplyConfiguration) WithNamespace(value string) *CSINodeApplyCon return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *CSINodeApplyConfiguration) WithSelfLink(value string) *CSINodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -232,6 +241,15 @@ func (b *CSINodeApplyConfiguration) WithFinalizers(values ...string) *CSINodeApp return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *CSINodeApplyConfiguration) WithClusterName(value string) *CSINodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *CSINodeApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1/csistoragecapacity.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1/csistoragecapacity.go deleted file mode 100644 index c47c6b821539..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1/csistoragecapacity.go +++ /dev/null @@ -1,277 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - storagev1 "k8s.io/api/storage/v1" - resource "k8s.io/apimachinery/pkg/api/resource" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - internal "k8s.io/client-go/applyconfigurations/internal" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// CSIStorageCapacityApplyConfiguration represents an declarative configuration of the CSIStorageCapacity type for use -// with apply. -type CSIStorageCapacityApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - NodeTopology *v1.LabelSelectorApplyConfiguration `json:"nodeTopology,omitempty"` - StorageClassName *string `json:"storageClassName,omitempty"` - Capacity *resource.Quantity `json:"capacity,omitempty"` - MaximumVolumeSize *resource.Quantity `json:"maximumVolumeSize,omitempty"` -} - -// CSIStorageCapacity constructs an declarative configuration of the CSIStorageCapacity type for use with -// apply. -func CSIStorageCapacity(name, namespace string) *CSIStorageCapacityApplyConfiguration { - b := &CSIStorageCapacityApplyConfiguration{} - b.WithName(name) - b.WithNamespace(namespace) - b.WithKind("CSIStorageCapacity") - b.WithAPIVersion("storage.k8s.io/v1") - return b -} - -// ExtractCSIStorageCapacity extracts the applied configuration owned by fieldManager from -// cSIStorageCapacity. If no managedFields are found in cSIStorageCapacity for fieldManager, a -// CSIStorageCapacityApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// cSIStorageCapacity must be a unmodified CSIStorageCapacity API object that was retrieved from the Kubernetes API. -// ExtractCSIStorageCapacity provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -// Experimental! -func ExtractCSIStorageCapacity(cSIStorageCapacity *storagev1.CSIStorageCapacity, fieldManager string) (*CSIStorageCapacityApplyConfiguration, error) { - return extractCSIStorageCapacity(cSIStorageCapacity, fieldManager, "") -} - -// ExtractCSIStorageCapacityStatus is the same as ExtractCSIStorageCapacity except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractCSIStorageCapacityStatus(cSIStorageCapacity *storagev1.CSIStorageCapacity, fieldManager string) (*CSIStorageCapacityApplyConfiguration, error) { - return extractCSIStorageCapacity(cSIStorageCapacity, fieldManager, "status") -} - -func extractCSIStorageCapacity(cSIStorageCapacity *storagev1.CSIStorageCapacity, fieldManager string, subresource string) (*CSIStorageCapacityApplyConfiguration, error) { - b := &CSIStorageCapacityApplyConfiguration{} - err := managedfields.ExtractInto(cSIStorageCapacity, internal.Parser().Type("io.k8s.api.storage.v1.CSIStorageCapacity"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(cSIStorageCapacity.Name) - b.WithNamespace(cSIStorageCapacity.Namespace) - - b.WithKind("CSIStorageCapacity") - b.WithAPIVersion("storage.k8s.io/v1") - return b, nil -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *CSIStorageCapacityApplyConfiguration) WithKind(value string) *CSIStorageCapacityApplyConfiguration { - b.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *CSIStorageCapacityApplyConfiguration) WithAPIVersion(value string) *CSIStorageCapacityApplyConfiguration { - b.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *CSIStorageCapacityApplyConfiguration) WithName(value string) *CSIStorageCapacityApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *CSIStorageCapacityApplyConfiguration) WithGenerateName(value string) *CSIStorageCapacityApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *CSIStorageCapacityApplyConfiguration) WithNamespace(value string) *CSIStorageCapacityApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *CSIStorageCapacityApplyConfiguration) WithUID(value types.UID) *CSIStorageCapacityApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *CSIStorageCapacityApplyConfiguration) WithResourceVersion(value string) *CSIStorageCapacityApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *CSIStorageCapacityApplyConfiguration) WithGeneration(value int64) *CSIStorageCapacityApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *CSIStorageCapacityApplyConfiguration) WithCreationTimestamp(value metav1.Time) *CSIStorageCapacityApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *CSIStorageCapacityApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *CSIStorageCapacityApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *CSIStorageCapacityApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *CSIStorageCapacityApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *CSIStorageCapacityApplyConfiguration) WithLabels(entries map[string]string) *CSIStorageCapacityApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *CSIStorageCapacityApplyConfiguration) WithAnnotations(entries map[string]string) *CSIStorageCapacityApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *CSIStorageCapacityApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *CSIStorageCapacityApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *CSIStorageCapacityApplyConfiguration) WithFinalizers(values ...string) *CSIStorageCapacityApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) - } - return b -} - -func (b *CSIStorageCapacityApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} - } -} - -// WithNodeTopology sets the NodeTopology field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NodeTopology field is set to the value of the last call. -func (b *CSIStorageCapacityApplyConfiguration) WithNodeTopology(value *v1.LabelSelectorApplyConfiguration) *CSIStorageCapacityApplyConfiguration { - b.NodeTopology = value - return b -} - -// WithStorageClassName sets the StorageClassName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the StorageClassName field is set to the value of the last call. -func (b *CSIStorageCapacityApplyConfiguration) WithStorageClassName(value string) *CSIStorageCapacityApplyConfiguration { - b.StorageClassName = &value - return b -} - -// WithCapacity sets the Capacity field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Capacity field is set to the value of the last call. -func (b *CSIStorageCapacityApplyConfiguration) WithCapacity(value resource.Quantity) *CSIStorageCapacityApplyConfiguration { - b.Capacity = &value - return b -} - -// WithMaximumVolumeSize sets the MaximumVolumeSize field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MaximumVolumeSize field is set to the value of the last call. -func (b *CSIStorageCapacityApplyConfiguration) WithMaximumVolumeSize(value resource.Quantity) *CSIStorageCapacityApplyConfiguration { - b.MaximumVolumeSize = &value - return b -} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1/storageclass.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1/storageclass.go index 98c4c2233643..2df999c24a9a 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1/storageclass.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1/storageclass.go @@ -131,6 +131,15 @@ func (b *StorageClassApplyConfiguration) WithNamespace(value string) *StorageCla return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *StorageClassApplyConfiguration) WithSelfLink(value string) *StorageClassApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -240,6 +249,15 @@ func (b *StorageClassApplyConfiguration) WithFinalizers(values ...string) *Stora return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *StorageClassApplyConfiguration) WithClusterName(value string) *StorageClassApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *StorageClassApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1/volumeattachment.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1/volumeattachment.go index 4c74f09aa2d7..5fd3d4d8e6fb 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1/volumeattachment.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1/volumeattachment.go @@ -124,6 +124,15 @@ func (b *VolumeAttachmentApplyConfiguration) WithNamespace(value string) *Volume return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *VolumeAttachmentApplyConfiguration) WithSelfLink(value string) *VolumeAttachmentApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -233,6 +242,15 @@ func (b *VolumeAttachmentApplyConfiguration) WithFinalizers(values ...string) *V return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *VolumeAttachmentApplyConfiguration) WithClusterName(value string) *VolumeAttachmentApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *VolumeAttachmentApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1alpha1/csistoragecapacity.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1alpha1/csistoragecapacity.go index 8b810fed10cd..a7ad0717bf89 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1alpha1/csistoragecapacity.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1alpha1/csistoragecapacity.go @@ -129,6 +129,15 @@ func (b *CSIStorageCapacityApplyConfiguration) WithNamespace(value string) *CSIS return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *CSIStorageCapacityApplyConfiguration) WithSelfLink(value string) *CSIStorageCapacityApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -238,6 +247,15 @@ func (b *CSIStorageCapacityApplyConfiguration) WithFinalizers(values ...string) return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *CSIStorageCapacityApplyConfiguration) WithClusterName(value string) *CSIStorageCapacityApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *CSIStorageCapacityApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1alpha1/volumeattachment.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1alpha1/volumeattachment.go index bcefb5778a88..7a30919649ca 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1alpha1/volumeattachment.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1alpha1/volumeattachment.go @@ -124,6 +124,15 @@ func (b *VolumeAttachmentApplyConfiguration) WithNamespace(value string) *Volume return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *VolumeAttachmentApplyConfiguration) WithSelfLink(value string) *VolumeAttachmentApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -233,6 +242,15 @@ func (b *VolumeAttachmentApplyConfiguration) WithFinalizers(values ...string) *V return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *VolumeAttachmentApplyConfiguration) WithClusterName(value string) *VolumeAttachmentApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *VolumeAttachmentApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1beta1/csidriver.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1beta1/csidriver.go index 4266f0b6e493..4ff0fcdf199d 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1beta1/csidriver.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1beta1/csidriver.go @@ -123,6 +123,15 @@ func (b *CSIDriverApplyConfiguration) WithNamespace(value string) *CSIDriverAppl return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *CSIDriverApplyConfiguration) WithSelfLink(value string) *CSIDriverApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -232,6 +241,15 @@ func (b *CSIDriverApplyConfiguration) WithFinalizers(values ...string) *CSIDrive return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *CSIDriverApplyConfiguration) WithClusterName(value string) *CSIDriverApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *CSIDriverApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1beta1/csinode.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1beta1/csinode.go index 91588fd9fb14..fce97b456dea 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1beta1/csinode.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1beta1/csinode.go @@ -123,6 +123,15 @@ func (b *CSINodeApplyConfiguration) WithNamespace(value string) *CSINodeApplyCon return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *CSINodeApplyConfiguration) WithSelfLink(value string) *CSINodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -232,6 +241,15 @@ func (b *CSINodeApplyConfiguration) WithFinalizers(values ...string) *CSINodeApp return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *CSINodeApplyConfiguration) WithClusterName(value string) *CSINodeApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *CSINodeApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1beta1/csistoragecapacity.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1beta1/csistoragecapacity.go index 2854a15da73e..afd2e2a9ef7d 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1beta1/csistoragecapacity.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1beta1/csistoragecapacity.go @@ -129,6 +129,15 @@ func (b *CSIStorageCapacityApplyConfiguration) WithNamespace(value string) *CSIS return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *CSIStorageCapacityApplyConfiguration) WithSelfLink(value string) *CSIStorageCapacityApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -238,6 +247,15 @@ func (b *CSIStorageCapacityApplyConfiguration) WithFinalizers(values ...string) return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *CSIStorageCapacityApplyConfiguration) WithClusterName(value string) *CSIStorageCapacityApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *CSIStorageCapacityApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1beta1/storageclass.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1beta1/storageclass.go index 02194f1080af..a4b924ee8cab 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1beta1/storageclass.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1beta1/storageclass.go @@ -131,6 +131,15 @@ func (b *StorageClassApplyConfiguration) WithNamespace(value string) *StorageCla return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *StorageClassApplyConfiguration) WithSelfLink(value string) *StorageClassApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -240,6 +249,15 @@ func (b *StorageClassApplyConfiguration) WithFinalizers(values ...string) *Stora return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *StorageClassApplyConfiguration) WithClusterName(value string) *StorageClassApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *StorageClassApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1beta1/volumeattachment.go b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1beta1/volumeattachment.go index 9fccaf5cf986..553bfee98cbc 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1beta1/volumeattachment.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/applyconfigurations/storage/v1beta1/volumeattachment.go @@ -124,6 +124,15 @@ func (b *VolumeAttachmentApplyConfiguration) WithNamespace(value string) *Volume return b } +// WithSelfLink sets the SelfLink field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SelfLink field is set to the value of the last call. +func (b *VolumeAttachmentApplyConfiguration) WithSelfLink(value string) *VolumeAttachmentApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.SelfLink = &value + return b +} + // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. @@ -233,6 +242,15 @@ func (b *VolumeAttachmentApplyConfiguration) WithFinalizers(values ...string) *V return b } +// WithClusterName sets the ClusterName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ClusterName field is set to the value of the last call. +func (b *VolumeAttachmentApplyConfiguration) WithClusterName(value string) *VolumeAttachmentApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ClusterName = &value + return b +} + func (b *VolumeAttachmentApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/discovery/cached/memory/memcache.go b/cluster-autoscaler/vendor/k8s.io/client-go/discovery/cached/memory/memcache.go index 117c66f28633..9de389fa7e4d 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/discovery/cached/memory/memcache.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/discovery/cached/memory/memcache.go @@ -22,15 +22,13 @@ import ( "sync" "syscall" - openapi_v2 "github.com/google/gnostic/openapiv2" + openapi_v2 "github.com/googleapis/gnostic/openapiv2" errorsutil "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/version" "k8s.io/client-go/discovery" - "k8s.io/client-go/openapi" - cachedopenapi "k8s.io/client-go/openapi/cached" restclient "k8s.io/client-go/rest" ) @@ -51,7 +49,6 @@ type memCacheClient struct { groupToServerResources map[string]*cacheEntry groupList *metav1.APIGroupList cacheValid bool - openapiClient openapi.Client } // Error Constants @@ -110,6 +107,12 @@ func (d *memCacheClient) ServerResourcesForGroupVersion(groupVersion string) (*m return cachedVal.resourceList, cachedVal.err } +// ServerResources returns the supported resources for all groups and versions. +// Deprecated: use ServerGroupsAndResources instead. +func (d *memCacheClient) ServerResources() ([]*metav1.APIResourceList, error) { + return discovery.ServerResources(d) +} + // ServerGroupsAndResources returns the groups and supported resources for all groups and versions. func (d *memCacheClient) ServerGroupsAndResources() ([]*metav1.APIGroup, []*metav1.APIResourceList, error) { return discovery.ServerGroupsAndResources(d) @@ -146,18 +149,6 @@ func (d *memCacheClient) OpenAPISchema() (*openapi_v2.Document, error) { return d.delegate.OpenAPISchema() } -func (d *memCacheClient) OpenAPIV3() openapi.Client { - // Must take lock since Invalidate call may modify openapiClient - d.lock.Lock() - defer d.lock.Unlock() - - if d.openapiClient == nil { - d.openapiClient = cachedopenapi.NewClient(d.delegate.OpenAPIV3()) - } - - return d.openapiClient -} - func (d *memCacheClient) Fresh() bool { d.lock.RLock() defer d.lock.RUnlock() @@ -175,7 +166,6 @@ func (d *memCacheClient) Invalidate() { d.cacheValid = false d.groupToServerResources = nil d.groupList = nil - d.openapiClient = nil } // refreshLocked refreshes the state of cache. The caller must hold d.lock for diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/discovery/discovery_client.go b/cluster-autoscaler/vendor/k8s.io/client-go/discovery/discovery_client.go index baf878846215..50e59c5d85cb 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/discovery/discovery_client.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/discovery/discovery_client.go @@ -29,7 +29,7 @@ import ( //nolint:staticcheck // SA1019 Keep using module since it's still being maintained and the api of google.golang.org/protobuf/proto differs "github.com/golang/protobuf/proto" - openapi_v2 "github.com/google/gnostic/openapiv2" + openapi_v2 "github.com/googleapis/gnostic/openapiv2" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -39,7 +39,6 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/version" "k8s.io/client-go/kubernetes/scheme" - "k8s.io/client-go/openapi" restclient "k8s.io/client-go/rest" ) @@ -47,8 +46,7 @@ const ( // defaultRetries is the number of times a resource discovery is repeated if an api group disappears on the fly (e.g. CustomResourceDefinitions). defaultRetries = 2 // protobuf mime type - openAPIV2mimePb = "application/com.github.proto-openapi.spec.v2@v1.0+protobuf" - + mimePb = "application/com.github.proto-openapi.spec.v2@v1.0+protobuf" // defaultTimeout is the maximum amount of time per request when no timeout has been set on a RESTClient. // Defaults to 32s in order to have a distinguishable length of time, relative to other timeouts that exist. defaultTimeout = 32 * time.Second @@ -62,7 +60,6 @@ type DiscoveryInterface interface { ServerResourcesInterface ServerVersionInterface OpenAPISchemaInterface - OpenAPIV3SchemaInterface } // CachedDiscoveryInterface is a DiscoveryInterface with cache invalidation and freshness. @@ -93,6 +90,13 @@ type ServerGroupsInterface interface { type ServerResourcesInterface interface { // ServerResourcesForGroupVersion returns the supported resources for a group and version. ServerResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error) + // ServerResources returns the supported resources for all groups and versions. + // + // The returned resource list might be non-nil with partial results even in the case of + // non-nil error. + // + // Deprecated: use ServerGroupsAndResources instead. + ServerResources() ([]*metav1.APIResourceList, error) // ServerGroupsAndResources returns the supported groups and resources for all groups and versions. // // The returned group and resource lists might be non-nil with partial results even in the @@ -124,10 +128,6 @@ type OpenAPISchemaInterface interface { OpenAPISchema() (*openapi_v2.Document, error) } -type OpenAPIV3SchemaInterface interface { - OpenAPIV3() openapi.Client -} - // DiscoveryClient implements the functions that discover server-supported API groups, // versions and resources. type DiscoveryClient struct { @@ -210,6 +210,13 @@ func (d *DiscoveryClient) ServerResourcesForGroupVersion(groupVersion string) (r return resources, nil } +// ServerResources returns the supported resources for all groups and versions. +// Deprecated: use ServerGroupsAndResources instead. +func (d *DiscoveryClient) ServerResources() ([]*metav1.APIResourceList, error) { + _, rs, err := d.ServerGroupsAndResources() + return rs, err +} + // ServerGroupsAndResources returns the supported resources for all groups and versions. func (d *DiscoveryClient) ServerGroupsAndResources() ([]*metav1.APIGroup, []*metav1.APIResourceList, error) { return withRetries(defaultRetries, func() ([]*metav1.APIGroup, []*metav1.APIResourceList, error) { @@ -240,6 +247,13 @@ func IsGroupDiscoveryFailedError(err error) bool { return err != nil && ok } +// ServerResources uses the provided discovery interface to look up supported resources for all groups and versions. +// Deprecated: use ServerGroupsAndResources instead. +func ServerResources(d DiscoveryInterface) ([]*metav1.APIResourceList, error) { + _, rs, err := ServerGroupsAndResources(d) + return rs, err +} + func ServerGroupsAndResources(d DiscoveryInterface) ([]*metav1.APIGroup, []*metav1.APIResourceList, error) { sgs, err := d.ServerGroups() if sgs == nil { @@ -406,9 +420,9 @@ func (d *DiscoveryClient) ServerVersion() (*version.Info, error) { return &info, nil } -// OpenAPISchema fetches the open api v2 schema using a rest client and parses the proto. +// OpenAPISchema fetches the open api schema using a rest client and parses the proto. func (d *DiscoveryClient) OpenAPISchema() (*openapi_v2.Document, error) { - data, err := d.restClient.Get().AbsPath("/openapi/v2").SetHeader("Accept", openAPIV2mimePb).Do(context.TODO()).Raw() + data, err := d.restClient.Get().AbsPath("/openapi/v2").SetHeader("Accept", mimePb).Do(context.TODO()).Raw() if err != nil { if errors.IsForbidden(err) || errors.IsNotFound(err) || errors.IsNotAcceptable(err) { // single endpoint not found/registered in old server, try to fetch old endpoint @@ -429,10 +443,6 @@ func (d *DiscoveryClient) OpenAPISchema() (*openapi_v2.Document, error) { return document, nil } -func (d *DiscoveryClient) OpenAPIV3() openapi.Client { - return openapi.NewClient(d.restClient) -} - // withRetries retries the given recovery function in case the groups supported by the server change after ServerGroup() returns. func withRetries(maxRetries int, f func() ([]*metav1.APIGroup, []*metav1.APIResourceList, error)) ([]*metav1.APIGroup, []*metav1.APIResourceList, error) { var result []*metav1.APIResourceList diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/discovery/fake/discovery.go b/cluster-autoscaler/vendor/k8s.io/client-go/discovery/fake/discovery.go index 2eef5365d532..d3835c9fa148 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/discovery/fake/discovery.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/discovery/fake/discovery.go @@ -20,13 +20,12 @@ import ( "fmt" "net/http" - openapi_v2 "github.com/google/gnostic/openapiv2" + openapi_v2 "github.com/googleapis/gnostic/openapiv2" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/version" - "k8s.io/client-go/openapi" kubeversion "k8s.io/client-go/pkg/version" restclient "k8s.io/client-go/rest" "k8s.io/client-go/testing" @@ -61,6 +60,13 @@ func (c *FakeDiscovery) ServerResourcesForGroupVersion(groupVersion string) (*me }} } +// ServerResources returns the supported resources for all groups and versions. +// Deprecated: use ServerGroupsAndResources instead. +func (c *FakeDiscovery) ServerResources() ([]*metav1.APIResourceList, error) { + _, rs, err := c.ServerGroupsAndResources() + return rs, err +} + // ServerGroupsAndResources returns the supported groups and resources for all groups and versions. func (c *FakeDiscovery) ServerGroupsAndResources() ([]*metav1.APIGroup, []*metav1.APIResourceList, error) { sgs, err := c.ServerGroups() @@ -155,10 +161,6 @@ func (c *FakeDiscovery) OpenAPISchema() (*openapi_v2.Document, error) { return &openapi_v2.Document{}, nil } -func (c *FakeDiscovery) OpenAPIV3() openapi.Client { - panic("unimplemented") -} - // RESTClient returns a RESTClient that is used to communicate with API server // by this client implementation. func (c *FakeDiscovery) RESTClient() restclient.Interface { diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/discovery/helper.go b/cluster-autoscaler/vendor/k8s.io/client-go/discovery/helper.go index e79f073b03a3..3bfe514e8234 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/discovery/helper.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/discovery/helper.go @@ -19,33 +19,12 @@ package discovery import ( "fmt" - apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" apimachineryversion "k8s.io/apimachinery/pkg/version" ) -// IsResourceEnabled queries the server to determine if the resource specified is present on the server. -// This is particularly helpful when writing a controller or an e2e test that requires a particular resource to function. -func IsResourceEnabled(client DiscoveryInterface, resourceToCheck schema.GroupVersionResource) (bool, error) { - // this is a single request. The ServerResourcesForGroupVersion handles the core v1 group as legacy. - resourceList, err := client.ServerResourcesForGroupVersion(resourceToCheck.GroupVersion().String()) - if apierrors.IsNotFound(err) { // if the discovery endpoint isn't present, then the resource isn't present. - return false, nil - } - if err != nil { - return false, err - } - for _, actualResource := range resourceList.APIResources { - if actualResource.Name == resourceToCheck.Resource { - return true, nil - } - } - - return false, nil -} - // MatchesServerVersion queries the server to compares the build version // (git hash) of the client with the server's build version. It returns an error // if it failed to contact the server or if the versions are not an exact match. diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/informers/generic.go b/cluster-autoscaler/vendor/k8s.io/client-go/informers/generic.go index 4c2e53c25759..5b94a2d2a3a7 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/informers/generic.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/informers/generic.go @@ -347,8 +347,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1().CSIDrivers().Informer()}, nil case storagev1.SchemeGroupVersion.WithResource("csinodes"): return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1().CSINodes().Informer()}, nil - case storagev1.SchemeGroupVersion.WithResource("csistoragecapacities"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1().CSIStorageCapacities().Informer()}, nil case storagev1.SchemeGroupVersion.WithResource("storageclasses"): return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1().StorageClasses().Informer()}, nil case storagev1.SchemeGroupVersion.WithResource("volumeattachments"): diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/informers/storage/v1/csistoragecapacity.go b/cluster-autoscaler/vendor/k8s.io/client-go/informers/storage/v1/csistoragecapacity.go deleted file mode 100644 index 9b9095f3aec1..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/client-go/informers/storage/v1/csistoragecapacity.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - time "time" - - storagev1 "k8s.io/api/storage/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" - kubernetes "k8s.io/client-go/kubernetes" - v1 "k8s.io/client-go/listers/storage/v1" - cache "k8s.io/client-go/tools/cache" -) - -// CSIStorageCapacityInformer provides access to a shared informer and lister for -// CSIStorageCapacities. -type CSIStorageCapacityInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1.CSIStorageCapacityLister -} - -type cSIStorageCapacityInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewCSIStorageCapacityInformer constructs a new informer for CSIStorageCapacity type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewCSIStorageCapacityInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredCSIStorageCapacityInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredCSIStorageCapacityInformer constructs a new informer for CSIStorageCapacity type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredCSIStorageCapacityInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.StorageV1().CSIStorageCapacities(namespace).List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.StorageV1().CSIStorageCapacities(namespace).Watch(context.TODO(), options) - }, - }, - &storagev1.CSIStorageCapacity{}, - resyncPeriod, - indexers, - ) -} - -func (f *cSIStorageCapacityInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredCSIStorageCapacityInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *cSIStorageCapacityInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&storagev1.CSIStorageCapacity{}, f.defaultInformer) -} - -func (f *cSIStorageCapacityInformer) Lister() v1.CSIStorageCapacityLister { - return v1.NewCSIStorageCapacityLister(f.Informer().GetIndexer()) -} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/informers/storage/v1/interface.go b/cluster-autoscaler/vendor/k8s.io/client-go/informers/storage/v1/interface.go index 4f017b0864fb..157759140564 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/informers/storage/v1/interface.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/informers/storage/v1/interface.go @@ -28,8 +28,6 @@ type Interface interface { CSIDrivers() CSIDriverInformer // CSINodes returns a CSINodeInformer. CSINodes() CSINodeInformer - // CSIStorageCapacities returns a CSIStorageCapacityInformer. - CSIStorageCapacities() CSIStorageCapacityInformer // StorageClasses returns a StorageClassInformer. StorageClasses() StorageClassInformer // VolumeAttachments returns a VolumeAttachmentInformer. @@ -57,11 +55,6 @@ func (v *version) CSINodes() CSINodeInformer { return &cSINodeInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } -// CSIStorageCapacities returns a CSIStorageCapacityInformer. -func (v *version) CSIStorageCapacities() CSIStorageCapacityInformer { - return &cSIStorageCapacityInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - // StorageClasses returns a StorageClassInformer. func (v *version) StorageClasses() StorageClassInformer { return &storageClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/clientset.go b/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/clientset.go index e46c0537f785..3e512a7c2e97 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/clientset.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/clientset.go @@ -413,10 +413,6 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c - if configShallowCopy.UserAgent == "" { - configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent() - } - // share the transport between all clients httpClient, err := rest.HTTPClientFor(&configShallowCopy) if err != nil { diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_networkpolicy.go b/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_networkpolicy.go index 1ff5d8c99268..8faa9e6ce896 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_networkpolicy.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_networkpolicy.go @@ -105,18 +105,6 @@ func (c *FakeNetworkPolicies) Update(ctx context.Context, networkPolicy *v1beta1 return obj.(*v1beta1.NetworkPolicy), err } -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeNetworkPolicies) UpdateStatus(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.UpdateOptions) (*v1beta1.NetworkPolicy, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(networkpoliciesResource, "status", c.ns, networkPolicy), &v1beta1.NetworkPolicy{}) - - if obj == nil { - return nil, err - } - return obj.(*v1beta1.NetworkPolicy), err -} - // Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs. func (c *FakeNetworkPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. @@ -165,26 +153,3 @@ func (c *FakeNetworkPolicies) Apply(ctx context.Context, networkPolicy *extensio } return obj.(*v1beta1.NetworkPolicy), err } - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeNetworkPolicies) ApplyStatus(ctx context.Context, networkPolicy *extensionsv1beta1.NetworkPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.NetworkPolicy, err error) { - if networkPolicy == nil { - return nil, fmt.Errorf("networkPolicy provided to Apply must not be nil") - } - data, err := json.Marshal(networkPolicy) - if err != nil { - return nil, err - } - name := networkPolicy.Name - if name == nil { - return nil, fmt.Errorf("networkPolicy.Name must be provided to Apply") - } - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(networkpoliciesResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1beta1.NetworkPolicy{}) - - if obj == nil { - return nil, err - } - return obj.(*v1beta1.NetworkPolicy), err -} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/networkpolicy.go b/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/networkpolicy.go index f24099b90d37..978b26db0337 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/networkpolicy.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/networkpolicy.go @@ -43,7 +43,6 @@ type NetworkPoliciesGetter interface { type NetworkPolicyInterface interface { Create(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.CreateOptions) (*v1beta1.NetworkPolicy, error) Update(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.UpdateOptions) (*v1beta1.NetworkPolicy, error) - UpdateStatus(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.UpdateOptions) (*v1beta1.NetworkPolicy, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.NetworkPolicy, error) @@ -51,7 +50,6 @@ type NetworkPolicyInterface interface { Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.NetworkPolicy, err error) Apply(ctx context.Context, networkPolicy *extensionsv1beta1.NetworkPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.NetworkPolicy, err error) - ApplyStatus(ctx context.Context, networkPolicy *extensionsv1beta1.NetworkPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.NetworkPolicy, err error) NetworkPolicyExpansion } @@ -141,22 +139,6 @@ func (c *networkPolicies) Update(ctx context.Context, networkPolicy *v1beta1.Net return } -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *networkPolicies) UpdateStatus(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.UpdateOptions) (result *v1beta1.NetworkPolicy, err error) { - result = &v1beta1.NetworkPolicy{} - err = c.client.Put(). - Namespace(c.ns). - Resource("networkpolicies"). - Name(networkPolicy.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(networkPolicy). - Do(ctx). - Into(result) - return -} - // Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs. func (c *networkPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). @@ -224,33 +206,3 @@ func (c *networkPolicies) Apply(ctx context.Context, networkPolicy *extensionsv1 Into(result) return } - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *networkPolicies) ApplyStatus(ctx context.Context, networkPolicy *extensionsv1beta1.NetworkPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.NetworkPolicy, err error) { - if networkPolicy == nil { - return nil, fmt.Errorf("networkPolicy provided to Apply must not be nil") - } - patchOpts := opts.ToPatchOptions() - data, err := json.Marshal(networkPolicy) - if err != nil { - return nil, err - } - - name := networkPolicy.Name - if name == nil { - return nil, fmt.Errorf("networkPolicy.Name must be provided to Apply") - } - - result = &v1beta1.NetworkPolicy{} - err = c.client.Patch(types.ApplyPatchType). - Namespace(c.ns). - Resource("networkpolicies"). - Name(*name). - SubResource("status"). - VersionedParams(&patchOpts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networkpolicy.go b/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networkpolicy.go index 16c10cac0d54..88e05ba5772c 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networkpolicy.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networkpolicy.go @@ -105,18 +105,6 @@ func (c *FakeNetworkPolicies) Update(ctx context.Context, networkPolicy *network return obj.(*networkingv1.NetworkPolicy), err } -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeNetworkPolicies) UpdateStatus(ctx context.Context, networkPolicy *networkingv1.NetworkPolicy, opts v1.UpdateOptions) (*networkingv1.NetworkPolicy, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(networkpoliciesResource, "status", c.ns, networkPolicy), &networkingv1.NetworkPolicy{}) - - if obj == nil { - return nil, err - } - return obj.(*networkingv1.NetworkPolicy), err -} - // Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs. func (c *FakeNetworkPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. @@ -165,26 +153,3 @@ func (c *FakeNetworkPolicies) Apply(ctx context.Context, networkPolicy *applycon } return obj.(*networkingv1.NetworkPolicy), err } - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeNetworkPolicies) ApplyStatus(ctx context.Context, networkPolicy *applyconfigurationsnetworkingv1.NetworkPolicyApplyConfiguration, opts v1.ApplyOptions) (result *networkingv1.NetworkPolicy, err error) { - if networkPolicy == nil { - return nil, fmt.Errorf("networkPolicy provided to Apply must not be nil") - } - data, err := json.Marshal(networkPolicy) - if err != nil { - return nil, err - } - name := networkPolicy.Name - if name == nil { - return nil, fmt.Errorf("networkPolicy.Name must be provided to Apply") - } - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(networkpoliciesResource, c.ns, *name, types.ApplyPatchType, data, "status"), &networkingv1.NetworkPolicy{}) - - if obj == nil { - return nil, err - } - return obj.(*networkingv1.NetworkPolicy), err -} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go b/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go index 97afd6278667..d7454ce14525 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go @@ -43,7 +43,6 @@ type NetworkPoliciesGetter interface { type NetworkPolicyInterface interface { Create(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.CreateOptions) (*v1.NetworkPolicy, error) Update(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.UpdateOptions) (*v1.NetworkPolicy, error) - UpdateStatus(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.UpdateOptions) (*v1.NetworkPolicy, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.NetworkPolicy, error) @@ -51,7 +50,6 @@ type NetworkPolicyInterface interface { Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.NetworkPolicy, err error) Apply(ctx context.Context, networkPolicy *networkingv1.NetworkPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.NetworkPolicy, err error) - ApplyStatus(ctx context.Context, networkPolicy *networkingv1.NetworkPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.NetworkPolicy, err error) NetworkPolicyExpansion } @@ -141,22 +139,6 @@ func (c *networkPolicies) Update(ctx context.Context, networkPolicy *v1.NetworkP return } -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *networkPolicies) UpdateStatus(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.UpdateOptions) (result *v1.NetworkPolicy, err error) { - result = &v1.NetworkPolicy{} - err = c.client.Put(). - Namespace(c.ns). - Resource("networkpolicies"). - Name(networkPolicy.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(networkPolicy). - Do(ctx). - Into(result) - return -} - // Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs. func (c *networkPolicies) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { return c.client.Delete(). @@ -224,33 +206,3 @@ func (c *networkPolicies) Apply(ctx context.Context, networkPolicy *networkingv1 Into(result) return } - -// ApplyStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *networkPolicies) ApplyStatus(ctx context.Context, networkPolicy *networkingv1.NetworkPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.NetworkPolicy, err error) { - if networkPolicy == nil { - return nil, fmt.Errorf("networkPolicy provided to Apply must not be nil") - } - patchOpts := opts.ToPatchOptions() - data, err := json.Marshal(networkPolicy) - if err != nil { - return nil, err - } - - name := networkPolicy.Name - if name == nil { - return nil, fmt.Errorf("networkPolicy.Name must be provided to Apply") - } - - result = &v1.NetworkPolicy{} - err = c.client.Patch(types.ApplyPatchType). - Namespace(c.ns). - Resource("networkpolicies"). - Name(*name). - SubResource("status"). - VersionedParams(&patchOpts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/csistoragecapacity.go b/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/csistoragecapacity.go deleted file mode 100644 index 6bb50e0da98d..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/csistoragecapacity.go +++ /dev/null @@ -1,208 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - "context" - json "encoding/json" - "fmt" - "time" - - v1 "k8s.io/api/storage/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - storagev1 "k8s.io/client-go/applyconfigurations/storage/v1" - scheme "k8s.io/client-go/kubernetes/scheme" - rest "k8s.io/client-go/rest" -) - -// CSIStorageCapacitiesGetter has a method to return a CSIStorageCapacityInterface. -// A group's client should implement this interface. -type CSIStorageCapacitiesGetter interface { - CSIStorageCapacities(namespace string) CSIStorageCapacityInterface -} - -// CSIStorageCapacityInterface has methods to work with CSIStorageCapacity resources. -type CSIStorageCapacityInterface interface { - Create(ctx context.Context, cSIStorageCapacity *v1.CSIStorageCapacity, opts metav1.CreateOptions) (*v1.CSIStorageCapacity, error) - Update(ctx context.Context, cSIStorageCapacity *v1.CSIStorageCapacity, opts metav1.UpdateOptions) (*v1.CSIStorageCapacity, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.CSIStorageCapacity, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.CSIStorageCapacityList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CSIStorageCapacity, err error) - Apply(ctx context.Context, cSIStorageCapacity *storagev1.CSIStorageCapacityApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CSIStorageCapacity, err error) - CSIStorageCapacityExpansion -} - -// cSIStorageCapacities implements CSIStorageCapacityInterface -type cSIStorageCapacities struct { - client rest.Interface - ns string -} - -// newCSIStorageCapacities returns a CSIStorageCapacities -func newCSIStorageCapacities(c *StorageV1Client, namespace string) *cSIStorageCapacities { - return &cSIStorageCapacities{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the cSIStorageCapacity, and returns the corresponding cSIStorageCapacity object, and an error if there is any. -func (c *cSIStorageCapacities) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.CSIStorageCapacity, err error) { - result = &v1.CSIStorageCapacity{} - err = c.client.Get(). - Namespace(c.ns). - Resource("csistoragecapacities"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of CSIStorageCapacities that match those selectors. -func (c *cSIStorageCapacities) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CSIStorageCapacityList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1.CSIStorageCapacityList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("csistoragecapacities"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested cSIStorageCapacities. -func (c *cSIStorageCapacities) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("csistoragecapacities"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a cSIStorageCapacity and creates it. Returns the server's representation of the cSIStorageCapacity, and an error, if there is any. -func (c *cSIStorageCapacities) Create(ctx context.Context, cSIStorageCapacity *v1.CSIStorageCapacity, opts metav1.CreateOptions) (result *v1.CSIStorageCapacity, err error) { - result = &v1.CSIStorageCapacity{} - err = c.client.Post(). - Namespace(c.ns). - Resource("csistoragecapacities"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(cSIStorageCapacity). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a cSIStorageCapacity and updates it. Returns the server's representation of the cSIStorageCapacity, and an error, if there is any. -func (c *cSIStorageCapacities) Update(ctx context.Context, cSIStorageCapacity *v1.CSIStorageCapacity, opts metav1.UpdateOptions) (result *v1.CSIStorageCapacity, err error) { - result = &v1.CSIStorageCapacity{} - err = c.client.Put(). - Namespace(c.ns). - Resource("csistoragecapacities"). - Name(cSIStorageCapacity.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(cSIStorageCapacity). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the cSIStorageCapacity and deletes it. Returns an error if one occurs. -func (c *cSIStorageCapacities) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("csistoragecapacities"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *cSIStorageCapacities) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("csistoragecapacities"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched cSIStorageCapacity. -func (c *cSIStorageCapacities) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CSIStorageCapacity, err error) { - result = &v1.CSIStorageCapacity{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("csistoragecapacities"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied cSIStorageCapacity. -func (c *cSIStorageCapacities) Apply(ctx context.Context, cSIStorageCapacity *storagev1.CSIStorageCapacityApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CSIStorageCapacity, err error) { - if cSIStorageCapacity == nil { - return nil, fmt.Errorf("cSIStorageCapacity provided to Apply must not be nil") - } - patchOpts := opts.ToPatchOptions() - data, err := json.Marshal(cSIStorageCapacity) - if err != nil { - return nil, err - } - name := cSIStorageCapacity.Name - if name == nil { - return nil, fmt.Errorf("cSIStorageCapacity.Name must be provided to Apply") - } - result = &v1.CSIStorageCapacity{} - err = c.client.Patch(types.ApplyPatchType). - Namespace(c.ns). - Resource("csistoragecapacities"). - Name(*name). - VersionedParams(&patchOpts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csistoragecapacity.go b/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csistoragecapacity.go deleted file mode 100644 index 40c4171c8035..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_csistoragecapacity.go +++ /dev/null @@ -1,155 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - json "encoding/json" - "fmt" - - storagev1 "k8s.io/api/storage/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - applyconfigurationsstoragev1 "k8s.io/client-go/applyconfigurations/storage/v1" - testing "k8s.io/client-go/testing" -) - -// FakeCSIStorageCapacities implements CSIStorageCapacityInterface -type FakeCSIStorageCapacities struct { - Fake *FakeStorageV1 - ns string -} - -var csistoragecapacitiesResource = schema.GroupVersionResource{Group: "storage.k8s.io", Version: "v1", Resource: "csistoragecapacities"} - -var csistoragecapacitiesKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1", Kind: "CSIStorageCapacity"} - -// Get takes name of the cSIStorageCapacity, and returns the corresponding cSIStorageCapacity object, and an error if there is any. -func (c *FakeCSIStorageCapacities) Get(ctx context.Context, name string, options v1.GetOptions) (result *storagev1.CSIStorageCapacity, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(csistoragecapacitiesResource, c.ns, name), &storagev1.CSIStorageCapacity{}) - - if obj == nil { - return nil, err - } - return obj.(*storagev1.CSIStorageCapacity), err -} - -// List takes label and field selectors, and returns the list of CSIStorageCapacities that match those selectors. -func (c *FakeCSIStorageCapacities) List(ctx context.Context, opts v1.ListOptions) (result *storagev1.CSIStorageCapacityList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(csistoragecapacitiesResource, csistoragecapacitiesKind, c.ns, opts), &storagev1.CSIStorageCapacityList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &storagev1.CSIStorageCapacityList{ListMeta: obj.(*storagev1.CSIStorageCapacityList).ListMeta} - for _, item := range obj.(*storagev1.CSIStorageCapacityList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested cSIStorageCapacities. -func (c *FakeCSIStorageCapacities) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(csistoragecapacitiesResource, c.ns, opts)) - -} - -// Create takes the representation of a cSIStorageCapacity and creates it. Returns the server's representation of the cSIStorageCapacity, and an error, if there is any. -func (c *FakeCSIStorageCapacities) Create(ctx context.Context, cSIStorageCapacity *storagev1.CSIStorageCapacity, opts v1.CreateOptions) (result *storagev1.CSIStorageCapacity, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(csistoragecapacitiesResource, c.ns, cSIStorageCapacity), &storagev1.CSIStorageCapacity{}) - - if obj == nil { - return nil, err - } - return obj.(*storagev1.CSIStorageCapacity), err -} - -// Update takes the representation of a cSIStorageCapacity and updates it. Returns the server's representation of the cSIStorageCapacity, and an error, if there is any. -func (c *FakeCSIStorageCapacities) Update(ctx context.Context, cSIStorageCapacity *storagev1.CSIStorageCapacity, opts v1.UpdateOptions) (result *storagev1.CSIStorageCapacity, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(csistoragecapacitiesResource, c.ns, cSIStorageCapacity), &storagev1.CSIStorageCapacity{}) - - if obj == nil { - return nil, err - } - return obj.(*storagev1.CSIStorageCapacity), err -} - -// Delete takes name of the cSIStorageCapacity and deletes it. Returns an error if one occurs. -func (c *FakeCSIStorageCapacities) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(csistoragecapacitiesResource, c.ns, name, opts), &storagev1.CSIStorageCapacity{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeCSIStorageCapacities) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(csistoragecapacitiesResource, c.ns, listOpts) - - _, err := c.Fake.Invokes(action, &storagev1.CSIStorageCapacityList{}) - return err -} - -// Patch applies the patch and returns the patched cSIStorageCapacity. -func (c *FakeCSIStorageCapacities) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *storagev1.CSIStorageCapacity, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(csistoragecapacitiesResource, c.ns, name, pt, data, subresources...), &storagev1.CSIStorageCapacity{}) - - if obj == nil { - return nil, err - } - return obj.(*storagev1.CSIStorageCapacity), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied cSIStorageCapacity. -func (c *FakeCSIStorageCapacities) Apply(ctx context.Context, cSIStorageCapacity *applyconfigurationsstoragev1.CSIStorageCapacityApplyConfiguration, opts v1.ApplyOptions) (result *storagev1.CSIStorageCapacity, err error) { - if cSIStorageCapacity == nil { - return nil, fmt.Errorf("cSIStorageCapacity provided to Apply must not be nil") - } - data, err := json.Marshal(cSIStorageCapacity) - if err != nil { - return nil, err - } - name := cSIStorageCapacity.Name - if name == nil { - return nil, fmt.Errorf("cSIStorageCapacity.Name must be provided to Apply") - } - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(csistoragecapacitiesResource, c.ns, *name, types.ApplyPatchType, data), &storagev1.CSIStorageCapacity{}) - - if obj == nil { - return nil, err - } - return obj.(*storagev1.CSIStorageCapacity), err -} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storage_client.go b/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storage_client.go index 5cb91b516640..8878f5048447 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storage_client.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storage_client.go @@ -36,10 +36,6 @@ func (c *FakeStorageV1) CSINodes() v1.CSINodeInterface { return &FakeCSINodes{c} } -func (c *FakeStorageV1) CSIStorageCapacities(namespace string) v1.CSIStorageCapacityInterface { - return &FakeCSIStorageCapacities{c, namespace} -} - func (c *FakeStorageV1) StorageClasses() v1.StorageClassInterface { return &FakeStorageClasses{c} } diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/generated_expansion.go b/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/generated_expansion.go index aa318d7d36ed..af811177636d 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/generated_expansion.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/generated_expansion.go @@ -22,8 +22,6 @@ type CSIDriverExpansion interface{} type CSINodeExpansion interface{} -type CSIStorageCapacityExpansion interface{} - type StorageClassExpansion interface{} type VolumeAttachmentExpansion interface{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storage_client.go b/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storage_client.go index 750fe8b62b4e..b31862f439a3 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storage_client.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/kubernetes/typed/storage/v1/storage_client.go @@ -30,7 +30,6 @@ type StorageV1Interface interface { RESTClient() rest.Interface CSIDriversGetter CSINodesGetter - CSIStorageCapacitiesGetter StorageClassesGetter VolumeAttachmentsGetter } @@ -48,10 +47,6 @@ func (c *StorageV1Client) CSINodes() CSINodeInterface { return newCSINodes(c) } -func (c *StorageV1Client) CSIStorageCapacities(namespace string) CSIStorageCapacityInterface { - return newCSIStorageCapacities(c, namespace) -} - func (c *StorageV1Client) StorageClasses() StorageClassInterface { return newStorageClasses(c) } diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/listers/apps/v1/daemonset_expansion.go b/cluster-autoscaler/vendor/k8s.io/client-go/listers/apps/v1/daemonset_expansion.go index 667d6fb88ea0..83435561a14a 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/listers/apps/v1/daemonset_expansion.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/listers/apps/v1/daemonset_expansion.go @@ -60,8 +60,8 @@ func (s *daemonSetLister) GetPodDaemonSets(pod *v1.Pod) ([]*apps.DaemonSet, erro } selector, err = metav1.LabelSelectorAsSelector(daemonSet.Spec.Selector) if err != nil { - // This object has an invalid selector, it does not match the pod - continue + // this should not happen if the DaemonSet passed validation + return nil, err } // If a daemonSet with a nil or empty selector creeps in, it should match nothing, not everything. @@ -96,8 +96,7 @@ func (s *daemonSetLister) GetHistoryDaemonSets(history *apps.ControllerRevision) for _, ds := range list { selector, err := metav1.LabelSelectorAsSelector(ds.Spec.Selector) if err != nil { - // This object has an invalid selector, it does not match the history - continue + return nil, fmt.Errorf("invalid label selector: %v", err) } // If a DaemonSet with a nil or empty selector creeps in, it should match nothing, not everything. if selector.Empty() || !selector.Matches(labels.Set(history.Labels)) { diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/listers/apps/v1/replicaset_expansion.go b/cluster-autoscaler/vendor/k8s.io/client-go/listers/apps/v1/replicaset_expansion.go index 8e093de0a015..675e615aecc9 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/listers/apps/v1/replicaset_expansion.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/listers/apps/v1/replicaset_expansion.go @@ -55,8 +55,7 @@ func (s *replicaSetLister) GetPodReplicaSets(pod *v1.Pod) ([]*apps.ReplicaSet, e } selector, err := metav1.LabelSelectorAsSelector(rs.Spec.Selector) if err != nil { - // This object has an invalid selector, it does not match the pod - continue + return nil, fmt.Errorf("invalid selector: %v", err) } // If a ReplicaSet with a nil or empty selector creeps in, it should match nothing, not everything. diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/listers/apps/v1/statefulset_expansion.go b/cluster-autoscaler/vendor/k8s.io/client-go/listers/apps/v1/statefulset_expansion.go index e79f8a2b46ad..b4912976b69a 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/listers/apps/v1/statefulset_expansion.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/listers/apps/v1/statefulset_expansion.go @@ -59,8 +59,7 @@ func (s *statefulSetLister) GetPodStatefulSets(pod *v1.Pod) ([]*apps.StatefulSet } selector, err = metav1.LabelSelectorAsSelector(ps.Spec.Selector) if err != nil { - // This object has an invalid selector, it does not match the pod - continue + return nil, fmt.Errorf("invalid selector: %v", err) } // If a StatefulSet with a nil or empty selector creeps in, it should match nothing, not everything. diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/listers/apps/v1beta1/statefulset_expansion.go b/cluster-autoscaler/vendor/k8s.io/client-go/listers/apps/v1beta1/statefulset_expansion.go index 7d2c4d9b07a7..0741792ac7a5 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/listers/apps/v1beta1/statefulset_expansion.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/listers/apps/v1beta1/statefulset_expansion.go @@ -59,8 +59,7 @@ func (s *statefulSetLister) GetPodStatefulSets(pod *v1.Pod) ([]*apps.StatefulSet } selector, err = metav1.LabelSelectorAsSelector(ps.Spec.Selector) if err != nil { - // This object has an invalid selector, it does not match the pod - continue + return nil, fmt.Errorf("invalid selector: %v", err) } // If a StatefulSet with a nil or empty selector creeps in, it should match nothing, not everything. diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/listers/apps/v1beta2/daemonset_expansion.go b/cluster-autoscaler/vendor/k8s.io/client-go/listers/apps/v1beta2/daemonset_expansion.go index e722b63b6808..3b01aaa487d3 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/listers/apps/v1beta2/daemonset_expansion.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/listers/apps/v1beta2/daemonset_expansion.go @@ -60,8 +60,8 @@ func (s *daemonSetLister) GetPodDaemonSets(pod *v1.Pod) ([]*apps.DaemonSet, erro } selector, err = metav1.LabelSelectorAsSelector(daemonSet.Spec.Selector) if err != nil { - // This object has an invalid selector, it does not match the pod - continue + // this should not happen if the DaemonSet passed validation + return nil, err } // If a daemonSet with a nil or empty selector creeps in, it should match nothing, not everything. @@ -96,8 +96,7 @@ func (s *daemonSetLister) GetHistoryDaemonSets(history *apps.ControllerRevision) for _, ds := range list { selector, err := metav1.LabelSelectorAsSelector(ds.Spec.Selector) if err != nil { - // This object has an invalid selector, it does not match the history object - continue + return nil, fmt.Errorf("invalid label selector: %v", err) } // If a DaemonSet with a nil or empty selector creeps in, it should match nothing, not everything. if selector.Empty() || !selector.Matches(labels.Set(history.Labels)) { diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/listers/apps/v1beta2/replicaset_expansion.go b/cluster-autoscaler/vendor/k8s.io/client-go/listers/apps/v1beta2/replicaset_expansion.go index bc014b5a69d5..7562fe996891 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/listers/apps/v1beta2/replicaset_expansion.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/listers/apps/v1beta2/replicaset_expansion.go @@ -55,8 +55,7 @@ func (s *replicaSetLister) GetPodReplicaSets(pod *v1.Pod) ([]*apps.ReplicaSet, e } selector, err := metav1.LabelSelectorAsSelector(rs.Spec.Selector) if err != nil { - // This object has an invalid selector, it does not match the pod - continue + return nil, fmt.Errorf("invalid selector: %v", err) } // If a ReplicaSet with a nil or empty selector creeps in, it should match nothing, not everything. diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/listers/apps/v1beta2/statefulset_expansion.go b/cluster-autoscaler/vendor/k8s.io/client-go/listers/apps/v1beta2/statefulset_expansion.go index eae31b82f83f..6fa6b9144b2b 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/listers/apps/v1beta2/statefulset_expansion.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/listers/apps/v1beta2/statefulset_expansion.go @@ -59,8 +59,7 @@ func (s *statefulSetLister) GetPodStatefulSets(pod *v1.Pod) ([]*apps.StatefulSet } selector, err = metav1.LabelSelectorAsSelector(ps.Spec.Selector) if err != nil { - // This object has an invalid selector, it does not match the pod - continue + return nil, fmt.Errorf("invalid selector: %v", err) } // If a StatefulSet with a nil or empty selector creeps in, it should match nothing, not everything. diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/listers/batch/v1/job_expansion.go b/cluster-autoscaler/vendor/k8s.io/client-go/listers/batch/v1/job_expansion.go index 8dc5db7885ec..fdcd5f32eef8 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/listers/batch/v1/job_expansion.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/listers/batch/v1/job_expansion.go @@ -51,11 +51,7 @@ func (l *jobLister) GetPodJobs(pod *v1.Pod) (jobs []batch.Job, err error) { return } for _, job := range list { - selector, err := metav1.LabelSelectorAsSelector(job.Spec.Selector) - if err != nil { - // This object has an invalid selector, it does not match the pod - continue - } + selector, _ := metav1.LabelSelectorAsSelector(job.Spec.Selector) if !selector.Matches(labels.Set(pod.Labels)) { continue } diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/listers/extensions/v1beta1/daemonset_expansion.go b/cluster-autoscaler/vendor/k8s.io/client-go/listers/extensions/v1beta1/daemonset_expansion.go index f6dd7a963e86..336a4ed831c3 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/listers/extensions/v1beta1/daemonset_expansion.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/listers/extensions/v1beta1/daemonset_expansion.go @@ -61,8 +61,8 @@ func (s *daemonSetLister) GetPodDaemonSets(pod *v1.Pod) ([]*v1beta1.DaemonSet, e } selector, err = metav1.LabelSelectorAsSelector(daemonSet.Spec.Selector) if err != nil { - // This object has an invalid selector, it does not match the pod - continue + // this should not happen if the DaemonSet passed validation + return nil, err } // If a daemonSet with a nil or empty selector creeps in, it should match nothing, not everything. @@ -97,8 +97,7 @@ func (s *daemonSetLister) GetHistoryDaemonSets(history *apps.ControllerRevision) for _, ds := range list { selector, err := metav1.LabelSelectorAsSelector(ds.Spec.Selector) if err != nil { - // This object has an invalid selector, it does not match the history object - continue + return nil, fmt.Errorf("invalid label selector: %v", err) } // If a DaemonSet with a nil or empty selector creeps in, it should match nothing, not everything. if selector.Empty() || !selector.Matches(labels.Set(history.Labels)) { diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/listers/extensions/v1beta1/replicaset_expansion.go b/cluster-autoscaler/vendor/k8s.io/client-go/listers/extensions/v1beta1/replicaset_expansion.go index 74114c2bd7d9..1f72644ccab3 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/listers/extensions/v1beta1/replicaset_expansion.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/listers/extensions/v1beta1/replicaset_expansion.go @@ -55,8 +55,7 @@ func (s *replicaSetLister) GetPodReplicaSets(pod *v1.Pod) ([]*extensions.Replica } selector, err := metav1.LabelSelectorAsSelector(rs.Spec.Selector) if err != nil { - // This object has an invalid selector, it does not match the pod - continue + return nil, fmt.Errorf("invalid selector: %v", err) } // If a ReplicaSet with a nil or empty selector creeps in, it should match nothing, not everything. diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/listers/policy/v1/poddisruptionbudget_expansion.go b/cluster-autoscaler/vendor/k8s.io/client-go/listers/policy/v1/poddisruptionbudget_expansion.go index 115ee3f00476..f63851ad48be 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/listers/policy/v1/poddisruptionbudget_expansion.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/listers/policy/v1/poddisruptionbudget_expansion.go @@ -23,6 +23,7 @@ import ( policy "k8s.io/api/policy/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" + "k8s.io/klog/v2" ) // PodDisruptionBudgetListerExpansion allows custom methods to be added to @@ -49,7 +50,7 @@ func (s *podDisruptionBudgetLister) GetPodPodDisruptionBudgets(pod *v1.Pod) ([]* pdb := list[i] selector, err = metav1.LabelSelectorAsSelector(pdb.Spec.Selector) if err != nil { - // This object has an invalid selector, it does not match the pod + klog.Warningf("invalid selector: %v", err) continue } diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget_expansion.go b/cluster-autoscaler/vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget_expansion.go index 994947c4f3c7..dce5dca82083 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget_expansion.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget_expansion.go @@ -23,6 +23,7 @@ import ( policy "k8s.io/api/policy/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" + "k8s.io/klog/v2" ) // PodDisruptionBudgetListerExpansion allows custom methods to be added to @@ -49,7 +50,8 @@ func (s *podDisruptionBudgetLister) GetPodPodDisruptionBudgets(pod *v1.Pod) ([]* pdb := list[i] selector, err = metav1.LabelSelectorAsSelector(pdb.Spec.Selector) if err != nil { - // This object has an invalid selector, it does not match the pod + klog.Warningf("invalid selector: %v", err) + // TODO(mml): add an event to the PDB continue } diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/listers/storage/v1/csistoragecapacity.go b/cluster-autoscaler/vendor/k8s.io/client-go/listers/storage/v1/csistoragecapacity.go deleted file mode 100644 index a72328c9a3f8..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/client-go/listers/storage/v1/csistoragecapacity.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "k8s.io/api/storage/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// CSIStorageCapacityLister helps list CSIStorageCapacities. -// All objects returned here must be treated as read-only. -type CSIStorageCapacityLister interface { - // List lists all CSIStorageCapacities in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.CSIStorageCapacity, err error) - // CSIStorageCapacities returns an object that can list and get CSIStorageCapacities. - CSIStorageCapacities(namespace string) CSIStorageCapacityNamespaceLister - CSIStorageCapacityListerExpansion -} - -// cSIStorageCapacityLister implements the CSIStorageCapacityLister interface. -type cSIStorageCapacityLister struct { - indexer cache.Indexer -} - -// NewCSIStorageCapacityLister returns a new CSIStorageCapacityLister. -func NewCSIStorageCapacityLister(indexer cache.Indexer) CSIStorageCapacityLister { - return &cSIStorageCapacityLister{indexer: indexer} -} - -// List lists all CSIStorageCapacities in the indexer. -func (s *cSIStorageCapacityLister) List(selector labels.Selector) (ret []*v1.CSIStorageCapacity, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.CSIStorageCapacity)) - }) - return ret, err -} - -// CSIStorageCapacities returns an object that can list and get CSIStorageCapacities. -func (s *cSIStorageCapacityLister) CSIStorageCapacities(namespace string) CSIStorageCapacityNamespaceLister { - return cSIStorageCapacityNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// CSIStorageCapacityNamespaceLister helps list and get CSIStorageCapacities. -// All objects returned here must be treated as read-only. -type CSIStorageCapacityNamespaceLister interface { - // List lists all CSIStorageCapacities in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.CSIStorageCapacity, err error) - // Get retrieves the CSIStorageCapacity from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1.CSIStorageCapacity, error) - CSIStorageCapacityNamespaceListerExpansion -} - -// cSIStorageCapacityNamespaceLister implements the CSIStorageCapacityNamespaceLister -// interface. -type cSIStorageCapacityNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all CSIStorageCapacities in the indexer for a given namespace. -func (s cSIStorageCapacityNamespaceLister) List(selector labels.Selector) (ret []*v1.CSIStorageCapacity, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1.CSIStorageCapacity)) - }) - return ret, err -} - -// Get retrieves the CSIStorageCapacity from the indexer for a given namespace and name. -func (s cSIStorageCapacityNamespaceLister) Get(name string) (*v1.CSIStorageCapacity, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("csistoragecapacity"), name) - } - return obj.(*v1.CSIStorageCapacity), nil -} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/listers/storage/v1/expansion_generated.go b/cluster-autoscaler/vendor/k8s.io/client-go/listers/storage/v1/expansion_generated.go index 196b787e7eac..172f835f71b3 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/listers/storage/v1/expansion_generated.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/listers/storage/v1/expansion_generated.go @@ -26,14 +26,6 @@ type CSIDriverListerExpansion interface{} // CSINodeLister. type CSINodeListerExpansion interface{} -// CSIStorageCapacityListerExpansion allows custom methods to be added to -// CSIStorageCapacityLister. -type CSIStorageCapacityListerExpansion interface{} - -// CSIStorageCapacityNamespaceListerExpansion allows custom methods to be added to -// CSIStorageCapacityNamespaceLister. -type CSIStorageCapacityNamespaceListerExpansion interface{} - // StorageClassListerExpansion allows custom methods to be added to // StorageClassLister. type StorageClassListerExpansion interface{} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/openapi/cached/client.go b/cluster-autoscaler/vendor/k8s.io/client-go/openapi/cached/client.go deleted file mode 100644 index 17f63ed267bd..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/client-go/openapi/cached/client.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cached - -import ( - "sync" - - "k8s.io/client-go/openapi" -) - -type client struct { - delegate openapi.Client - - once sync.Once - result map[string]openapi.GroupVersion - err error -} - -func NewClient(other openapi.Client) openapi.Client { - return &client{ - delegate: other, - } -} - -func (c *client) Paths() (map[string]openapi.GroupVersion, error) { - c.once.Do(func() { - uncached, err := c.delegate.Paths() - if err != nil { - c.err = err - return - } - - result := make(map[string]openapi.GroupVersion, len(uncached)) - for k, v := range uncached { - result[k] = newGroupVersion(v) - } - c.result = result - }) - return c.result, c.err -} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/openapi/client.go b/cluster-autoscaler/vendor/k8s.io/client-go/openapi/client.go deleted file mode 100644 index 7b58762acfd5..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/client-go/openapi/client.go +++ /dev/null @@ -1,64 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package openapi - -import ( - "context" - "encoding/json" - - "k8s.io/client-go/rest" - "k8s.io/kube-openapi/pkg/handler3" -) - -type Client interface { - Paths() (map[string]GroupVersion, error) -} - -type client struct { - // URL includes the `hash` query param to take advantage of cache busting - restClient rest.Interface -} - -func NewClient(restClient rest.Interface) Client { - return &client{ - restClient: restClient, - } -} - -func (c *client) Paths() (map[string]GroupVersion, error) { - data, err := c.restClient.Get(). - AbsPath("/openapi/v3"). - Do(context.TODO()). - Raw() - - if err != nil { - return nil, err - } - - discoMap := &handler3.OpenAPIV3Discovery{} - err = json.Unmarshal(data, discoMap) - if err != nil { - return nil, err - } - - // Create GroupVersions for each element of the result - result := map[string]GroupVersion{} - for k, v := range discoMap.Paths { - result[k] = newGroupVersion(c, v) - } - return result, nil -} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/openapi/groupversion.go b/cluster-autoscaler/vendor/k8s.io/client-go/openapi/groupversion.go deleted file mode 100644 index 7c35833b483c..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/client-go/openapi/groupversion.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package openapi - -import ( - "context" - - openapi_v3 "github.com/google/gnostic/openapiv3" - "google.golang.org/protobuf/proto" - "k8s.io/kube-openapi/pkg/handler3" -) - -const openAPIV3mimePb = "application/com.github.proto-openapi.spec.v3@v1.0+protobuf" - -type GroupVersion interface { - Schema() (*openapi_v3.Document, error) -} - -type groupversion struct { - client *client - item handler3.OpenAPIV3DiscoveryGroupVersion -} - -func newGroupVersion(client *client, item handler3.OpenAPIV3DiscoveryGroupVersion) *groupversion { - return &groupversion{client: client, item: item} -} - -func (g *groupversion) Schema() (*openapi_v3.Document, error) { - data, err := g.client.restClient.Get(). - RequestURI(g.item.ServerRelativeURL). - SetHeader("Accept", openAPIV3mimePb). - Do(context.TODO()). - Raw() - - if err != nil { - return nil, err - } - - document := &openapi_v3.Document{} - if err := proto.Unmarshal(data, document); err != nil { - return nil, err - } - - return document, nil -} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/OWNERS b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/OWNERS index 4dfbb98aec85..e0ec62deb2bb 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/OWNERS @@ -2,7 +2,8 @@ # approval on api packages bubbles to api-approvers reviewers: - - sig-auth-authenticators-approvers - - sig-auth-authenticators-reviewers +- sig-auth-authenticators-approvers +- sig-auth-authenticators-reviewers labels: - - sig/auth +- sig/auth + diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/install/install.go b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/install/install.go index ee5c338e38aa..9040bb9a464a 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/install/install.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/install/install.go @@ -23,6 +23,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/pkg/apis/clientauthentication" "k8s.io/client-go/pkg/apis/clientauthentication/v1" + "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1" "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1" ) @@ -31,4 +32,5 @@ func Install(scheme *runtime.Scheme) { utilruntime.Must(clientauthentication.AddToScheme(scheme)) utilruntime.Must(v1.AddToScheme(scheme)) utilruntime.Must(v1beta1.AddToScheme(scheme)) + utilruntime.Must(v1alpha1.AddToScheme(scheme)) } diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/types.go b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/types.go index 1b6322da510d..8daaa3f8f734 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/types.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/types.go @@ -41,6 +41,11 @@ type ExecCredential struct { // ExecCredentialSpec holds request and runtime specific information provided by // the transport. type ExecCredentialSpec struct { + // Response is populated when the transport encounters HTTP status codes, such as 401, + // suggesting previous credentials were invalid. + // +optional + Response *Response + // Interactive is true when the transport detects the command is being called from an // interactive prompt, i.e., when stdin has been passed to this exec plugin. // +optional @@ -70,6 +75,15 @@ type ExecCredentialStatus struct { ClientKeyData string `datapolicy:"secret-key"` } +// Response defines metadata about a failed request, including HTTP status code and +// response headers. +type Response struct { + // Headers holds HTTP headers returned by the server. + Header map[string][]string + // Code is the HTTP status code returned by the server. + Code int32 +} + // Cluster contains information to allow an exec plugin to communicate // with the kubernetes cluster being authenticated to. // diff --git a/cluster-autoscaler/vendor/k8s.io/klog/v2/imports.go b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1/conversion.go similarity index 53% rename from cluster-autoscaler/vendor/k8s.io/klog/v2/imports.go rename to cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1/conversion.go index 602c3ed9e6d5..5c5f70d259c4 100644 --- a/cluster-autoscaler/vendor/k8s.io/klog/v2/imports.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1/conversion.go @@ -14,25 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -package klog +package v1 import ( - "github.com/go-logr/logr" + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/client-go/pkg/apis/clientauthentication" ) -// The reason for providing these aliases is to allow code to work with logr -// without directly importing it. - -// Logger in this package is exactly the same as logr.Logger. -type Logger = logr.Logger - -// LogSink in this package is exactly the same as logr.LogSink. -type LogSink = logr.LogSink - -// Runtimeinfo in this package is exactly the same as logr.RuntimeInfo. -type RuntimeInfo = logr.RuntimeInfo - -var ( - // New is an alias for logr.New. - New = logr.New -) +func Convert_clientauthentication_ExecCredentialSpec_To_v1_ExecCredentialSpec(in *clientauthentication.ExecCredentialSpec, out *ExecCredentialSpec, s conversion.Scope) error { + // This conversion intentionally omits the Response field, which were only + // supported in v1alpha1. + return autoConvert_clientauthentication_ExecCredentialSpec_To_v1_ExecCredentialSpec(in, out, s) +} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1/zz_generated.conversion.go b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1/zz_generated.conversion.go index 82fe94ca915f..277d9d93ee68 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1/zz_generated.conversion.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1/zz_generated.conversion.go @@ -62,11 +62,6 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*clientauthentication.ExecCredentialSpec)(nil), (*ExecCredentialSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_clientauthentication_ExecCredentialSpec_To_v1_ExecCredentialSpec(a.(*clientauthentication.ExecCredentialSpec), b.(*ExecCredentialSpec), scope) - }); err != nil { - return err - } if err := s.AddGeneratedConversionFunc((*ExecCredentialStatus)(nil), (*clientauthentication.ExecCredentialStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus(a.(*ExecCredentialStatus), b.(*clientauthentication.ExecCredentialStatus), scope) }); err != nil { @@ -77,6 +72,11 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddConversionFunc((*clientauthentication.ExecCredentialSpec)(nil), (*ExecCredentialSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientauthentication_ExecCredentialSpec_To_v1_ExecCredentialSpec(a.(*clientauthentication.ExecCredentialSpec), b.(*ExecCredentialSpec), scope) + }); err != nil { + return err + } return nil } @@ -160,6 +160,7 @@ func Convert_v1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec(in } func autoConvert_clientauthentication_ExecCredentialSpec_To_v1_ExecCredentialSpec(in *clientauthentication.ExecCredentialSpec, out *ExecCredentialSpec, s conversion.Scope) error { + // WARNING: in.Response requires manual conversion: does not exist in peer-type out.Interactive = in.Interactive if in.Cluster != nil { in, out := &in.Cluster, &out.Cluster @@ -173,11 +174,6 @@ func autoConvert_clientauthentication_ExecCredentialSpec_To_v1_ExecCredentialSpe return nil } -// Convert_clientauthentication_ExecCredentialSpec_To_v1_ExecCredentialSpec is an autogenerated conversion function. -func Convert_clientauthentication_ExecCredentialSpec_To_v1_ExecCredentialSpec(in *clientauthentication.ExecCredentialSpec, out *ExecCredentialSpec, s conversion.Scope) error { - return autoConvert_clientauthentication_ExecCredentialSpec_To_v1_ExecCredentialSpec(in, out, s) -} - func autoConvert_v1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus(in *ExecCredentialStatus, out *clientauthentication.ExecCredentialStatus, s conversion.Scope) error { out.ExpirationTimestamp = (*metav1.Time)(unsafe.Pointer(in.ExpirationTimestamp)) out.Token = in.Token diff --git a/cluster-autoscaler/vendor/k8s.io/cri-api/pkg/errors/errors.go b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/conversion.go similarity index 54% rename from cluster-autoscaler/vendor/k8s.io/cri-api/pkg/errors/errors.go rename to cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/conversion.go index 41d7b92466d8..572e049f81da 100644 --- a/cluster-autoscaler/vendor/k8s.io/cri-api/pkg/errors/errors.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/conversion.go @@ -14,25 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -package errors +package v1alpha1 import ( - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/client-go/pkg/apis/clientauthentication" ) -// IsNotFound returns a boolean indicating whether the error -// is grpc not found error. -// See https://github.com/grpc/grpc/blob/master/doc/statuscodes.md -// for a list of grpc status codes. -func IsNotFound(err error) bool { - s, ok := status.FromError(err) - if !ok { - return ok - } - if s.Code() == codes.NotFound { - return true - } - - return false +func Convert_clientauthentication_ExecCredentialSpec_To_v1alpha1_ExecCredentialSpec(in *clientauthentication.ExecCredentialSpec, out *ExecCredentialSpec, s conversion.Scope) error { + // This conversion intentionally omits the Cluster field which is only supported in newer versions. + return autoConvert_clientauthentication_ExecCredentialSpec_To_v1alpha1_ExecCredentialSpec(in, out, s) } diff --git a/cluster-autoscaler/vendor/k8s.io/kubelet/pkg/apis/credentialprovider/v1beta1/doc.go b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/doc.go similarity index 69% rename from cluster-autoscaler/vendor/k8s.io/kubelet/pkg/apis/credentialprovider/v1beta1/doc.go rename to cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/doc.go index df4f4bf150d7..19ab7761400f 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubelet/pkg/apis/credentialprovider/v1beta1/doc.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Kubernetes Authors. +Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -15,8 +15,10 @@ limitations under the License. */ // +k8s:deepcopy-gen=package -// +k8s:conversion-gen=k8s.io/kubelet/pkg/apis/credentialprovider +// +k8s:conversion-gen=k8s.io/client-go/pkg/apis/clientauthentication +// +k8s:openapi-gen=true // +k8s:defaulter-gen=TypeMeta -// +groupName=credentialprovider.kubelet.k8s.io -package v1beta1 // import "k8s.io/kubelet/pkg/apis/credentialprovider/v1beta1" +// +groupName=client.authentication.k8s.io + +package v1alpha1 // import "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1" diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/register.go b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/register.go new file mode 100644 index 000000000000..2acd13dead01 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/register.go @@ -0,0 +1,55 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the group name use in this package +const GroupName = "client.authentication.k8s.io" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder runtime.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + AddToScheme = localSchemeBuilder.AddToScheme +) + +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + localSchemeBuilder.Register(addKnownTypes) +} + +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &ExecCredential{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/types.go b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/types.go new file mode 100644 index 000000000000..1ff13c438256 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/types.go @@ -0,0 +1,78 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ExecCredential is used by exec-based plugins to communicate credentials to +// HTTP transports. +type ExecCredential struct { + metav1.TypeMeta `json:",inline"` + + // Spec holds information passed to the plugin by the transport. This contains + // request and runtime specific information, such as if the session is interactive. + Spec ExecCredentialSpec `json:"spec,omitempty"` + + // Status is filled in by the plugin and holds the credentials that the transport + // should use to contact the API. + // +optional + Status *ExecCredentialStatus `json:"status,omitempty"` +} + +// ExecCredentialSpec holds request and runtime specific information provided by +// the transport. +type ExecCredentialSpec struct { + // Response is populated when the transport encounters HTTP status codes, such as 401, + // suggesting previous credentials were invalid. + // +optional + Response *Response `json:"response,omitempty"` + + // Interactive is true when the transport detects the command is being called from an + // interactive prompt. + // +optional + Interactive bool `json:"interactive,omitempty"` +} + +// ExecCredentialStatus holds credentials for the transport to use. +// +// Token and ClientKeyData are sensitive fields. This data should only be +// transmitted in-memory between client and exec plugin process. Exec plugin +// itself should at least be protected via file permissions. +type ExecCredentialStatus struct { + // ExpirationTimestamp indicates a time when the provided credentials expire. + // +optional + ExpirationTimestamp *metav1.Time `json:"expirationTimestamp,omitempty"` + // Token is a bearer token used by the client for request authentication. + Token string `json:"token,omitempty" datapolicy:"token"` + // PEM-encoded client TLS certificates (including intermediates, if any). + ClientCertificateData string `json:"clientCertificateData,omitempty"` + // PEM-encoded private key for the above certificate. + ClientKeyData string `json:"clientKeyData,omitempty" datapolicy:"security-key"` +} + +// Response defines metadata about a failed request, including HTTP status code and +// response headers. +type Response struct { + // Header holds HTTP headers returned by the server. + Header map[string][]string `json:"header,omitempty"` + // Code is the HTTP status code returned by the server. + Code int32 `json:"code,omitempty"` +} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.conversion.go b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.conversion.go new file mode 100644 index 000000000000..fc59decef5e7 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,173 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + unsafe "unsafe" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + clientauthentication "k8s.io/client-go/pkg/apis/clientauthentication" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*ExecCredential)(nil), (*clientauthentication.ExecCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ExecCredential_To_clientauthentication_ExecCredential(a.(*ExecCredential), b.(*clientauthentication.ExecCredential), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientauthentication.ExecCredential)(nil), (*ExecCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientauthentication_ExecCredential_To_v1alpha1_ExecCredential(a.(*clientauthentication.ExecCredential), b.(*ExecCredential), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ExecCredentialSpec)(nil), (*clientauthentication.ExecCredentialSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec(a.(*ExecCredentialSpec), b.(*clientauthentication.ExecCredentialSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ExecCredentialStatus)(nil), (*clientauthentication.ExecCredentialStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus(a.(*ExecCredentialStatus), b.(*clientauthentication.ExecCredentialStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientauthentication.ExecCredentialStatus)(nil), (*ExecCredentialStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientauthentication_ExecCredentialStatus_To_v1alpha1_ExecCredentialStatus(a.(*clientauthentication.ExecCredentialStatus), b.(*ExecCredentialStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Response)(nil), (*clientauthentication.Response)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Response_To_clientauthentication_Response(a.(*Response), b.(*clientauthentication.Response), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientauthentication.Response)(nil), (*Response)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientauthentication_Response_To_v1alpha1_Response(a.(*clientauthentication.Response), b.(*Response), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*clientauthentication.ExecCredentialSpec)(nil), (*ExecCredentialSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientauthentication_ExecCredentialSpec_To_v1alpha1_ExecCredentialSpec(a.(*clientauthentication.ExecCredentialSpec), b.(*ExecCredentialSpec), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_ExecCredential_To_clientauthentication_ExecCredential(in *ExecCredential, out *clientauthentication.ExecCredential, s conversion.Scope) error { + if err := Convert_v1alpha1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + out.Status = (*clientauthentication.ExecCredentialStatus)(unsafe.Pointer(in.Status)) + return nil +} + +// Convert_v1alpha1_ExecCredential_To_clientauthentication_ExecCredential is an autogenerated conversion function. +func Convert_v1alpha1_ExecCredential_To_clientauthentication_ExecCredential(in *ExecCredential, out *clientauthentication.ExecCredential, s conversion.Scope) error { + return autoConvert_v1alpha1_ExecCredential_To_clientauthentication_ExecCredential(in, out, s) +} + +func autoConvert_clientauthentication_ExecCredential_To_v1alpha1_ExecCredential(in *clientauthentication.ExecCredential, out *ExecCredential, s conversion.Scope) error { + if err := Convert_clientauthentication_ExecCredentialSpec_To_v1alpha1_ExecCredentialSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + out.Status = (*ExecCredentialStatus)(unsafe.Pointer(in.Status)) + return nil +} + +// Convert_clientauthentication_ExecCredential_To_v1alpha1_ExecCredential is an autogenerated conversion function. +func Convert_clientauthentication_ExecCredential_To_v1alpha1_ExecCredential(in *clientauthentication.ExecCredential, out *ExecCredential, s conversion.Scope) error { + return autoConvert_clientauthentication_ExecCredential_To_v1alpha1_ExecCredential(in, out, s) +} + +func autoConvert_v1alpha1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec(in *ExecCredentialSpec, out *clientauthentication.ExecCredentialSpec, s conversion.Scope) error { + out.Response = (*clientauthentication.Response)(unsafe.Pointer(in.Response)) + out.Interactive = in.Interactive + return nil +} + +// Convert_v1alpha1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec is an autogenerated conversion function. +func Convert_v1alpha1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec(in *ExecCredentialSpec, out *clientauthentication.ExecCredentialSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec(in, out, s) +} + +func autoConvert_clientauthentication_ExecCredentialSpec_To_v1alpha1_ExecCredentialSpec(in *clientauthentication.ExecCredentialSpec, out *ExecCredentialSpec, s conversion.Scope) error { + out.Response = (*Response)(unsafe.Pointer(in.Response)) + out.Interactive = in.Interactive + // WARNING: in.Cluster requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1alpha1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus(in *ExecCredentialStatus, out *clientauthentication.ExecCredentialStatus, s conversion.Scope) error { + out.ExpirationTimestamp = (*v1.Time)(unsafe.Pointer(in.ExpirationTimestamp)) + out.Token = in.Token + out.ClientCertificateData = in.ClientCertificateData + out.ClientKeyData = in.ClientKeyData + return nil +} + +// Convert_v1alpha1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus is an autogenerated conversion function. +func Convert_v1alpha1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus(in *ExecCredentialStatus, out *clientauthentication.ExecCredentialStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus(in, out, s) +} + +func autoConvert_clientauthentication_ExecCredentialStatus_To_v1alpha1_ExecCredentialStatus(in *clientauthentication.ExecCredentialStatus, out *ExecCredentialStatus, s conversion.Scope) error { + out.ExpirationTimestamp = (*v1.Time)(unsafe.Pointer(in.ExpirationTimestamp)) + out.Token = in.Token + out.ClientCertificateData = in.ClientCertificateData + out.ClientKeyData = in.ClientKeyData + return nil +} + +// Convert_clientauthentication_ExecCredentialStatus_To_v1alpha1_ExecCredentialStatus is an autogenerated conversion function. +func Convert_clientauthentication_ExecCredentialStatus_To_v1alpha1_ExecCredentialStatus(in *clientauthentication.ExecCredentialStatus, out *ExecCredentialStatus, s conversion.Scope) error { + return autoConvert_clientauthentication_ExecCredentialStatus_To_v1alpha1_ExecCredentialStatus(in, out, s) +} + +func autoConvert_v1alpha1_Response_To_clientauthentication_Response(in *Response, out *clientauthentication.Response, s conversion.Scope) error { + out.Header = *(*map[string][]string)(unsafe.Pointer(&in.Header)) + out.Code = in.Code + return nil +} + +// Convert_v1alpha1_Response_To_clientauthentication_Response is an autogenerated conversion function. +func Convert_v1alpha1_Response_To_clientauthentication_Response(in *Response, out *clientauthentication.Response, s conversion.Scope) error { + return autoConvert_v1alpha1_Response_To_clientauthentication_Response(in, out, s) +} + +func autoConvert_clientauthentication_Response_To_v1alpha1_Response(in *clientauthentication.Response, out *Response, s conversion.Scope) error { + out.Header = *(*map[string][]string)(unsafe.Pointer(&in.Header)) + out.Code = in.Code + return nil +} + +// Convert_clientauthentication_Response_To_v1alpha1_Response is an autogenerated conversion function. +func Convert_clientauthentication_Response_To_v1alpha1_Response(in *clientauthentication.Response, out *Response, s conversion.Scope) error { + return autoConvert_clientauthentication_Response_To_v1alpha1_Response(in, out, s) +} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.deepcopy.go b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 000000000000..ce614c0b8795 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,129 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecCredential) DeepCopyInto(out *ExecCredential) { + *out = *in + out.TypeMeta = in.TypeMeta + in.Spec.DeepCopyInto(&out.Spec) + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(ExecCredentialStatus) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCredential. +func (in *ExecCredential) DeepCopy() *ExecCredential { + if in == nil { + return nil + } + out := new(ExecCredential) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ExecCredential) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecCredentialSpec) DeepCopyInto(out *ExecCredentialSpec) { + *out = *in + if in.Response != nil { + in, out := &in.Response, &out.Response + *out = new(Response) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCredentialSpec. +func (in *ExecCredentialSpec) DeepCopy() *ExecCredentialSpec { + if in == nil { + return nil + } + out := new(ExecCredentialSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecCredentialStatus) DeepCopyInto(out *ExecCredentialStatus) { + *out = *in + if in.ExpirationTimestamp != nil { + in, out := &in.ExpirationTimestamp, &out.ExpirationTimestamp + *out = (*in).DeepCopy() + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCredentialStatus. +func (in *ExecCredentialStatus) DeepCopy() *ExecCredentialStatus { + if in == nil { + return nil + } + out := new(ExecCredentialStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Response) DeepCopyInto(out *Response) { + *out = *in + if in.Header != nil { + in, out := &in.Header, &out.Header + *out = make(map[string][]string, len(*in)) + for key, val := range *in { + var outVal []string + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = make([]string, len(*in)) + copy(*out, *in) + } + (*out)[key] = outVal + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Response. +func (in *Response) DeepCopy() *Response { + if in == nil { + return nil + } + out := new(Response) + in.DeepCopyInto(out) + return out +} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.defaults.go b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.defaults.go new file mode 100644 index 000000000000..5070cb91b90f --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.defaults.go @@ -0,0 +1,33 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/conversion.go b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/conversion.go new file mode 100644 index 000000000000..6741114dd8d0 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/conversion.go @@ -0,0 +1,28 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/client-go/pkg/apis/clientauthentication" +) + +func Convert_clientauthentication_ExecCredentialSpec_To_v1beta1_ExecCredentialSpec(in *clientauthentication.ExecCredentialSpec, out *ExecCredentialSpec, s conversion.Scope) error { + // This conversion intentionally omits the Response field, which were only + // supported in v1alpha1. + return autoConvert_clientauthentication_ExecCredentialSpec_To_v1beta1_ExecCredentialSpec(in, out, s) +} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/zz_generated.conversion.go b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/zz_generated.conversion.go index 8c4d43fea5e3..c82993897d04 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/zz_generated.conversion.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/zz_generated.conversion.go @@ -62,11 +62,6 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*clientauthentication.ExecCredentialSpec)(nil), (*ExecCredentialSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_clientauthentication_ExecCredentialSpec_To_v1beta1_ExecCredentialSpec(a.(*clientauthentication.ExecCredentialSpec), b.(*ExecCredentialSpec), scope) - }); err != nil { - return err - } if err := s.AddGeneratedConversionFunc((*ExecCredentialStatus)(nil), (*clientauthentication.ExecCredentialStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus(a.(*ExecCredentialStatus), b.(*clientauthentication.ExecCredentialStatus), scope) }); err != nil { @@ -77,6 +72,11 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddConversionFunc((*clientauthentication.ExecCredentialSpec)(nil), (*ExecCredentialSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientauthentication_ExecCredentialSpec_To_v1beta1_ExecCredentialSpec(a.(*clientauthentication.ExecCredentialSpec), b.(*ExecCredentialSpec), scope) + }); err != nil { + return err + } return nil } @@ -160,6 +160,7 @@ func Convert_v1beta1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSp } func autoConvert_clientauthentication_ExecCredentialSpec_To_v1beta1_ExecCredentialSpec(in *clientauthentication.ExecCredentialSpec, out *ExecCredentialSpec, s conversion.Scope) error { + // WARNING: in.Response requires manual conversion: does not exist in peer-type out.Interactive = in.Interactive if in.Cluster != nil { in, out := &in.Cluster, &out.Cluster @@ -173,11 +174,6 @@ func autoConvert_clientauthentication_ExecCredentialSpec_To_v1beta1_ExecCredenti return nil } -// Convert_clientauthentication_ExecCredentialSpec_To_v1beta1_ExecCredentialSpec is an autogenerated conversion function. -func Convert_clientauthentication_ExecCredentialSpec_To_v1beta1_ExecCredentialSpec(in *clientauthentication.ExecCredentialSpec, out *ExecCredentialSpec, s conversion.Scope) error { - return autoConvert_clientauthentication_ExecCredentialSpec_To_v1beta1_ExecCredentialSpec(in, out, s) -} - func autoConvert_v1beta1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus(in *ExecCredentialStatus, out *clientauthentication.ExecCredentialStatus, s conversion.Scope) error { out.ExpirationTimestamp = (*v1.Time)(unsafe.Pointer(in.ExpirationTimestamp)) out.Token = in.Token diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/zz_generated.deepcopy.go b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/zz_generated.deepcopy.go index 244d54ce3f2a..3103629f6173 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/zz_generated.deepcopy.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/apis/clientauthentication/zz_generated.deepcopy.go @@ -83,6 +83,11 @@ func (in *ExecCredential) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ExecCredentialSpec) DeepCopyInto(out *ExecCredentialSpec) { *out = *in + if in.Response != nil { + in, out := &in.Response, &out.Response + *out = new(Response) + (*in).DeepCopyInto(*out) + } if in.Cluster != nil { in, out := &in.Cluster, &out.Cluster *out = new(Cluster) @@ -120,3 +125,34 @@ func (in *ExecCredentialStatus) DeepCopy() *ExecCredentialStatus { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Response) DeepCopyInto(out *Response) { + *out = *in + if in.Header != nil { + in, out := &in.Header, &out.Header + *out = make(map[string][]string, len(*in)) + for key, val := range *in { + var outVal []string + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = make([]string, len(*in)) + copy(*out, *in) + } + (*out)[key] = outVal + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Response. +func (in *Response) DeepCopy() *Response { + if in == nil { + return nil + } + out := new(Response) + in.DeepCopyInto(out) + return out +} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/pkg/version/.gitattributes b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/version/.gitattributes new file mode 100644 index 000000000000..7e349eff60bd --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/client-go/pkg/version/.gitattributes @@ -0,0 +1 @@ +base.go export-subst diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go b/cluster-autoscaler/vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go index d37dfbf732a3..e405e3dc1290 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go @@ -42,6 +42,7 @@ import ( "k8s.io/client-go/pkg/apis/clientauthentication" "k8s.io/client-go/pkg/apis/clientauthentication/install" clientauthenticationv1 "k8s.io/client-go/pkg/apis/clientauthentication/v1" + clientauthenticationv1alpha1 "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1" clientauthenticationv1beta1 "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1" "k8s.io/client-go/tools/clientcmd/api" "k8s.io/client-go/tools/metrics" @@ -72,8 +73,9 @@ var ( globalCache = newCache() // The list of API versions we accept. apiVersions = map[string]schema.GroupVersion{ - clientauthenticationv1beta1.SchemeGroupVersion.String(): clientauthenticationv1beta1.SchemeGroupVersion, - clientauthenticationv1.SchemeGroupVersion.String(): clientauthenticationv1.SchemeGroupVersion, + clientauthenticationv1alpha1.SchemeGroupVersion.String(): clientauthenticationv1alpha1.SchemeGroupVersion, + clientauthenticationv1beta1.SchemeGroupVersion.String(): clientauthenticationv1beta1.SchemeGroupVersion, + clientauthenticationv1.SchemeGroupVersion.String(): clientauthenticationv1.SchemeGroupVersion, } ) @@ -288,8 +290,8 @@ func (a *Authenticator) UpdateTransportConfig(c *transport.Config) error { // also configured to allow client certificates for authentication. For requests // like "kubectl get --token (token) pods" we should assume the intention is to // use the provided token for authentication. The same can be said for when the - // user specifies basic auth or cert auth. - if c.HasTokenAuth() || c.HasBasicAuth() || c.HasCertAuth() { + // user specifies basic auth. + if c.HasTokenAuth() || c.HasBasicAuth() { return nil } @@ -297,7 +299,7 @@ func (a *Authenticator) UpdateTransportConfig(c *transport.Config) error { return &roundTripper{a, rt} }) - if c.HasCertCallback() { + if c.TLS.GetCert != nil { return errors.New("can't add TLS certificate callback: transport.Config.TLS.GetCert already set") } c.TLS.GetCert = a.cert @@ -346,7 +348,11 @@ func (r *roundTripper) RoundTrip(req *http.Request) (*http.Response, error) { return nil, err } if res.StatusCode == http.StatusUnauthorized { - if err := r.a.maybeRefreshCreds(creds); err != nil { + resp := &clientauthentication.Response{ + Header: res.Header, + Code: int32(res.StatusCode), + } + if err := r.a.maybeRefreshCreds(creds, resp); err != nil { klog.Errorf("refreshing credentials: %v", err) } } @@ -376,7 +382,7 @@ func (a *Authenticator) getCreds() (*credentials, error) { return a.cachedCreds, nil } - if err := a.refreshCredsLocked(); err != nil { + if err := a.refreshCredsLocked(nil); err != nil { return nil, err } @@ -385,7 +391,7 @@ func (a *Authenticator) getCreds() (*credentials, error) { // maybeRefreshCreds executes the plugin to force a rotation of the // credentials, unless they were rotated already. -func (a *Authenticator) maybeRefreshCreds(creds *credentials) error { +func (a *Authenticator) maybeRefreshCreds(creds *credentials, r *clientauthentication.Response) error { a.mu.Lock() defer a.mu.Unlock() @@ -396,12 +402,12 @@ func (a *Authenticator) maybeRefreshCreds(creds *credentials) error { return nil } - return a.refreshCredsLocked() + return a.refreshCredsLocked(r) } // refreshCredsLocked executes the plugin and reads the credentials from // stdout. It must be called while holding the Authenticator's mutex. -func (a *Authenticator) refreshCredsLocked() error { +func (a *Authenticator) refreshCredsLocked(r *clientauthentication.Response) error { interactive, err := a.interactiveFunc() if err != nil { return fmt.Errorf("exec plugin cannot support interactive mode: %w", err) @@ -409,6 +415,7 @@ func (a *Authenticator) refreshCredsLocked() error { cred := &clientauthentication.ExecCredential{ Spec: clientauthentication.ExecCredentialSpec{ + Response: r, Interactive: interactive, }, } diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/rest/OWNERS b/cluster-autoscaler/vendor/k8s.io/client-go/rest/OWNERS index 7b23294c45e5..597484b4a4df 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/rest/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/client-go/rest/OWNERS @@ -1,14 +1,22 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - thockin - - smarterclayton - - caesarxuchao - - wojtek-t - - deads2k - - liggitt - - sttts - - luxas - - dims - - cjcullen - - lojies +- thockin +- smarterclayton +- caesarxuchao +- wojtek-t +- deads2k +- brendandburns +- liggitt +- sttts +- luxas +- dims +- errordeveloper +- hongchaodeng +- krousey +- resouer +- cjcullen +- rmmh +- asalkeld +- juanvallejo +- lojies diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/rest/request.go b/cluster-autoscaler/vendor/k8s.io/client-go/rest/request.go index 3a1560df0dc9..5cc9900b04a6 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/rest/request.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/rest/request.go @@ -82,12 +82,6 @@ func (r *RequestConstructionError) Error() string { var noBackoff = &NoBackoff{} -type requestRetryFunc func(maxRetries int) WithRetry - -func defaultRequestRetryFn(maxRetries int) WithRetry { - return &withRetry{maxRetries: maxRetries} -} - // Request allows for building up a request to a server in a chained fashion. // Any errors are stored until the end of your call, so you only have to // check once. @@ -99,7 +93,6 @@ type Request struct { rateLimiter flowcontrol.RateLimiter backoff BackoffManager timeout time.Duration - maxRetries int // generic components accessible via method setters verb string @@ -116,10 +109,9 @@ type Request struct { subresource string // output - err error - body io.Reader - - retryFn requestRetryFunc + err error + body io.Reader + retry WithRetry } // NewRequest creates a new request helper object for accessing runtime.Objects on a server. @@ -150,8 +142,7 @@ func NewRequest(c *RESTClient) *Request { backoff: backoff, timeout: timeout, pathPrefix: pathPrefix, - maxRetries: 10, - retryFn: defaultRequestRetryFn, + retry: &withRetry{maxRetries: 10}, warningHandler: c.warningHandler, } @@ -417,10 +408,7 @@ func (r *Request) Timeout(d time.Duration) *Request { // function is specifically called with a different value. // A zero maxRetries prevent it from doing retires and return an error immediately. func (r *Request) MaxRetries(maxRetries int) *Request { - if maxRetries < 0 { - maxRetries = 0 - } - r.maxRetries = maxRetries + r.retry.SetMaxRetries(maxRetries) return r } @@ -508,6 +496,84 @@ func (r *Request) URL() *url.URL { return finalURL } +// finalURLTemplate is similar to URL(), but will make all specific parameter values equal +// - instead of name or namespace, "{name}" and "{namespace}" will be used, and all query +// parameters will be reset. This creates a copy of the url so as not to change the +// underlying object. +func (r Request) finalURLTemplate() url.URL { + newParams := url.Values{} + v := []string{"{value}"} + for k := range r.params { + newParams[k] = v + } + r.params = newParams + url := r.URL() + + segments := strings.Split(url.Path, "/") + groupIndex := 0 + index := 0 + trimmedBasePath := "" + if url != nil && r.c.base != nil && strings.Contains(url.Path, r.c.base.Path) { + p := strings.TrimPrefix(url.Path, r.c.base.Path) + if !strings.HasPrefix(p, "/") { + p = "/" + p + } + // store the base path that we have trimmed so we can append it + // before returning the URL + trimmedBasePath = r.c.base.Path + segments = strings.Split(p, "/") + groupIndex = 1 + } + if len(segments) <= 2 { + return *url + } + + const CoreGroupPrefix = "api" + const NamedGroupPrefix = "apis" + isCoreGroup := segments[groupIndex] == CoreGroupPrefix + isNamedGroup := segments[groupIndex] == NamedGroupPrefix + if isCoreGroup { + // checking the case of core group with /api/v1/... format + index = groupIndex + 2 + } else if isNamedGroup { + // checking the case of named group with /apis/apps/v1/... format + index = groupIndex + 3 + } else { + // this should not happen that the only two possibilities are /api... and /apis..., just want to put an + // outlet here in case more API groups are added in future if ever possible: + // https://kubernetes.io/docs/concepts/overview/kubernetes-api/#api-groups + // if a wrong API groups name is encountered, return the {prefix} for url.Path + url.Path = "/{prefix}" + url.RawQuery = "" + return *url + } + //switch segLength := len(segments) - index; segLength { + switch { + // case len(segments) - index == 1: + // resource (with no name) do nothing + case len(segments)-index == 2: + // /$RESOURCE/$NAME: replace $NAME with {name} + segments[index+1] = "{name}" + case len(segments)-index == 3: + if segments[index+2] == "finalize" || segments[index+2] == "status" { + // /$RESOURCE/$NAME/$SUBRESOURCE: replace $NAME with {name} + segments[index+1] = "{name}" + } else { + // /namespace/$NAMESPACE/$RESOURCE: replace $NAMESPACE with {namespace} + segments[index+1] = "{namespace}" + } + case len(segments)-index >= 4: + segments[index+1] = "{namespace}" + // /namespace/$NAMESPACE/$RESOURCE/$NAME: replace $NAMESPACE with {namespace}, $NAME with {name} + if segments[index+3] != "finalize" && segments[index+3] != "status" { + // /$RESOURCE/$NAME/$SUBRESOURCE: replace $NAME with {name} + segments[index+3] = "{name}" + } + } + url.Path = path.Join(trimmedBasePath, path.Join(segments...)) + return *url +} + func (r *Request) tryThrottleWithInfo(ctx context.Context, retryInfo string) error { if r.rateLimiter == nil { return nil @@ -516,9 +582,7 @@ func (r *Request) tryThrottleWithInfo(ctx context.Context, retryInfo string) err now := time.Now() err := r.rateLimiter.Wait(ctx) - if err != nil { - err = fmt.Errorf("client rate limiter Wait returned an error: %w", err) - } + latency := time.Since(now) var message string @@ -537,7 +601,7 @@ func (r *Request) tryThrottleWithInfo(ctx context.Context, retryInfo string) err // but we use a throttled logger to prevent spamming. globalThrottledLogger.Infof("%s", message) } - metrics.RateLimiterLatency.Observe(ctx, r.verb, *r.URL(), latency) + metrics.RateLimiterLatency.Observe(ctx, r.verb, r.finalURLTemplate(), latency) return err } @@ -624,21 +688,34 @@ func (r *Request) Watch(ctx context.Context) (watch.Interface, error) { } return false } - retry := r.retryFn(r.maxRetries) + var retryAfter *RetryAfter url := r.URL().String() for { - if err := retry.Before(ctx, r); err != nil { - return nil, retry.WrapPreviousError(err) - } - req, err := r.newHTTPRequest(ctx) if err != nil { return nil, err } + r.backoff.Sleep(r.backoff.CalculateBackoff(r.URL())) + if retryAfter != nil { + // We are retrying the request that we already send to apiserver + // at least once before. + // This request should also be throttled with the client-internal rate limiter. + if err := r.tryThrottleWithInfo(ctx, retryAfter.Reason); err != nil { + return nil, err + } + retryAfter = nil + } + resp, err := client.Do(req) updateURLMetrics(ctx, r, resp, err) - retry.After(ctx, r, resp, err) + if r.c.base != nil { + if err != nil { + r.backoff.UpdateBackoff(r.c.base, err, 0) + } else { + r.backoff.UpdateBackoff(r.c.base, err, resp.StatusCode) + } + } if err == nil && resp.StatusCode == http.StatusOK { return r.newStreamWatcher(resp) } @@ -646,8 +723,14 @@ func (r *Request) Watch(ctx context.Context) (watch.Interface, error) { done, transformErr := func() (bool, error) { defer readAndCloseResponseBody(resp) - if retry.IsNextRetry(ctx, r, req, resp, err, isErrRetryableFunc) { - return false, nil + var retry bool + retryAfter, retry = r.retry.NextRetry(req, resp, err, isErrRetryableFunc) + if retry { + err := r.retry.BeforeNextRetry(ctx, r.backoff, retryAfter, url, r.body) + if err == nil { + return false, nil + } + klog.V(4).Infof("Could not retry request - %v", err) } if resp == nil { @@ -668,7 +751,7 @@ func (r *Request) Watch(ctx context.Context) (watch.Interface, error) { // we need to return the error object from that. err = transformErr } - return nil, retry.WrapPreviousError(err) + return nil, err } } } @@ -733,13 +816,9 @@ func (r *Request) Stream(ctx context.Context) (io.ReadCloser, error) { client = http.DefaultClient } - retry := r.retryFn(r.maxRetries) + var retryAfter *RetryAfter url := r.URL().String() for { - if err := retry.Before(ctx, r); err != nil { - return nil, err - } - req, err := r.newHTTPRequest(ctx) if err != nil { return nil, err @@ -747,9 +826,27 @@ func (r *Request) Stream(ctx context.Context) (io.ReadCloser, error) { if r.body != nil { req.Body = ioutil.NopCloser(r.body) } + + r.backoff.Sleep(r.backoff.CalculateBackoff(r.URL())) + if retryAfter != nil { + // We are retrying the request that we already send to apiserver + // at least once before. + // This request should also be throttled with the client-internal rate limiter. + if err := r.tryThrottleWithInfo(ctx, retryAfter.Reason); err != nil { + return nil, err + } + retryAfter = nil + } + resp, err := client.Do(req) updateURLMetrics(ctx, r, resp, err) - retry.After(ctx, r, resp, err) + if r.c.base != nil { + if err != nil { + r.backoff.UpdateBackoff(r.URL(), err, 0) + } else { + r.backoff.UpdateBackoff(r.URL(), err, resp.StatusCode) + } + } if err != nil { // we only retry on an HTTP response with 'Retry-After' header return nil, err @@ -764,8 +861,14 @@ func (r *Request) Stream(ctx context.Context) (io.ReadCloser, error) { done, transformErr := func() (bool, error) { defer resp.Body.Close() - if retry.IsNextRetry(ctx, r, req, resp, err, neverRetryError) { - return false, nil + var retry bool + retryAfter, retry = r.retry.NextRetry(req, resp, err, neverRetryError) + if retry { + err := r.retry.BeforeNextRetry(ctx, r.backoff, retryAfter, url, r.body) + if err == nil { + return false, nil + } + klog.V(4).Infof("Could not retry request - %v", err) } result := r.transformResponse(resp, req) if err := result.Error(); err != nil { @@ -826,7 +929,7 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp //Metrics for total request latency start := time.Now() defer func() { - metrics.RequestLatency.Observe(ctx, r.verb, *r.URL(), time.Since(start)) + metrics.RequestLatency.Observe(ctx, r.verb, r.finalURLTemplate(), time.Since(start)) }() if r.err != nil { @@ -856,38 +959,31 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp defer cancel() } - isErrRetryableFunc := func(req *http.Request, err error) bool { - // "Connection reset by peer" or "apiserver is shutting down" are usually a transient errors. - // Thus in case of "GET" operations, we simply retry it. - // We are not automatically retrying "write" operations, as they are not idempotent. - if req.Method != "GET" { - return false - } - // For connection errors and apiserver shutdown errors retry. - if net.IsConnectionReset(err) || net.IsProbableEOF(err) { - return true - } - return false - } - // Right now we make about ten retry attempts if we get a Retry-After response. - retry := r.retryFn(r.maxRetries) + var retryAfter *RetryAfter for { - if err := retry.Before(ctx, r); err != nil { - return retry.WrapPreviousError(err) - } req, err := r.newHTTPRequest(ctx) if err != nil { return err } + + r.backoff.Sleep(r.backoff.CalculateBackoff(r.URL())) + if retryAfter != nil { + // We are retrying the request that we already send to apiserver + // at least once before. + // This request should also be throttled with the client-internal rate limiter. + if err := r.tryThrottleWithInfo(ctx, retryAfter.Reason); err != nil { + return err + } + retryAfter = nil + } resp, err := client.Do(req) updateURLMetrics(ctx, r, resp, err) - // The value -1 or a value of 0 with a non-nil Body indicates that the length is unknown. - // https://pkg.go.dev/net/http#Request - if req.ContentLength >= 0 && !(req.Body != nil && req.ContentLength == 0) { - metrics.RequestSize.Observe(ctx, r.verb, r.URL().Host, float64(req.ContentLength)) + if err != nil { + r.backoff.UpdateBackoff(r.URL(), err, 0) + } else { + r.backoff.UpdateBackoff(r.URL(), err, resp.StatusCode) } - retry.After(ctx, r, resp, err) done := func() bool { defer readAndCloseResponseBody(resp) @@ -900,15 +996,33 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp fn(req, resp) } - if retry.IsNextRetry(ctx, r, req, resp, err, isErrRetryableFunc) { + var retry bool + retryAfter, retry = r.retry.NextRetry(req, resp, err, func(req *http.Request, err error) bool { + // "Connection reset by peer" or "apiserver is shutting down" are usually a transient errors. + // Thus in case of "GET" operations, we simply retry it. + // We are not automatically retrying "write" operations, as they are not idempotent. + if r.verb != "GET" { + return false + } + // For connection errors and apiserver shutdown errors retry. + if net.IsConnectionReset(err) || net.IsProbableEOF(err) { + return true + } return false + }) + if retry { + err := r.retry.BeforeNextRetry(ctx, r.backoff, retryAfter, req.URL.String(), r.body) + if err == nil { + return false + } + klog.V(4).Infof("Could not retry request - %v", err) } f(req, resp) return true }() if done { - return retry.WrapPreviousError(err) + return err } } } @@ -927,9 +1041,6 @@ func (r *Request) Do(ctx context.Context) Result { if err != nil { return Result{err: err} } - if result.err == nil || len(result.body) > 0 { - metrics.ResponseSize.Observe(ctx, r.verb, r.URL().Host, float64(len(result.body))) - } return result } @@ -946,9 +1057,6 @@ func (r *Request) DoRaw(ctx context.Context) ([]byte, error) { if err != nil { return nil, err } - if result.err == nil || len(result.body) > 0 { - metrics.ResponseSize.Observe(ctx, r.verb, r.URL().Host, float64(len(result.body))) - } return result.body, result.err } @@ -1064,13 +1172,13 @@ func truncateBody(body string) string { // allocating a new string for the body output unless necessary. Uses a simple heuristic to determine // whether the body is printable. func glogBody(prefix string, body []byte) { - if klogV := klog.V(8); klogV.Enabled() { + if klog.V(8).Enabled() { if bytes.IndexFunc(body, func(r rune) bool { return r < 0x0a }) != -1 { - klogV.Infof("%s:\n%s", prefix, truncateBody(hex.Dump(body))) + klog.Infof("%s:\n%s", prefix, truncateBody(hex.Dump(body))) } else { - klogV.Infof("%s: %s", prefix, truncateBody(string(body))) + klog.Infof("%s: %s", prefix, truncateBody(string(body))) } } } diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/rest/with_retry.go b/cluster-autoscaler/vendor/k8s.io/client-go/rest/with_retry.go index 497d2608f88d..1b7360b53490 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/rest/with_retry.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/rest/with_retry.go @@ -22,7 +22,6 @@ import ( "io" "io/ioutil" "net/http" - "net/url" "time" "k8s.io/klog/v2" @@ -52,52 +51,42 @@ var neverRetryError = IsRetryableErrorFunc(func(_ *http.Request, _ error) bool { // Note that WithRetry is not safe for concurrent use by multiple // goroutines without additional locking or coordination. type WithRetry interface { - // IsNextRetry advances the retry counter appropriately - // and returns true if the request should be retried, - // otherwise it returns false, if: + // SetMaxRetries makes the request use the specified integer as a ceiling + // for retries upon receiving a 429 status code and the "Retry-After" header + // in the response. + // A zero maxRetries should prevent from doing any retry and return immediately. + SetMaxRetries(maxRetries int) + + // NextRetry advances the retry counter appropriately and returns true if the + // request should be retried, otherwise it returns false if: // - we have already reached the maximum retry threshold. // - the error does not fall into the retryable category. // - the server has not sent us a 429, or 5xx status code and the // 'Retry-After' response header is not set with a value. - // - we need to seek to the beginning of the request body before we - // initiate the next retry, the function should log an error and - // return false if it fails to do so. // - // restReq: the associated rest.Request - // httpReq: the HTTP Request sent to the server + // if retry is set to true, retryAfter will contain the information + // regarding the next retry. + // + // request: the original request sent to the server // resp: the response sent from the server, it is set if err is nil // err: the server sent this error to us, if err is set then resp is nil. // f: a IsRetryableErrorFunc function provided by the client that determines // if the err sent by the server is retryable. - IsNextRetry(ctx context.Context, restReq *Request, httpReq *http.Request, resp *http.Response, err error, f IsRetryableErrorFunc) bool - - // Before should be invoked prior to each attempt, including - // the first one. If an error is returned, the request should - // be aborted immediately. + NextRetry(req *http.Request, resp *http.Response, err error, f IsRetryableErrorFunc) (*RetryAfter, bool) + + // BeforeNextRetry is responsible for carrying out operations that need + // to be completed before the next retry is initiated: + // - if the request context is already canceled there is no need to + // retry, the function will return ctx.Err(). + // - we need to seek to the beginning of the request body before we + // initiate the next retry, the function should return an error if + // it fails to do so. + // - we should wait the number of seconds the server has asked us to + // in the 'Retry-After' response header. // - // Before may also be additionally responsible for preparing - // the request for the next retry, namely in terms of resetting - // the request body in case it has been read. - Before(ctx context.Context, r *Request) error - - // After should be invoked immediately after an attempt is made. - After(ctx context.Context, r *Request, resp *http.Response, err error) - - // WrapPreviousError wraps the error from any previous attempt into - // the final error specified in 'finalErr', so the user has more - // context why the request failed. - // For example, if a request times out after multiple retries then - // we see a generic context.Canceled or context.DeadlineExceeded - // error which is not very useful in debugging. This function can - // wrap any error from previous attempt(s) to provide more context to - // the user. The error returned in 'err' must satisfy the - // following conditions: - // a: errors.Unwrap(err) = errors.Unwrap(finalErr) if finalErr - // implements Unwrap - // b: errors.Unwrap(err) = finalErr if finalErr does not - // implements Unwrap - // c: errors.Is(err, otherErr) = errors.Is(finalErr, otherErr) - WrapPreviousError(finalErr error) (err error) + // If BeforeNextRetry returns an error the client should abort the retry, + // otherwise it is safe to initiate the next retry. + BeforeNextRetry(ctx context.Context, backoff BackoffManager, retryAfter *RetryAfter, url string, body io.Reader) error } // RetryAfter holds information associated with the next retry. @@ -118,58 +107,37 @@ type RetryAfter struct { type withRetry struct { maxRetries int attempts int - - // retry after parameters that pertain to the attempt that is to - // be made soon, so as to enable 'Before' and 'After' to refer - // to the retry parameters. - // - for the first attempt, it will always be nil - // - for consecutive attempts, it is non nil and holds the - // retry after parameters for the next attempt to be made. - retryAfter *RetryAfter - - // we keep track of two most recent errors, if the most - // recent attempt is labeled as 'N' then: - // - currentErr represents the error returned by attempt N, it - // can be nil if attempt N did not return an error. - // - previousErr represents an error from an attempt 'M' which - // precedes attempt 'N' (N - M >= 1), it is non nil only when: - // - for a sequence of attempt(s) 1..n (n>1), there - // is an attempt k (k r.maxRetries { - return false + return retryAfter, false } // if the server returned an error, it takes precedence over the http response. var errIsRetryable bool - if f != nil && err != nil && f.IsErrorRetryable(httpReq, err) { + if f != nil && err != nil && f.IsErrorRetryable(req, err) { errIsRetryable = true // we have a retryable error, for which we will create an // artificial "Retry-After" response. resp = retryAfterResponse() } if err != nil && !errIsRetryable { - return false + return retryAfter, false } // if we are here, we have either a or b: @@ -179,126 +147,34 @@ func (r *withRetry) IsNextRetry(ctx context.Context, restReq *Request, httpReq * // need to check if it is retryable seconds, wait := checkWait(resp) if !wait { - return false + return retryAfter, false } - r.retryAfter.Wait = time.Duration(seconds) * time.Second - r.retryAfter.Reason = getRetryReason(r.attempts, seconds, resp, err) - - return true + retryAfter.Wait = time.Duration(seconds) * time.Second + retryAfter.Reason = getRetryReason(r.attempts, seconds, resp, err) + return retryAfter, true } -func (r *withRetry) Before(ctx context.Context, request *Request) error { - // If the request context is already canceled there - // is no need to retry. +func (r *withRetry) BeforeNextRetry(ctx context.Context, backoff BackoffManager, retryAfter *RetryAfter, url string, body io.Reader) error { + // Ensure the response body is fully read and closed before + // we reconnect, so that we reuse the same TCP connection. if ctx.Err() != nil { - r.trackPreviousError(ctx.Err()) return ctx.Err() } - url := request.URL() - // r.retryAfter represents the retry after parameters calculated - // from the (response, err) tuple from the last attempt, so 'Before' - // can apply these retry after parameters prior to the next attempt. - // 'r.retryAfter == nil' indicates that this is the very first attempt. - if r.retryAfter == nil { - // we do a backoff sleep before the first attempt is made, - // (preserving current behavior). - request.backoff.Sleep(request.backoff.CalculateBackoff(url)) - return nil - } - - // At this point we've made atleast one attempt, post which the response - // body should have been fully read and closed in order for it to be safe - // to reset the request body before we reconnect, in order for us to reuse - // the same TCP connection. - if seeker, ok := request.body.(io.Seeker); ok && request.body != nil { - if _, err := seeker.Seek(0, io.SeekStart); err != nil { - err = fmt.Errorf("failed to reset the request body while retrying a request: %v", err) - r.trackPreviousError(err) - return err + if seeker, ok := body.(io.Seeker); ok && body != nil { + if _, err := seeker.Seek(0, 0); err != nil { + return fmt.Errorf("can't Seek() back to beginning of body for %T", r) } } - // if we are here, we have made attempt(s) al least once before. - if request.backoff != nil { - // TODO(tkashem) with default set to use exponential backoff - // we can merge these two sleeps: - // BackOffManager.Sleep(max(backoffManager.CalculateBackoff(), retryAfter)) - // see https://github.com/kubernetes/kubernetes/issues/108302 - request.backoff.Sleep(r.retryAfter.Wait) - request.backoff.Sleep(request.backoff.CalculateBackoff(url)) + klog.V(4).Infof("Got a Retry-After %s response for attempt %d to %v", retryAfter.Wait, retryAfter.Attempt, url) + if backoff != nil { + backoff.Sleep(retryAfter.Wait) } - - // We are retrying the request that we already send to - // apiserver at least once before. This request should - // also be throttled with the client-internal rate limiter. - if err := request.tryThrottleWithInfo(ctx, r.retryAfter.Reason); err != nil { - r.trackPreviousError(ctx.Err()) - return err - } - - klog.V(4).Infof("Got a Retry-After %s response for attempt %d to %v", r.retryAfter.Wait, r.retryAfter.Attempt, request.URL().String()) return nil } -func (r *withRetry) After(ctx context.Context, request *Request, resp *http.Response, err error) { - // 'After' is invoked immediately after an attempt is made, let's label - // the attempt we have just made as attempt 'N'. - // the current value of r.retryAfter represents the retry after - // parameters calculated from the (response, err) tuple from - // attempt N-1, so r.retryAfter is outdated and should not be - // referred to here. - r.retryAfter = nil - - if request.c.base != nil { - if err != nil { - request.backoff.UpdateBackoff(request.URL(), err, 0) - } else { - request.backoff.UpdateBackoff(request.URL(), err, resp.StatusCode) - } - } -} - -func (r *withRetry) WrapPreviousError(currentErr error) error { - if currentErr == nil || r.previousErr == nil { - return currentErr - } - - // if both previous and current error objects represent the error, - // then there is no need to wrap the previous error. - if currentErr.Error() == r.previousErr.Error() { - return currentErr - } - - previousErr := r.previousErr - // net/http wraps the underlying error with an url.Error, if the - // previous err object is an instance of url.Error, then we can - // unwrap it to get to the inner error object, this is so we can - // avoid error message like: - // Error: Get "http://foo.bar/api/v1": context deadline exceeded - error \ - // from a previous attempt: Error: Get "http://foo.bar/api/v1": EOF - if urlErr, ok := r.previousErr.(*url.Error); ok && urlErr != nil { - if urlErr.Unwrap() != nil { - previousErr = urlErr.Unwrap() - } - } - - return &wrapPreviousError{ - currentErr: currentErr, - previousError: previousErr, - } -} - -type wrapPreviousError struct { - currentErr, previousError error -} - -func (w *wrapPreviousError) Unwrap() error { return w.currentErr } -func (w *wrapPreviousError) Error() string { - return fmt.Sprintf("%s - error from a previous attempt: %s", w.currentErr.Error(), w.previousError.Error()) -} - // checkWait returns true along with a number of seconds if // the server instructed us to wait before retrying. func checkWait(resp *http.Response) (int, bool) { diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/tools/auth/OWNERS b/cluster-autoscaler/vendor/k8s.io/client-go/tools/auth/OWNERS index c4ea6463df4d..3e05d309be52 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/tools/auth/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/client-go/tools/auth/OWNERS @@ -1,8 +1,9 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - sig-auth-authenticators-approvers +- sig-auth-authenticators-approvers reviewers: - - sig-auth-authenticators-reviewers +- sig-auth-authenticators-reviewers labels: - - sig/auth +- sig/auth + diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/tools/cache/OWNERS b/cluster-autoscaler/vendor/k8s.io/client-go/tools/cache/OWNERS index 726205b3dff3..c4824d6bcefd 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/tools/cache/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/client-go/tools/cache/OWNERS @@ -1,28 +1,38 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - thockin - - lavalamp - - smarterclayton - - wojtek-t - - deads2k - - caesarxuchao - - liggitt - - ncdc +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- caesarxuchao +- liggitt +- ncdc reviewers: - - thockin - - lavalamp - - smarterclayton - - wojtek-t - - deads2k - - derekwaynecarr - - caesarxuchao - - mikedanese - - liggitt - - janetkuo - - justinsb - - soltysh - - jsafrane - - dims - - ingvagabund - - ncdc +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- brendandburns +- derekwaynecarr +- caesarxuchao +- mikedanese +- liggitt +- davidopp +- pmorie +- janetkuo +- justinsb +- soltysh +- jsafrane +- dims +- hongchaodeng +- krousey +- xiang90 +- ingvagabund +- resouer +- jessfraz +- mfojtik +- sdminonne +- ncdc diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/tools/cache/controller.go b/cluster-autoscaler/vendor/k8s.io/client-go/tools/cache/controller.go index ff4c22de00bc..c85c29db35ab 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/tools/cache/controller.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/tools/cache/controller.go @@ -17,7 +17,6 @@ limitations under the License. package cache import ( - "errors" "sync" "time" @@ -371,8 +370,8 @@ type TransformFunc func(interface{}) (interface{}, error) // the returned Store for Get/List operations; Add/Modify/Deletes will cause // the event notifications to be faulty. // The given transform function will be called on all objects before they will -// put into the Store and corresponding Add/Modify/Delete handlers will -// be invoked for them. +// put put into the Store and corresponding Add/Modify/Delete handlers will +// be invokved for them. func NewTransformingInformer( lw ListerWatcher, objType runtime.Object, @@ -407,49 +406,6 @@ func NewTransformingIndexerInformer( return clientState, newInformer(lw, objType, resyncPeriod, h, clientState, transformer) } -// Multiplexes updates in the form of a list of Deltas into a Store, and informs -// a given handler of events OnUpdate, OnAdd, OnDelete -func processDeltas( - // Object which receives event notifications from the given deltas - handler ResourceEventHandler, - clientState Store, - transformer TransformFunc, - deltas Deltas, -) error { - // from oldest to newest - for _, d := range deltas { - obj := d.Object - if transformer != nil { - var err error - obj, err = transformer(obj) - if err != nil { - return err - } - } - - switch d.Type { - case Sync, Replaced, Added, Updated: - if old, exists, err := clientState.Get(obj); err == nil && exists { - if err := clientState.Update(obj); err != nil { - return err - } - handler.OnUpdate(old, obj) - } else { - if err := clientState.Add(obj); err != nil { - return err - } - handler.OnAdd(obj) - } - case Deleted: - if err := clientState.Delete(obj); err != nil { - return err - } - handler.OnDelete(obj) - } - } - return nil -} - // newInformer returns a controller for populating the store while also // providing event notifications. // @@ -488,10 +444,38 @@ func newInformer( RetryOnError: false, Process: func(obj interface{}) error { - if deltas, ok := obj.(Deltas); ok { - return processDeltas(h, clientState, transformer, deltas) + // from oldest to newest + for _, d := range obj.(Deltas) { + obj := d.Object + if transformer != nil { + var err error + obj, err = transformer(obj) + if err != nil { + return err + } + } + + switch d.Type { + case Sync, Replaced, Added, Updated: + if old, exists, err := clientState.Get(obj); err == nil && exists { + if err := clientState.Update(obj); err != nil { + return err + } + h.OnUpdate(old, obj) + } else { + if err := clientState.Add(obj); err != nil { + return err + } + h.OnAdd(obj) + } + case Deleted: + if err := clientState.Delete(obj); err != nil { + return err + } + h.OnDelete(obj) + } } - return errors.New("object given as Process argument is not Deltas") + return nil }, } return New(cfg) diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/tools/cache/reflector.go b/cluster-autoscaler/vendor/k8s.io/client-go/tools/cache/reflector.go index 84f242116b9b..0708a6e8b589 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/tools/cache/reflector.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/tools/cache/reflector.go @@ -231,7 +231,7 @@ var ( // Used to indicate that watching stopped because of a signal from the stop // channel passed in from a client of the reflector. - errorStopRequested = errors.New("stop requested") + errorStopRequested = errors.New("Stop requested") ) // resyncChan returns a channel which will receive something when a resync is @@ -258,7 +258,7 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { options := metav1.ListOptions{ResourceVersion: r.relistResourceVersion()} if err := func() error { - initTrace := trace.New("Reflector ListAndWatch", trace.Field{Key: "name", Value: r.name}) + initTrace := trace.New("Reflector ListAndWatch", trace.Field{"name", r.name}) defer initTrace.LogIfLong(10 * time.Second) var list runtime.Object var paginatedResult bool @@ -319,7 +319,7 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { panic(r) case <-listCh: } - initTrace.Step("Objects listed", trace.Field{Key: "error", Value: err}) + initTrace.Step("Objects listed", trace.Field{"error", err}) if err != nil { klog.Warningf("%s: failed to list %v: %v", r.name, r.expectedTypeName, err) return fmt.Errorf("failed to list %v: %v", r.expectedTypeName, err) @@ -401,7 +401,7 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { timeoutSeconds := int64(minWatchTimeout.Seconds() * (rand.Float64() + 1.0)) options = metav1.ListOptions{ ResourceVersion: resourceVersion, - // We want to avoid situations of hanging watchers. Stop any watchers that do not + // We want to avoid situations of hanging watchers. Stop any wachers that do not // receive any events within the timeout window. TimeoutSeconds: &timeoutSeconds, // To reduce load on kube-apiserver on watch restarts, you may enable watch bookmarks. diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/tools/cache/shared_informer.go b/cluster-autoscaler/vendor/k8s.io/client-go/tools/cache/shared_informer.go index 9f42782d1792..4b7fc04e3ea6 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/tools/cache/shared_informer.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/tools/cache/shared_informer.go @@ -17,7 +17,6 @@ limitations under the License. package cache import ( - "errors" "fmt" "sync" "time" @@ -181,20 +180,6 @@ type SharedInformer interface { // The handler should return quickly - any expensive processing should be // offloaded. SetWatchErrorHandler(handler WatchErrorHandler) error - - // The TransformFunc is called for each object which is about to be stored. - // - // This function is intended for you to take the opportunity to - // remove, transform, or normalize fields. One use case is to strip unused - // metadata fields out of objects to save on RAM cost. - // - // Must be set before starting the informer. - // - // Note: Since the object given to the handler may be already shared with - // other goroutines, it is advisable to copy the object being - // transform before mutating it at all and returning the copy to prevent - // data races. - SetTransform(handler TransformFunc) error } // SharedIndexInformer provides add and get Indexers ability based on SharedInformer. @@ -259,7 +244,7 @@ func WaitForNamedCacheSync(controllerName string, stopCh <-chan struct{}, cacheS return false } - klog.Infof("Caches are synced for %s", controllerName) + klog.Infof("Caches are synced for %s ", controllerName) return true } @@ -333,8 +318,6 @@ type sharedIndexInformer struct { // Called whenever the ListAndWatch drops the connection with an error. watchErrorHandler WatchErrorHandler - - transform TransformFunc } // dummyController hides the fact that a SharedInformer is different from a dedicated one @@ -382,18 +365,6 @@ func (s *sharedIndexInformer) SetWatchErrorHandler(handler WatchErrorHandler) er return nil } -func (s *sharedIndexInformer) SetTransform(handler TransformFunc) error { - s.startedLock.Lock() - defer s.startedLock.Unlock() - - if s.started { - return fmt.Errorf("informer has already started") - } - - s.transform = handler - return nil -} - func (s *sharedIndexInformer) Run(stopCh <-chan struct{}) { defer utilruntime.HandleCrash() @@ -567,47 +538,45 @@ func (s *sharedIndexInformer) HandleDeltas(obj interface{}) error { s.blockDeltas.Lock() defer s.blockDeltas.Unlock() - if deltas, ok := obj.(Deltas); ok { - return processDeltas(s, s.indexer, s.transform, deltas) - } - return errors.New("object given as Process argument is not Deltas") -} - -// Conforms to ResourceEventHandler -func (s *sharedIndexInformer) OnAdd(obj interface{}) { - // Invocation of this function is locked under s.blockDeltas, so it is - // save to distribute the notification - s.cacheMutationDetector.AddObject(obj) - s.processor.distribute(addNotification{newObj: obj}, false) -} - -// Conforms to ResourceEventHandler -func (s *sharedIndexInformer) OnUpdate(old, new interface{}) { - isSync := false - - // If is a Sync event, isSync should be true - // If is a Replaced event, isSync is true if resource version is unchanged. - // If RV is unchanged: this is a Sync/Replaced event, so isSync is true + // from oldest to newest + for _, d := range obj.(Deltas) { + switch d.Type { + case Sync, Replaced, Added, Updated: + s.cacheMutationDetector.AddObject(d.Object) + if old, exists, err := s.indexer.Get(d.Object); err == nil && exists { + if err := s.indexer.Update(d.Object); err != nil { + return err + } - if accessor, err := meta.Accessor(new); err == nil { - if oldAccessor, err := meta.Accessor(old); err == nil { - // Events that didn't change resourceVersion are treated as resync events - // and only propagated to listeners that requested resync - isSync = accessor.GetResourceVersion() == oldAccessor.GetResourceVersion() + isSync := false + switch { + case d.Type == Sync: + // Sync events are only propagated to listeners that requested resync + isSync = true + case d.Type == Replaced: + if accessor, err := meta.Accessor(d.Object); err == nil { + if oldAccessor, err := meta.Accessor(old); err == nil { + // Replaced events that didn't change resourceVersion are treated as resync events + // and only propagated to listeners that requested resync + isSync = accessor.GetResourceVersion() == oldAccessor.GetResourceVersion() + } + } + } + s.processor.distribute(updateNotification{oldObj: old, newObj: d.Object}, isSync) + } else { + if err := s.indexer.Add(d.Object); err != nil { + return err + } + s.processor.distribute(addNotification{newObj: d.Object}, false) + } + case Deleted: + if err := s.indexer.Delete(d.Object); err != nil { + return err + } + s.processor.distribute(deleteNotification{oldObj: d.Object}, false) } } - - // Invocation of this function is locked under s.blockDeltas, so it is - // save to distribute the notification - s.cacheMutationDetector.AddObject(new) - s.processor.distribute(updateNotification{oldObj: old, newObj: new}, isSync) -} - -// Conforms to ResourceEventHandler -func (s *sharedIndexInformer) OnDelete(old interface{}) { - // Invocation of this function is locked under s.blockDeltas, so it is - // save to distribute the notification - s.processor.distribute(deleteNotification{oldObj: old}, false) + return nil } // sharedProcessor has a collection of processorListener and can diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/tools/cache/thread_safe_store.go b/cluster-autoscaler/vendor/k8s.io/client-go/tools/cache/thread_safe_store.go index 6d58c0d690de..ea34e90355b8 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/tools/cache/thread_safe_store.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/tools/cache/thread_safe_store.go @@ -71,7 +71,11 @@ type threadSafeMap struct { } func (c *threadSafeMap) Add(key string, obj interface{}) { - c.Update(key, obj) + c.lock.Lock() + defer c.lock.Unlock() + oldObject := c.items[key] + c.items[key] = obj + c.updateIndices(oldObject, obj, key) } func (c *threadSafeMap) Update(key string, obj interface{}) { @@ -280,15 +284,18 @@ func (c *threadSafeMap) updateIndices(oldObj interface{}, newObj interface{}, ke c.indices[name] = index } - if len(indexValues) == 1 && len(oldIndexValues) == 1 && indexValues[0] == oldIndexValues[0] { - // We optimize for the most common case where indexFunc returns a single value which has not been changed - continue - } - for _, value := range oldIndexValues { + // We optimize for the most common case where index returns a single value. + if len(indexValues) == 1 && value == indexValues[0] { + continue + } c.deleteKeyFromIndex(key, value, index) } for _, value := range indexValues { + // We optimize for the most common case where index returns a single value. + if len(oldIndexValues) == 1 && value == oldIndexValues[0] { + continue + } c.addKeyToIndex(key, value, index) } } diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/tools/clientcmd/overrides.go b/cluster-autoscaler/vendor/k8s.io/client-go/tools/clientcmd/overrides.go index 4c290db55471..ff643cc13dac 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/tools/clientcmd/overrides.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/tools/clientcmd/overrides.go @@ -73,7 +73,6 @@ type ClusterOverrideFlags struct { CertificateAuthority FlagInfo InsecureSkipTLSVerify FlagInfo TLSServerName FlagInfo - ProxyURL FlagInfo } // FlagInfo contains information about how to register a flag. This struct is useful if you want to provide a way for an extender to @@ -161,7 +160,6 @@ const ( FlagUsername = "username" FlagPassword = "password" FlagTimeout = "request-timeout" - FlagProxyURL = "proxy-url" ) // RecommendedConfigOverrideFlags is a convenience method to return recommended flag names prefixed with a string of your choosing @@ -197,7 +195,6 @@ func RecommendedClusterOverrideFlags(prefix string) ClusterOverrideFlags { CertificateAuthority: FlagInfo{prefix + FlagCAFile, "", "", "Path to a cert file for the certificate authority"}, InsecureSkipTLSVerify: FlagInfo{prefix + FlagInsecure, "", "false", "If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure"}, TLSServerName: FlagInfo{prefix + FlagTLSServerName, "", "", "If provided, this name will be used to validate server certificate. If this is not provided, hostname used to contact the server is used."}, - ProxyURL: FlagInfo{prefix + FlagProxyURL, "", "", "If provided, this URL will be used to connect via proxy"}, } } @@ -237,7 +234,6 @@ func BindClusterFlags(clusterInfo *clientcmdapi.Cluster, flags *pflag.FlagSet, f flagNames.CertificateAuthority.BindStringFlag(flags, &clusterInfo.CertificateAuthority) flagNames.InsecureSkipTLSVerify.BindBoolFlag(flags, &clusterInfo.InsecureSkipTLSVerify) flagNames.TLSServerName.BindStringFlag(flags, &clusterInfo.TLSServerName) - flagNames.ProxyURL.BindStringFlag(flags, &clusterInfo.ProxyURL) } // BindFlags is a convenience method to bind the specified flags to their associated variables diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/tools/events/OWNERS b/cluster-autoscaler/vendor/k8s.io/client-go/tools/events/OWNERS index 8c1137f412ac..05d68e687f31 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/tools/events/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/client-go/tools/events/OWNERS @@ -1,10 +1,10 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - sig-instrumentation-approvers - - wojtek-t +- sig-instrumentation-approvers +- yastij +- wojtek-t reviewers: - - sig-instrumentation-reviewers - - wojtek-t -emeritus_approvers: - - yastij +- sig-instrumentation-reviewers +- yastij +- wojtek-t diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/tools/leaderelection/OWNERS b/cluster-autoscaler/vendor/k8s.io/client-go/tools/leaderelection/OWNERS index 908bdacdfeec..2ba793ee80fb 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/tools/leaderelection/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/client-go/tools/leaderelection/OWNERS @@ -1,11 +1,12 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - mikedanese +- mikedanese +- timothysc reviewers: - - wojtek-t - - deads2k - - mikedanese - - ingvagabund -emeritus_approvers: - - timothysc +- wojtek-t +- deads2k +- mikedanese +- timothysc +- ingvagabund +- resouer diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/configmaplock.go b/cluster-autoscaler/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/configmaplock.go index 5702728982ca..552280d2d72a 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/configmaplock.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/configmaplock.go @@ -32,7 +32,7 @@ import ( // and use ConfigMaps as the means to pass that configuration // data we will likely move to deprecate the Endpoints lock. -type configMapLock struct { +type ConfigMapLock struct { // ConfigMapMeta should contain a Name and a Namespace of a // ConfigMapMeta object that the LeaderElector will attempt to lead. ConfigMapMeta metav1.ObjectMeta @@ -42,7 +42,7 @@ type configMapLock struct { } // Get returns the election record from a ConfigMap Annotation -func (cml *configMapLock) Get(ctx context.Context) (*LeaderElectionRecord, []byte, error) { +func (cml *ConfigMapLock) Get(ctx context.Context) (*LeaderElectionRecord, []byte, error) { var record LeaderElectionRecord var err error cml.cm, err = cml.Client.ConfigMaps(cml.ConfigMapMeta.Namespace).Get(ctx, cml.ConfigMapMeta.Name, metav1.GetOptions{}) @@ -63,7 +63,7 @@ func (cml *configMapLock) Get(ctx context.Context) (*LeaderElectionRecord, []byt } // Create attempts to create a LeaderElectionRecord annotation -func (cml *configMapLock) Create(ctx context.Context, ler LeaderElectionRecord) error { +func (cml *ConfigMapLock) Create(ctx context.Context, ler LeaderElectionRecord) error { recordBytes, err := json.Marshal(ler) if err != nil { return err @@ -81,7 +81,7 @@ func (cml *configMapLock) Create(ctx context.Context, ler LeaderElectionRecord) } // Update will update an existing annotation on a given resource. -func (cml *configMapLock) Update(ctx context.Context, ler LeaderElectionRecord) error { +func (cml *ConfigMapLock) Update(ctx context.Context, ler LeaderElectionRecord) error { if cml.cm == nil { return errors.New("configmap not initialized, call get or create first") } @@ -102,7 +102,7 @@ func (cml *configMapLock) Update(ctx context.Context, ler LeaderElectionRecord) } // RecordEvent in leader election while adding meta-data -func (cml *configMapLock) RecordEvent(s string) { +func (cml *ConfigMapLock) RecordEvent(s string) { if cml.LockConfig.EventRecorder == nil { return } @@ -116,11 +116,11 @@ func (cml *configMapLock) RecordEvent(s string) { // Describe is used to convert details on current resource lock // into a string -func (cml *configMapLock) Describe() string { +func (cml *ConfigMapLock) Describe() string { return fmt.Sprintf("%v/%v", cml.ConfigMapMeta.Namespace, cml.ConfigMapMeta.Name) } // Identity returns the Identity of the lock -func (cml *configMapLock) Identity() string { +func (cml *ConfigMapLock) Identity() string { return cml.LockConfig.Identity } diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/endpointslock.go b/cluster-autoscaler/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/endpointslock.go index af3fa1626951..dcd2026efdd2 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/endpointslock.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/endpointslock.go @@ -27,7 +27,7 @@ import ( corev1client "k8s.io/client-go/kubernetes/typed/core/v1" ) -type endpointsLock struct { +type EndpointsLock struct { // EndpointsMeta should contain a Name and a Namespace of an // Endpoints object that the LeaderElector will attempt to lead. EndpointsMeta metav1.ObjectMeta @@ -37,7 +37,7 @@ type endpointsLock struct { } // Get returns the election record from a Endpoints Annotation -func (el *endpointsLock) Get(ctx context.Context) (*LeaderElectionRecord, []byte, error) { +func (el *EndpointsLock) Get(ctx context.Context) (*LeaderElectionRecord, []byte, error) { var record LeaderElectionRecord var err error el.e, err = el.Client.Endpoints(el.EndpointsMeta.Namespace).Get(ctx, el.EndpointsMeta.Name, metav1.GetOptions{}) @@ -58,7 +58,7 @@ func (el *endpointsLock) Get(ctx context.Context) (*LeaderElectionRecord, []byte } // Create attempts to create a LeaderElectionRecord annotation -func (el *endpointsLock) Create(ctx context.Context, ler LeaderElectionRecord) error { +func (el *EndpointsLock) Create(ctx context.Context, ler LeaderElectionRecord) error { recordBytes, err := json.Marshal(ler) if err != nil { return err @@ -76,7 +76,7 @@ func (el *endpointsLock) Create(ctx context.Context, ler LeaderElectionRecord) e } // Update will update and existing annotation on a given resource. -func (el *endpointsLock) Update(ctx context.Context, ler LeaderElectionRecord) error { +func (el *EndpointsLock) Update(ctx context.Context, ler LeaderElectionRecord) error { if el.e == nil { return errors.New("endpoint not initialized, call get or create first") } @@ -97,7 +97,7 @@ func (el *endpointsLock) Update(ctx context.Context, ler LeaderElectionRecord) e } // RecordEvent in leader election while adding meta-data -func (el *endpointsLock) RecordEvent(s string) { +func (el *EndpointsLock) RecordEvent(s string) { if el.LockConfig.EventRecorder == nil { return } @@ -111,11 +111,11 @@ func (el *endpointsLock) RecordEvent(s string) { // Describe is used to convert details on current resource lock // into a string -func (el *endpointsLock) Describe() string { +func (el *EndpointsLock) Describe() string { return fmt.Sprintf("%v/%v", el.EndpointsMeta.Namespace, el.EndpointsMeta.Name) } // Identity returns the Identity of the lock -func (el *endpointsLock) Identity() string { +func (el *EndpointsLock) Identity() string { return el.LockConfig.Identity } diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/interface.go b/cluster-autoscaler/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/interface.go index c6e23bda1612..bc77c2eda889 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/interface.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/interface.go @@ -31,77 +31,11 @@ import ( const ( LeaderElectionRecordAnnotationKey = "control-plane.alpha.kubernetes.io/leader" - endpointsResourceLock = "endpoints" - configMapsResourceLock = "configmaps" + EndpointsResourceLock = "endpoints" + ConfigMapsResourceLock = "configmaps" LeasesResourceLock = "leases" - // When using EndpointsLeasesResourceLock, you need to ensure that - // API Priority & Fairness is configured with non-default flow-schema - // that will catch the necessary operations on leader-election related - // endpoint objects. - // - // The example of such flow scheme could look like this: - // apiVersion: flowcontrol.apiserver.k8s.io/v1beta2 - // kind: FlowSchema - // metadata: - // name: my-leader-election - // spec: - // distinguisherMethod: - // type: ByUser - // matchingPrecedence: 200 - // priorityLevelConfiguration: - // name: leader-election # reference the PL - // rules: - // - resourceRules: - // - apiGroups: - // - "" - // namespaces: - // - '*' - // resources: - // - endpoints - // verbs: - // - get - // - create - // - update - // subjects: - // - kind: ServiceAccount - // serviceAccount: - // name: '*' - // namespace: kube-system - EndpointsLeasesResourceLock = "endpointsleases" - // When using EndpointsLeasesResourceLock, you need to ensure that - // API Priority & Fairness is configured with non-default flow-schema - // that will catch the necessary operations on leader-election related - // configmap objects. - // - // The example of such flow scheme could look like this: - // apiVersion: flowcontrol.apiserver.k8s.io/v1beta2 - // kind: FlowSchema - // metadata: - // name: my-leader-election - // spec: - // distinguisherMethod: - // type: ByUser - // matchingPrecedence: 200 - // priorityLevelConfiguration: - // name: leader-election # reference the PL - // rules: - // - resourceRules: - // - apiGroups: - // - "" - // namespaces: - // - '*' - // resources: - // - configmaps - // verbs: - // - get - // - create - // - update - // subjects: - // - kind: ServiceAccount - // serviceAccount: - // name: '*' - // namespace: kube-system - ConfigMapsLeasesResourceLock = "configmapsleases" + EndpointsLeasesResourceLock = "endpointsleases" + ConfigMapsLeasesResourceLock = "configmapsleases" ) // LeaderElectionRecord is the record that is stored in the leader election annotation. @@ -164,7 +98,7 @@ type Interface interface { // Manufacture will create a lock of a given type according to the input parameters func New(lockType string, ns string, name string, coreClient corev1.CoreV1Interface, coordinationClient coordinationv1.CoordinationV1Interface, rlc ResourceLockConfig) (Interface, error) { - endpointsLock := &endpointsLock{ + endpointsLock := &EndpointsLock{ EndpointsMeta: metav1.ObjectMeta{ Namespace: ns, Name: name, @@ -172,7 +106,7 @@ func New(lockType string, ns string, name string, coreClient corev1.CoreV1Interf Client: coreClient, LockConfig: rlc, } - configmapLock := &configMapLock{ + configmapLock := &ConfigMapLock{ ConfigMapMeta: metav1.ObjectMeta{ Namespace: ns, Name: name, @@ -189,10 +123,10 @@ func New(lockType string, ns string, name string, coreClient corev1.CoreV1Interf LockConfig: rlc, } switch lockType { - case endpointsResourceLock: - return nil, fmt.Errorf("endpoints lock is removed, migrate to %s", EndpointsLeasesResourceLock) - case configMapsResourceLock: - return nil, fmt.Errorf("configmaps lock is removed, migrate to %s", ConfigMapsLeasesResourceLock) + case EndpointsResourceLock: + return endpointsLock, nil + case ConfigMapsResourceLock: + return configmapLock, nil case LeasesResourceLock: return leaseLock, nil case EndpointsLeasesResourceLock: diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/tools/metrics/OWNERS b/cluster-autoscaler/vendor/k8s.io/client-go/tools/metrics/OWNERS index 2c9488a5fb2c..77bcb5090cef 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/tools/metrics/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/client-go/tools/metrics/OWNERS @@ -1,5 +1,6 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - wojtek-t - - jayunit100 +- wojtek-t +- krousey +- jayunit100 diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/tools/metrics/metrics.go b/cluster-autoscaler/vendor/k8s.io/client-go/tools/metrics/metrics.go index 6c684c7fa126..597dc8e53928 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/tools/metrics/metrics.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/tools/metrics/metrics.go @@ -42,11 +42,6 @@ type LatencyMetric interface { Observe(ctx context.Context, verb string, u url.URL, latency time.Duration) } -// SizeMetric observes client response size partitioned by verb and host. -type SizeMetric interface { - Observe(ctx context.Context, verb string, host string, size float64) -} - // ResultMetric counts response codes partitioned by method and host. type ResultMetric interface { Increment(ctx context.Context, code string, method string, host string) @@ -65,10 +60,6 @@ var ( ClientCertRotationAge DurationMetric = noopDuration{} // RequestLatency is the latency metric that rest clients will update. RequestLatency LatencyMetric = noopLatency{} - // RequestSize is the request size metric that rest clients will update. - RequestSize SizeMetric = noopSize{} - // ResponseSize is the response size metric that rest clients will update. - ResponseSize SizeMetric = noopSize{} // RateLimiterLatency is the client side rate limiter latency metric. RateLimiterLatency LatencyMetric = noopLatency{} // RequestResult is the result metric that rest clients will update. @@ -83,8 +74,6 @@ type RegisterOpts struct { ClientCertExpiry ExpiryMetric ClientCertRotationAge DurationMetric RequestLatency LatencyMetric - RequestSize SizeMetric - ResponseSize SizeMetric RateLimiterLatency LatencyMetric RequestResult ResultMetric ExecPluginCalls CallsMetric @@ -103,12 +92,6 @@ func Register(opts RegisterOpts) { if opts.RequestLatency != nil { RequestLatency = opts.RequestLatency } - if opts.RequestSize != nil { - RequestSize = opts.RequestSize - } - if opts.ResponseSize != nil { - ResponseSize = opts.ResponseSize - } if opts.RateLimiterLatency != nil { RateLimiterLatency = opts.RateLimiterLatency } @@ -133,10 +116,6 @@ type noopLatency struct{} func (noopLatency) Observe(context.Context, string, url.URL, time.Duration) {} -type noopSize struct{} - -func (noopSize) Observe(context.Context, string, string, float64) {} - type noopResult struct{} func (noopResult) Increment(context.Context, string, string, string) {} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/tools/pager/pager.go b/cluster-autoscaler/vendor/k8s.io/client-go/tools/pager/pager.go index 805859e092bc..f6c6a01298dc 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/tools/pager/pager.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/tools/pager/pager.go @@ -78,7 +78,6 @@ func (p *ListPager) List(ctx context.Context, options metav1.ListOptions) (runti options.Limit = p.PageSize } requestedResourceVersion := options.ResourceVersion - requestedResourceVersionMatch := options.ResourceVersionMatch var list *metainternalversion.List paginatedResult := false @@ -103,7 +102,6 @@ func (p *ListPager) List(ctx context.Context, options metav1.ListOptions) (runti options.Limit = 0 options.Continue = "" options.ResourceVersion = requestedResourceVersion - options.ResourceVersionMatch = requestedResourceVersionMatch result, err := p.PageFn(ctx, options) return result, paginatedResult, err } @@ -137,11 +135,10 @@ func (p *ListPager) List(ctx context.Context, options metav1.ListOptions) (runti // set the next loop up options.Continue = m.GetContinue() - // Clear the ResourceVersion(Match) on the subsequent List calls to avoid the + // Clear the ResourceVersion on the subsequent List calls to avoid the // `specifying resource version is not allowed when using continue` error. // See https://github.com/kubernetes/kubernetes/issues/85221#issuecomment-553748143. options.ResourceVersion = "" - options.ResourceVersionMatch = "" // At this point, result is already paginated. paginatedResult = true } diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/tools/record/OWNERS b/cluster-autoscaler/vendor/k8s.io/client-go/tools/record/OWNERS index 8105c4fe087c..e7e739b1503d 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/tools/record/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/client-go/tools/record/OWNERS @@ -1,6 +1,6 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - sig-instrumentation-reviewers +- sig-instrumentation-reviewers approvers: - - sig-instrumentation-approvers +- sig-instrumentation-approvers diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/tools/record/event.go b/cluster-autoscaler/vendor/k8s.io/client-go/tools/record/event.go index b901d2e8a0a7..4b61d0052f0e 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/tools/record/event.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/tools/record/event.go @@ -291,7 +291,7 @@ func (e *eventBroadcasterImpl) StartLogging(logf func(format string, args ...int func (e *eventBroadcasterImpl) StartStructuredLogging(verbosity klog.Level) watch.Interface { return e.StartEventWatcher( func(e *v1.Event) { - klog.V(verbosity).InfoS("Event occurred", "object", klog.KRef(e.InvolvedObject.Namespace, e.InvolvedObject.Name), "fieldPath", e.InvolvedObject.FieldPath, "kind", e.InvolvedObject.Kind, "apiVersion", e.InvolvedObject.APIVersion, "type", e.Type, "reason", e.Reason, "message", e.Message) + klog.V(verbosity).InfoS("Event occurred", "object", klog.KRef(e.InvolvedObject.Namespace, e.InvolvedObject.Name), "kind", e.InvolvedObject.Kind, "apiVersion", e.InvolvedObject.APIVersion, "type", e.Type, "reason", e.Reason, "message", e.Message) }) } diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/tools/watch/retrywatcher.go b/cluster-autoscaler/vendor/k8s.io/client-go/tools/watch/retrywatcher.go index e4806d2ea12b..1ed46ccb9e1d 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/tools/watch/retrywatcher.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/tools/watch/retrywatcher.go @@ -268,13 +268,7 @@ func (rw *RetryWatcher) receive() { return } - timer := time.NewTimer(retryAfter) - select { - case <-ctx.Done(): - timer.Stop() - return - case <-timer.C: - } + time.Sleep(retryAfter) klog.V(4).Infof("Restarting RetryWatcher at RV=%q", rw.lastResourceVersion) }, rw.minRestartDelay) diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/transport/OWNERS b/cluster-autoscaler/vendor/k8s.io/client-go/transport/OWNERS index 34adee5ec539..a52176903c00 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/transport/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/client-go/transport/OWNERS @@ -1,8 +1,9 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - smarterclayton - - wojtek-t - - deads2k - - liggitt - - caesarxuchao +- smarterclayton +- wojtek-t +- deads2k +- liggitt +- krousey +- caesarxuchao diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/transport/round_trippers.go b/cluster-autoscaler/vendor/k8s.io/client-go/transport/round_trippers.go index 26a89f93be42..4c74606a98e0 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/transport/round_trippers.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/transport/round_trippers.go @@ -72,7 +72,7 @@ func HTTPWrappersForConfig(config *Config, rt http.RoundTripper) (http.RoundTrip func DebugWrappers(rt http.RoundTripper) http.RoundTripper { switch { case bool(klog.V(9).Enabled()): - rt = NewDebuggingRoundTripper(rt, DebugCurlCommand, DebugURLTiming, DebugDetailedTiming, DebugResponseHeaders) + rt = NewDebuggingRoundTripper(rt, DebugCurlCommand, DebugDetailedTiming, DebugResponseHeaders) case bool(klog.V(8).Enabled()): rt = NewDebuggingRoundTripper(rt, DebugJustURL, DebugRequestHeaders, DebugResponseStatus, DebugResponseHeaders) case bool(klog.V(7).Enabled()): diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/transport/spdy/spdy.go b/cluster-autoscaler/vendor/k8s.io/client-go/transport/spdy/spdy.go index f50b68e5ffb5..406d3cc19ce0 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/transport/spdy/spdy.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/transport/spdy/spdy.go @@ -44,9 +44,11 @@ func RoundTripperFor(config *restclient.Config) (http.RoundTripper, Upgrader, er proxy = config.Proxy } upgradeRoundTripper := spdy.NewRoundTripperWithConfig(spdy.RoundTripperConfig{ - TLS: tlsConfig, - Proxier: proxy, - PingPeriod: time.Second * 5, + TLS: tlsConfig, + FollowRedirects: true, + RequireSameHostRedirects: false, + Proxier: proxy, + PingPeriod: time.Second * 5, }) wrapper, err := restclient.HTTPWrappersForConfig(config, upgradeRoundTripper) if err != nil { diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/util/cert/OWNERS b/cluster-autoscaler/vendor/k8s.io/client-go/util/cert/OWNERS index 3c3b94c58c3f..3cf03643835a 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/util/cert/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/client-go/util/cert/OWNERS @@ -1,8 +1,9 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - sig-auth-certificates-approvers +- sig-auth-certificates-approvers reviewers: - - sig-auth-certificates-reviewers +- sig-auth-certificates-reviewers labels: - - sig/auth +- sig/auth + diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/util/certificate/OWNERS b/cluster-autoscaler/vendor/k8s.io/client-go/util/certificate/OWNERS index 3c3b94c58c3f..3cf03643835a 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/util/certificate/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/client-go/util/certificate/OWNERS @@ -1,8 +1,9 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - sig-auth-certificates-approvers +- sig-auth-certificates-approvers reviewers: - - sig-auth-certificates-reviewers +- sig-auth-certificates-reviewers labels: - - sig/auth +- sig/auth + diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/util/keyutil/OWNERS b/cluster-autoscaler/vendor/k8s.io/client-go/util/keyutil/OWNERS index e6d229d5dbe1..470b7a1c92d1 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/util/keyutil/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/client-go/util/keyutil/OWNERS @@ -1,6 +1,7 @@ approvers: - - sig-auth-certificates-approvers +- sig-auth-certificates-approvers reviewers: - - sig-auth-certificates-reviewers +- sig-auth-certificates-reviewers labels: - - sig/auth +- sig/auth + diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/util/retry/OWNERS b/cluster-autoscaler/vendor/k8s.io/client-go/util/retry/OWNERS index 75736b5aace8..dec3e88d6318 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/util/retry/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/client-go/util/retry/OWNERS @@ -1,4 +1,4 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - caesarxuchao +- caesarxuchao diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/util/workqueue/delaying_queue.go b/cluster-autoscaler/vendor/k8s.io/client-go/util/workqueue/delaying_queue.go index 26eacc2ba772..61c4da530c0b 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/util/workqueue/delaying_queue.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/util/workqueue/delaying_queue.go @@ -33,9 +33,7 @@ type DelayingInterface interface { AddAfter(item interface{}, duration time.Duration) } -// NewDelayingQueue constructs a new workqueue with delayed queuing ability. -// NewDelayingQueue does not emit metrics. For use with a MetricsProvider, please use -// NewNamedDelayingQueue instead. +// NewDelayingQueue constructs a new workqueue with delayed queuing ability func NewDelayingQueue() DelayingInterface { return NewDelayingQueueWithCustomClock(clock.RealClock{}, "") } diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/util/workqueue/rate_limiting_queue.go b/cluster-autoscaler/vendor/k8s.io/client-go/util/workqueue/rate_limiting_queue.go index 267f4ff40843..8321876acf40 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/util/workqueue/rate_limiting_queue.go +++ b/cluster-autoscaler/vendor/k8s.io/client-go/util/workqueue/rate_limiting_queue.go @@ -34,8 +34,6 @@ type RateLimitingInterface interface { // NewRateLimitingQueue constructs a new workqueue with rateLimited queuing ability // Remember to call Forget! If you don't, you may end up tracking failures forever. -// NewRateLimitingQueue does not emit metrics. For use with a MetricsProvider, please use -// NewNamedRateLimitingQueue instead. func NewRateLimitingQueue(rateLimiter RateLimiter) RateLimitingInterface { return &rateLimitingType{ DelayingInterface: NewDelayingQueue(), diff --git a/cluster-autoscaler/vendor/k8s.io/cloud-provider/OWNERS b/cluster-autoscaler/vendor/k8s.io/cloud-provider/OWNERS index 19a29715a248..b0ef2b6f5543 100644 --- a/cluster-autoscaler/vendor/k8s.io/cloud-provider/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/cloud-provider/OWNERS @@ -1,29 +1,37 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - mikedanese - - dims - - wlan0 - - andrewsykim - - cheftako +- mikedanese +- dims +- wlan0 +- andrewsykim +- cheftako reviewers: - - wojtek-t - - deads2k - - derekwaynecarr - - mikedanese - - liggitt - - sttts - - dchen1107 - - saad-ali - - luxas - - justinsb - - jsafrane - - dims - - freehan - - jingxu97 - - wlan0 - - cheftako - - andrewsykim +- wojtek-t +- deads2k +- derekwaynecarr +- vishh +- mikedanese +- liggitt +- davidopp +- pmorie +- sttts +- quinton-hoole +- dchen1107 +- saad-ali +- luxas +- justinsb +- piosz +- jsafrane +- dims +- krousey +- rootfs +- freehan +- jingxu97 +- wlan0 +- cheftako +- andrewsykim +- mcrute labels: - - sig/cloud-provider - - area/cloudprovider +- sig/cloud-provider +- area/cloudprovider diff --git a/cluster-autoscaler/vendor/k8s.io/cloud-provider/README.md b/cluster-autoscaler/vendor/k8s.io/cloud-provider/README.md index 542a9a7a839d..d53fec5a4d5c 100644 --- a/cluster-autoscaler/vendor/k8s.io/cloud-provider/README.md +++ b/cluster-autoscaler/vendor/k8s.io/cloud-provider/README.md @@ -30,4 +30,3 @@ later synced here. 2. Directly modify anything under vendor/k8s.io/cloud-provider in this repo. Those are driven from `k8s.io/kubernetes/staging/src/k8s.io/cloud-provider`. 3. Make interface changes without first discussing them with sig-cloudprovider. - diff --git a/cluster-autoscaler/vendor/k8s.io/cloud-provider/cloud.go b/cluster-autoscaler/vendor/k8s.io/cloud-provider/cloud.go index 44c62ccc03a1..502443d61e77 100644 --- a/cluster-autoscaler/vendor/k8s.io/cloud-provider/cloud.go +++ b/cluster-autoscaler/vendor/k8s.io/cloud-provider/cloud.go @@ -22,7 +22,7 @@ import ( "fmt" "strings" - v1 "k8s.io/api/core/v1" + "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/informers" clientset "k8s.io/client-go/kubernetes" @@ -281,7 +281,7 @@ type PVLabeler interface { // InstanceMetadata contains metadata about a specific instance. // Values returned in InstanceMetadata are translated into specific fields and labels for Node. type InstanceMetadata struct { - // ProviderID is a unique ID used to identify an instance on the cloud provider. + // ProviderID is a unique ID used to idenfitify an instance on the cloud provider. // The ProviderID set here will be set on the node's spec.providerID field. // The provider ID format can be set by the cloud provider but providers should // ensure the format does not change in any incompatible way. diff --git a/cluster-autoscaler/vendor/k8s.io/cloud-provider/go.mod b/cluster-autoscaler/vendor/k8s.io/cloud-provider/go.mod index 337114a53298..8ead239f0b6a 100644 --- a/cluster-autoscaler/vendor/k8s.io/cloud-provider/go.mod +++ b/cluster-autoscaler/vendor/k8s.io/cloud-provider/go.mod @@ -6,26 +6,26 @@ go 1.16 require ( github.com/google/go-cmp v0.5.5 - github.com/spf13/cobra v1.4.0 + github.com/spf13/cobra v1.2.1 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 - k8s.io/api v0.24.0 - k8s.io/apimachinery v0.24.0 - k8s.io/apiserver v0.24.0 - k8s.io/client-go v0.24.0 - k8s.io/component-base v0.24.0 - k8s.io/component-helpers v0.24.0 - k8s.io/controller-manager v0.24.0 - k8s.io/klog/v2 v2.60.1 - k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 + k8s.io/api v0.23.0 + k8s.io/apimachinery v0.23.0 + k8s.io/apiserver v0.23.0 + k8s.io/client-go v0.23.0 + k8s.io/component-base v0.23.0 + k8s.io/component-helpers v0.23.0 + k8s.io/controller-manager v0.23.0 + k8s.io/klog/v2 v2.30.0 + k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b ) replace ( - k8s.io/api => k8s.io/api v0.24.0 - k8s.io/apimachinery => k8s.io/apimachinery v0.24.0 - k8s.io/apiserver => k8s.io/apiserver v0.24.0 - k8s.io/client-go => k8s.io/client-go v0.24.0 - k8s.io/component-base => k8s.io/component-base v0.24.0 - k8s.io/component-helpers => k8s.io/component-helpers v0.24.0 - k8s.io/controller-manager => k8s.io/controller-manager v0.24.0 + k8s.io/api => k8s.io/api v0.23.0 + k8s.io/apimachinery => k8s.io/apimachinery v0.23.0 + k8s.io/apiserver => k8s.io/apiserver v0.23.0 + k8s.io/client-go => k8s.io/client-go v0.23.0 + k8s.io/component-base => k8s.io/component-base v0.23.0 + k8s.io/component-helpers => k8s.io/component-helpers v0.23.0 + k8s.io/controller-manager => k8s.io/controller-manager v0.23.0 ) diff --git a/cluster-autoscaler/vendor/k8s.io/cloud-provider/go.sum b/cluster-autoscaler/vendor/k8s.io/cloud-provider/go.sum index 9df548a7ea38..baeca8a88dfd 100644 --- a/cluster-autoscaler/vendor/k8s.io/cloud-provider/go.sum +++ b/cluster-autoscaler/vendor/k8s.io/cloud-provider/go.sum @@ -38,6 +38,7 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= @@ -67,7 +68,6 @@ github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kd github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= @@ -78,16 +78,16 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= -github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= +github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= +github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -110,7 +110,6 @@ github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzA github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -215,8 +214,6 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= -github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -251,6 +248,9 @@ github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= +github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= +github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= @@ -322,6 +322,7 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= @@ -340,9 +341,10 @@ github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS4 github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= -github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= -github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= +github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 h1:yH0SvLzcbZxcJXho2yh7CqdENGMQe73Cw3woZBpPli0= +github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -373,6 +375,7 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -387,9 +390,8 @@ github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXP github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -400,21 +402,19 @@ github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8 github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.28.0 h1:vGVfV9KrDTvWt5boZO0I19g2E3CsWfpPPKZM9dt3mEw= +github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= @@ -435,14 +435,17 @@ github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTd github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= -github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= -github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= +github.com/spf13/cobra v1.2.1 h1:+KmjbUw1hriSNMF55oPrkZcb27aECyrj8V2ytv7kWDw= +github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -464,21 +467,18 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/etcd/api/v3 v3.5.0 h1:GsV3S+OfZEOCNXdtNkBSR7kgLobAa/SO6tCxRa0GAYw= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/api/v3 v3.5.1 h1:v28cktvBq+7vGyJXF8G+rWJmj+1XUmMtqcLnH8hDocM= -go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/client/pkg/v3 v3.5.0 h1:2aQv6F436YnN7I4VbI8PPYrBhu+SmrTaADcf8Mi/6PU= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/pkg/v3 v3.5.1 h1:XIQcHCFSG53bJETYeRJtIxdLv2EWRGxcfzR8lSnTH4E= -go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0 h1:ftQ0nOOHMcbMS3KIaDQ0g5Qcd6bhaBrQT6b89DfwLTs= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.etcd.io/etcd/client/v3 v3.5.0 h1:62Eh0XOro+rDwkrypAGDfgmNh5Joq+z+W9HZdlXMzek= go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= -go.etcd.io/etcd/client/v3 v3.5.1 h1:oImGuV5LGKjCqXdjkMHCyWa5OO1gYKCnC/1sgdfj1Uk= -go.etcd.io/etcd/client/v3 v3.5.1/go.mod h1:OnjH4M8OnAotwaB2l9bVgZzRFKru7/ZMoS46OtKyd3Q= go.etcd.io/etcd/pkg/v3 v3.5.0 h1:ntrg6vvKRW26JRmHTE0iNlDgYK6JX3hg/4cD62X0ixk= go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= go.etcd.io/etcd/raft/v3 v3.5.0 h1:kw2TmO3yFTgE+F0mdKkG7xMxkit2duBDa2Hu6D/HMlw= @@ -537,9 +537,8 @@ golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220214200702-86341886e292 h1:f+lwQ+GtmgoY+A2YaQxlSOnDjXcQ7ZRLWOHbC6HtRqE= -golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s39J9CbLn7Cc5a7IC5rwsMQ= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -576,7 +575,6 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -621,10 +619,9 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210825183410-e898025ed96a h1:bRuuGXV8wwSdGTB+CtJf+FjgO1APK1CoO39T4BN/XBw= +golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -636,9 +633,10 @@ golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f h1:Qmd2pbz05z7z6lm0DrgQVVPuBm92jqujBKMHMOlOQEw= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -691,6 +689,7 @@ golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -710,14 +709,12 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158 h1:rm+CHSpPEEW2IsXUib1ThaHIjuBVZjxNgSKmBLFfD4c= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e h1:XMgFehsDnnLGtjvjOfqWSUzt0alpTR1RSEuznObga2c= +golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= +golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -732,8 +729,8 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= -golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -791,8 +788,8 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.10-0.20220218145154-897bd77cd717 h1:hI3jKY4Hpf63ns040onEbB3dAkR/H/P83hw1TG8dD3Y= -golang.org/x/tools v0.1.10-0.20220218145154-897bd77cd717/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff h1:VX/uD7MK0AHXGiScH3fsieUQUcpmRERPDYtqZdJnA+Q= +golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -819,6 +816,7 @@ google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34q google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -870,8 +868,8 @@ google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368 h1:Et6SkiuvnBn+SgrSYXs/BrUpGB4mbdwt4R3vaPIlicA= -google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2 h1:NHN4wOCScVzKhPenJ2dt+BTs3X/XkBVI/Rh4iDt55T8= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -920,6 +918,7 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= @@ -950,39 +949,39 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.24.0 h1:J0hann2hfxWr1hinZIDefw7Q96wmCBx6SSB8IY0MdDg= -k8s.io/api v0.24.0/go.mod h1:5Jl90IUrJHUJYEMANRURMiVvJ0g7Ax7r3R1bqO8zx8I= -k8s.io/apimachinery v0.24.0 h1:ydFCyC/DjCvFCHK5OPMKBlxayQytB8pxy8YQInd5UyQ= -k8s.io/apimachinery v0.24.0/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= -k8s.io/apiserver v0.24.0 h1:GR7kGsjOMfilRvlG3Stxv/3uz/ryvJ/aZXc5pqdsNV0= -k8s.io/apiserver v0.24.0/go.mod h1:WFx2yiOMawnogNToVvUYT9nn1jaIkMKj41ZYCVycsBA= -k8s.io/client-go v0.24.0 h1:lbE4aB1gTHvYFSwm6eD3OF14NhFDKCejlnsGYlSJe5U= -k8s.io/client-go v0.24.0/go.mod h1:VFPQET+cAFpYxh6Bq6f4xyMY80G6jKKktU6G0m00VDw= -k8s.io/component-base v0.24.0 h1:h5jieHZQoHrY/lHG+HyrSbJeyfuitheBvqvKwKHVC0g= -k8s.io/component-base v0.24.0/go.mod h1:Dgazgon0i7KYUsS8krG8muGiMVtUZxG037l1MKyXgrA= -k8s.io/component-helpers v0.24.0 h1:hZIHGfdd55thhqd9oxjDTw68OAPauDMJ+8hC69aNw1I= -k8s.io/component-helpers v0.24.0/go.mod h1:Q2SlLm4h6g6lPTC9GMMfzdywfLSvJT2f1hOnnjaWD8c= -k8s.io/controller-manager v0.24.0 h1:mR8mlcwCd5s/V9vCoCAgZm9WJMTaOeRVmOn6gxNW5LA= -k8s.io/controller-manager v0.24.0/go.mod h1:ageMNQZc7cNH0FF1oarm7wZs6XyJj/V82nNVmgPaeDU= +k8s.io/api v0.23.0 h1:WrL1gb73VSC8obi8cuYETJGXEoFNEh3LU0Pt+Sokgro= +k8s.io/api v0.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg= +k8s.io/apimachinery v0.23.0 h1:mIfWRMjBuMdolAWJ3Fd+aPTMv3X9z+waiARMpvvb0HQ= +k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= +k8s.io/apiserver v0.23.0 h1:Ds/QveXWi9aJ8ISB0CJa4zBNc5njxAs5u3rmMIexqCY= +k8s.io/apiserver v0.23.0/go.mod h1:Cec35u/9zAepDPPFyT+UMrgqOCjgJ5qtfVJDxjZYmt4= +k8s.io/client-go v0.23.0 h1:vcsOqyPq7XV3QmQRCBH/t9BICJM9Q1M18qahjv+rebY= +k8s.io/client-go v0.23.0/go.mod h1:hrDnpnK1mSr65lHHcUuIZIXDgEbzc7/683c6hyG4jTA= +k8s.io/component-base v0.23.0 h1:UAnyzjvVZ2ZR1lF35YwtNY6VMN94WtOnArcXBu34es8= +k8s.io/component-base v0.23.0/go.mod h1:DHH5uiFvLC1edCpvcTDV++NKULdYYU6pR9Tt3HIKMKI= +k8s.io/component-helpers v0.23.0 h1:qNbqN10QTefiWcCOPkHL/0nn81sdKVv6ZgEXcSyot/U= +k8s.io/component-helpers v0.23.0/go.mod h1:liXMh6FZS4qamKtMJQ7uLHnFe3tlC86RX5mJEk/aerg= +k8s.io/controller-manager v0.23.0 h1:D41cuVvXADHZatEJOlZJc/QddxUSlkN6xqiHy++WKk8= +k8s.io/controller-manager v0.23.0/go.mod h1:6/IKItSv6p9FY3mSbHgsOYmt4y+HDxiC5hEFg9rJVc8= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.60.1 h1:VW25q3bZx9uE3vvdL6M8ezOX79vA2Aq1nEWLqNQclHc= -k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 h1:Gii5eqf+GmIEwGNKQYQClCayuJCe2/4fZUvF7VG99sU= -k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= +k8s.io/klog/v2 v2.30.0 h1:bUO6drIvCIsvZ/XFgfxoGFQU/a4Qkh0iAlvUR7vlHJw= +k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4= +k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc= -k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b h1:wxEMGetGMur3J1xuGLQY7GEQYg9bZxKn3tKo5k/eYcs= +k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.30 h1:dUk62HQ3ZFhD48Qr8MIXCiKA8wInBQCtuE4QGfFW7yA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.30/go.mod h1:fEO7lRTdivWO2qYVCVG7dEADOMo/MLDCVr8So2g88Uw= -sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y= -sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25 h1:DEQ12ZRxJjsglk5JIi5bLgpKaHihGervKmg5uryaEHw= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25/go.mod h1:Mlj9PNLmG9bZ6BHFwFKDo5afkpWyUISkb9Me0GnK66I= +sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s= +sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= -sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/structured-merge-diff/v4 v4.1.2 h1:Hr/htKFmJEbtMgS/UD0N+gtgctAqz81t3nu+sPzynno= +sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/cluster-autoscaler/vendor/k8s.io/cloud-provider/node/helpers/address.go b/cluster-autoscaler/vendor/k8s.io/cloud-provider/node/helpers/address.go index 23405f61a37f..028a1fbe4b34 100644 --- a/cluster-autoscaler/vendor/k8s.io/cloud-provider/node/helpers/address.go +++ b/cluster-autoscaler/vendor/k8s.io/cloud-provider/node/helpers/address.go @@ -17,11 +17,7 @@ limitations under the License. package helpers import ( - "fmt" - "net" - "k8s.io/api/core/v1" - netutils "k8s.io/utils/net" ) // AddToNodeAddresses appends the NodeAddresses to the passed-by-pointer slice, @@ -40,74 +36,3 @@ func AddToNodeAddresses(addresses *[]v1.NodeAddress, addAddresses ...v1.NodeAddr } } } - -// PreferNodeIP filters node addresses to prefer a specific node IP or address -// family. -// -// If nodeIP is either '0.0.0.0' or '::' it is taken to represent any address of -// that address family: IPv4 or IPv6. i.e. if nodeIP is '0.0.0.0' we will return -// node addresses sorted such that all IPv4 addresses are listed before IPv6 -// addresses. -// -// If nodeIP is a specific IP, either IPv4 or IPv6, we will return node -// addresses filtered such that: -// * Any address matching nodeIP will be listed first. -// * If nodeIP matches an address of a particular type (internal or external), -// that will be the *only* address of that type returned. -// * All remaining addresses are listed after. -func PreferNodeIP(nodeIP net.IP, cloudNodeAddresses []v1.NodeAddress) ([]v1.NodeAddress, error) { - // If nodeIP is unset, just use the addresses provided by the cloud provider as-is - if nodeIP == nil { - return cloudNodeAddresses, nil - } - - // nodeIP is "0.0.0.0" or "::"; sort cloudNodeAddresses to - // prefer addresses of the matching family - if nodeIP.IsUnspecified() { - preferIPv4 := nodeIP.To4() != nil - isPreferredIPFamily := func(ip net.IP) bool { return (ip.To4() != nil) == preferIPv4 } - - sortedAddresses := make([]v1.NodeAddress, 0, len(cloudNodeAddresses)) - for _, nodeAddress := range cloudNodeAddresses { - ip := netutils.ParseIPSloppy(nodeAddress.Address) - if ip == nil || isPreferredIPFamily(ip) { - sortedAddresses = append(sortedAddresses, nodeAddress) - } - } - for _, nodeAddress := range cloudNodeAddresses { - ip := netutils.ParseIPSloppy(nodeAddress.Address) - if ip != nil && !isPreferredIPFamily(ip) { - sortedAddresses = append(sortedAddresses, nodeAddress) - } - } - return sortedAddresses, nil - } - - // For every address supplied by the cloud provider that matches nodeIP, nodeIP is the enforced node address for - // that address Type (like InternalIP and ExternalIP), meaning other addresses of the same Type are discarded. - // See #61921 for more information: some cloud providers may supply secondary IPs, so nodeIP serves as a way to - // ensure that the correct IPs show up on a Node object. - enforcedNodeAddresses := []v1.NodeAddress{} - - nodeIPTypes := make(map[v1.NodeAddressType]bool) - for _, nodeAddress := range cloudNodeAddresses { - if netutils.ParseIPSloppy(nodeAddress.Address).Equal(nodeIP) { - enforcedNodeAddresses = append(enforcedNodeAddresses, v1.NodeAddress{Type: nodeAddress.Type, Address: nodeAddress.Address}) - nodeIPTypes[nodeAddress.Type] = true - } - } - - // nodeIP must be among the addresses supplied by the cloud provider - if len(enforcedNodeAddresses) == 0 { - return nil, fmt.Errorf("failed to get node address from cloud provider that matches ip: %v", nodeIP) - } - - // nodeIP was found, now use all other addresses supplied by the cloud provider NOT of the same Type as nodeIP. - for _, nodeAddress := range cloudNodeAddresses { - if !nodeIPTypes[nodeAddress.Type] { - enforcedNodeAddresses = append(enforcedNodeAddresses, v1.NodeAddress{Type: nodeAddress.Type, Address: nodeAddress.Address}) - } - } - - return enforcedNodeAddresses, nil -} diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/codec/OWNERS b/cluster-autoscaler/vendor/k8s.io/component-base/codec/OWNERS index 3eb32c52bbae..b2a353625545 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-base/codec/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/component-base/codec/OWNERS @@ -4,8 +4,8 @@ # decoding KRM style manifests. approvers: - - sig-api-machinery-api-approvers +- sig-api-machinery-api-approvers reviewers: - - sig-api-machinery-api-reviewers +- sig-api-machinery-api-reviewers labels: - - sig/api-machinery +- sig/api-machinery diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/config/OWNERS b/cluster-autoscaler/vendor/k8s.io/component-base/config/OWNERS index 7243d3cc82a9..8d65ac8f2042 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-base/config/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/component-base/config/OWNERS @@ -4,10 +4,14 @@ options: no_parent_owners: true approvers: - - api-approvers +- api-approvers reviewers: - - api-reviewers +- api-reviewers +emeritus_reviewers: +- luxas +- mtaufen +- sttts labels: - - kind/api-change - - sig/api-machinery - - sig/scheduling +- kind/api-change +- sig/api-machinery +- sig/scheduling diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/config/options/leaderelectionconfig.go b/cluster-autoscaler/vendor/k8s.io/component-base/config/options/leaderelectionconfig.go index 5c671a1b79bd..6bf4ed23796e 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-base/config/options/leaderelectionconfig.go +++ b/cluster-autoscaler/vendor/k8s.io/component-base/config/options/leaderelectionconfig.go @@ -42,8 +42,8 @@ func BindLeaderElectionFlags(l *config.LeaderElectionConfiguration, fs *pflag.Fl "of a leadership. This is only applicable if leader election is enabled.") fs.StringVar(&l.ResourceLock, "leader-elect-resource-lock", l.ResourceLock, ""+ "The type of resource object that is used for locking during "+ - "leader election. Supported options are 'leases', 'endpointsleases' "+ - "and 'configmapsleases'.") + "leader election. Supported options are 'endpoints', 'configmaps', "+ + "'leases', 'endpointsleases' and 'configmapsleases'.") fs.StringVar(&l.ResourceName, "leader-elect-resource-name", l.ResourceName, ""+ "The name of resource object that is used for locking during "+ "leader election.") diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/config/types.go b/cluster-autoscaler/vendor/k8s.io/component-base/config/types.go index 4a4c13a5da6b..52336173c22f 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-base/config/types.go +++ b/cluster-autoscaler/vendor/k8s.io/component-base/config/types.go @@ -93,9 +93,8 @@ type LoggingConfiguration struct { // Format Flag specifies the structure of log messages. // default value of format is `text` Format string - // Maximum number of nanoseconds (i.e. 1s = 1000000000) between log - // flushes. Ignored if the selected logging backend writes log - // messages without buffering. + // Maximum number of seconds between log flushes. Ignored if the + // selected logging backend writes log messages without buffering. FlushFrequency time.Duration // Verbosity is the threshold that determines which log messages are // logged. Default is zero which logs only the most important @@ -105,6 +104,9 @@ type LoggingConfiguration struct { // VModule overrides the verbosity threshold for individual files. // Only supported for "text" log format. VModule VModuleConfiguration + // [Experimental] When enabled prevents logging of fields tagged as sensitive (passwords, keys, tokens). + // Runtime log sanitization may introduce significant computation overhead and therefore should not be enabled in production.`) + Sanitization bool // [Experimental] Options holds additional parameters that are specific // to the different logging formats. Only the options for the selected // format get used, but all of them get validated. diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/config/v1alpha1/types.go b/cluster-autoscaler/vendor/k8s.io/component-base/config/v1alpha1/types.go index 71a2e9e88751..734e0d97039d 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-base/config/v1alpha1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/component-base/config/v1alpha1/types.go @@ -90,9 +90,8 @@ type LoggingConfiguration struct { // Format Flag specifies the structure of log messages. // default value of format is `text` Format string `json:"format,omitempty"` - // Maximum number of nanoseconds (i.e. 1s = 1000000000) between log - // flushes. Ignored if the selected logging backend writes log - // messages without buffering. + // Maximum number of seconds between log flushes. Ignored if the + // selected logging backend writes log messages without buffering. FlushFrequency time.Duration `json:"flushFrequency"` // Verbosity is the threshold that determines which log messages are // logged. Default is zero which logs only the most important @@ -102,6 +101,9 @@ type LoggingConfiguration struct { // VModule overrides the verbosity threshold for individual files. // Only supported for "text" log format. VModule VModuleConfiguration `json:"vmodule,omitempty"` + // [Experimental] When enabled prevents logging of fields tagged as sensitive (passwords, keys, tokens). + // Runtime log sanitization may introduce significant computation overhead and therefore should not be enabled in production.`) + Sanitization bool `json:"sanitization,omitempty"` // [Experimental] Options holds additional parameters that are specific // to the different logging formats. Only the options for the selected // format get used, but all of them get validated. diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/config/v1alpha1/zz_generated.conversion.go b/cluster-autoscaler/vendor/k8s.io/component-base/config/v1alpha1/zz_generated.conversion.go index 4162e095dc9f..93cf4cc649b1 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-base/config/v1alpha1/zz_generated.conversion.go +++ b/cluster-autoscaler/vendor/k8s.io/component-base/config/v1alpha1/zz_generated.conversion.go @@ -226,6 +226,7 @@ func autoConvert_v1alpha1_LoggingConfiguration_To_config_LoggingConfiguration(in out.FlushFrequency = time.Duration(in.FlushFrequency) out.Verbosity = config.VerbosityLevel(in.Verbosity) out.VModule = *(*config.VModuleConfiguration)(unsafe.Pointer(&in.VModule)) + out.Sanitization = in.Sanitization if err := Convert_v1alpha1_FormatOptions_To_config_FormatOptions(&in.Options, &out.Options, s); err != nil { return err } @@ -237,6 +238,7 @@ func autoConvert_config_LoggingConfiguration_To_v1alpha1_LoggingConfiguration(in out.FlushFrequency = time.Duration(in.FlushFrequency) out.Verbosity = uint32(in.Verbosity) out.VModule = *(*VModuleConfiguration)(unsafe.Pointer(&in.VModule)) + out.Sanitization = in.Sanitization if err := Convert_config_FormatOptions_To_v1alpha1_FormatOptions(&in.Options, &out.Options, s); err != nil { return err } diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/configz/OWNERS b/cluster-autoscaler/vendor/k8s.io/component-base/configz/OWNERS index 3c2009a85b70..46bfc4718ec7 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-base/configz/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/component-base/configz/OWNERS @@ -8,9 +8,10 @@ options: no_parent_owners: true approvers: - - api-approvers +- api-approvers reviewers: - - api-reviewers +- api-reviewers + labels: - - kind/api-change - - sig/cluster-lifecycle +- kind/api-change +- sig/cluster-lifecycle diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/featuregate/OWNERS b/cluster-autoscaler/vendor/k8s.io/component-base/featuregate/OWNERS index b2f165b6d5bc..48e811bf4c80 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-base/featuregate/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/component-base/featuregate/OWNERS @@ -7,10 +7,11 @@ options: no_parent_owners: true approvers: - - api-approvers +- api-approvers reviewers: - - api-reviewers +- api-reviewers + labels: - - kind/api-change - - sig/api-machinery - - sig/cluster-lifecycle +- kind/api-change +- sig/api-machinery +- sig/cluster-lifecycle diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/logs/OWNERS b/cluster-autoscaler/vendor/k8s.io/component-base/logs/OWNERS index 57f049d79d9a..456ede6025d1 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-base/logs/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/component-base/logs/OWNERS @@ -1,12 +1,11 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - sig-instrumentation-approvers - - serathius - - pohly +- sig-instrumentation-approvers +- serathius reviewers: - - sig-instrumentation-reviewers - - serathius +- sig-instrumentation-reviewers +- serathius labels: - - sig/instrumentation - - wg/structured-logging +- sig/instrumentation +- wg/structured-logging diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/logs/config.go b/cluster-autoscaler/vendor/k8s.io/component-base/logs/config.go index 4df04efe215a..a3fe6fb5fc41 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-base/logs/config.go +++ b/cluster-autoscaler/vendor/k8s.io/component-base/logs/config.go @@ -71,6 +71,8 @@ func BindLoggingFlags(c *config.LoggingConfiguration, fs *pflag.FlagSet) { fs.DurationVar(&c.FlushFrequency, logFlushFreqFlagName, logFlushFreq, "Maximum number of seconds between log flushes") fs.VarP(&c.Verbosity, "v", "v", "number for the log level verbosity") fs.Var(&c.VModule, "vmodule", "comma-separated list of pattern=N settings for file-filtered logging (only works for text log format)") + fs.BoolVar(&c.Sanitization, "experimental-logging-sanitization", c.Sanitization, `[Experimental] When enabled prevents logging of fields tagged as sensitive (passwords, keys, tokens). +Runtime log sanitization may introduce significant computation overhead and therefore should not be enabled in production.`) // JSON options. We only register them if "json" is a valid format. The // config file API however always has them. diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/logs/datapol/datapol.go b/cluster-autoscaler/vendor/k8s.io/component-base/logs/datapol/datapol.go new file mode 100644 index 000000000000..6ec8fb12d393 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/component-base/logs/datapol/datapol.go @@ -0,0 +1,99 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package datapol contains functions to determine if objects contain sensitive +// data to e.g. make decisions on whether to log them or not. +package datapol + +import ( + "reflect" + "strings" + + "k8s.io/klog/v2" +) + +// Verify returns a list of the datatypes contained in the argument that can be +// considered sensitive w.r.t. to logging +func Verify(value interface{}) []string { + defer func() { + if r := recover(); r != nil { + //TODO maybe export a metric + klog.Warningf("Error while inspecting arguments for sensitive data: %v", r) + } + }() + t := reflect.ValueOf(value) + if t.Kind() == reflect.Ptr { + t = t.Elem() + } + return datatypes(t) +} + +func datatypes(v reflect.Value) []string { + if types := byType(v.Type()); len(types) > 0 { + // Slices, and maps can be nil or empty, only the nil case is zero + switch v.Kind() { + case reflect.Slice, reflect.Map: + if !v.IsZero() && v.Len() > 0 { + return types + } + default: + if !v.IsZero() { + return types + } + } + } + switch v.Kind() { + case reflect.Interface: + return datatypes(v.Elem()) + case reflect.Slice, reflect.Array: + for i := 0; i < v.Len(); i++ { + if types := datatypes(v.Index(i)); len(types) > 0 { + return types + } + } + case reflect.Map: + mapIter := v.MapRange() + for mapIter.Next() { + k := mapIter.Key() + v := mapIter.Value() + if types := datatypes(k); len(types) > 0 { + return types + } + if types := datatypes(v); len(types) > 0 { + return types + } + } + case reflect.Struct: + t := v.Type() + numField := t.NumField() + + for i := 0; i < numField; i++ { + f := t.Field(i) + if f.Type.Kind() == reflect.Ptr { + continue + } + if reason, ok := f.Tag.Lookup("datapolicy"); ok { + if !v.Field(i).IsZero() { + return strings.Split(reason, ",") + } + } + if types := datatypes(v.Field(i)); len(types) > 0 { + return types + } + } + } + return nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/logs/datapol/externaltypes.go b/cluster-autoscaler/vendor/k8s.io/component-base/logs/datapol/externaltypes.go new file mode 100644 index 000000000000..d343d3e65911 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/component-base/logs/datapol/externaltypes.go @@ -0,0 +1,49 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package datapol + +import ( + "fmt" + "reflect" +) + +const ( + httpHeader = "net/http.Header" + httpCookie = "net/http.Cookie" + x509Certificate = "crypto/x509.Certificate" +) + +// GlobalDatapolicyMapping returns the list of sensitive datatypes are embedded +// in types not native to Kubernetes. +func GlobalDatapolicyMapping(v interface{}) []string { + return byType(reflect.TypeOf(v)) +} + +func byType(t reflect.Type) []string { + // Use string representation of the type to prevent taking a depency on the actual type. + switch fmt.Sprintf("%s.%s", t.PkgPath(), t.Name()) { + case httpHeader: + return []string{"password", "token"} + case httpCookie: + return []string{"token"} + case x509Certificate: + return []string{"security-key"} + default: + return nil + } + +} diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/logs/kube_features.go b/cluster-autoscaler/vendor/k8s.io/component-base/logs/kube_features.go deleted file mode 100644 index b8ddf09df3fc..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/component-base/logs/kube_features.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package logs - -import ( - "k8s.io/component-base/featuregate" -) - -const ( - // owner: @pohly - // kep: http://kep.k8s.io/3077 - // alpha: v1.24 - // - // Enables looking up a logger from a context.Context instead of using - // the global fallback logger and manipulating the logger that is - // used by a call chain. - ContextualLogging featuregate.Feature = "ContextualLogging" - - // contextualLoggingDefault must remain false while in alpha. It can - // become true in beta. - contextualLoggingDefault = false -) - -func featureGates() map[featuregate.Feature]featuregate.FeatureSpec { - return map[featuregate.Feature]featuregate.FeatureSpec{ - ContextualLogging: {Default: contextualLoggingDefault, PreRelease: featuregate.Alpha}, - } -} - -// AddFeatureGates adds all feature gates used by this package. -func AddFeatureGates(mutableFeatureGate featuregate.MutableFeatureGate) error { - return mutableFeatureGate.Add(featureGates()) -} diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/logs/logs.go b/cluster-autoscaler/vendor/k8s.io/component-base/logs/logs.go index da815e116694..0f494deedd0d 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-base/logs/logs.go +++ b/cluster-autoscaler/vendor/k8s.io/component-base/logs/logs.go @@ -26,6 +26,7 @@ import ( "time" "github.com/spf13/pflag" + "k8s.io/apimachinery/pkg/util/wait" "k8s.io/klog/v2" ) @@ -40,6 +41,7 @@ const deprecated = "will be removed in a future release, see https://github.com/ var ( packageFlags = flag.NewFlagSet("logging", flag.ContinueOnError) + logrFlush func() // Periodic flushing gets configured either via the global flag // in this file or via LoggingConfiguration. @@ -168,28 +170,14 @@ func (writer KlogWriter) Write(data []byte) (n int, err error) { // InitLogs initializes logs the way we want for Kubernetes. // It should be called after parsing flags. If called before that, // it will use the default log settings. -// -// InitLogs disables support for contextual logging in klog while -// that Kubernetes feature is not considered stable yet. Commands -// which want to support contextual logging can: -// - call klog.EnableContextualLogging after calling InitLogs, -// with a fixed `true` or depending on some command line flag or -// a feature gate check -// - set up a FeatureGate instance, the advanced logging configuration -// with Options and call Options.ValidateAndApply with the FeatureGate; -// k8s.io/component-base/logs/example/cmd demonstrates how to do that func InitLogs() { log.SetOutput(KlogWriter{}) log.SetFlags(0) if logFlushFreqAdded { // The flag from this file was activated, so use it now. // Otherwise LoggingConfiguration.Apply will do this. - klog.StartFlushDaemon(logFlushFreq) + go wait.Forever(FlushLogs, logFlushFreq) } - - // This is the default in Kubernetes. Options.ValidateAndApply - // will override this with the result of a feature gate check. - klog.EnableContextualLogging(false) } // FlushLogs flushes logs immediately. This should be called at the end of @@ -197,6 +185,9 @@ func InitLogs() { // are printed before exiting the program. func FlushLogs() { klog.Flush() + if logrFlush != nil { + logrFlush() + } } // NewLogger creates a new log.Logger which sends logs to klog.Info. diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/logs/options.go b/cluster-autoscaler/vendor/k8s.io/component-base/logs/options.go index 91e602992f69..8e3e9fffe217 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-base/logs/options.go +++ b/cluster-autoscaler/vendor/k8s.io/component-base/logs/options.go @@ -22,10 +22,11 @@ import ( "github.com/spf13/pflag" utilerrors "k8s.io/apimachinery/pkg/util/errors" + "k8s.io/apimachinery/pkg/util/wait" "k8s.io/component-base/config" "k8s.io/component-base/config/v1alpha1" - "k8s.io/component-base/featuregate" "k8s.io/component-base/logs/registry" + "k8s.io/component-base/logs/sanitization" "k8s.io/klog/v2" ) @@ -47,15 +48,12 @@ func NewOptions() *Options { // This should be invoked as early as possible because then the rest of the program // startup (including validation of other options) will already run with the final // logging configuration. -// -// The optional FeatureGate controls logging features. If nil, the default for -// these features is used. -func (o *Options) ValidateAndApply(featureGate featuregate.FeatureGate) error { +func (o *Options) ValidateAndApply() error { errs := o.validate() if len(errs) > 0 { return utilerrors.NewAggregate(errs) } - o.apply(featureGate) + o.apply() return nil } @@ -78,23 +76,18 @@ func (o *Options) AddFlags(fs *pflag.FlagSet) { } // apply set klog logger from LogFormat type -func (o *Options) apply(featureGate featuregate.FeatureGate) { - contextualLoggingEnabled := contextualLoggingDefault - if featureGate != nil { - contextualLoggingEnabled = featureGate.Enabled(ContextualLogging) - } - +func (o *Options) apply() { // if log format not exists, use nil loggr factory, _ := registry.LogRegistry.Get(o.Config.Format) if factory == nil { klog.ClearLogger() } else { - // This logger will do its own verbosity checking, using the exact same - // configuration as klog itself. - log, flush := factory.Create(o.Config) - // Therefore it can get called directly. However, we only allow that - // when the feature is enabled. - klog.SetLoggerWithOptions(log, klog.ContextualLogger(contextualLoggingEnabled), klog.FlushLogger(flush)) + log, flush := factory.Create(o.Config.Options) + klog.SetLogger(log) + logrFlush = flush + } + if o.Config.Sanitization { + klog.SetLogFilter(&sanitization.SanitizingFilter{}) } if err := loggingFlags.Lookup("v").Value.Set(o.Config.Verbosity.String()); err != nil { panic(fmt.Errorf("internal error while setting klog verbosity: %v", err)) @@ -102,6 +95,5 @@ func (o *Options) apply(featureGate featuregate.FeatureGate) { if err := loggingFlags.Lookup("vmodule").Value.Set(o.Config.VModule.String()); err != nil { panic(fmt.Errorf("internal error while setting klog vmodule: %v", err)) } - klog.StartFlushDaemon(o.Config.FlushFrequency) - klog.EnableContextualLogging(contextualLoggingEnabled) + go wait.Forever(FlushLogs, o.Config.FlushFrequency) } diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/logs/registry/registry.go b/cluster-autoscaler/vendor/k8s.io/component-base/logs/registry/registry.go index be2c3260c9e5..145c0b8fd032 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-base/logs/registry/registry.go +++ b/cluster-autoscaler/vendor/k8s.io/component-base/logs/registry/registry.go @@ -41,7 +41,7 @@ type LogFormatFactory interface { // Returning a flush function for the logger is optional. // If provided, the caller must ensure that it is called // periodically (if desired) and at program exit. - Create(c config.LoggingConfiguration) (log logr.Logger, flush func()) + Create(options config.FormatOptions) (log logr.Logger, flush func()) } // NewLogFormatRegistry return new init LogFormatRegistry struct diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/logs/sanitization/sanitization.go b/cluster-autoscaler/vendor/k8s.io/component-base/logs/sanitization/sanitization.go new file mode 100644 index 000000000000..0d1b7d52f42e --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/component-base/logs/sanitization/sanitization.go @@ -0,0 +1,69 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package sanitization + +import ( + "fmt" + + "k8s.io/component-base/logs/datapol" +) + +const ( + datapolMsgFmt = "Log message has been redacted. Log argument #%d contains: %v" + datapolMsg = "Log message has been redacted." +) + +// SanitizingFilter implements the LogFilter interface from klog with a set of functions that inspects the arguments with the datapol library +type SanitizingFilter struct{} + +// Filter is the filter function for the non-formatting logging functions of klog. +func (sf *SanitizingFilter) Filter(args []interface{}) []interface{} { + for i, v := range args { + types := datapol.Verify(v) + if len(types) > 0 { + return []interface{}{fmt.Sprintf(datapolMsgFmt, i, types)} + } + } + return args +} + +// FilterF is the filter function for the formatting logging functions of klog +func (sf *SanitizingFilter) FilterF(fmt string, args []interface{}) (string, []interface{}) { + for i, v := range args { + types := datapol.Verify(v) + if len(types) > 0 { + return datapolMsgFmt, []interface{}{i, types} + } + } + return fmt, args + +} + +// FilterS is the filter for the structured logging functions of klog. +func (sf *SanitizingFilter) FilterS(msg string, keysAndValues []interface{}) (string, []interface{}) { + for i, v := range keysAndValues { + types := datapol.Verify(v) + if len(types) > 0 { + if i%2 == 0 { + return datapolMsg, []interface{}{"key_index", i, "types", types} + } + // since we scanned linearly we can safely log the key. + return datapolMsg, []interface{}{"key", keysAndValues[i-1], "types", types} + } + } + return msg, keysAndValues +} diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/metrics/OWNERS b/cluster-autoscaler/vendor/k8s.io/component-base/metrics/OWNERS index be371a4a097e..6010d505f653 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-base/metrics/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/component-base/metrics/OWNERS @@ -1,11 +1,11 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - sig-instrumentation-approvers - - logicalhan - - RainbowMango +- sig-instrumentation-approvers +- logicalhan +- RainbowMango reviewers: - - sig-instrumentation-reviewers - - YoyinZyc +- sig-instrumentation-reviewers +- YoyinZyc labels: - - sig/instrumentation +- sig/instrumentation diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/metrics/collector.go b/cluster-autoscaler/vendor/k8s.io/component-base/metrics/collector.go index 113b903ec27a..61ad951e5b9f 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-base/metrics/collector.go +++ b/cluster-autoscaler/vendor/k8s.io/component-base/metrics/collector.go @@ -19,7 +19,7 @@ package metrics import ( "fmt" - "github.com/blang/semver/v4" + "github.com/blang/semver" "github.com/prometheus/client_golang/prometheus" ) diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/metrics/counter.go b/cluster-autoscaler/vendor/k8s.io/component-base/metrics/counter.go index 7342dc37d1e1..addf680c87b6 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-base/metrics/counter.go +++ b/cluster-autoscaler/vendor/k8s.io/component-base/metrics/counter.go @@ -18,7 +18,7 @@ package metrics import ( "context" - "github.com/blang/semver/v4" + "github.com/blang/semver" "github.com/prometheus/client_golang/prometheus" dto "github.com/prometheus/client_model/go" ) @@ -212,13 +212,13 @@ func (v *CounterVec) Reset() { func (v *CounterVec) WithContext(ctx context.Context) *CounterVecWithContext { return &CounterVecWithContext{ ctx: ctx, - CounterVec: v, + CounterVec: *v, } } // CounterVecWithContext is the wrapper of CounterVec with context. type CounterVecWithContext struct { - *CounterVec + CounterVec ctx context.Context } diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/metrics/desc.go b/cluster-autoscaler/vendor/k8s.io/component-base/metrics/desc.go index 50eefd587fb7..e53e3ee18913 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-base/metrics/desc.go +++ b/cluster-autoscaler/vendor/k8s.io/component-base/metrics/desc.go @@ -20,7 +20,7 @@ import ( "fmt" "sync" - "github.com/blang/semver/v4" + "github.com/blang/semver" "github.com/prometheus/client_golang/prometheus" "k8s.io/klog/v2" diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/metrics/gauge.go b/cluster-autoscaler/vendor/k8s.io/component-base/metrics/gauge.go index 168221ecdd57..a8d9c201016f 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-base/metrics/gauge.go +++ b/cluster-autoscaler/vendor/k8s.io/component-base/metrics/gauge.go @@ -18,7 +18,7 @@ package metrics import ( "context" - "github.com/blang/semver/v4" + "github.com/blang/semver" "github.com/prometheus/client_golang/prometheus" "k8s.io/component-base/version" @@ -189,8 +189,8 @@ func (v *GaugeVec) Reset() { v.GaugeVec.Reset() } -func newGaugeFunc(opts *GaugeOpts, function func() float64, v semver.Version) GaugeFunc { - g := NewGauge(opts) +func newGaugeFunc(opts GaugeOpts, function func() float64, v semver.Version) GaugeFunc { + g := NewGauge(&opts) if !g.Create(&v) { return nil @@ -205,7 +205,7 @@ func newGaugeFunc(opts *GaugeOpts, function func() float64, v semver.Version) Ga // concurrently. If that results in concurrent calls to Write, like in the case // where a GaugeFunc is directly registered with Prometheus, the provided // function must be concurrency-safe. -func NewGaugeFunc(opts *GaugeOpts, function func() float64) GaugeFunc { +func NewGaugeFunc(opts GaugeOpts, function func() float64) GaugeFunc { v := parseVersion(version.Get()) return newGaugeFunc(opts, function, v) @@ -215,13 +215,13 @@ func NewGaugeFunc(opts *GaugeOpts, function func() float64) GaugeFunc { func (v *GaugeVec) WithContext(ctx context.Context) *GaugeVecWithContext { return &GaugeVecWithContext{ ctx: ctx, - GaugeVec: v, + GaugeVec: *v, } } // GaugeVecWithContext is the wrapper of GaugeVec with context. type GaugeVecWithContext struct { - *GaugeVec + GaugeVec ctx context.Context } diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/metrics/histogram.go b/cluster-autoscaler/vendor/k8s.io/component-base/metrics/histogram.go index e93c7a4b3ffe..9dd75388b33e 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-base/metrics/histogram.go +++ b/cluster-autoscaler/vendor/k8s.io/component-base/metrics/histogram.go @@ -18,7 +18,7 @@ package metrics import ( "context" - "github.com/blang/semver/v4" + "github.com/blang/semver" "github.com/prometheus/client_golang/prometheus" ) @@ -199,13 +199,13 @@ func (v *HistogramVec) Reset() { func (v *HistogramVec) WithContext(ctx context.Context) *HistogramVecWithContext { return &HistogramVecWithContext{ ctx: ctx, - HistogramVec: v, + HistogramVec: *v, } } // HistogramVecWithContext is the wrapper of HistogramVec with context. type HistogramVecWithContext struct { - *HistogramVec + HistogramVec ctx context.Context } diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/metrics/legacyregistry/registry.go b/cluster-autoscaler/vendor/k8s.io/component-base/metrics/legacyregistry/registry.go index c0092a365774..56a9dcae58bc 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-base/metrics/legacyregistry/registry.go +++ b/cluster-autoscaler/vendor/k8s.io/component-base/metrics/legacyregistry/registry.go @@ -53,6 +53,9 @@ func init() { // Handler returns an HTTP handler for the DefaultGatherer. It is // already instrumented with InstrumentHandler (using "prometheus" as handler // name). +// +// Deprecated: Please note the issues described in the doc comment of +// InstrumentHandler. You might want to consider using promhttp.Handler instead. func Handler() http.Handler { return promhttp.InstrumentMetricHandler(prometheus.DefaultRegisterer, promhttp.HandlerFor(defaultRegistry, promhttp.HandlerOpts{})) } diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/metrics/metric.go b/cluster-autoscaler/vendor/k8s.io/component-base/metrics/metric.go index c72aecfc6b40..2f7b880d862a 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-base/metrics/metric.go +++ b/cluster-autoscaler/vendor/k8s.io/component-base/metrics/metric.go @@ -19,7 +19,7 @@ package metrics import ( "sync" - "github.com/blang/semver/v4" + "github.com/blang/semver" "github.com/prometheus/client_golang/prometheus" dto "github.com/prometheus/client_model/go" @@ -169,8 +169,8 @@ func (r *lazyMetric) ClearState() { r.isDeprecated = false r.isHidden = false r.isCreated = false - r.markDeprecationOnce = sync.Once{} - r.createOnce = sync.Once{} + r.markDeprecationOnce = *(new(sync.Once)) + r.createOnce = *(new(sync.Once)) } // FQName returns the fully-qualified metric name of the collector. diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/metrics/options.go b/cluster-autoscaler/vendor/k8s.io/component-base/metrics/options.go index 7a59b7ba1696..456fe0b0a302 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-base/metrics/options.go +++ b/cluster-autoscaler/vendor/k8s.io/component-base/metrics/options.go @@ -20,7 +20,7 @@ import ( "fmt" "regexp" - "github.com/blang/semver/v4" + "github.com/blang/semver" "github.com/spf13/pflag" "k8s.io/component-base/version" diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/metrics/prometheus/ratelimiter/OWNERS b/cluster-autoscaler/vendor/k8s.io/component-base/metrics/prometheus/ratelimiter/OWNERS index 676c25f169f7..676675f33a12 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-base/metrics/prometheus/ratelimiter/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/component-base/metrics/prometheus/ratelimiter/OWNERS @@ -1,9 +1,9 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - sig-instrumentation-approvers - - logicalhan +- sig-instrumentation-approvers +- logicalhan reviewers: - - sig-instrumentation-reviewers +- sig-instrumentation-reviewers labels: - - sig/instrumentation +- sig/instrumentation \ No newline at end of file diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/metrics/prometheus/restclient/metrics.go b/cluster-autoscaler/vendor/k8s.io/component-base/metrics/prometheus/restclient/metrics.go index 7f4eea3498b9..21e4bb359984 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-base/metrics/prometheus/restclient/metrics.go +++ b/cluster-autoscaler/vendor/k8s.io/component-base/metrics/prometheus/restclient/metrics.go @@ -29,47 +29,24 @@ import ( ) var ( - // requestLatency is a Prometheus Histogram metric type partitioned by - // "verb", and "host" labels. It is used for the rest client latency metrics. + // requestLatency is a Prometheus Summary metric type partitioned by + // "verb" and "url" labels. It is used for the rest client latency metrics. requestLatency = k8smetrics.NewHistogramVec( &k8smetrics.HistogramOpts{ - Name: "rest_client_request_duration_seconds", - Help: "Request latency in seconds. Broken down by verb, and host.", - StabilityLevel: k8smetrics.ALPHA, - Buckets: []float64{0.005, 0.025, 0.1, 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, 15.0, 30.0, 60.0}, - }, - []string{"verb", "host"}, - ) - - requestSize = k8smetrics.NewHistogramVec( - &k8smetrics.HistogramOpts{ - Name: "rest_client_request_size_bytes", - Help: "Request size in bytes. Broken down by verb and host.", - StabilityLevel: k8smetrics.ALPHA, - // 64 bytes to 16MB - Buckets: []float64{64, 256, 512, 1024, 4096, 16384, 65536, 262144, 1048576, 4194304, 16777216}, - }, - []string{"verb", "host"}, - ) - - responseSize = k8smetrics.NewHistogramVec( - &k8smetrics.HistogramOpts{ - Name: "rest_client_response_size_bytes", - Help: "Response size in bytes. Broken down by verb and host.", - StabilityLevel: k8smetrics.ALPHA, - // 64 bytes to 16MB - Buckets: []float64{64, 256, 512, 1024, 4096, 16384, 65536, 262144, 1048576, 4194304, 16777216}, + Name: "rest_client_request_duration_seconds", + Help: "Request latency in seconds. Broken down by verb and URL.", + Buckets: k8smetrics.ExponentialBuckets(0.001, 2, 10), }, - []string{"verb", "host"}, + []string{"verb", "url"}, ) rateLimiterLatency = k8smetrics.NewHistogramVec( &k8smetrics.HistogramOpts{ Name: "rest_client_rate_limiter_duration_seconds", - Help: "Client side rate limiter latency in seconds. Broken down by verb, and host.", - Buckets: []float64{0.005, 0.025, 0.1, 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, 15.0, 30.0, 60.0}, + Help: "Client side rate limiter latency in seconds. Broken down by verb and URL.", + Buckets: k8smetrics.ExponentialBuckets(0.001, 2, 10), }, - []string{"verb", "host"}, + []string{"verb", "url"}, ) requestResult = k8smetrics.NewCounterVec( @@ -83,7 +60,7 @@ var ( execPluginCertTTLAdapter = &expiryToTTLAdapter{} execPluginCertTTL = k8smetrics.NewGaugeFunc( - &k8smetrics.GaugeOpts{ + k8smetrics.GaugeOpts{ Name: "rest_client_exec_plugin_ttl_seconds", Help: "Gauge of the shortest TTL (time-to-live) of the client " + "certificate(s) managed by the auth exec plugin. The value " + @@ -144,8 +121,6 @@ var ( func init() { legacyregistry.MustRegister(requestLatency) - legacyregistry.MustRegister(requestSize) - legacyregistry.MustRegister(responseSize) legacyregistry.MustRegister(rateLimiterLatency) legacyregistry.MustRegister(requestResult) legacyregistry.RawMustRegister(execPluginCertTTL) @@ -154,8 +129,6 @@ func init() { ClientCertExpiry: execPluginCertTTLAdapter, ClientCertRotationAge: &rotationAdapter{m: execPluginCertRotation}, RequestLatency: &latencyAdapter{m: requestLatency}, - RequestSize: &sizeAdapter{m: requestSize}, - ResponseSize: &sizeAdapter{m: responseSize}, RateLimiterLatency: &latencyAdapter{m: rateLimiterLatency}, RequestResult: &resultAdapter{requestResult}, ExecPluginCalls: &callsAdapter{m: execPluginCalls}, @@ -167,15 +140,7 @@ type latencyAdapter struct { } func (l *latencyAdapter) Observe(ctx context.Context, verb string, u url.URL, latency time.Duration) { - l.m.WithContext(ctx).WithLabelValues(verb, u.Host).Observe(latency.Seconds()) -} - -type sizeAdapter struct { - m *k8smetrics.HistogramVec -} - -func (s *sizeAdapter) Observe(ctx context.Context, verb string, host string, size float64) { - s.m.WithContext(ctx).WithLabelValues(verb, host).Observe(size) + l.m.WithContext(ctx).WithLabelValues(verb, u.String()).Observe(latency.Seconds()) } type resultAdapter struct { diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/metrics/registry.go b/cluster-autoscaler/vendor/k8s.io/component-base/metrics/registry.go index 6c97bb504ff0..b01bc011e3b8 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-base/metrics/registry.go +++ b/cluster-autoscaler/vendor/k8s.io/component-base/metrics/registry.go @@ -21,7 +21,7 @@ import ( "sync" "sync/atomic" - "github.com/blang/semver/v4" + "github.com/blang/semver" "github.com/prometheus/client_golang/prometheus" dto "github.com/prometheus/client_model/go" diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/metrics/summary.go b/cluster-autoscaler/vendor/k8s.io/component-base/metrics/summary.go index fb1108f92454..4732b02e308e 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-base/metrics/summary.go +++ b/cluster-autoscaler/vendor/k8s.io/component-base/metrics/summary.go @@ -18,7 +18,7 @@ package metrics import ( "context" - "github.com/blang/semver/v4" + "github.com/blang/semver" "github.com/prometheus/client_golang/prometheus" ) @@ -193,13 +193,13 @@ func (v *SummaryVec) Reset() { func (v *SummaryVec) WithContext(ctx context.Context) *SummaryVecWithContext { return &SummaryVecWithContext{ ctx: ctx, - SummaryVec: v, + SummaryVec: *v, } } // SummaryVecWithContext is the wrapper of SummaryVec with context. type SummaryVecWithContext struct { - *SummaryVec + SummaryVec ctx context.Context } diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/metrics/version_parser.go b/cluster-autoscaler/vendor/k8s.io/component-base/metrics/version_parser.go index 102e108e2bb9..d52bd74bdfd0 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-base/metrics/version_parser.go +++ b/cluster-autoscaler/vendor/k8s.io/component-base/metrics/version_parser.go @@ -20,7 +20,7 @@ import ( "fmt" "regexp" - "github.com/blang/semver/v4" + "github.com/blang/semver" apimachineryversion "k8s.io/apimachinery/pkg/version" ) diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/traces/OWNERS b/cluster-autoscaler/vendor/k8s.io/component-base/traces/OWNERS index b26e7a4dc7e3..58b1a4d7b4d0 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-base/traces/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/component-base/traces/OWNERS @@ -1,8 +1,8 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - sig-instrumentation-approvers +- sig-instrumentation-approvers reviewers: - - sig-instrumentation-reviewers +- sig-instrumentation-reviewers labels: - - sig/instrumentation +- sig/instrumentation diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/version/.gitattributes b/cluster-autoscaler/vendor/k8s.io/component-base/version/.gitattributes new file mode 100644 index 000000000000..7e349eff60bd --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/component-base/version/.gitattributes @@ -0,0 +1 @@ +base.go export-subst diff --git a/cluster-autoscaler/vendor/k8s.io/component-base/version/OWNERS b/cluster-autoscaler/vendor/k8s.io/component-base/version/OWNERS index 08c7aea9c7ca..329ea147483a 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-base/version/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/component-base/version/OWNERS @@ -6,11 +6,12 @@ # each release. approvers: - - sig-api-machinery-api-approvers - - release-engineering-approvers +- sig-api-machinery-api-approvers +- release-engineering-approvers reviewers: - - sig-api-machinery-api-reviewers - - release-managers +- sig-api-machinery-api-reviewers +- release-managers + labels: - - sig/api-machinery - - sig/release +- sig/api-machinery +- sig/release diff --git a/cluster-autoscaler/vendor/k8s.io/component-helpers/storage/volume/helpers.go b/cluster-autoscaler/vendor/k8s.io/component-helpers/storage/volume/helpers.go index 7ec376f34a07..a76e9334480f 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-helpers/storage/volume/helpers.go +++ b/cluster-autoscaler/vendor/k8s.io/component-helpers/storage/volume/helpers.go @@ -16,13 +16,7 @@ limitations under the License. package volume -import ( - "fmt" - - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/component-helpers/scheduling/corev1" -) +import v1 "k8s.io/api/core/v1" // GetPersistentVolumeClaimClass returns StorageClassName. If no storage class was // requested, it returns "". @@ -48,23 +42,3 @@ func GetPersistentVolumeClass(volume *v1.PersistentVolume) string { return volume.Spec.StorageClassName } - -// CheckNodeAffinity looks at the PV node affinity, and checks if the node has the same corresponding labels -// This ensures that we don't mount a volume that doesn't belong to this node -func CheckNodeAffinity(pv *v1.PersistentVolume, nodeLabels map[string]string) error { - if pv.Spec.NodeAffinity == nil { - return nil - } - - if pv.Spec.NodeAffinity.Required != nil { - node := &v1.Node{ObjectMeta: metav1.ObjectMeta{Labels: nodeLabels}} - terms := pv.Spec.NodeAffinity.Required - if matches, err := corev1.MatchNodeSelectorTerms(node, terms); err != nil { - return err - } else if !matches { - return fmt.Errorf("no matching NodeSelectorTerms") - } - } - - return nil -} diff --git a/cluster-autoscaler/vendor/k8s.io/cri-api/pkg/apis/runtime/v1/api.pb.go b/cluster-autoscaler/vendor/k8s.io/cri-api/pkg/apis/runtime/v1/api.pb.go index 15d76cac3a74..f8762ae63a00 100644 --- a/cluster-autoscaler/vendor/k8s.io/cri-api/pkg/apis/runtime/v1/api.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/cri-api/pkg/apis/runtime/v1/api.pb.go @@ -1241,7 +1241,7 @@ type RunPodSandboxRequest struct { // If the runtime handler is unknown, this request should be rejected. An // empty string should select the default handler, equivalent to the // behavior before this feature was added. - // See https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class + // See https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class/README.md RuntimeHandler string `protobuf:"bytes,2,opt,name=runtime_handler,json=runtimeHandler,proto3" json:"runtime_handler,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1608,7 +1608,6 @@ func (m *PodIP) GetIp() string { } // PodSandboxNetworkStatus is the status of the network for a PodSandbox. -// Currently ignored for pods sharing the host networking namespace. type PodSandboxNetworkStatus struct { // IP address of the PodSandbox. Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` @@ -2493,9 +2492,9 @@ func (m *ListPodSandboxStatsResponse) GetStats() []*PodSandboxStats { // PodSandboxAttributes provides basic information of the pod sandbox. type PodSandboxAttributes struct { - // ID of the pod sandbox. + // ID of the pod. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // Metadata of the pod sandbox. + // Metadata of the pod. Metadata *PodSandboxMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` // Key-value pairs that may be used to scope and select individual resources. Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` @@ -3331,22 +3330,13 @@ func (m *SELinuxOption) GetLevel() string { } // Capability contains the container capabilities to add or drop -// Dropping a capability will drop it from all sets. -// If a capability is added to only the add_capabilities list then it gets added to permitted, -// inheritable, effective and bounding sets, i.e. all sets except the ambient set. -// If a capability is added to only the add_ambient_capabilities list then it gets added to all sets, i.e permitted -// inheritable, effective, bounding and ambient sets. -// If a capability is added to add_capabilities and add_ambient_capabilities lists then it gets added to all sets, i.e. -// permitted, inheritable, effective, bounding and ambient sets. type Capability struct { // List of capabilities to add. AddCapabilities []string `protobuf:"bytes,1,rep,name=add_capabilities,json=addCapabilities,proto3" json:"add_capabilities,omitempty"` // List of capabilities to drop. - DropCapabilities []string `protobuf:"bytes,2,rep,name=drop_capabilities,json=dropCapabilities,proto3" json:"drop_capabilities,omitempty"` - // List of ambient capabilities to add. - AddAmbientCapabilities []string `protobuf:"bytes,3,rep,name=add_ambient_capabilities,json=addAmbientCapabilities,proto3" json:"add_ambient_capabilities,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + DropCapabilities []string `protobuf:"bytes,2,rep,name=drop_capabilities,json=dropCapabilities,proto3" json:"drop_capabilities,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Capability) Reset() { *m = Capability{} } @@ -3395,13 +3385,6 @@ func (m *Capability) GetDropCapabilities() []string { return nil } -func (m *Capability) GetAddAmbientCapabilities() []string { - if m != nil { - return m.AddAmbientCapabilities - } - return nil -} - // LinuxContainerSecurityContext holds linux security configuration that will be applied to a container. type LinuxContainerSecurityContext struct { // Capabilities to add or drop. @@ -3930,9 +3913,7 @@ type WindowsContainerResources struct { // Specifies the portion of processor cycles that this container can use as a percentage times 100. CpuMaximum int64 `protobuf:"varint,3,opt,name=cpu_maximum,json=cpuMaximum,proto3" json:"cpu_maximum,omitempty"` // Memory limit in bytes. Default: 0 (not specified). - MemoryLimitInBytes int64 `protobuf:"varint,4,opt,name=memory_limit_in_bytes,json=memoryLimitInBytes,proto3" json:"memory_limit_in_bytes,omitempty"` - // Specifies the size of the rootfs / scratch space in bytes to be configured for this container. Default: 0 (not specified). - RootfsSizeInBytes int64 `protobuf:"varint,5,opt,name=rootfs_size_in_bytes,json=rootfsSizeInBytes,proto3" json:"rootfs_size_in_bytes,omitempty"` + MemoryLimitInBytes int64 `protobuf:"varint,4,opt,name=memory_limit_in_bytes,json=memoryLimitInBytes,proto3" json:"memory_limit_in_bytes,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } @@ -3997,13 +3978,6 @@ func (m *WindowsContainerResources) GetMemoryLimitInBytes() int64 { return 0 } -func (m *WindowsContainerResources) GetRootfsSizeInBytes() int64 { - if m != nil { - return m.RootfsSizeInBytes - } - return 0 -} - // ContainerMetadata holds all necessary information for building the container // name. The container runtime is encouraged to expose the metadata in its user // interface for better user experience. E.g., runtime can construct a unique @@ -8089,362 +8063,358 @@ func init() { func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) } var fileDescriptor_00212fb1f9d3bf1c = []byte{ - // 5678 bytes of a gzipped FileDescriptorProto - 0x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 0x75, 0xa5, 0x88, 0x05, 0x4d, 0xeb, 0x6d, 0xa8, - 0xc6, 0xd6, 0x77, 0x16, 0xfd, 0x6d, 0xbd, 0x07, 0x8d, 0xe4, 0x9a, 0xce, 0xa4, 0xff, 0x23, 0x58, - 0xd6, 0x46, 0x76, 0x34, 0x35, 0xe1, 0x32, 0xdf, 0x86, 0x39, 0xae, 0x0d, 0x4c, 0x19, 0x2f, 0xe7, - 0x89, 0x55, 0xe3, 0xb8, 0x71, 0xef, 0xf7, 0xc4, 0xb0, 0xcd, 0x01, 0xf6, 0xf8, 0x88, 0xc2, 0xfb, - 0xfd, 0x88, 0x41, 0xd5, 0x77, 0xe1, 0x7c, 0x62, 0x58, 0xee, 0x7c, 0x7f, 0x05, 0xea, 0xae, 0x63, - 0xea, 0x3e, 0x03, 0x13, 0xcf, 0x83, 0xdb, 0x44, 0x37, 0xc4, 0xdd, 0x33, 0x09, 0x79, 0x37, 0x70, - 0xdc, 0xf4, 0xb4, 0xa7, 0x23, 0x6f, 0xc2, 0x85, 0x24, 0x39, 0x1b, 0x5e, 0x7d, 0x1f, 0x56, 0x34, - 0x3c, 0x74, 0x9e, 0xe0, 0xe7, 0x65, 0xdd, 0x82, 0x66, 0x9a, 0x01, 0x67, 0xfe, 0x6d, 0x58, 0x89, - 0xa0, 0xdd, 0xc0, 0x08, 0x46, 0xfe, 0x99, 0x98, 0xf3, 0x97, 0xc9, 0x23, 0xc7, 0x67, 0x1b, 0x59, - 0xd6, 0x44, 0x53, 0x5d, 0x81, 0xd9, 0x8e, 0x63, 0xee, 0x75, 0x50, 0x1d, 0x0a, 0x96, 0xcb, 0x89, - 0x0b, 0x96, 0xab, 0xf6, 0xe2, 0x63, 0xee, 0x33, 0x9f, 0x91, 0x0d, 0x9d, 0x44, 0x45, 0x77, 0xa0, - 0x6e, 0x98, 0xa6, 0x45, 0x14, 0xc9, 0x18, 0xe8, 0x96, 0xcb, 0x1e, 0x10, 0xd5, 0xcd, 0xa5, 0xc4, -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 0x8f, 0xcc, 0x70, 0x4c, 0x92, - 0x86, 0x61, 0xaa, 0xff, 0xac, 0xc0, 0xf9, 0x44, 0xd7, 0x98, 0x83, 0xff, 0xdd, 0xd4, 0x01, 0x66, - 0xf6, 0xee, 0x76, 0xce, 0x28, 0x7f, 0xc0, 0x53, 0xfc, 0x4d, 0x68, 0xc9, 0xdb, 0x23, 0x89, 0xf6, - 0xed, 0xc4, 0x51, 0x5e, 0x9b, 0x38, 0xe9, 0xf0, 0x3c, 0x77, 0xe0, 0x52, 0x26, 0xe3, 0xb4, 0xcc, - 0x8b, 0x53, 0xca, 0xfc, 0x7f, 0x0a, 0x71, 0x9b, 0xdd, 0x0e, 0x02, 0xcf, 0x7a, 0x34, 0x0a, 0xf0, - 0xe7, 0xeb, 0xe8, 0xec, 0x84, 0x27, 0x9b, 0xd9, 0xd9, 0x57, 0xb3, 0x29, 0xa3, 0xd1, 0x33, 0xcf, - 0x78, 0x57, 0x3e, 0xe3, 0x25, 0xca, 0xea, 0xf5, 0x89, 0xac, 0x72, 0x4f, 0xfb, 0x17, 0x79, 0x88, - 0xff, 0x45, 0x81, 0xc5, 0xc4, 0xae, 0xa0, 0xbb, 0x00, 0x46, 0x38, 0x75, 0xae, 0x1f, 0x57, 0x27, - 0x2d, 0x51, 0x8b, 0xd1, 0x90, 0x3b, 0x91, 0xf9, 0x70, 0x19, 0x77, 0x62, 0x86, 0x0f, 0x17, 0xba, - 0x70, 0xef, 0x44, 0x0f, 0x50, 0x16, 0xb8, 0x54, 0x73, 0x1f, 0xa0, 0x8c, 0x56, 0x90, 0xa8, 0x3f, - 0x2a, 0xc0, 0x72, 0x16, 0x77, 0xf4, 0x12, 0x14, 0x7b, 0xee, 0x88, 0xaf, 0x44, 0x4a, 0x01, 0x6c, - 0xbb, 0xa3, 0x23, 0xdf, 0xe8, 0x63, 0x8d, 0x20, 0xa0, 0x0d, 0x98, 0x1b, 0xe2, 0xa1, 0xe3, 0x9d, - 0xf2, 0x79, 0x4b,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0xad, 0x11, 0x39, 0xa7, 0xa5, 0x54, - 0xe9, 0x9c, 0xc6, 0x11, 0xd0, 0xab, 0x30, 0x6f, 0xd2, 0xfd, 0x10, 0x3e, 0x34, 0x92, 0x2a, 0x13, - 0x68, 0x97, 0x26, 0x50, 0xd0, 0xfb, 0x61, 0xb4, 0xaa, 0x92, 0x0e, 0x23, 0x27, 0xc4, 0x9c, 0x19, - 0xa8, 0xda, 0x97, 0x1f, 0x62, 0x90, 0x8e, 0x79, 0x25, 0xb9, 0xe4, 0x47, 0xa4, 0x2f, 0x42, 0x79, - 0xe0, 0xf4, 0x99, 0x72, 0x54, 0x59, 0x3d, 0xe9, 0xc0, 0xe9, 0x53, 0xdd, 0x58, 0x86, 0x59, 0x3f, - 0x30, 0x2d, 0x9b, 0xba, 0x22, 0x65, 0x8d, 0x35, 0xc8, 0x19, 0xa4, 0x3f, 0x74, 0xc7, 0xee, 0xe1, - 0x66, 0x8d, 0x76, 0x55, 0x28, 0xe4, 0xc0, 0xee, 0xd1, 0x27, 0x59, 0x10, 0x9c, 0x36, 0xeb, 0x14, - 0x4e, 0x7e, 0x46, 0x41, 0xa3, 0xc5, 0x31, 0x41, 0xa3, 0xc4, 0x84, 0x33, 0x82, 0x46, 0x8d, 0xb1, - 0x41, 0xa3, 0x24, 0xed, 0x97, 0xa1, 0x68, 0xe1, 0xef, 0x14, 0xb8, 0xb0, 0x4d, 0x33, 0x0f, 0x31, - 0x13, 0x76, 0x96, 0x44, 0xfa, 0x1b, 0x61, 0x75, 0x43, 0x46, 0x8a, 0x3a, 0xb9, 0x62, 0x51, 0xdc, - 0xb0, 0x0d, 0x75, 0xc1, 0x96, 0x13, 0x17, 0xa7, 0x28, 0x8d, 0xa8, 0xf9, 0xf1, 0xa6, 0xfa, 0x0e, - 0xac, 0xa4, 0x66, 0xce, 0xe3, 0xbf, 0x6b, 0xb0, 0x10, 0x59, 0x9b, 0x70, 0xe2, 0xd5, 0x10, 0xb6, - 0x67, 0xaa, 0x5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, 0x0f, 0x97, 0xc2, - 0x7f, 0xee, 0xd2, 0xc5, 0x1e, 0xad, 0x00, 0xda, 0x81, 0x79, 0xf1, 0x0f, 0xbb, 0xa4, 0x7b, 0x4e, - 0xfe, 0x07, 0x63, 0xad, 0x4b, 0x99, 0x7d, 0xfc, 0xb5, 0x31, 0x83, 0x1e, 0x52, 0xef, 0x3f, 0xf6, - 0x29, 0xe7, 0xd5, 0x84, 0xc7, 0x9d, 0xfa, 0x62, 0xb4, 0xb5, 0x96, 0x83, 0x11, 0xf2, 0xfd, 0x36, - 0x71, 0xed, 0xe3, 0xff, 0xc7, 0x00, 0xad, 0xc9, 0x9e, 0x79, 0xc6, 0xbf, 0x48, 0x68, 0xa9, 0x79, - 0x28, 0x21, 0x6b, 0x1d, 0x1a, 0xc9, 0xff, 0x63, 0x80, 0xa4, 0x80, 0xf7, 0x98, 0x7f, 0x93, 0xd0, - 0xfa, 0x4a, 0x3e, 0x52, 0x7c, 0x80, 0xd4, 0xe7, 0xf9, 0xd7, 0xf2, 0x3f, 0x78, 0xce, 0x18, 0x60, - 0xdc, 0x57, 0xd1, 0x4c, 0x38, 0xf2, 0xd7, 0x76, 0x28, 0xf1, 0x45, 0x7c, 0xc6, 0x87, 0xba, 0xb2, - 0x70, 0xb2, 0x3f, 0xd2, 0x54, 0x67, 0xd0, 0xff, 0x83, 0xc5, 0x44, 0x11, 0x07, 0x92, 0x08, 0xb3, - 0x6b, 0x53, 0x5a, 0xd7, 0x72, 0x71, 0xe4, 0x5d, 0x8d, 0x17, 0x6a, 0x24, 0x77, 0x35, 0xa3, 0x00, - 0x24, 0xb9, 0xab, 0x99, 0x75, 0x1e, 0x54, 0x11, 0xa5, 0xa2, 0x0c, 0x59, 0x11, 0xb3, 0x8a, 0x40, - 0x5a, 0x6b, 0x39, 0x18, 0x71, 0x81, 0x24, 0xca, 0x32, 0x64, 0x81, 0x64, 0x17, 0x7c, 0xb4, 0xae, - 0xe5, 0xe2, 0x24, 0x77, 0x32, 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0x37, 0x38, 0xdf, 0x8d, 0x27, 0xaf, 0x3f, 0x9a, 0xa3, 0xff, 0x34, 0xf5, 0x8d, - 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x80, 0x8d, 0xf7, 0xd6, 0xee, 0x56, 0x00, 0x00, + // 5608 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x3c, 0x4b, 0x70, 0x1b, 0xc9, + 0x75, 0x1c, 0x00, 0x24, 0x81, 0x07, 0x02, 0x04, 0x5b, 0xa4, 0x08, 0x81, 0x12, 0x97, 0x1c, 0x79, + 0x3f, 0x92, 0x76, 0xb9, 0x5a, 0xae, 0x76, 0x2d, 0xd1, 0xda, 0x95, 0x20, 0x92, 0x92, 0xb8, 0x96, + 0x48, 0x78, 0x40, 0xca, 0xbf, 0x94, 0x27, 0x23, 0x4c, 0x13, 0x9c, 0x5d, 0x60, 0x66, 0x3c, 0x33, + 0x90, 0x44, 0x9f, 0x7c, 0x4d, 0x4e, 0xa9, 0x72, 0xb9, 0x5c, 0xe5, 0x4a, 0x55, 0x2a, 0xa7, 0x1c, + 0x7c, 0x70, 0x2e, 0x49, 0xa5, 0x2a, 0xe5, 0xe4, 0x92, 0x4a, 0x39, 0xa9, 0x72, 0x95, 0x2f, 0xa9, + 0xf2, 0x2d, 0xf6, 0xe6, 0x96, 0x43, 0x4e, 0x3e, 0xe4, 0x96, 0x54, 0xff, 0x06, 0xd3, 0x33, 0x83, + 0x01, 0xa8, 0x5d, 0x7b, 0xf7, 0x44, 0xf4, 0xeb, 0xf7, 0x5e, 0x77, 0xbf, 0x7e, 0xfd, 0xfa, 0xf5, + 0x7b, 0x6f, 0x08, 0x25, 0xc3, 0xb5, 0x36, 0x5c, 0xcf, 0x09, 0x1c, 0x04, 0xde, 0xc0, 0x0e, 0xac, + 0x3e, 0xde, 0x78, 0xf6, 0x4e, 0xe3, 0xad, 0xae, 0x15,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 0x7d, 0x16, + 0xd5, 0x8b, 0x05, 0x11, 0x22, 0xe8, 0x0c, 0x49, 0xfd, 0x10, 0xce, 0xcb, 0x7b, 0x75, 0x36, 0x77, + 0x42, 0x7d, 0x14, 0xf7, 0x47, 0x86, 0xe6, 0x8b, 0xeb, 0x47, 0x6a, 0x38, 0x26, 0x4e, 0xc3, 0x30, + 0xd5, 0x7f, 0x55, 0x60, 0x29, 0xd6, 0x35, 0xe2, 0xe0, 0x7f, 0x37, 0x71, 0x80, 0x99, 0xbd, 0xbb, + 0x91, 0x31, 0xca, 0x1f, 0xf1, 0x14, 0x7f, 0x13, 0x1a, 0xf2, 0xf6, 0x48, 0xa2, 0xbd, 0x15, 0x3b, + 0xca, 0xeb, 0x63, 0x27, 0x1d, 0x9e, 0xe7, 0x16, 0xac, 0xa4, 0x32, 0x4e, 0xca, 0x3c, 0x3f, 0xa1, + 0xcc, 0xff, 0x37, 0x17, 0xb5, 0xd9, 0xcd, 0x20, 0xf0, 0xac, 0xa7, 0x83, 0x00, 0x7f, 0xbe, 0x8e, + 0xce, 0x4e, 0x78, 0xb2, 0x99, 0x9d, 0x7d, 0x33, 0x9d, 0x72, 0x38, 0x7a, 0xea, 0x19, 0x6f, 0xcb, + 0x67, 0xbc, 0x40, 0x59, 0xbd, 0x33, 0x96, 0x55, 0xe6, 0x69, 0xff, 0x22, 0x0f, 0xf1, 0xbf, 0x29, + 0x30, 0x1f, 0xdb, 0x15, 0x74, 0x17, 0xc0, 0x08, 0xa7, 0xce, 0xf5, 0x63, 0x6d, 0xdc, 0x12, 0xb5, + 0x08, 0x0d, 0xb9, 0x13, 0x99, 0x0f, 0x97, 0x72, 0x27, 0xa6, 0xf8, 0x70, 0xa1, 0x0b, 0x77, 0x7b, + 0xf8, 0x00, 0x65, 0x81, 0x4b, 0x35, 0xf3, 0x01, 0xca, 0x68, 0x05, 0x89, 0xfa, 0xa3, 0x1c, 0x2c, + 0xa6, 0x71, 0x47, 0xaf, 0x41, 0xbe, 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0x3b, + 0x99, 0xcc, 0x26, 0xf3, 0x9d, 0x8c, 0x25, 0x70, 0xd5, 0xcc, 0xd4, 0x54, 0xda, 0x4e, 0xa6, 0xa7, + 0xaf, 0xd4, 0x29, 0xf4, 0x1c, 0xea, 0xa3, 0x92, 0x22, 0xe8, 0xda, 0x19, 0x72, 0x37, 0x8d, 0x37, + 0x27, 0x43, 0x0e, 0x07, 0xc6, 0x80, 0x92, 0xd7, 0x0c, 0x7a, 0x55, 0x16, 0xf7, 0x88, 0x6b, 0xac, + 0xf1, 0xda, 0x38, 0xb4, 0x70, 0x98, 0x07, 0x50, 0x14, 0xe9, 0x16, 0x24, 0x99, 0xc0, 0x58, 0x9a, + 0xa7, 0x71, 0x31, 0xbd, 0x33, 0x64, 0xf4, 0x35, 0x28, 0x10, 0x28, 0x5a, 0x8e, 0xe3, 0x09, 0x06, + 0xf5, 0x64, 0x47, 0x48, 0xdc, 0x84, 0x19, 0x96, 0x47, 0x40, 0x52, 0x20, 0x43, 0xca, 0x73, 0x34, + 0x1a, 0x69, 0x5d, 0x21, 0x8b, 0x16, 0xfb, 0x97, 0x84, 0x3c, 0x2d, 0x80, 0x56, 0xe3, 0xff, 0x55, + 0x48, 0xce, 0x3f, 0x34, 0x5e, 0x19, 0xd9, 0x1f, 0xd5, 0xd9, 0x98, 0xeb, 0xbd, 0x9e, 0xf1, 0x4e, + 0x4a, 0xd3, 0xd9, 0xf4, 0xd7, 0x17, 0xdb, 0xdc, 0xe4, 0xeb, 0x4c, 0xde, 0xdc, 0x91, 0x2f, 0x60, + 0x79, 0x73, 0x47, 0x3f, 0xf2, 0xd8, 0xd1, 0x88, 0x7f, 0xa2, 0xa9, 0x66, 0x7d, 0x26, 0x9c, 0x76, + 0x34, 0x46, 0x7c, 0x7e, 0xac, 0x4e, 0xa1, 0x13, 0x38, 0x97, 0xf2, 0x7d, 0x32, 0x7a, 0x6d, 0xb4, + 0xfd, 0x95, 0x46, 0x79, 0x7d, 0x2c, 0x5e, 0x74, 0xa4, 0x94, 0x58, 0xa0, 0x3c, 0xd2, 0xe8, 0x60, + 0xa4, 0x3c, 0x52, 0x56, 0x50, 0x91, 0x2a, 0x22, 0xb7, 0x21, 0x17, 0xd2, 0x02, 0x64, 0x29, 0x8a, + 0x18, 0xb7, 0x18, 0x9b, 0x7f, 0x95, 0x87, 0x39, 0x16, 0xc3, 0xe5, 0x0e, 0xc8, 0x63, 0x80, 0x61, + 0x3a, 0x04, 0x5d, 0x8a, 0x2f, 0x5b, 0xca, 0x31, 0x35, 0x56, 0x47, 0x75, 0x47, 0x15, 0x3d, 0x92, + 0x66, 0x90, 0x15, 0x3d, 0x99, 0x35, 0x91, 0x15, 0x3d, 0x25, 0x3f, 0xa1, 0x4e, 0xa1, 0x8f, 0xa0, + 0x14, 0x46, 0xb5, 0x91, 0x1c, 0x0f, 0x8f, 0x85, 0xe7, 0x1b, 0x97, 0x46, 0xf4, 0x46, 0x67, 0x17, + 0x09, 0x56, 0xcb, 0xb3, 0x4b, 0x06, 0xc2, 0xe5, 0xd9, 0xa5, 0x45, 0xb9, 0x87, 0xeb, 0x65, 0x61, + 0xaf, 0x94, 0xf5, 0x4a, 0xd1, 0xc5, 0x94, 0xf5, 0xca, 0xf1, 0x32, 0x75, 0xea, 0xde, 0xda, 0x2f, + 0x7f, 0xb7, 0xaa, 0xfc, 0xe6, 0x77, 0xab, 0x53, 0x3f, 0xfc, 0x74, 0x55, 0xf9, 0xe5, 0xa7, 0xab, + 0xca, 0xaf, 0x3f, 0x5d, 0x55, 0x7e, 0xfb, 0xe9, 0xaa, 0xf2, 0x17, 0xff, 0xb5, 0x3a, 0xf5, 0x9d, + 0xdc, 0xb3, 0x77, 0x9e, 0xce, 0xd0, 0x7f, 0x54, 0xfa, 0xee, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, + 0xc1, 0x57, 0xc0, 0x5a, 0x62, 0x56, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -8525,10 +8495,10 @@ type RuntimeServiceClient interface { ContainerStats(ctx context.Context, in *ContainerStatsRequest, opts ...grpc.CallOption) (*ContainerStatsResponse, error) // ListContainerStats returns stats of all running containers. ListContainerStats(ctx context.Context, in *ListContainerStatsRequest, opts ...grpc.CallOption) (*ListContainerStatsResponse, error) - // PodSandboxStats returns stats of the pod sandbox. If the pod sandbox does not + // PodSandboxStats returns stats of the pod. If the pod sandbox does not // exist, the call returns an error. PodSandboxStats(ctx context.Context, in *PodSandboxStatsRequest, opts ...grpc.CallOption) (*PodSandboxStatsResponse, error) - // ListPodSandboxStats returns stats of the pod sandboxes matching a filter. + // ListPodSandboxStats returns stats of the pods matching a filter. ListPodSandboxStats(ctx context.Context, in *ListPodSandboxStatsRequest, opts ...grpc.CallOption) (*ListPodSandboxStatsResponse, error) // UpdateRuntimeConfig updates the runtime configuration based on the given request. UpdateRuntimeConfig(ctx context.Context, in *UpdateRuntimeConfigRequest, opts ...grpc.CallOption) (*UpdateRuntimeConfigResponse, error) @@ -8828,10 +8798,10 @@ type RuntimeServiceServer interface { ContainerStats(context.Context, *ContainerStatsRequest) (*ContainerStatsResponse, error) // ListContainerStats returns stats of all running containers. ListContainerStats(context.Context, *ListContainerStatsRequest) (*ListContainerStatsResponse, error) - // PodSandboxStats returns stats of the pod sandbox. If the pod sandbox does not + // PodSandboxStats returns stats of the pod. If the pod sandbox does not // exist, the call returns an error. PodSandboxStats(context.Context, *PodSandboxStatsRequest) (*PodSandboxStatsResponse, error) - // ListPodSandboxStats returns stats of the pod sandboxes matching a filter. + // ListPodSandboxStats returns stats of the pods matching a filter. ListPodSandboxStats(context.Context, *ListPodSandboxStatsRequest) (*ListPodSandboxStatsResponse, error) // UpdateRuntimeConfig updates the runtime configuration based on the given request. UpdateRuntimeConfig(context.Context, *UpdateRuntimeConfigRequest) (*UpdateRuntimeConfigResponse, error) @@ -12141,15 +12111,6 @@ func (m *Capability) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.AddAmbientCapabilities) > 0 { - for iNdEx := len(m.AddAmbientCapabilities) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AddAmbientCapabilities[iNdEx]) - copy(dAtA[i:], m.AddAmbientCapabilities[iNdEx]) - i = encodeVarintApi(dAtA, i, uint64(len(m.AddAmbientCapabilities[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } if len(m.DropCapabilities) > 0 { for iNdEx := len(m.DropCapabilities) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.DropCapabilities[iNdEx]) @@ -12611,11 +12572,6 @@ func (m *WindowsContainerResources) MarshalToSizedBuffer(dAtA []byte) (int, erro _ = i var l int _ = l - if m.RootfsSizeInBytes != 0 { - i = encodeVarintApi(dAtA, i, uint64(m.RootfsSizeInBytes)) - i-- - dAtA[i] = 0x28 - } if m.MemoryLimitInBytes != 0 { i = encodeVarintApi(dAtA, i, uint64(m.MemoryLimitInBytes)) i-- @@ -16778,12 +16734,6 @@ func (m *Capability) Size() (n int) { n += 1 + l + sovApi(uint64(l)) } } - if len(m.AddAmbientCapabilities) > 0 { - for _, s := range m.AddAmbientCapabilities { - l = len(s) - n += 1 + l + sovApi(uint64(l)) - } - } return n } @@ -16969,9 +16919,6 @@ func (m *WindowsContainerResources) Size() (n int) { if m.MemoryLimitInBytes != 0 { n += 1 + sovApi(uint64(m.MemoryLimitInBytes)) } - if m.RootfsSizeInBytes != 0 { - n += 1 + sovApi(uint64(m.RootfsSizeInBytes)) - } return n } @@ -18994,7 +18941,6 @@ func (this *Capability) String() string { s := strings.Join([]string{`&Capability{`, `AddCapabilities:` + fmt.Sprintf("%v", this.AddCapabilities) + `,`, `DropCapabilities:` + fmt.Sprintf("%v", this.DropCapabilities) + `,`, - `AddAmbientCapabilities:` + fmt.Sprintf("%v", this.AddAmbientCapabilities) + `,`, `}`, }, "") return s @@ -19089,7 +19035,6 @@ func (this *WindowsContainerResources) String() string { `CpuCount:` + fmt.Sprintf("%v", this.CpuCount) + `,`, `CpuMaximum:` + fmt.Sprintf("%v", this.CpuMaximum) + `,`, `MemoryLimitInBytes:` + fmt.Sprintf("%v", this.MemoryLimitInBytes) + `,`, - `RootfsSizeInBytes:` + fmt.Sprintf("%v", this.RootfsSizeInBytes) + `,`, `}`, }, "") return s @@ -27990,38 +27935,6 @@ func (m *Capability) Unmarshal(dAtA []byte) error { } m.DropCapabilities = append(m.DropCapabilities, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AddAmbientCapabilities", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AddAmbientCapabilities = append(m.AddAmbientCapabilities, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipApi(dAtA[iNdEx:]) @@ -29344,25 +29257,6 @@ func (m *WindowsContainerResources) Unmarshal(dAtA []byte) error { break } } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RootfsSizeInBytes", wireType) - } - m.RootfsSizeInBytes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RootfsSizeInBytes |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipApi(dAtA[iNdEx:]) diff --git a/cluster-autoscaler/vendor/k8s.io/cri-api/pkg/apis/runtime/v1/api.proto b/cluster-autoscaler/vendor/k8s.io/cri-api/pkg/apis/runtime/v1/api.proto index c3dc84f16032..8f96c97ebc6d 100644 --- a/cluster-autoscaler/vendor/k8s.io/cri-api/pkg/apis/runtime/v1/api.proto +++ b/cluster-autoscaler/vendor/k8s.io/cri-api/pkg/apis/runtime/v1/api.proto @@ -18,7 +18,7 @@ limitations under the License. syntax = "proto3"; package runtime.v1; -option go_package = "k8s.io/cri-api/pkg/apis/runtime/v1"; +option go_package = "v1"; import "github.com/gogo/protobuf/gogoproto/gogo.proto"; @@ -103,10 +103,10 @@ service RuntimeService { // ListContainerStats returns stats of all running containers. rpc ListContainerStats(ListContainerStatsRequest) returns (ListContainerStatsResponse) {} - // PodSandboxStats returns stats of the pod sandbox. If the pod sandbox does not + // PodSandboxStats returns stats of the pod. If the pod sandbox does not // exist, the call returns an error. rpc PodSandboxStats(PodSandboxStatsRequest) returns (PodSandboxStatsResponse) {} - // ListPodSandboxStats returns stats of the pod sandboxes matching a filter. + // ListPodSandboxStats returns stats of the pods matching a filter. rpc ListPodSandboxStats(ListPodSandboxStatsRequest) returns (ListPodSandboxStatsResponse) {} // UpdateRuntimeConfig updates the runtime configuration based on the given request. @@ -409,7 +409,7 @@ message RunPodSandboxRequest { // If the runtime handler is unknown, this request should be rejected. An // empty string should select the default handler, equivalent to the // behavior before this feature was added. - // See https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class + // See https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class/README.md string runtime_handler = 2; } @@ -445,7 +445,6 @@ message PodIP{ string ip = 1; } // PodSandboxNetworkStatus is the status of the network for a PodSandbox. -// Currently ignored for pods sharing the host networking namespace. message PodSandboxNetworkStatus { // IP address of the PodSandbox. string ip = 1; @@ -588,9 +587,9 @@ message ListPodSandboxStatsResponse { // PodSandboxAttributes provides basic information of the pod sandbox. message PodSandboxAttributes { - // ID of the pod sandbox. + // ID of the pod. string id = 1; - // Metadata of the pod sandbox. + // Metadata of the pod. PodSandboxMetadata metadata = 2; // Key-value pairs that may be used to scope and select individual resources. map labels = 3; @@ -725,20 +724,11 @@ message SELinuxOption { } // Capability contains the container capabilities to add or drop -// Dropping a capability will drop it from all sets. -// If a capability is added to only the add_capabilities list then it gets added to permitted, -// inheritable, effective and bounding sets, i.e. all sets except the ambient set. -// If a capability is added to only the add_ambient_capabilities list then it gets added to all sets, i.e permitted -// inheritable, effective, bounding and ambient sets. -// If a capability is added to add_capabilities and add_ambient_capabilities lists then it gets added to all sets, i.e. -// permitted, inheritable, effective, bounding and ambient sets. message Capability { // List of capabilities to add. repeated string add_capabilities = 1; // List of capabilities to drop. repeated string drop_capabilities = 2; - // List of ambient capabilities to add. - repeated string add_ambient_capabilities = 3; } // LinuxContainerSecurityContext holds linux security configuration that will be applied to a container. @@ -822,7 +812,7 @@ message LinuxContainerConfig { LinuxContainerSecurityContext security_context = 2; } -// WindowsSandboxSecurityContext holds platform-specific configurations that will be +// WindowsSandboxSecurityContext holds platform-specific configurations that will be // applied to a sandbox. // These settings will only apply to the sandbox container. message WindowsSandboxSecurityContext { @@ -879,8 +869,6 @@ message WindowsContainerResources { int64 cpu_maximum = 3; // Memory limit in bytes. Default: 0 (not specified). int64 memory_limit_in_bytes = 4; - // Specifies the size of the rootfs / scratch space in bytes to be configured for this container. Default: 0 (not specified). - int64 rootfs_size_in_bytes = 5; } // ContainerMetadata holds all necessary information for building the container diff --git a/cluster-autoscaler/vendor/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.pb.go b/cluster-autoscaler/vendor/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.pb.go index 9f37999dedc4..dd1d1d84e933 100644 --- a/cluster-autoscaler/vendor/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.pb.go +++ b/cluster-autoscaler/vendor/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.pb.go @@ -1107,6 +1107,11 @@ type PodSandboxConfig struct { // E.g., // PodSandboxConfig.LogDirectory = `/var/log/pods//` // ContainerConfig.LogPath = `containerName/Instance#.log` + // + // WARNING: Log management and how kubelet should interface with the + // container logs are under active discussion in + // https://issues.k8s.io/24677. There *may* be future change of direction + // for logging as the discussion carries on. LogDirectory string `protobuf:"bytes,3,opt,name=log_directory,json=logDirectory,proto3" json:"log_directory,omitempty"` // DNS config for the sandbox. DnsConfig *DNSConfig `protobuf:"bytes,4,opt,name=dns_config,json=dnsConfig,proto3" json:"dns_config,omitempty"` @@ -1608,7 +1613,6 @@ func (m *PodIP) GetIp() string { } // PodSandboxNetworkStatus is the status of the network for a PodSandbox. -// Currently ignored for pods sharing the host networking namespace. type PodSandboxNetworkStatus struct { // IP address of the PodSandbox. Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` @@ -2340,7 +2344,7 @@ func (m *PodSandboxStatsResponse) GetStats() *PodSandboxStats { return nil } -// PodSandboxStatsFilter is used to filter the list of pod sandboxes to retrieve stats for. +// PodSandboxStatsFilter is used to filter pod sandboxes. // All those fields are combined with 'AND'. type PodSandboxStatsFilter struct { // ID of the pod sandbox. @@ -3072,6 +3076,8 @@ func (m *KeyValue) GetValue() string { // LinuxContainerResources specifies Linux specific configuration for // resources. +// TODO: Consider using Resources from opencontainers/runtime-spec/specs-go +// directly. type LinuxContainerResources struct { // CPU CFS (Completely Fair Scheduler) period. Default: 0 (not specified). CpuPeriod int64 `protobuf:"varint,1,opt,name=cpu_period,json=cpuPeriod,proto3" json:"cpu_period,omitempty"` @@ -3331,22 +3337,13 @@ func (m *SELinuxOption) GetLevel() string { } // Capability contains the container capabilities to add or drop -// Dropping a capability will drop it from all sets. -// If a capability is added to only the add_capabilities list then it gets added to permitted, -// inheritable, effective and bounding sets, i.e. all sets except the ambient set. -// If a capability is added to only the add_ambient_capabilities list then it gets added to all sets, i.e permitted -// inheritable, effective, bounding and ambient sets. -// If a capability is added to add_capabilities and add_ambient_capabilities lists then it gets added to all sets, i.e. -// permitted, inheritable, effective, bounding and ambient sets. type Capability struct { // List of capabilities to add. AddCapabilities []string `protobuf:"bytes,1,rep,name=add_capabilities,json=addCapabilities,proto3" json:"add_capabilities,omitempty"` // List of capabilities to drop. - DropCapabilities []string `protobuf:"bytes,2,rep,name=drop_capabilities,json=dropCapabilities,proto3" json:"drop_capabilities,omitempty"` - // List of ambient capabilities to add. - AddAmbientCapabilities []string `protobuf:"bytes,3,rep,name=add_ambient_capabilities,json=addAmbientCapabilities,proto3" json:"add_ambient_capabilities,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + DropCapabilities []string `protobuf:"bytes,2,rep,name=drop_capabilities,json=dropCapabilities,proto3" json:"drop_capabilities,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Capability) Reset() { *m = Capability{} } @@ -3395,13 +3392,6 @@ func (m *Capability) GetDropCapabilities() []string { return nil } -func (m *Capability) GetAddAmbientCapabilities() []string { - if m != nil { - return m.AddAmbientCapabilities - } - return nil -} - // LinuxContainerSecurityContext holds linux security configuration that will be applied to a container. type LinuxContainerSecurityContext struct { // Capabilities to add or drop. @@ -3689,7 +3679,7 @@ type WindowsSandboxSecurityContext struct { RunAsUsername string `protobuf:"bytes,1,opt,name=run_as_username,json=runAsUsername,proto3" json:"run_as_username,omitempty"` // The contents of the GMSA credential spec to use to run this container. CredentialSpec string `protobuf:"bytes,2,opt,name=credential_spec,json=credentialSpec,proto3" json:"credential_spec,omitempty"` - // Indicates whether the container requested to run as a HostProcess container. + // Indicates whether the container be asked to run as a HostProcess container. HostProcess bool `protobuf:"varint,3,opt,name=host_process,json=hostProcess,proto3" json:"host_process,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` @@ -3930,9 +3920,7 @@ type WindowsContainerResources struct { // Specifies the portion of processor cycles that this container can use as a percentage times 100. CpuMaximum int64 `protobuf:"varint,3,opt,name=cpu_maximum,json=cpuMaximum,proto3" json:"cpu_maximum,omitempty"` // Memory limit in bytes. Default: 0 (not specified). - MemoryLimitInBytes int64 `protobuf:"varint,4,opt,name=memory_limit_in_bytes,json=memoryLimitInBytes,proto3" json:"memory_limit_in_bytes,omitempty"` - // Specifies the size of the rootfs / scratch space in bytes to be configured for this container. Default: 0 (not specified). - RootfsSizeInBytes int64 `protobuf:"varint,5,opt,name=rootfs_size_in_bytes,json=rootfsSizeInBytes,proto3" json:"rootfs_size_in_bytes,omitempty"` + MemoryLimitInBytes int64 `protobuf:"varint,4,opt,name=memory_limit_in_bytes,json=memoryLimitInBytes,proto3" json:"memory_limit_in_bytes,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } @@ -3997,13 +3985,6 @@ func (m *WindowsContainerResources) GetMemoryLimitInBytes() int64 { return 0 } -func (m *WindowsContainerResources) GetRootfsSizeInBytes() int64 { - if m != nil { - return m.RootfsSizeInBytes - } - return 0 -} - // ContainerMetadata holds all necessary information for building the container // name. The container runtime is encouraged to expose the metadata in its user // interface for better user experience. E.g., runtime can construct a unique @@ -4185,6 +4166,8 @@ type ContainerConfig struct { LogPath string `protobuf:"bytes,11,opt,name=log_path,json=logPath,proto3" json:"log_path,omitempty"` // Variables for interactive containers, these have very specialized // use-cases (e.g. debugging). + // TODO: Determine if we need to continue supporting these fields that are + // part of Kubernetes's Container Spec. Stdin bool `protobuf:"varint,12,opt,name=stdin,proto3" json:"stdin,omitempty"` StdinOnce bool `protobuf:"varint,13,opt,name=stdin_once,json=stdinOnce,proto3" json:"stdin_once,omitempty"` Tty bool `protobuf:"varint,14,opt,name=tty,proto3" json:"tty,omitempty"` @@ -7752,7 +7735,7 @@ type MemoryUsage struct { Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // The amount of working set memory in bytes. WorkingSetBytes *UInt64Value `protobuf:"bytes,2,opt,name=working_set_bytes,json=workingSetBytes,proto3" json:"working_set_bytes,omitempty"` - // Available memory for use. This is defined as the memory limit - workingSetBytes. + // Available memory for use. This is defined as the memory limit = workingSetBytes. AvailableBytes *UInt64Value `protobuf:"bytes,3,opt,name=available_bytes,json=availableBytes,proto3" json:"available_bytes,omitempty"` // Total memory in use. This includes all memory regardless of when it was accessed. UsageBytes *UInt64Value `protobuf:"bytes,4,opt,name=usage_bytes,json=usageBytes,proto3" json:"usage_bytes,omitempty"` @@ -8089,365 +8072,360 @@ func init() { func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) } var fileDescriptor_00212fb1f9d3bf1c = []byte{ - // 5715 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x7c, 0x4d, 0x6c, 0x1b, 0xdb, - 0x75, 0xb0, 0x86, 0xa4, 0x24, 0xf2, 0x50, 0xa4, 0xa8, 0x6b, 0xd9, 0xa2, 0xe9, 0x67, 0xd9, 0x1e, - 0x3f, 0xff, 0xe6, 0x59, 0x8a, 0x95, 0x17, 0x3f, 0x5b, 0x7e, 0xcf, 0xb6, 0x2c, 0xc9, 0x36, 0x13, - 0x5b, 0xe2, 0x37, 0x94, 0x5e, 0xde, 0x4b, 0xf2, 0x61, 0x32, 0xe2, 0x5c, 0x51, 0x13, 0x93, 0x33, - 0x93, 0x99, 0xa1, 0x6d, 0xa5, 0x9b, 0x00, 0x01, 0xb2, 0xc8, 0xaa, 0x40, 0x51, 0x14, 0xe8, 0xa2, - 0x40, 0xda, 0x45, 0xd7, 0x69, 0xd1, 0x55, 0x57, 0x2d, 0x5a, 0x34, 0xe8, 0x0f, 0xda, 0x55, 0xd0, - 0x22, 0x5d, 0x34, 0xaf, 0x28, 0x50, 0x14, 0x28, 0x50, 0x74, 0xdd, 0x45, 0x71, 0xff, 0xe6, 0x8f, - 0x33, 0xe4, 0xd0, 0x7e, 0x7f, 0x5d, 0x91, 0xf7, 0xcc, 0x39, 0xe7, 0x9e, 0x7b, 0xee, 0xb9, 0xe7, - 0x9e, 0x7b, 0xcf, 0x99, 0x81, 0x92, 0x66, 0x1b, 0x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4, 0xd4, 0xa3, 0x7f, 0x44, 0x11, 0x67, 0x9b, 0x3a, 0xcc, - 0x76, 0xac, 0x7e, 0x5f, 0x33, 0x75, 0x51, 0x04, 0xca, 0x9b, 0x44, 0x7f, 0x9a, 0xd3, 0x65, 0xd7, - 0x4d, 0x25, 0x85, 0xfe, 0x27, 0xb3, 0x4d, 0x4e, 0xad, 0x86, 0x49, 0x6b, 0x3b, 0xe8, 0x84, 0x94, - 0x14, 0xe0, 0xa0, 0x2d, 0xc3, 0x41, 0x2b, 0x50, 0xc0, 0xe6, 0x0b, 0x71, 0x6f, 0x9d, 0x70, 0xbd, - 0x21, 0x0e, 0x2e, 0x0a, 0xc5, 0x43, 0xab, 0x30, 0xd3, 0x27, 0x76, 0x24, 0x32, 0x76, 0x4b, 0x29, - 0xc5, 0x92, 0x0a, 0x47, 0x43, 0x6b, 0x30, 0xab, 0xd3, 0x79, 0x12, 0xf1, 0x7a, 0x3d, 0xa1, 0x62, - 0x84, 0x22, 0x28, 0x02, 0x11, 0x6d, 0xfb, 0x77, 0x71, 0xa5, 0xb4, 0xeb, 0xf4, 0xd8, 0x54, 0x24, - 0x5e, 0xc3, 0xed, 0x45, 0x8f, 0x81, 0x90, 0x76, 0xaf, 0x17, 0xe7, 0x35, 0xfa, 0x7e, 0xfe, 0x34, - 0x14, 0x7b, 0x56, 0x97, 0x99, 0x51, 0x99, 0xd5, 0x17, 0xf7, 0xac, 0x2e, 0xb5, 0xa2, 0x45, 0x98, - 0x76, 0x3d, 0xdd, 0x30, 0x69, 0x90, 0x53, 0x54, 0x58, 0x83, 0xac, 0x56, 0xfa, 0x47, 0xb5, 0xcc, - 0x0e, 0xae, 0x57, 0xe8, 0xa3, 0x12, 0x85, 0xec, 0x9a, 0x1d, 0x7a, 0x20, 0xf4, 0xbc, 0xe3, 0x7a, - 0x95, 0xc2, 0xc9, 0xdf, 0xe0, 0x32, 0x6c, 0x7e, 0xe4, 0x65, 0x58, 0x4c, 0xec, 0x84, 0xcb,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14, 0x96, 0x35, 0xf6, 0xbb, 0xf6, 0x53, 0x47, 0x77, 0x62, 0xa9, 0xa3, - 0x0b, 0x63, 0xe5, 0xf5, 0x93, 0x46, 0x7f, 0x52, 0x80, 0x92, 0xff, 0x6c, 0x48, 0xe7, 0xc3, 0x6a, - 0xcb, 0x25, 0xa8, 0x2d, 0xbc, 0x03, 0xe7, 0xdf, 0x68, 0x07, 0x2e, 0x64, 0xde, 0x81, 0xcf, 0x40, - 0x89, 0xfe, 0xa1, 0xa5, 0xc2, 0x6c, 0x47, 0x2d, 0x52, 0x80, 0x82, 0x0f, 0x03, 0x33, 0x9c, 0x99, - 0xc8, 0x0c, 0x63, 0x79, 0xea, 0xd9, 0x78, 0x9e, 0xfa, 0xbe, 0xbf, 0x23, 0x16, 0xd3, 0xae, 0xb1, - 0x7d, 0xbe, 0x89, 0x7b, 0x61, 0xec, 0x4a, 0xb4, 0x94, 0x76, 0x25, 0x1a, 0x70, 0xf9, 0xd2, 0xe6, - 0xa1, 0xf6, 0x59, 0xf2, 0x39, 0x6c, 0x8b, 0xdc, 0xb3, 0xde, 0x8d, 0x64, 0x34, 0x58, 0xb2, 0xf1, - 0xcc, 0x88, 0x31, 0x46, 0x92, 0x19, 0xfb, 0x70, 0x2a, 0x32, 0x35, 0x41, 0x31, 0x5d, 0x36, 0xff, - 0x98, 0x52, 0x49, 0xf7, 0x3f, 0xd3, 0x21, 0xff, 0x92, 0x52, 0x24, 0x76, 0x7f, 0x28, 0x7b, 0x39, - 0xa1, 0x15, 0xdf, 0x8a, 0x96, 0x47, 0xbc, 0xa6, 0xd5, 0x0d, 0x55, 0x47, 0xd0, 0xc8, 0x45, 0x73, - 0xf8, 0x63, 0x16, 0xcd, 0x97, 0x38, 0x64, 0x83, 0x1e, 0x25, 0x0e, 0x0d, 0xd3, 0x70, 0x8f, 0xd8, - 0xf3, 0x19, 0x76, 0x94, 0x10, 0xa0, 0x0d, 0x7a, 0x1d, 0x89, 0x5f, 0x19, 0x9e, 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 0xc2, 0x52, 0x87, 0x32, 0x13, 0x49, 0x52, 0x0f, 0x67, 0x40, 0x92, 0xa4, 0x4e, 0x4a, 0x6f, 0x04, - 0x3a, 0x61, 0xf7, 0x97, 0xa9, 0x3a, 0x89, 0x5c, 0x1f, 0xa7, 0xea, 0x24, 0x7a, 0x09, 0x2a, 0x4f, - 0x3d, 0x7c, 0xf4, 0x8b, 0x5f, 0x2f, 0x4b, 0xff, 0xf8, 0xeb, 0xe5, 0xa9, 0x1f, 0x7d, 0xb2, 0x2c, - 0xfd, 0xe2, 0x93, 0x65, 0xe9, 0x1f, 0x3e, 0x59, 0x96, 0xfe, 0xe5, 0x93, 0x65, 0xe9, 0x37, 0xff, - 0x75, 0x79, 0xea, 0xdb, 0x57, 0x9f, 0xdf, 0x76, 0x57, 0x0c, 0x6b, 0xb5, 0xe3, 0x18, 0x37, 0x34, - 0xdb, 0x58, 0xb5, 0x9f, 0x77, 0x57, 0x35, 0xdb, 0x70, 0x57, 0x39, 0xf7, 0x55, 0xc1, 0xfd, 0x60, - 0x86, 0x7e, 0x27, 0xfa, 0x6b, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x56, 0x54, 0x2a, 0xed, - 0x5b, 0x00, 0x00, + // 5644 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x3c, 0x4b, 0x6c, 0x1b, 0x59, + 0x72, 0x6a, 0x92, 0x92, 0xc8, 0xa2, 0x48, 0xd1, 0xcf, 0xb2, 0x45, 0xd3, 0x63, 0xd9, 0x6e, 0x8f, + 0xbf, 0x33, 0x96, 0xd7, 0x9a, 0x19, 0xcf, 0x58, 0x9e, 0xb1, 0x2d, 0x4b, 0xb2, 0xcd, 0x5d, 0x5b, + 0x62, 0x9a, 0xd2, 0x7c, 0x76, 0x26, 0xe8, 0x6d, 0xb1, 0x9f, 0xa8, 0x1e, 0x93, 0xdd, 0x3d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xd6, 0x40, 0x5b, 0x51, 0xff, 0xcb, 0xf6, 0xe3, 0xd7, 0x13, + 0x32, 0x34, 0x82, 0xcf, 0x18, 0xa7, 0xfb, 0xb2, 0x9e, 0x73, 0x05, 0x8a, 0x3f, 0xc0, 0x87, 0xec, + 0xec, 0x92, 0x91, 0x4e, 0xfe, 0x79, 0x01, 0x16, 0x53, 0xee, 0xb6, 0x69, 0x50, 0x6b, 0x0f, 0x54, + 0x1b, 0x3b, 0x86, 0xa5, 0x0b, 0x35, 0x77, 0xec, 0x41, 0x8b, 0x02, 0xd0, 0x49, 0x20, 0x0d, 0xf5, + 0xb3, 0x81, 0xc5, 0x77, 0xc3, 0xbc, 0x52, 0xec, 0xd8, 0x83, 0xdf, 0x20, 0x6d, 0x41, 0xeb, 0x1e, + 0x68, 0x0e, 0x66, 0x46, 0xc6, 0x68, 0xdb, 0x14, 0x80, 0xae, 0xc3, 0x31, 0xe6, 0x92, 0xd4, 0x9e, + 0xd1, 0x37, 0xc8, 0x72, 0x0c, 0xd9, 0x54, 0x5e, 0x41, 0xec, 0xe5, 0x23, 0xf2, 0xae, 0x69, 0x32, + 0xfb, 0x91, 0xa1, 0x62, 0x59, 0x7d, 0xd5, 0xed, 0x58, 0x0e, 0x56, 0x35, 0xfd, 0x53, 0x6a, 0x43, + 0x79, 0xa5, 0x6c, 0x59, 0xfd, 0x36, 0x81, 0xad, 0xe9, 0x9f, 0xa2, 0xd3, 0x50, 0xee, 0xd8, 0x03, + 0x17, 0x7b, 0x2a, 0xf9, 0xa1, 0xb7, 0x05, 0x25, 0x05, 0x18, 0x68, 0xdd, 0x1e, 0xb8, 0x21, 0x84, + 0x3e, 0x89, 0x1e, 0x67, 0xc3, 0x08, 0x8f, 0x71, 0x9f, 0xa6, 0xff, 0x0e, 0x06, 0x5d, 0x6c, 0x6b, + 0x5d, 0xcc, 0x44, 0x13, 0xc7, 0xfc, 0x84, 0xf4, 0xdf, 0x43, 0x8e, 0x48, 0xc5, 0x54, 0xa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x69, 0x21, 0x25, 0x24, 0xa6, 0xe4, + 0x29, 0xf4, 0x3e, 0x94, 0xfc, 0xe4, 0x05, 0x4a, 0x4a, 0x7e, 0xc4, 0xb2, 0x33, 0x8d, 0x73, 0x23, + 0x71, 0xc2, 0x52, 0x87, 0x32, 0x13, 0x49, 0x52, 0x0f, 0x67, 0x40, 0x92, 0xa4, 0x4e, 0x4a, 0x6f, + 0x04, 0x3a, 0x61, 0xf7, 0x97, 0xa9, 0x3a, 0x89, 0x5c, 0x1f, 0xa7, 0xea, 0x24, 0x7a, 0x09, 0x2a, + 0x4f, 0xdd, 0xbb, 0xf0, 0xcb, 0x2f, 0x96, 0xa4, 0x7f, 0xfe, 0x62, 0x69, 0xea, 0xf3, 0x2f, 0x97, + 0xa4, 0x5f, 0x7e, 0xb9, 0x24, 0xfd, 0xd3, 0x97, 0x4b, 0xd2, 0xbf, 0x7e, 0xb9, 0x24, 0xfd, 0xf6, + 0xbf, 0x2d, 0x4d, 0xfd, 0xb0, 0x28, 0xa8, 0xf7, 0x66, 0xe8, 0x7f, 0x33, 0xbf, 0xf1, 0x7f, 0x01, + 0x00, 0x00, 0xff, 0xff, 0x86, 0xde, 0xb4, 0x0e, 0x61, 0x5b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -8494,8 +8472,7 @@ type RuntimeServiceClient interface { // StopContainer stops a running container with a grace period (i.e., timeout). // This call is idempotent, and must not return an error if the container has // already been stopped. - // The runtime must forcibly kill the container after the grace period is - // reached. + // TODO: what must the runtime do after the grace period is reached? StopContainer(ctx context.Context, in *StopContainerRequest, opts ...grpc.CallOption) (*StopContainerResponse, error) // RemoveContainer removes the container. If the container is running, the // container must be forcibly removed. @@ -8797,8 +8774,7 @@ type RuntimeServiceServer interface { // StopContainer stops a running container with a grace period (i.e., timeout). // This call is idempotent, and must not return an error if the container has // already been stopped. - // The runtime must forcibly kill the container after the grace period is - // reached. + // TODO: what must the runtime do after the grace period is reached? StopContainer(context.Context, *StopContainerRequest) (*StopContainerResponse, error) // RemoveContainer removes the container. If the container is running, the // container must be forcibly removed. @@ -12144,15 +12120,6 @@ func (m *Capability) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.AddAmbientCapabilities) > 0 { - for iNdEx := len(m.AddAmbientCapabilities) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AddAmbientCapabilities[iNdEx]) - copy(dAtA[i:], m.AddAmbientCapabilities[iNdEx]) - i = encodeVarintApi(dAtA, i, uint64(len(m.AddAmbientCapabilities[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } if len(m.DropCapabilities) > 0 { for iNdEx := len(m.DropCapabilities) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.DropCapabilities[iNdEx]) @@ -12614,11 +12581,6 @@ func (m *WindowsContainerResources) MarshalToSizedBuffer(dAtA []byte) (int, erro _ = i var l int _ = l - if m.RootfsSizeInBytes != 0 { - i = encodeVarintApi(dAtA, i, uint64(m.RootfsSizeInBytes)) - i-- - dAtA[i] = 0x28 - } if m.MemoryLimitInBytes != 0 { i = encodeVarintApi(dAtA, i, uint64(m.MemoryLimitInBytes)) i-- @@ -16781,12 +16743,6 @@ func (m *Capability) Size() (n int) { n += 1 + l + sovApi(uint64(l)) } } - if len(m.AddAmbientCapabilities) > 0 { - for _, s := range m.AddAmbientCapabilities { - l = len(s) - n += 1 + l + sovApi(uint64(l)) - } - } return n } @@ -16972,9 +16928,6 @@ func (m *WindowsContainerResources) Size() (n int) { if m.MemoryLimitInBytes != 0 { n += 1 + sovApi(uint64(m.MemoryLimitInBytes)) } - if m.RootfsSizeInBytes != 0 { - n += 1 + sovApi(uint64(m.RootfsSizeInBytes)) - } return n } @@ -18997,7 +18950,6 @@ func (this *Capability) String() string { s := strings.Join([]string{`&Capability{`, `AddCapabilities:` + fmt.Sprintf("%v", this.AddCapabilities) + `,`, `DropCapabilities:` + fmt.Sprintf("%v", this.DropCapabilities) + `,`, - `AddAmbientCapabilities:` + fmt.Sprintf("%v", this.AddAmbientCapabilities) + `,`, `}`, }, "") return s @@ -19092,7 +19044,6 @@ func (this *WindowsContainerResources) String() string { `CpuCount:` + fmt.Sprintf("%v", this.CpuCount) + `,`, `CpuMaximum:` + fmt.Sprintf("%v", this.CpuMaximum) + `,`, `MemoryLimitInBytes:` + fmt.Sprintf("%v", this.MemoryLimitInBytes) + `,`, - `RootfsSizeInBytes:` + fmt.Sprintf("%v", this.RootfsSizeInBytes) + `,`, `}`, }, "") return s @@ -27993,38 +27944,6 @@ func (m *Capability) Unmarshal(dAtA []byte) error { } m.DropCapabilities = append(m.DropCapabilities, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AddAmbientCapabilities", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AddAmbientCapabilities = append(m.AddAmbientCapabilities, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipApi(dAtA[iNdEx:]) @@ -29347,25 +29266,6 @@ func (m *WindowsContainerResources) Unmarshal(dAtA []byte) error { break } } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RootfsSizeInBytes", wireType) - } - m.RootfsSizeInBytes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RootfsSizeInBytes |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipApi(dAtA[iNdEx:]) diff --git a/cluster-autoscaler/vendor/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.proto b/cluster-autoscaler/vendor/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.proto index 3078f69bbc86..ba3230d183b9 100644 --- a/cluster-autoscaler/vendor/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.proto +++ b/cluster-autoscaler/vendor/k8s.io/cri-api/pkg/apis/runtime/v1alpha2/api.proto @@ -18,7 +18,7 @@ limitations under the License. syntax = "proto3"; package runtime.v1alpha2; -option go_package = "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"; +option go_package = "v1alpha2"; import "github.com/gogo/protobuf/gogoproto/gogo.proto"; @@ -66,8 +66,7 @@ service RuntimeService { // StopContainer stops a running container with a grace period (i.e., timeout). // This call is idempotent, and must not return an error if the container has // already been stopped. - // The runtime must forcibly kill the container after the grace period is - // reached. + // TODO: what must the runtime do after the grace period is reached? rpc StopContainer(StopContainerRequest) returns (StopContainerResponse) {} // RemoveContainer removes the container. If the container is running, the // container must be forcibly removed. @@ -372,6 +371,11 @@ message PodSandboxConfig { // E.g., // PodSandboxConfig.LogDirectory = `/var/log/pods//` // ContainerConfig.LogPath = `containerName/Instance#.log` + // + // WARNING: Log management and how kubelet should interface with the + // container logs are under active discussion in + // https://issues.k8s.io/24677. There *may* be future change of direction + // for logging as the discussion carries on. string log_directory = 3; // DNS config for the sandbox. DNSConfig dns_config = 4; @@ -445,7 +449,6 @@ message PodIP{ string ip = 1; } // PodSandboxNetworkStatus is the status of the network for a PodSandbox. -// Currently ignored for pods sharing the host networking namespace. message PodSandboxNetworkStatus { // IP address of the PodSandbox. string ip = 1; @@ -565,7 +568,7 @@ message PodSandboxStatsResponse { PodSandboxStats stats = 1; } -// PodSandboxStatsFilter is used to filter the list of pod sandboxes to retrieve stats for. +// PodSandboxStatsFilter is used to filter pod sandboxes. // All those fields are combined with 'AND'. message PodSandboxStatsFilter { // ID of the pod sandbox. @@ -659,7 +662,7 @@ message NetworkInterfaceUsage { message ProcessUsage { // The time at which these stats were updated. int64 timestamp = 1; - // Number of processes. + // Number of processes. UInt64Value process_count = 2; } @@ -680,6 +683,8 @@ message KeyValue { // LinuxContainerResources specifies Linux specific configuration for // resources. +// TODO: Consider using Resources from opencontainers/runtime-spec/specs-go +// directly. message LinuxContainerResources { // CPU CFS (Completely Fair Scheduler) period. Default: 0 (not specified). int64 cpu_period = 1; @@ -725,20 +730,11 @@ message SELinuxOption { } // Capability contains the container capabilities to add or drop -// Dropping a capability will drop it from all sets. -// If a capability is added to only the add_capabilities list then it gets added to permitted, -// inheritable, effective and bounding sets, i.e. all sets except the ambient set. -// If a capability is added to only the add_ambient_capabilities list then it gets added to all sets, i.e permitted -// inheritable, effective, bounding and ambient sets. -// If a capability is added to add_capabilities and add_ambient_capabilities lists then it gets added to all sets, i.e. -// permitted, inheritable, effective, bounding and ambient sets. message Capability { // List of capabilities to add. repeated string add_capabilities = 1; // List of capabilities to drop. repeated string drop_capabilities = 2; - // List of ambient capabilities to add. - repeated string add_ambient_capabilities = 3; } // LinuxContainerSecurityContext holds linux security configuration that will be applied to a container. @@ -822,7 +818,7 @@ message LinuxContainerConfig { LinuxContainerSecurityContext security_context = 2; } -// WindowsSandboxSecurityContext holds platform-specific configurations that will be +// WindowsSandboxSecurityContext holds platform-specific configurations that will be // applied to a sandbox. // These settings will only apply to the sandbox container. message WindowsSandboxSecurityContext { @@ -834,7 +830,7 @@ message WindowsSandboxSecurityContext { // The contents of the GMSA credential spec to use to run this container. string credential_spec = 2; - // Indicates whether the container requested to run as a HostProcess container. + // Indicates whether the container be asked to run as a HostProcess container. bool host_process = 3; } @@ -879,8 +875,6 @@ message WindowsContainerResources { int64 cpu_maximum = 3; // Memory limit in bytes. Default: 0 (not specified). int64 memory_limit_in_bytes = 4; - // Specifies the size of the rootfs / scratch space in bytes to be configured for this container. Default: 0 (not specified). - int64 rootfs_size_in_bytes = 5; } // ContainerMetadata holds all necessary information for building the container @@ -962,6 +956,8 @@ message ContainerConfig { // Variables for interactive containers, these have very specialized // use-cases (e.g. debugging). + // TODO: Determine if we need to continue supporting these fields that are + // part of Kubernetes's Container Spec. bool stdin = 12; bool stdin_once = 13; bool tty = 14; @@ -1139,10 +1135,10 @@ message UpdateContainerResourcesRequest { string container_id = 1; // Resource configuration specific to Linux containers. LinuxContainerResources linux = 2; - // Resource configuration specific to Windows containers. + // Resource configuration specific to Windows containers. WindowsContainerResources windows = 3; - // Unstructured key-value map holding arbitrary additional information for - // container resources updating. This can be used for specifying experimental + // Unstructured key-value map holding arbitrary additional information for + // container resources updating. This can be used for specifying experimental // resources to update or other options to use when updating the container. map annotations = 4; } @@ -1495,7 +1491,7 @@ message MemoryUsage { int64 timestamp = 1; // The amount of working set memory in bytes. UInt64Value working_set_bytes = 2; - // Available memory for use. This is defined as the memory limit - workingSetBytes. + // Available memory for use. This is defined as the memory limit = workingSetBytes. UInt64Value available_bytes = 3; // Total memory in use. This includes all memory regardless of when it was accessed. UInt64Value usage_bytes = 4; diff --git a/cluster-autoscaler/vendor/k8s.io/cri-api/pkg/apis/services.go b/cluster-autoscaler/vendor/k8s.io/cri-api/pkg/apis/services.go index 54f755d87438..20f2bc1477f2 100644 --- a/cluster-autoscaler/vendor/k8s.io/cri-api/pkg/apis/services.go +++ b/cluster-autoscaler/vendor/k8s.io/cri-api/pkg/apis/services.go @@ -42,7 +42,7 @@ type ContainerManager interface { // ListContainers lists all containers by filters. ListContainers(filter *runtimeapi.ContainerFilter) ([]*runtimeapi.Container, error) // ContainerStatus returns the status of the container. - ContainerStatus(containerID string, verbose bool) (*runtimeapi.ContainerStatusResponse, error) + ContainerStatus(containerID string) (*runtimeapi.ContainerStatus, error) // UpdateContainerResources updates the cgroup resources for the container. UpdateContainerResources(containerID string, resources *runtimeapi.LinuxContainerResources) error // ExecSync executes a command in the container, and returns the stdout output. @@ -71,7 +71,7 @@ type PodSandboxManager interface { // sandbox, they should be forcibly removed. RemovePodSandbox(podSandboxID string) error // PodSandboxStatus returns the Status of the PodSandbox. - PodSandboxStatus(podSandboxID string, verbose bool) (*runtimeapi.PodSandboxStatusResponse, error) + PodSandboxStatus(podSandboxID string) (*runtimeapi.PodSandboxStatus, error) // ListPodSandbox returns a list of Sandbox. ListPodSandbox(filter *runtimeapi.PodSandboxFilter) ([]*runtimeapi.PodSandbox, error) // PortForward prepares a streaming endpoint to forward ports from a PodSandbox, and returns the address. @@ -104,7 +104,7 @@ type RuntimeService interface { // UpdateRuntimeConfig updates runtime configuration if specified UpdateRuntimeConfig(runtimeConfig *runtimeapi.RuntimeConfig) error // Status returns the status of the runtime. - Status(verbose bool) (*runtimeapi.StatusResponse, error) + Status() (*runtimeapi.RuntimeStatus, error) } // ImageManagerService interface should be implemented by a container image @@ -114,7 +114,7 @@ type ImageManagerService interface { // ListImages lists the existing images. ListImages(filter *runtimeapi.ImageFilter) ([]*runtimeapi.Image, error) // ImageStatus returns the status of the image. - ImageStatus(image *runtimeapi.ImageSpec, verbose bool) (*runtimeapi.ImageStatusResponse, error) + ImageStatus(image *runtimeapi.ImageSpec) (*runtimeapi.Image, error) // PullImage pulls an image with the authentication config. PullImage(image *runtimeapi.ImageSpec, auth *runtimeapi.AuthConfig, podSandboxConfig *runtimeapi.PodSandboxConfig) (string, error) // RemoveImage removes the image. diff --git a/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/OWNERS b/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/OWNERS index 3000ec1d5e8c..cbe405f456f6 100644 --- a/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/OWNERS @@ -1,11 +1,17 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - sig-storage-reviewers + - davidz627 + - saad-ali + - msau42 + - ddebroy + - leakingtapan - andyzhangx + approvers: - - sig-storage-approvers + - davidz627 + - saad-ali + - msau42 + labels: - sig/storage -emeritus_approvers: - - davidz627 diff --git a/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/README.md b/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/README.md index 8c1b5663aaa5..1201823874b2 100644 --- a/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/README.md +++ b/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/README.md @@ -27,4 +27,3 @@ Code of Conduct](code-of-conduct.md). ### Contibution Guidelines See [CONTRIBUTING.md](CONTRIBUTING.md) for more information. - diff --git a/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/go.mod b/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/go.mod index bb6febcc8692..c3a817b9226c 100644 --- a/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/go.mod +++ b/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/go.mod @@ -6,12 +6,12 @@ go 1.16 require ( github.com/stretchr/testify v1.7.0 - k8s.io/api v0.24.0 - k8s.io/apimachinery v0.24.0 - k8s.io/klog/v2 v2.60.1 + k8s.io/api v0.23.0 + k8s.io/apimachinery v0.23.0 + k8s.io/klog/v2 v2.30.0 ) replace ( - k8s.io/api => k8s.io/api v0.24.0 - k8s.io/apimachinery => k8s.io/apimachinery v0.24.0 + k8s.io/api => k8s.io/api v0.23.0 + k8s.io/apimachinery => k8s.io/apimachinery v0.23.0 ) diff --git a/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/go.sum b/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/go.sum index 54705551c6ef..e8bb91d870f8 100644 --- a/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/go.sum +++ b/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/go.sum @@ -3,7 +3,6 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= @@ -44,7 +43,6 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -56,6 +54,8 @@ github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= +github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= @@ -130,8 +130,8 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20210825183410-e898025ed96a h1:bRuuGXV8wwSdGTB+CtJf+FjgO1APK1CoO39T4BN/XBw= +golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -151,15 +151,15 @@ golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -220,23 +220,23 @@ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/api v0.24.0 h1:J0hann2hfxWr1hinZIDefw7Q96wmCBx6SSB8IY0MdDg= -k8s.io/api v0.24.0/go.mod h1:5Jl90IUrJHUJYEMANRURMiVvJ0g7Ax7r3R1bqO8zx8I= -k8s.io/apimachinery v0.24.0 h1:ydFCyC/DjCvFCHK5OPMKBlxayQytB8pxy8YQInd5UyQ= -k8s.io/apimachinery v0.24.0/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= +k8s.io/api v0.23.0 h1:WrL1gb73VSC8obi8cuYETJGXEoFNEh3LU0Pt+Sokgro= +k8s.io/api v0.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg= +k8s.io/apimachinery v0.23.0 h1:mIfWRMjBuMdolAWJ3Fd+aPTMv3X9z+waiARMpvvb0HQ= +k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.60.1 h1:VW25q3bZx9uE3vvdL6M8ezOX79vA2Aq1nEWLqNQclHc= -k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= +k8s.io/klog/v2 v2.30.0 h1:bUO6drIvCIsvZ/XFgfxoGFQU/a4Qkh0iAlvUR7vlHJw= +k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc= -k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y= -sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= +k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b h1:wxEMGetGMur3J1xuGLQY7GEQYg9bZxKn3tKo5k/eYcs= +k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s= +sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= -sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/structured-merge-diff/v4 v4.1.2 h1:Hr/htKFmJEbtMgS/UD0N+gtgctAqz81t3nu+sPzynno= +sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/plugins/azure_disk.go b/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/plugins/azure_disk.go index 73f7736e56d3..000306123201 100644 --- a/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/plugins/azure_disk.go +++ b/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/plugins/azure_disk.go @@ -37,15 +37,14 @@ const ( // Parameter names defined in azure disk CSI driver, refer to // https://github.com/kubernetes-sigs/azuredisk-csi-driver/blob/master/docs/driver-parameters.md azureDiskKind = "kind" - azureDiskCachingMode = "cachingmode" - azureDiskFSType = "fstype" + azureDiskCachingMode = "cachingMode" + azureDiskFSType = "fsType" ) var ( managedDiskPathRE = regexp.MustCompile(`.*/subscriptions/(?:.*)/resourceGroups/(?:.*)/providers/Microsoft.Compute/disks/(.+)`) unmanagedDiskPathRE = regexp.MustCompile(`http(?:.*)://(?:.*)/vhds/(.+)`) managed = string(v1.AzureManagedDisk) - unzonedCSIRegionRE = regexp.MustCompile(`^[0-9]+$`) ) var _ InTreePlugin = &azureDiskCSITranslator{} @@ -59,7 +58,7 @@ func NewAzureDiskCSITranslator() InTreePlugin { return &azureDiskCSITranslator{} } -// TranslateInTreeStorageClassToCSI translates InTree Azure Disk storage class parameters to CSI storage class +// TranslateInTreeStorageClassParametersToCSI translates InTree Azure Disk storage class parameters to CSI storage class func (t *azureDiskCSITranslator) TranslateInTreeStorageClassToCSI(sc *storage.StorageClass) (*storage.StorageClass, error) { var ( generatedTopologies []v1.TopologySelectorTerm @@ -87,7 +86,6 @@ func (t *azureDiskCSITranslator) TranslateInTreeStorageClassToCSI(sc *storage.St } sc.AllowedTopologies = newTopologies } - sc.AllowedTopologies = t.replaceFailureDomainsToCSI(sc.AllowedTopologies) sc.Parameters = params @@ -109,7 +107,7 @@ func (t *azureDiskCSITranslator) TranslateInTreeInlineVolumeToCSI(volume *v1.Vol ObjectMeta: metav1.ObjectMeta{ // Must be unique per disk as it is used as the unique part of the // staging path - Name: azureSource.DataDiskURI, + Name: fmt.Sprintf("%s-%s", AzureDiskDriverName, azureSource.DiskName), }, Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{ @@ -205,19 +203,13 @@ func (t *azureDiskCSITranslator) TranslateCSIPVToInTree(pv *v1.PersistentVolume) } if csiSource.VolumeAttributes != nil { - for k, v := range csiSource.VolumeAttributes { - switch strings.ToLower(k) { - case azureDiskCachingMode: - if v != "" { - mode := v1.AzureDataDiskCachingMode(v) - azureSource.CachingMode = &mode - } - case azureDiskFSType: - if v != "" { - fsType := v - azureSource.FSType = &fsType - } - } + if cachingMode, ok := csiSource.VolumeAttributes[azureDiskCachingMode]; ok { + mode := v1.AzureDataDiskCachingMode(cachingMode) + azureSource.CachingMode = &mode + } + + if fsType, ok := csiSource.VolumeAttributes[azureDiskFSType]; ok && fsType != "" { + azureSource.FSType = &fsType } azureSource.Kind = &managed } @@ -275,34 +267,3 @@ func getDiskName(diskURI string) (string, error) { } return matches[1], nil } - -// Replace topology values for failure domains ("") to "", -// as it's the value that the CSI driver expects. -func (t *azureDiskCSITranslator) replaceFailureDomainsToCSI(terms []v1.TopologySelectorTerm) []v1.TopologySelectorTerm { - if terms == nil { - return nil - } - - newTopologies := []v1.TopologySelectorTerm{} - for _, term := range terms { - newTerm := term.DeepCopy() - for i := range newTerm.MatchLabelExpressions { - exp := &newTerm.MatchLabelExpressions[i] - if exp.Key == AzureDiskTopologyKey { - for j := range exp.Values { - if unzonedCSIRegionRE.Match([]byte(exp.Values[j])) { - // Topologies "0", "1" etc are used when in-tree topology is translated to CSI in Azure - // regions that don't have availability zones. E.g.: - // topology.kubernetes.io/region: westus - // topology.kubernetes.io/zone: "0" - // The CSI driver uses zone "" instead of "0" in this case. - // topology.disk.csi.azure.com/zone": "" - exp.Values[j] = "" - } - } - } - } - newTopologies = append(newTopologies, *newTerm) - } - return newTopologies -} diff --git a/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/plugins/azure_file.go b/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/plugins/azure_file.go index 6a688d7098f9..df8251325f14 100644 --- a/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/plugins/azure_file.go +++ b/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/plugins/azure_file.go @@ -34,7 +34,7 @@ const ( AzureFileInTreePluginName = "kubernetes.io/azure-file" separator = "#" - volumeIDTemplate = "%s#%s#%s#%s#%s" + volumeIDTemplate = "%s#%s#%s#%s" // Parameter names defined in azure file CSI driver, refer to // https://github.com/kubernetes-sigs/azurefile-csi-driver/blob/master/docs/driver-parameters.md shareNameField = "sharename" @@ -58,7 +58,7 @@ func NewAzureFileCSITranslator() InTreePlugin { return &azureFileCSITranslator{} } -// TranslateInTreeStorageClassToCSI translates InTree Azure File storage class parameters to CSI storage class +// TranslateInTreeStorageClassParametersToCSI translates InTree Azure File storage class parameters to CSI storage class func (t *azureFileCSITranslator) TranslateInTreeStorageClassToCSI(sc *storage.StorageClass) (*storage.StorageClass, error) { return sc, nil } @@ -81,19 +81,19 @@ func (t *azureFileCSITranslator) TranslateInTreeInlineVolumeToCSI(volume *v1.Vol if podNamespace != "" { secretNamespace = podNamespace } - volumeID := fmt.Sprintf(volumeIDTemplate, "", accountName, azureSource.ShareName, volume.Name, secretNamespace) var ( pv = &v1.PersistentVolume{ ObjectMeta: metav1.ObjectMeta{ - // Must be unique as it is used as the unique part of the staging path - Name: volumeID, + // Must be unique per disk as it is used as the unique part of the + // staging path + Name: fmt.Sprintf("%s-%s", AzureFileDriverName, azureSource.ShareName), }, Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{ CSI: &v1.CSIPersistentVolumeSource{ Driver: AzureFileDriverName, - VolumeHandle: volumeID, + VolumeHandle: fmt.Sprintf(volumeIDTemplate, "", accountName, azureSource.ShareName, ""), ReadOnly: azureSource.ReadOnly, VolumeAttributes: map[string]string{shareNameField: azureSource.ShareName}, NodeStageSecretRef: &v1.SecretReference{ @@ -129,24 +129,7 @@ func (t *azureFileCSITranslator) TranslateInTreePVToCSI(pv *v1.PersistentVolume) resourceGroup = v } } - - // Secret is required when mounting a volume but pod presence cannot be assumed - we should not try to read pod now. - namespace := "" - // Try to read SecretNamespace from source pv. - if azureSource.SecretNamespace != nil { - namespace = *azureSource.SecretNamespace - } else { - // Try to read namespace from ClaimRef which should be always present. - if pv.Spec.ClaimRef != nil { - namespace = pv.Spec.ClaimRef.Namespace - } - } - - if len(namespace) == 0 { - return nil, fmt.Errorf("could not find a secret namespace in PersistentVolumeSource or ClaimRef") - } - - volumeID := fmt.Sprintf(volumeIDTemplate, resourceGroup, accountName, azureSource.ShareName, pv.ObjectMeta.Name, namespace) + volumeID := fmt.Sprintf(volumeIDTemplate, resourceGroup, accountName, azureSource.ShareName, "") var ( // refer to https://github.com/kubernetes-sigs/azurefile-csi-driver/blob/master/docs/driver-parameters.md @@ -154,7 +137,7 @@ func (t *azureFileCSITranslator) TranslateInTreePVToCSI(pv *v1.PersistentVolume) Driver: AzureFileDriverName, NodeStageSecretRef: &v1.SecretReference{ Name: azureSource.SecretName, - Namespace: namespace, + Namespace: defaultSecretNamespace, }, ReadOnly: azureSource.ReadOnly, VolumeAttributes: map[string]string{shareNameField: azureSource.ShareName}, @@ -162,6 +145,10 @@ func (t *azureFileCSITranslator) TranslateInTreePVToCSI(pv *v1.PersistentVolume) } ) + if azureSource.SecretNamespace != nil { + csiSource.NodeStageSecretRef.Namespace = *azureSource.SecretNamespace + } + pv.Spec.PersistentVolumeSource.AzureFile = nil pv.Spec.PersistentVolumeSource.CSI = csiSource diff --git a/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/plugins/gce_pd.go b/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/plugins/gce_pd.go index 52efea05e62d..5183e092bdf4 100644 --- a/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/plugins/gce_pd.go +++ b/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/plugins/gce_pd.go @@ -77,7 +77,7 @@ func generateToplogySelectors(key string, values []string) []v1.TopologySelector } } -// TranslateInTreeStorageClassToCSI translates InTree GCE storage class parameters to CSI storage class +// TranslateInTreeStorageClassParametersToCSI translates InTree GCE storage class parameters to CSI storage class func (g *gcePersistentDiskCSITranslator) TranslateInTreeStorageClassToCSI(sc *storage.StorageClass) (*storage.StorageClass, error) { var generatedTopologies []v1.TopologySelectorTerm diff --git a/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/plugins/openstack_cinder.go b/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/plugins/openstack_cinder.go index 92c5a1338371..66ce81185e96 100644 --- a/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/plugins/openstack_cinder.go +++ b/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/plugins/openstack_cinder.go @@ -44,7 +44,7 @@ func NewOpenStackCinderCSITranslator() InTreePlugin { return &osCinderCSITranslator{} } -// TranslateInTreeStorageClassToCSI translates InTree Cinder storage class parameters to CSI storage class +// TranslateInTreeStorageClassParametersToCSI translates InTree Cinder storage class parameters to CSI storage class func (t *osCinderCSITranslator) TranslateInTreeStorageClassToCSI(sc *storage.StorageClass) (*storage.StorageClass, error) { var ( params = map[string]string{} diff --git a/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/plugins/rbd.go b/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/plugins/rbd.go index 14fe9fcdcf3c..c25300879a65 100644 --- a/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/plugins/rbd.go +++ b/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/plugins/rbd.go @@ -219,7 +219,7 @@ func (p rbdCSITranslator) TranslateCSIPVToInTree(pv *v1.PersistentVolume) (*v1.P return nil, fmt.Errorf("pv is nil or CSI source not defined on pv") } var rbdImageName string - monSlice := []string{""} + var monSlice []string csiSource := pv.Spec.CSI rbdImageName = csiSource.VolumeAttributes[imgNameKey] diff --git a/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/plugins/vsphere_volume.go b/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/plugins/vsphere_volume.go index 13c37486c94c..83058b374a6c 100644 --- a/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/plugins/vsphere_volume.go +++ b/cluster-autoscaler/vendor/k8s.io/csi-translation-lib/plugins/vsphere_volume.go @@ -32,12 +32,6 @@ const ( // VSphereInTreePluginName is the name of the in-tree plugin for vSphere Volume VSphereInTreePluginName = "kubernetes.io/vsphere-volume" - // vSphereCSITopologyZoneKey is the zonal topology key for vSphere CSI Driver - vSphereCSITopologyZoneKey = "topology.csi.vmware.com/zone" - - // vSphereCSITopologyRegionKey is the region topology key for vSphere CSI Driver - vSphereCSITopologyRegionKey = "topology.csi.vmware.com/region" - // paramStoragePolicyName used to supply SPBM Policy name for Volume provisioning paramStoragePolicyName = "storagepolicyname" @@ -110,14 +104,7 @@ func (t *vSphereCSITranslator) TranslateInTreeStorageClassToCSI(sc *storage.Stor // When this is true, Driver returns initialvolumefilepath in the VolumeContext, which is // used in TranslateCSIPVToInTree params[paramcsiMigration] = "true" - // translate AllowedTopologies to vSphere CSI Driver topology - if len(sc.AllowedTopologies) > 0 { - newTopologies, err := translateAllowedTopologies(sc.AllowedTopologies, vSphereCSITopologyZoneKey) - if err != nil { - return nil, fmt.Errorf("failed translating allowed topologies: %v", err) - } - sc.AllowedTopologies = newTopologies - } + // Note: sc.AllowedTopologies for Topology based volume provisioning will be supplied as it is. sc.Parameters = params return sc, nil } @@ -167,10 +154,6 @@ func (t *vSphereCSITranslator) TranslateInTreePVToCSI(pv *v1.PersistentVolume) ( if pv.Spec.VsphereVolume.StoragePolicyName != "" { csiSource.VolumeAttributes[paramStoragePolicyName] = pv.Spec.VsphereVolume.StoragePolicyName } - // translate in-tree topology to CSI topology for migration - if err := translateTopologyFromInTreevSphereToCSI(pv, vSphereCSITopologyZoneKey, vSphereCSITopologyRegionKey); err != nil { - return nil, fmt.Errorf("failed to translate topology: %v", err) - } pv.Spec.VsphereVolume = nil pv.Spec.CSI = csiSource return pv, nil @@ -190,10 +173,6 @@ func (t *vSphereCSITranslator) TranslateCSIPVToInTree(pv *v1.PersistentVolume) ( if ok { vsphereVirtualDiskVolumeSource.VolumePath = volumeFilePath } - // translate CSI topology to In-tree topology for rollback compatibility. - if err := translateTopologyFromCSIToInTreevSphere(pv, vSphereCSITopologyZoneKey, vSphereCSITopologyRegionKey); err != nil { - return nil, fmt.Errorf("failed to translate topology. PV:%+v. Error:%v", *pv, err) - } pv.Spec.CSI = nil pv.Spec.VsphereVolume = vsphereVirtualDiskVolumeSource return pv, nil @@ -227,76 +206,3 @@ func (t *vSphereCSITranslator) GetCSIPluginName() string { func (t *vSphereCSITranslator) RepairVolumeHandle(volumeHandle, nodeID string) (string, error) { return volumeHandle, nil } - -// translateTopologyFromInTreevSphereToCSI converts existing zone labels or in-tree vsphere topology to -// vSphere CSI topology. -func translateTopologyFromInTreevSphereToCSI(pv *v1.PersistentVolume, csiTopologyKeyZone string, csiTopologyKeyRegion string) error { - zoneLabel, regionLabel := getTopologyLabel(pv) - - // If Zone kubernetes topology exist, replace it to use csiTopologyKeyZone - zones := getTopologyValues(pv, zoneLabel) - if len(zones) > 0 { - replaceTopology(pv, zoneLabel, csiTopologyKeyZone) - } else { - // if nothing is in the NodeAffinity, try to fetch the topology from PV labels - if label, ok := pv.Labels[zoneLabel]; ok { - if len(label) > 0 { - addTopology(pv, csiTopologyKeyZone, []string{label}) - } - } - } - - // If region kubernetes topology exist, replace it to use csiTopologyKeyRegion - regions := getTopologyValues(pv, regionLabel) - if len(regions) > 0 { - replaceTopology(pv, regionLabel, csiTopologyKeyRegion) - } else { - // if nothing is in the NodeAffinity, try to fetch the topology from PV labels - if label, ok := pv.Labels[regionLabel]; ok { - if len(label) > 0 { - addTopology(pv, csiTopologyKeyRegion, []string{label}) - } - } - } - return nil -} - -// translateTopologyFromCSIToInTreevSphere converts CSI zone/region affinity rules to in-tree vSphere zone/region labels -func translateTopologyFromCSIToInTreevSphere(pv *v1.PersistentVolume, - csiTopologyKeyZone string, csiTopologyKeyRegion string) error { - zoneLabel, regionLabel := getTopologyLabel(pv) - - // Replace all CSI topology to Kubernetes Zone label - err := replaceTopology(pv, csiTopologyKeyZone, zoneLabel) - if err != nil { - return fmt.Errorf("failed to replace CSI topology to Kubernetes topology, error: %v", err) - } - - // Replace all CSI topology to Kubernetes Region label - err = replaceTopology(pv, csiTopologyKeyRegion, regionLabel) - if err != nil { - return fmt.Errorf("failed to replace CSI topology to Kubernetes topology, error: %v", err) - } - - zoneVals := getTopologyValues(pv, zoneLabel) - if len(zoneVals) > 0 { - if pv.Labels == nil { - pv.Labels = make(map[string]string) - } - _, zoneOK := pv.Labels[zoneLabel] - if !zoneOK { - pv.Labels[zoneLabel] = zoneVals[0] - } - } - regionVals := getTopologyValues(pv, regionLabel) - if len(regionVals) > 0 { - if pv.Labels == nil { - pv.Labels = make(map[string]string) - } - _, regionOK := pv.Labels[regionLabel] - if !regionOK { - pv.Labels[regionLabel] = regionVals[0] - } - } - return nil -} diff --git a/cluster-autoscaler/vendor/k8s.io/klog/v2/OWNERS b/cluster-autoscaler/vendor/k8s.io/klog/v2/OWNERS index 8cccebf2e9c9..ad5063fdf10d 100644 --- a/cluster-autoscaler/vendor/k8s.io/klog/v2/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/klog/v2/OWNERS @@ -1,13 +1,19 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: + - jayunit100 + - hoegaarden + - andyxning + - neolit123 - pohly + - yagonobre + - vincepri + - detiber approvers: - dims - thockin - - serathius -emeritus_approvers: - - brancz - justinsb - - lavalamp - - piosz - tallclair + - piosz + - brancz + - lavalamp + - serathius diff --git a/cluster-autoscaler/vendor/k8s.io/klog/v2/README.md b/cluster-autoscaler/vendor/k8s.io/klog/v2/README.md index 7de2212cca7e..64d29622e897 100644 --- a/cluster-autoscaler/vendor/k8s.io/klog/v2/README.md +++ b/cluster-autoscaler/vendor/k8s.io/klog/v2/README.md @@ -23,21 +23,6 @@ Historical context is available here: * https://groups.google.com/forum/#!msg/kubernetes-sig-architecture/wCWiWf3Juzs/hXRVBH90CgAJ * https://groups.google.com/forum/#!msg/kubernetes-dev/7vnijOMhLS0/1oRiNtigBgAJ -## Release versioning - -Semantic versioning is used in this repository. It contains several Go modules -with different levels of stability: -- `k8s.io/klog/v2` - stable API, `vX.Y.Z` tags -- `k8s.io/hack/tools` - no stable API yet (may change eventually or get moved to separate repo), `hack/tools/v0.Y.Z` tags -- `examples` - no stable API, no tags, no intention to ever stabilize - -Exempt from the API stability guarantee are items (packages, functions, etc.) -which are marked explicitly as `EXPERIMENTAL` in their docs comment. Those -may still change in incompatible ways or get removed entirely. This can only -be used for code that is used in tests to avoid situations where non-test -code from two different Kubernetes dependencies depends on incompatible -releases of klog because an experimental API was changed. - ---- How to use klog @@ -47,7 +32,6 @@ How to use klog - You can now use `log_file` instead of `log_dir` for logging to a single file (See `examples/log_file/usage_log_file.go`) - If you want to redirect everything logged using klog somewhere else (say syslog!), you can use `klog.SetOutput()` method and supply a `io.Writer`. (See `examples/set_output/usage_set_output.go`) - For more logging conventions (See [Logging Conventions](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/logging.md)) -- See our documentation on [pkg.go.dev/k8s.io](https://pkg.go.dev/k8s.io/klog). **NOTE**: please use the newer go versions that support semantic import versioning in modules, ideally go 1.11.4 or greater. @@ -101,7 +85,7 @@ The comment from glog.go introduces the ideas: glog.Fatalf("Initialization failed: %s", err) - See the documentation of the V function for an explanation + See the documentation for the V function for an explanation of these examples: if glog.V(2) { diff --git a/cluster-autoscaler/vendor/k8s.io/klog/v2/contextual.go b/cluster-autoscaler/vendor/k8s.io/klog/v2/contextual.go deleted file mode 100644 index 0bf19280e55a..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/klog/v2/contextual.go +++ /dev/null @@ -1,197 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package klog - -import ( - "context" - - "github.com/go-logr/logr" -) - -// This file provides the implementation of -// https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/1602-structured-logging -// -// SetLogger and ClearLogger were originally added to klog.go and got moved -// here. Contextual logging adds a way to retrieve a Logger for direct logging -// without the logging calls in klog.go. -// -// The global variables are expected to be modified only during sequential -// parts of a program (init, serial tests) and therefore are not protected by -// mutex locking. - -var ( - // contextualLoggingEnabled controls whether contextual logging is - // active. Disabling it may have some small performance benefit. - contextualLoggingEnabled = true - - // globalLogger is the global Logger chosen by users of klog, nil if - // none is available. - globalLogger *Logger - - // globalLoggerOptions contains the options that were supplied for - // globalLogger. - globalLoggerOptions loggerOptions - - // klogLogger is used as fallback for logging through the normal klog code - // when no Logger is set. - klogLogger logr.Logger = logr.New(&klogger{}) -) - -// SetLogger sets a Logger implementation that will be used as backing -// implementation of the traditional klog log calls. klog will do its own -// verbosity checks before calling logger.V().Info. logger.Error is always -// called, regardless of the klog verbosity settings. -// -// If set, all log lines will be suppressed from the regular output, and -// redirected to the logr implementation. -// Use as: -// ... -// klog.SetLogger(zapr.NewLogger(zapLog)) -// -// To remove a backing logr implemention, use ClearLogger. Setting an -// empty logger with SetLogger(logr.Logger{}) does not work. -// -// Modifying the logger is not thread-safe and should be done while no other -// goroutines invoke log calls, usually during program initialization. -func SetLogger(logger logr.Logger) { - SetLoggerWithOptions(logger) -} - -// SetLoggerWithOptions is a more flexible version of SetLogger. Without -// additional options, it behaves exactly like SetLogger. By passing -// ContextualLogger(true) as option, it can be used to set a logger that then -// will also get called directly by applications which retrieve it via -// FromContext, Background, or TODO. -// -// Supporting direct calls is recommended because it avoids the overhead of -// routing log entries through klogr into klog and then into the actual Logger -// backend. -func SetLoggerWithOptions(logger logr.Logger, opts ...LoggerOption) { - globalLogger = &logger - globalLoggerOptions = loggerOptions{} - for _, opt := range opts { - opt(&globalLoggerOptions) - } -} - -// ContextualLogger determines whether the logger passed to -// SetLoggerWithOptions may also get called directly. Such a logger cannot rely -// on verbosity checking in klog. -func ContextualLogger(enabled bool) LoggerOption { - return func(o *loggerOptions) { - o.contextualLogger = enabled - } -} - -// FlushLogger provides a callback for flushing data buffered by the logger. -func FlushLogger(flush func()) LoggerOption { - return func(o *loggerOptions) { - o.flush = flush - } -} - -// LoggerOption implements the functional parameter paradigm for -// SetLoggerWithOptions. -type LoggerOption func(o *loggerOptions) - -type loggerOptions struct { - contextualLogger bool - flush func() -} - -// ClearLogger removes a backing Logger implementation if one was set earlier -// with SetLogger. -// -// Modifying the logger is not thread-safe and should be done while no other -// goroutines invoke log calls, usually during program initialization. -func ClearLogger() { - globalLogger = nil - globalLoggerOptions = loggerOptions{} -} - -// EnableContextualLogging controls whether contextual logging is enabled. -// By default it is enabled. When disabled, FromContext avoids looking up -// the logger in the context and always returns the global logger. -// LoggerWithValues, LoggerWithName, and NewContext become no-ops -// and return their input logger respectively context. This may be useful -// to avoid the additional overhead for contextual logging. -// -// This must be called during initialization before goroutines are started. -func EnableContextualLogging(enabled bool) { - contextualLoggingEnabled = enabled -} - -// FromContext retrieves a logger set by the caller or, if not set, -// falls back to the program's global logger (a Logger instance or klog -// itself). -func FromContext(ctx context.Context) Logger { - if contextualLoggingEnabled { - if logger, err := logr.FromContext(ctx); err == nil { - return logger - } - } - - return Background() -} - -// TODO can be used as a last resort by code that has no means of -// receiving a logger from its caller. FromContext or an explicit logger -// parameter should be used instead. -func TODO() Logger { - return Background() -} - -// Background retrieves the fallback logger. It should not be called before -// that logger was initialized by the program and not by code that should -// better receive a logger via its parameters. TODO can be used as a temporary -// solution for such code. -func Background() Logger { - if globalLoggerOptions.contextualLogger { - // Is non-nil because globalLoggerOptions.contextualLogger is - // only true if a logger was set. - return *globalLogger - } - - return klogLogger -} - -// LoggerWithValues returns logger.WithValues(...kv) when -// contextual logging is enabled, otherwise the logger. -func LoggerWithValues(logger Logger, kv ...interface{}) Logger { - if contextualLoggingEnabled { - return logger.WithValues(kv...) - } - return logger -} - -// LoggerWithName returns logger.WithName(name) when contextual logging is -// enabled, otherwise the logger. -func LoggerWithName(logger Logger, name string) Logger { - if contextualLoggingEnabled { - return logger.WithName(name) - } - return logger -} - -// NewContext returns logr.NewContext(ctx, logger) when -// contextual logging is enabled, otherwise ctx. -func NewContext(ctx context.Context, logger Logger) context.Context { - if contextualLoggingEnabled { - return logr.NewContext(ctx, logger) - } - return ctx -} diff --git a/cluster-autoscaler/vendor/k8s.io/klog/v2/exit.go b/cluster-autoscaler/vendor/k8s.io/klog/v2/exit.go deleted file mode 100644 index 320a14772810..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/klog/v2/exit.go +++ /dev/null @@ -1,69 +0,0 @@ -// Go support for leveled logs, analogous to https://code.google.com/p/google-glog/ -// -// Copyright 2013 Google Inc. All Rights Reserved. -// Copyright 2022 The Kubernetes Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package klog - -import ( - "fmt" - "os" - "time" -) - -var ( - - // ExitFlushTimeout is the timeout that klog has traditionally used during - // calls like Fatal or Exit when flushing log data right before exiting. - // Applications that replace those calls and do not have some specific - // requirements like "exit immediately" can use this value as parameter - // for FlushAndExit. - // - // Can be set for testing purpose or to change the application's - // default. - ExitFlushTimeout = 10 * time.Second - - // OsExit is the function called by FlushAndExit to terminate the program. - // - // Can be set for testing purpose or to change the application's - // default behavior. Note that the function should not simply return - // because callers of functions like Fatal will not expect that. - OsExit = os.Exit -) - -// FlushAndExit flushes log data for a certain amount of time and then calls -// os.Exit. Combined with some logging call it provides a replacement for -// traditional calls like Fatal or Exit. -func FlushAndExit(flushTimeout time.Duration, exitCode int) { - timeoutFlush(flushTimeout) - OsExit(exitCode) -} - -// timeoutFlush calls Flush and returns when it completes or after timeout -// elapses, whichever happens first. This is needed because the hooks invoked -// by Flush may deadlock when klog.Fatal is called from a hook that holds -// a lock. Flushing also might take too long. -func timeoutFlush(timeout time.Duration) { - done := make(chan bool, 1) - go func() { - Flush() // calls logging.lockAndFlushAll() - done <- true - }() - select { - case <-done: - case <-time.After(timeout): - fmt.Fprintln(os.Stderr, "klog: Flush took longer than", timeout) - } -} diff --git a/cluster-autoscaler/vendor/k8s.io/klog/v2/internal/buffer/buffer.go b/cluster-autoscaler/vendor/k8s.io/klog/v2/internal/buffer/buffer.go deleted file mode 100644 index ac88682a2c44..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/klog/v2/internal/buffer/buffer.go +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright 2013 Google Inc. All Rights Reserved. -// Copyright 2022 The Kubernetes Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package buffer provides a cache for byte.Buffer instances that can be reused -// to avoid frequent allocation and deallocation. It also has utility code -// for log header formatting that use these buffers. -package buffer - -import ( - "bytes" - "os" - "sync" - "time" - - "k8s.io/klog/v2/internal/severity" -) - -var ( - // Pid is inserted into log headers. Can be overridden for tests. - Pid = os.Getpid() -) - -// Buffer holds a single byte.Buffer for reuse. The zero value is ready for -// use. It also provides some helper methods for output formatting. -type Buffer struct { - bytes.Buffer - Tmp [64]byte // temporary byte array for creating headers. - next *Buffer -} - -// Buffers manages the reuse of individual buffer instances. It is thread-safe. -type Buffers struct { - // mu protects the free list. It is separate from the main mutex - // so buffers can be grabbed and printed to without holding the main lock, - // for better parallelization. - mu sync.Mutex - - // freeList is a list of byte buffers, maintained under mu. - freeList *Buffer -} - -// GetBuffer returns a new, ready-to-use buffer. -func (bl *Buffers) GetBuffer() *Buffer { - bl.mu.Lock() - b := bl.freeList - if b != nil { - bl.freeList = b.next - } - bl.mu.Unlock() - if b == nil { - b = new(Buffer) - } else { - b.next = nil - b.Reset() - } - return b -} - -// PutBuffer returns a buffer to the free list. -func (bl *Buffers) PutBuffer(b *Buffer) { - if b.Len() >= 256 { - // Let big buffers die a natural death. - return - } - bl.mu.Lock() - b.next = bl.freeList - bl.freeList = b - bl.mu.Unlock() -} - -// Some custom tiny helper functions to print the log header efficiently. - -const digits = "0123456789" - -// twoDigits formats a zero-prefixed two-digit integer at buf.Tmp[i]. -func (buf *Buffer) twoDigits(i, d int) { - buf.Tmp[i+1] = digits[d%10] - d /= 10 - buf.Tmp[i] = digits[d%10] -} - -// nDigits formats an n-digit integer at buf.Tmp[i], -// padding with pad on the left. -// It assumes d >= 0. -func (buf *Buffer) nDigits(n, i, d int, pad byte) { - j := n - 1 - for ; j >= 0 && d > 0; j-- { - buf.Tmp[i+j] = digits[d%10] - d /= 10 - } - for ; j >= 0; j-- { - buf.Tmp[i+j] = pad - } -} - -// someDigits formats a zero-prefixed variable-width integer at buf.Tmp[i]. -func (buf *Buffer) someDigits(i, d int) int { - // Print into the top, then copy down. We know there's space for at least - // a 10-digit number. - j := len(buf.Tmp) - for { - j-- - buf.Tmp[j] = digits[d%10] - d /= 10 - if d == 0 { - break - } - } - return copy(buf.Tmp[i:], buf.Tmp[j:]) -} - -// FormatHeader formats a log header using the provided file name and line number. -func (buf *Buffer) FormatHeader(s severity.Severity, file string, line int, now time.Time) { - if line < 0 { - line = 0 // not a real line number, but acceptable to someDigits - } - if s > severity.FatalLog { - s = severity.InfoLog // for safety. - } - - // Avoid Fprintf, for speed. The format is so simple that we can do it quickly by hand. - // It's worth about 3X. Fprintf is hard. - _, month, day := now.Date() - hour, minute, second := now.Clock() - // Lmmdd hh:mm:ss.uuuuuu threadid file:line] - buf.Tmp[0] = severity.Char[s] - buf.twoDigits(1, int(month)) - buf.twoDigits(3, day) - buf.Tmp[5] = ' ' - buf.twoDigits(6, hour) - buf.Tmp[8] = ':' - buf.twoDigits(9, minute) - buf.Tmp[11] = ':' - buf.twoDigits(12, second) - buf.Tmp[14] = '.' - buf.nDigits(6, 15, now.Nanosecond()/1000, '0') - buf.Tmp[21] = ' ' - buf.nDigits(7, 22, Pid, ' ') // TODO: should be TID - buf.Tmp[29] = ' ' - buf.Write(buf.Tmp[:30]) - buf.WriteString(file) - buf.Tmp[0] = ':' - n := buf.someDigits(1, line) - buf.Tmp[n+1] = ']' - buf.Tmp[n+2] = ' ' - buf.Write(buf.Tmp[:n+3]) -} diff --git a/cluster-autoscaler/vendor/k8s.io/klog/v2/internal/clock/README.md b/cluster-autoscaler/vendor/k8s.io/klog/v2/internal/clock/README.md deleted file mode 100644 index 03d692c8f83a..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/klog/v2/internal/clock/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Clock - -This package provides an interface for time-based operations. It allows -mocking time for testing. - -This is a copy of k8s.io/utils/clock. We have to copy it to avoid a circular -dependency (k8s.io/klog -> k8s.io/utils -> k8s.io/klog). diff --git a/cluster-autoscaler/vendor/k8s.io/klog/v2/internal/clock/clock.go b/cluster-autoscaler/vendor/k8s.io/klog/v2/internal/clock/clock.go deleted file mode 100644 index b8b6af5c817f..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/klog/v2/internal/clock/clock.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package clock - -import "time" - -// PassiveClock allows for injecting fake or real clocks into code -// that needs to read the current time but does not support scheduling -// activity in the future. -type PassiveClock interface { - Now() time.Time - Since(time.Time) time.Duration -} - -// Clock allows for injecting fake or real clocks into code that -// needs to do arbitrary things based on time. -type Clock interface { - PassiveClock - // After returns the channel of a new Timer. - // This method does not allow to free/GC the backing timer before it fires. Use - // NewTimer instead. - After(d time.Duration) <-chan time.Time - // NewTimer returns a new Timer. - NewTimer(d time.Duration) Timer - // Sleep sleeps for the provided duration d. - // Consider making the sleep interruptible by using 'select' on a context channel and a timer channel. - Sleep(d time.Duration) - // Tick returns the channel of a new Ticker. - // This method does not allow to free/GC the backing ticker. Use - // NewTicker from WithTicker instead. - Tick(d time.Duration) <-chan time.Time -} - -// WithTicker allows for injecting fake or real clocks into code that -// needs to do arbitrary things based on time. -type WithTicker interface { - Clock - // NewTicker returns a new Ticker. - NewTicker(time.Duration) Ticker -} - -// WithDelayedExecution allows for injecting fake or real clocks into -// code that needs to make use of AfterFunc functionality. -type WithDelayedExecution interface { - Clock - // AfterFunc executes f in its own goroutine after waiting - // for d duration and returns a Timer whose channel can be - // closed by calling Stop() on the Timer. - AfterFunc(d time.Duration, f func()) Timer -} - -// WithTickerAndDelayedExecution allows for injecting fake or real clocks -// into code that needs Ticker and AfterFunc functionality -type WithTickerAndDelayedExecution interface { - WithTicker - // AfterFunc executes f in its own goroutine after waiting - // for d duration and returns a Timer whose channel can be - // closed by calling Stop() on the Timer. - AfterFunc(d time.Duration, f func()) Timer -} - -// Ticker defines the Ticker interface. -type Ticker interface { - C() <-chan time.Time - Stop() -} - -var _ = WithTicker(RealClock{}) - -// RealClock really calls time.Now() -type RealClock struct{} - -// Now returns the current time. -func (RealClock) Now() time.Time { - return time.Now() -} - -// Since returns time since the specified timestamp. -func (RealClock) Since(ts time.Time) time.Duration { - return time.Since(ts) -} - -// After is the same as time.After(d). -// This method does not allow to free/GC the backing timer before it fires. Use -// NewTimer instead. -func (RealClock) After(d time.Duration) <-chan time.Time { - return time.After(d) -} - -// NewTimer is the same as time.NewTimer(d) -func (RealClock) NewTimer(d time.Duration) Timer { - return &realTimer{ - timer: time.NewTimer(d), - } -} - -// AfterFunc is the same as time.AfterFunc(d, f). -func (RealClock) AfterFunc(d time.Duration, f func()) Timer { - return &realTimer{ - timer: time.AfterFunc(d, f), - } -} - -// Tick is the same as time.Tick(d) -// This method does not allow to free/GC the backing ticker. Use -// NewTicker instead. -func (RealClock) Tick(d time.Duration) <-chan time.Time { - return time.Tick(d) -} - -// NewTicker returns a new Ticker. -func (RealClock) NewTicker(d time.Duration) Ticker { - return &realTicker{ - ticker: time.NewTicker(d), - } -} - -// Sleep is the same as time.Sleep(d) -// Consider making the sleep interruptible by using 'select' on a context channel and a timer channel. -func (RealClock) Sleep(d time.Duration) { - time.Sleep(d) -} - -// Timer allows for injecting fake or real timers into code that -// needs to do arbitrary things based on time. -type Timer interface { - C() <-chan time.Time - Stop() bool - Reset(d time.Duration) bool -} - -var _ = Timer(&realTimer{}) - -// realTimer is backed by an actual time.Timer. -type realTimer struct { - timer *time.Timer -} - -// C returns the underlying timer's channel. -func (r *realTimer) C() <-chan time.Time { - return r.timer.C -} - -// Stop calls Stop() on the underlying timer. -func (r *realTimer) Stop() bool { - return r.timer.Stop() -} - -// Reset calls Reset() on the underlying timer. -func (r *realTimer) Reset(d time.Duration) bool { - return r.timer.Reset(d) -} - -type realTicker struct { - ticker *time.Ticker -} - -func (r *realTicker) C() <-chan time.Time { - return r.ticker.C -} - -func (r *realTicker) Stop() { - r.ticker.Stop() -} diff --git a/cluster-autoscaler/vendor/k8s.io/klog/v2/internal/serialize/keyvalues.go b/cluster-autoscaler/vendor/k8s.io/klog/v2/internal/serialize/keyvalues.go deleted file mode 100644 index d89731368234..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/klog/v2/internal/serialize/keyvalues.go +++ /dev/null @@ -1,225 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package serialize - -import ( - "bytes" - "fmt" - "strconv" -) - -// WithValues implements LogSink.WithValues. The old key/value pairs are -// assumed to be well-formed, the new ones are checked and padded if -// necessary. It returns a new slice. -func WithValues(oldKV, newKV []interface{}) []interface{} { - if len(newKV) == 0 { - return oldKV - } - newLen := len(oldKV) + len(newKV) - hasMissingValue := newLen%2 != 0 - if hasMissingValue { - newLen++ - } - // The new LogSink must have its own slice. - kv := make([]interface{}, 0, newLen) - kv = append(kv, oldKV...) - kv = append(kv, newKV...) - if hasMissingValue { - kv = append(kv, missingValue) - } - return kv -} - -// TrimDuplicates deduplicates elements provided in multiple key/value tuple -// slices, whilst maintaining the distinction between where the items are -// contained. -func TrimDuplicates(kvLists ...[]interface{}) [][]interface{} { - // maintain a map of all seen keys - seenKeys := map[interface{}]struct{}{} - // build the same number of output slices as inputs - outs := make([][]interface{}, len(kvLists)) - // iterate over the input slices backwards, as 'later' kv specifications - // of the same key will take precedence over earlier ones - for i := len(kvLists) - 1; i >= 0; i-- { - // initialise this output slice - outs[i] = []interface{}{} - // obtain a reference to the kvList we are processing - // and make sure it has an even number of entries - kvList := kvLists[i] - if len(kvList)%2 != 0 { - kvList = append(kvList, missingValue) - } - - // start iterating at len(kvList) - 2 (i.e. the 2nd last item) for - // slices that have an even number of elements. - // We add (len(kvList) % 2) here to handle the case where there is an - // odd number of elements in a kvList. - // If there is an odd number, then the last element in the slice will - // have the value 'null'. - for i2 := len(kvList) - 2 + (len(kvList) % 2); i2 >= 0; i2 -= 2 { - k := kvList[i2] - // if we have already seen this key, do not include it again - if _, ok := seenKeys[k]; ok { - continue - } - // make a note that we've observed a new key - seenKeys[k] = struct{}{} - // attempt to obtain the value of the key - var v interface{} - // i2+1 should only ever be out of bounds if we handling the first - // iteration over a slice with an odd number of elements - if i2+1 < len(kvList) { - v = kvList[i2+1] - } - // add this KV tuple to the *start* of the output list to maintain - // the original order as we are iterating over the slice backwards - outs[i] = append([]interface{}{k, v}, outs[i]...) - } - } - return outs -} - -const missingValue = "(MISSING)" - -// KVListFormat serializes all key/value pairs into the provided buffer. -// A space gets inserted before the first pair and between each pair. -func KVListFormat(b *bytes.Buffer, keysAndValues ...interface{}) { - for i := 0; i < len(keysAndValues); i += 2 { - var v interface{} - k := keysAndValues[i] - if i+1 < len(keysAndValues) { - v = keysAndValues[i+1] - } else { - v = missingValue - } - b.WriteByte(' ') - // Keys are assumed to be well-formed according to - // https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/migration-to-structured-logging.md#name-arguments - // for the sake of performance. Keys with spaces, - // special characters, etc. will break parsing. - if k, ok := k.(string); ok { - // Avoid one allocation when the key is a string, which - // normally it should be. - b.WriteString(k) - } else { - b.WriteString(fmt.Sprintf("%s", k)) - } - - // The type checks are sorted so that more frequently used ones - // come first because that is then faster in the common - // cases. In Kubernetes, ObjectRef (a Stringer) is more common - // than plain strings - // (https://github.com/kubernetes/kubernetes/pull/106594#issuecomment-975526235). - switch v := v.(type) { - case fmt.Stringer: - writeStringValue(b, true, StringerToString(v)) - case string: - writeStringValue(b, true, v) - case error: - writeStringValue(b, true, ErrorToString(v)) - case []byte: - // In https://github.com/kubernetes/klog/pull/237 it was decided - // to format byte slices with "%+q". The advantages of that are: - // - readable output if the bytes happen to be printable - // - non-printable bytes get represented as unicode escape - // sequences (\uxxxx) - // - // The downsides are that we cannot use the faster - // strconv.Quote here and that multi-line output is not - // supported. If developers know that a byte array is - // printable and they want multi-line output, they can - // convert the value to string before logging it. - b.WriteByte('=') - b.WriteString(fmt.Sprintf("%+q", v)) - default: - writeStringValue(b, false, fmt.Sprintf("%+v", v)) - } - } -} - -// StringerToString converts a Stringer to a string, -// handling panics if they occur. -func StringerToString(s fmt.Stringer) (ret string) { - defer func() { - if err := recover(); err != nil { - ret = fmt.Sprintf("", err) - } - }() - ret = s.String() - return -} - -// ErrorToString converts an error to a string, -// handling panics if they occur. -func ErrorToString(err error) (ret string) { - defer func() { - if err := recover(); err != nil { - ret = fmt.Sprintf("", err) - } - }() - ret = err.Error() - return -} - -func writeStringValue(b *bytes.Buffer, quote bool, v string) { - data := []byte(v) - index := bytes.IndexByte(data, '\n') - if index == -1 { - b.WriteByte('=') - if quote { - // Simple string, quote quotation marks and non-printable characters. - b.WriteString(strconv.Quote(v)) - return - } - // Non-string with no line breaks. - b.WriteString(v) - return - } - - // Complex multi-line string, show as-is with indention like this: - // I... "hello world" key=< - // line 1 - // line 2 - // > - // - // Tabs indent the lines of the value while the end of string delimiter - // is indented with a space. That has two purposes: - // - visual difference between the two for a human reader because indention - // will be different - // - no ambiguity when some value line starts with the end delimiter - // - // One downside is that the output cannot distinguish between strings that - // end with a line break and those that don't because the end delimiter - // will always be on the next line. - b.WriteString("=<\n") - for index != -1 { - b.WriteByte('\t') - b.Write(data[0 : index+1]) - data = data[index+1:] - index = bytes.IndexByte(data, '\n') - } - if len(data) == 0 { - // String ended with line break, don't add another. - b.WriteString(" >") - } else { - // No line break at end of last line, write rest of string and - // add one. - b.WriteByte('\t') - b.Write(data) - b.WriteString("\n >") - } -} diff --git a/cluster-autoscaler/vendor/k8s.io/klog/v2/internal/severity/severity.go b/cluster-autoscaler/vendor/k8s.io/klog/v2/internal/severity/severity.go deleted file mode 100644 index 30fa1834f0fb..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/klog/v2/internal/severity/severity.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2013 Google Inc. All Rights Reserved. -// Copyright 2022 The Kubernetes Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package severity provides definitions for klog severity (info, warning, ...) -package severity - -import ( - "strings" -) - -// severity identifies the sort of log: info, warning etc. The binding to flag.Value -// is handled in klog.go -type Severity int32 // sync/atomic int32 - -// These constants identify the log levels in order of increasing severity. -// A message written to a high-severity log file is also written to each -// lower-severity log file. -const ( - InfoLog Severity = iota - WarningLog - ErrorLog - FatalLog - NumSeverity = 4 -) - -// Char contains one shortcut letter per severity level. -const Char = "IWEF" - -// Name contains one name per severity level. -var Name = []string{ - InfoLog: "INFO", - WarningLog: "WARNING", - ErrorLog: "ERROR", - FatalLog: "FATAL", -} - -// ByName looks up a severity level by name. -func ByName(s string) (Severity, bool) { - s = strings.ToUpper(s) - for i, name := range Name { - if name == s { - return Severity(i), true - } - } - return 0, false -} diff --git a/cluster-autoscaler/vendor/k8s.io/klog/v2/k8s_references.go b/cluster-autoscaler/vendor/k8s.io/klog/v2/k8s_references.go deleted file mode 100644 index db58f8baa674..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/klog/v2/k8s_references.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package klog - -import ( - "fmt" - "reflect" - - "github.com/go-logr/logr" -) - -// ObjectRef references a kubernetes object -type ObjectRef struct { - Name string `json:"name"` - Namespace string `json:"namespace,omitempty"` -} - -func (ref ObjectRef) String() string { - if ref.Namespace != "" { - return fmt.Sprintf("%s/%s", ref.Namespace, ref.Name) - } - return ref.Name -} - -// MarshalLog ensures that loggers with support for structured output will log -// as a struct by removing the String method via a custom type. -func (ref ObjectRef) MarshalLog() interface{} { - type or ObjectRef - return or(ref) -} - -var _ logr.Marshaler = ObjectRef{} - -// KMetadata is a subset of the kubernetes k8s.io/apimachinery/pkg/apis/meta/v1.Object interface -// this interface may expand in the future, but will always be a subset of the -// kubernetes k8s.io/apimachinery/pkg/apis/meta/v1.Object interface -type KMetadata interface { - GetName() string - GetNamespace() string -} - -// KObj returns ObjectRef from ObjectMeta -func KObj(obj KMetadata) ObjectRef { - if obj == nil { - return ObjectRef{} - } - if val := reflect.ValueOf(obj); val.Kind() == reflect.Ptr && val.IsNil() { - return ObjectRef{} - } - - return ObjectRef{ - Name: obj.GetName(), - Namespace: obj.GetNamespace(), - } -} - -// KRef returns ObjectRef from name and namespace -func KRef(namespace, name string) ObjectRef { - return ObjectRef{ - Name: name, - Namespace: namespace, - } -} - -// KObjs returns slice of ObjectRef from an slice of ObjectMeta -func KObjs(arg interface{}) []ObjectRef { - s := reflect.ValueOf(arg) - if s.Kind() != reflect.Slice { - return nil - } - objectRefs := make([]ObjectRef, 0, s.Len()) - for i := 0; i < s.Len(); i++ { - if v, ok := s.Index(i).Interface().(KMetadata); ok { - objectRefs = append(objectRefs, KObj(v)) - } else { - return nil - } - } - return objectRefs -} diff --git a/cluster-autoscaler/vendor/k8s.io/klog/v2/klog.go b/cluster-autoscaler/vendor/k8s.io/klog/v2/klog.go index cb04590fe63b..45efbb0755da 100644 --- a/cluster-autoscaler/vendor/k8s.io/klog/v2/klog.go +++ b/cluster-autoscaler/vendor/k8s.io/klog/v2/klog.go @@ -81,6 +81,7 @@ import ( "math" "os" "path/filepath" + "reflect" "runtime" "strconv" "strings" @@ -89,58 +90,81 @@ import ( "time" "github.com/go-logr/logr" - - "k8s.io/klog/v2/internal/buffer" - "k8s.io/klog/v2/internal/clock" - "k8s.io/klog/v2/internal/serialize" - "k8s.io/klog/v2/internal/severity" ) -// severityValue identifies the sort of log: info, warning etc. It also implements +// severity identifies the sort of log: info, warning etc. It also implements // the flag.Value interface. The -stderrthreshold flag is of type severity and // should be modified only through the flag.Value interface. The values match // the corresponding constants in C++. -type severityValue struct { - severity.Severity +type severity int32 // sync/atomic int32 + +// These constants identify the log levels in order of increasing severity. +// A message written to a high-severity log file is also written to each +// lower-severity log file. +const ( + infoLog severity = iota + warningLog + errorLog + fatalLog + numSeverity = 4 +) + +const severityChar = "IWEF" + +var severityName = []string{ + infoLog: "INFO", + warningLog: "WARNING", + errorLog: "ERROR", + fatalLog: "FATAL", } // get returns the value of the severity. -func (s *severityValue) get() severity.Severity { - return severity.Severity(atomic.LoadInt32((*int32)(&s.Severity))) +func (s *severity) get() severity { + return severity(atomic.LoadInt32((*int32)(s))) } // set sets the value of the severity. -func (s *severityValue) set(val severity.Severity) { - atomic.StoreInt32((*int32)(&s.Severity), int32(val)) +func (s *severity) set(val severity) { + atomic.StoreInt32((*int32)(s), int32(val)) } // String is part of the flag.Value interface. -func (s *severityValue) String() string { - return strconv.FormatInt(int64(s.Severity), 10) +func (s *severity) String() string { + return strconv.FormatInt(int64(*s), 10) } // Get is part of the flag.Getter interface. -func (s *severityValue) Get() interface{} { - return s.Severity +func (s *severity) Get() interface{} { + return *s } // Set is part of the flag.Value interface. -func (s *severityValue) Set(value string) error { - var threshold severity.Severity +func (s *severity) Set(value string) error { + var threshold severity // Is it a known name? - if v, ok := severity.ByName(value); ok { + if v, ok := severityByName(value); ok { threshold = v } else { v, err := strconv.ParseInt(value, 10, 32) if err != nil { return err } - threshold = severity.Severity(v) + threshold = severity(v) } logging.stderrThreshold.set(threshold) return nil } +func severityByName(s string) (severity, bool) { + s = strings.ToUpper(s) + for i, name := range severityName { + if name == s { + return severity(i), true + } + } + return 0, false +} + // OutputStats tracks the number of output lines and bytes written. type OutputStats struct { lines int64 @@ -163,10 +187,10 @@ var Stats struct { Info, Warning, Error OutputStats } -var severityStats = [severity.NumSeverity]*OutputStats{ - severity.InfoLog: &Stats.Info, - severity.WarningLog: &Stats.Warning, - severity.ErrorLog: &Stats.Error, +var severityStats = [numSeverity]*OutputStats{ + infoLog: &Stats.Info, + warningLog: &Stats.Warning, + errorLog: &Stats.Error, } // Level is exported because it appears in the arguments to V and is @@ -380,11 +404,9 @@ type flushSyncWriter interface { io.Writer } -// init sets up the defaults. +// init sets up the defaults and runs flushDaemon. func init() { - logging.stderrThreshold = severityValue{ - Severity: severity.ErrorLog, // Default stderrThreshold is ERROR. - } + logging.stderrThreshold = errorLog // Default stderrThreshold is ERROR. logging.setVState(0, nil, false) logging.logDir = "" logging.logFile = "" @@ -395,7 +417,7 @@ func init() { logging.addDirHeader = false logging.skipLogHeaders = false logging.oneOutput = false - logging.flushD = newFlushDaemon(logging.lockAndFlushAll, nil) + go logging.flushDaemon() } // InitFlags is for explicitly initializing the flags. @@ -435,23 +457,20 @@ type loggingT struct { alsoToStderr bool // The -alsologtostderr flag. // Level flag. Handled atomically. - stderrThreshold severityValue // The -stderrthreshold flag. + stderrThreshold severity // The -stderrthreshold flag. - // bufferCache maintains the free list. It uses its own mutex + // freeList is a list of byte buffers, maintained under freeListMu. + freeList *buffer + // freeListMu maintains the free list. It is separate from the main mutex // so buffers can be grabbed and printed to without holding the main lock, // for better parallelization. - bufferCache buffer.Buffers + freeListMu sync.Mutex // mu protects the remaining elements of this structure and is // used to synchronize logging. mu sync.Mutex // file holds writer for each of the log types. - file [severity.NumSeverity]flushSyncWriter - // flushD holds a flushDaemon that frequently flushes log file buffers. - flushD *flushDaemon - // flushInterval is the interval for periodic flushing. If zero, - // the global default will be used. - flushInterval time.Duration + file [numSeverity]flushSyncWriter // pcs is used in V to avoid an allocation when computing the caller's PC. pcs [1]uintptr // vmap is a cache of the V Level for each V() call site, identified by PC. @@ -489,6 +508,9 @@ type loggingT struct { // If true, add the file directory to the header addDirHeader bool + // If set, all output will be redirected unconditionally to the provided logr.Logger + logr *logr.Logger + // If true, messages will not be propagated to lower severity log levels oneOutput bool @@ -496,6 +518,13 @@ type loggingT struct { filter LogFilter } +// buffer holds a byte Buffer for reuse. The zero value is ready for use. +type buffer struct { + bytes.Buffer + tmp [64]byte // temporary byte array for creating headers. + next *buffer +} + var logging loggingT // setVState sets a consistent state for V logging. @@ -518,6 +547,35 @@ func (l *loggingT) setVState(verbosity Level, filter []modulePat, setFilter bool l.verbosity.set(verbosity) } +// getBuffer returns a new, ready-to-use buffer. +func (l *loggingT) getBuffer() *buffer { + l.freeListMu.Lock() + b := l.freeList + if b != nil { + l.freeList = b.next + } + l.freeListMu.Unlock() + if b == nil { + b = new(buffer) + } else { + b.next = nil + b.Reset() + } + return b +} + +// putBuffer returns a buffer to the free list. +func (l *loggingT) putBuffer(b *buffer) { + if b.Len() >= 256 { + // Let big buffers die a natural death. + return + } + l.freeListMu.Lock() + b.next = l.freeList + l.freeList = b + l.freeListMu.Unlock() +} + var timeNow = time.Now // Stubbed out for testing. /* @@ -537,7 +595,7 @@ where the fields are defined as follows: line The line number msg The user-supplied message */ -func (l *loggingT) header(s severity.Severity, depth int) (*buffer.Buffer, string, int) { +func (l *loggingT) header(s severity, depth int) (*buffer, string, int) { _, file, line, ok := runtime.Caller(3 + depth) if !ok { file = "???" @@ -557,68 +615,133 @@ func (l *loggingT) header(s severity.Severity, depth int) (*buffer.Buffer, strin } // formatHeader formats a log header using the provided file name and line number. -func (l *loggingT) formatHeader(s severity.Severity, file string, line int) *buffer.Buffer { - buf := l.bufferCache.GetBuffer() +func (l *loggingT) formatHeader(s severity, file string, line int) *buffer { + now := timeNow() + if line < 0 { + line = 0 // not a real line number, but acceptable to someDigits + } + if s > fatalLog { + s = infoLog // for safety. + } + buf := l.getBuffer() if l.skipHeaders { return buf } - now := timeNow() - buf.FormatHeader(s, file, line, now) + + // Avoid Fprintf, for speed. The format is so simple that we can do it quickly by hand. + // It's worth about 3X. Fprintf is hard. + _, month, day := now.Date() + hour, minute, second := now.Clock() + // Lmmdd hh:mm:ss.uuuuuu threadid file:line] + buf.tmp[0] = severityChar[s] + buf.twoDigits(1, int(month)) + buf.twoDigits(3, day) + buf.tmp[5] = ' ' + buf.twoDigits(6, hour) + buf.tmp[8] = ':' + buf.twoDigits(9, minute) + buf.tmp[11] = ':' + buf.twoDigits(12, second) + buf.tmp[14] = '.' + buf.nDigits(6, 15, now.Nanosecond()/1000, '0') + buf.tmp[21] = ' ' + buf.nDigits(7, 22, pid, ' ') // TODO: should be TID + buf.tmp[29] = ' ' + buf.Write(buf.tmp[:30]) + buf.WriteString(file) + buf.tmp[0] = ':' + n := buf.someDigits(1, line) + buf.tmp[n+1] = ']' + buf.tmp[n+2] = ' ' + buf.Write(buf.tmp[:n+3]) return buf } -func (l *loggingT) println(s severity.Severity, logger *logr.Logger, filter LogFilter, args ...interface{}) { - l.printlnDepth(s, logger, filter, 1, args...) +// Some custom tiny helper functions to print the log header efficiently. + +const digits = "0123456789" + +// twoDigits formats a zero-prefixed two-digit integer at buf.tmp[i]. +func (buf *buffer) twoDigits(i, d int) { + buf.tmp[i+1] = digits[d%10] + d /= 10 + buf.tmp[i] = digits[d%10] } -func (l *loggingT) printlnDepth(s severity.Severity, logger *logr.Logger, filter LogFilter, depth int, args ...interface{}) { - buf, file, line := l.header(s, depth) +// nDigits formats an n-digit integer at buf.tmp[i], +// padding with pad on the left. +// It assumes d >= 0. +func (buf *buffer) nDigits(n, i, d int, pad byte) { + j := n - 1 + for ; j >= 0 && d > 0; j-- { + buf.tmp[i+j] = digits[d%10] + d /= 10 + } + for ; j >= 0; j-- { + buf.tmp[i+j] = pad + } +} + +// someDigits formats a zero-prefixed variable-width integer at buf.tmp[i]. +func (buf *buffer) someDigits(i, d int) int { + // Print into the top, then copy down. We know there's space for at least + // a 10-digit number. + j := len(buf.tmp) + for { + j-- + buf.tmp[j] = digits[d%10] + d /= 10 + if d == 0 { + break + } + } + return copy(buf.tmp[i:], buf.tmp[j:]) +} + +func (l *loggingT) println(s severity, logger *logr.Logger, filter LogFilter, args ...interface{}) { + buf, file, line := l.header(s, 0) // if logger is set, we clear the generated header as we rely on the backing // logger implementation to print headers if logger != nil { - l.bufferCache.PutBuffer(buf) - buf = l.bufferCache.GetBuffer() + l.putBuffer(buf) + buf = l.getBuffer() } if filter != nil { args = filter.Filter(args) } fmt.Fprintln(buf, args...) - l.output(s, logger, buf, depth, file, line, false) + l.output(s, logger, buf, 0 /* depth */, file, line, false) } -func (l *loggingT) print(s severity.Severity, logger *logr.Logger, filter LogFilter, args ...interface{}) { +func (l *loggingT) print(s severity, logger *logr.Logger, filter LogFilter, args ...interface{}) { l.printDepth(s, logger, filter, 1, args...) } -func (l *loggingT) printDepth(s severity.Severity, logger *logr.Logger, filter LogFilter, depth int, args ...interface{}) { +func (l *loggingT) printDepth(s severity, logger *logr.Logger, filter LogFilter, depth int, args ...interface{}) { buf, file, line := l.header(s, depth) // if logr is set, we clear the generated header as we rely on the backing // logr implementation to print headers if logger != nil { - l.bufferCache.PutBuffer(buf) - buf = l.bufferCache.GetBuffer() + l.putBuffer(buf) + buf = l.getBuffer() } if filter != nil { args = filter.Filter(args) } fmt.Fprint(buf, args...) - if buf.Len() == 0 || buf.Bytes()[buf.Len()-1] != '\n' { + if buf.Bytes()[buf.Len()-1] != '\n' { buf.WriteByte('\n') } l.output(s, logger, buf, depth, file, line, false) } -func (l *loggingT) printf(s severity.Severity, logger *logr.Logger, filter LogFilter, format string, args ...interface{}) { - l.printfDepth(s, logger, filter, 1, format, args...) -} - -func (l *loggingT) printfDepth(s severity.Severity, logger *logr.Logger, filter LogFilter, depth int, format string, args ...interface{}) { - buf, file, line := l.header(s, depth) +func (l *loggingT) printf(s severity, logger *logr.Logger, filter LogFilter, format string, args ...interface{}) { + buf, file, line := l.header(s, 0) // if logr is set, we clear the generated header as we rely on the backing // logr implementation to print headers if logger != nil { - l.bufferCache.PutBuffer(buf) - buf = l.bufferCache.GetBuffer() + l.putBuffer(buf) + buf = l.getBuffer() } if filter != nil { format, args = filter.FilterF(format, args) @@ -627,19 +750,19 @@ func (l *loggingT) printfDepth(s severity.Severity, logger *logr.Logger, filter if buf.Bytes()[buf.Len()-1] != '\n' { buf.WriteByte('\n') } - l.output(s, logger, buf, depth, file, line, false) + l.output(s, logger, buf, 0 /* depth */, file, line, false) } // printWithFileLine behaves like print but uses the provided file and line number. If // alsoLogToStderr is true, the log message always appears on standard error; it // will also appear in the log file unless --logtostderr is set. -func (l *loggingT) printWithFileLine(s severity.Severity, logger *logr.Logger, filter LogFilter, file string, line int, alsoToStderr bool, args ...interface{}) { +func (l *loggingT) printWithFileLine(s severity, logger *logr.Logger, filter LogFilter, file string, line int, alsoToStderr bool, args ...interface{}) { buf := l.formatHeader(s, file, line) // if logr is set, we clear the generated header as we rely on the backing // logr implementation to print headers if logger != nil { - l.bufferCache.PutBuffer(buf) - buf = l.bufferCache.GetBuffer() + l.putBuffer(buf) + buf = l.getBuffer() } if filter != nil { args = filter.Filter(args) @@ -660,7 +783,7 @@ func (l *loggingT) errorS(err error, logger *logr.Logger, filter LogFilter, dept logger.WithCallDepth(depth+2).Error(err, msg, keysAndValues...) return } - l.printS(err, severity.ErrorLog, depth+1, msg, keysAndValues...) + l.printS(err, errorLog, depth+1, msg, keysAndValues...) } // if loggr is specified, will call loggr.Info, otherwise output with logging module. @@ -672,25 +795,48 @@ func (l *loggingT) infoS(logger *logr.Logger, filter LogFilter, depth int, msg s logger.WithCallDepth(depth+2).Info(msg, keysAndValues...) return } - l.printS(nil, severity.InfoLog, depth+1, msg, keysAndValues...) + l.printS(nil, infoLog, depth+1, msg, keysAndValues...) } // printS is called from infoS and errorS if loggr is not specified. // set log severity by s -func (l *loggingT) printS(err error, s severity.Severity, depth int, msg string, keysAndValues ...interface{}) { - // Only create a new buffer if we don't have one cached. - b := l.bufferCache.GetBuffer() - // The message is always quoted, even if it contains line breaks. - // If developers want multi-line output, they should use a small, fixed - // message and put the multi-line output into a value. - b.WriteString(strconv.Quote(msg)) +func (l *loggingT) printS(err error, s severity, depth int, msg string, keysAndValues ...interface{}) { + b := &bytes.Buffer{} + b.WriteString(fmt.Sprintf("%q", msg)) if err != nil { - serialize.KVListFormat(&b.Buffer, "err", err) + b.WriteByte(' ') + b.WriteString(fmt.Sprintf("err=%q", err.Error())) + } + kvListFormat(b, keysAndValues...) + l.printDepth(s, logging.logr, nil, depth+1, b) +} + +const missingValue = "(MISSING)" + +func kvListFormat(b *bytes.Buffer, keysAndValues ...interface{}) { + for i := 0; i < len(keysAndValues); i += 2 { + var v interface{} + k := keysAndValues[i] + if i+1 < len(keysAndValues) { + v = keysAndValues[i+1] + } else { + v = missingValue + } + b.WriteByte(' ') + + switch v.(type) { + case string, error: + b.WriteString(fmt.Sprintf("%s=%q", k, v)) + case []byte: + b.WriteString(fmt.Sprintf("%s=%+q", k, v)) + default: + if _, ok := v.(fmt.Stringer); ok { + b.WriteString(fmt.Sprintf("%s=%q", k, v)) + } else { + b.WriteString(fmt.Sprintf("%s=%+v", k, v)) + } + } } - serialize.KVListFormat(&b.Buffer, keysAndValues...) - l.printDepth(s, globalLogger, nil, depth+1, &b.Buffer) - // Make the buffer available for reuse. - l.bufferCache.PutBuffer(b) } // redirectBuffer is used to set an alternate destination for the logs @@ -710,11 +856,36 @@ func (rb *redirectBuffer) Write(bytes []byte) (n int, err error) { return rb.w.Write(bytes) } +// SetLogger will set the backing logr implementation for klog. +// If set, all log lines will be suppressed from the regular Output, and +// redirected to the logr implementation. +// Use as: +// ... +// klog.SetLogger(zapr.NewLogger(zapLog)) +// +// To remove a backing logr implemention, use ClearLogger. Setting an +// empty logger with SetLogger(logr.Logger{}) does not work. +func SetLogger(logr logr.Logger) { + logging.mu.Lock() + defer logging.mu.Unlock() + + logging.logr = &logr +} + +// ClearLogger removes a backing logr implementation if one was set earlier +// with SetLogger. +func ClearLogger() { + logging.mu.Lock() + defer logging.mu.Unlock() + + logging.logr = nil +} + // SetOutput sets the output destination for all severities func SetOutput(w io.Writer) { logging.mu.Lock() defer logging.mu.Unlock() - for s := severity.FatalLog; s >= severity.InfoLog; s-- { + for s := fatalLog; s >= infoLog; s-- { rb := &redirectBuffer{ w: w, } @@ -726,7 +897,7 @@ func SetOutput(w io.Writer) { func SetOutputBySeverity(name string, w io.Writer) { logging.mu.Lock() defer logging.mu.Unlock() - sev, ok := severity.ByName(name) + sev, ok := severityByName(name) if !ok { panic(fmt.Sprintf("SetOutputBySeverity(%q): unrecognized severity name", name)) } @@ -745,16 +916,8 @@ func LogToStderr(stderr bool) { } // output writes the data to the log files and releases the buffer. -func (l *loggingT) output(s severity.Severity, log *logr.Logger, buf *buffer.Buffer, depth int, file string, line int, alsoToStderr bool) { - var isLocked = true +func (l *loggingT) output(s severity, log *logr.Logger, buf *buffer, depth int, file string, line int, alsoToStderr bool) { l.mu.Lock() - defer func() { - if isLocked { - // Unlock before returning in case that it wasn't done already. - l.mu.Unlock() - } - }() - if l.traceLocation.isSet() { if l.traceLocation.match(file, line) { buf.Write(stacks(false)) @@ -764,8 +927,8 @@ func (l *loggingT) output(s severity.Severity, log *logr.Logger, buf *buffer.Buf if log != nil { // TODO: set 'severity' and caller information as structured log info // keysAndValues := []interface{}{"severity", severityName[s], "file", file, "line", line} - if s == severity.ErrorLog { - globalLogger.WithCallDepth(depth+3).Error(nil, string(data)) + if s == errorLog { + l.logr.WithCallDepth(depth+3).Error(nil, string(data)) } else { log.WithCallDepth(depth + 3).Info(string(data)) } @@ -779,13 +942,13 @@ func (l *loggingT) output(s severity.Severity, log *logr.Logger, buf *buffer.Buf if logging.logFile != "" { // Since we are using a single log file, all of the items in l.file array // will point to the same file, so just use one of them to write data. - if l.file[severity.InfoLog] == nil { - if err := l.createFiles(severity.InfoLog); err != nil { + if l.file[infoLog] == nil { + if err := l.createFiles(infoLog); err != nil { os.Stderr.Write(data) // Make sure the message appears somewhere. l.exit(err) } } - l.file[severity.InfoLog].Write(data) + l.file[infoLog].Write(data) } else { if l.file[s] == nil { if err := l.createFiles(s); err != nil { @@ -798,28 +961,27 @@ func (l *loggingT) output(s severity.Severity, log *logr.Logger, buf *buffer.Buf l.file[s].Write(data) } else { switch s { - case severity.FatalLog: - l.file[severity.FatalLog].Write(data) + case fatalLog: + l.file[fatalLog].Write(data) fallthrough - case severity.ErrorLog: - l.file[severity.ErrorLog].Write(data) + case errorLog: + l.file[errorLog].Write(data) fallthrough - case severity.WarningLog: - l.file[severity.WarningLog].Write(data) + case warningLog: + l.file[warningLog].Write(data) fallthrough - case severity.InfoLog: - l.file[severity.InfoLog].Write(data) + case infoLog: + l.file[infoLog].Write(data) } } } } - if s == severity.FatalLog { + if s == fatalLog { // If we got here via Exit rather than Fatal, print no stacks. if atomic.LoadUint32(&fatalNoStacks) > 0 { l.mu.Unlock() - isLocked = false - timeoutFlush(ExitFlushTimeout) - OsExit(1) + timeoutFlush(10 * time.Second) + os.Exit(1) } // Dump all goroutine stacks before exiting. trace := stacks(true) @@ -829,24 +991,40 @@ func (l *loggingT) output(s severity.Severity, log *logr.Logger, buf *buffer.Buf } // Write the stack trace for all goroutines to the files. logExitFunc = func(error) {} // If we get a write error, we'll still exit below. - for log := severity.FatalLog; log >= severity.InfoLog; log-- { + for log := fatalLog; log >= infoLog; log-- { if f := l.file[log]; f != nil { // Can be nil if -logtostderr is set. f.Write(trace) } } l.mu.Unlock() - isLocked = false - timeoutFlush(ExitFlushTimeout) - OsExit(255) // C++ uses -1, which is silly because it's anded with 255 anyway. + timeoutFlush(10 * time.Second) + os.Exit(255) // C++ uses -1, which is silly because it's anded with 255 anyway. } - l.bufferCache.PutBuffer(buf) - + l.putBuffer(buf) + l.mu.Unlock() if stats := severityStats[s]; stats != nil { atomic.AddInt64(&stats.lines, 1) atomic.AddInt64(&stats.bytes, int64(len(data))) } } +// timeoutFlush calls Flush and returns when it completes or after timeout +// elapses, whichever happens first. This is needed because the hooks invoked +// by Flush may deadlock when klog.Fatal is called from a hook that holds +// a lock. +func timeoutFlush(timeout time.Duration) { + done := make(chan bool, 1) + go func() { + Flush() // calls logging.lockAndFlushAll() + done <- true + }() + select { + case <-done: + case <-time.After(timeout): + fmt.Fprintln(os.Stderr, "klog: Flush took longer than", timeout) + } +} + // stacks is a wrapper for runtime.Stack that attempts to recover the data for all goroutines. func stacks(all bool) []byte { // We don't know how big the traces are, so grow a few times if they don't fit. Start large, though. @@ -883,7 +1061,7 @@ func (l *loggingT) exit(err error) { return } l.flushAll() - OsExit(2) + os.Exit(2) } // syncBuffer joins a bufio.Writer to its underlying file, providing access to the @@ -894,7 +1072,7 @@ type syncBuffer struct { logger *loggingT *bufio.Writer file *os.File - sev severity.Severity + sev severity nbytes uint64 // The number of bytes written to this file maxbytes uint64 // The max number of bytes this syncBuffer.file can hold before cleaning up. } @@ -940,7 +1118,7 @@ func (sb *syncBuffer) rotateFile(now time.Time, startup bool) error { sb.file.Close() } var err error - sb.file, _, err = create(severity.Name[sb.sev], now, startup) + sb.file, _, err = create(severityName[sb.sev], now, startup) if err != nil { return err } @@ -978,16 +1156,11 @@ const bufferSize = 256 * 1024 // createFiles creates all the log files for severity from sev down to infoLog. // l.mu is held. -func (l *loggingT) createFiles(sev severity.Severity) error { - interval := l.flushInterval - if interval == 0 { - interval = flushInterval - } - l.flushD.run(interval) +func (l *loggingT) createFiles(sev severity) error { now := time.Now() // Files are created in decreasing severity order, so as soon as we find one // has already been created, we can stop. - for s := sev; s >= severity.InfoLog && l.file[s] == nil; s-- { + for s := sev; s >= infoLog && l.file[s] == nil; s-- { sb := &syncBuffer{ logger: l, sev: s, @@ -1004,93 +1177,12 @@ func (l *loggingT) createFiles(sev severity.Severity) error { const flushInterval = 5 * time.Second // flushDaemon periodically flushes the log file buffers. -type flushDaemon struct { - mu sync.Mutex - clock clock.WithTicker - flush func() - stopC chan struct{} - stopDone chan struct{} -} - -// newFlushDaemon returns a new flushDaemon. If the passed clock is nil, a -// clock.RealClock is used. -func newFlushDaemon(flush func(), tickClock clock.WithTicker) *flushDaemon { - if tickClock == nil { - tickClock = clock.RealClock{} - } - return &flushDaemon{ - flush: flush, - clock: tickClock, +func (l *loggingT) flushDaemon() { + for range time.NewTicker(flushInterval).C { + l.lockAndFlushAll() } } -// run starts a goroutine that periodically calls the daemons flush function. -// Calling run on an already running daemon will have no effect. -func (f *flushDaemon) run(interval time.Duration) { - f.mu.Lock() - defer f.mu.Unlock() - - if f.stopC != nil { // daemon already running - return - } - - f.stopC = make(chan struct{}, 1) - f.stopDone = make(chan struct{}, 1) - - ticker := f.clock.NewTicker(interval) - go func() { - defer ticker.Stop() - defer func() { f.stopDone <- struct{}{} }() - for { - select { - case <-ticker.C(): - f.flush() - case <-f.stopC: - f.flush() - return - } - } - }() -} - -// stop stops the running flushDaemon and waits until the daemon has shut down. -// Calling stop on a daemon that isn't running will have no effect. -func (f *flushDaemon) stop() { - f.mu.Lock() - defer f.mu.Unlock() - - if f.stopC == nil { // daemon not running - return - } - - f.stopC <- struct{}{} - <-f.stopDone - - f.stopC = nil - f.stopDone = nil -} - -// isRunning returns true if the flush daemon is running. -func (f *flushDaemon) isRunning() bool { - f.mu.Lock() - defer f.mu.Unlock() - return f.stopC != nil -} - -// StopFlushDaemon stops the flush daemon, if running. -// This prevents klog from leaking goroutines on shutdown. After stopping -// the daemon, you can still manually flush buffers by calling Flush(). -func StopFlushDaemon() { - logging.flushD.stop() -} - -// StartFlushDaemon ensures that the flush daemon runs with the given delay -// between flush calls. If it is already running, it gets restarted. -func StartFlushDaemon(interval time.Duration) { - StopFlushDaemon() - logging.flushD.run(interval) -} - // lockAndFlushAll is like flushAll but locks l.mu first. func (l *loggingT) lockAndFlushAll() { l.mu.Lock() @@ -1102,16 +1194,13 @@ func (l *loggingT) lockAndFlushAll() { // l.mu is held. func (l *loggingT) flushAll() { // Flush from fatal down, in case there's trouble flushing. - for s := severity.FatalLog; s >= severity.InfoLog; s-- { + for s := fatalLog; s >= infoLog; s-- { file := l.file[s] if file != nil { file.Flush() // ignore error file.Sync() // ignore error } } - if globalLoggerOptions.flush != nil { - globalLoggerOptions.flush() - } } // CopyStandardLogTo arranges for messages written to the Go "log" package's @@ -1122,7 +1211,7 @@ func (l *loggingT) flushAll() { // Valid names are "INFO", "WARNING", "ERROR", and "FATAL". If the name is not // recognized, CopyStandardLogTo panics. func CopyStandardLogTo(name string) { - sev, ok := severity.ByName(name) + sev, ok := severityByName(name) if !ok { panic(fmt.Sprintf("log.CopyStandardLogTo(%q): unrecognized severity name", name)) } @@ -1134,7 +1223,7 @@ func CopyStandardLogTo(name string) { // logBridge provides the Write method that enables CopyStandardLogTo to connect // Go's standard logs to the logs provided by this package. -type logBridge severity.Severity +type logBridge severity // Write parses the standard logging line and passes its components to the // logger for severity(lb). @@ -1158,7 +1247,7 @@ func (lb logBridge) Write(b []byte) (n int, err error) { } // printWithFileLine with alsoToStderr=true, so standard log messages // always appear on standard error. - logging.printWithFileLine(severity.Severity(lb), globalLogger, logging.filter, file, line, true, text) + logging.printWithFileLine(severity(lb), logging.logr, logging.filter, file, line, true, text) return len(b), nil } @@ -1193,21 +1282,22 @@ func (l *loggingT) setV(pc uintptr) Level { type Verbose struct { enabled bool logr *logr.Logger + filter LogFilter } func newVerbose(level Level, b bool) Verbose { - if globalLogger == nil { - return Verbose{b, nil} + if logging.logr == nil { + return Verbose{b, nil, logging.filter} } - v := globalLogger.V(int(level)) - return Verbose{b, &v} + v := logging.logr.V(int(level)) + return Verbose{b, &v, logging.filter} } // V reports whether verbosity at the call site is at least the requested level. // The returned value is a struct of type Verbose, which implements Info, Infoln // and Infof. These methods will write to the Info log if called. // Thus, one may write either -// if klog.V(2).Enabled() { klog.Info("log this") } +// if glog.V(2).Enabled() { klog.Info("log this") } // or // klog.V(2).Info("log this") // The second form is shorter but the first is cheaper if logging is off because it does @@ -1263,15 +1353,7 @@ func (v Verbose) Enabled() bool { // See the documentation of V for usage. func (v Verbose) Info(args ...interface{}) { if v.enabled { - logging.print(severity.InfoLog, v.logr, logging.filter, args...) - } -} - -// InfoDepth is equivalent to the global InfoDepth function, guarded by the value of v. -// See the documentation of V for usage. -func (v Verbose) InfoDepth(depth int, args ...interface{}) { - if v.enabled { - logging.printDepth(severity.InfoLog, v.logr, logging.filter, depth, args...) + logging.print(infoLog, v.logr, v.filter, args...) } } @@ -1279,15 +1361,7 @@ func (v Verbose) InfoDepth(depth int, args ...interface{}) { // See the documentation of V for usage. func (v Verbose) Infoln(args ...interface{}) { if v.enabled { - logging.println(severity.InfoLog, v.logr, logging.filter, args...) - } -} - -// InfolnDepth is equivalent to the global InfolnDepth function, guarded by the value of v. -// See the documentation of V for usage. -func (v Verbose) InfolnDepth(depth int, args ...interface{}) { - if v.enabled { - logging.printlnDepth(severity.InfoLog, v.logr, logging.filter, depth, args...) + logging.println(infoLog, v.logr, v.filter, args...) } } @@ -1295,15 +1369,7 @@ func (v Verbose) InfolnDepth(depth int, args ...interface{}) { // See the documentation of V for usage. func (v Verbose) Infof(format string, args ...interface{}) { if v.enabled { - logging.printf(severity.InfoLog, v.logr, logging.filter, format, args...) - } -} - -// InfofDepth is equivalent to the global InfofDepth function, guarded by the value of v. -// See the documentation of V for usage. -func (v Verbose) InfofDepth(depth int, format string, args ...interface{}) { - if v.enabled { - logging.printfDepth(severity.InfoLog, v.logr, logging.filter, depth, format, args...) + logging.printf(infoLog, v.logr, v.filter, format, args...) } } @@ -1311,28 +1377,20 @@ func (v Verbose) InfofDepth(depth int, format string, args ...interface{}) { // See the documentation of V for usage. func (v Verbose) InfoS(msg string, keysAndValues ...interface{}) { if v.enabled { - logging.infoS(v.logr, logging.filter, 0, msg, keysAndValues...) + logging.infoS(v.logr, v.filter, 0, msg, keysAndValues...) } } // InfoSDepth acts as InfoS but uses depth to determine which call frame to log. // InfoSDepth(0, "msg") is the same as InfoS("msg"). func InfoSDepth(depth int, msg string, keysAndValues ...interface{}) { - logging.infoS(globalLogger, logging.filter, depth, msg, keysAndValues...) -} - -// InfoSDepth is equivalent to the global InfoSDepth function, guarded by the value of v. -// See the documentation of V for usage. -func (v Verbose) InfoSDepth(depth int, msg string, keysAndValues ...interface{}) { - if v.enabled { - logging.infoS(v.logr, logging.filter, depth, msg, keysAndValues...) - } + logging.infoS(logging.logr, logging.filter, depth, msg, keysAndValues...) } // Deprecated: Use ErrorS instead. func (v Verbose) Error(err error, msg string, args ...interface{}) { if v.enabled { - logging.errorS(err, v.logr, logging.filter, 0, msg, args...) + logging.errorS(err, v.logr, v.filter, 0, msg, args...) } } @@ -1340,44 +1398,32 @@ func (v Verbose) Error(err error, msg string, args ...interface{}) { // See the documentation of V for usage. func (v Verbose) ErrorS(err error, msg string, keysAndValues ...interface{}) { if v.enabled { - logging.errorS(err, v.logr, logging.filter, 0, msg, keysAndValues...) + logging.errorS(err, v.logr, v.filter, 0, msg, keysAndValues...) } } // Info logs to the INFO log. // Arguments are handled in the manner of fmt.Print; a newline is appended if missing. func Info(args ...interface{}) { - logging.print(severity.InfoLog, globalLogger, logging.filter, args...) + logging.print(infoLog, logging.logr, logging.filter, args...) } // InfoDepth acts as Info but uses depth to determine which call frame to log. // InfoDepth(0, "msg") is the same as Info("msg"). func InfoDepth(depth int, args ...interface{}) { - logging.printDepth(severity.InfoLog, globalLogger, logging.filter, depth, args...) + logging.printDepth(infoLog, logging.logr, logging.filter, depth, args...) } // Infoln logs to the INFO log. // Arguments are handled in the manner of fmt.Println; a newline is always appended. func Infoln(args ...interface{}) { - logging.println(severity.InfoLog, globalLogger, logging.filter, args...) -} - -// InfolnDepth acts as Infoln but uses depth to determine which call frame to log. -// InfolnDepth(0, "msg") is the same as Infoln("msg"). -func InfolnDepth(depth int, args ...interface{}) { - logging.printlnDepth(severity.InfoLog, globalLogger, logging.filter, depth, args...) + logging.println(infoLog, logging.logr, logging.filter, args...) } // Infof logs to the INFO log. // Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. func Infof(format string, args ...interface{}) { - logging.printf(severity.InfoLog, globalLogger, logging.filter, format, args...) -} - -// InfofDepth acts as Infof but uses depth to determine which call frame to log. -// InfofDepth(0, "msg", args...) is the same as Infof("msg", args...). -func InfofDepth(depth int, format string, args ...interface{}) { - logging.printfDepth(severity.InfoLog, globalLogger, logging.filter, depth, format, args...) + logging.printf(infoLog, logging.logr, logging.filter, format, args...) } // InfoS structured logs to the INFO log. @@ -1389,79 +1435,55 @@ func InfofDepth(depth int, format string, args ...interface{}) { // output: // >> I1025 00:15:15.525108 1 controller_utils.go:116] "Pod status updated" pod="kubedns" status="ready" func InfoS(msg string, keysAndValues ...interface{}) { - logging.infoS(globalLogger, logging.filter, 0, msg, keysAndValues...) + logging.infoS(logging.logr, logging.filter, 0, msg, keysAndValues...) } // Warning logs to the WARNING and INFO logs. // Arguments are handled in the manner of fmt.Print; a newline is appended if missing. func Warning(args ...interface{}) { - logging.print(severity.WarningLog, globalLogger, logging.filter, args...) + logging.print(warningLog, logging.logr, logging.filter, args...) } // WarningDepth acts as Warning but uses depth to determine which call frame to log. // WarningDepth(0, "msg") is the same as Warning("msg"). func WarningDepth(depth int, args ...interface{}) { - logging.printDepth(severity.WarningLog, globalLogger, logging.filter, depth, args...) + logging.printDepth(warningLog, logging.logr, logging.filter, depth, args...) } // Warningln logs to the WARNING and INFO logs. // Arguments are handled in the manner of fmt.Println; a newline is always appended. func Warningln(args ...interface{}) { - logging.println(severity.WarningLog, globalLogger, logging.filter, args...) -} - -// WarninglnDepth acts as Warningln but uses depth to determine which call frame to log. -// WarninglnDepth(0, "msg") is the same as Warningln("msg"). -func WarninglnDepth(depth int, args ...interface{}) { - logging.printlnDepth(severity.WarningLog, globalLogger, logging.filter, depth, args...) + logging.println(warningLog, logging.logr, logging.filter, args...) } // Warningf logs to the WARNING and INFO logs. // Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. func Warningf(format string, args ...interface{}) { - logging.printf(severity.WarningLog, globalLogger, logging.filter, format, args...) -} - -// WarningfDepth acts as Warningf but uses depth to determine which call frame to log. -// WarningfDepth(0, "msg", args...) is the same as Warningf("msg", args...). -func WarningfDepth(depth int, format string, args ...interface{}) { - logging.printfDepth(severity.WarningLog, globalLogger, logging.filter, depth, format, args...) + logging.printf(warningLog, logging.logr, logging.filter, format, args...) } // Error logs to the ERROR, WARNING, and INFO logs. // Arguments are handled in the manner of fmt.Print; a newline is appended if missing. func Error(args ...interface{}) { - logging.print(severity.ErrorLog, globalLogger, logging.filter, args...) + logging.print(errorLog, logging.logr, logging.filter, args...) } // ErrorDepth acts as Error but uses depth to determine which call frame to log. // ErrorDepth(0, "msg") is the same as Error("msg"). func ErrorDepth(depth int, args ...interface{}) { - logging.printDepth(severity.ErrorLog, globalLogger, logging.filter, depth, args...) + logging.printDepth(errorLog, logging.logr, logging.filter, depth, args...) } // Errorln logs to the ERROR, WARNING, and INFO logs. // Arguments are handled in the manner of fmt.Println; a newline is always appended. func Errorln(args ...interface{}) { - logging.println(severity.ErrorLog, globalLogger, logging.filter, args...) -} - -// ErrorlnDepth acts as Errorln but uses depth to determine which call frame to log. -// ErrorlnDepth(0, "msg") is the same as Errorln("msg"). -func ErrorlnDepth(depth int, args ...interface{}) { - logging.printlnDepth(severity.ErrorLog, globalLogger, logging.filter, depth, args...) + logging.println(errorLog, logging.logr, logging.filter, args...) } // Errorf logs to the ERROR, WARNING, and INFO logs. // Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. func Errorf(format string, args ...interface{}) { - logging.printf(severity.ErrorLog, globalLogger, logging.filter, format, args...) -} - -// ErrorfDepth acts as Errorf but uses depth to determine which call frame to log. -// ErrorfDepth(0, "msg", args...) is the same as Errorf("msg", args...). -func ErrorfDepth(depth int, format string, args ...interface{}) { - logging.printfDepth(severity.ErrorLog, globalLogger, logging.filter, depth, format, args...) + logging.printf(errorLog, logging.logr, logging.filter, format, args...) } // ErrorS structured logs to the ERROR, WARNING, and INFO logs. @@ -1474,97 +1496,71 @@ func ErrorfDepth(depth int, format string, args ...interface{}) { // output: // >> E1025 00:15:15.525108 1 controller_utils.go:114] "Failed to update pod status" err="timeout" func ErrorS(err error, msg string, keysAndValues ...interface{}) { - logging.errorS(err, globalLogger, logging.filter, 0, msg, keysAndValues...) + logging.errorS(err, logging.logr, logging.filter, 0, msg, keysAndValues...) } // ErrorSDepth acts as ErrorS but uses depth to determine which call frame to log. // ErrorSDepth(0, "msg") is the same as ErrorS("msg"). func ErrorSDepth(depth int, err error, msg string, keysAndValues ...interface{}) { - logging.errorS(err, globalLogger, logging.filter, depth, msg, keysAndValues...) + logging.errorS(err, logging.logr, logging.filter, depth, msg, keysAndValues...) } // Fatal logs to the FATAL, ERROR, WARNING, and INFO logs, -// including a stack trace of all running goroutines, then calls OsExit(255). +// including a stack trace of all running goroutines, then calls os.Exit(255). // Arguments are handled in the manner of fmt.Print; a newline is appended if missing. func Fatal(args ...interface{}) { - logging.print(severity.FatalLog, globalLogger, logging.filter, args...) + logging.print(fatalLog, logging.logr, logging.filter, args...) } // FatalDepth acts as Fatal but uses depth to determine which call frame to log. // FatalDepth(0, "msg") is the same as Fatal("msg"). func FatalDepth(depth int, args ...interface{}) { - logging.printDepth(severity.FatalLog, globalLogger, logging.filter, depth, args...) + logging.printDepth(fatalLog, logging.logr, logging.filter, depth, args...) } // Fatalln logs to the FATAL, ERROR, WARNING, and INFO logs, -// including a stack trace of all running goroutines, then calls OsExit(255). +// including a stack trace of all running goroutines, then calls os.Exit(255). // Arguments are handled in the manner of fmt.Println; a newline is always appended. func Fatalln(args ...interface{}) { - logging.println(severity.FatalLog, globalLogger, logging.filter, args...) -} - -// FatallnDepth acts as Fatalln but uses depth to determine which call frame to log. -// FatallnDepth(0, "msg") is the same as Fatalln("msg"). -func FatallnDepth(depth int, args ...interface{}) { - logging.printlnDepth(severity.FatalLog, globalLogger, logging.filter, depth, args...) + logging.println(fatalLog, logging.logr, logging.filter, args...) } // Fatalf logs to the FATAL, ERROR, WARNING, and INFO logs, -// including a stack trace of all running goroutines, then calls OsExit(255). +// including a stack trace of all running goroutines, then calls os.Exit(255). // Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. func Fatalf(format string, args ...interface{}) { - logging.printf(severity.FatalLog, globalLogger, logging.filter, format, args...) -} - -// FatalfDepth acts as Fatalf but uses depth to determine which call frame to log. -// FatalfDepth(0, "msg", args...) is the same as Fatalf("msg", args...). -func FatalfDepth(depth int, format string, args ...interface{}) { - logging.printfDepth(severity.FatalLog, globalLogger, logging.filter, depth, format, args...) + logging.printf(fatalLog, logging.logr, logging.filter, format, args...) } // fatalNoStacks is non-zero if we are to exit without dumping goroutine stacks. // It allows Exit and relatives to use the Fatal logs. var fatalNoStacks uint32 -// Exit logs to the FATAL, ERROR, WARNING, and INFO logs, then calls OsExit(1). +// Exit logs to the FATAL, ERROR, WARNING, and INFO logs, then calls os.Exit(1). // Arguments are handled in the manner of fmt.Print; a newline is appended if missing. func Exit(args ...interface{}) { atomic.StoreUint32(&fatalNoStacks, 1) - logging.print(severity.FatalLog, globalLogger, logging.filter, args...) + logging.print(fatalLog, logging.logr, logging.filter, args...) } // ExitDepth acts as Exit but uses depth to determine which call frame to log. // ExitDepth(0, "msg") is the same as Exit("msg"). func ExitDepth(depth int, args ...interface{}) { atomic.StoreUint32(&fatalNoStacks, 1) - logging.printDepth(severity.FatalLog, globalLogger, logging.filter, depth, args...) + logging.printDepth(fatalLog, logging.logr, logging.filter, depth, args...) } -// Exitln logs to the FATAL, ERROR, WARNING, and INFO logs, then calls OsExit(1). +// Exitln logs to the FATAL, ERROR, WARNING, and INFO logs, then calls os.Exit(1). func Exitln(args ...interface{}) { atomic.StoreUint32(&fatalNoStacks, 1) - logging.println(severity.FatalLog, globalLogger, logging.filter, args...) + logging.println(fatalLog, logging.logr, logging.filter, args...) } -// ExitlnDepth acts as Exitln but uses depth to determine which call frame to log. -// ExitlnDepth(0, "msg") is the same as Exitln("msg"). -func ExitlnDepth(depth int, args ...interface{}) { - atomic.StoreUint32(&fatalNoStacks, 1) - logging.printlnDepth(severity.FatalLog, globalLogger, logging.filter, depth, args...) -} - -// Exitf logs to the FATAL, ERROR, WARNING, and INFO logs, then calls OsExit(1). +// Exitf logs to the FATAL, ERROR, WARNING, and INFO logs, then calls os.Exit(1). // Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. func Exitf(format string, args ...interface{}) { atomic.StoreUint32(&fatalNoStacks, 1) - logging.printf(severity.FatalLog, globalLogger, logging.filter, format, args...) -} - -// ExitfDepth acts as Exitf but uses depth to determine which call frame to log. -// ExitfDepth(0, "msg", args...) is the same as Exitf("msg", args...). -func ExitfDepth(depth int, format string, args ...interface{}) { - atomic.StoreUint32(&fatalNoStacks, 1) - logging.printfDepth(severity.FatalLog, globalLogger, logging.filter, depth, format, args...) + logging.printf(fatalLog, logging.logr, logging.filter, format, args...) } // LogFilter is a collection of functions that can filter all logging calls, @@ -1575,10 +1571,79 @@ type LogFilter interface { FilterS(msg string, keysAndValues []interface{}) (string, []interface{}) } -// SetLogFilter installs a filter that is used for all log calls. -// -// Modifying the filter is not thread-safe and should be done while no other -// goroutines invoke log calls, usually during program initialization. func SetLogFilter(filter LogFilter) { + logging.mu.Lock() + defer logging.mu.Unlock() + logging.filter = filter } + +// ObjectRef references a kubernetes object +type ObjectRef struct { + Name string `json:"name"` + Namespace string `json:"namespace,omitempty"` +} + +func (ref ObjectRef) String() string { + if ref.Namespace != "" { + return fmt.Sprintf("%s/%s", ref.Namespace, ref.Name) + } + return ref.Name +} + +// MarshalLog ensures that loggers with support for structured output will log +// as a struct by removing the String method via a custom type. +func (ref ObjectRef) MarshalLog() interface{} { + type or ObjectRef + return or(ref) +} + +var _ logr.Marshaler = ObjectRef{} + +// KMetadata is a subset of the kubernetes k8s.io/apimachinery/pkg/apis/meta/v1.Object interface +// this interface may expand in the future, but will always be a subset of the +// kubernetes k8s.io/apimachinery/pkg/apis/meta/v1.Object interface +type KMetadata interface { + GetName() string + GetNamespace() string +} + +// KObj returns ObjectRef from ObjectMeta +func KObj(obj KMetadata) ObjectRef { + if obj == nil { + return ObjectRef{} + } + if val := reflect.ValueOf(obj); val.Kind() == reflect.Ptr && val.IsNil() { + return ObjectRef{} + } + + return ObjectRef{ + Name: obj.GetName(), + Namespace: obj.GetNamespace(), + } +} + +// KRef returns ObjectRef from name and namespace +func KRef(namespace, name string) ObjectRef { + return ObjectRef{ + Name: name, + Namespace: namespace, + } +} + +// KObjs returns slice of ObjectRef from an slice of ObjectMeta +func KObjs(arg interface{}) []ObjectRef { + s := reflect.ValueOf(arg) + if s.Kind() != reflect.Slice { + return nil + } + objectRefs := make([]ObjectRef, 0, s.Len()) + for i := 0; i < s.Len(); i++ { + if v, ok := s.Index(i).Interface().(KMetadata); ok { + objectRefs = append(objectRefs, KObj(v)) + } else { + return nil + } + } + return objectRefs +} diff --git a/cluster-autoscaler/vendor/k8s.io/klog/v2/klog_file.go b/cluster-autoscaler/vendor/k8s.io/klog/v2/klog_file.go index 1025d644f38c..de830d9221c2 100644 --- a/cluster-autoscaler/vendor/k8s.io/klog/v2/klog_file.go +++ b/cluster-autoscaler/vendor/k8s.io/klog/v2/klog_file.go @@ -22,7 +22,9 @@ import ( "errors" "fmt" "os" + "os/user" "path/filepath" + "runtime" "strings" "sync" "time" @@ -55,6 +57,38 @@ func init() { } } +func getUserName() string { + userNameOnce.Do(func() { + // On Windows, the Go 'user' package requires netapi32.dll. + // This affects Windows Nano Server: + // https://github.com/golang/go/issues/21867 + // Fallback to using environment variables. + if runtime.GOOS == "windows" { + u := os.Getenv("USERNAME") + if len(u) == 0 { + return + } + // Sanitize the USERNAME since it may contain filepath separators. + u = strings.Replace(u, `\`, "_", -1) + + // user.Current().Username normally produces something like 'USERDOMAIN\USERNAME' + d := os.Getenv("USERDOMAIN") + if len(d) != 0 { + userName = d + "_" + u + } else { + userName = u + } + } else { + current, err := user.Current() + if err == nil { + userName = current.Username + } + } + }) + + return userName +} + // shortHostname returns its argument, truncating at the first period. // For instance, given "www.google.com" it returns "www". func shortHostname(hostname string) string { diff --git a/cluster-autoscaler/vendor/k8s.io/klog/v2/klog_file_others.go b/cluster-autoscaler/vendor/k8s.io/klog/v2/klog_file_others.go deleted file mode 100644 index aa467268512f..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/klog/v2/klog_file_others.go +++ /dev/null @@ -1,19 +0,0 @@ -//go:build !windows -// +build !windows - -package klog - -import ( - "os/user" -) - -func getUserName() string { - userNameOnce.Do(func() { - current, err := user.Current() - if err == nil { - userName = current.Username - } - }) - - return userName -} diff --git a/cluster-autoscaler/vendor/k8s.io/klog/v2/klog_file_windows.go b/cluster-autoscaler/vendor/k8s.io/klog/v2/klog_file_windows.go deleted file mode 100644 index 2517f9c53841..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/klog/v2/klog_file_windows.go +++ /dev/null @@ -1,34 +0,0 @@ -//go:build windows -// +build windows - -package klog - -import ( - "os" - "strings" -) - -func getUserName() string { - userNameOnce.Do(func() { - // On Windows, the Go 'user' package requires netapi32.dll. - // This affects Windows Nano Server: - // https://github.com/golang/go/issues/21867 - // Fallback to using environment variables. - u := os.Getenv("USERNAME") - if len(u) == 0 { - return - } - // Sanitize the USERNAME since it may contain filepath separators. - u = strings.Replace(u, `\`, "_", -1) - - // user.Current().Username normally produces something like 'USERDOMAIN\USERNAME' - d := os.Getenv("USERDOMAIN") - if len(d) != 0 { - userName = d + "_" + u - } else { - userName = u - } - }) - - return userName -} diff --git a/cluster-autoscaler/vendor/k8s.io/klog/v2/klogr.go b/cluster-autoscaler/vendor/k8s.io/klog/v2/klogr.go deleted file mode 100644 index 351d7a740535..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/klog/v2/klogr.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package klog - -import ( - "github.com/go-logr/logr" - - "k8s.io/klog/v2/internal/serialize" -) - -// NewKlogr returns a logger that is functionally identical to -// klogr.NewWithOptions(klogr.FormatKlog), i.e. it passes through to klog. The -// difference is that it uses a simpler implementation. -func NewKlogr() Logger { - return New(&klogger{}) -} - -// klogger is a subset of klogr/klogr.go. It had to be copied to break an -// import cycle (klogr wants to use klog, and klog wants to use klogr). -type klogger struct { - level int - callDepth int - prefix string - values []interface{} -} - -func (l *klogger) Init(info logr.RuntimeInfo) { - l.callDepth += info.CallDepth -} - -func (l klogger) Info(level int, msg string, kvList ...interface{}) { - trimmed := serialize.TrimDuplicates(l.values, kvList) - if l.prefix != "" { - msg = l.prefix + ": " + msg - } - V(Level(level)).InfoSDepth(l.callDepth+1, msg, append(trimmed[0], trimmed[1]...)...) -} - -func (l klogger) Enabled(level int) bool { - return V(Level(level)).Enabled() -} - -func (l klogger) Error(err error, msg string, kvList ...interface{}) { - trimmed := serialize.TrimDuplicates(l.values, kvList) - if l.prefix != "" { - msg = l.prefix + ": " + msg - } - ErrorSDepth(l.callDepth+1, err, msg, append(trimmed[0], trimmed[1]...)...) -} - -// WithName returns a new logr.Logger with the specified name appended. klogr -// uses '/' characters to separate name elements. Callers should not pass '/' -// in the provided name string, but this library does not actually enforce that. -func (l klogger) WithName(name string) logr.LogSink { - if len(l.prefix) > 0 { - l.prefix = l.prefix + "/" - } - l.prefix += name - return &l -} - -func (l klogger) WithValues(kvList ...interface{}) logr.LogSink { - l.values = serialize.WithValues(l.values, kvList) - return &l -} - -func (l klogger) WithCallDepth(depth int) logr.LogSink { - l.callDepth += depth - return &l -} - -var _ logr.LogSink = &klogger{} -var _ logr.CallDepthLogSink = &klogger{} diff --git a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/builder/openapi.go b/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/builder/openapi.go index 2b5a3d8b17e4..3e9e675a0fbd 100644 --- a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/builder/openapi.go +++ b/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/builder/openapi.go @@ -25,7 +25,6 @@ import ( restful "github.com/emicklei/go-restful" "k8s.io/kube-openapi/pkg/common" - "k8s.io/kube-openapi/pkg/common/restfuladapter" "k8s.io/kube-openapi/pkg/util" "k8s.io/kube-openapi/pkg/validation/spec" ) @@ -41,17 +40,10 @@ type openAPI struct { definitions map[string]common.OpenAPIDefinition } -// BuildOpenAPISpec builds OpenAPI spec given a list of route containers and common.Config to customize it. -// -// Deprecated: BuildOpenAPISpecFromRoutes should be used instead. -func BuildOpenAPISpec(routeContainers []*restful.WebService, config *common.Config) (*spec.Swagger, error) { - return BuildOpenAPISpecFromRoutes(restfuladapter.AdaptWebServices(routeContainers), config) -} - -// BuildOpenAPISpecFromRoutes builds OpenAPI spec given a list of route containers and common.Config to customize it. -func BuildOpenAPISpecFromRoutes(routeContainers []common.RouteContainer, config *common.Config) (*spec.Swagger, error) { +// BuildOpenAPISpec builds OpenAPI spec given a list of webservices (containing routes) and common.Config to customize it. +func BuildOpenAPISpec(webServices []*restful.WebService, config *common.Config) (*spec.Swagger, error) { o := newOpenAPI(config) - err := o.buildPaths(routeContainers) + err := o.buildPaths(webServices) if err != nil { return nil, err } @@ -103,25 +95,11 @@ func newOpenAPI(config *common.Config) openAPI { }, }, } - - if o.config.GetOperationIDAndTagsFromRoute == nil { - // Map the deprecated handler to the common interface, if provided. - if o.config.GetOperationIDAndTags != nil { - o.config.GetOperationIDAndTagsFromRoute = func(r common.Route) (string, []string, error) { - restfulRouteAdapter, ok := r.(*restfuladapter.RouteAdapter) - if !ok { - return "", nil, fmt.Errorf("config.GetOperationIDAndTags specified but route is not a restful v1 Route") - } - - return o.config.GetOperationIDAndTags(restfulRouteAdapter.Route) - } - } else { - o.config.GetOperationIDAndTagsFromRoute = func(r common.Route) (string, []string, error) { - return r.OperationName(), nil, nil - } + if o.config.GetOperationIDAndTags == nil { + o.config.GetOperationIDAndTags = func(r *restful.Route) (string, []string, error) { + return r.Operation, nil, nil } } - if o.config.GetDefinitionName == nil { o.config.GetDefinitionName = func(name string) (string, spec.Extensions) { return name[strings.LastIndex(name, "/")+1:], nil @@ -203,10 +181,10 @@ func (o *openAPI) buildDefinitionForType(name string) (string, error) { } // buildPaths builds OpenAPI paths using go-restful's web services. -func (o *openAPI) buildPaths(routeContainers []common.RouteContainer) error { +func (o *openAPI) buildPaths(webServices []*restful.WebService) error { pathsToIgnore := util.NewTrie(o.config.IgnorePrefixes) duplicateOpId := make(map[string]string) - for _, w := range routeContainers { + for _, w := range webServices { rootPath := w.RootPath() if pathsToIgnore.HasPrefix(rootPath) { continue @@ -256,7 +234,7 @@ func (o *openAPI) buildPaths(routeContainers []common.RouteContainer) error { } else { duplicateOpId[op.ID] = path } - switch strings.ToUpper(route.Method()) { + switch strings.ToUpper(route.Method) { case "GET": pathItem.Get = op case "POST": @@ -280,12 +258,12 @@ func (o *openAPI) buildPaths(routeContainers []common.RouteContainer) error { } // buildOperations builds operations for each webservice path -func (o *openAPI) buildOperations(route common.Route, inPathCommonParamsMap map[interface{}]spec.Parameter) (ret *spec.Operation, err error) { +func (o *openAPI) buildOperations(route restful.Route, inPathCommonParamsMap map[interface{}]spec.Parameter) (ret *spec.Operation, err error) { ret = &spec.Operation{ OperationProps: spec.OperationProps{ - Description: route.Description(), - Consumes: route.Consumes(), - Produces: route.Produces(), + Description: route.Doc, + Consumes: route.Consumes, + Produces: route.Produces, Schemes: o.config.ProtocolList, Responses: &spec.Responses{ ResponsesProps: spec.ResponsesProps{ @@ -294,7 +272,7 @@ func (o *openAPI) buildOperations(route common.Route, inPathCommonParamsMap map[ }, }, } - for k, v := range route.Metadata() { + for k, v := range route.Metadata { if strings.HasPrefix(k, common.ExtensionPrefix) { if ret.Extensions == nil { ret.Extensions = spec.Extensions{} @@ -302,20 +280,20 @@ func (o *openAPI) buildOperations(route common.Route, inPathCommonParamsMap map[ ret.Extensions.Add(k, v) } } - if ret.ID, ret.Tags, err = o.config.GetOperationIDAndTagsFromRoute(route); err != nil { + if ret.ID, ret.Tags, err = o.config.GetOperationIDAndTags(&route); err != nil { return ret, err } // Build responses - for _, resp := range route.StatusCodeResponses() { - ret.Responses.StatusCodeResponses[resp.Code()], err = o.buildResponse(resp.Model(), resp.Message()) + for _, resp := range route.ResponseErrors { + ret.Responses.StatusCodeResponses[resp.Code], err = o.buildResponse(resp.Model, resp.Message) if err != nil { return ret, err } } // If there is no response but a write sample, assume that write sample is an http.StatusOK response. - if len(ret.Responses.StatusCodeResponses) == 0 && route.ResponsePayloadSample() != nil { - ret.Responses.StatusCodeResponses[http.StatusOK], err = o.buildResponse(route.ResponsePayloadSample(), "OK") + if len(ret.Responses.StatusCodeResponses) == 0 && route.WriteSample != nil { + ret.Responses.StatusCodeResponses[http.StatusOK], err = o.buildResponse(route.WriteSample, "OK") if err != nil { return ret, err } @@ -332,9 +310,9 @@ func (o *openAPI) buildOperations(route common.Route, inPathCommonParamsMap map[ // Build non-common Parameters ret.Parameters = make([]spec.Parameter, 0) - for _, param := range route.Parameters() { + for _, param := range route.ParameterDocs { if _, isCommon := inPathCommonParamsMap[mapKeyFromParam(param)]; !isCommon { - openAPIParam, err := o.buildParameter(param, route.RequestPayloadSample()) + openAPIParam, err := o.buildParameter(param.Data(), route.ReadSample) if err != nil { return ret, err } @@ -357,30 +335,29 @@ func (o *openAPI) buildResponse(model interface{}, description string) (spec.Res }, nil } -func (o *openAPI) findCommonParameters(routes []common.Route) (map[interface{}]spec.Parameter, error) { +func (o *openAPI) findCommonParameters(routes []restful.Route) (map[interface{}]spec.Parameter, error) { commonParamsMap := make(map[interface{}]spec.Parameter, 0) paramOpsCountByName := make(map[interface{}]int, 0) - paramNameKindToDataMap := make(map[interface{}]common.Parameter, 0) + paramNameKindToDataMap := make(map[interface{}]restful.ParameterData, 0) for _, route := range routes { routeParamDuplicateMap := make(map[interface{}]bool) s := "" - params := route.Parameters() - for _, param := range params { - m, _ := json.Marshal(param) + for _, param := range route.ParameterDocs { + m, _ := json.Marshal(param.Data()) s += string(m) + "\n" key := mapKeyFromParam(param) if routeParamDuplicateMap[key] { - msg, _ := json.Marshal(params) - return commonParamsMap, fmt.Errorf("duplicate parameter %v for route %v, %v", param.Name(), string(msg), s) + msg, _ := json.Marshal(route.ParameterDocs) + return commonParamsMap, fmt.Errorf("duplicate parameter %v for route %v, %v", param.Data().Name, string(msg), s) } routeParamDuplicateMap[key] = true paramOpsCountByName[key]++ - paramNameKindToDataMap[key] = param + paramNameKindToDataMap[key] = param.Data() } } for key, count := range paramOpsCountByName { paramData := paramNameKindToDataMap[key] - if count == len(routes) && paramData.Kind() != common.BodyParameterKind { + if count == len(routes) && paramData.Kind != restful.BodyParameterKind { openAPIParam, err := o.buildParameter(paramData, nil) if err != nil { return commonParamsMap, err @@ -412,16 +389,16 @@ func (o *openAPI) toSchema(name string) (_ *spec.Schema, err error) { } } -func (o *openAPI) buildParameter(restParam common.Parameter, bodySample interface{}) (ret spec.Parameter, err error) { +func (o *openAPI) buildParameter(restParam restful.ParameterData, bodySample interface{}) (ret spec.Parameter, err error) { ret = spec.Parameter{ ParamProps: spec.ParamProps{ - Name: restParam.Name(), - Description: restParam.Description(), - Required: restParam.Required(), + Name: restParam.Name, + Description: restParam.Description, + Required: restParam.Required, }, } - switch restParam.Kind() { - case common.BodyParameterKind: + switch restParam.Kind { + case restful.BodyParameterKind: if bodySample != nil { ret.In = "body" ret.Schema, err = o.toSchema(util.GetCanonicalTypeName(bodySample)) @@ -430,36 +407,36 @@ func (o *openAPI) buildParameter(restParam common.Parameter, bodySample interfac // There is not enough information in the body parameter to build the definition. // Body parameter has a data type that is a short name but we need full package name // of the type to create a definition. - return ret, fmt.Errorf("restful body parameters are not supported: %v", restParam.DataType()) + return ret, fmt.Errorf("restful body parameters are not supported: %v", restParam.DataType) } - case common.PathParameterKind: + case restful.PathParameterKind: ret.In = "path" - if !restParam.Required() { + if !restParam.Required { return ret, fmt.Errorf("path parameters should be marked at required for parameter %v", restParam) } - case common.QueryParameterKind: + case restful.QueryParameterKind: ret.In = "query" - case common.HeaderParameterKind: + case restful.HeaderParameterKind: ret.In = "header" - case common.FormParameterKind: + case restful.FormParameterKind: ret.In = "formData" default: - return ret, fmt.Errorf("unknown restful operation kind : %v", restParam.Kind()) + return ret, fmt.Errorf("unknown restful operation kind : %v", restParam.Kind) } - openAPIType, openAPIFormat := common.OpenAPITypeFormat(restParam.DataType()) + openAPIType, openAPIFormat := common.OpenAPITypeFormat(restParam.DataType) if openAPIType == "" { - return ret, fmt.Errorf("non-body Restful parameter type should be a simple type, but got : %v", restParam.DataType()) + return ret, fmt.Errorf("non-body Restful parameter type should be a simple type, but got : %v", restParam.DataType) } ret.Type = openAPIType ret.Format = openAPIFormat - ret.UniqueItems = !restParam.AllowMultiple() + ret.UniqueItems = !restParam.AllowMultiple return ret, nil } -func (o *openAPI) buildParameters(restParam []common.Parameter) (ret []spec.Parameter, err error) { +func (o *openAPI) buildParameters(restParam []*restful.Parameter) (ret []spec.Parameter, err error) { ret = make([]spec.Parameter, len(restParam)) for i, v := range restParam { - ret[i], err = o.buildParameter(v, nil) + ret[i], err = o.buildParameter(v.Data(), nil) if err != nil { return ret, err } diff --git a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/builder/util.go b/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/builder/util.go index 3621a4de17df..c7ea40d91003 100644 --- a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/builder/util.go +++ b/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/builder/util.go @@ -19,7 +19,7 @@ package builder import ( "sort" - "k8s.io/kube-openapi/pkg/common" + "github.com/emicklei/go-restful" "k8s.io/kube-openapi/pkg/validation/spec" ) @@ -42,20 +42,20 @@ func sortParameters(p []spec.Parameter) { sort.Sort(byNameIn{p}) } -func groupRoutesByPath(routes []common.Route) map[string][]common.Route { - pathToRoutes := make(map[string][]common.Route) +func groupRoutesByPath(routes []restful.Route) map[string][]restful.Route { + pathToRoutes := make(map[string][]restful.Route) for _, r := range routes { - pathToRoutes[r.Path()] = append(pathToRoutes[r.Path()], r) + pathToRoutes[r.Path] = append(pathToRoutes[r.Path], r) } return pathToRoutes } -func mapKeyFromParam(param common.Parameter) interface{} { +func mapKeyFromParam(param *restful.Parameter) interface{} { return struct { Name string - Kind common.ParameterKind + Kind int }{ - Name: param.Name(), - Kind: param.Kind(), + Name: param.Data().Name, + Kind: param.Data().Kind, } } diff --git a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/builder3/openapi.go b/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/builder3/openapi.go index abe5a331e4f7..6d716ed5837d 100644 --- a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/builder3/openapi.go +++ b/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/builder3/openapi.go @@ -19,17 +19,13 @@ package builder3 import ( "encoding/json" "fmt" - "net/http" - "strings" - restful "github.com/emicklei/go-restful" - - builderutil "k8s.io/kube-openapi/pkg/builder3/util" "k8s.io/kube-openapi/pkg/common" - "k8s.io/kube-openapi/pkg/common/restfuladapter" "k8s.io/kube-openapi/pkg/spec3" "k8s.io/kube-openapi/pkg/util" "k8s.io/kube-openapi/pkg/validation/spec" + "net/http" + "strings" ) const ( @@ -37,15 +33,15 @@ const ( ) type openAPI struct { - config *common.OpenAPIV3Config + config *common.Config spec *spec3.OpenAPI definitions map[string]common.OpenAPIDefinition } -func groupRoutesByPath(routes []common.Route) map[string][]common.Route { - pathToRoutes := make(map[string][]common.Route) +func groupRoutesByPath(routes []restful.Route) map[string][]restful.Route { + pathToRoutes := make(map[string][]restful.Route) for _, r := range routes { - pathToRoutes[r.Path()] = append(pathToRoutes[r.Path()], r) + pathToRoutes[r.Path] = append(pathToRoutes[r.Path], r) } return pathToRoutes } @@ -73,10 +69,10 @@ func (o *openAPI) buildResponse(model interface{}, description string, content [ return response, nil } -func (o *openAPI) buildOperations(route common.Route, inPathCommonParamsMap map[interface{}]*spec3.Parameter) (*spec3.Operation, error) { +func (o *openAPI) buildOperations(route restful.Route, inPathCommonParamsMap map[interface{}]*spec3.Parameter) (*spec3.Operation, error) { ret := &spec3.Operation{ OperationProps: spec3.OperationProps{ - Description: route.Description(), + Description: route.Doc, Responses: &spec3.Responses{ ResponsesProps: spec3.ResponsesProps{ StatusCodeResponses: make(map[int]*spec3.Response), @@ -84,51 +80,34 @@ func (o *openAPI) buildOperations(route common.Route, inPathCommonParamsMap map[ }, }, } - for k, v := range route.Metadata() { - if strings.HasPrefix(k, common.ExtensionPrefix) { - if ret.Extensions == nil { - ret.Extensions = spec.Extensions{} - } - ret.Extensions.Add(k, v) - } - } - var err error - if ret.OperationId, ret.Tags, err = o.config.GetOperationIDAndTagsFromRoute(route); err != nil { + if ret.OperationId, ret.Tags, err = o.config.GetOperationIDAndTags(&route); err != nil { return ret, err } // Build responses - for _, resp := range route.StatusCodeResponses() { - ret.Responses.StatusCodeResponses[resp.Code()], err = o.buildResponse(resp.Model(), resp.Message(), route.Produces()) + for _, resp := range route.ResponseErrors { + ret.Responses.StatusCodeResponses[resp.Code], err = o.buildResponse(resp.Model, resp.Message, route.Produces) if err != nil { return ret, err } } // If there is no response but a write sample, assume that write sample is an http.StatusOK response. - if len(ret.Responses.StatusCodeResponses) == 0 && route.ResponsePayloadSample() != nil { - ret.Responses.StatusCodeResponses[http.StatusOK], err = o.buildResponse(route.ResponsePayloadSample(), "OK", route.Produces()) + if len(ret.Responses.StatusCodeResponses) == 0 && route.WriteSample != nil { + ret.Responses.StatusCodeResponses[http.StatusOK], err = o.buildResponse(route.WriteSample, "OK", route.Produces) if err != nil { return ret, err } } - for code, resp := range o.config.CommonResponses { - if _, exists := ret.Responses.StatusCodeResponses[code]; !exists { - ret.Responses.StatusCodeResponses[code] = resp - } - } - - if len(ret.Responses.StatusCodeResponses) == 0 { - ret.Responses.Default = o.config.DefaultResponse - } + // TODO: Default response if needed. Common Response config - params := route.Parameters() - for _, param := range params { + ret.Parameters = make([]*spec3.Parameter, 0) + for _, param := range route.ParameterDocs { _, isCommon := inPathCommonParamsMap[mapKeyFromParam(param)] - if !isCommon && param.Kind() != common.BodyParameterKind { - openAPIParam, err := o.buildParameter(param) + if !isCommon && param.Data().Kind != restful.BodyParameterKind { + openAPIParam, err := o.buildParameter(param.Data()) if err != nil { return ret, err } @@ -136,9 +115,9 @@ func (o *openAPI) buildOperations(route common.Route, inPathCommonParamsMap map[ } } - body, err := o.buildRequestBody(params, route.Consumes(), route.RequestPayloadSample()) + body, err := o.buildRequestBody(route.ParameterDocs, route.ReadSample) if err != nil { - return nil, err + return nil ,err } if body != nil { @@ -147,24 +126,23 @@ func (o *openAPI) buildOperations(route common.Route, inPathCommonParamsMap map[ return ret, nil } -func (o *openAPI) buildRequestBody(parameters []common.Parameter, consumes []string, bodySample interface{}) (*spec3.RequestBody, error) { +func (o *openAPI) buildRequestBody(parameters []*restful.Parameter, bodySample interface{}) (*spec3.RequestBody, error) { for _, param := range parameters { - if param.Kind() == common.BodyParameterKind && bodySample != nil { + if param.Data().Kind == restful.BodyParameterKind && bodySample != nil { schema, err := o.toSchema(util.GetCanonicalTypeName(bodySample)) if err != nil { return nil, err } r := &spec3.RequestBody{ RequestBodyProps: spec3.RequestBodyProps{ - Content: map[string]*spec3.MediaType{}, - }, - } - for _, consume := range consumes { - r.Content[consume] = &spec3.MediaType{ - MediaTypeProps: spec3.MediaTypeProps{ - Schema: schema, + Content: map[string]*spec3.MediaType{ + "application/json": &spec3.MediaType{ + MediaTypeProps: spec3.MediaTypeProps{ + Schema: schema, + }, + }, }, - } + }, } return r, nil } @@ -174,7 +152,7 @@ func (o *openAPI) buildRequestBody(parameters []common.Parameter, consumes []str func newOpenAPI(config *common.Config) openAPI { o := openAPI{ - config: common.ConvertConfigToV3(config), + config: config, spec: &spec3.OpenAPI{ Version: "3.0.0", Info: config.Info, @@ -186,37 +164,9 @@ func newOpenAPI(config *common.Config) openAPI { }, }, } - if len(o.config.ResponseDefinitions) > 0 { - o.spec.Components.Responses = make(map[string]*spec3.Response) - - } - for k, response := range o.config.ResponseDefinitions { - o.spec.Components.Responses[k] = response - } - - if len(o.config.SecuritySchemes) > 0 { - o.spec.Components.SecuritySchemes = make(spec3.SecuritySchemes) - - } - for k, securityScheme := range o.config.SecuritySchemes { - o.spec.Components.SecuritySchemes[k] = securityScheme - } - - if o.config.GetOperationIDAndTagsFromRoute == nil { - // Map the deprecated handler to the common interface, if provided. - if o.config.GetOperationIDAndTags != nil { - o.config.GetOperationIDAndTagsFromRoute = func(r common.Route) (string, []string, error) { - restfulRouteAdapter, ok := r.(*restfuladapter.RouteAdapter) - if !ok { - return "", nil, fmt.Errorf("config.GetOperationIDAndTags specified but route is not a restful v1 Route") - } - - return o.config.GetOperationIDAndTags(restfulRouteAdapter.Route) - } - } else { - o.config.GetOperationIDAndTagsFromRoute = func(r common.Route) (string, []string, error) { - return r.OperationName(), nil, nil - } + if o.config.GetOperationIDAndTags == nil { + o.config.GetOperationIDAndTags = func(r *restful.Route) (string, []string, error) { + return r.Operation, nil, nil } } @@ -226,19 +176,15 @@ func newOpenAPI(config *common.Config) openAPI { } } - if o.config.Definitions != nil { - o.definitions = o.config.Definitions - } else { - o.definitions = o.config.GetDefinitions(func(name string) spec.Ref { - defName, _ := o.config.GetDefinitionName(name) - return spec.MustCreateRef("#/components/schemas/" + common.EscapeJsonPointer(defName)) - }) - } + o.definitions = o.config.GetDefinitions(func(name string) spec.Ref { + defName, _ := o.config.GetDefinitionName(name) + return spec.MustCreateRef("#/components/schemas/" + common.EscapeJsonPointer(defName)) + }) return o } -func (o *openAPI) buildOpenAPISpec(webServices []common.RouteContainer) error { +func (o *openAPI) buildOpenAPISpec(webServices []*restful.WebService) error { pathsToIgnore := util.NewTrie(o.config.IgnorePrefixes) for _, w := range webServices { rootPath := w.RootPath() @@ -272,7 +218,9 @@ func (o *openAPI) buildOpenAPISpec(webServices []common.RouteContainer) error { } pathItem = &spec3.Path{ - PathProps: spec3.PathProps{}, + PathProps: spec3.PathProps{ + Parameters: make([]*spec3.Parameter, 0), + }, } // add web services's parameters as well as any parameters appears in all ops, as common parameters @@ -284,9 +232,8 @@ func (o *openAPI) buildOpenAPISpec(webServices []common.RouteContainer) error { for _, route := range routes { op, _ := o.buildOperations(route, inPathCommonParamsMap) - sortParameters(op.Parameters) - switch strings.ToUpper(route.Method()) { + switch strings.ToUpper(route.Method) { case "GET": pathItem.Get = op case "POST": @@ -310,15 +257,7 @@ func (o *openAPI) buildOpenAPISpec(webServices []common.RouteContainer) error { return nil } -// BuildOpenAPISpec builds OpenAPI v3 spec given a list of route containers and common.Config to customize it. -// -// Deprecated: BuildOpenAPISpecFromRoutes should be used instead. func BuildOpenAPISpec(webServices []*restful.WebService, config *common.Config) (*spec3.OpenAPI, error) { - return BuildOpenAPISpecFromRoutes(restfuladapter.AdaptWebServices(webServices), config) -} - -// BuildOpenAPISpecFromRoutes builds OpenAPI v3 spec given a list of route containers and common.Config to customize it. -func BuildOpenAPISpecFromRoutes(webServices []common.RouteContainer, config *common.Config) (*spec3.OpenAPI, error) { a := newOpenAPI(config) err := a.buildOpenAPISpec(webServices) if err != nil { @@ -327,30 +266,29 @@ func BuildOpenAPISpecFromRoutes(webServices []common.RouteContainer, config *com return a.spec, nil } -func (o *openAPI) findCommonParameters(routes []common.Route) (map[interface{}]*spec3.Parameter, error) { +func (o *openAPI) findCommonParameters(routes []restful.Route) (map[interface{}]*spec3.Parameter, error) { commonParamsMap := make(map[interface{}]*spec3.Parameter, 0) paramOpsCountByName := make(map[interface{}]int, 0) - paramNameKindToDataMap := make(map[interface{}]common.Parameter, 0) + paramNameKindToDataMap := make(map[interface{}]restful.ParameterData, 0) for _, route := range routes { routeParamDuplicateMap := make(map[interface{}]bool) s := "" - params := route.Parameters() - for _, param := range params { - m, _ := json.Marshal(param) + for _, param := range route.ParameterDocs { + m, _ := json.Marshal(param.Data()) s += string(m) + "\n" key := mapKeyFromParam(param) if routeParamDuplicateMap[key] { - msg, _ := json.Marshal(params) - return commonParamsMap, fmt.Errorf("duplicate parameter %v for route %v, %v", param.Name(), string(msg), s) + msg, _ := json.Marshal(route.ParameterDocs) + return commonParamsMap, fmt.Errorf("duplicate parameter %v for route %v, %v", param.Data().Name, string(msg), s) } routeParamDuplicateMap[key] = true paramOpsCountByName[key]++ - paramNameKindToDataMap[key] = param + paramNameKindToDataMap[key] = param.Data() } } for key, count := range paramOpsCountByName { paramData := paramNameKindToDataMap[key] - if count == len(routes) && paramData.Kind() != common.BodyParameterKind { + if count == len(routes) && paramData.Kind != restful.BodyParameterKind { openAPIParam, err := o.buildParameter(paramData) if err != nil { return commonParamsMap, err @@ -361,10 +299,10 @@ func (o *openAPI) findCommonParameters(routes []common.Route) (map[interface{}]* return commonParamsMap, nil } -func (o *openAPI) buildParameters(restParam []common.Parameter) (ret []*spec3.Parameter, err error) { +func (o *openAPI) buildParameters(restParam []*restful.Parameter) (ret []*spec3.Parameter, err error) { ret = make([]*spec3.Parameter, len(restParam)) for i, v := range restParam { - ret[i], err = o.buildParameter(v) + ret[i], err = o.buildParameter(v.Data()) if err != nil { return ret, err } @@ -372,40 +310,40 @@ func (o *openAPI) buildParameters(restParam []common.Parameter) (ret []*spec3.Pa return ret, nil } -func (o *openAPI) buildParameter(restParam common.Parameter) (ret *spec3.Parameter, err error) { +func (o *openAPI) buildParameter(restParam restful.ParameterData) (ret *spec3.Parameter, err error) { ret = &spec3.Parameter{ ParameterProps: spec3.ParameterProps{ - Name: restParam.Name(), - Description: restParam.Description(), - Required: restParam.Required(), + Name: restParam.Name, + Description: restParam.Description, + Required: restParam.Required, }, } - switch restParam.Kind() { - case common.BodyParameterKind: + switch restParam.Kind { + case restful.BodyParameterKind: return nil, nil - case common.PathParameterKind: + case restful.PathParameterKind: ret.In = "path" - if !restParam.Required() { - return ret, fmt.Errorf("path parameters should be marked as required for parameter %v", restParam) + if !restParam.Required { + return ret, fmt.Errorf("path parameters should be marked at required for parameter %v", restParam) } - case common.QueryParameterKind: + case restful.QueryParameterKind: ret.In = "query" - case common.HeaderParameterKind: + case restful.HeaderParameterKind: ret.In = "header" /* TODO: add support for the cookie param */ default: - return ret, fmt.Errorf("unsupported restful parameter kind : %v", restParam.Kind()) + return ret, fmt.Errorf("unsupported restful parameter kind : %v", restParam.Kind) } - openAPIType, openAPIFormat := common.OpenAPITypeFormat(restParam.DataType()) + openAPIType, openAPIFormat := common.OpenAPITypeFormat(restParam.DataType) if openAPIType == "" { - return ret, fmt.Errorf("non-body Restful parameter type should be a simple type, but got : %v", restParam.DataType()) + return ret, fmt.Errorf("non-body Restful parameter type should be a simple type, but got : %v", restParam.DataType) } ret.Schema = &spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{openAPIType}, Format: openAPIFormat, - UniqueItems: !restParam.AllowMultiple(), + UniqueItems: !restParam.AllowMultiple, }, } return ret, nil @@ -430,9 +368,6 @@ func (o *openAPI) buildDefinitionRecursively(name string) error { schema.Extensions[k] = v } } - // delete the embedded v2 schema if exists, otherwise no-op - delete(schema.VendorExtensible.Extensions, common.ExtensionV2Schema) - schema = builderutil.WrapRefs(schema) o.spec.Components.Schemas[uniqueName] = schema for _, v := range item.Dependencies { if err := o.buildDefinitionRecursively(v); err != nil { diff --git a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/builder3/util.go b/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/builder3/util.go index a8a90fa15d51..d977bdf90f7b 100644 --- a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/builder3/util.go +++ b/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/builder3/util.go @@ -19,17 +19,17 @@ package builder3 import ( "sort" - "k8s.io/kube-openapi/pkg/common" + "github.com/emicklei/go-restful" "k8s.io/kube-openapi/pkg/spec3" ) -func mapKeyFromParam(param common.Parameter) interface{} { +func mapKeyFromParam(param *restful.Parameter) interface{} { return struct { Name string - Kind common.ParameterKind + Kind int }{ - Name: param.Name(), - Kind: param.Kind(), + Name: param.Data().Name, + Kind: param.Data().Kind, } } diff --git a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/builder3/util/util.go b/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/builder3/util/util.go deleted file mode 100644 index e01566925630..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/builder3/util/util.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package util - -import ( - "reflect" - - "k8s.io/kube-openapi/pkg/schemamutation" - "k8s.io/kube-openapi/pkg/validation/spec" -) - -// wrapRefs wraps OpenAPI V3 Schema refs that contain sibling elements. -// AllOf is used to wrap the Ref to prevent references from having sibling elements -// Please see https://github.com/kubernetes/kubernetes/issues/106387#issuecomment-967640388 -func WrapRefs(schema *spec.Schema) *spec.Schema { - walker := schemamutation.Walker{ - SchemaCallback: func(schema *spec.Schema) *spec.Schema { - orig := schema - clone := func() { - if orig == schema { - schema = new(spec.Schema) - *schema = *orig - } - } - if schema.Ref.String() != "" && !reflect.DeepEqual(*schema, spec.Schema{SchemaProps: spec.SchemaProps{Ref: schema.Ref}}) { - clone() - refSchema := new(spec.Schema) - refSchema.Ref = schema.Ref - schema.Ref = spec.Ref{} - schema.AllOf = []spec.Schema{*refSchema} - } - return schema - }, - RefCallback: schemamutation.RefCallbackNoop, - } - return walker.WalkSchema(schema) -} diff --git a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/common/common.go b/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/common/common.go index c84ca7031602..cf1d01f903db 100644 --- a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/common/common.go +++ b/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/common/common.go @@ -21,9 +21,6 @@ import ( "strings" "github.com/emicklei/go-restful" - - "k8s.io/kube-openapi/pkg/openapiconv" - "k8s.io/kube-openapi/pkg/spec3" "k8s.io/kube-openapi/pkg/validation/spec" ) @@ -94,19 +91,9 @@ type Config struct { // or any of the models will result in spec generation failure. GetDefinitions GetOpenAPIDefinitions - // Provides the definition for all models used by routes. One of GetDefinitions or Definitions must be defined to generate a spec. - // This takes precedent over the GetDefinitions function - Definitions map[string]OpenAPIDefinition - // GetOperationIDAndTags returns operation id and tags for a restful route. It is an optional function to customize operation IDs. - // - // Deprecated: GetOperationIDAndTagsFromRoute should be used instead. This cannot be specified if using the new Route - // interface set of funcs. GetOperationIDAndTags func(r *restful.Route) (string, []string, error) - // GetOperationIDAndTagsFromRoute returns operation id and tags for a Route. It is an optional function to customize operation IDs. - GetOperationIDAndTagsFromRoute func(r Route) (string, []string, error) - // GetDefinitionName returns a friendly name for a definition base on the serving path. parameter `name` is the full name of the definition. // It is an optional function to customize model names. GetDefinitionName func(name string) (string, spec.Extensions) @@ -123,92 +110,6 @@ type Config struct { DefaultSecurity []map[string][]string } -// OpenAPIV3Config is set of configuration for OpenAPI V3 spec generation. -type OpenAPIV3Config struct { - // Info is general information about the API. - Info *spec.Info - - // DefaultResponse will be used if an operation does not have any responses listed. It - // will show up as ... "responses" : {"default" : $DefaultResponse} in the spec. - DefaultResponse *spec3.Response - - // ResponseDefinitions will be added to responses component. This is an object - // that holds responses that can be used across operations. - ResponseDefinitions map[string]*spec3.Response - - // CommonResponses will be added as a response to all operation specs. This is a good place to add common - // responses such as authorization failed. - CommonResponses map[int]*spec3.Response - - // List of webservice's path prefixes to ignore - IgnorePrefixes []string - - // OpenAPIDefinitions should provide definition for all models used by routes. Failure to provide this map - // or any of the models will result in spec generation failure. - // One of GetDefinitions or Definitions must be defined to generate a spec. - GetDefinitions GetOpenAPIDefinitions - - // Provides the definition for all models used by routes. One of GetDefinitions or Definitions must be defined to generate a spec. - // This takes precedent over the GetDefinitions function - Definitions map[string]OpenAPIDefinition - - // GetOperationIDAndTags returns operation id and tags for a restful route. It is an optional function to customize operation IDs. - // - // Deprecated: GetOperationIDAndTagsFromRoute should be used instead. This cannot be specified if using the new Route - // interface set of funcs. - GetOperationIDAndTags func(r *restful.Route) (string, []string, error) - - // GetOperationIDAndTagsFromRoute returns operation id and tags for a Route. It is an optional function to customize operation IDs. - GetOperationIDAndTagsFromRoute func(r Route) (string, []string, error) - - // GetDefinitionName returns a friendly name for a definition base on the serving path. parameter `name` is the full name of the definition. - // It is an optional function to customize model names. - GetDefinitionName func(name string) (string, spec.Extensions) - - // SecuritySchemes is list of all security schemes for OpenAPI service. - SecuritySchemes spec3.SecuritySchemes - - // DefaultSecurity for all operations. - DefaultSecurity []map[string][]string -} - -// ConvertConfigToV3 converts a Config object to an OpenAPIV3Config object -func ConvertConfigToV3(config *Config) *OpenAPIV3Config { - if config == nil { - return nil - } - - v3Config := &OpenAPIV3Config{ - Info: config.Info, - IgnorePrefixes: config.IgnorePrefixes, - GetDefinitions: config.GetDefinitions, - GetOperationIDAndTags: config.GetOperationIDAndTags, - GetOperationIDAndTagsFromRoute: config.GetOperationIDAndTagsFromRoute, - GetDefinitionName: config.GetDefinitionName, - Definitions: config.Definitions, - SecuritySchemes: make(spec3.SecuritySchemes), - DefaultSecurity: config.DefaultSecurity, - DefaultResponse: openapiconv.ConvertResponse(config.DefaultResponse, []string{"application/json"}), - - CommonResponses: make(map[int]*spec3.Response), - ResponseDefinitions: make(map[string]*spec3.Response), - } - - if config.SecurityDefinitions != nil { - for s, securityScheme := range *config.SecurityDefinitions { - v3Config.SecuritySchemes[s] = openapiconv.ConvertSecurityScheme(securityScheme) - } - } - for k, commonResponse := range config.CommonResponses { - v3Config.CommonResponses[k] = openapiconv.ConvertResponse(&commonResponse, []string{"application/json"}) - } - - for k, responseDefinition := range config.ResponseDefinitions { - v3Config.ResponseDefinitions[k] = openapiconv.ConvertResponse(&responseDefinition, []string{"application/json"}) - } - return v3Config -} - type typeInfo struct { name string format string @@ -310,11 +211,3 @@ func EmbedOpenAPIDefinitionIntoV2Extension(main OpenAPIDefinition, embedded Open main.Schema.Extensions[ExtensionV2Schema] = embedded.Schema return main } - -// GenerateOpenAPIV3OneOfSchema generate the set of schemas that MUST be assigned to SchemaProps.OneOf -func GenerateOpenAPIV3OneOfSchema(types []string) (oneOf []spec.Schema) { - for _, t := range types { - oneOf = append(oneOf, spec.Schema{SchemaProps: spec.SchemaProps{Type: []string{t}}}) - } - return -} diff --git a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/common/interfaces.go b/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/common/interfaces.go deleted file mode 100644 index 059fc551b25e..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/common/interfaces.go +++ /dev/null @@ -1,88 +0,0 @@ -package common - -// RouteContainer is the entrypoint for a service, which may contain multiple -// routes under a common path with a common set of path parameters. -type RouteContainer interface { - // RootPath is the path that all contained routes are nested under. - RootPath() string - // PathParameters are common parameters defined in the root path. - PathParameters() []Parameter - // Routes are all routes exposed under the root path. - Routes() []Route -} - -// Route is a logical endpoint of a service. -type Route interface { - // Method defines the HTTP Method. - Method() string - // Path defines the route's endpoint. - Path() string - // OperationName defines a machine-readable ID for the route. - OperationName() string - // Parameters defines the list of accepted parameters. - Parameters() []Parameter - // Description is a human-readable route description. - Description() string - // Consumes defines the consumed content-types. - Consumes() []string - // Produces defines the produced content-types. - Produces() []string - // Metadata allows adding extensions to the generated spec. - Metadata() map[string]interface{} - // RequestPayloadSample defines an example request payload. Can return nil. - RequestPayloadSample() interface{} - // ResponsePayloadSample defines an example response payload. Can return nil. - ResponsePayloadSample() interface{} - // StatusCodeResponses defines a mapping of HTTP Status Codes to the specific response(s). - // Multiple responses with the same HTTP Status Code are acceptable. - StatusCodeResponses() []StatusCodeResponse -} - -// StatusCodeResponse is an explicit response type with an HTTP Status Code. -type StatusCodeResponse interface { - // Code defines the HTTP Status Code. - Code() int - // Message returns the human-readable message. - Message() string - // Model defines an example payload for this response. - Model() interface{} -} - -// Parameter is a Route parameter. -type Parameter interface { - // Name defines the unique-per-route identifier. - Name() string - // Description is the human-readable description of the param. - Description() string - // Required defines if this parameter must be provided. - Required() bool - // Kind defines the type of the parameter itself. - Kind() ParameterKind - // DataType defines the type of data the parameter carries. - DataType() string - // AllowMultiple defines if more than one value can be supplied for the parameter. - AllowMultiple() bool -} - -// ParameterKind is an enum of route parameter types. -type ParameterKind int - -const ( - // PathParameterKind indicates the request parameter type is "path". - PathParameterKind = ParameterKind(iota) - - // QueryParameterKind indicates the request parameter type is "query". - QueryParameterKind - - // BodyParameterKind indicates the request parameter type is "body". - BodyParameterKind - - // HeaderParameterKind indicates the request parameter type is "header". - HeaderParameterKind - - // FormParameterKind indicates the request parameter type is "form". - FormParameterKind - - // UnknownParameterKind indicates the request parameter type has not been specified. - UnknownParameterKind -) diff --git a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/common/restfuladapter/adapter.go b/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/common/restfuladapter/adapter.go deleted file mode 100644 index e59697a58583..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/common/restfuladapter/adapter.go +++ /dev/null @@ -1,16 +0,0 @@ -package restfuladapter - -import ( - "github.com/emicklei/go-restful" - "k8s.io/kube-openapi/pkg/common" -) - -// AdaptWebServices adapts a slice of restful.WebService into the common interfaces. -func AdaptWebServices(webServices []*restful.WebService) []common.RouteContainer { - var containers []common.RouteContainer - for _, ws := range webServices { - containers = append(containers, &WebServiceAdapter{ws}) - } - return containers -} - diff --git a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/common/restfuladapter/param_adapter.go b/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/common/restfuladapter/param_adapter.go deleted file mode 100644 index be0b45650654..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/common/restfuladapter/param_adapter.go +++ /dev/null @@ -1,54 +0,0 @@ -package restfuladapter - -import ( - "encoding/json" - "github.com/emicklei/go-restful" - "k8s.io/kube-openapi/pkg/common" -) - -var _ common.Parameter = &ParamAdapter{} - -type ParamAdapter struct { - Param *restful.Parameter -} - -func (r *ParamAdapter) MarshalJSON() ([]byte, error) { - return json.Marshal(r.Param) -} - -func (r *ParamAdapter) Name() string { - return r.Param.Data().Name -} - -func (r *ParamAdapter) Description() string { - return r.Param.Data().Description -} - -func (r *ParamAdapter) Required() bool { - return r.Param.Data().Required -} - -func (r *ParamAdapter) Kind() common.ParameterKind { - switch r.Param.Kind() { - case restful.PathParameterKind: - return common.PathParameterKind - case restful.QueryParameterKind: - return common.QueryParameterKind - case restful.BodyParameterKind: - return common.BodyParameterKind - case restful.HeaderParameterKind: - return common.HeaderParameterKind - case restful.FormParameterKind: - return common.FormParameterKind - default: - return common.UnknownParameterKind - } -} - -func (r *ParamAdapter) DataType() string { - return r.Param.Data().DataType -} - -func (r *ParamAdapter) AllowMultiple() bool { - return r.Param.Data().AllowMultiple -} diff --git a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/common/restfuladapter/response_error_adapter.go b/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/common/restfuladapter/response_error_adapter.go deleted file mode 100644 index 019cfb8d9426..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/common/restfuladapter/response_error_adapter.go +++ /dev/null @@ -1,25 +0,0 @@ -package restfuladapter - -import ( - "github.com/emicklei/go-restful" - "k8s.io/kube-openapi/pkg/common" -) - -var _ common.StatusCodeResponse = &ResponseErrorAdapter{} - -// ResponseErrorAdapter adapts a restful.ResponseError to common.StatusCodeResponse. -type ResponseErrorAdapter struct { - Err *restful.ResponseError -} - -func (r *ResponseErrorAdapter) Message() string { - return r.Err.Message -} - -func (r *ResponseErrorAdapter) Model() interface{} { - return r.Err.Model -} - -func (r *ResponseErrorAdapter) Code() int { - return r.Err.Code -} diff --git a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/common/restfuladapter/route_adapter.go b/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/common/restfuladapter/route_adapter.go deleted file mode 100644 index 0622319c3c1e..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/common/restfuladapter/route_adapter.go +++ /dev/null @@ -1,68 +0,0 @@ -package restfuladapter - -import ( - "github.com/emicklei/go-restful" - "k8s.io/kube-openapi/pkg/common" -) - -var _ common.Route = &RouteAdapter{} - -// RouteAdapter adapts a restful.Route to common.Route. -type RouteAdapter struct { - Route *restful.Route -} - -func (r *RouteAdapter) StatusCodeResponses() []common.StatusCodeResponse { - // go-restful uses the ResponseErrors field to contain both error and regular responses. - var responses []common.StatusCodeResponse - for _, res := range r.Route.ResponseErrors { - localRes := res - responses = append(responses, &ResponseErrorAdapter{&localRes}) - } - - return responses -} - -func (r *RouteAdapter) OperationName() string { - return r.Route.Operation -} - -func (r *RouteAdapter) Method() string { - return r.Route.Method -} - -func (r *RouteAdapter) Path() string { - return r.Route.Path -} - -func (r *RouteAdapter) Parameters() []common.Parameter { - var params []common.Parameter - for _, rParam := range r.Route.ParameterDocs { - params = append(params, &ParamAdapter{rParam}) - } - return params -} - -func (r *RouteAdapter) Description() string { - return r.Route.Doc -} - -func (r *RouteAdapter) Consumes() []string { - return r.Route.Consumes -} - -func (r *RouteAdapter) Produces() []string { - return r.Route.Produces -} - -func (r *RouteAdapter) Metadata() map[string]interface{} { - return r.Route.Metadata -} - -func (r *RouteAdapter) RequestPayloadSample() interface{} { - return r.Route.ReadSample -} - -func (r *RouteAdapter) ResponsePayloadSample() interface{} { - return r.Route.WriteSample -} diff --git a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/common/restfuladapter/webservice_adapter.go b/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/common/restfuladapter/webservice_adapter.go deleted file mode 100644 index e8ee6dee7e47..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/common/restfuladapter/webservice_adapter.go +++ /dev/null @@ -1,34 +0,0 @@ -package restfuladapter - -import ( - "github.com/emicklei/go-restful" - "k8s.io/kube-openapi/pkg/common" -) - -var _ common.RouteContainer = &WebServiceAdapter{} - -// WebServiceAdapter adapts a restful.WebService to common.RouteContainer. -type WebServiceAdapter struct { - WebService *restful.WebService -} - -func (r *WebServiceAdapter) RootPath() string { - return r.WebService.RootPath() -} - -func (r *WebServiceAdapter) PathParameters() []common.Parameter { - var params []common.Parameter - for _, rParam := range r.WebService.PathParameters() { - params = append(params, &ParamAdapter{rParam}) - } - return params -} - -func (r *WebServiceAdapter) Routes() []common.Route { - var routes []common.Route - for _, rRoute := range r.WebService.Routes() { - localRoute := rRoute - routes = append(routes, &RouteAdapter{&localRoute}) - } - return routes -} diff --git a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/handler/handler.go b/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/handler/handler.go index 4a80ecb28237..7338094cbe4d 100644 --- a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/handler/handler.go +++ b/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/handler/handler.go @@ -24,21 +24,18 @@ import ( "fmt" "mime" "net/http" - "strconv" "sync" "time" "github.com/NYTimes/gziphandler" "github.com/emicklei/go-restful" "github.com/golang/protobuf/proto" - openapi_v2 "github.com/google/gnostic/openapiv2" + openapi_v2 "github.com/googleapis/gnostic/openapiv2" "github.com/munnerz/goautoneg" "gopkg.in/yaml.v2" klog "k8s.io/klog/v2" "k8s.io/kube-openapi/pkg/builder" "k8s.io/kube-openapi/pkg/common" - "k8s.io/kube-openapi/pkg/common/restfuladapter" - "k8s.io/kube-openapi/pkg/internal/handler" "k8s.io/kube-openapi/pkg/validation/spec" ) @@ -51,13 +48,6 @@ const ( mimePbGz = "application/x-gzip" ) -func computeETag(data []byte) string { - if data == nil { - return "" - } - return fmt.Sprintf("%X", sha512.Sum512(data)) -} - // OpenAPIService is the service responsible for serving OpenAPI spec. It has // the ability to safely change the spec while serving it. type OpenAPIService struct { @@ -66,9 +56,40 @@ type OpenAPIService struct { lastModified time.Time - jsonCache handler.HandlerCache - protoCache handler.HandlerCache - etagCache handler.HandlerCache + jsonCache cache + protoCache cache +} + +type cache struct { + BuildCache func() ([]byte, error) + once sync.Once + bytes []byte + etag string + err error +} + +func (c *cache) Get() ([]byte, string, error) { + c.once.Do(func() { + bytes, err := c.BuildCache() + // if there is an error updating the cache, there can be situations where + // c.bytes contains a valid value (carried over from the previous update) + // but c.err is also not nil; the cache user is expected to check for this + c.err = err + if c.err == nil { + // don't override previous spec if we had an error + c.bytes = bytes + c.etag = computeETag(c.bytes) + } + }) + return c.bytes, c.etag, c.err +} + +func (c *cache) New(cacheBuilder func() ([]byte, error)) cache { + return cache{ + bytes: c.bytes, + etag: c.etag, + BuildCache: cacheBuilder, + } } func init() { @@ -77,6 +98,13 @@ func init() { mime.AddExtensionType(".gz", mimePbGz) } +func computeETag(data []byte) string { + if data == nil { + return "" + } + return fmt.Sprintf("\"%X\"", sha512.Sum512(data)) +} + // NewOpenAPIService builds an OpenAPIService starting with the given spec. func NewOpenAPIService(spec *spec.Swagger) (*OpenAPIService, error) { o := &OpenAPIService{} @@ -89,29 +117,21 @@ func NewOpenAPIService(spec *spec.Swagger) (*OpenAPIService, error) { func (o *OpenAPIService) getSwaggerBytes() ([]byte, string, time.Time, error) { o.rwMutex.RLock() defer o.rwMutex.RUnlock() - specBytes, err := o.jsonCache.Get() + specBytes, etag, err := o.jsonCache.Get() if err != nil { return nil, "", time.Time{}, err } - etagBytes, err := o.etagCache.Get() - if err != nil { - return nil, "", time.Time{}, err - } - return specBytes, string(etagBytes), o.lastModified, nil + return specBytes, etag, o.lastModified, nil } func (o *OpenAPIService) getSwaggerPbBytes() ([]byte, string, time.Time, error) { o.rwMutex.RLock() defer o.rwMutex.RUnlock() - specPb, err := o.protoCache.Get() - if err != nil { - return nil, "", time.Time{}, err - } - etagBytes, err := o.etagCache.Get() + specPb, etag, err := o.protoCache.Get() if err != nil { return nil, "", time.Time{}, err } - return specPb, string(etagBytes), o.lastModified, nil + return specPb, etag, o.lastModified, nil } func (o *OpenAPIService) UpdateSpec(openapiSpec *spec.Swagger) (err error) { @@ -121,19 +141,12 @@ func (o *OpenAPIService) UpdateSpec(openapiSpec *spec.Swagger) (err error) { return json.Marshal(openapiSpec) }) o.protoCache = o.protoCache.New(func() ([]byte, error) { - json, err := o.jsonCache.Get() + json, _, err := o.jsonCache.Get() if err != nil { return nil, err } return ToProtoBinary(json) }) - o.etagCache = o.etagCache.New(func() ([]byte, error) { - json, err := o.jsonCache.Get() - if err != nil { - return nil, err - } - return []byte(computeETag(json)), nil - }) o.lastModified = time.Now() return nil @@ -246,8 +259,7 @@ func (o *OpenAPIService) RegisterOpenAPIVersionedService(servePath string, handl return } } - // ETag must be enclosed in double quotes: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag - w.Header().Set("Etag", strconv.Quote(etag)) + w.Header().Set("Etag", etag) // ServeContent will take care of caching using eTag. http.ServeContent(w, r, servePath, lastModified, bytes.NewReader(data)) return @@ -264,16 +276,8 @@ func (o *OpenAPIService) RegisterOpenAPIVersionedService(servePath string, handl // BuildAndRegisterOpenAPIVersionedService builds the spec and registers a handler to provide access to it. // Use this method if your OpenAPI spec is static. If you want to update the spec, use BuildOpenAPISpec then RegisterOpenAPIVersionedService. -// -// Deprecated: BuildAndRegisterOpenAPIVersionedServiceFromRoutes should be used instead. func BuildAndRegisterOpenAPIVersionedService(servePath string, webServices []*restful.WebService, config *common.Config, handler common.PathHandler) (*OpenAPIService, error) { - return BuildAndRegisterOpenAPIVersionedServiceFromRoutes(servePath, restfuladapter.AdaptWebServices(webServices), config, handler) -} - -// BuildAndRegisterOpenAPIVersionedServiceFromRoutes builds the spec and registers a handler to provide access to it. -// Use this method if your OpenAPI spec is static. If you want to update the spec, use BuildOpenAPISpec then RegisterOpenAPIVersionedService. -func BuildAndRegisterOpenAPIVersionedServiceFromRoutes(servePath string, routeContainers []common.RouteContainer, config *common.Config, handler common.PathHandler) (*OpenAPIService, error) { - spec, err := builder.BuildOpenAPISpecFromRoutes(routeContainers, config) + spec, err := builder.BuildOpenAPISpec(webServices, config) if err != nil { return nil, err } diff --git a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/handler3/handler.go b/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/handler3/handler.go index ec4adcdec2aa..aa3290823641 100644 --- a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/handler3/handler.go +++ b/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/handler3/handler.go @@ -18,24 +18,21 @@ package handler3 import ( "bytes" + "compress/gzip" "crypto/sha512" "encoding/json" "fmt" "mime" "net/http" - "net/url" - "path" "sort" - "strconv" "strings" "sync" "time" "github.com/golang/protobuf/proto" - openapi_v3 "github.com/google/gnostic/openapiv3" + openapi_v3 "github.com/googleapis/gnostic/openapiv3" "github.com/munnerz/goautoneg" "k8s.io/kube-openapi/pkg/common" - "k8s.io/kube-openapi/pkg/internal/handler" "k8s.io/kube-openapi/pkg/spec3" "k8s.io/kube-openapi/pkg/validation/spec" ) @@ -52,21 +49,9 @@ const ( subTypeJSON = "json" ) -// OpenAPIV3Discovery is the format of the Discovery document for OpenAPI V3 -// It maps Discovery paths to their corresponding URLs with a hash parameter included -type OpenAPIV3Discovery struct { - Paths map[string]OpenAPIV3DiscoveryGroupVersion `json:"paths"` -} - -// OpenAPIV3DiscoveryGroupVersion includes information about a group version and URL -// for accessing the OpenAPI. The URL includes a hash parameter to support client side caching -type OpenAPIV3DiscoveryGroupVersion struct { - // Path is an absolute path of an OpenAPI V3 document in the form of /openapi/v3/apis/apps/v1?hash=014fbff9a07c - ServerRelativeURL string `json:"serverRelativeURL"` -} - // OpenAPIService is the service responsible for serving OpenAPI spec. It has // the ability to safely change the spec while serving it. +// OpenAPI V3 currently does not use the lazy marshaling strategy that OpenAPI V2 is using type OpenAPIService struct { // rwMutex protects All members of this service. rwMutex sync.RWMutex @@ -79,9 +64,13 @@ type OpenAPIV3Group struct { lastModified time.Time - pbCache handler.HandlerCache - jsonCache handler.HandlerCache - etagCache handler.HandlerCache + specBytes []byte + specPb []byte + specPbGz []byte + + specBytesETag string + specPbETag string + specPbGzETag string } func init() { @@ -91,18 +80,7 @@ func init() { } func computeETag(data []byte) string { - if data == nil { - return "" - } - return fmt.Sprintf("%X", sha512.Sum512(data)) -} - -func constructServerRelativeURL(gvString, etag string) string { - u := url.URL{Path: path.Join("/openapi/v3", gvString)} - query := url.Values{} - query.Set("hash", etag) - u.RawQuery = query.Encode() - return u.String() + return fmt.Sprintf("\"%X\"", sha512.Sum512(data)) } // NewOpenAPIService builds an OpenAPIService starting with the given spec. @@ -123,17 +101,10 @@ func (o *OpenAPIService) getGroupBytes() ([]byte, error) { } sort.Strings(keys) - discovery := &OpenAPIV3Discovery{Paths: make(map[string]OpenAPIV3DiscoveryGroupVersion)} - for gvString, groupVersion := range o.v3Schema { - etagBytes, err := groupVersion.etagCache.Get() - if err != nil { - return nil, err - } - discovery.Paths[gvString] = OpenAPIV3DiscoveryGroupVersion{ - ServerRelativeURL: constructServerRelativeURL(gvString, string(etagBytes)), - } - } - j, err := json.Marshal(discovery) + group := make(map[string][]string) + group["Paths"] = keys + + j, err := json.Marshal(group) if err != nil { return nil, err } @@ -148,19 +119,9 @@ func (o *OpenAPIService) getSingleGroupBytes(getType string, group string) ([]by return nil, "", time.Now(), fmt.Errorf("Cannot find CRD group %s", group) } if getType == subTypeJSON { - specBytes, err := v.jsonCache.Get() - if err != nil { - return nil, "", v.lastModified, err - } - etagBytes, err := v.etagCache.Get() - return specBytes, string(etagBytes), v.lastModified, err + return v.specBytes, v.specBytesETag, v.lastModified, nil } else if getType == subTypeProtobuf { - specPb, err := v.pbCache.Get() - if err != nil { - return nil, "", v.lastModified, err - } - etagBytes, err := v.etagCache.Get() - return specPb, string(etagBytes), v.lastModified, err + return v.specPb, v.specPbETag, v.lastModified, nil } return nil, "", time.Now(), fmt.Errorf("Invalid accept clause %s", getType) } @@ -169,10 +130,15 @@ func (o *OpenAPIService) UpdateGroupVersion(group string, openapi *spec3.OpenAPI o.rwMutex.Lock() defer o.rwMutex.Unlock() + specBytes, err := json.Marshal(openapi) + if err != nil { + return err + } + if _, ok := o.v3Schema[group]; !ok { o.v3Schema[group] = &OpenAPIV3Group{} } - return o.v3Schema[group].UpdateSpec(openapi) + return o.v3Schema[group].UpdateSpec(specBytes) } func (o *OpenAPIService) DeleteGroupVersion(group string) { @@ -189,6 +155,14 @@ func ToV3ProtoBinary(json []byte) ([]byte, error) { return proto.Marshal(document) } +func toGzip(data []byte) []byte { + var buf bytes.Buffer + zw := gzip.NewWriter(&buf) + zw.Write(data) + zw.Close() + return buf.Bytes() +} + func (o *OpenAPIService) HandleDiscovery(w http.ResponseWriter, r *http.Request) { data, _ := o.getGroupBytes() http.ServeContent(w, r, "/openapi/v3", time.Now(), bytes.NewReader(data)) @@ -229,26 +203,7 @@ func (o *OpenAPIService) HandleGroupVersion(w http.ResponseWriter, r *http.Reque if err != nil { return } - // ETag must be enclosed in double quotes: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag - w.Header().Set("Etag", strconv.Quote(etag)) - - if hash := r.URL.Query().Get("hash"); hash != "" { - if hash != etag { - u := constructServerRelativeURL(group, etag) - http.Redirect(w, r, u, 301) - return - } - // The Vary header is required because the Accept header can - // change the contents returned. This prevents clients from caching - // protobuf as JSON and vice versa. - w.Header().Set("Vary", "Accept") - - // Only set these headers when a hash is given. - w.Header().Set("Cache-Control", "public, immutable") - // Set the Expires directive to the maximum value of one year from the request, - // effectively indicating that the cache never expires. - w.Header().Set("Expires", time.Now().AddDate(1, 0, 0).Format(time.RFC1123)) - } + w.Header().Set("Etag", etag) http.ServeContent(w, r, "", lastModified, bytes.NewReader(data)) return } @@ -263,29 +218,31 @@ func (o *OpenAPIService) RegisterOpenAPIV3VersionedService(servePath string, han return nil } -func (o *OpenAPIV3Group) UpdateSpec(openapi *spec3.OpenAPI) (err error) { +func (o *OpenAPIV3Group) UpdateSpec(specBytes []byte) (err error) { o.rwMutex.Lock() defer o.rwMutex.Unlock() - o.jsonCache = o.jsonCache.New(func() ([]byte, error) { - return json.Marshal(openapi) - }) - o.pbCache = o.pbCache.New(func() ([]byte, error) { - json, err := o.jsonCache.Get() - if err != nil { - return nil, err - } - return ToV3ProtoBinary(json) - }) - // TODO: This forces a json marshal of corresponding group-versions. - // We should look to replace this with a faster hashing mechanism. - o.etagCache = o.etagCache.New(func() ([]byte, error) { - json, err := o.jsonCache.Get() - if err != nil { - return nil, err - } - return []byte(computeETag(json)), nil - }) - o.lastModified = time.Now() + specPb, err := ToV3ProtoBinary(specBytes) + if err != nil { + return err + } + + specPbGz := toGzip(specPb) + + specBytesETag := computeETag(specBytes) + specPbETag := computeETag(specPb) + specPbGzETag := computeETag(specPbGz) + + lastModified := time.Now() + + o.specBytes = specBytes + o.specPb = specPb + o.specPbGz = specPbGz + + o.specBytesETag = specBytesETag + o.specPbETag = specPbETag + o.specPbGzETag = specPbGzETag + + o.lastModified = lastModified return nil } diff --git a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/internal/handler/handler_cache.go b/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/internal/handler/handler_cache.go deleted file mode 100644 index e128c26ebee9..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/internal/handler/handler_cache.go +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package handler - -import ( - "sync" -) - -// HandlerCache represents a lazy cache for generating a byte array -// It is used to lazily marshal OpenAPI v2/v3 and lazily generate the ETag -type HandlerCache struct { - BuildCache func() ([]byte, error) - once sync.Once - bytes []byte - err error -} - -// Get either returns the cached value or calls BuildCache() once before caching and returning -// its results. If BuildCache returns an error, the last valid value for the cache (from prior -// calls to New()) is used instead if possible. -func (c *HandlerCache) Get() ([]byte, error) { - c.once.Do(func() { - bytes, err := c.BuildCache() - // if there is an error updating the cache, there can be situations where - // c.bytes contains a valid value (carried over from the previous update) - // but c.err is also not nil; the cache user is expected to check for this - c.err = err - if c.err == nil { - // don't override previous spec if we had an error - c.bytes = bytes - } - }) - return c.bytes, c.err -} - -// New creates a new HandlerCache for situations where a cache refresh is needed. -// This function is not thread-safe and should not be called at the same time as Get(). -func (c *HandlerCache) New(cacheBuilder func() ([]byte, error)) HandlerCache { - return HandlerCache{ - bytes: c.bytes, - BuildCache: cacheBuilder, - } -} diff --git a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/openapiconv/convert.go b/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/openapiconv/convert.go deleted file mode 100644 index e993fe23d58f..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/openapiconv/convert.go +++ /dev/null @@ -1,322 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package openapiconv - -import ( - "strings" - - klog "k8s.io/klog/v2" - builderutil "k8s.io/kube-openapi/pkg/builder3/util" - "k8s.io/kube-openapi/pkg/spec3" - "k8s.io/kube-openapi/pkg/validation/spec" -) - -var OpenAPIV2DefPrefix = "#/definitions/" -var OpenAPIV3DefPrefix = "#/components/schemas/" - -// ConvertV2ToV3 converts an OpenAPI V2 object into V3. -// Certain references may be shared between the V2 and V3 objects in the conversion. -func ConvertV2ToV3(v2Spec *spec.Swagger) *spec3.OpenAPI { - v3Spec := &spec3.OpenAPI{ - Version: "3.0.0", - Info: v2Spec.Info, - ExternalDocs: ConvertExternalDocumentation(v2Spec.ExternalDocs), - Paths: ConvertPaths(v2Spec.Paths), - Components: ConvertComponents(v2Spec.SecurityDefinitions, v2Spec.Definitions, v2Spec.Responses, v2Spec.Produces), - } - - return v3Spec -} - -func ConvertExternalDocumentation(v2ED *spec.ExternalDocumentation) *spec3.ExternalDocumentation { - if v2ED == nil { - return nil - } - return &spec3.ExternalDocumentation{ - ExternalDocumentationProps: spec3.ExternalDocumentationProps{ - Description: v2ED.Description, - URL: v2ED.URL, - }, - } -} - -func ConvertComponents(v2SecurityDefinitions spec.SecurityDefinitions, v2Definitions spec.Definitions, v2Responses map[string]spec.Response, produces []string) *spec3.Components { - components := &spec3.Components{} - - if v2Definitions != nil { - components.Schemas = make(map[string]*spec.Schema) - } - for s, schema := range v2Definitions { - components.Schemas[s] = ConvertSchema(&schema) - } - if v2SecurityDefinitions != nil { - components.SecuritySchemes = make(spec3.SecuritySchemes) - } - for s, securityScheme := range v2SecurityDefinitions { - components.SecuritySchemes[s] = ConvertSecurityScheme(securityScheme) - } - if v2Responses != nil { - components.Responses = make(map[string]*spec3.Response) - } - for r, response := range v2Responses { - components.Responses[r] = ConvertResponse(&response, produces) - } - - return components -} - -func ConvertSchema(v2Schema *spec.Schema) *spec.Schema { - if v2Schema == nil { - return nil - } - v3Schema := spec.Schema{ - VendorExtensible: v2Schema.VendorExtensible, - SchemaProps: v2Schema.SchemaProps, - SwaggerSchemaProps: v2Schema.SwaggerSchemaProps, - ExtraProps: v2Schema.ExtraProps, - } - - if refString := v2Schema.Ref.String(); refString != "" { - if idx := strings.Index(refString, OpenAPIV2DefPrefix); idx != -1 { - v3Schema.Ref = spec.MustCreateRef(OpenAPIV3DefPrefix + refString[idx+len(OpenAPIV2DefPrefix):]) - } else { - klog.Errorf("Error: Swagger V2 Ref %s does not contain #/definitions\n", refString) - } - } - - if v2Schema.Properties != nil { - v3Schema.Properties = make(map[string]spec.Schema) - for key, property := range v2Schema.Properties { - v3Schema.Properties[key] = *ConvertSchema(&property) - } - } - if v2Schema.Items != nil { - v3Schema.Items = &spec.SchemaOrArray{ - Schema: ConvertSchema(v2Schema.Items.Schema), - Schemas: ConvertSchemaList(v2Schema.Items.Schemas), - } - } - - if v2Schema.AdditionalProperties != nil { - v3Schema.AdditionalProperties = &spec.SchemaOrBool{ - Schema: ConvertSchema(v2Schema.AdditionalProperties.Schema), - Allows: v2Schema.AdditionalProperties.Allows, - } - } - if v2Schema.AdditionalItems != nil { - v3Schema.AdditionalItems = &spec.SchemaOrBool{ - Schema: ConvertSchema(v2Schema.AdditionalItems.Schema), - Allows: v2Schema.AdditionalItems.Allows, - } - } - - return builderutil.WrapRefs(&v3Schema) -} - -func ConvertSchemaList(v2SchemaList []spec.Schema) []spec.Schema { - if v2SchemaList == nil { - return nil - } - v3SchemaList := []spec.Schema{} - for _, s := range v2SchemaList { - v3SchemaList = append(v3SchemaList, *ConvertSchema(&s)) - } - return v3SchemaList -} - -func ConvertSecurityScheme(v2securityScheme *spec.SecurityScheme) *spec3.SecurityScheme { - if v2securityScheme == nil { - return nil - } - securityScheme := &spec3.SecurityScheme{ - VendorExtensible: v2securityScheme.VendorExtensible, - SecuritySchemeProps: spec3.SecuritySchemeProps{ - Description: v2securityScheme.Description, - Type: v2securityScheme.Type, - Name: v2securityScheme.Name, - In: v2securityScheme.In, - }, - } - - if v2securityScheme.Flow != "" { - securityScheme.Flows = make(map[string]*spec3.OAuthFlow) - securityScheme.Flows[v2securityScheme.Flow] = &spec3.OAuthFlow{ - OAuthFlowProps: spec3.OAuthFlowProps{ - AuthorizationUrl: v2securityScheme.AuthorizationURL, - TokenUrl: v2securityScheme.TokenURL, - Scopes: v2securityScheme.Scopes, - }, - } - } - return securityScheme -} - -func ConvertPaths(v2Paths *spec.Paths) *spec3.Paths { - if v2Paths == nil { - return nil - } - paths := &spec3.Paths{ - VendorExtensible: v2Paths.VendorExtensible, - } - - if v2Paths.Paths != nil { - paths.Paths = make(map[string]*spec3.Path) - } - for k, v := range v2Paths.Paths { - paths.Paths[k] = ConvertPathItem(v) - } - return paths -} - -func ConvertPathItem(v2pathItem spec.PathItem) *spec3.Path { - path := &spec3.Path{ - Refable: v2pathItem.Refable, - PathProps: spec3.PathProps{ - Get: ConvertOperation(v2pathItem.Get), - Put: ConvertOperation(v2pathItem.Put), - Post: ConvertOperation(v2pathItem.Post), - Delete: ConvertOperation(v2pathItem.Delete), - Options: ConvertOperation(v2pathItem.Options), - Head: ConvertOperation(v2pathItem.Head), - Patch: ConvertOperation(v2pathItem.Patch), - }, - VendorExtensible: v2pathItem.VendorExtensible, - } - for _, param := range v2pathItem.Parameters { - path.Parameters = append(path.Parameters, ConvertParameter(param)) - } - return path -} - -func ConvertOperation(v2Operation *spec.Operation) *spec3.Operation { - if v2Operation == nil { - return nil - } - operation := &spec3.Operation{ - VendorExtensible: v2Operation.VendorExtensible, - OperationProps: spec3.OperationProps{ - Description: v2Operation.Description, - ExternalDocs: ConvertExternalDocumentation(v2Operation.OperationProps.ExternalDocs), - Tags: v2Operation.Tags, - Summary: v2Operation.Summary, - Deprecated: v2Operation.Deprecated, - OperationId: v2Operation.ID, - }, - } - - for _, param := range v2Operation.Parameters { - if param.ParamProps.Name == "body" && param.ParamProps.Schema != nil { - operation.OperationProps.RequestBody = &spec3.RequestBody{ - RequestBodyProps: spec3.RequestBodyProps{}, - } - if v2Operation.Consumes != nil { - operation.RequestBody.Content = make(map[string]*spec3.MediaType) - } - for _, consumer := range v2Operation.Consumes { - operation.RequestBody.Content[consumer] = &spec3.MediaType{ - MediaTypeProps: spec3.MediaTypeProps{ - Schema: ConvertSchema(param.ParamProps.Schema), - }, - } - } - } else { - operation.Parameters = append(operation.Parameters, ConvertParameter(param)) - } - } - - operation.Responses = &spec3.Responses{ResponsesProps: spec3.ResponsesProps{ - Default: ConvertResponse(v2Operation.Responses.Default, v2Operation.Produces), - }, - VendorExtensible: v2Operation.Responses.VendorExtensible, - } - - if v2Operation.Responses.StatusCodeResponses != nil { - operation.Responses.StatusCodeResponses = make(map[int]*spec3.Response) - } - for k, v := range v2Operation.Responses.StatusCodeResponses { - operation.Responses.StatusCodeResponses[k] = ConvertResponse(&v, v2Operation.Produces) - } - return operation -} - -func ConvertResponse(v2Response *spec.Response, produces []string) *spec3.Response { - if v2Response == nil { - return nil - } - response := &spec3.Response{ - Refable: ConvertRefableResponse(v2Response.Refable), - VendorExtensible: v2Response.VendorExtensible, - ResponseProps: spec3.ResponseProps{ - Description: v2Response.Description, - }, - } - - if v2Response.Schema != nil { - if produces != nil { - response.Content = make(map[string]*spec3.MediaType) - } - for _, producer := range produces { - response.ResponseProps.Content[producer] = &spec3.MediaType{ - MediaTypeProps: spec3.MediaTypeProps{ - Schema: ConvertSchema(v2Response.Schema), - }, - } - } - } - return response -} - -func ConvertParameter(v2Param spec.Parameter) *spec3.Parameter { - param := &spec3.Parameter{ - Refable: ConvertRefableParameter(v2Param.Refable), - VendorExtensible: v2Param.VendorExtensible, - ParameterProps: spec3.ParameterProps{ - Name: v2Param.Name, - Description: v2Param.Description, - In: v2Param.In, - Required: v2Param.Required, - Schema: ConvertSchema(v2Param.Schema), - AllowEmptyValue: v2Param.AllowEmptyValue, - }, - } - // Convert SimpleSchema into Schema - if param.Schema == nil { - param.Schema = &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{v2Param.Type}, - Format: v2Param.Format, - UniqueItems: v2Param.UniqueItems, - }, - } - } - - return param -} - -func ConvertRefableParameter(refable spec.Refable) spec.Refable { - if refable.Ref.String() != "" { - return spec.Refable{Ref: spec.MustCreateRef(strings.Replace(refable.Ref.String(), "#/parameters/", "#/components/parameters/", 1))} - } - return refable -} - -func ConvertRefableResponse(refable spec.Refable) spec.Refable { - if refable.Ref.String() != "" { - return spec.Refable{Ref: spec.MustCreateRef(strings.Replace(refable.Ref.String(), "#/responses/", "#/components/responses/", 1))} - } - return refable -} diff --git a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/util/proto/document.go b/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/util/proto/document.go index 763923dfffcb..4abcf9b82423 100644 --- a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/util/proto/document.go +++ b/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/util/proto/document.go @@ -21,7 +21,7 @@ import ( "sort" "strings" - openapi_v2 "github.com/google/gnostic/openapiv2" + openapi_v2 "github.com/googleapis/gnostic/openapiv2" "gopkg.in/yaml.v2" ) diff --git a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/util/proto/document_v3.go b/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/util/proto/document_v3.go deleted file mode 100644 index a3f476d5d850..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/util/proto/document_v3.go +++ /dev/null @@ -1,324 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package proto - -import ( - "fmt" - "reflect" - "strings" - - openapi_v3 "github.com/google/gnostic/openapiv3" - "gopkg.in/yaml.v3" -) - -// Temporary parse implementation to be used until gnostic->kube-openapi conversion -// is possible. -func NewOpenAPIV3Data(doc *openapi_v3.Document) (Models, error) { - definitions := Definitions{ - models: map[string]Schema{}, - } - - schemas := doc.GetComponents().GetSchemas() - if schemas == nil { - return &definitions, nil - } - - // Save the list of all models first. This will allow us to - // validate that we don't have any dangling reference. - for _, namedSchema := range schemas.GetAdditionalProperties() { - definitions.models[namedSchema.GetName()] = nil - } - - // Now, parse each model. We can validate that references exists. - for _, namedSchema := range schemas.GetAdditionalProperties() { - path := NewPath(namedSchema.GetName()) - val := namedSchema.GetValue() - - if val == nil { - continue - } - - if schema, err := definitions.ParseV3SchemaOrReference(namedSchema.GetValue(), &path); err != nil { - return nil, err - } else if schema != nil { - // Schema may be nil if we hit incompleteness in the conversion, - // but not a fatal error - definitions.models[namedSchema.GetName()] = schema - } - } - - return &definitions, nil -} - -func (d *Definitions) ParseV3SchemaReference(s *openapi_v3.Reference, path *Path) (Schema, error) { - base := &BaseSchema{ - Description: s.Description, - } - - if !strings.HasPrefix(s.GetXRef(), "#/components/schemas") { - // Only resolve references to components/schemas. We may add support - // later for other in-spec paths, but otherwise treat unrecognized - // refs as arbitrary/unknown values. - return &Arbitrary{ - BaseSchema: *base, - }, nil - } - - reference := strings.TrimPrefix(s.GetXRef(), "#/components/schemas/") - if _, ok := d.models[reference]; !ok { - return nil, newSchemaError(path, "unknown model in reference: %q", reference) - } - - return &Ref{ - BaseSchema: BaseSchema{ - Description: s.Description, - }, - reference: reference, - definitions: d, - }, nil -} - -func (d *Definitions) ParseV3SchemaOrReference(s *openapi_v3.SchemaOrReference, path *Path) (Schema, error) { - var schema Schema - var err error - - switch v := s.GetOneof().(type) { - case *openapi_v3.SchemaOrReference_Reference: - // Any references stored in #!/components/... are bound to refer - // to external documents. This API does not support such a - // feature. - // - // In the weird case that this is a reference to a schema that is - // not external, we attempt to parse anyway - schema, err = d.ParseV3SchemaReference(v.Reference, path) - case *openapi_v3.SchemaOrReference_Schema: - schema, err = d.ParseSchemaV3(v.Schema, path) - default: - panic("unexpected type") - } - - return schema, err -} - -// ParseSchema creates a walkable Schema from an openapi v3 schema. While -// this function is public, it doesn't leak through the interface. -func (d *Definitions) ParseSchemaV3(s *openapi_v3.Schema, path *Path) (Schema, error) { - switch s.GetType() { - case object: - for _, extension := range s.GetSpecificationExtension() { - if extension.Name == "x-kuberentes-group-version-kind" { - // Objects with x-kubernetes-group-version-kind are always top - // level types. - return d.parseV3Kind(s, path) - } - } - - if len(s.GetProperties().GetAdditionalProperties()) > 0 { - return d.parseV3Kind(s, path) - } - return d.parseV3Map(s, path) - case array: - return d.parseV3Array(s, path) - case String, Number, Integer, Boolean: - return d.parseV3Primitive(s, path) - default: - return d.parseV3Arbitrary(s, path) - } -} - -func (d *Definitions) parseV3Kind(s *openapi_v3.Schema, path *Path) (Schema, error) { - if s.GetType() != object { - return nil, newSchemaError(path, "invalid object type") - } else if s.GetProperties() == nil { - return nil, newSchemaError(path, "object doesn't have properties") - } - - fields := map[string]Schema{} - fieldOrder := []string{} - - for _, namedSchema := range s.GetProperties().GetAdditionalProperties() { - var err error - name := namedSchema.GetName() - path := path.FieldPath(name) - fields[name], err = d.ParseV3SchemaOrReference(namedSchema.GetValue(), &path) - if err != nil { - return nil, err - } - fieldOrder = append(fieldOrder, name) - } - - base, err := d.parseV3BaseSchema(s, path) - if err != nil { - return nil, err - } - - return &Kind{ - BaseSchema: *base, - RequiredFields: s.GetRequired(), - Fields: fields, - FieldOrder: fieldOrder, - }, nil -} - -func (d *Definitions) parseV3Arbitrary(s *openapi_v3.Schema, path *Path) (Schema, error) { - base, err := d.parseV3BaseSchema(s, path) - if err != nil { - return nil, err - } - return &Arbitrary{ - BaseSchema: *base, - }, nil -} - -func (d *Definitions) parseV3Primitive(s *openapi_v3.Schema, path *Path) (Schema, error) { - switch s.GetType() { - case String: // do nothing - case Number: // do nothing - case Integer: // do nothing - case Boolean: // do nothing - default: - // Unsupported primitive type. Treat as arbitrary type - return d.parseV3Arbitrary(s, path) - } - - base, err := d.parseV3BaseSchema(s, path) - if err != nil { - return nil, err - } - - return &Primitive{ - BaseSchema: *base, - Type: s.GetType(), - Format: s.GetFormat(), - }, nil -} - -func (d *Definitions) parseV3Array(s *openapi_v3.Schema, path *Path) (Schema, error) { - if s.GetType() != array { - return nil, newSchemaError(path, `array should have type "array"`) - } else if len(s.GetItems().GetSchemaOrReference()) != 1 { - // This array can have multiple types in it (or no types at all) - // This is not supported by this conversion. - // Just return an arbitrary type - return d.parseV3Arbitrary(s, path) - } - - sub, err := d.ParseV3SchemaOrReference(s.GetItems().GetSchemaOrReference()[0], path) - if err != nil { - return nil, err - } - - base, err := d.parseV3BaseSchema(s, path) - if err != nil { - return nil, err - } - return &Array{ - BaseSchema: *base, - SubType: sub, - }, nil -} - -// We believe the schema is a map, verify and return a new schema -func (d *Definitions) parseV3Map(s *openapi_v3.Schema, path *Path) (Schema, error) { - if s.GetType() != object { - return nil, newSchemaError(path, "invalid object type") - } - var sub Schema - - switch p := s.GetAdditionalProperties().GetOneof().(type) { - case *openapi_v3.AdditionalPropertiesItem_Boolean: - // What does this boolean even mean? - base, err := d.parseV3BaseSchema(s, path) - if err != nil { - return nil, err - } - sub = &Arbitrary{ - BaseSchema: *base, - } - case *openapi_v3.AdditionalPropertiesItem_SchemaOrReference: - if schema, err := d.ParseV3SchemaOrReference(p.SchemaOrReference, path); err != nil { - return nil, err - } else { - sub = schema - } - case nil: - // no subtype? - sub = &Arbitrary{} - default: - panic("unrecognized type " + reflect.TypeOf(p).Name()) - } - - base, err := d.parseV3BaseSchema(s, path) - if err != nil { - return nil, err - } - return &Map{ - BaseSchema: *base, - SubType: sub, - }, nil -} - -func parseV3Interface(def *yaml.Node) (interface{}, error) { - if def == nil { - return nil, nil - } - var i interface{} - if err := def.Decode(&i); err != nil { - return nil, err - } - return i, nil -} - -func (d *Definitions) parseV3BaseSchema(s *openapi_v3.Schema, path *Path) (*BaseSchema, error) { - if s == nil { - return nil, fmt.Errorf("cannot initializae BaseSchema from nil") - } - - def, err := parseV3Interface(s.GetDefault().ToRawInfo()) - if err != nil { - return nil, err - } - - return &BaseSchema{ - Description: s.GetDescription(), - Default: def, - Extensions: SpecificationExtensionToMap(s.GetSpecificationExtension()), - Path: *path, - }, nil -} - -func SpecificationExtensionToMap(e []*openapi_v3.NamedAny) map[string]interface{} { - values := map[string]interface{}{} - - for _, na := range e { - if na.GetName() == "" || na.GetValue() == nil { - continue - } - if na.GetValue().GetYaml() == "" { - continue - } - var value interface{} - err := yaml.Unmarshal([]byte(na.GetValue().GetYaml()), &value) - if err != nil { - continue - } - - values[na.GetName()] = value - } - - return values -} diff --git a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/validation/spec/header.go b/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/validation/spec/header.go index 597fc96312c5..216cf1cded43 100644 --- a/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/validation/spec/header.go +++ b/cluster-autoscaler/vendor/k8s.io/kube-openapi/pkg/validation/spec/header.go @@ -53,11 +53,7 @@ func (h Header) MarshalJSON() ([]byte, error) { if err != nil { return nil, err } - b4, err := json.Marshal(h.VendorExtensible) - if err != nil { - return nil, err - } - return swag.ConcatJSON(b1, b2, b3, b4), nil + return swag.ConcatJSON(b1, b2, b3), nil } // UnmarshalJSON unmarshals this header from JSON diff --git a/cluster-autoscaler/vendor/k8s.io/kube-proxy/config/v1alpha1/types.go b/cluster-autoscaler/vendor/k8s.io/kube-proxy/config/v1alpha1/types.go index ba02859006a0..36dafe0c199a 100644 --- a/cluster-autoscaler/vendor/k8s.io/kube-proxy/config/v1alpha1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/kube-proxy/config/v1alpha1/types.go @@ -95,24 +95,6 @@ type KubeProxyWinkernelConfiguration struct { // enableDSR tells kube-proxy whether HNS policies should be created // with DSR EnableDSR bool `json:"enableDSR"` - // RootHnsEndpointName is the name of hnsendpoint that is attached to - // l2bridge for root network namespace - RootHnsEndpointName string `json:"rootHnsEndpointName"` - // ForwardHealthCheckVip forwards service VIP for health check port on - // Windows - ForwardHealthCheckVip bool `json:"forwardHealthCheckVip"` -} - -// DetectLocalConfiguration contains optional settings related to DetectLocalMode option -type DetectLocalConfiguration struct { - // BridgeInterface is a string argument which represents a single bridge interface name. - // Kube-proxy considers traffic as local if originating from this given bridge. - // This argument should be set if DetectLocalMode is set to LocalModeBridgeInterface. - BridgeInterface string `json:"bridgeInterface"` - // InterfaceNamePrefix is a string argument which represents a single interface prefix name. - // Kube-proxy considers traffic as local if originating from one or more interfaces which match - // the given prefix. This argument should be set if DetectLocalMode is set to LocalModeInterfaceNamePrefix. - InterfaceNamePrefix string `json:"interfaceNamePrefix"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -182,8 +164,6 @@ type KubeProxyConfiguration struct { ShowHiddenMetricsForVersion string `json:"showHiddenMetricsForVersion"` // DetectLocalMode determines mode to use for detecting local traffic, defaults to LocalModeClusterCIDR DetectLocalMode LocalMode `json:"detectLocalMode"` - // DetectLocal contains optional configuration settings related to DetectLocalMode. - DetectLocal DetectLocalConfiguration `json:"detectLocal"` } // ProxyMode represents modes used by the Kubernetes proxy server. diff --git a/cluster-autoscaler/vendor/k8s.io/kube-proxy/config/v1alpha1/zz_generated.deepcopy.go b/cluster-autoscaler/vendor/k8s.io/kube-proxy/config/v1alpha1/zz_generated.deepcopy.go index c7c8b5f8e60c..dafffdaf89cf 100644 --- a/cluster-autoscaler/vendor/k8s.io/kube-proxy/config/v1alpha1/zz_generated.deepcopy.go +++ b/cluster-autoscaler/vendor/k8s.io/kube-proxy/config/v1alpha1/zz_generated.deepcopy.go @@ -26,22 +26,6 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DetectLocalConfiguration) DeepCopyInto(out *DetectLocalConfiguration) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DetectLocalConfiguration. -func (in *DetectLocalConfiguration) DeepCopy() *DetectLocalConfiguration { - if in == nil { - return nil - } - out := new(DetectLocalConfiguration) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *KubeProxyConfiguration) DeepCopyInto(out *KubeProxyConfiguration) { *out = *in @@ -70,7 +54,6 @@ func (in *KubeProxyConfiguration) DeepCopyInto(out *KubeProxyConfiguration) { copy(*out, *in) } out.Winkernel = in.Winkernel - out.DetectLocal = in.DetectLocal return } diff --git a/cluster-autoscaler/vendor/k8s.io/kube-scheduler/config/v1beta2/types.go b/cluster-autoscaler/vendor/k8s.io/kube-scheduler/config/v1beta2/types.go index f561260e974d..d1d1d1a595eb 100644 --- a/cluster-autoscaler/vendor/k8s.io/kube-scheduler/config/v1beta2/types.go +++ b/cluster-autoscaler/vendor/k8s.io/kube-scheduler/config/v1beta2/types.go @@ -100,24 +100,15 @@ type KubeSchedulerConfiguration struct { // DecodeNestedObjects decodes plugin args for known types. func (c *KubeSchedulerConfiguration) DecodeNestedObjects(d runtime.Decoder) error { - var strictDecodingErrs []error for i := range c.Profiles { prof := &c.Profiles[i] for j := range prof.PluginConfig { err := prof.PluginConfig[j].decodeNestedObjects(d) if err != nil { - decodingErr := fmt.Errorf("decoding .profiles[%d].pluginConfig[%d]: %w", i, j, err) - if runtime.IsStrictDecodingError(err) { - strictDecodingErrs = append(strictDecodingErrs, decodingErr) - } else { - return decodingErr - } + return fmt.Errorf("decoding .profiles[%d].pluginConfig[%d]: %w", i, j, err) } } } - if len(strictDecodingErrs) > 0 { - return runtime.NewStrictDecodingError(strictDecodingErrs) - } return nil } @@ -246,21 +237,15 @@ func (c *PluginConfig) decodeNestedObjects(d runtime.Decoder) error { return nil } - var strictDecodingErr error obj, parsedGvk, err := d.Decode(c.Args.Raw, &gvk, nil) if err != nil { - decodingArgsErr := fmt.Errorf("decoding args for plugin %s: %w", c.Name, err) - if obj != nil && runtime.IsStrictDecodingError(err) { - strictDecodingErr = runtime.NewStrictDecodingError([]error{decodingArgsErr}) - } else { - return decodingArgsErr - } + return fmt.Errorf("decoding args for plugin %s: %w", c.Name, err) } if parsedGvk.GroupKind() != gvk.GroupKind() { return fmt.Errorf("args for plugin %s were not of type %s, got %s", c.Name, gvk.GroupKind(), parsedGvk.GroupKind()) } c.Args.Object = obj - return strictDecodingErr + return nil } func (c *PluginConfig) encodeNestedObjects(e runtime.Encoder) error { diff --git a/cluster-autoscaler/vendor/k8s.io/kube-scheduler/config/v1beta2/types_pluginargs.go b/cluster-autoscaler/vendor/k8s.io/kube-scheduler/config/v1beta2/types_pluginargs.go index 3ab964f42002..34768d3c9ab5 100644 --- a/cluster-autoscaler/vendor/k8s.io/kube-scheduler/config/v1beta2/types_pluginargs.go +++ b/cluster-autoscaler/vendor/k8s.io/kube-scheduler/config/v1beta2/types_pluginargs.go @@ -110,7 +110,8 @@ type PodTopologySpreadArgs struct { // Nodes and Zones. // - "List": Use constraints defined in .defaultConstraints. // - // Defaults to "System". + // Defaults to "List" if feature gate DefaultPodTopologySpread is disabled + // and to "System" if enabled. // +optional DefaultingType PodTopologySpreadConstraintsDefaulting `json:"defaultingType,omitempty"` } @@ -191,9 +192,9 @@ type NodeAffinityArgs struct { type ScoringStrategyType string const ( - // LeastAllocated strategy prioritizes nodes with least allocated resources. + // LeastAllocated strategy prioritizes nodes with least allcoated resources. LeastAllocated ScoringStrategyType = "LeastAllocated" - // MostAllocated strategy prioritizes nodes with most allocated resources. + // MostAllocated strategy prioritizes nodes with most allcoated resources. MostAllocated ScoringStrategyType = "MostAllocated" // RequestedToCapacityRatio strategy allows specifying a custom shape function // to score nodes based on the request to capacity ratio. diff --git a/cluster-autoscaler/vendor/k8s.io/kube-scheduler/config/v1beta3/types.go b/cluster-autoscaler/vendor/k8s.io/kube-scheduler/config/v1beta3/types.go index 385109f16e8c..4ab11007c233 100644 --- a/cluster-autoscaler/vendor/k8s.io/kube-scheduler/config/v1beta3/types.go +++ b/cluster-autoscaler/vendor/k8s.io/kube-scheduler/config/v1beta3/types.go @@ -93,24 +93,15 @@ type KubeSchedulerConfiguration struct { // DecodeNestedObjects decodes plugin args for known types. func (c *KubeSchedulerConfiguration) DecodeNestedObjects(d runtime.Decoder) error { - var strictDecodingErrs []error for i := range c.Profiles { prof := &c.Profiles[i] for j := range prof.PluginConfig { err := prof.PluginConfig[j].decodeNestedObjects(d) if err != nil { - decodingErr := fmt.Errorf("decoding .profiles[%d].pluginConfig[%d]: %w", i, j, err) - if runtime.IsStrictDecodingError(err) { - strictDecodingErrs = append(strictDecodingErrs, decodingErr) - } else { - return decodingErr - } + return fmt.Errorf("decoding .profiles[%d].pluginConfig[%d]: %w", i, j, err) } } } - if len(strictDecodingErrs) > 0 { - return runtime.NewStrictDecodingError(strictDecodingErrs) - } return nil } @@ -254,21 +245,15 @@ func (c *PluginConfig) decodeNestedObjects(d runtime.Decoder) error { return nil } - var strictDecodingErr error obj, parsedGvk, err := d.Decode(c.Args.Raw, &gvk, nil) if err != nil { - decodingArgsErr := fmt.Errorf("decoding args for plugin %s: %w", c.Name, err) - if obj != nil && runtime.IsStrictDecodingError(err) { - strictDecodingErr = runtime.NewStrictDecodingError([]error{decodingArgsErr}) - } else { - return decodingArgsErr - } + return fmt.Errorf("decoding args for plugin %s: %w", c.Name, err) } if parsedGvk.GroupKind() != gvk.GroupKind() { return fmt.Errorf("args for plugin %s were not of type %s, got %s", c.Name, gvk.GroupKind(), parsedGvk.GroupKind()) } c.Args.Object = obj - return strictDecodingErr + return nil } func (c *PluginConfig) encodeNestedObjects(e runtime.Encoder) error { diff --git a/cluster-autoscaler/vendor/k8s.io/kube-scheduler/config/v1beta3/types_pluginargs.go b/cluster-autoscaler/vendor/k8s.io/kube-scheduler/config/v1beta3/types_pluginargs.go index 725cd1b92d4d..2c3fa4cbbe0c 100644 --- a/cluster-autoscaler/vendor/k8s.io/kube-scheduler/config/v1beta3/types_pluginargs.go +++ b/cluster-autoscaler/vendor/k8s.io/kube-scheduler/config/v1beta3/types_pluginargs.go @@ -110,7 +110,8 @@ type PodTopologySpreadArgs struct { // Nodes and Zones. // - "List": Use constraints defined in .defaultConstraints. // - // Defaults to "System". + // Defaults to "List" if feature gate DefaultPodTopologySpread is disabled + // and to "System" if enabled. // +optional DefaultingType PodTopologySpreadConstraintsDefaulting `json:"defaultingType,omitempty"` } @@ -191,9 +192,9 @@ type NodeAffinityArgs struct { type ScoringStrategyType string const ( - // LeastAllocated strategy prioritizes nodes with least allocated resources. + // LeastAllocated strategy prioritizes nodes with least allcoated resources. LeastAllocated ScoringStrategyType = "LeastAllocated" - // MostAllocated strategy prioritizes nodes with most allocated resources. + // MostAllocated strategy prioritizes nodes with most allcoated resources. MostAllocated ScoringStrategyType = "MostAllocated" // RequestedToCapacityRatio strategy allows specifying a custom shape function // to score nodes based on the request to capacity ratio. diff --git a/cluster-autoscaler/vendor/k8s.io/kubelet/config/v1alpha1/types.go b/cluster-autoscaler/vendor/k8s.io/kubelet/config/v1alpha1/types.go index 92daa99667e8..e869bc182441 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubelet/config/v1alpha1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/kubelet/config/v1alpha1/types.go @@ -52,9 +52,9 @@ type CredentialProvider struct { // // Each entry in matchImages is a pattern which can optionally contain a port and a path. // Globs can be used in the domain, but not in the port or the path. Globs are supported - // as subdomains like `*.k8s.io` or `k8s.*.io`, and top-level-domains such as `k8s.*`. - // Matching partial subdomains like `app*.k8s.io` is also supported. Each glob can only match - // a single subdomain segment, so `*.io` does not match `*.k8s.io`. + // as subdomains like '*.k8s.io' or 'k8s.*.io', and top-level-domains such as 'k8s.*'. + // Matching partial subdomains like 'app*.k8s.io' is also supported. Each glob can only match + // a single subdomain segment, so *.io does not match *.k8s.io. // // A match exists between an image and a matchImage when all of the below are true: // - Both contain the same number of domain parts and each part matches. @@ -62,11 +62,11 @@ type CredentialProvider struct { // - If the imageMatch contains a port, then the port must match in the image as well. // // Example values of matchImages: - // - `123456789.dkr.ecr.us-east-1.amazonaws.com` - // - `*.azurecr.io` - // - `gcr.io` - // - `*.*.registry.io` - // - `registry.io:8080/path` + // - 123456789.dkr.ecr.us-east-1.amazonaws.com + // - *.azurecr.io + // - gcr.io + // - *.*.registry.io + // - registry.io:8080/path MatchImages []string `json:"matchImages"` // defaultCacheDuration is the default duration the plugin will cache credentials in-memory diff --git a/cluster-autoscaler/vendor/k8s.io/kubelet/config/v1beta1/register.go b/cluster-autoscaler/vendor/k8s.io/kubelet/config/v1beta1/register.go index 22bdfbb4cbaa..914dfb25fa20 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubelet/config/v1beta1/register.go +++ b/cluster-autoscaler/vendor/k8s.io/kubelet/config/v1beta1/register.go @@ -39,7 +39,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &KubeletConfiguration{}, &SerializedNodeConfigSource{}, - &CredentialProviderConfig{}, ) return nil } diff --git a/cluster-autoscaler/vendor/k8s.io/kubelet/config/v1beta1/types.go b/cluster-autoscaler/vendor/k8s.io/kubelet/config/v1beta1/types.go index ef3f33ca6443..223a88576c6f 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubelet/config/v1beta1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/kubelet/config/v1beta1/types.go @@ -90,42 +90,75 @@ type KubeletConfiguration struct { // enableServer enables Kubelet's secured server. // Note: Kubelet's insecure port is controlled by the readOnlyPort option. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may disrupt components that interact with the Kubelet server. // Default: true EnableServer *bool `json:"enableServer,omitempty"` // staticPodPath is the path to the directory containing local (static) pods to // run, or the path to a single static pod file. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // the set of static pods specified at the new path may be different than the + // ones the Kubelet initially started with, and this may disrupt your node. // Default: "" // +optional StaticPodPath string `json:"staticPodPath,omitempty"` // syncFrequency is the max period between synchronizing running // containers and config. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // shortening this duration may have a negative performance impact, especially + // as the number of Pods on the node increases. Alternatively, increasing this + // duration will result in longer refresh times for ConfigMaps and Secrets. // Default: "1m" // +optional SyncFrequency metav1.Duration `json:"syncFrequency,omitempty"` // fileCheckFrequency is the duration between checking config files for // new data. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // shortening the duration will cause the Kubelet to reload local Static Pod + // configurations more frequently, which may have a negative performance impact. // Default: "20s" // +optional FileCheckFrequency metav1.Duration `json:"fileCheckFrequency,omitempty"` // httpCheckFrequency is the duration between checking http for new data. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // shortening the duration will cause the Kubelet to poll staticPodURL more + // frequently, which may have a negative performance impact. // Default: "20s" // +optional HTTPCheckFrequency metav1.Duration `json:"httpCheckFrequency,omitempty"` // staticPodURL is the URL for accessing static pods to run. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // the set of static pods specified at the new URL may be different than the + // ones the Kubelet initially started with, and this may disrupt your node. // Default: "" // +optional StaticPodURL string `json:"staticPodURL,omitempty"` // staticPodURLHeader is a map of slices with HTTP headers to use when accessing the podURL. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may disrupt the ability to read the latest set of static pods from StaticPodURL. // Default: nil // +optional StaticPodURLHeader map[string][]string `json:"staticPodURLHeader,omitempty"` // address is the IP address for the Kubelet to serve on (set to 0.0.0.0 // for all interfaces). + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may disrupt components that interact with the Kubelet server. // Default: "0.0.0.0" // +optional Address string `json:"address,omitempty"` // port is the port for the Kubelet to serve on. // The port number must be between 1 and 65535, inclusive. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may disrupt components that interact with the Kubelet server. // Default: 10250 // +optional Port int32 `json:"port,omitempty"` @@ -133,6 +166,9 @@ type KubeletConfiguration struct { // no authentication/authorization. // The port number must be between 1 and 65535, inclusive. // Setting this field to 0 disables the read-only service. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may disrupt components that interact with the Kubelet server. // Default: 0 (disabled) // +optional ReadOnlyPort int32 `json:"readOnlyPort,omitempty"` @@ -141,26 +177,42 @@ type KubeletConfiguration struct { // tlsPrivateKeyFile are not provided, a self-signed certificate // and key are generated for the public address and saved to the directory // passed to the Kubelet's --cert-dir flag. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may disrupt components that interact with the Kubelet server. // Default: "" // +optional TLSCertFile string `json:"tlsCertFile,omitempty"` // tlsPrivateKeyFile is the file containing x509 private key matching tlsCertFile. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may disrupt components that interact with the Kubelet server. // Default: "" // +optional TLSPrivateKeyFile string `json:"tlsPrivateKeyFile,omitempty"` // tlsCipherSuites is the list of allowed cipher suites for the server. // Values are from tls package constants (https://golang.org/pkg/crypto/tls/#pkg-constants). + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may disrupt components that interact with the Kubelet server. // Default: nil // +optional TLSCipherSuites []string `json:"tlsCipherSuites,omitempty"` // tlsMinVersion is the minimum TLS version supported. // Values are from tls package constants (https://golang.org/pkg/crypto/tls/#pkg-constants). + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may disrupt components that interact with the Kubelet server. // Default: "" // +optional TLSMinVersion string `json:"tlsMinVersion,omitempty"` // rotateCertificates enables client certificate rotation. The Kubelet will request a // new certificate from the certificates.k8s.io API. This requires an approver to approve the // certificate signing requests. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // disabling it may disrupt the Kubelet's ability to authenticate with the API server + // after the current certificate expires. // Default: false // +optional RotateCertificates bool `json:"rotateCertificates,omitempty"` @@ -169,10 +221,18 @@ type KubeletConfiguration struct { // the 'certificates.k8s.io' API. This requires an approver to approve the // certificate signing requests (CSR). The RotateKubeletServerCertificate feature // must be enabled when setting this field. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // disabling it will stop the renewal of Kubelet server certificates, which can + // disrupt components that interact with the Kubelet server in the long term, + // due to certificate expiration. // Default: false // +optional ServerTLSBootstrap bool `json:"serverTLSBootstrap,omitempty"` // authentication specifies how requests to the Kubelet's server are authenticated. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may disrupt components that interact with the Kubelet server. // Defaults: // anonymous: // enabled: false @@ -182,6 +242,9 @@ type KubeletConfiguration struct { // +optional Authentication KubeletAuthentication `json:"authentication"` // authorization specifies how requests to the Kubelet's server are authorized. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may disrupt components that interact with the Kubelet server. // Defaults: // mode: Webhook // webhook: @@ -192,6 +255,10 @@ type KubeletConfiguration struct { // registryPullQPS is the limit of registry pulls per second. // The value must not be a negative number. // Setting it to 0 means no limit. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may impact scalability by changing the amount of traffic produced + // by image pulls. // Default: 5 // +optional RegistryPullQPS *int32 `json:"registryPullQPS,omitempty"` @@ -199,11 +266,19 @@ type KubeletConfiguration struct { // pulls to burst to this number, while still not exceeding registryPullQPS. // The value must not be a negative number. // Only used if registryPullQPS is greater than 0. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may impact scalability by changing the amount of traffic produced + // by image pulls. // Default: 10 // +optional RegistryBurst int32 `json:"registryBurst,omitempty"` // eventRecordQPS is the maximum event creations per second. If 0, there // is no limit enforced. The value cannot be a negative number. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may impact scalability by changing the amount of traffic produced by + // event creations. // Default: 5 // +optional EventRecordQPS *int32 `json:"eventRecordQPS,omitempty"` @@ -211,47 +286,76 @@ type KubeletConfiguration struct { // allows event creations to burst to this number, while still not exceeding // eventRecordQPS. This field canot be a negative number and it is only used // when eventRecordQPS > 0. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may impact scalability by changing the amount of traffic produced by + // event creations. // Default: 10 // +optional EventBurst int32 `json:"eventBurst,omitempty"` // enableDebuggingHandlers enables server endpoints for log access // and local running of containers and commands, including the exec, // attach, logs, and portforward features. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // disabling it may disrupt components that interact with the Kubelet server. // Default: true // +optional EnableDebuggingHandlers *bool `json:"enableDebuggingHandlers,omitempty"` // enableContentionProfiling enables lock contention profiling, if enableDebuggingHandlers is true. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // enabling it may carry a performance impact. // Default: false // +optional EnableContentionProfiling bool `json:"enableContentionProfiling,omitempty"` // healthzPort is the port of the localhost healthz endpoint (set to 0 to disable). // A valid number is between 1 and 65535. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may disrupt components that monitor Kubelet health. // Default: 10248 // +optional HealthzPort *int32 `json:"healthzPort,omitempty"` // healthzBindAddress is the IP address for the healthz server to serve on. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may disrupt components that monitor Kubelet health. // Default: "127.0.0.1" // +optional HealthzBindAddress string `json:"healthzBindAddress,omitempty"` // oomScoreAdj is The oom-score-adj value for kubelet process. Values // must be within the range [-1000, 1000]. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may impact the stability of nodes under memory pressure. // Default: -999 // +optional OOMScoreAdj *int32 `json:"oomScoreAdj,omitempty"` // clusterDomain is the DNS domain for this cluster. If set, kubelet will // configure all containers to search this domain in addition to the // host's search domains. + // Dynamic Kubelet Config (deprecated): Dynamically updating this field is not recommended, + // as it should be kept in sync with the rest of the cluster. // Default: "" // +optional ClusterDomain string `json:"clusterDomain,omitempty"` // clusterDNS is a list of IP addresses for the cluster DNS server. If set, // kubelet will configure all containers to use this for DNS resolution // instead of the host's DNS servers. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // changes will only take effect on Pods created after the update. Draining + // the node is recommended before changing this field. // Default: nil // +optional ClusterDNS []string `json:"clusterDNS,omitempty"` // streamingConnectionIdleTimeout is the maximum time a streaming connection // can be idle before the connection is automatically closed. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may impact components that rely on infrequent updates over streaming + // connections to the Kubelet server. // Default: "4h" // +optional StreamingConnectionIdleTimeout metav1.Duration `json:"streamingConnectionIdleTimeout,omitempty"` @@ -260,6 +364,12 @@ type KubeletConfiguration struct { // kubelet posts node status to master. // Note: When node lease feature is not enabled, be cautious when changing the // constant, it must work with nodeMonitorGracePeriod in nodecontroller. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may impact node scalability, and also that the node controller's + // nodeMonitorGracePeriod must be set to N*NodeStatusUpdateFrequency, + // where N is the number of retries before the node controller marks + // the node unhealthy. // Default: "10s" // +optional NodeStatusUpdateFrequency metav1.Duration `json:"nodeStatusUpdateFrequency,omitempty"` @@ -280,11 +390,17 @@ type KubeletConfiguration struct { // The lease is currently renewed every 10s, per KEP-0009. In the future, the lease renewal // interval may be set based on the lease duration. // The field value must be greater than 0. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // decreasing the duration may reduce tolerance for issues that temporarily prevent + // the Kubelet from renewing the lease (e.g. a short-lived network issue). // Default: 40 // +optional NodeLeaseDurationSeconds int32 `json:"nodeLeaseDurationSeconds,omitempty"` // imageMinimumGCAge is the minimum age for an unused image before it is - // garbage collected. + // garbage collected. If DynamicKubeletConfig (deprecated; default off) + // is on, when dynamically updating this field, consider that it may trigger or + // delay garbage collection, and may change the image overhead on the node. // Default: "2m" // +optional ImageMinimumGCAge metav1.Duration `json:"imageMinimumGCAge,omitempty"` @@ -293,6 +409,10 @@ type KubeletConfiguration struct { // dividing this field value by 100, so this field must be between 0 and // 100, inclusive. When specified, the value must be greater than // imageGCLowThresholdPercent. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may trigger or delay garbage collection, and may change the image overhead + // on the node. // Default: 85 // +optional ImageGCHighThresholdPercent *int32 `json:"imageGCHighThresholdPercent,omitempty"` @@ -301,15 +421,24 @@ type KubeletConfiguration struct { // collect to. The percent is calculated by dividing this field value by 100, // so the field value must be between 0 and 100, inclusive. When specified, the // value must be less than imageGCHighThresholdPercent. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may trigger or delay garbage collection, and may change the image overhead + // on the node. // Default: 80 // +optional ImageGCLowThresholdPercent *int32 `json:"imageGCLowThresholdPercent,omitempty"` // volumeStatsAggPeriod is the frequency for calculating and caching volume // disk usage for all pods. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // shortening the period may carry a performance impact. // Default: "1m" // +optional VolumeStatsAggPeriod metav1.Duration `json:"volumeStatsAggPeriod,omitempty"` // kubeletCgroups is the absolute name of cgroups to isolate the kubelet in + // Dynamic Kubelet Config (deprecated): This field should not be updated without a full node + // reboot. It is safest to keep this value the same as the local config. // Default: "" // +optional KubeletCgroups string `json:"kubeletCgroups,omitempty"` @@ -317,42 +446,60 @@ type KubeletConfiguration struct { // all non-kernel processes that are not already in a container. Empty // for no container. Rolling back the flag requires a reboot. // The cgroupRoot must be specified if this field is not empty. + // Dynamic Kubelet Config (deprecated): This field should not be updated without a full node + // reboot. It is safest to keep this value the same as the local config. // Default: "" // +optional SystemCgroups string `json:"systemCgroups,omitempty"` // cgroupRoot is the root cgroup to use for pods. This is handled by the // container runtime on a best effort basis. + // Dynamic Kubelet Config (deprecated): This field should not be updated without a full node + // reboot. It is safest to keep this value the same as the local config. + // Default: "" // +optional CgroupRoot string `json:"cgroupRoot,omitempty"` // cgroupsPerQOS enable QoS based CGroup hierarchy: top level CGroups for QoS classes // and all Burstable and BestEffort Pods are brought up under their specific top level // QoS CGroup. + // Dynamic Kubelet Config (deprecated): This field should not be updated without a full node + // reboot. It is safest to keep this value the same as the local config. // Default: true // +optional CgroupsPerQOS *bool `json:"cgroupsPerQOS,omitempty"` // cgroupDriver is the driver kubelet uses to manipulate CGroups on the host (cgroupfs // or systemd). + // Dynamic Kubelet Config (deprecated): This field should not be updated without a full node + // reboot. It is safest to keep this value the same as the local config. // Default: "cgroupfs" // +optional CgroupDriver string `json:"cgroupDriver,omitempty"` // cpuManagerPolicy is the name of the policy to use. // Requires the CPUManager feature gate to be enabled. + // Dynamic Kubelet Config (deprecated): This field should not be updated without a full node + // reboot. It is safest to keep this value the same as the local config. // Default: "None" // +optional CPUManagerPolicy string `json:"cpuManagerPolicy,omitempty"` // cpuManagerPolicyOptions is a set of key=value which allows to set extra options // to fine tune the behaviour of the cpu manager policies. // Requires both the "CPUManager" and "CPUManagerPolicyOptions" feature gates to be enabled. + // Dynamic Kubelet Config (beta): This field should not be updated without a full node + // reboot. It is safest to keep this value the same as the local config. // Default: nil // +optional CPUManagerPolicyOptions map[string]string `json:"cpuManagerPolicyOptions,omitempty"` // cpuManagerReconcilePeriod is the reconciliation period for the CPU Manager. // Requires the CPUManager feature gate to be enabled. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // shortening the period may carry a performance impact. // Default: "10s" // +optional CPUManagerReconcilePeriod metav1.Duration `json:"cpuManagerReconcilePeriod,omitempty"` // memoryManagerPolicy is the name of the policy to use by memory manager. // Requires the MemoryManager feature gate to be enabled. + // Dynamic Kubelet Config (deprecated): This field should not be updated without a full node + // reboot. It is safest to keep this value the same as the local config. // Default: "none" // +optional MemoryManagerPolicy string `json:"memoryManagerPolicy,omitempty"` @@ -368,6 +515,8 @@ type KubeletConfiguration struct { // of CPU and device resources. // // Policies other than "none" require the TopologyManager feature gate to be enabled. + // Dynamic Kubelet Config (deprecated): This field should not be updated without a full node + // reboot. It is safest to keep this value the same as the local config. // Default: "none" // +optional TopologyManagerPolicy string `json:"topologyManagerPolicy,omitempty"` @@ -386,11 +535,16 @@ type KubeletConfiguration struct { // guaranteed QoS tier. // Currently supported resources: "memory" // Requires the QOSReserved feature gate to be enabled. + // Dynamic Kubelet Config (deprecated): This field should not be updated without a full node + // reboot. It is safest to keep this value the same as the local config. // Default: nil // +optional QOSReserved map[string]string `json:"qosReserved,omitempty"` // runtimeRequestTimeout is the timeout for all runtime requests except long running // requests - pull, logs, exec and attach. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may disrupt components that interact with the Kubelet server. // Default: "2m" // +optional RuntimeRequestTimeout metav1.Duration `json:"runtimeRequestTimeout,omitempty"` @@ -405,25 +559,43 @@ type KubeletConfiguration struct { // // Generally, one must set `--hairpin-mode=hairpin-veth to` achieve hairpin NAT, // because promiscuous-bridge assumes the existence of a container bridge named cbr0. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may require a node reboot, depending on the network plugin. // Default: "promiscuous-bridge" // +optional HairpinMode string `json:"hairpinMode,omitempty"` // maxPods is the maximum number of Pods that can run on this Kubelet. // The value must be a non-negative integer. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // changes may cause Pods to fail admission on Kubelet restart, and may change + // the value reported in Node.Status.Capacity[v1.ResourcePods], thus affecting + // future scheduling decisions. Increasing this value may also decrease performance, + // as more Pods can be packed into a single node. // Default: 110 // +optional MaxPods int32 `json:"maxPods,omitempty"` // podCIDR is the CIDR to use for pod IP addresses, only used in standalone mode. // In cluster mode, this is obtained from the control plane. + // Dynamic Kubelet Config (deprecated): This field should always be set to the empty default. + // It should only set for standalone Kubelets, which cannot use Dynamic Kubelet Config. // Default: "" // +optional PodCIDR string `json:"podCIDR,omitempty"` // podPidsLimit is the maximum number of PIDs in any pod. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // lowering it may prevent container processes from forking after the change. // Default: -1 // +optional PodPidsLimit *int64 `json:"podPidsLimit,omitempty"` // resolvConf is the resolver configuration file used as the basis // for the container DNS resolution configuration. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // changes will only take effect on Pods created after the update. Draining + // the node is recommended before changing this field. // If set to the empty string, will override the default and effectively disable DNS lookups. // Default: "/etc/resolv.conf" // +optional @@ -435,36 +607,62 @@ type KubeletConfiguration struct { RunOnce bool `json:"runOnce,omitempty"` // cpuCFSQuota enables CPU CFS quota enforcement for containers that // specify CPU limits. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // disabling it may reduce node stability. // Default: true // +optional CPUCFSQuota *bool `json:"cpuCFSQuota,omitempty"` // cpuCFSQuotaPeriod is the CPU CFS quota period value, `cpu.cfs_period_us`. // The value must be between 1 us and 1 second, inclusive. // Requires the CustomCPUCFSQuotaPeriod feature gate to be enabled. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // limits set for containers will result in different cpu.cfs_quota settings. This + // will trigger container restarts on the node being reconfigured. // Default: "100ms" // +optional CPUCFSQuotaPeriod *metav1.Duration `json:"cpuCFSQuotaPeriod,omitempty"` // nodeStatusMaxImages caps the number of images reported in Node.status.images. // The value must be greater than -2. // Note: If -1 is specified, no cap will be applied. If 0 is specified, no image is returned. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // different values can be reported on node status. // Default: 50 // +optional NodeStatusMaxImages *int32 `json:"nodeStatusMaxImages,omitempty"` // maxOpenFiles is Number of files that can be opened by Kubelet process. // The value must be a non-negative number. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may impact the ability of the Kubelet to interact with the node's filesystem. // Default: 1000000 // +optional MaxOpenFiles int64 `json:"maxOpenFiles,omitempty"` // contentType is contentType of requests sent to apiserver. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may impact the ability for the Kubelet to communicate with the API server. + // If the Kubelet loses contact with the API server due to a change to this field, + // the change cannot be reverted via dynamic Kubelet config. // Default: "application/vnd.kubernetes.protobuf" // +optional ContentType string `json:"contentType,omitempty"` // kubeAPIQPS is the QPS to use while talking with kubernetes apiserver. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may impact scalability by changing the amount of traffic the Kubelet + // sends to the API server. // Default: 5 // +optional KubeAPIQPS *int32 `json:"kubeAPIQPS,omitempty"` // kubeAPIBurst is the burst to allow while talking with kubernetes API server. // This field cannot be a negative number. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may impact scalability by changing the amount of traffic the Kubelet + // sends to the API server. // Default: 10 // +optional KubeAPIBurst int32 `json:"kubeAPIBurst,omitempty"` @@ -472,12 +670,18 @@ type KubeletConfiguration struct { // at a time. We recommend *not* changing the default value on nodes that // run docker daemon with version < 1.9 or an Aufs storage backend. // Issue #10959 has more details. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may impact the performance of image pulls. // Default: true // +optional SerializeImagePulls *bool `json:"serializeImagePulls,omitempty"` // evictionHard is a map of signal names to quantities that defines hard eviction // thresholds. For example: `{"memory.available": "300Mi"}`. // To explicitly disable, pass a 0% or 100% threshold on an arbitrary resource. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may trigger or delay Pod evictions. // Default: // memory.available: "100Mi" // nodefs.available: "10%" @@ -487,16 +691,26 @@ type KubeletConfiguration struct { EvictionHard map[string]string `json:"evictionHard,omitempty"` // evictionSoft is a map of signal names to quantities that defines soft eviction thresholds. // For example: `{"memory.available": "300Mi"}`. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may trigger or delay Pod evictions, and may change the allocatable reported + // by the node. // Default: nil // +optional EvictionSoft map[string]string `json:"evictionSoft,omitempty"` // evictionSoftGracePeriod is a map of signal names to quantities that defines grace // periods for each soft eviction signal. For example: `{"memory.available": "30s"}`. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may trigger or delay Pod evictions. // Default: nil // +optional EvictionSoftGracePeriod map[string]string `json:"evictionSoftGracePeriod,omitempty"` // evictionPressureTransitionPeriod is the duration for which the kubelet has to wait // before transitioning out of an eviction pressure condition. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // lowering it may decrease the stability of the node when the node is overcommitted. // Default: "5m" // +optional EvictionPressureTransitionPeriod metav1.Duration `json:"evictionPressureTransitionPeriod,omitempty"` @@ -506,6 +720,10 @@ type KubeletConfiguration struct { // Note: Due to issue #64530, the behavior has a bug where this value currently just // overrides the grace period during soft eviction, which can increase the grace // period from what is set on the Pod. This bug will be fixed in a future release. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // lowering it decreases the amount of time Pods will have to gracefully clean + // up before being killed during a soft eviction. // Default: 0 // +optional EvictionMaxPodGracePeriod int32 `json:"evictionMaxPodGracePeriod,omitempty"` @@ -513,26 +731,44 @@ type KubeletConfiguration struct { // which describe the minimum amount of a given resource the kubelet will reclaim when // performing a pod eviction while that resource is under pressure. // For example: `{"imagefs.available": "2Gi"}`. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may change how well eviction can manage resource pressure. // Default: nil // +optional EvictionMinimumReclaim map[string]string `json:"evictionMinimumReclaim,omitempty"` // podsPerCore is the maximum number of pods per core. Cannot exceed maxPods. // The value must be a non-negative integer. // If 0, there is no limit on the number of Pods. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // changes may cause Pods to fail admission on Kubelet restart, and may change + // the value reported in `Node.status.capacity.pods`, thus affecting + // future scheduling decisions. Increasing this value may also decrease performance, + // as more Pods can be packed into a single node. // Default: 0 // +optional PodsPerCore int32 `json:"podsPerCore,omitempty"` // enableControllerAttachDetach enables the Attach/Detach controller to // manage attachment/detachment of volumes scheduled to this node, and // disables kubelet from executing any attach/detach operations. - // Note: attaching/detaching CSI volumes is not supported by the kubelet, - // so this option needs to be true for that use case. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // changing which component is responsible for volume management on a live node + // may result in volumes refusing to detach if the node is not drained prior to + // the update, and if Pods are scheduled to the node before the + // volumes.kubernetes.io/controller-managed-attach-detach annotation is updated by the + // Kubelet. In general, it is safest to leave this value set the same as local config. // Default: true // +optional EnableControllerAttachDetach *bool `json:"enableControllerAttachDetach,omitempty"` // protectKernelDefaults, if true, causes the Kubelet to error if kernel // flags are not as it expects. Otherwise the Kubelet will attempt to modify // kernel flags to match its expectation. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // enabling it may cause the Kubelet to crash-loop if the Kernel is not configured as + // Kubelet expects. // Default: false // +optional ProtectKernelDefaults bool `json:"protectKernelDefaults,omitempty"` @@ -540,6 +776,9 @@ type KubeletConfiguration struct { // are present on host. // These rules will serve as utility rules for various components, e.g. kube-proxy. // The rules will be created based on iptablesMasqueradeBit and iptablesDropBit. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // disabling it will prevent the Kubelet from healing locally misconfigured iptables rules. // Default: true // +optional MakeIPTablesUtilChains *bool `json:"makeIPTablesUtilChains,omitempty"` @@ -547,21 +786,38 @@ type KubeletConfiguration struct { // Values must be within the range [0, 31]. Must be different from other mark bits. // Warning: Please match the value of the corresponding parameter in kube-proxy. // TODO: clean up IPTablesMasqueradeBit in kube-proxy. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it needs to be coordinated with other components, like kube-proxy, and the update + // will only be effective if MakeIPTablesUtilChains is enabled. // Default: 14 // +optional IPTablesMasqueradeBit *int32 `json:"iptablesMasqueradeBit,omitempty"` // iptablesDropBit is the bit of the iptables fwmark space to mark for dropping packets. // Values must be within the range [0, 31]. Must be different from other mark bits. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it needs to be coordinated with other components, like kube-proxy, and the update + // will only be effective if MakeIPTablesUtilChains is enabled. // Default: 15 // +optional IPTablesDropBit *int32 `json:"iptablesDropBit,omitempty"` // featureGates is a map of feature names to bools that enable or disable experimental // features. This field modifies piecemeal the built-in default values from // "k8s.io/kubernetes/pkg/features/kube_features.go". + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider the + // documentation for the features you are enabling or disabling. While we + // encourage feature developers to make it possible to dynamically enable + // and disable features, some changes may require node reboots, and some + // features may require careful coordination to retroactively disable. // Default: nil // +optional FeatureGates map[string]bool `json:"featureGates,omitempty"` // failSwapOn tells the Kubelet to fail to start if swap is enabled on the node. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // setting it to true will cause the Kubelet to crash-loop if swap is enabled. // Default: true // +optional FailSwapOn *bool `json:"failSwapOn,omitempty"` @@ -571,11 +827,17 @@ type KubeletConfiguration struct { MemorySwap MemorySwapConfiguration `json:"memorySwap,omitempty"` // containerLogMaxSize is a quantity defining the maximum size of the container log // file before it is rotated. For example: "5Mi" or "256Ki". + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may trigger log rotation. // Default: "10Mi" // +optional ContainerLogMaxSize string `json:"containerLogMaxSize,omitempty"` // containerLogMaxFiles specifies the maximum number of container log files that can // be present for a container. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // lowering it may cause log files to be deleted. // Default: 5 // +optional ContainerLogMaxFiles *int32 `json:"containerLogMaxFiles,omitempty"` @@ -596,6 +858,11 @@ type KubeletConfiguration struct { // pairs that describe resources reserved for non-kubernetes components. // Currently only cpu and memory are supported. // See http://kubernetes.io/docs/user-guide/compute-resources for more detail. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may not be possible to increase the reserved resources, because this + // requires resizing cgroups. Always look for a NodeAllocatableEnforced event + // after updating this field to ensure that the update was successful. // Default: nil // +optional SystemReserved map[string]string `json:"systemReserved,omitempty"` @@ -604,6 +871,11 @@ type KubeletConfiguration struct { // Currently cpu, memory and local storage for root file system are supported. // See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ // for more details. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may not be possible to increase the reserved resources, because this + // requires resizing cgroups. Always look for a NodeAllocatableEnforced event + // after updating this field to ensure that the update was successful. // Default: nil // +optional KubeReserved map[string]string `json:"kubeReserved,omitempty"` @@ -626,6 +898,8 @@ type KubeletConfiguration struct { // to enforce `systemReserved` compute resource reservation for OS system daemons. // Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node/node-allocatable.md) // doc for more information. + // Dynamic Kubelet Config (deprecated): This field should not be updated without a full node + // reboot. It is safest to keep this value the same as the local config. // Default: "" // +optional SystemReservedCgroup string `json:"systemReservedCgroup,omitempty"` @@ -633,6 +907,8 @@ type KubeletConfiguration struct { // to enforce `KubeReserved` compute resource reservation for Kubernetes node system daemons. // Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node/node-allocatable.md) // doc for more information. + // Dynamic Kubelet Config (deprecated): This field should not be updated without a full node + // reboot. It is safest to keep this value the same as the local config. // Default: "" // +optional KubeReservedCgroup string `json:"kubeReservedCgroup,omitempty"` @@ -645,6 +921,13 @@ type KubeletConfiguration struct { // This field is supported only when `cgroupsPerQOS` is set to true. // Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node/node-allocatable.md) // for more information. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // removing enforcements may reduce the stability of the node. Alternatively, adding + // enforcements may reduce the stability of components which were using more than + // the reserved amount of resources; for example, enforcing kube-reserved may cause + // Kubelets to OOM if it uses more than the reserved resources, and enforcing system-reserved + // may cause system daemons to OOM if they use more than the reserved resources. // Default: ["pods"] // +optional EnforceNodeAllocatable []string `json:"enforceNodeAllocatable,omitempty"` @@ -656,17 +939,26 @@ type KubeletConfiguration struct { AllowedUnsafeSysctls []string `json:"allowedUnsafeSysctls,omitempty"` // volumePluginDir is the full path of the directory in which to search // for additional third party volume plugins. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that changing + // the volumePluginDir may disrupt workloads relying on third party volume plugins. // Default: "/usr/libexec/kubernetes/kubelet-plugins/volume/exec/" // +optional VolumePluginDir string `json:"volumePluginDir,omitempty"` // providerID, if set, sets the unique ID of the instance that an external // provider (i.e. cloudprovider) can use to identify a specific node. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may impact the ability of the Kubelet to interact with cloud providers. // Default: "" // +optional ProviderID string `json:"providerID,omitempty"` // kernelMemcgNotification, if set, instructs the the kubelet to integrate with the // kernel memcg notification for determining if memory eviction thresholds are // exceeded rather than polling. + // If DynamicKubeletConfig (deprecated; default off) is on, when + // dynamically updating this field, consider that + // it may impact the way Kubelet interacts with the kernel. // Default: false // +optional KernelMemcgNotification bool `json:"kernelMemcgNotification,omitempty"` @@ -889,79 +1181,3 @@ type MemorySwapConfiguration struct { // +optional SwapBehavior string `json:"swapBehavior,omitempty"` } - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CredentialProviderConfig is the configuration containing information about -// each exec credential provider. Kubelet reads this configuration from disk and enables -// each provider as specified by the CredentialProvider type. -type CredentialProviderConfig struct { - metav1.TypeMeta `json:",inline"` - - // providers is a list of credential provider plugins that will be enabled by the kubelet. - // Multiple providers may match against a single image, in which case credentials - // from all providers will be returned to the kubelet. If multiple providers are called - // for a single image, the results are combined. If providers return overlapping - // auth keys, the value from the provider earlier in this list is used. - Providers []CredentialProvider `json:"providers"` -} - -// CredentialProvider represents an exec plugin to be invoked by the kubelet. The plugin is only -// invoked when an image being pulled matches the images handled by the plugin (see matchImages). -type CredentialProvider struct { - // name is the required name of the credential provider. It must match the name of the - // provider executable as seen by the kubelet. The executable must be in the kubelet's - // bin directory (set by the --image-credential-provider-bin-dir flag). - Name string `json:"name"` - - // matchImages is a required list of strings used to match against images in order to - // determine if this provider should be invoked. If one of the strings matches the - // requested image from the kubelet, the plugin will be invoked and given a chance - // to provide credentials. Images are expected to contain the registry domain - // and URL path. - // - // Each entry in matchImages is a pattern which can optionally contain a port and a path. - // Globs can be used in the domain, but not in the port or the path. Globs are supported - // as subdomains like '*.k8s.io' or 'k8s.*.io', and top-level-domains such as 'k8s.*'. - // Matching partial subdomains like 'app*.k8s.io' is also supported. Each glob can only match - // a single subdomain segment, so *.io does not match *.k8s.io. - // - // A match exists between an image and a matchImage when all of the below are true: - // - Both contain the same number of domain parts and each part matches. - // - The URL path of an imageMatch must be a prefix of the target image URL path. - // - If the imageMatch contains a port, then the port must match in the image as well. - // - // Example values of matchImages: - // - 123456789.dkr.ecr.us-east-1.amazonaws.com - // - *.azurecr.io - // - gcr.io - // - *.*.registry.io - // - registry.io:8080/path - MatchImages []string `json:"matchImages"` - - // defaultCacheDuration is the default duration the plugin will cache credentials in-memory - // if a cache duration is not provided in the plugin response. This field is required. - DefaultCacheDuration *metav1.Duration `json:"defaultCacheDuration"` - - // Required input version of the exec CredentialProviderRequest. The returned CredentialProviderResponse - // MUST use the same encoding version as the input. Current supported values are: - // - credentialprovider.kubelet.k8s.io/v1beta1 - APIVersion string `json:"apiVersion"` - - // Arguments to pass to the command when executing it. - // +optional - Args []string `json:"args,omitempty"` - - // Env defines additional environment variables to expose to the process. These - // are unioned with the host's environment, as well as variables client-go uses - // to pass argument to the plugin. - // +optional - Env []ExecEnvVar `json:"env,omitempty"` -} - -// ExecEnvVar is used for setting environment variables when executing an exec-based -// credential plugin. -type ExecEnvVar struct { - Name string `json:"name"` - Value string `json:"value"` -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubelet/config/v1beta1/zz_generated.deepcopy.go b/cluster-autoscaler/vendor/k8s.io/kubelet/config/v1beta1/zz_generated.deepcopy.go index ccb8fbbafbdd..777c05885050 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubelet/config/v1beta1/zz_generated.deepcopy.go +++ b/cluster-autoscaler/vendor/k8s.io/kubelet/config/v1beta1/zz_generated.deepcopy.go @@ -27,90 +27,6 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialProvider) DeepCopyInto(out *CredentialProvider) { - *out = *in - if in.MatchImages != nil { - in, out := &in.MatchImages, &out.MatchImages - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.DefaultCacheDuration != nil { - in, out := &in.DefaultCacheDuration, &out.DefaultCacheDuration - *out = new(v1.Duration) - **out = **in - } - if in.Args != nil { - in, out := &in.Args, &out.Args - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]ExecEnvVar, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialProvider. -func (in *CredentialProvider) DeepCopy() *CredentialProvider { - if in == nil { - return nil - } - out := new(CredentialProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialProviderConfig) DeepCopyInto(out *CredentialProviderConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.Providers != nil { - in, out := &in.Providers, &out.Providers - *out = make([]CredentialProvider, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialProviderConfig. -func (in *CredentialProviderConfig) DeepCopy() *CredentialProviderConfig { - if in == nil { - return nil - } - out := new(CredentialProviderConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CredentialProviderConfig) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExecEnvVar) DeepCopyInto(out *ExecEnvVar) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecEnvVar. -func (in *ExecEnvVar) DeepCopy() *ExecEnvVar { - if in == nil { - return nil - } - out := new(ExecEnvVar) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *KubeletAnonymousAuthentication) DeepCopyInto(out *KubeletAnonymousAuthentication) { *out = *in diff --git a/cluster-autoscaler/vendor/k8s.io/kubelet/pkg/apis/credentialprovider/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubelet/pkg/apis/credentialprovider/OWNERS index 06f37beb609a..b74b7dda04aa 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubelet/pkg/apis/credentialprovider/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubelet/pkg/apis/credentialprovider/OWNERS @@ -4,7 +4,7 @@ options: no_parent_owners: true approvers: - - api-approvers +- api-approvers reviewers: - - sig-node-api-reviewers - - sig-auth-api-reviewers +- sig-node-api-reviewers +- sig-auth-api-reviewers diff --git a/cluster-autoscaler/vendor/k8s.io/kubelet/pkg/apis/credentialprovider/install/install.go b/cluster-autoscaler/vendor/k8s.io/kubelet/pkg/apis/credentialprovider/install/install.go index f3f8b1dfa3ca..df5225a870b9 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubelet/pkg/apis/credentialprovider/install/install.go +++ b/cluster-autoscaler/vendor/k8s.io/kubelet/pkg/apis/credentialprovider/install/install.go @@ -21,7 +21,6 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/kubelet/pkg/apis/credentialprovider" "k8s.io/kubelet/pkg/apis/credentialprovider/v1alpha1" - "k8s.io/kubelet/pkg/apis/credentialprovider/v1beta1" ) // Install registers the credentialprovider.kubelet.k8s.io APIs into the given scheme. @@ -29,6 +28,4 @@ func Install(scheme *runtime.Scheme) { utilruntime.Must(credentialprovider.AddToScheme(scheme)) utilruntime.Must(v1alpha1.AddToScheme(scheme)) utilruntime.Must(scheme.SetVersionPriority(v1alpha1.SchemeGroupVersion)) - utilruntime.Must(v1beta1.AddToScheme(scheme)) - utilruntime.Must(scheme.SetVersionPriority(v1beta1.SchemeGroupVersion)) } diff --git a/cluster-autoscaler/vendor/k8s.io/kubelet/pkg/apis/credentialprovider/v1beta1/types.go b/cluster-autoscaler/vendor/k8s.io/kubelet/pkg/apis/credentialprovider/v1beta1/types.go deleted file mode 100644 index 2bc37ce92946..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kubelet/pkg/apis/credentialprovider/v1beta1/types.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1beta1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CredentialProviderRequest includes the image that the kubelet requires authentication for. -// Kubelet will pass this request object to the plugin via stdin. In general, plugins should -// prefer responding with the same apiVersion they were sent. -type CredentialProviderRequest struct { - metav1.TypeMeta `json:",inline"` - - // image is the container image that is being pulled as part of the - // credential provider plugin request. Plugins may optionally parse the image - // to extract any information required to fetch credentials. - Image string `json:"image"` -} - -type PluginCacheKeyType string - -const ( - // ImagePluginCacheKeyType means the kubelet will cache credentials on a per-image basis, - // using the image passed from the kubelet directly as the cache key. This includes - // the registry domain, port (if specified), and path but does not include tags or SHAs. - ImagePluginCacheKeyType PluginCacheKeyType = "Image" - // RegistryPluginCacheKeyType means the kubelet will cache credentials on a per-registry basis. - // The cache key will be based on the registry domain and port (if present) parsed from the requested image. - RegistryPluginCacheKeyType PluginCacheKeyType = "Registry" - // GlobalPluginCacheKeyType means the kubelet will cache credentials for all images that - // match for a given plugin. This cache key should only be returned by plugins that do not use - // the image input at all. - GlobalPluginCacheKeyType PluginCacheKeyType = "Global" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CredentialProviderResponse holds credentials that the kubelet should use for the specified -// image provided in the original request. Kubelet will read the response from the plugin via stdout. -// This response should be set to the same apiVersion as CredentialProviderRequest. -type CredentialProviderResponse struct { - metav1.TypeMeta `json:",inline"` - - // cacheKeyType indiciates the type of caching key to use based on the image provided - // in the request. There are three valid values for the cache key type: Image, Registry, and - // Global. If an invalid value is specified, the response will NOT be used by the kubelet. - CacheKeyType PluginCacheKeyType `json:"cacheKeyType"` - - // cacheDuration indicates the duration the provided credentials should be cached for. - // The kubelet will use this field to set the in-memory cache duration for credentials - // in the AuthConfig. If null, the kubelet will use defaultCacheDuration provided in - // CredentialProviderConfig. If set to 0, the kubelet will not cache the provided AuthConfig. - // +optional - CacheDuration *metav1.Duration `json:"cacheDuration,omitempty"` - - // auth is a map containing authentication information passed into the kubelet. - // Each key is a match image string (more on this below). The corresponding authConfig value - // should be valid for all images that match against this key. A plugin should set - // this field to null if no valid credentials can be returned for the requested image. - // - // Each key in the map is a pattern which can optionally contain a port and a path. - // Globs can be used in the domain, but not in the port or the path. Globs are supported - // as subdomains like '*.k8s.io' or 'k8s.*.io', and top-level-domains such as 'k8s.*'. - // Matching partial subdomains like 'app*.k8s.io' is also supported. Each glob can only match - // a single subdomain segment, so *.io does not match *.k8s.io. - // - // The kubelet will match images against the key when all of the below are true: - // - Both contain the same number of domain parts and each part matches. - // - The URL path of an imageMatch must be a prefix of the target image URL path. - // - If the imageMatch contains a port, then the port must match in the image as well. - // - // When multiple keys are returned, the kubelet will traverse all keys in reverse order so that: - // - longer keys come before shorter keys with the same prefix - // - non-wildcard keys come before wildcard keys with the same prefix. - // - // For any given match, the kubelet will attempt an image pull with the provided credentials, - // stopping after the first successfully authenticated pull. - // - // Example keys: - // - 123456789.dkr.ecr.us-east-1.amazonaws.com - // - *.azurecr.io - // - gcr.io - // - *.*.registry.io - // - registry.io:8080/path - // +optional - Auth map[string]AuthConfig `json:"auth,omitempty"` -} - -// AuthConfig contains authentication information for a container registry. -// Only username/password based authentication is supported today, but more authentication -// mechanisms may be added in the future. -type AuthConfig struct { - // username is the username used for authenticating to the container registry - // An empty username is valid. - Username string `json:"username"` - - // password is the password used for authenticating to the container registry - // An empty password is valid. - Password string `json:"password"` -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubelet/pkg/apis/credentialprovider/v1beta1/zz_generated.conversion.go b/cluster-autoscaler/vendor/k8s.io/kubelet/pkg/apis/credentialprovider/v1beta1/zz_generated.conversion.go deleted file mode 100644 index 1991aab6dde0..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kubelet/pkg/apis/credentialprovider/v1beta1/zz_generated.conversion.go +++ /dev/null @@ -1,137 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1beta1 - -import ( - unsafe "unsafe" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - credentialprovider "k8s.io/kubelet/pkg/apis/credentialprovider" -) - -func init() { - localSchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*AuthConfig)(nil), (*credentialprovider.AuthConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_AuthConfig_To_credentialprovider_AuthConfig(a.(*AuthConfig), b.(*credentialprovider.AuthConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*credentialprovider.AuthConfig)(nil), (*AuthConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_credentialprovider_AuthConfig_To_v1beta1_AuthConfig(a.(*credentialprovider.AuthConfig), b.(*AuthConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CredentialProviderRequest)(nil), (*credentialprovider.CredentialProviderRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CredentialProviderRequest_To_credentialprovider_CredentialProviderRequest(a.(*CredentialProviderRequest), b.(*credentialprovider.CredentialProviderRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*credentialprovider.CredentialProviderRequest)(nil), (*CredentialProviderRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_credentialprovider_CredentialProviderRequest_To_v1beta1_CredentialProviderRequest(a.(*credentialprovider.CredentialProviderRequest), b.(*CredentialProviderRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CredentialProviderResponse)(nil), (*credentialprovider.CredentialProviderResponse)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CredentialProviderResponse_To_credentialprovider_CredentialProviderResponse(a.(*CredentialProviderResponse), b.(*credentialprovider.CredentialProviderResponse), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*credentialprovider.CredentialProviderResponse)(nil), (*CredentialProviderResponse)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_credentialprovider_CredentialProviderResponse_To_v1beta1_CredentialProviderResponse(a.(*credentialprovider.CredentialProviderResponse), b.(*CredentialProviderResponse), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1beta1_AuthConfig_To_credentialprovider_AuthConfig(in *AuthConfig, out *credentialprovider.AuthConfig, s conversion.Scope) error { - out.Username = in.Username - out.Password = in.Password - return nil -} - -// Convert_v1beta1_AuthConfig_To_credentialprovider_AuthConfig is an autogenerated conversion function. -func Convert_v1beta1_AuthConfig_To_credentialprovider_AuthConfig(in *AuthConfig, out *credentialprovider.AuthConfig, s conversion.Scope) error { - return autoConvert_v1beta1_AuthConfig_To_credentialprovider_AuthConfig(in, out, s) -} - -func autoConvert_credentialprovider_AuthConfig_To_v1beta1_AuthConfig(in *credentialprovider.AuthConfig, out *AuthConfig, s conversion.Scope) error { - out.Username = in.Username - out.Password = in.Password - return nil -} - -// Convert_credentialprovider_AuthConfig_To_v1beta1_AuthConfig is an autogenerated conversion function. -func Convert_credentialprovider_AuthConfig_To_v1beta1_AuthConfig(in *credentialprovider.AuthConfig, out *AuthConfig, s conversion.Scope) error { - return autoConvert_credentialprovider_AuthConfig_To_v1beta1_AuthConfig(in, out, s) -} - -func autoConvert_v1beta1_CredentialProviderRequest_To_credentialprovider_CredentialProviderRequest(in *CredentialProviderRequest, out *credentialprovider.CredentialProviderRequest, s conversion.Scope) error { - out.Image = in.Image - return nil -} - -// Convert_v1beta1_CredentialProviderRequest_To_credentialprovider_CredentialProviderRequest is an autogenerated conversion function. -func Convert_v1beta1_CredentialProviderRequest_To_credentialprovider_CredentialProviderRequest(in *CredentialProviderRequest, out *credentialprovider.CredentialProviderRequest, s conversion.Scope) error { - return autoConvert_v1beta1_CredentialProviderRequest_To_credentialprovider_CredentialProviderRequest(in, out, s) -} - -func autoConvert_credentialprovider_CredentialProviderRequest_To_v1beta1_CredentialProviderRequest(in *credentialprovider.CredentialProviderRequest, out *CredentialProviderRequest, s conversion.Scope) error { - out.Image = in.Image - return nil -} - -// Convert_credentialprovider_CredentialProviderRequest_To_v1beta1_CredentialProviderRequest is an autogenerated conversion function. -func Convert_credentialprovider_CredentialProviderRequest_To_v1beta1_CredentialProviderRequest(in *credentialprovider.CredentialProviderRequest, out *CredentialProviderRequest, s conversion.Scope) error { - return autoConvert_credentialprovider_CredentialProviderRequest_To_v1beta1_CredentialProviderRequest(in, out, s) -} - -func autoConvert_v1beta1_CredentialProviderResponse_To_credentialprovider_CredentialProviderResponse(in *CredentialProviderResponse, out *credentialprovider.CredentialProviderResponse, s conversion.Scope) error { - out.CacheKeyType = credentialprovider.PluginCacheKeyType(in.CacheKeyType) - out.CacheDuration = (*v1.Duration)(unsafe.Pointer(in.CacheDuration)) - out.Auth = *(*map[string]credentialprovider.AuthConfig)(unsafe.Pointer(&in.Auth)) - return nil -} - -// Convert_v1beta1_CredentialProviderResponse_To_credentialprovider_CredentialProviderResponse is an autogenerated conversion function. -func Convert_v1beta1_CredentialProviderResponse_To_credentialprovider_CredentialProviderResponse(in *CredentialProviderResponse, out *credentialprovider.CredentialProviderResponse, s conversion.Scope) error { - return autoConvert_v1beta1_CredentialProviderResponse_To_credentialprovider_CredentialProviderResponse(in, out, s) -} - -func autoConvert_credentialprovider_CredentialProviderResponse_To_v1beta1_CredentialProviderResponse(in *credentialprovider.CredentialProviderResponse, out *CredentialProviderResponse, s conversion.Scope) error { - out.CacheKeyType = PluginCacheKeyType(in.CacheKeyType) - out.CacheDuration = (*v1.Duration)(unsafe.Pointer(in.CacheDuration)) - out.Auth = *(*map[string]AuthConfig)(unsafe.Pointer(&in.Auth)) - return nil -} - -// Convert_credentialprovider_CredentialProviderResponse_To_v1beta1_CredentialProviderResponse is an autogenerated conversion function. -func Convert_credentialprovider_CredentialProviderResponse_To_v1beta1_CredentialProviderResponse(in *credentialprovider.CredentialProviderResponse, out *CredentialProviderResponse, s conversion.Scope) error { - return autoConvert_credentialprovider_CredentialProviderResponse_To_v1beta1_CredentialProviderResponse(in, out, s) -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubelet/pkg/apis/credentialprovider/v1beta1/zz_generated.deepcopy.go b/cluster-autoscaler/vendor/k8s.io/kubelet/pkg/apis/credentialprovider/v1beta1/zz_generated.deepcopy.go deleted file mode 100644 index ca2143c77fc0..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kubelet/pkg/apis/credentialprovider/v1beta1/zz_generated.deepcopy.go +++ /dev/null @@ -1,105 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1beta1 - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AuthConfig) DeepCopyInto(out *AuthConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthConfig. -func (in *AuthConfig) DeepCopy() *AuthConfig { - if in == nil { - return nil - } - out := new(AuthConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialProviderRequest) DeepCopyInto(out *CredentialProviderRequest) { - *out = *in - out.TypeMeta = in.TypeMeta - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialProviderRequest. -func (in *CredentialProviderRequest) DeepCopy() *CredentialProviderRequest { - if in == nil { - return nil - } - out := new(CredentialProviderRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CredentialProviderRequest) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialProviderResponse) DeepCopyInto(out *CredentialProviderResponse) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.CacheDuration != nil { - in, out := &in.CacheDuration, &out.CacheDuration - *out = new(v1.Duration) - **out = **in - } - if in.Auth != nil { - in, out := &in.Auth, &out.Auth - *out = make(map[string]AuthConfig, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialProviderResponse. -func (in *CredentialProviderResponse) DeepCopy() *CredentialProviderResponse { - if in == nil { - return nil - } - out := new(CredentialProviderResponse) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CredentialProviderResponse) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubelet/pkg/apis/stats/v1alpha1/types.go b/cluster-autoscaler/vendor/k8s.io/kubelet/pkg/apis/stats/v1alpha1/types.go index 5e75fefe53ff..50622f5170e8 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubelet/pkg/apis/stats/v1alpha1/types.go +++ b/cluster-autoscaler/vendor/k8s.io/kubelet/pkg/apis/stats/v1alpha1/types.go @@ -65,11 +65,9 @@ type NodeStats struct { type RlimitStats struct { Time metav1.Time `json:"time"` - // The max number of extant process (threads, precisely on Linux) of OS. See RLIMIT_NPROC in getrlimit(2). - // The operating system ceiling on the number of process IDs that can be assigned. - // On Linux, tasks (either processes or threads) consume 1 PID each. + // The max PID of OS. MaxPID *int64 `json:"maxpid,omitempty"` - // The number of running process (threads, precisely on Linux) in the OS. + // The number of running process in the OS. NumOfRunningProcesses *int64 `json:"curproc,omitempty"` } @@ -271,17 +269,6 @@ type VolumeStats struct { // Reference to the PVC, if one exists // +optional PVCRef *PVCReference `json:"pvcRef,omitempty"` - - // VolumeHealthStats contains data about volume health - // +optional - VolumeHealthStats *VolumeHealthStats `json:"volumeHealthStats,omitempty"` -} - -// VolumeHealthStats contains data about volume health. -type VolumeHealthStats struct { - // Normal volumes are available for use and operating optimally. - // An abnormal volume does not meet these criteria. - Abnormal bool `json:"abnormal"` } // PVCReference contains enough information to describe the referenced PVC. diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/conntrack.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/conntrack.go index 6f0a973c503f..f1697d3cac6e 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/conntrack.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/conntrack.go @@ -18,7 +18,7 @@ package app import ( "errors" - "os" + "io/ioutil" "strconv" "strings" @@ -132,7 +132,7 @@ func isSysFSWritable() (bool, error) { } func readIntStringFile(filename string) (int, error) { - b, err := os.ReadFile(filename) + b, err := ioutil.ReadFile(filename) if err != nil { return -1, err } @@ -140,5 +140,5 @@ func readIntStringFile(filename string) (int, error) { } func writeIntStringFile(filename string, value int) error { - return os.WriteFile(filename, []byte(strconv.Itoa(value)), 0640) + return ioutil.WriteFile(filename, []byte(strconv.Itoa(value)), 0640) } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/init_windows.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/init_windows.go index 32ed6dc7fe0a..ea4b306b58d0 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/init_windows.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/init_windows.go @@ -41,6 +41,4 @@ func (o *Options) addOSFlags(fs *pflag.FlagSet) { fs.StringVar(&o.config.Winkernel.SourceVip, "source-vip", o.config.Winkernel.SourceVip, "The IP address of the source VIP for non-DSR.") fs.StringVar(&o.config.Winkernel.NetworkName, "network-name", o.config.Winkernel.NetworkName, "The name of the cluster network.") fs.BoolVar(&o.config.Winkernel.EnableDSR, "enable-dsr", o.config.Winkernel.EnableDSR, "If true make kube-proxy apply DSR policies for service VIP") - fs.StringVar(&o.config.Winkernel.RootHnsEndpointName, "root-hnsendpoint-name", "cbr0", "The name of the hns endpoint name for root namespace attached to l2bridge") - fs.BoolVar(&o.config.Winkernel.ForwardHealthCheckVip, "forward-healthcheck-vip", o.config.Winkernel.ForwardHealthCheckVip, "If true forward service VIP for health check port") } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server.go index 82fed5143acd..8241898fe665 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server.go @@ -22,6 +22,7 @@ import ( "errors" goflag "flag" "fmt" + "io/ioutil" "net" "net/http" "os" @@ -146,9 +147,7 @@ func (o *Options) AddFlags(fs *pflag.FlagSet) { fs.StringVar(&o.ConfigFile, "config", o.ConfigFile, "The path to the configuration file.") fs.StringVar(&o.WriteConfigTo, "write-config-to", o.WriteConfigTo, "If set, write the default configuration values to this file and exit.") fs.StringVar(&o.config.ClientConnection.Kubeconfig, "kubeconfig", o.config.ClientConnection.Kubeconfig, "Path to kubeconfig file with authorization information (the master location can be overridden by the master flag).") - fs.StringVar(&o.config.ClusterCIDR, "cluster-cidr", o.config.ClusterCIDR, "The CIDR range of pods in the cluster. When configured, traffic sent to a Service cluster IP from outside this range will be masqueraded and traffic sent from pods to an external LoadBalancer IP will be directed to the respective cluster IP instead. "+ - "For dual-stack clusters, a comma-separated list is accepted with at least one CIDR per IP family (IPv4 and IPv6). "+ - "This parameter is ignored if a config file is specified by --config.") + fs.StringVar(&o.config.ClusterCIDR, "cluster-cidr", o.config.ClusterCIDR, "The CIDR range of pods in the cluster. When configured, traffic sent to a Service cluster IP from outside this range will be masqueraded and traffic sent from pods to an external LoadBalancer IP will be directed to the respective cluster IP instead") fs.StringVar(&o.config.ClientConnection.ContentType, "kube-api-content-type", o.config.ClientConnection.ContentType, "Content type of requests sent to apiserver.") fs.StringVar(&o.master, "master", o.master, "The address of the Kubernetes API server (overrides any value in kubeconfig)") fs.StringVar(&o.hostnameOverride, "hostname-override", o.hostnameOverride, "If non-empty, will use this string as identification instead of the actual hostname.") @@ -158,31 +157,28 @@ func (o *Options) AddFlags(fs *pflag.FlagSet) { "Only the previous minor version is meaningful, other values will not be allowed. "+ "The format is ., e.g.: '1.16'. "+ "The purpose of this format is make sure you have the opportunity to notice if the next release hides additional metrics, "+ - "rather than being surprised when they are permanently removed in the release after that."+ - "This parameter is ignored if a config file is specified by --config.") + "rather than being surprised when they are permanently removed in the release after that.") fs.StringSliceVar(&o.config.IPVS.ExcludeCIDRs, "ipvs-exclude-cidrs", o.config.IPVS.ExcludeCIDRs, "A comma-separated list of CIDR's which the ipvs proxier should not touch when cleaning up IPVS rules.") fs.StringSliceVar(&o.config.NodePortAddresses, "nodeport-addresses", o.config.NodePortAddresses, - "A string slice of values which specify the addresses to use for NodePorts. Values may be valid IP blocks (e.g. 1.2.3.0/24, 1.2.3.4/32). The default empty string slice ([]) means to use all local addresses. This parameter is ignored if a config file is specified by --config.") + "A string slice of values which specify the addresses to use for NodePorts. Values may be valid IP blocks (e.g. 1.2.3.0/24, 1.2.3.4/32). The default empty string slice ([]) means to use all local addresses.") fs.BoolVar(&o.CleanupAndExit, "cleanup", o.CleanupAndExit, "If true cleanup iptables and ipvs rules and exit.") - fs.Var(&utilflag.IPVar{Val: &o.config.BindAddress}, "bind-address", "The IP address for the proxy server to serve on (set to '0.0.0.0' for all IPv4 interfaces and '::' for all IPv6 interfaces). This parameter is ignored if a config file is specified by --config.") - fs.Var(&utilflag.IPPortVar{Val: &o.config.HealthzBindAddress}, "healthz-bind-address", "The IP address with port for the health check server to serve on (set to '0.0.0.0:10256' for all IPv4 interfaces and '[::]:10256' for all IPv6 interfaces). Set empty to disable. This parameter is ignored if a config file is specified by --config.") - fs.Var(&utilflag.IPPortVar{Val: &o.config.MetricsBindAddress}, "metrics-bind-address", "The IP address with port for the metrics server to serve on (set to '0.0.0.0:10249' for all IPv4 interfaces and '[::]:10249' for all IPv6 interfaces). Set empty to disable. This parameter is ignored if a config file is specified by --config.") + fs.Var(&utilflag.IPVar{Val: &o.config.BindAddress}, "bind-address", "The IP address for the proxy server to serve on (set to '0.0.0.0' for all IPv4 interfaces and '::' for all IPv6 interfaces)") + fs.Var(&utilflag.IPPortVar{Val: &o.config.HealthzBindAddress}, "healthz-bind-address", "The IP address with port for the health check server to serve on (set to '0.0.0.0:10256' for all IPv4 interfaces and '[::]:10256' for all IPv6 interfaces). Set empty to disable.") + fs.Var(&utilflag.IPPortVar{Val: &o.config.MetricsBindAddress}, "metrics-bind-address", "The IP address with port for the metrics server to serve on (set to '0.0.0.0:10249' for all IPv4 interfaces and '[::]:10249' for all IPv6 interfaces). Set empty to disable.") fs.BoolVar(&o.config.BindAddressHardFail, "bind-address-hard-fail", o.config.BindAddressHardFail, "If true kube-proxy will treat failure to bind to a port as fatal and exit") fs.Var(utilflag.PortRangeVar{Val: &o.config.PortRange}, "proxy-port-range", "Range of host ports (beginPort-endPort, single port or beginPort+offset, inclusive) that may be consumed in order to proxy service traffic. If (unspecified, 0, or 0-0) then ports will be randomly chosen.") - fs.Var(&o.config.Mode, "proxy-mode", "Which proxy mode to use: 'iptables' (Linux-only), 'ipvs' (Linux-only), 'kernelspace' (Windows-only), or 'userspace' (Linux/Windows, deprecated). The default value is 'iptables' on Linux and 'userspace' on Windows."+ - "This parameter is ignored if a config file is specified by --config.") + fs.Var(&o.config.Mode, "proxy-mode", "Which proxy mode to use: 'userspace' (older) or 'iptables' (faster) or 'ipvs' or 'kernelspace' (windows). If blank, use the best-available proxy (currently iptables). If the iptables proxy is selected, regardless of how, but the system's kernel or iptables versions are insufficient, this always falls back to the userspace proxy.") fs.Var(cliflag.NewMapStringBool(&o.config.FeatureGates), "feature-gates", "A set of key=value pairs that describe feature gates for alpha/experimental features. "+ - "Options are:\n"+strings.Join(utilfeature.DefaultFeatureGate.KnownFeatures(), "\n")+ - "This parameter is ignored if a config file is specified by --config.") + "Options are:\n"+strings.Join(utilfeature.DefaultFeatureGate.KnownFeatures(), "\n")) fs.Int32Var(&o.healthzPort, "healthz-port", o.healthzPort, "The port to bind the health check server. Use 0 to disable.") fs.MarkDeprecated("healthz-port", "This flag is deprecated and will be removed in a future release. Please use --healthz-bind-address instead.") fs.Int32Var(&o.metricsPort, "metrics-port", o.metricsPort, "The port to bind the metrics server. Use 0 to disable.") fs.MarkDeprecated("metrics-port", "This flag is deprecated and will be removed in a future release. Please use --metrics-bind-address instead.") - fs.Int32Var(o.config.OOMScoreAdj, "oom-score-adj", utilpointer.Int32PtrDerefOr(o.config.OOMScoreAdj, int32(qos.KubeProxyOOMScoreAdj)), "The oom-score-adj value for kube-proxy process. Values must be within the range [-1000, 1000]. This parameter is ignored if a config file is specified by --config.") + fs.Int32Var(o.config.OOMScoreAdj, "oom-score-adj", utilpointer.Int32PtrDerefOr(o.config.OOMScoreAdj, int32(qos.KubeProxyOOMScoreAdj)), "The oom-score-adj value for kube-proxy process. Values must be within the range [-1000, 1000]") fs.Int32Var(o.config.IPTables.MasqueradeBit, "iptables-masquerade-bit", utilpointer.Int32PtrDerefOr(o.config.IPTables.MasqueradeBit, 14), "If using the pure iptables proxy, the bit of the fwmark space to mark packets requiring SNAT with. Must be within the range [0, 31].") fs.Int32Var(o.config.Conntrack.MaxPerCore, "conntrack-max-per-core", *o.config.Conntrack.MaxPerCore, "Maximum number of NAT connections to track per CPU core (0 to leave the limit as-is and ignore conntrack-min).") @@ -207,12 +203,10 @@ func (o *Options) AddFlags(fs *pflag.FlagSet) { fs.BoolVar(&o.config.IPVS.StrictARP, "ipvs-strict-arp", o.config.IPVS.StrictARP, "Enable strict ARP by setting arp_ignore to 1 and arp_announce to 2") fs.BoolVar(&o.config.IPTables.MasqueradeAll, "masquerade-all", o.config.IPTables.MasqueradeAll, "If using the pure iptables proxy, SNAT all traffic sent via Service cluster IPs (this not commonly needed)") - fs.BoolVar(&o.config.EnableProfiling, "profiling", o.config.EnableProfiling, "If true enables profiling via web interface on /debug/pprof handler. This parameter is ignored if a config file is specified by --config.") + fs.BoolVar(&o.config.EnableProfiling, "profiling", o.config.EnableProfiling, "If true enables profiling via web interface on /debug/pprof handler.") fs.Float32Var(&o.config.ClientConnection.QPS, "kube-api-qps", o.config.ClientConnection.QPS, "QPS to use while talking with kubernetes apiserver") - fs.Var(&o.config.DetectLocalMode, "detect-local-mode", "Mode to use to detect local traffic. This parameter is ignored if a config file is specified by --config.") - fs.StringVar(&o.config.DetectLocal.BridgeInterface, "pod-bridge-interface", o.config.DetectLocal.BridgeInterface, "A bridge interface name in the cluster. Kube-proxy considers traffic as local if originating from an interface which matches the value. This argument should be set if DetectLocalMode is set to BridgeInterface.") - fs.StringVar(&o.config.DetectLocal.InterfaceNamePrefix, "pod-interface-name-prefix", o.config.DetectLocal.InterfaceNamePrefix, "An interface prefix in the cluster. Kube-proxy considers traffic as local if originating from interfaces that match the given prefix. This argument should be set if DetectLocalMode is set to InterfaceNamePrefix.") + fs.Var(&o.config.DetectLocalMode, "detect-local-mode", "Mode to use to detect local traffic") } // NewOptions returns initialized Options @@ -406,7 +400,7 @@ func newLenientSchemeAndCodecs() (*runtime.Scheme, *serializer.CodecFactory, err // loadConfigFromFile loads the contents of file and decodes it as a // KubeProxyConfiguration object. func (o *Options) loadConfigFromFile(file string) (*kubeproxyconfig.KubeProxyConfiguration, error) { - data, err := os.ReadFile(file) + data, err := ioutil.ReadFile(file) if err != nil { return nil, err } @@ -629,6 +623,7 @@ func serveMetrics(bindAddress, proxyMode string, enableProfiling bool, errCh cha fmt.Fprintf(w, "%s", proxyMode) }) + //nolint:staticcheck // SA1019 See the Metrics Stability Migration KEP proxyMux.Handle("/metrics", legacyregistry.Handler()) if enableProfiling { @@ -660,8 +655,6 @@ func (s *ProxyServer) Run() error { // To help debugging, immediately log version klog.InfoS("Version info", "version", version.Get()) - klog.InfoS("Golang settings", "GOGC", os.Getenv("GOGC"), "GOMAXPROCS", os.Getenv("GOMAXPROCS"), "GOTRACEBACK", os.Getenv("GOTRACEBACK")) - // TODO(vmarmol): Use container config for this. var oomAdjuster *oom.OOMAdjuster if s.OOMScoreAdj != nil { diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server_others.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server_others.go index 8a5d580f93d0..c0da5b56d50d 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server_others.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server_others.go @@ -436,7 +436,7 @@ func detectNumCPU() int { func getDetectLocalMode(config *proxyconfigapi.KubeProxyConfiguration) (proxyconfigapi.LocalMode, error) { mode := config.DetectLocalMode switch mode { - case proxyconfigapi.LocalModeClusterCIDR, proxyconfigapi.LocalModeNodeCIDR, proxyconfigapi.LocalModeBridgeInterface, proxyconfigapi.LocalModeInterfaceNamePrefix: + case proxyconfigapi.LocalModeClusterCIDR, proxyconfigapi.LocalModeNodeCIDR: return mode, nil default: if strings.TrimSpace(mode.String()) != "" { @@ -461,16 +461,6 @@ func getLocalDetector(mode proxyconfigapi.LocalMode, config *proxyconfigapi.Kube break } return proxyutiliptables.NewDetectLocalByCIDR(nodeInfo.Spec.PodCIDR, ipt) - case proxyconfigapi.LocalModeBridgeInterface: - if len(strings.TrimSpace(config.DetectLocal.BridgeInterface)) == 0 { - return nil, fmt.Errorf("Detect-local-mode set to BridgeInterface, but no bridge-interface-name %s is defined", config.DetectLocal.BridgeInterface) - } - return proxyutiliptables.NewDetectLocalByBridgeInterface(config.DetectLocal.BridgeInterface) - case proxyconfigapi.LocalModeInterfaceNamePrefix: - if len(strings.TrimSpace(config.DetectLocal.InterfaceNamePrefix)) == 0 { - return nil, fmt.Errorf("Detect-local-mode set to InterfaceNamePrefix, but no interface-prefix %s is defined", config.DetectLocal.InterfaceNamePrefix) - } - return proxyutiliptables.NewDetectLocalByInterfaceNamePrefix(config.DetectLocal.InterfaceNamePrefix) } klog.V(0).InfoS("Defaulting to no-op detect-local", "detect-local-mode", string(mode)) return proxyutiliptables.NewNoOpLocalDetector(), nil @@ -528,13 +518,6 @@ func getDualStackLocalDetectorTuple(mode proxyconfigapi.LocalMode, config *proxy } } return localDetectors, err - case proxyconfigapi.LocalModeBridgeInterface, proxyconfigapi.LocalModeInterfaceNamePrefix: - localDetector, err := getLocalDetector(mode, config, ipt[0], nodeInfo) - if err == nil { - localDetectors[0] = localDetector - localDetectors[1] = localDetector - } - return localDetectors, err default: klog.InfoS("Unknown detect-local-mode", "detect-local-mode", mode) } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server_windows.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server_windows.go index b26f8e328e26..c3b18c8fd194 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server_windows.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server_windows.go @@ -24,9 +24,7 @@ package app import ( "errors" "fmt" - "net" goruntime "runtime" - "strconv" // Enable pprof HTTP handlers. _ "net/http/pprof" @@ -99,11 +97,8 @@ func newProxyServer(config *proxyconfigapi.KubeProxyConfiguration, cleanupAndExi } var healthzServer healthcheck.ProxierHealthUpdater - var healthzPort int if len(config.HealthzBindAddress) > 0 { healthzServer = healthcheck.NewProxierHealthServer(config.HealthzBindAddress, 2*config.IPTables.SyncPeriod.Duration, recorder, nodeRef) - _, port, _ := net.SplitHostPort(config.HealthzBindAddress) - healthzPort, _ = strconv.Atoi(port) } var proxier proxy.Provider @@ -125,7 +120,6 @@ func newProxyServer(config *proxyconfigapi.KubeProxyConfiguration, cleanupAndExi recorder, healthzServer, config.Winkernel, - healthzPort, ) } else { @@ -140,7 +134,6 @@ func newProxyServer(config *proxyconfigapi.KubeProxyConfiguration, cleanupAndExi recorder, healthzServer, config.Winkernel, - healthzPort, ) } @@ -148,8 +141,6 @@ func newProxyServer(config *proxyconfigapi.KubeProxyConfiguration, cleanupAndExi if err != nil { return nil, fmt.Errorf("unable to create proxier: %v", err) } - - winkernel.RegisterMetrics() } else { klog.V(0).InfoS("Using userspace Proxier.") klog.V(0).InfoS("The userspace proxier is now deprecated and will be removed in a future release, please use 'kernelspace' instead") diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/OWNERS index 90f4048b2b15..d7211290337b 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/OWNERS @@ -1,4 +1,4 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - sig-node-reviewers +- sig-node-reviewers diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/auth.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/auth.go index fcb8afe19463..8b8b2e9047f9 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/auth.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/auth.go @@ -17,7 +17,6 @@ limitations under the License. package app import ( - "context" "errors" "fmt" "reflect" @@ -96,18 +95,8 @@ func BuildAuthn(client authenticationclient.AuthenticationV1Interface, authn kub } return authenticator, func(stopCh <-chan struct{}) { - // generate a context from stopCh. This is to avoid modifying files which are relying on this method - // TODO: See if we can pass ctx to the current method - ctx, cancel := context.WithCancel(context.Background()) - go func() { - select { - case <-stopCh: - cancel() // stopCh closed, so cancel our context - case <-ctx.Done(): - } - }() if dynamicCAContentFromFile != nil { - go dynamicCAContentFromFile.Run(ctx, 1) + go dynamicCAContentFromFile.Run(1, stopCh) } }, err } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/init_windows.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/init_windows.go index 1696f0431b67..3b8ef098cdb5 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/init_windows.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/init_windows.go @@ -21,9 +21,7 @@ package app import ( "fmt" - "unsafe" - "github.com/pkg/errors" "golang.org/x/sys/windows" "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/windows/service" @@ -37,56 +35,28 @@ const ( // Ref: https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/setpriority-method-in-class-win32-process func getPriorityValue(priorityClassName string) uint32 { var priorityClassMap = map[string]uint32{ - "IDLE_PRIORITY_CLASS": uint32(windows.IDLE_PRIORITY_CLASS), - "BELOW_NORMAL_PRIORITY_CLASS": uint32(windows.BELOW_NORMAL_PRIORITY_CLASS), - "NORMAL_PRIORITY_CLASS": uint32(windows.NORMAL_PRIORITY_CLASS), - "ABOVE_NORMAL_PRIORITY_CLASS": uint32(windows.ABOVE_NORMAL_PRIORITY_CLASS), - "HIGH_PRIORITY_CLASS": uint32(windows.HIGH_PRIORITY_CLASS), - "REALTIME_PRIORITY_CLASS": uint32(windows.REALTIME_PRIORITY_CLASS), + "IDLE_PRIORITY_CLASS": uint32(64), + "BELOW_NORMAL_PRIORITY_CLASS": uint32(16384), + "NORMAL_PRIORITY_CLASS": uint32(32), + "ABOVE_NORMAL_PRIORITY_CLASS": uint32(32768), + "HIGH_PRIORITY_CLASS": uint32(128), + "REALTIME_PRIORITY_CLASS": uint32(256), } return priorityClassMap[priorityClassName] } -// createWindowsJobObject creates a new Job Object -// (https://docs.microsoft.com/en-us/windows/win32/procthread/job-objects), -// and specifies the priority class for the job object to the specified value. -// A job object is used here so that any spawned processes such as powershell or -// wmic are created at the specified thread priority class. -// Running kubelet with above normal / high priority can help improve -// responsiveness on machines with high CPU utilization. -func createWindowsJobObject(pc uint32) (windows.Handle, error) { - job, err := windows.CreateJobObject(nil, nil) - if err != nil { - return windows.InvalidHandle, errors.Wrap(err, "windows.CreateJobObject failed") - } - limitInfo := windows.JOBOBJECT_BASIC_LIMIT_INFORMATION{ - LimitFlags: windows.JOB_OBJECT_LIMIT_PRIORITY_CLASS, - PriorityClass: pc, - } - if _, err := windows.SetInformationJobObject( - job, - windows.JobObjectBasicLimitInformation, - uintptr(unsafe.Pointer(&limitInfo)), - uint32(unsafe.Sizeof(limitInfo))); err != nil { - return windows.InvalidHandle, errors.Wrap(err, "windows.SetInformationJobObject failed") - } - return job, nil -} - func initForOS(windowsService bool, windowsPriorityClass string) error { priority := getPriorityValue(windowsPriorityClass) if priority == 0 { return fmt.Errorf("unknown priority class %s, valid ones are available at "+ "https://docs.microsoft.com/en-us/windows/win32/procthread/scheduling-priorities", windowsPriorityClass) } - klog.InfoS("Creating a Windows job object and adding kubelet process to it", "windowsPriorityClass", windowsPriorityClass) - job, err := createWindowsJobObject(priority) - if err != nil { + kubeletProcessHandle := windows.CurrentProcess() + // Set the priority of the kubelet process to given priority + klog.InfoS("Setting the priority of kubelet process", "windowsPriorityClass", windowsPriorityClass) + if err := windows.SetPriorityClass(kubeletProcessHandle, priority); err != nil { return err } - if err := windows.AssignProcessToJobObject(job, windows.CurrentProcess()); err != nil { - return errors.Wrap(err, "windows.AssignProcessToJobObject failed") - } if windowsService { return service.InitService(serviceName) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/container_runtime.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/container_runtime.go index 5c8b5e04eb78..f8e6bb520fd5 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/container_runtime.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/container_runtime.go @@ -17,6 +17,10 @@ limitations under the License. package options import ( + "runtime" + "time" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/pkg/kubelet/config" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" ) @@ -24,7 +28,7 @@ import ( const ( // When these values are updated, also update test/utils/image/manifest.go defaultPodSandboxImageName = "k8s.gcr.io/pause" - defaultPodSandboxImageVersion = "3.7" + defaultPodSandboxImageVersion = "3.6" ) var ( @@ -35,8 +39,20 @@ var ( // NewContainerRuntimeOptions will create a new ContainerRuntimeOptions with // default values. func NewContainerRuntimeOptions() *config.ContainerRuntimeOptions { + dockerEndpoint := "" + if runtime.GOOS != "windows" { + dockerEndpoint = "unix:///var/run/docker.sock" + } + return &config.ContainerRuntimeOptions{ - ContainerRuntime: kubetypes.RemoteContainerRuntime, - PodSandboxImage: defaultPodSandboxImage, + ContainerRuntime: kubetypes.DockerContainerRuntime, + DockerEndpoint: dockerEndpoint, + DockershimRootDirectory: "/var/lib/dockershim", + PodSandboxImage: defaultPodSandboxImage, + ImagePullProgressDeadline: metav1.Duration{Duration: 1 * time.Minute}, + + CNIBinDir: "/opt/cni/bin", + CNIConfDir: "/etc/cni/net.d", + CNICacheDir: "/var/lib/cni/cache", } } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/globalflags_linux.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/globalflags_linux.go index e75e65ec37cd..ad3b68628f66 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/globalflags_linux.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/globalflags_linux.go @@ -28,6 +28,7 @@ import ( // ensure libs have a chance to globally register their flags _ "github.com/google/cadvisor/container/common" _ "github.com/google/cadvisor/container/containerd" + _ "github.com/google/cadvisor/container/docker" _ "github.com/google/cadvisor/container/raw" _ "github.com/google/cadvisor/machine" _ "github.com/google/cadvisor/manager" @@ -40,6 +41,9 @@ func addCadvisorFlags(fs *pflag.FlagSet) { global := flag.CommandLine local := pflag.NewFlagSet(os.Args[0], pflag.ExitOnError) + // These flags were also implicit from cadvisor, but are actually used by something in the core repo: + // TODO(mtaufen): This one is stil used by our salt, but for heaven's sake it's even deprecated in cadvisor + register(global, local, "docker_root") // e2e node tests rely on this register(global, local, "housekeeping_interval") @@ -50,6 +54,13 @@ func addCadvisorFlags(fs *pflag.FlagSet) { registerDeprecated(global, local, "boot_id_file", deprecated) registerDeprecated(global, local, "container_hints", deprecated) registerDeprecated(global, local, "containerd", deprecated) + registerDeprecated(global, local, "docker", deprecated) + registerDeprecated(global, local, "docker_env_metadata_whitelist", deprecated) + registerDeprecated(global, local, "docker_only", deprecated) + registerDeprecated(global, local, "docker-tls", deprecated) + registerDeprecated(global, local, "docker-tls-ca", deprecated) + registerDeprecated(global, local, "docker-tls-cert", deprecated) + registerDeprecated(global, local, "docker-tls-key", deprecated) registerDeprecated(global, local, "enable_load_reader", deprecated) registerDeprecated(global, local, "event_storage_age_limit", deprecated) registerDeprecated(global, local, "event_storage_event_limit", deprecated) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/options.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/options.go index 986c638bce10..f407c9439e34 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/options.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/options/options.go @@ -20,6 +20,7 @@ package options import ( "fmt" _ "net/http/pprof" // Enable pprof HTTP handlers. + "runtime" "strings" "github.com/spf13/pflag" @@ -37,7 +38,6 @@ import ( kubeletscheme "k8s.io/kubernetes/pkg/kubelet/apis/config/scheme" kubeletconfigvalidation "k8s.io/kubernetes/pkg/kubelet/apis/config/validation" "k8s.io/kubernetes/pkg/kubelet/config" - kubetypes "k8s.io/kubernetes/pkg/kubelet/types" utilflag "k8s.io/kubernetes/pkg/util/flag" ) @@ -54,6 +54,9 @@ type KubeletFlags struct { KubeConfig string BootstrapKubeconfig string + // Crash immediately, rather than eating panics. + ReallyCrashForTesting bool + // HostnameOverride is the hostname used to identify the kubelet instead // of the actual hostname. HostnameOverride string @@ -80,6 +83,13 @@ type KubeletFlags struct { // mounts,etc). RootDirectory string + // The Kubelet will use this directory for checkpointing downloaded configurations and tracking configuration health. + // The Kubelet will create this directory if it does not already exist. + // The path may be absolute or relative; relative paths are under the Kubelet's current working directory. + // Providing this flag enables dynamic kubelet configuration. + // To use this flag, the DynamicKubeletConfig feature gate must be enabled. + DynamicConfigDir cliflag.StringFlag + // The Kubelet will load its initial configuration from this file. // The path may be absolute or relative; relative paths are under the Kubelet's current working directory. // Omit this flag to use the combination of built-in default configuration values and flags. @@ -102,6 +112,10 @@ type KubeletFlags struct { RemoteImageEndpoint string // experimentalMounterPath is the path of mounter binary. Leave empty to use the default mount path ExperimentalMounterPath string + // This flag, if set, enables a check prior to mount operations to verify that the required components + // (binaries, etc.) to mount the volume are available on the underlying node. If the check is enabled + // and fails the mount operation fails. + ExperimentalCheckNodeCapabilitiesBeforeMount bool // This flag, if set, will avoid including `EvictionHard` limits while computing Node Allocatable. // Refer to [Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node/node-allocatable.md) doc for more information. ExperimentalNodeAllocatableIgnoreEvictionThreshold bool @@ -133,6 +147,8 @@ type KubeletFlags struct { // schedulable. Won't have any effect if register-node is false. // DEPRECATED: use registerWithTaints instead RegisterSchedulable bool + // nonMasqueradeCIDR configures masquerading: traffic to IPs outside this range will use IP masquerade. + NonMasqueradeCIDR string // This flag, if set, instructs the kubelet to keep volumes from terminated pods mounted to the node. // This can be useful for debugging volume related issues. KeepTerminatedPodVolumes bool @@ -143,6 +159,13 @@ type KubeletFlags struct { // NewKubeletFlags will create a new KubeletFlags with default values func NewKubeletFlags() *KubeletFlags { + remoteRuntimeEndpoint := "" + if runtime.GOOS == "linux" { + remoteRuntimeEndpoint = "unix:///var/run/dockershim.sock" + } else if runtime.GOOS == "windows" { + remoteRuntimeEndpoint = "npipe:////./pipe/dockershim" + } + return &KubeletFlags{ ContainerRuntimeOptions: *NewContainerRuntimeOptions(), CertDirectory: "/var/lib/kubelet/pki", @@ -151,13 +174,20 @@ func NewKubeletFlags() *KubeletFlags { MaxContainerCount: -1, MaxPerPodContainerCount: 1, MinimumGCAge: metav1.Duration{Duration: 0}, + NonMasqueradeCIDR: "10.0.0.0/8", RegisterSchedulable: true, + RemoteRuntimeEndpoint: remoteRuntimeEndpoint, NodeLabels: make(map[string]string), } } // ValidateKubeletFlags validates Kubelet's configuration flags and returns an error if they are invalid. func ValidateKubeletFlags(f *KubeletFlags) error { + // ensure that nobody sets DynamicConfigDir if the dynamic config feature gate is turned off + if f.DynamicConfigDir.Provided() && !utilfeature.DefaultFeatureGate.Enabled(features.DynamicKubeletConfig) { + return fmt.Errorf("the DynamicKubeletConfig feature gate must be enabled in order to use the --dynamic-config-dir flag") + } + unknownLabels := sets.NewString() for k := range f.NodeLabels { if isKubernetesLabel(k) && !kubeletapis.IsKubeletLabel(k) { @@ -172,10 +202,6 @@ func ValidateKubeletFlags(f *KubeletFlags) error { return fmt.Errorf("the SeccompDefault feature gate must be enabled in order to use the --seccomp-default flag") } - if f.ContainerRuntime != kubetypes.RemoteContainerRuntime { - return fmt.Errorf("unsupported CRI runtime: %q, only %q is currently supported", f.ContainerRuntime, kubetypes.RemoteContainerRuntime) - } - return nil } @@ -299,10 +325,12 @@ func (f *KubeletFlags) AddFlags(mainfs *pflag.FlagSet) { fs.StringVar(&f.RootDirectory, "root-dir", f.RootDirectory, "Directory path for managing kubelet files (volume mounts,etc).") - fs.StringVar(&f.RemoteRuntimeEndpoint, "container-runtime-endpoint", f.RemoteRuntimeEndpoint, "The endpoint of remote runtime service. Unix Domain Sockets are supported on Linux, while npipe and tcp endpoints are supported on Windows. Examples:'unix:///path/to/runtime.sock', 'npipe:////./pipe/runtime'") - fs.StringVar(&f.RemoteImageEndpoint, "image-service-endpoint", f.RemoteImageEndpoint, "The endpoint of remote image service. If not specified, it will be the same with --container-runtime-endpoint by default. Unix Domain Socket are supported on Linux, while npipe and tcp endpoints are supported on Windows. Examples:'unix:///path/to/runtime.sock', 'npipe:////./pipe/runtime'") + fs.Var(&f.DynamicConfigDir, "dynamic-config-dir", "The Kubelet will use this directory for checkpointing downloaded configurations and tracking configuration health. The Kubelet will create this directory if it does not already exist. The path may be absolute or relative; relative paths start at the Kubelet's current working directory. Providing this flag enables dynamic Kubelet configuration. The DynamicKubeletConfig feature gate must be enabled to pass this flag.") + fs.MarkDeprecated("dynamic-config-dir", "Feature DynamicKubeletConfig is deprecated in 1.22 and will not move to GA. It is planned to be removed from Kubernetes in the version 1.23. Please use alternative ways to update kubelet configuration.") // EXPERIMENTAL FLAGS + fs.StringVar(&f.RemoteRuntimeEndpoint, "container-runtime-endpoint", f.RemoteRuntimeEndpoint, "[Experimental] The endpoint of remote runtime service. Currently unix socket endpoint is supported on Linux, while npipe and tcp endpoints are supported on windows. Note: When using docker as container runtime this specifies the dockershim socket location which kubelet itself creates. Examples:'unix:///var/run/dockershim.sock', 'npipe:////./pipe/dockershim'") + fs.StringVar(&f.RemoteImageEndpoint, "image-service-endpoint", f.RemoteImageEndpoint, "[Experimental] The endpoint of remote image service. If not specified, it will be the same with container-runtime-endpoint by default. Currently unix socket endpoint is supported on Linux, while npipe and tcp endpoints are supported on windows. Examples:'unix:///var/run/dockershim.sock', 'npipe:////./pipe/dockershim'") bindableNodeLabels := cliflag.ConfigurationMap(f.NodeLabels) fs.Var(&bindableNodeLabels, "node-labels", fmt.Sprintf(" Labels to add when registering the node in the cluster. Labels must be key=value pairs separated by ','. Labels in the 'kubernetes.io' namespace must begin with an allowed prefix (%s) or be in the specifically allowed set (%s)", strings.Join(kubeletapis.KubeletLabelNamespaces(), ", "), strings.Join(kubeletapis.KubeletLabels(), ", "))) fs.StringVar(&f.LockFilePath, "lock-file", f.LockFilePath, " The path to file for kubelet to use as a lock file.") @@ -320,16 +348,22 @@ func (f *KubeletFlags) AddFlags(mainfs *pflag.FlagSet) { fs.MarkDeprecated("master-service-namespace", "This flag will be removed in a future version.") fs.BoolVar(&f.RegisterSchedulable, "register-schedulable", f.RegisterSchedulable, "Register the node as schedulable. Won't have any effect if register-node is false.") fs.MarkDeprecated("register-schedulable", "will be removed in a future version") + fs.StringVar(&f.NonMasqueradeCIDR, "non-masquerade-cidr", f.NonMasqueradeCIDR, "Traffic to IPs outside this range will use IP masquerade. Set to '0.0.0.0/0' to never masquerade.") + fs.MarkDeprecated("non-masquerade-cidr", "will be removed in a future version") fs.BoolVar(&f.KeepTerminatedPodVolumes, "keep-terminated-pod-volumes", f.KeepTerminatedPodVolumes, "Keep terminated pod volumes mounted to the node after the pod terminates. Can be useful for debugging volume related issues.") fs.MarkDeprecated("keep-terminated-pod-volumes", "will be removed in a future version") + fs.BoolVar(&f.ReallyCrashForTesting, "really-crash-for-testing", f.ReallyCrashForTesting, "If true, when panics occur crash. Intended for testing.") + fs.MarkDeprecated("really-crash-for-testing", "will be removed in a future version.") fs.StringVar(&f.ExperimentalMounterPath, "experimental-mounter-path", f.ExperimentalMounterPath, "[Experimental] Path of mounter binary. Leave empty to use the default mount.") - fs.MarkDeprecated("experimental-mounter-path", "will be removed in 1.24 or later. in favor of using CSI.") + fs.MarkDeprecated("experimental-mounter-path", "will be removed in 1.23. in favor of using CSI.") + fs.BoolVar(&f.ExperimentalCheckNodeCapabilitiesBeforeMount, "experimental-check-node-capabilities-before-mount", f.ExperimentalCheckNodeCapabilitiesBeforeMount, "[Experimental] if set true, the kubelet will check the underlying node for required components (binaries, etc.) before performing the mount") + fs.MarkDeprecated("experimental-check-node-capabilities-before-mount", "will be removed in 1.23. in favor of using CSI.") fs.StringVar(&f.CloudProvider, "cloud-provider", f.CloudProvider, "The provider for cloud services. Set to empty string for running with no cloud provider. If set, the cloud provider determines the name of the node (consult cloud provider documentation to determine if and how the hostname is used).") - fs.MarkDeprecated("cloud-provider", "will be removed in 1.24 or later, in favor of removing cloud provider code from Kubelet.") + fs.MarkDeprecated("cloud-provider", "will be removed in 1.23, in favor of removing cloud provider code from Kubelet.") fs.StringVar(&f.CloudConfigFile, "cloud-config", f.CloudConfigFile, "The path to the cloud provider configuration file. Empty string for no configuration file.") - fs.MarkDeprecated("cloud-config", "will be removed in 1.24 or later, in favor of removing cloud provider code from Kubelet.") + fs.MarkDeprecated("cloud-config", "will be removed in 1.23, in favor of removing cloud provider code from Kubelet.") fs.BoolVar(&f.ExperimentalNodeAllocatableIgnoreEvictionThreshold, "experimental-allocatable-ignore-eviction", f.ExperimentalNodeAllocatableIgnoreEvictionThreshold, "When set to 'true', Hard Eviction Thresholds will be ignored while calculating Node Allocatable. See https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/ for more details. [default=false]") - fs.MarkDeprecated("experimental-allocatable-ignore-eviction", "will be removed in 1.24 or later.") + fs.MarkDeprecated("experimental-allocatable-ignore-eviction", "will be removed in 1.23.") } // AddKubeletConfigFlags adds flags for a specific kubeletconfig.KubeletConfiguration to the specified FlagSet @@ -503,7 +537,7 @@ func AddKubeletConfigFlags(mainfs *pflag.FlagSet, c *kubeletconfig.KubeletConfig logs.BindLoggingFlags(&c.Logging, fs) // Graduated experimental flags, kept for backward compatibility - fs.BoolVar(&c.KernelMemcgNotification, "experimental-kernel-memcg-notification", c.KernelMemcgNotification, "Use kernelMemcgNotification configuration, this flag will be removed in 1.24 or later.") + fs.BoolVar(&c.KernelMemcgNotification, "experimental-kernel-memcg-notification", c.KernelMemcgNotification, "Use kernelMemcgNotification configuration, this flag will be removed in 1.23.") // Memory Manager Flags fs.StringVar(&c.MemoryManagerPolicy, "memory-manager-policy", c.MemoryManagerPolicy, "Memory Manager policy to use. Possible values: 'None', 'Static'.") diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/server.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/server.go index 8ac37d97292c..a58193040994 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/server.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/server.go @@ -89,10 +89,12 @@ import ( kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/eviction" evictionapi "k8s.io/kubernetes/pkg/kubelet/eviction/api" + dynamickubeletconfig "k8s.io/kubernetes/pkg/kubelet/kubeletconfig" "k8s.io/kubernetes/pkg/kubelet/kubeletconfig/configfiles" kubeletmetrics "k8s.io/kubernetes/pkg/kubelet/metrics" "k8s.io/kubernetes/pkg/kubelet/server" "k8s.io/kubernetes/pkg/kubelet/stats/pidlimit" + kubetypes "k8s.io/kubernetes/pkg/kubelet/types" utilfs "k8s.io/kubernetes/pkg/util/filesystem" "k8s.io/kubernetes/pkg/util/flock" nodeutil "k8s.io/kubernetes/pkg/util/node" @@ -104,10 +106,6 @@ import ( netutils "k8s.io/utils/net" ) -func init() { - utilruntime.Must(logs.AddFeatureGates(utilfeature.DefaultMutableFeatureGate)) -} - const ( // Kubelet component name componentKubelet = "kubelet" @@ -118,7 +116,6 @@ func NewKubeletCommand() *cobra.Command { cleanFlagSet := pflag.NewFlagSet(componentKubelet, pflag.ContinueOnError) cleanFlagSet.SetNormalizeFunc(cliflag.WordSepNormalizeFunc) kubeletFlags := options.NewKubeletFlags() - kubeletConfig, err := options.NewKubeletConfiguration() // programmer error if err != nil { @@ -155,25 +152,31 @@ HTTP server: The kubelet can also listen for HTTP and respond to a simple API // DisableFlagParsing=true provides the full set of flags passed to the kubelet in the // `args` arg to Run, without Cobra's interference. DisableFlagParsing: true, - RunE: func(cmd *cobra.Command, args []string) error { + Run: func(cmd *cobra.Command, args []string) { // initial flag parse, since we disable cobra's flag parsing if err := cleanFlagSet.Parse(args); err != nil { - return fmt.Errorf("failed to parse kubelet flag: %w", err) + klog.ErrorS(err, "Failed to parse kubelet flag") + cmd.Usage() + os.Exit(1) } // check if there are non-flag arguments in the command line cmds := cleanFlagSet.Args() if len(cmds) > 0 { - return fmt.Errorf("unknown command %+s", cmds[0]) + klog.ErrorS(nil, "Unknown command", "command", cmds[0]) + cmd.Usage() + os.Exit(1) } // short-circuit on help help, err := cleanFlagSet.GetBool("help") if err != nil { - return errors.New(`"help" flag is non-bool, programmer error, please correct`) + klog.InfoS(`"help" flag is non-bool, programmer error, please correct`) + os.Exit(1) } if help { - return cmd.Help() + cmd.Help() + return } // short-circuit on verflag @@ -181,57 +184,84 @@ HTTP server: The kubelet can also listen for HTTP and respond to a simple API // set feature gates from initial flags-based config if err := utilfeature.DefaultMutableFeatureGate.SetFromMap(kubeletConfig.FeatureGates); err != nil { - return fmt.Errorf("failed to set feature gates from initial flags-based config: %w", err) + klog.ErrorS(err, "Failed to set feature gates from initial flags-based config") + os.Exit(1) } // validate the initial KubeletFlags if err := options.ValidateKubeletFlags(kubeletFlags); err != nil { - return fmt.Errorf("failed to validate kubelet flags: %w", err) + klog.ErrorS(err, "Failed to validate kubelet flags") + os.Exit(1) } - if cleanFlagSet.Changed("pod-infra-container-image") { - klog.InfoS("--pod-infra-container-image will not be pruned by the image garbage collector in kubelet and should also be set in the remote runtime") + if kubeletFlags.ContainerRuntime == "remote" && cleanFlagSet.Changed("pod-infra-container-image") { + klog.InfoS("Warning: For remote container runtime, --pod-infra-container-image is ignored in kubelet, which should be set in that remote runtime instead") } // load kubelet config file, if provided if configFile := kubeletFlags.KubeletConfigFile; len(configFile) > 0 { kubeletConfig, err = loadConfigFile(configFile) if err != nil { - return fmt.Errorf("failed to load kubelet config file, error: %w, path: %s", err, configFile) + klog.ErrorS(err, "Failed to load kubelet config file", "path", configFile) + os.Exit(1) } // We must enforce flag precedence by re-parsing the command line into the new object. // This is necessary to preserve backwards-compatibility across binary upgrades. // See issue #56171 for more details. if err := kubeletConfigFlagPrecedence(kubeletConfig, args); err != nil { - return fmt.Errorf("failed to precedence kubeletConfigFlag: %w", err) + klog.ErrorS(err, "Failed to precedence kubeletConfigFlag") + os.Exit(1) } // update feature gates based on new config if err := utilfeature.DefaultMutableFeatureGate.SetFromMap(kubeletConfig.FeatureGates); err != nil { - return fmt.Errorf("failed to set feature gates from initial flags-based config: %w", err) + klog.ErrorS(err, "Failed to set feature gates from initial flags-based config") + os.Exit(1) } } // We always validate the local configuration (command line + config file). // This is the default "last-known-good" config for dynamic config, and must always remain valid. if err := kubeletconfigvalidation.ValidateKubeletConfiguration(kubeletConfig); err != nil { - return fmt.Errorf("failed to validate kubelet configuration, error: %w, path: %s", err, kubeletConfig) + klog.ErrorS(err, "Failed to validate kubelet configuration", "path", kubeletConfig) + os.Exit(1) } if (kubeletConfig.KubeletCgroups != "" && kubeletConfig.KubeReservedCgroup != "") && (strings.Index(kubeletConfig.KubeletCgroups, kubeletConfig.KubeReservedCgroup) != 0) { klog.InfoS("unsupported configuration:KubeletCgroups is not within KubeReservedCgroup") } - // The features.DynamicKubeletConfig is locked to false, - // feature gate is not locked using the LockedToDefault flag - // to make sure node authorizer can keep working with the older nodes - if utilfeature.DefaultFeatureGate.Enabled(features.DynamicKubeletConfig) { - return fmt.Errorf("cannot set feature gate %v to %v, feature is locked to %v", features.DynamicKubeletConfig, true, false) + // use dynamic kubelet config, if enabled + var kubeletConfigController *dynamickubeletconfig.Controller + if dynamicConfigDir := kubeletFlags.DynamicConfigDir.Value(); len(dynamicConfigDir) > 0 { + var dynamicKubeletConfig *kubeletconfiginternal.KubeletConfiguration + dynamicKubeletConfig, kubeletConfigController, err = BootstrapKubeletConfigController(dynamicConfigDir, + func(kc *kubeletconfiginternal.KubeletConfiguration) error { + // Here, we enforce flag precedence inside the controller, prior to the controller's validation sequence, + // so that we get a complete validation at the same point where we can decide to reject dynamic config. + // This fixes the flag-precedence component of issue #63305. + // See issue #56171 for general details on flag precedence. + return kubeletConfigFlagPrecedence(kc, args) + }) + if err != nil { + klog.ErrorS(err, "Failed to bootstrap a configuration controller", "dynamicConfigDir", dynamicConfigDir) + os.Exit(1) + } + // If we should just use our existing, local config, the controller will return a nil config + if dynamicKubeletConfig != nil { + kubeletConfig = dynamicKubeletConfig + // Note: flag precedence was already enforced in the controller, prior to validation, + // by our above transform function. Now we simply update feature gates from the new config. + if err := utilfeature.DefaultMutableFeatureGate.SetFromMap(kubeletConfig.FeatureGates); err != nil { + klog.ErrorS(err, "Failed to set feature gates from initial flags-based config") + os.Exit(1) + } + } } // Config and flags parsed, now we can initialize logging. logs.InitLogs() logOption := &logs.Options{Config: kubeletConfig.Logging} - if err := logOption.ValidateAndApply(utilfeature.DefaultFeatureGate); err != nil { + if err := logOption.ValidateAndApply(); err != nil { klog.ErrorS(err, "Failed to initialize logging") os.Exit(1) } @@ -246,9 +276,13 @@ HTTP server: The kubelet can also listen for HTTP and respond to a simple API // use kubeletServer to construct the default KubeletDeps kubeletDeps, err := UnsecuredDependencies(kubeletServer, utilfeature.DefaultFeatureGate) if err != nil { - return fmt.Errorf("failed to construct kubelet dependencies: %w", err) + klog.ErrorS(err, "Failed to construct kubelet dependencies") + os.Exit(1) } + // add the kubelet config controller to kubeletDeps + kubeletDeps.KubeletConfigController = kubeletConfigController + if err := checkPermissions(); err != nil { klog.ErrorS(err, "kubelet running with insufficient permissions") } @@ -261,10 +295,13 @@ HTTP server: The kubelet can also listen for HTTP and respond to a simple API config.StaticPodURLHeader[k] = []string{""} } // log the kubelet's config for inspection - klog.V(5).InfoS("KubeletConfiguration", "configuration", config) + klog.V(5).InfoS("KubeletConfiguration", "configuration", kubeletServer.KubeletConfiguration) // run the kubelet - return Run(ctx, kubeletServer, kubeletDeps, utilfeature.DefaultFeatureGate) + if err := Run(ctx, kubeletServer, kubeletDeps, utilfeature.DefaultFeatureGate); err != nil { + klog.ErrorS(err, "Failed to run kubelet") + os.Exit(1) + } }, } @@ -368,6 +405,15 @@ func UnsecuredDependencies(s *options.KubeletServer, featureGate featuregate.Fea hu := hostutil.NewHostUtil() var pluginRunner = exec.New() + var dockerOptions *kubelet.DockerOptions + if s.ContainerRuntime == kubetypes.DockerContainerRuntime { + dockerOptions = &kubelet.DockerOptions{ + DockerEndpoint: s.DockerEndpoint, + RuntimeRequestTimeout: s.RuntimeRequestTimeout.Duration, + ImagePullProgressDeadline: s.ImagePullProgressDeadline.Duration, + } + } + plugins, err := ProbeVolumePlugins(featureGate) if err != nil { return nil, err @@ -377,6 +423,7 @@ func UnsecuredDependencies(s *options.KubeletServer, featureGate featuregate.Fea CAdvisorInterface: nil, // cadvisor.New launches background processes (bg http.ListenAndServe, and some bg cleaners), not set here Cloud: nil, // cloud provider might start background processes ContainerManager: nil, + DockerOptions: dockerOptions, KubeClient: nil, HeartbeatClient: nil, EventClient: nil, @@ -397,9 +444,6 @@ func UnsecuredDependencies(s *options.KubeletServer, featureGate featuregate.Fea func Run(ctx context.Context, s *options.KubeletServer, kubeDeps *kubelet.Dependencies, featureGate featuregate.FeatureGate) error { // To help debugging, immediately log version klog.InfoS("Kubelet version", "kubeletVersion", version.Get()) - - klog.InfoS("Golang settings", "GOGC", os.Getenv("GOGC"), "GOMAXPROCS", os.Getenv("GOMAXPROCS"), "GOTRACEBACK", os.Getenv("GOTRACEBACK")) - if err := initForOS(s.KubeletFlags.WindowsService, s.KubeletFlags.WindowsPriorityClass); err != nil { return fmt.Errorf("failed OS init: %w", err) } @@ -562,14 +606,14 @@ func run(ctx context.Context, s *options.KubeletServer, kubeDeps *kubelet.Depend klog.InfoS("Standalone mode, no API client") case kubeDeps.KubeClient == nil, kubeDeps.EventClient == nil, kubeDeps.HeartbeatClient == nil: - clientConfig, onHeartbeatFailure, err := buildKubeletClientConfig(ctx, s, nodeName) + clientConfig, closeAllConns, err := buildKubeletClientConfig(ctx, s, nodeName) if err != nil { return err } - if onHeartbeatFailure == nil { - return errors.New("onHeartbeatFailure must be a valid function other than nil") + if closeAllConns == nil { + return errors.New("closeAllConns must be a valid function other than nil") } - kubeDeps.OnHeartbeatFailure = onHeartbeatFailure + kubeDeps.OnHeartbeatFailure = closeAllConns kubeDeps.KubeClient, err = clientset.NewForConfig(clientConfig) if err != nil { @@ -620,11 +664,12 @@ func run(ctx context.Context, s *options.KubeletServer, kubeDeps *kubelet.Depend cgroupRoots = append(cgroupRoots, kubeletCgroup) } + runtimeCgroup, err := cm.GetRuntimeContainer(s.ContainerRuntime, s.RuntimeCgroups) if err != nil { klog.InfoS("Failed to get the container runtime's cgroup. Runtime system container metrics may be missing.", "err", err) - } else if s.RuntimeCgroups != "" { + } else if runtimeCgroup != "" { // RuntimeCgroups is optional, so ignore if it isn't specified - cgroupRoots = append(cgroupRoots, s.RuntimeCgroups) + cgroupRoots = append(cgroupRoots, runtimeCgroup) } if s.SystemCgroups != "" { @@ -633,8 +678,8 @@ func run(ctx context.Context, s *options.KubeletServer, kubeDeps *kubelet.Depend } if kubeDeps.CAdvisorInterface == nil { - imageFsInfoProvider := cadvisor.NewImageFsInfoProvider(s.RemoteRuntimeEndpoint) - kubeDeps.CAdvisorInterface, err = cadvisor.New(imageFsInfoProvider, s.RootDirectory, cgroupRoots, cadvisor.UsingLegacyCadvisorStats(s.RemoteRuntimeEndpoint)) + imageFsInfoProvider := cadvisor.NewImageFsInfoProvider(s.ContainerRuntime, s.RemoteRuntimeEndpoint) + kubeDeps.CAdvisorInterface, err = cadvisor.New(imageFsInfoProvider, s.RootDirectory, cgroupRoots, cadvisor.UsingLegacyCadvisorStats(s.ContainerRuntime, s.RemoteRuntimeEndpoint)) if err != nil { return err } @@ -710,7 +755,7 @@ func run(ctx context.Context, s *options.KubeletServer, kubeDeps *kubelet.Depend RuntimeCgroupsName: s.RuntimeCgroups, SystemCgroupsName: s.SystemCgroups, KubeletCgroupsName: s.KubeletCgroups, - KubeletOOMScoreAdj: s.OOMScoreAdj, + ContainerRuntime: s.ContainerRuntime, CgroupsPerQOS: s.CgroupsPerQOS, CgroupRoot: s.CgroupRoot, CgroupDriver: s.CgroupDriver, @@ -746,13 +791,21 @@ func run(ctx context.Context, s *options.KubeletServer, kubeDeps *kubelet.Depend } } + utilruntime.ReallyCrash = s.ReallyCrashForTesting + // TODO(vmarmol): Do this through container config. oomAdjuster := kubeDeps.OOMAdjuster if err := oomAdjuster.ApplyOOMScoreAdj(0, int(s.OOMScoreAdj)); err != nil { klog.InfoS("Failed to ApplyOOMScoreAdj", "err", err) } - err = kubelet.PreInitRuntimeService(&s.KubeletConfiguration, kubeDeps, s.RemoteRuntimeEndpoint, s.RemoteImageEndpoint) + err = kubelet.PreInitRuntimeService(&s.KubeletConfiguration, + kubeDeps, &s.ContainerRuntimeOptions, + s.ContainerRuntime, + s.RuntimeCgroups, + s.RemoteRuntimeEndpoint, + s.RemoteImageEndpoint, + s.NonMasqueradeCIDR) if err != nil { return err } @@ -761,6 +814,14 @@ func run(ctx context.Context, s *options.KubeletServer, kubeDeps *kubelet.Depend return err } + // If the kubelet config controller is available, and dynamic config is enabled, start the config and status sync loops + if utilfeature.DefaultFeatureGate.Enabled(features.DynamicKubeletConfig) && len(s.DynamicConfigDir.Value()) > 0 && + kubeDeps.KubeletConfigController != nil && !standaloneMode && !s.RunOnce { + if err := kubeDeps.KubeletConfigController.StartSync(kubeDeps.KubeClient, kubeDeps.EventClient, string(nodeName)); err != nil { + return err + } + } + if s.HealthzPort > 0 { mux := http.NewServeMux() healthz.InstallHandler(mux) @@ -827,7 +888,7 @@ func buildKubeletClientConfig(ctx context.Context, s *options.KubeletServer, nod } legacyregistry.RawMustRegister(metrics.NewGaugeFunc( - &metrics.GaugeOpts{ + metrics.GaugeOpts{ Subsystem: kubeletmetrics.KubeletSubsystem, Name: "certificate_manager_client_ttl_seconds", Help: "Gauge of the TTL (time-to-live) of the Kubelet's client certificate. " + @@ -853,24 +914,11 @@ func buildKubeletClientConfig(ctx context.Context, s *options.KubeletServer, nod if err != nil { return nil, nil, err } - var onHeartbeatFailure func() - // Kubelet needs to be able to recover from stale http connections. - // HTTP2 has a mechanism to detect broken connections by sending periodical pings. - // HTTP1 only can have one persistent connection, and it will close all Idle connections - // once the Kubelet heartbeat fails. However, since there are many edge cases that we can't - // control, users can still opt-in to the previous behavior for closing the connections by - // setting the environment variable DISABLE_HTTP2. - if s := os.Getenv("DISABLE_HTTP2"); len(s) > 0 { - klog.InfoS("HTTP2 has been explicitly disabled, Kubelet will forcefully close active connections on heartbeat failures") - onHeartbeatFailure = closeAllConns - } else { - onHeartbeatFailure = func() { utilnet.CloseIdleConnectionsFor(transportConfig.Transport) } - } klog.V(2).InfoS("Starting client certificate rotation") clientCertificateManager.Start() - return transportConfig, onHeartbeatFailure, nil + return transportConfig, closeAllConns, nil } if len(s.BootstrapKubeconfig) > 0 { @@ -894,19 +942,19 @@ func buildKubeletClientConfig(ctx context.Context, s *options.KubeletServer, nod // once the Kubelet heartbeat fails. However, since there are many edge cases that we can't // control, users can still opt-in to the previous behavior for closing the connections by // setting the environment variable DISABLE_HTTP2. - var onHeartbeatFailure func() + var closeAllConns func() if s := os.Getenv("DISABLE_HTTP2"); len(s) > 0 { klog.InfoS("HTTP2 has been explicitly disabled, updating Kubelet client Dialer to forcefully close active connections on heartbeat failures") - onHeartbeatFailure, err = updateDialer(clientConfig) + closeAllConns, err = updateDialer(clientConfig) if err != nil { return nil, nil, err } } else { - onHeartbeatFailure = func() { + closeAllConns = func() { utilnet.CloseIdleConnectionsFor(clientConfig.Transport) } } - return clientConfig, onHeartbeatFailure, nil + return clientConfig, closeAllConns, nil } // updateDialer instruments a restconfig with a dial. the returned function allows forcefully closing all active connections. @@ -1129,6 +1177,7 @@ func RunKubelet(kubeServer *options.KubeletServer, kubeDeps *kubelet.Dependencie k, err := createAndInitKubelet(&kubeServer.KubeletConfiguration, kubeDeps, &kubeServer.ContainerRuntimeOptions, + kubeServer.ContainerRuntime, hostname, hostnameOverridden, nodeName, @@ -1144,6 +1193,7 @@ func RunKubelet(kubeServer *options.KubeletServer, kubeDeps *kubelet.Dependencie kubeServer.AllowedUnsafeSysctls, kubeServer.ExperimentalMounterPath, kubeServer.KernelMemcgNotification, + kubeServer.ExperimentalCheckNodeCapabilitiesBeforeMount, kubeServer.ExperimentalNodeAllocatableIgnoreEvictionThreshold, kubeServer.MinimumGCAge, kubeServer.MaxPerPodContainerCount, @@ -1202,6 +1252,7 @@ func startKubelet(k kubelet.Bootstrap, podCfg *config.PodConfig, kubeCfg *kubele func createAndInitKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, kubeDeps *kubelet.Dependencies, crOptions *config.ContainerRuntimeOptions, + containerRuntime string, hostname string, hostnameOverridden bool, nodeName types.NodeName, @@ -1217,6 +1268,7 @@ func createAndInitKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, allowedUnsafeSysctls []string, experimentalMounterPath string, kernelMemcgNotification bool, + experimentalCheckNodeCapabilitiesBeforeMount bool, experimentalNodeAllocatableIgnoreEvictionThreshold bool, minimumGCAge metav1.Duration, maxPerPodContainerCount int32, @@ -1234,6 +1286,7 @@ func createAndInitKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, k, err = kubelet.NewMainKubelet(kubeCfg, kubeDeps, crOptions, + containerRuntime, hostname, hostnameOverridden, nodeName, @@ -1249,6 +1302,7 @@ func createAndInitKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, allowedUnsafeSysctls, experimentalMounterPath, kernelMemcgNotification, + experimentalCheckNodeCapabilitiesBeforeMount, experimentalNodeAllocatableIgnoreEvictionThreshold, minimumGCAge, maxPerPodContainerCount, @@ -1296,3 +1350,26 @@ func parseResourceList(m map[string]string) (v1.ResourceList, error) { } return rl, nil } + +// BootstrapKubeletConfigController constructs and bootstrap a configuration controller +func BootstrapKubeletConfigController(dynamicConfigDir string, transform dynamickubeletconfig.TransformFunc) (*kubeletconfiginternal.KubeletConfiguration, *dynamickubeletconfig.Controller, error) { + if !utilfeature.DefaultFeatureGate.Enabled(features.DynamicKubeletConfig) { + return nil, nil, fmt.Errorf("failed to bootstrap Kubelet config controller, you must enable the DynamicKubeletConfig feature gate") + } + if len(dynamicConfigDir) == 0 { + return nil, nil, fmt.Errorf("cannot bootstrap Kubelet config controller, --dynamic-config-dir was not provided") + } + + // compute absolute path and bootstrap controller + dir, err := filepath.Abs(dynamicConfigDir) + if err != nil { + return nil, nil, fmt.Errorf("failed to get absolute path for --dynamic-config-dir=%s", dynamicConfigDir) + } + // get the latest KubeletConfiguration checkpoint from disk, or return the default config if no valid checkpoints exist + c := dynamickubeletconfig.NewController(dir, transform) + kc, err := c.Bootstrap() + if err != nil { + return nil, nil, fmt.Errorf("failed to determine a valid configuration, error: %w", err) + } + return kc, c, nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/server_windows.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/server_windows.go index 6b5f2a5f4f21..07cbbf404909 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/server_windows.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/cmd/kubelet/app/server_windows.go @@ -20,27 +20,66 @@ limitations under the License. package app import ( - "errors" + "fmt" "os/user" "golang.org/x/sys/windows" - "k8s.io/klog/v2" ) +func isAdmin() (bool, error) { + // Get current user + u, err := user.Current() + if err != nil { + return false, fmt.Errorf("error retrieving current user: %s", err) + } + // Get IDs of group user is a member of + ids, err := u.GroupIds() + if err != nil { + return false, fmt.Errorf("error retrieving group ids: %s", err) + } + + // Check for existence of BUILTIN\ADMINISTRATORS group id + for i := range ids { + // BUILTIN\ADMINISTRATORS + if "S-1-5-32-544" == ids[i] { + return true, nil + } + } + return false, nil +} + func checkPermissions() error { + //https://github.com/golang/go/issues/28804#issuecomment-505326268 + var sid *windows.SID + var userIsAdmin bool - u, err := user.Current() + // https://docs.microsoft.com/en-us/windows/desktop/api/securitybaseapi/nf-securitybaseapi-checktokenmembership + err := windows.AllocateAndInitializeSid( + &windows.SECURITY_NT_AUTHORITY, + 2, + windows.SECURITY_BUILTIN_DOMAIN_RID, + windows.DOMAIN_ALIAS_RID_ADMINS, + 0, 0, 0, 0, 0, 0, + &sid) if err != nil { - klog.ErrorS(err, "Unable to get current user") - return err + return fmt.Errorf("error while checking for elevated permissions: %s", err) } - // For Windows user.UserName contains the login name and user.Name contains - // the user's display name - https://pkg.go.dev/os/user#User - klog.InfoS("Kubelet is running as", "login name", u.Username, "dispaly name", u.Name) + //We must free the sid to prevent security token leaks + defer windows.FreeSid(sid) + token := windows.Token(0) - if !windows.GetCurrentProcessToken().IsElevated() { - return errors.New("kubelet needs to run with elevated permissions!") + userIsAdmin, err = isAdmin() + if err != nil { + return fmt.Errorf("error while checking admin group membership: %s", err) + } + + member, err := token.IsMember(sid) + if err != nil { + return fmt.Errorf("error while checking for elevated permissions: %s", err) + } + if !member { + return fmt.Errorf("kubelet needs to run with administrator permissions. Run as admin is: %t, User in admin group: %t", member, userIsAdmin) } return nil diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/api/pod/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/api/pod/OWNERS index 542dbb7fa69a..8048dbb3a81e 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/api/pod/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/api/pod/OWNERS @@ -1,5 +1,5 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - smarterclayton - - thockin +- smarterclayton +- thockin diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/api/pod/util.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/api/pod/util.go index 680433975436..34fed8c806f8 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/api/pod/util.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/api/pod/util.go @@ -571,42 +571,26 @@ func dropDisabledFields( }) } + if !utilfeature.DefaultFeatureGate.Enabled(features.PodOverhead) && !overheadInUse(oldPodSpec) { + // Set Overhead to nil only if the feature is disabled and it is not used + podSpec.Overhead = nil + } + dropDisabledProcMountField(podSpec, oldPodSpec) dropDisabledCSIVolumeSourceAlphaFields(podSpec, oldPodSpec) + if !utilfeature.DefaultFeatureGate.Enabled(features.NonPreemptingPriority) && + !podPriorityInUse(oldPodSpec) { + // Set to nil pod's PreemptionPolicy fields if the feature is disabled and the old pod + // does not specify any values for these fields. + podSpec.PreemptionPolicy = nil + } if !utilfeature.DefaultFeatureGate.Enabled(features.IdentifyPodOS) && !podOSInUse(oldPodSpec) { podSpec.OS = nil } - dropDisabledTopologySpreadConstraintsFields(podSpec, oldPodSpec) -} - -// dropDisabledTopologySpreadConstraintsFields removes disabled fields from PodSpec related -// to TopologySpreadConstraints only if it is not already used by the old spec. -func dropDisabledTopologySpreadConstraintsFields(podSpec, oldPodSpec *api.PodSpec) { - if !utilfeature.DefaultFeatureGate.Enabled(features.MinDomainsInPodTopologySpread) && - !minDomainsInUse(oldPodSpec) && - podSpec != nil { - for i := range podSpec.TopologySpreadConstraints { - podSpec.TopologySpreadConstraints[i].MinDomains = nil - } - } -} - -// minDomainsInUse returns true if the pod spec is non-nil -// and has non-nil MinDomains field in TopologySpreadConstraints. -func minDomainsInUse(podSpec *api.PodSpec) bool { - if podSpec == nil { - return false - } - - for _, c := range podSpec.TopologySpreadConstraints { - if c.MinDomains != nil { - return true - } - } - return false + dropDisabledPodAffinityTermFields(podSpec, oldPodSpec) } // podOSInUse returns true if the pod spec is non-nil and has OS field set @@ -647,6 +631,66 @@ func dropDisabledCSIVolumeSourceAlphaFields(podSpec, oldPodSpec *api.PodSpec) { } } +func dropPodAffinityTermNamespaceSelector(terms []api.PodAffinityTerm) { + for i := range terms { + terms[i].NamespaceSelector = nil + } +} + +func dropWeightedPodAffinityTermNamespaceSelector(terms []api.WeightedPodAffinityTerm) { + for i := range terms { + terms[i].PodAffinityTerm.NamespaceSelector = nil + } +} + +// dropDisabledPodAffinityTermFields removes disabled fields from PodSpec related +// to PodAffinityTerm only if it is not already used by the old spec +func dropDisabledPodAffinityTermFields(podSpec, oldPodSpec *api.PodSpec) { + if !utilfeature.DefaultFeatureGate.Enabled(features.PodAffinityNamespaceSelector) && + podSpec != nil && podSpec.Affinity != nil && + !podAffinityNamespaceSelectorInUse(oldPodSpec) { + if podSpec.Affinity.PodAffinity != nil { + dropPodAffinityTermNamespaceSelector(podSpec.Affinity.PodAffinity.RequiredDuringSchedulingIgnoredDuringExecution) + dropWeightedPodAffinityTermNamespaceSelector(podSpec.Affinity.PodAffinity.PreferredDuringSchedulingIgnoredDuringExecution) + } + if podSpec.Affinity.PodAntiAffinity != nil { + dropPodAffinityTermNamespaceSelector(podSpec.Affinity.PodAntiAffinity.RequiredDuringSchedulingIgnoredDuringExecution) + dropWeightedPodAffinityTermNamespaceSelector(podSpec.Affinity.PodAntiAffinity.PreferredDuringSchedulingIgnoredDuringExecution) + } + } +} + +func podAffinityNamespaceSelectorInUse(podSpec *api.PodSpec) bool { + if podSpec == nil || podSpec.Affinity == nil { + return false + } + if podSpec.Affinity.PodAffinity != nil { + for _, t := range podSpec.Affinity.PodAffinity.RequiredDuringSchedulingIgnoredDuringExecution { + if t.NamespaceSelector != nil { + return true + } + } + for _, t := range podSpec.Affinity.PodAffinity.PreferredDuringSchedulingIgnoredDuringExecution { + if t.PodAffinityTerm.NamespaceSelector != nil { + return true + } + } + } + if podSpec.Affinity.PodAntiAffinity != nil { + for _, t := range podSpec.Affinity.PodAntiAffinity.RequiredDuringSchedulingIgnoredDuringExecution { + if t.NamespaceSelector != nil { + return true + } + } + for _, t := range podSpec.Affinity.PodAntiAffinity.PreferredDuringSchedulingIgnoredDuringExecution { + if t.PodAffinityTerm.NamespaceSelector == nil { + return true + } + } + } + return false +} + func ephemeralContainersInUse(podSpec *api.PodSpec) bool { if podSpec == nil { return false @@ -654,6 +698,17 @@ func ephemeralContainersInUse(podSpec *api.PodSpec) bool { return len(podSpec.EphemeralContainers) > 0 } +// overheadInUse returns true if the pod spec is non-nil and has Overhead set +func overheadInUse(podSpec *api.PodSpec) bool { + if podSpec == nil { + return false + } + if podSpec.Overhead != nil { + return true + } + return false +} + // procMountInUse returns true if the pod spec is non-nil and has a SecurityContext's ProcMount field set to a non-default value func procMountInUse(podSpec *api.PodSpec) bool { if podSpec == nil { @@ -685,6 +740,17 @@ func appArmorInUse(podAnnotations map[string]string) bool { return false } +// podPriorityInUse returns true if the pod spec is non-nil and has Priority or PriorityClassName set. +func podPriorityInUse(podSpec *api.PodSpec) bool { + if podSpec == nil { + return false + } + if podSpec.Priority != nil || podSpec.PriorityClassName != "" { + return true + } + return false +} + // emptyDirSizeLimitInUse returns true if any pod's EmptyDir volumes use SizeLimit. func emptyDirSizeLimitInUse(podSpec *api.PodSpec) bool { if podSpec == nil { diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/api/service/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/api/service/OWNERS index a1efa9b2af5e..0abbe713952d 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/api/service/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/api/service/OWNERS @@ -1,5 +1,5 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - justinsb - - freehan +- justinsb +- freehan diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/api/v1/resource/helpers.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/api/v1/resource/helpers.go index 707cfc2242a2..49a107c10d2f 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/api/v1/resource/helpers.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/api/v1/resource/helpers.go @@ -71,7 +71,7 @@ func PodRequestsAndLimitsReuse(pod *v1.Pod, reuseReqs, reuseLimits v1.ResourceLi // if PodOverhead feature is supported, add overhead for running a pod // to the sum of requests and to non-zero limits: - if pod.Spec.Overhead != nil { + if pod.Spec.Overhead != nil && utilfeature.DefaultFeatureGate.Enabled(features.PodOverhead) { addResourceList(reqs, pod.Spec.Overhead) for name, quantity := range pod.Spec.Overhead { @@ -152,7 +152,7 @@ func GetResourceRequestQuantity(pod *v1.Pod, resourceName v1.ResourceName) resou // if PodOverhead feature is supported, add overhead for running a pod // to the total requests if the resource total is non-zero - if pod.Spec.Overhead != nil { + if pod.Spec.Overhead != nil && utilfeature.DefaultFeatureGate.Enabled(features.PodOverhead) { if podOverhead, ok := pod.Spec.Overhead[resourceName]; ok && !requestQuantity.IsZero() { requestQuantity.Add(podOverhead) } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/api/v1/service/util.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/api/v1/service/util.go index 928c82c34f6e..68913287c139 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/api/v1/service/util.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/api/v1/service/util.go @@ -67,8 +67,8 @@ func GetLoadBalancerSourceRanges(service *v1.Service) (utilnet.IPNetSet, error) return ipnets, nil } -// ExternalPolicyLocal checks if service has ETP = Local. -func ExternalPolicyLocal(service *v1.Service) bool { +// RequestsOnlyLocalTraffic checks if service requests OnlyLocal traffic. +func RequestsOnlyLocalTraffic(service *v1.Service) bool { if service.Spec.Type != v1.ServiceTypeLoadBalancer && service.Spec.Type != v1.ServiceTypeNodePort { return false @@ -76,8 +76,9 @@ func ExternalPolicyLocal(service *v1.Service) bool { return service.Spec.ExternalTrafficPolicy == v1.ServiceExternalTrafficPolicyTypeLocal } -// InternalPolicyLocal checks if service has ITP = Local. -func InternalPolicyLocal(service *v1.Service) bool { +// RequestsOnlyLocalTrafficForInternal checks if service prefers Node Local +// endpoints for internal traffic +func RequestsOnlyLocalTrafficForInternal(service *v1.Service) bool { if service.Spec.InternalTrafficPolicy == nil { return false } @@ -89,7 +90,7 @@ func NeedsHealthCheck(service *v1.Service) bool { if service.Spec.Type != v1.ServiceTypeLoadBalancer { return false } - return ExternalPolicyLocal(service) + return RequestsOnlyLocalTraffic(service) } // GetServiceHealthCheckPathPort returns the path and nodePort programmed into the Cloud LB Health Check diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/apps/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/apps/OWNERS index 885cc9f3e9f2..ec350aa4ff8f 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/apps/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/apps/OWNERS @@ -2,7 +2,7 @@ # approval on api packages bubbles to api-approvers reviewers: - - sig-apps-api-reviewers - - sig-apps-api-approvers +- sig-apps-api-reviewers +- sig-apps-api-approvers labels: - - sig/apps +- sig/apps diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/apps/types.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/apps/types.go index 771b2ef23c85..70a841c285f4 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/apps/types.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/apps/types.go @@ -92,20 +92,9 @@ const ( // RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. type RollingUpdateStatefulSetStrategy struct { - // Partition indicates the ordinal at which the StatefulSet should be partitioned - // for updates. During a rolling update, all pods from ordinal Replicas-1 to - // Partition are updated. All pods from ordinal Partition-1 to 0 remain untouched. - // This is helpful in being able to do a canary based deployment. The default value is 0. + // Partition indicates the ordinal at which the StatefulSet should be + // partitioned. Partition int32 - // The maximum number of pods that can be unavailable during the update. - // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). - // Absolute number is calculated from percentage by rounding up. This can not be 0. - // Defaults to 1. This field is alpha-level and is only honored by servers that enable the - // MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to - // Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it - // will be counted towards MaxUnavailable. - // +optional - MaxUnavailable *intstr.IntOrString } // PersistentVolumeClaimRetentionPolicyType is a string enumeration of the policies that will determine @@ -257,7 +246,6 @@ type StatefulSetStatus struct { // Total number of available pods (ready for at least minReadySeconds) targeted by this statefulset. // This is a beta field and requires enabling StatefulSetMinReadySeconds feature gate. - // +optional AvailableReplicas int32 } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/apps/validation/validation.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/apps/validation/validation.go index 24c2f65432f0..e2eedf45c5ad 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/apps/validation/validation.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/apps/validation/validation.go @@ -115,8 +115,10 @@ func ValidateStatefulSetSpec(spec *apps.StatefulSetSpec, fldPath *field.Path, op } case apps.RollingUpdateStatefulSetStrategyType: if spec.UpdateStrategy.RollingUpdate != nil { - allErrs = append(allErrs, validateRollingUpdateStatefulSet(spec.UpdateStrategy.RollingUpdate, fldPath.Child("updateStrategy", "rollingUpdate"))...) - + allErrs = append(allErrs, + apivalidation.ValidateNonnegativeField( + int64(spec.UpdateStrategy.RollingUpdate.Partition), + fldPath.Child("updateStrategy").Child("rollingUpdate").Child("partition"))...) } default: allErrs = append(allErrs, @@ -417,26 +419,6 @@ func ValidateRollingUpdateDaemonSet(rollingUpdate *apps.RollingUpdateDaemonSet, return allErrs } -// validateRollingUpdateStatefulSet validates a given RollingUpdateStatefulSet. -func validateRollingUpdateStatefulSet(rollingUpdate *apps.RollingUpdateStatefulSetStrategy, fldPath *field.Path) field.ErrorList { - var allErrs field.ErrorList - fldPathMaxUn := fldPath.Child("maxUnavailable") - allErrs = append(allErrs, - apivalidation.ValidateNonnegativeField( - int64(rollingUpdate.Partition), - fldPath.Child("partition"))...) - if rollingUpdate.MaxUnavailable != nil { - allErrs = append(allErrs, ValidatePositiveIntOrPercent(*rollingUpdate.MaxUnavailable, fldPathMaxUn)...) - if getIntOrPercentValue(*rollingUpdate.MaxUnavailable) == 0 { - // MaxUnavailable cannot be 0. - allErrs = append(allErrs, field.Invalid(fldPathMaxUn, *rollingUpdate.MaxUnavailable, "cannot be 0")) - } - // Validate that MaxUnavailable is not more than 100%. - allErrs = append(allErrs, IsNotMoreThan100Percent(*rollingUpdate.MaxUnavailable, fldPathMaxUn)...) - } - return allErrs -} - // ValidateDaemonSetUpdateStrategy validates a given DaemonSetUpdateStrategy. func ValidateDaemonSetUpdateStrategy(strategy *apps.DaemonSetUpdateStrategy, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/apps/zz_generated.deepcopy.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/apps/zz_generated.deepcopy.go index 011086ca23a8..b496f6bff528 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/apps/zz_generated.deepcopy.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/apps/zz_generated.deepcopy.go @@ -24,7 +24,6 @@ package apps import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" - intstr "k8s.io/apimachinery/pkg/util/intstr" core "k8s.io/kubernetes/pkg/apis/core" ) @@ -622,11 +621,6 @@ func (in *RollingUpdateDeployment) DeepCopy() *RollingUpdateDeployment { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RollingUpdateStatefulSetStrategy) DeepCopyInto(out *RollingUpdateStatefulSetStrategy) { *out = *in - if in.MaxUnavailable != nil { - in, out := &in.MaxUnavailable, &out.MaxUnavailable - *out = new(intstr.IntOrString) - **out = **in - } return } @@ -813,7 +807,7 @@ func (in *StatefulSetUpdateStrategy) DeepCopyInto(out *StatefulSetUpdateStrategy if in.RollingUpdate != nil { in, out := &in.RollingUpdate, &out.RollingUpdate *out = new(RollingUpdateStatefulSetStrategy) - (*in).DeepCopyInto(*out) + **out = **in } return } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/OWNERS index ba7b77a5a78b..16d87597188e 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/autoscaling/OWNERS @@ -1,12 +1,14 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - thockin - - lavalamp - - smarterclayton - - wojtek-t - - deads2k - - caesarxuchao - - sttts - - ncdc - - dims +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- caesarxuchao +- sttts +- ncdc +- piosz +- dims +- errordeveloper diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/batch/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/batch/OWNERS index 885cc9f3e9f2..ec350aa4ff8f 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/batch/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/batch/OWNERS @@ -2,7 +2,7 @@ # approval on api packages bubbles to api-approvers reviewers: - - sig-apps-api-reviewers - - sig-apps-api-approvers +- sig-apps-api-reviewers +- sig-apps-api-approvers labels: - - sig/apps +- sig/apps diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/batch/types.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/batch/types.go index 5231dc0f3038..529748c2ee35 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/batch/types.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/batch/types.go @@ -194,10 +194,9 @@ type JobSpec struct { // `$(job-name)-$(index)-$(random-string)`, // the Pod hostname takes the form `$(job-name)-$(index)`. // - // More completion modes can be added in the future. - // If the Job controller observes a mode that it doesn't recognize, which - // is possible during upgrades due to version skew, the controller - // skips updates for the Job. + // This field is beta-level. More completion modes can be added in the future. + // If the Job controller observes a mode that it doesn't recognize, the + // controller skips updates for the Job. // +optional CompletionMode *CompletionMode @@ -209,6 +208,9 @@ type JobSpec struct { // Suspending a Job will reset the StartTime field of the Job, effectively // resetting the ActiveDeadlineSeconds timer too. Defaults to false. // + // This field is beta-level, gated by SuspendJob feature flag (enabled by + // default). + // // +optional Suspend *bool } @@ -245,8 +247,8 @@ type JobStatus struct { // The number of active pods which have a Ready condition. // - // This field is beta-level. The job controller populates the field when - // the feature gate JobReadyPods is enabled (enabled by default). + // This field is alpha-level. The job controller populates the field when + // the feature gate JobReadyPods is enabled (disabled by default). // +optional Ready *int32 @@ -376,12 +378,6 @@ type CronJobSpec struct { // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. Schedule string - // The time zone for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. - // If not specified, this will rely on the time zone of the kube-controller-manager process. - // ALPHA: This field is in alpha and must be enabled via the `CronJobTimeZone` feature gate. - // +optional - TimeZone *string - // Optional deadline in seconds for starting the job if it misses scheduled // time for any reason. Missed jobs executions will be counted as failed ones. // +optional diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/batch/zz_generated.deepcopy.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/batch/zz_generated.deepcopy.go index d5e5c02c3386..ccc36fd51db6 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/batch/zz_generated.deepcopy.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/batch/zz_generated.deepcopy.go @@ -92,11 +92,6 @@ func (in *CronJobList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CronJobSpec) DeepCopyInto(out *CronJobSpec) { *out = *in - if in.TimeZone != nil { - in, out := &in.TimeZone, &out.TimeZone - *out = new(string) - **out = **in - } if in.StartingDeadlineSeconds != nil { in, out := &in.StartingDeadlineSeconds, &out.StartingDeadlineSeconds *out = new(int64) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/OWNERS index 688ea8bd0cfc..6e2dd31dd0a6 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/OWNERS @@ -1,4 +1,4 @@ # See the OWNERS docs at https://go.k8s.io/owners labels: - - sig/apps +- sig/apps diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/helper/helpers.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/helper/helpers.go index c150f6ace5c0..f61166ce127d 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/helper/helpers.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/helper/helpers.go @@ -123,8 +123,9 @@ var standardResourceQuotaScopes = sets.NewString( ) // IsStandardResourceQuotaScope returns true if the scope is a standard value -func IsStandardResourceQuotaScope(str string) bool { - return standardResourceQuotaScopes.Has(str) || str == string(core.ResourceQuotaScopeCrossNamespacePodAffinity) +func IsStandardResourceQuotaScope(str string, allowNamespaceAffinityScope bool) bool { + return standardResourceQuotaScopes.Has(str) || + (allowNamespaceAffinityScope && str == string(core.ResourceQuotaScopeCrossNamespacePodAffinity)) } var podObjectCountQuotaResources = sets.NewString( diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/install/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/install/OWNERS index 215733b59788..e42e9dcf47af 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/install/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/install/OWNERS @@ -1,9 +1,9 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - lavalamp - - smarterclayton - - deads2k - - caesarxuchao - - liggitt - - dims +- lavalamp +- smarterclayton +- deads2k +- caesarxuchao +- liggitt +- dims diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/types.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/types.go index 5519db6cdf97..fc46e23eb1a7 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/types.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/types.go @@ -472,7 +472,7 @@ type PersistentVolumeClaimSpec struct { // * While DataSource ignores disallowed values (dropping them), DataSourceRef // preserves all values, and generates an error if a disallowed value is // specified. - // (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. + // (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled. // +optional DataSourceRef *TypedLocalObjectReference } @@ -2160,7 +2160,7 @@ type Container struct { Name string // Required. Image string - // Optional: The container image's entrypoint is used if this is not provided; cannot be updated. + // Optional: The docker image's entrypoint is used if this is not provided; cannot be updated. // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable // cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced // to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will @@ -2168,7 +2168,7 @@ type Container struct { // of whether the variable exists or not. // +optional Command []string - // Optional: The container image's cmd is used if this is not provided; cannot be updated. + // Optional: The docker image's cmd is used if this is not provided; cannot be updated. // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable // cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced // to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will @@ -2176,7 +2176,7 @@ type Container struct { // of whether the variable exists or not. // +optional Args []string - // Optional: Defaults to the container runtime's default working directory. + // Optional: Defaults to Docker's default. // +optional WorkingDir string // +optional @@ -2243,7 +2243,7 @@ type ProbeHandler struct { TCPSocket *TCPSocketAction // GRPC specifies an action involving a GRPC port. - // This is a beta field and requires enabling GRPCContainerProbe feature gate. + // This is an alpha field and requires enabling GRPCContainerProbe feature gate. // +featureGate=GRPCContainerProbe // +optional GRPC *GRPCAction @@ -2662,7 +2662,7 @@ type PodAffinityTerm struct { // namespaces specifies a static list of namespace names that the term applies to. // The term is applied to the union of the namespaces listed in this field // and the ones selected by namespaceSelector. - // null or empty namespaces list and null namespaceSelector means "this pod's namespace". + // null or empty namespaces list and null namespaceSelector means "this pod's namespace" // +optional Namespaces []string // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching @@ -2676,6 +2676,7 @@ type PodAffinityTerm struct { // and the ones listed in the namespaces field. // null selector and null or empty namespaces list means "this pod's namespace". // An empty selector ({}) matches all namespaces. + // This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. // +optional NamespaceSelector *metav1.LabelSelector } @@ -2867,7 +2868,8 @@ type PodSpec struct { // +optional SecurityContext *PodSecurityContext // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. - // If specified, these secrets will be passed to individual puller implementations for them to use. + // If specified, these secrets will be passed to individual puller implementations for them to use. For example, + // in the case of docker, only DockerConfig type secrets are honored. // +optional ImagePullSecrets []LocalObjectReference // Specifies the hostname of the Pod. @@ -2916,6 +2918,7 @@ type PodSpec struct { // PreemptionPolicy is the Policy for preempting pods with lower priority. // One of Never, PreemptLowerPriority. // Defaults to PreemptLowerPriority if unset. + // This field is beta-level, gated by the NonPreemptingPriority feature-gate. // +optional PreemptionPolicy *PreemptionPolicy // Specifies the DNS parameters of a pod. @@ -2943,6 +2946,7 @@ type PodSpec struct { // set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value // defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. // More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead + // This field is beta-level as of Kubernetes v1.18, and is only honored by servers that enable the PodOverhead feature. // +optional Overhead ResourceList // EnableServiceLinks indicates whether information about services should be injected into pod's @@ -2983,7 +2987,7 @@ type PodSpec struct { // - spec.containers[*].securityContext.runAsUser // - spec.containers[*].securityContext.runAsGroup // +optional - // This is a beta field and requires the IdentifyPodOS feature + // This is an alpha field and requires the IdentifyPodOS feature OS *PodOS } @@ -3229,7 +3233,7 @@ type EphemeralContainerCommon struct { Name string // Required. Image string - // Optional: The container image's entrypoint is used if this is not provided; cannot be updated. + // Optional: The docker image's entrypoint is used if this is not provided; cannot be updated. // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable // cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced // to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will @@ -3237,7 +3241,7 @@ type EphemeralContainerCommon struct { // of whether the variable exists or not. // +optional Command []string - // Optional: The container image's cmd is used if this is not provided; cannot be updated. + // Optional: The docker image's cmd is used if this is not provided; cannot be updated. // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable // cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced // to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will @@ -3245,7 +3249,7 @@ type EphemeralContainerCommon struct { // of whether the variable exists or not. // +optional Args []string - // Optional: Defaults to the container runtime's default working directory. + // Optional: Defaults to Docker's default. // +optional WorkingDir string // Ports are not allowed for ephemeral containers. @@ -3376,7 +3380,11 @@ type PodStatus struct { // startTime set. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-and-container-status InitContainerStatuses []ContainerStatus - // The list has one entry per app container in the manifest. + // The list has one entry per container in the manifest. Each entry is + // currently the output of `docker inspect`. This output format is *not* + // final and should not be relied upon. + // TODO: Make real decisions about what our info should look like. Re-enable fuzz test + // when we have done this. // +optional ContainerStatuses []ContainerStatus @@ -3832,10 +3840,6 @@ type ServiceSpec struct { // This feature depends on whether the underlying cloud-provider supports specifying // the loadBalancerIP when a load balancer is created. // This field will be ignored if the cloud-provider does not support the feature. - // Deprecated: This field was under-specified and its meaning varies across implementations, - // and it cannot support dual-stack. - // As of Kubernetes v1.24, users are encouraged to use implementation-specific annotations when available. - // This field may be removed in a future API version. // +optional LoadBalancerIP string @@ -3888,6 +3892,7 @@ type ServiceSpec struct { // value), those requests will be respected, regardless of this field. // This field may only be set for services with type LoadBalancer and will // be cleared if the type is changed to any other type. + // This field is beta-level and is only honored by servers that enable the ServiceLBNodePortControl feature. // +optional AllocateLoadBalancerNodePorts *bool @@ -3930,7 +3935,7 @@ type ServicePort struct { // The application protocol for this port. // This field follows standard Kubernetes label syntax. // Un-prefixed names are reserved for IANA standard service names (as per - // RFC-6335 and https://www.iana.org/assignments/service-names). + // RFC-6335 and http://www.iana.org/assignments/service-names). // Non-standard protocols should use prefixed names such as // mycompany.com/my-custom-protocol. // +optional @@ -3982,10 +3987,7 @@ type ServiceAccount struct { // +optional metav1.ObjectMeta - // Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. - // Pods are only limited to this list if this service account has a "kubernetes.io/enforce-mountable-secrets" annotation set to "true". - // This field should not be used to find auto-generated service account token secrets for use outside of pods. - // Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. + // Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount Secrets []ObjectReference // ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images @@ -4083,7 +4085,7 @@ type EndpointPort struct { // The application protocol for this port. // This field follows standard Kubernetes label syntax. // Un-prefixed names are reserved for IANA standard service names (as per - // RFC-6335 and https://www.iana.org/assignments/service-names). + // RFC-6335 and http://www.iana.org/assignments/service-names). // Non-standard protocols should use prefixed names such as // mycompany.com/my-custom-protocol. // +optional @@ -4122,7 +4124,8 @@ type NodeSpec struct { // +optional Taints []Taint - // Deprecated: Previously used to specify the source of the node's configuration for the DynamicKubeletConfig feature. This feature is removed from Kubelets as of 1.24 and will be fully removed in 1.26. + // If specified, the source to get node configuration from + // The DynamicKubeletConfig feature gate must be enabled for the Kubelet to use this field // +optional ConfigSource *NodeConfigSource @@ -4132,12 +4135,12 @@ type NodeSpec struct { DoNotUseExternalID string } -// Deprecated: NodeConfigSource specifies a source of node configuration. Exactly one subfield must be non-nil. +// NodeConfigSource specifies a source of node configuration. Exactly one subfield must be non-nil. type NodeConfigSource struct { ConfigMap *ConfigMapNodeConfigSource } -// Deprecated: ConfigMapNodeConfigSource represents the config map of a node +// ConfigMapNodeConfigSource represents the config map of a node type ConfigMapNodeConfigSource struct { // Namespace is the metadata.namespace of the referenced ConfigMap. // This field is required in all cases. @@ -5061,6 +5064,7 @@ const ( // Match all pod objects that have priority class mentioned ResourceQuotaScopePriorityClass ResourceQuotaScope = "PriorityClass" // Match all pod objects that have cross-namespace pod (anti)affinity mentioned + // This is a beta feature enabled by the PodAffinityNamespaceSelector feature flag. ResourceQuotaScopeCrossNamespacePodAffinity ResourceQuotaScope = "CrossNamespacePodAffinity" ) @@ -5599,18 +5603,15 @@ type TopologySpreadConstraint struct { // MaxSkew describes the degree to which pods may be unevenly distributed. // When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference // between the number of matching pods in the target topology and the global minimum. - // The global minimum is the minimum number of matching pods in an eligible domain - // or zero if the number of eligible domains is less than MinDomains. // For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same - // labelSelector spread as 2/2/1: - // In this case, the global minimum is 1. + // labelSelector spread as 1/1/0: // +-------+-------+-------+ // | zone1 | zone2 | zone3 | // +-------+-------+-------+ - // | P P | P P | P | + // | P | P | | // +-------+-------+-------+ - // - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; - // scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) + // - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1; + // scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) // violate MaxSkew(1). // - if MaxSkew is 2, incoming pod can be scheduled onto any zone. // When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence @@ -5621,10 +5622,6 @@ type TopologySpreadConstraint struct { // and identical values are considered to be in the same topology. // We consider each as a "bucket", and try to put balanced number // of pods into each bucket. - // We define a domain as a particular instance of a topology. - // Also, we define an eligible domain as a domain whose nodes match the node selector. - // e.g. If TopologyKey is "kubernetes.io/hostname", each Node is a domain of that topology. - // And, if TopologyKey is "topology.kubernetes.io/zone", each zone is a domain of that topology. // It's a required field. TopologyKey string // WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy @@ -5654,32 +5651,6 @@ type TopologySpreadConstraint struct { // in their corresponding topology domain. // +optional LabelSelector *metav1.LabelSelector - // MinDomains indicates a minimum number of eligible domains. - // When the number of eligible domains with matching topology keys is less than minDomains, - // Pod Topology Spread treats "global minimum" as 0, and then the calculation of Skew is performed. - // And when the number of eligible domains with matching topology keys equals or greater than minDomains, - // this value has no effect on scheduling. - // As a result, when the number of eligible domains is less than minDomains, - // scheduler won't schedule more than maxSkew Pods to those domains. - // If value is nil, the constraint behaves as if MinDomains is equal to 1. - // Valid values are integers greater than 0. - // When value is not nil, WhenUnsatisfiable must be DoNotSchedule. - // - // For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same - // labelSelector spread as 2/2/2: - // +-------+-------+-------+ - // | zone1 | zone2 | zone3 | - // +-------+-------+-------+ - // | P P | P P | P P | - // +-------+-------+-------+ - // The number of domains is less than 5(MinDomains), so "global minimum" is treated as 0. - // In this situation, new pod with the same labelSelector cannot be scheduled, - // because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, - // it will violate MaxSkew. - // - // This is an alpha field and requires enabling MinDomainsInPodTopologySpread feature gate. - // +optional - MinDomains *int32 } // These are the built-in errors for PortStatus. diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/v1/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/v1/OWNERS index dfcc2e714b4c..6d9196b8c414 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/v1/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/v1/OWNERS @@ -1,24 +1,32 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - thockin - - lavalamp - - smarterclayton - - wojtek-t - - deads2k - - yujuhong - - derekwaynecarr - - caesarxuchao - - mikedanese - - liggitt - - sttts - - dchen1107 - - saad-ali - - luxas - - janetkuo - - justinsb - - ncdc - - tallclair - - jsafrane - - dims - - jayunit100 +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- yujuhong +- brendandburns +- derekwaynecarr +- caesarxuchao +- vishh +- mikedanese +- liggitt +- davidopp +- pmorie +- sttts +- dchen1107 +- saad-ali +- luxas +- janetkuo +- justinsb +- ncdc +- tallclair +- piosz +- jsafrane +- dims +- errordeveloper +- krousey +- jayunit100 +- rootfs diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/v1/defaults.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/v1/defaults.go index 0d16a8a1bda5..dc936458708d 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/v1/defaults.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/v1/defaults.go @@ -22,10 +22,11 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/intstr" + "k8s.io/kubernetes/pkg/util/parsers" + utilpointer "k8s.io/utils/pointer" + utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/kubernetes/pkg/features" - "k8s.io/kubernetes/pkg/util/parsers" - "k8s.io/utils/pointer" ) func addDefaultingFuncs(scheme *runtime.Scheme) error { @@ -63,7 +64,7 @@ func SetDefaults_ReplicationController(obj *v1.ReplicationController) { } } func SetDefaults_Volume(obj *v1.Volume) { - if pointer.AllPtrFieldsNil(&obj.VolumeSource) { + if utilpointer.AllPtrFieldsNil(&obj.VolumeSource) { obj.VolumeSource = v1.VolumeSource{ EmptyDir: &v1.EmptyDirVolumeSource{}, } @@ -130,19 +131,16 @@ func SetDefaults_Service(obj *v1.Service) { obj.Spec.ExternalTrafficPolicy = v1.ServiceExternalTrafficPolicyTypeCluster } - if utilfeature.DefaultFeatureGate.Enabled(features.ServiceInternalTrafficPolicy) { - if obj.Spec.InternalTrafficPolicy == nil { - if obj.Spec.Type == v1.ServiceTypeNodePort || obj.Spec.Type == v1.ServiceTypeLoadBalancer || obj.Spec.Type == v1.ServiceTypeClusterIP { - serviceInternalTrafficPolicyCluster := v1.ServiceInternalTrafficPolicyCluster - obj.Spec.InternalTrafficPolicy = &serviceInternalTrafficPolicyCluster - } - } - + if utilfeature.DefaultFeatureGate.Enabled(features.ServiceInternalTrafficPolicy) && obj.Spec.InternalTrafficPolicy == nil { + serviceInternalTrafficPolicyCluster := v1.ServiceInternalTrafficPolicyCluster + obj.Spec.InternalTrafficPolicy = &serviceInternalTrafficPolicyCluster } - if obj.Spec.Type == v1.ServiceTypeLoadBalancer { - if obj.Spec.AllocateLoadBalancerNodePorts == nil { - obj.Spec.AllocateLoadBalancerNodePorts = pointer.BoolPtr(true) + if utilfeature.DefaultFeatureGate.Enabled(features.ServiceLBNodePortControl) { + if obj.Spec.Type == v1.ServiceTypeLoadBalancer { + if obj.Spec.AllocateLoadBalancerNodePorts == nil { + obj.Spec.AllocateLoadBalancerNodePorts = utilpointer.BoolPtr(true) + } } } } @@ -328,17 +326,20 @@ func SetDefaults_HTTPGetAction(obj *v1.HTTPGetAction) { // SetDefaults_Namespace adds a default label for all namespaces func SetDefaults_Namespace(obj *v1.Namespace) { + // TODO, remove the feature gate in 1.22 // we can't SetDefaults for nameless namespaces (generateName). // This code needs to be kept in sync with the implementation that exists // in Namespace Canonicalize strategy (pkg/registry/core/namespace) // note that this can result in many calls to feature enablement in some cases, but // we assume that there's no real cost there. - if len(obj.Name) > 0 { - if obj.Labels == nil { - obj.Labels = map[string]string{} + if utilfeature.DefaultFeatureGate.Enabled(features.NamespaceDefaultLabelName) { + if len(obj.Name) > 0 { + if obj.Labels == nil { + obj.Labels = map[string]string{} + } + obj.Labels[v1.LabelMetadataName] = obj.Name } - obj.Labels[v1.LabelMetadataName] = obj.Name } } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/v1/zz_generated.conversion.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/v1/zz_generated.conversion.go index 3f613c62ee93..8118b1ba302f 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/v1/zz_generated.conversion.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/v1/zz_generated.conversion.go @@ -7994,7 +7994,6 @@ func autoConvert_v1_TopologySpreadConstraint_To_core_TopologySpreadConstraint(in out.TopologyKey = in.TopologyKey out.WhenUnsatisfiable = core.UnsatisfiableConstraintAction(in.WhenUnsatisfiable) out.LabelSelector = (*metav1.LabelSelector)(unsafe.Pointer(in.LabelSelector)) - out.MinDomains = (*int32)(unsafe.Pointer(in.MinDomains)) return nil } @@ -8008,7 +8007,6 @@ func autoConvert_core_TopologySpreadConstraint_To_v1_TopologySpreadConstraint(in out.TopologyKey = in.TopologyKey out.WhenUnsatisfiable = v1.UnsatisfiableConstraintAction(in.WhenUnsatisfiable) out.LabelSelector = (*metav1.LabelSelector)(unsafe.Pointer(in.LabelSelector)) - out.MinDomains = (*int32)(unsafe.Pointer(in.MinDomains)) return nil } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/validation/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/validation/OWNERS index b8cc1cafa29d..795b37f477cf 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/validation/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/validation/OWNERS @@ -1,23 +1,31 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - thockin - - lavalamp - - smarterclayton - - wojtek-t - - deads2k - - yujuhong - - derekwaynecarr - - caesarxuchao - - mikedanese - - liggitt - - sttts - - dchen1107 - - janetkuo - - justinsb - - pwittrock - - tallclair - - soltysh - - jsafrane - - dims - - fejta +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- yujuhong +- brendandburns +- derekwaynecarr +- caesarxuchao +- vishh +- mikedanese +- liggitt +- davidopp +- pmorie +- sttts +- quinton-hoole +- dchen1107 +- janetkuo +- justinsb +- pwittrock +- tallclair +- soltysh +- piosz +- jsafrane +- dims +- fejta +- krousey +- rootfs diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/validation/validation.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/validation/validation.go index 6357a631f942..d432bd0ae1a7 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/validation/validation.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/validation/validation.go @@ -29,7 +29,6 @@ import ( "unicode" "unicode/utf8" - "github.com/google/go-cmp/cmp" v1 "k8s.io/api/core/v1" apiequality "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apimachinery/pkg/api/resource" @@ -37,6 +36,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" unversionedvalidation "k8s.io/apimachinery/pkg/apis/meta/v1/validation" "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/util/diff" "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/validation" @@ -53,6 +53,7 @@ import ( "k8s.io/kubernetes/pkg/cluster/ports" "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/fieldpath" + "k8s.io/kubernetes/pkg/security/apparmor" netutils "k8s.io/utils/net" ) @@ -287,6 +288,9 @@ var ValidateServiceAccountName = apimachineryvalidation.ValidateServiceAccountNa // trailing dashes are allowed. var ValidateEndpointsName = apimachineryvalidation.NameIsDNSSubdomain +// ValidateClusterName can be used to check whether the given cluster name is valid. +var ValidateClusterName = apimachineryvalidation.ValidateClusterName + // ValidateClassName can be used to check whether the given class name is valid. // It is defined here to avoid import cycle between pkg/apis/storage/validation // (where it should be) and this file. @@ -1585,12 +1589,12 @@ func validateCSIPersistentVolumeSource(csi *core.CSIPersistentVolumeSource, fldP if csi.NodePublishSecretRef != nil { if len(csi.NodePublishSecretRef.Name) == 0 { - allErrs = append(allErrs, field.Required(fldPath.Child("nodePublishSecretRef", "name"), "")) + allErrs = append(allErrs, field.Required(fldPath.Child("nodePublishSecretRef ", "name"), "")) } else { allErrs = append(allErrs, ValidateDNS1123Label(csi.NodePublishSecretRef.Name, fldPath.Child("name"))...) } if len(csi.NodePublishSecretRef.Namespace) == 0 { - allErrs = append(allErrs, field.Required(fldPath.Child("nodePublishSecretRef", "namespace"), "")) + allErrs = append(allErrs, field.Required(fldPath.Child("nodePublishSecretRef ", "namespace"), "")) } else { allErrs = append(allErrs, ValidateDNS1123Label(csi.NodePublishSecretRef.Namespace, fldPath.Child("namespace"))...) } @@ -1605,7 +1609,7 @@ func validateCSIVolumeSource(csi *core.CSIVolumeSource, fldPath *field.Path) fie if csi.NodePublishSecretRef != nil { if len(csi.NodePublishSecretRef.Name) == 0 { - allErrs = append(allErrs, field.Required(fldPath.Child("nodePublishSecretRef", "name"), "")) + allErrs = append(allErrs, field.Required(fldPath.Child("nodePublishSecretRef ", "name"), "")) } else { for _, msg := range ValidateSecretName(csi.NodePublishSecretRef.Name, false) { allErrs = append(allErrs, field.Invalid(fldPath.Child("name"), csi.NodePublishSecretRef.Name, msg)) @@ -1994,7 +1998,7 @@ func ValidatePersistentVolumeUpdate(newPv, oldPv *core.PersistentVolume, opts Pe // PersistentVolumeSource should be immutable after creation. if !apiequality.Semantic.DeepEqual(newPv.Spec.PersistentVolumeSource, oldPv.Spec.PersistentVolumeSource) { - pvcSourceDiff := cmp.Diff(oldPv.Spec.PersistentVolumeSource, newPv.Spec.PersistentVolumeSource) + pvcSourceDiff := diff.ObjectDiff(newPv.Spec.PersistentVolumeSource, oldPv.Spec.PersistentVolumeSource) allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "persistentvolumesource"), fmt.Sprintf("spec.persistentvolumesource is immutable after creation\n%v", pvcSourceDiff))) } allErrs = append(allErrs, ValidateImmutableField(newPv.Spec.VolumeMode, oldPv.Spec.VolumeMode, field.NewPath("volumeMode"))...) @@ -2019,6 +2023,8 @@ func ValidatePersistentVolumeStatusUpdate(newPv, oldPv *core.PersistentVolume) f type PersistentVolumeClaimSpecValidationOptions struct { // Allow spec to contain the "ReadWiteOncePod" access mode AllowReadWriteOncePod bool + // Allow pvc expansion after PVC is created and bound to a PV + EnableExpansion bool // Allow users to recover from previously failing expansion operation EnableRecoverFromExpansionFailure bool } @@ -2026,6 +2032,7 @@ type PersistentVolumeClaimSpecValidationOptions struct { func ValidationOptionsForPersistentVolumeClaim(pvc, oldPvc *core.PersistentVolumeClaim) PersistentVolumeClaimSpecValidationOptions { opts := PersistentVolumeClaimSpecValidationOptions{ AllowReadWriteOncePod: utilfeature.DefaultFeatureGate.Enabled(features.ReadWriteOncePod), + EnableExpansion: utilfeature.DefaultFeatureGate.Enabled(features.ExpandPersistentVolumes), EnableRecoverFromExpansionFailure: utilfeature.DefaultFeatureGate.Enabled(features.RecoverVolumeExpansionFailure), } if oldPvc == nil { @@ -2172,30 +2179,40 @@ func ValidatePersistentVolumeClaimUpdate(newPvc, oldPvc *core.PersistentVolumeCl allErrs = append(allErrs, ValidateImmutableAnnotation(newPvc.ObjectMeta.Annotations[v1.BetaStorageClassAnnotation], oldPvc.ObjectMeta.Annotations[v1.BetaStorageClassAnnotation], v1.BetaStorageClassAnnotation, field.NewPath("metadata"))...) } - // lets make sure storage values are same. - if newPvc.Status.Phase == core.ClaimBound && newPvcClone.Spec.Resources.Requests != nil { - newPvcClone.Spec.Resources.Requests["storage"] = oldPvc.Spec.Resources.Requests["storage"] // +k8s:verify-mutation:reason=clone - } + if opts.EnableExpansion { + // lets make sure storage values are same. + if newPvc.Status.Phase == core.ClaimBound && newPvcClone.Spec.Resources.Requests != nil { + newPvcClone.Spec.Resources.Requests["storage"] = oldPvc.Spec.Resources.Requests["storage"] // +k8s:verify-mutation:reason=clone + } - oldSize := oldPvc.Spec.Resources.Requests["storage"] - newSize := newPvc.Spec.Resources.Requests["storage"] - statusSize := oldPvc.Status.Capacity["storage"] + oldSize := oldPvc.Spec.Resources.Requests["storage"] + newSize := newPvc.Spec.Resources.Requests["storage"] + statusSize := oldPvc.Status.Capacity["storage"] - if !apiequality.Semantic.DeepEqual(newPvcClone.Spec, oldPvcClone.Spec) { - specDiff := cmp.Diff(oldPvcClone.Spec, newPvcClone.Spec) - allErrs = append(allErrs, field.Forbidden(field.NewPath("spec"), fmt.Sprintf("spec is immutable after creation except resources.requests for bound claims\n%v", specDiff))) - } - if newSize.Cmp(oldSize) < 0 { - if !opts.EnableRecoverFromExpansionFailure { - allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "resources", "requests", "storage"), "field can not be less than previous value")) - } else { - // This validation permits reducing pvc requested size up to capacity recorded in pvc.status - // so that users can recover from volume expansion failure, but Kubernetes does not actually - // support volume shrinking - if newSize.Cmp(statusSize) <= 0 { - allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "resources", "requests", "storage"), "field can not be less than status.capacity")) + if !apiequality.Semantic.DeepEqual(newPvcClone.Spec, oldPvcClone.Spec) { + specDiff := diff.ObjectDiff(newPvcClone.Spec, oldPvcClone.Spec) + allErrs = append(allErrs, field.Forbidden(field.NewPath("spec"), fmt.Sprintf("spec is immutable after creation except resources.requests for bound claims\n%v", specDiff))) + } + if newSize.Cmp(oldSize) < 0 { + if !opts.EnableRecoverFromExpansionFailure { + allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "resources", "requests", "storage"), "field can not be less than previous value")) + } else { + // This validation permits reducing pvc requested size up to capacity recorded in pvc.status + // so that users can recover from volume expansion failure, but Kubernetes does not actually + // support volume shrinking + if newSize.Cmp(statusSize) <= 0 { + allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "resources", "requests", "storage"), "field can not be less than status.capacity")) + } } } + + } else { + // changes to Spec are not allowed, but updates to label/and some annotations are OK. + // no-op updates pass validation. + if !apiequality.Semantic.DeepEqual(newPvcClone.Spec, oldPvcClone.Spec) { + specDiff := diff.ObjectDiff(newPvcClone.Spec, oldPvcClone.Spec) + allErrs = append(allErrs, field.Forbidden(field.NewPath("spec"), fmt.Sprintf("field is immutable after creation\n%v", specDiff))) + } } allErrs = append(allErrs, ValidateImmutableField(newPvc.Spec.VolumeMode, oldPvc.Spec.VolumeMode, field.NewPath("volumeMode"))...) @@ -3219,7 +3236,9 @@ func validatePodDNSConfig(dnsConfig *core.PodDNSConfig, dnsPolicy *core.DNSPolic } for i, search := range dnsConfig.Searches { // it is fine to have a trailing dot - search = strings.TrimSuffix(search, ".") + if strings.HasSuffix(search, ".") { + search = search[0 : len(search)-1] + } allErrs = append(allErrs, ValidateDNS1123Subdomain(search, fldPath.Child("searches").Index(i))...) } // Validate options. @@ -4041,7 +4060,7 @@ func ValidateAppArmorPodAnnotations(annotations map[string]string, spec *core.Po allErrs = append(allErrs, field.Invalid(fldPath.Key(k), containerName, "container not found")) } - if err := ValidateAppArmorProfileFormat(p); err != nil { + if err := apparmor.ValidateProfileFormat(p); err != nil { allErrs = append(allErrs, field.Invalid(fldPath.Key(k), p, err.Error())) } } @@ -4049,16 +4068,6 @@ func ValidateAppArmorPodAnnotations(annotations map[string]string, spec *core.Po return allErrs } -func ValidateAppArmorProfileFormat(profile string) error { - if profile == "" || profile == v1.AppArmorBetaProfileRuntimeDefault || profile == v1.AppArmorBetaProfileNameUnconfined { - return nil - } - if !strings.HasPrefix(profile, v1.AppArmorBetaProfileNamePrefix) { - return fmt.Errorf("invalid AppArmor profile name: %q", profile) - } - return nil -} - func podSpecHasContainer(spec *core.PodSpec, containerName string) bool { var hasContainer bool podshelper.VisitContainersWithPath(spec, field.NewPath("spec"), func(c *core.Container, _ *field.Path) bool { @@ -4363,7 +4372,7 @@ func ValidatePodUpdate(newPod, oldPod *core.Pod, opts PodValidationOptions) fiel if !apiequality.Semantic.DeepEqual(mungedPodSpec, oldPod.Spec) { // This diff isn't perfect, but it's a helluva lot better an "I'm not going to tell you what the difference is". //TODO: Pinpoint the specific field that causes the invalid error after we have strategic merge diff - specDiff := cmp.Diff(oldPod.Spec, mungedPodSpec) + specDiff := diff.ObjectDiff(mungedPodSpec, oldPod.Spec) allErrs = append(allErrs, field.Forbidden(specPath, fmt.Sprintf("pod updates may not change fields other than `spec.containers[*].image`, `spec.initContainers[*].image`, `spec.activeDeadlineSeconds`, `spec.tolerations` (only additions to existing tolerations) or `spec.terminationGracePeriodSeconds` (allow it to be set to 1 if it was previously negative)\n%v", specDiff))) } @@ -4464,7 +4473,7 @@ func ValidatePodEphemeralContainersUpdate(newPod, oldPod *core.Pod, opts PodVali if new, ok := newContainerIndex[old.Name]; !ok { allErrs = append(allErrs, field.Forbidden(specPath, fmt.Sprintf("existing ephemeral containers %q may not be removed\n", old.Name))) } else if !apiequality.Semantic.DeepEqual(old, *new) { - specDiff := cmp.Diff(old, *new) + specDiff := diff.ObjectDiff(old, *new) allErrs = append(allErrs, field.Forbidden(specPath, fmt.Sprintf("existing ephemeral containers %q may not be changed\n%v", old.Name, specDiff))) } } @@ -4676,8 +4685,10 @@ func ValidateService(service *core.Service) field.ErrorList { allErrs = append(allErrs, field.Forbidden(specPath.Child("allocateLoadBalancerNodePorts"), "may only be used when `type` is 'LoadBalancer'")) } - if service.Spec.Type == core.ServiceTypeLoadBalancer && service.Spec.AllocateLoadBalancerNodePorts == nil { - allErrs = append(allErrs, field.Required(field.NewPath("allocateLoadBalancerNodePorts"), "")) + if utilfeature.DefaultFeatureGate.Enabled(features.ServiceLBNodePortControl) { + if service.Spec.Type == core.ServiceTypeLoadBalancer && service.Spec.AllocateLoadBalancerNodePorts == nil { + allErrs = append(allErrs, field.Required(field.NewPath("allocateLoadBalancerNodePorts"), "")) + } } // validate LoadBalancerClass field @@ -4800,12 +4811,7 @@ func validateServiceInternalTrafficFieldsValue(service *core.Service) field.Erro if utilfeature.DefaultFeatureGate.Enabled(features.ServiceInternalTrafficPolicy) { if service.Spec.InternalTrafficPolicy == nil { - // We do not forbid internalTrafficPolicy on other Service types because of historical reasons. - // We did not check that before it went beta and we don't want to invalidate existing stored objects. - if service.Spec.Type == core.ServiceTypeNodePort || - service.Spec.Type == core.ServiceTypeLoadBalancer || service.Spec.Type == core.ServiceTypeClusterIP { - allErrs = append(allErrs, field.Required(field.NewPath("spec").Child("internalTrafficPolicy"), "")) - } + allErrs = append(allErrs, field.Required(field.NewPath("spec").Child("internalTrafficPolicy"), "")) } } @@ -5558,13 +5564,13 @@ func ValidateSecret(secret *core.Secret) field.ErrorList { // username or password might be empty, but the field must be present if !usernameFieldExists && !passwordFieldExists { - allErrs = append(allErrs, field.Required(dataPath.Key(core.BasicAuthUsernameKey), "")) - allErrs = append(allErrs, field.Required(dataPath.Key(core.BasicAuthPasswordKey), "")) + allErrs = append(allErrs, field.Required(field.NewPath("data[%s]").Key(core.BasicAuthUsernameKey), "")) + allErrs = append(allErrs, field.Required(field.NewPath("data[%s]").Key(core.BasicAuthPasswordKey), "")) break } case core.SecretTypeSSHAuth: if len(secret.Data[core.SSHAuthPrivateKey]) == 0 { - allErrs = append(allErrs, field.Required(dataPath.Key(core.SSHAuthPrivateKey), "")) + allErrs = append(allErrs, field.Required(field.NewPath("data[%s]").Key(core.SSHAuthPrivateKey), "")) break } @@ -5748,7 +5754,7 @@ func validateResourceQuantityHugePageValue(name core.ResourceName, quantity reso } // validateResourceQuotaScopes ensures that each enumerated hard resource constraint is valid for set of scopes -func validateResourceQuotaScopes(resourceQuotaSpec *core.ResourceQuotaSpec, fld *field.Path) field.ErrorList { +func validateResourceQuotaScopes(resourceQuotaSpec *core.ResourceQuotaSpec, opts ResourceQuotaValidationOptions, fld *field.Path) field.ErrorList { allErrs := field.ErrorList{} if len(resourceQuotaSpec.Scopes) == 0 { return allErrs @@ -5760,7 +5766,7 @@ func validateResourceQuotaScopes(resourceQuotaSpec *core.ResourceQuotaSpec, fld fldPath := fld.Child("scopes") scopeSet := sets.NewString() for _, scope := range resourceQuotaSpec.Scopes { - if !helper.IsStandardResourceQuotaScope(string(scope)) { + if !helper.IsStandardResourceQuotaScope(string(scope), opts.AllowPodAffinityNamespaceSelector) { allErrs = append(allErrs, field.Invalid(fldPath, resourceQuotaSpec.Scopes, "unsupported scope")) } for _, k := range hardLimits.List() { @@ -5783,7 +5789,7 @@ func validateResourceQuotaScopes(resourceQuotaSpec *core.ResourceQuotaSpec, fld } // validateScopedResourceSelectorRequirement tests that the match expressions has valid data -func validateScopedResourceSelectorRequirement(resourceQuotaSpec *core.ResourceQuotaSpec, fld *field.Path) field.ErrorList { +func validateScopedResourceSelectorRequirement(resourceQuotaSpec *core.ResourceQuotaSpec, opts ResourceQuotaValidationOptions, fld *field.Path) field.ErrorList { allErrs := field.ErrorList{} hardLimits := sets.NewString() for k := range resourceQuotaSpec.Hard { @@ -5792,7 +5798,7 @@ func validateScopedResourceSelectorRequirement(resourceQuotaSpec *core.ResourceQ fldPath := fld.Child("matchExpressions") scopeSet := sets.NewString() for _, req := range resourceQuotaSpec.ScopeSelector.MatchExpressions { - if !helper.IsStandardResourceQuotaScope(string(req.ScopeName)) { + if !helper.IsStandardResourceQuotaScope(string(req.ScopeName), opts.AllowPodAffinityNamespaceSelector) { allErrs = append(allErrs, field.Invalid(fldPath.Child("scopeName"), req.ScopeName, "unsupported scope")) } for _, k := range hardLimits.List() { @@ -5838,20 +5844,26 @@ func validateScopedResourceSelectorRequirement(resourceQuotaSpec *core.ResourceQ } // validateScopeSelector tests that the specified scope selector has valid data -func validateScopeSelector(resourceQuotaSpec *core.ResourceQuotaSpec, fld *field.Path) field.ErrorList { +func validateScopeSelector(resourceQuotaSpec *core.ResourceQuotaSpec, opts ResourceQuotaValidationOptions, fld *field.Path) field.ErrorList { allErrs := field.ErrorList{} if resourceQuotaSpec.ScopeSelector == nil { return allErrs } - allErrs = append(allErrs, validateScopedResourceSelectorRequirement(resourceQuotaSpec, fld.Child("scopeSelector"))...) + allErrs = append(allErrs, validateScopedResourceSelectorRequirement(resourceQuotaSpec, opts, fld.Child("scopeSelector"))...) return allErrs } +// ResourceQuotaValidationOptions contains the different settings for ResourceQuota validation +type ResourceQuotaValidationOptions struct { + // Allow pod-affinity namespace selector validation. + AllowPodAffinityNamespaceSelector bool +} + // ValidateResourceQuota tests if required fields in the ResourceQuota are set. -func ValidateResourceQuota(resourceQuota *core.ResourceQuota) field.ErrorList { +func ValidateResourceQuota(resourceQuota *core.ResourceQuota, opts ResourceQuotaValidationOptions) field.ErrorList { allErrs := ValidateObjectMeta(&resourceQuota.ObjectMeta, true, ValidateResourceQuotaName, field.NewPath("metadata")) - allErrs = append(allErrs, ValidateResourceQuotaSpec(&resourceQuota.Spec, field.NewPath("spec"))...) + allErrs = append(allErrs, ValidateResourceQuotaSpec(&resourceQuota.Spec, opts, field.NewPath("spec"))...) allErrs = append(allErrs, ValidateResourceQuotaStatus(&resourceQuota.Status, field.NewPath("status"))...) return allErrs @@ -5876,7 +5888,7 @@ func ValidateResourceQuotaStatus(status *core.ResourceQuotaStatus, fld *field.Pa return allErrs } -func ValidateResourceQuotaSpec(resourceQuotaSpec *core.ResourceQuotaSpec, fld *field.Path) field.ErrorList { +func ValidateResourceQuotaSpec(resourceQuotaSpec *core.ResourceQuotaSpec, opts ResourceQuotaValidationOptions, fld *field.Path) field.ErrorList { allErrs := field.ErrorList{} fldPath := fld.Child("hard") @@ -5886,8 +5898,8 @@ func ValidateResourceQuotaSpec(resourceQuotaSpec *core.ResourceQuotaSpec, fld *f allErrs = append(allErrs, ValidateResourceQuantityValue(string(k), v, resPath)...) } - allErrs = append(allErrs, validateResourceQuotaScopes(resourceQuotaSpec, fld)...) - allErrs = append(allErrs, validateScopeSelector(resourceQuotaSpec, fld)...) + allErrs = append(allErrs, validateResourceQuotaScopes(resourceQuotaSpec, opts, fld)...) + allErrs = append(allErrs, validateScopeSelector(resourceQuotaSpec, opts, fld)...) return allErrs } @@ -5905,9 +5917,9 @@ func ValidateResourceQuantityValue(resource string, value resource.Quantity, fld } // ValidateResourceQuotaUpdate tests to see if the update is legal for an end user to make. -func ValidateResourceQuotaUpdate(newResourceQuota, oldResourceQuota *core.ResourceQuota) field.ErrorList { +func ValidateResourceQuotaUpdate(newResourceQuota, oldResourceQuota *core.ResourceQuota, opts ResourceQuotaValidationOptions) field.ErrorList { allErrs := ValidateObjectMetaUpdate(&newResourceQuota.ObjectMeta, &oldResourceQuota.ObjectMeta, field.NewPath("metadata")) - allErrs = append(allErrs, ValidateResourceQuotaSpec(&newResourceQuota.Spec, field.NewPath("spec"))...) + allErrs = append(allErrs, ValidateResourceQuotaSpec(&newResourceQuota.Spec, opts, field.NewPath("spec"))...) // ensure scopes cannot change, and that resources are still valid for scope fldPath := field.NewPath("spec", "scopes") @@ -6365,7 +6377,7 @@ func validateWindowsHostProcessPod(podSpec *core.PodSpec, fieldPath *field.Path, } // At present Windows Pods which contain HostProcess containers must also set HostNetwork. - if !hostNetwork { + if hostNetwork != true { errMsg := "hostNetwork must be true if pod contains any hostProcess containers" allErrs = append(allErrs, field.Invalid(fieldPath.Child("hostNetwork"), hostNetwork, errMsg)) } @@ -6512,7 +6524,6 @@ func validateTopologySpreadConstraints(constraints []core.TopologySpreadConstrai if err := ValidateSpreadConstraintNotRepeat(subFldPath.Child("{topologyKey, whenUnsatisfiable}"), constraint, constraints[i+1:]); err != nil { allErrs = append(allErrs, err) } - allErrs = append(allErrs, validateMinDomains(subFldPath.Child("minDomains"), constraint.MinDomains, constraint.WhenUnsatisfiable)...) } return allErrs @@ -6526,22 +6537,6 @@ func ValidateMaxSkew(fldPath *field.Path, maxSkew int32) *field.Error { return nil } -// validateMinDomains tests that the argument is a valid MinDomains. -func validateMinDomains(fldPath *field.Path, minDomains *int32, action core.UnsatisfiableConstraintAction) field.ErrorList { - if minDomains == nil { - return nil - } - var allErrs field.ErrorList - if *minDomains <= 0 { - allErrs = append(allErrs, field.Invalid(fldPath, minDomains, isNotPositiveErrorMsg)) - } - // When MinDomains is non-nil, whenUnsatisfiable must be DoNotSchedule. - if action != core.DoNotSchedule { - allErrs = append(allErrs, field.Invalid(fldPath, minDomains, fmt.Sprintf("can only use minDomains if whenUnsatisfiable=%s, not %s", string(core.DoNotSchedule), string(action)))) - } - return allErrs -} - // ValidateTopologyKey tests that the argument is a valid TopologyKey. func ValidateTopologyKey(fldPath *field.Path, topologyKey string) *field.Error { if len(topologyKey) == 0 { diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/zz_generated.deepcopy.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/zz_generated.deepcopy.go index 6063cbd7398b..38f7d5cd8ca7 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/zz_generated.deepcopy.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/core/zz_generated.deepcopy.go @@ -5629,11 +5629,6 @@ func (in *TopologySpreadConstraint) DeepCopyInto(out *TopologySpreadConstraint) *out = new(v1.LabelSelector) (*in).DeepCopyInto(*out) } - if in.MinDomains != nil { - in, out := &in.MinDomains, &out.MinDomains - *out = new(int32) - **out = **in - } return } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/extensions/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/extensions/OWNERS index e559bf2aeeec..4739e16b4fc7 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/extensions/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/extensions/OWNERS @@ -1,23 +1,32 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - thockin - - lavalamp - - smarterclayton - - wojtek-t - - deads2k - - derekwaynecarr - - caesarxuchao - - mikedanese - - liggitt - - sttts - - saad-ali - - janetkuo - - justinsb - - ncdc - - tallclair - - mwielgus - - soltysh - - dims +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- brendandburns +- derekwaynecarr +- caesarxuchao +- mikedanese +- liggitt +- pmorie +- sttts +- saad-ali +- janetkuo +- justinsb +- ncdc +- tallclair +- mwielgus +- soltysh +- piosz +- dims +- errordeveloper +- rootfs +- resouer +- therc +- pweil- +- lukaszo labels: - - sig/apps +- sig/apps diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/networking/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/networking/OWNERS index 4d2b7f556fef..1356fe5df43e 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/networking/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/networking/OWNERS @@ -1,8 +1,8 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - sig-network-api-approvers +- sig-network-api-approvers reviewers: - - sig-network-api-reviewers +- sig-network-api-reviewers labels: - - sig/network +- sig/network diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/networking/types.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/networking/types.go index 7010bac4dbed..5f87d99c53b0 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/networking/types.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/networking/types.go @@ -33,11 +33,6 @@ type NetworkPolicy struct { // Specification of the desired behavior for this NetworkPolicy. // +optional Spec NetworkPolicySpec - - // Status is the current state of the NetworkPolicy. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Status NetworkPolicyStatus } // PolicyType describes the NetworkPolicy type @@ -200,42 +195,6 @@ type NetworkPolicyPeer struct { IPBlock *IPBlock } -// NetworkPolicyConditionType is the type for status conditions on -// a NetworkPolicy. This type should be used with the -// NetworkPolicyStatus.Conditions field. -type NetworkPolicyConditionType string - -const ( - // NetworkPolicyConditionStatusAccepted represents status of a Network Policy that could be properly parsed by - // the Network Policy provider and will be implemented in the cluster - NetworkPolicyConditionStatusAccepted NetworkPolicyConditionType = "Accepted" - - // NetworkPolicyConditionStatusPartialFailure represents status of a Network Policy that could be partially - // parsed by the Network Policy provider and may not be completely implemented due to a lack of a feature or some - // other condition - NetworkPolicyConditionStatusPartialFailure NetworkPolicyConditionType = "PartialFailure" - - // NetworkPolicyConditionStatusFailure represents status of a Network Policy that could not be parsed by the - // Network Policy provider and will not be implemented in the cluster - NetworkPolicyConditionStatusFailure NetworkPolicyConditionType = "Failure" -) - -// NetworkPolicyConditionReason defines the set of reasons that explain why a -// particular NetworkPolicy condition type has been raised. -type NetworkPolicyConditionReason string - -const ( - // NetworkPolicyConditionReasonFeatureNotSupported represents a reason where the Network Policy may not have been - // implemented in the cluster due to a lack of some feature not supported by the Network Policy provider - NetworkPolicyConditionReasonFeatureNotSupported NetworkPolicyConditionReason = "FeatureNotSupported" -) - -// NetworkPolicyStatus describe the current state of the NetworkPolicy. -type NetworkPolicyStatus struct { - // Conditions holds an array of metav1.Condition that describe the state of the NetworkPolicy. - Conditions []metav1.Condition -} - // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // NetworkPolicyList is a list of NetworkPolicy objects. diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/networking/zz_generated.deepcopy.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/networking/zz_generated.deepcopy.go index 34df7bcacb85..6ead9a76a8cb 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/networking/zz_generated.deepcopy.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/networking/zz_generated.deepcopy.go @@ -432,7 +432,6 @@ func (in *NetworkPolicy) DeepCopyInto(out *NetworkPolicy) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) return } @@ -645,29 +644,6 @@ func (in *NetworkPolicySpec) DeepCopy() *NetworkPolicySpec { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NetworkPolicyStatus) DeepCopyInto(out *NetworkPolicyStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyStatus. -func (in *NetworkPolicyStatus) DeepCopy() *NetworkPolicyStatus { - if in == nil { - return nil - } - out := new(NetworkPolicyStatus) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ServiceBackendPort) DeepCopyInto(out *ServiceBackendPort) { *out = *in diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/policy/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/policy/OWNERS index 55cce6cfbe3c..09f9d9f7c32f 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/policy/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/policy/OWNERS @@ -2,10 +2,10 @@ # approval on api packages bubbles to api-approvers reviewers: - - sig-apps-api-reviewers - - sig-apps-api-approvers - - sig-auth-policy-approvers - - sig-auth-policy-reviewers +- sig-apps-api-reviewers +- sig-apps-api-approvers +- sig-auth-policy-approvers +- sig-auth-policy-reviewers labels: - - sig/auth - - sig/apps +- sig/auth + diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/policy/validation/validation.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/policy/validation/validation.go index 53e3bbaf821b..73062f586a6f 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/policy/validation/validation.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/apis/policy/validation/validation.go @@ -33,6 +33,7 @@ import ( core "k8s.io/kubernetes/pkg/apis/core" apivalidation "k8s.io/kubernetes/pkg/apis/core/validation" "k8s.io/kubernetes/pkg/apis/policy" + "k8s.io/kubernetes/pkg/security/apparmor" "k8s.io/kubernetes/pkg/security/podsecuritypolicy/seccomp" psputil "k8s.io/kubernetes/pkg/security/podsecuritypolicy/util" ) @@ -137,13 +138,13 @@ func ValidatePodSecurityPolicySpecificAnnotations(annotations map[string]string, allErrs := field.ErrorList{} if p := annotations[v1.AppArmorBetaDefaultProfileAnnotationKey]; p != "" { - if err := apivalidation.ValidateAppArmorProfileFormat(p); err != nil { + if err := apparmor.ValidateProfileFormat(p); err != nil { allErrs = append(allErrs, field.Invalid(fldPath.Key(v1.AppArmorBetaDefaultProfileAnnotationKey), p, err.Error())) } } if allowed := annotations[v1.AppArmorBetaAllowedProfilesAnnotationKey]; allowed != "" { for _, p := range strings.Split(allowed, ",") { - if err := apivalidation.ValidateAppArmorProfileFormat(p); err != nil { + if err := apparmor.ValidateProfileFormat(p); err != nil { allErrs = append(allErrs, field.Invalid(fldPath.Key(v1.AppArmorBetaAllowedProfilesAnnotationKey), allowed, err.Error())) } } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/OWNERS index 88cecd8f9606..49121b53b530 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/OWNERS @@ -1,17 +1,16 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - deads2k - - derekwaynecarr - - mikedanese - - janetkuo - - cheftako - - andrewsykim - - sig-apps-approvers +- deads2k +- derekwaynecarr +- mikedanese +- janetkuo +- cheftako +- sig-apps-approvers reviewers: - - andrewsykim - - deads2k - - cheftako - - sig-apps-reviewers +- andrewsykim +- deads2k +- cheftako +- sig-apps-reviewers labels: - - sig/apps +- sig/apps diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/controller_utils.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/controller_utils.go index 97f8a03c9c63..62242617583b 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/controller_utils.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/controller_utils.go @@ -504,10 +504,10 @@ func validateControllerRef(controllerRef *metav1.OwnerReference) error { if len(controllerRef.Kind) == 0 { return fmt.Errorf("controllerRef has empty Kind") } - if controllerRef.Controller == nil || !*controllerRef.Controller { + if controllerRef.Controller == nil || *controllerRef.Controller != true { return fmt.Errorf("controllerRef.Controller is not set to true") } - if controllerRef.BlockOwnerDeletion == nil || !*controllerRef.BlockOwnerDeletion { + if controllerRef.BlockOwnerDeletion == nil || *controllerRef.BlockOwnerDeletion != true { return fmt.Errorf("controllerRef.BlockOwnerDeletion is not set") } return nil diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/daemon/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/daemon/OWNERS index c6d302e5ea26..938e26b5eed6 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/daemon/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/daemon/OWNERS @@ -1,8 +1,8 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - sig-apps-approvers +- sig-apps-approvers reviewers: - - sig-apps-reviewers +- sig-apps-reviewers labels: - - sig/apps +- sig/apps diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/daemon/daemon_controller.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/daemon/daemon_controller.go index e31dde1eaccd..d73f1ea65726 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/daemon/daemon_controller.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/daemon/daemon_controller.go @@ -641,7 +641,7 @@ func (dsc *DaemonSetsController) addNode(obj interface{}) { } node := obj.(*v1.Node) for _, ds := range dsList { - if shouldRun, _ := NodeShouldRunDaemonPod(node, ds); shouldRun { + if shouldRun, _ := dsc.nodeShouldRunDaemonPod(node, ds); shouldRun { dsc.enqueueDaemonSet(ds) } } @@ -699,8 +699,8 @@ func (dsc *DaemonSetsController) updateNode(old, cur interface{}) { } // TODO: it'd be nice to pass a hint with these enqueues, so that each ds would only examine the added node (unless it has other work to do, too). for _, ds := range dsList { - oldShouldRun, oldShouldContinueRunning := NodeShouldRunDaemonPod(oldNode, ds) - currentShouldRun, currentShouldContinueRunning := NodeShouldRunDaemonPod(curNode, ds) + oldShouldRun, oldShouldContinueRunning := dsc.nodeShouldRunDaemonPod(oldNode, ds) + currentShouldRun, currentShouldContinueRunning := dsc.nodeShouldRunDaemonPod(curNode, ds) if (oldShouldRun != currentShouldRun) || (oldShouldContinueRunning != currentShouldContinueRunning) { dsc.enqueueDaemonSet(ds) } @@ -798,7 +798,7 @@ func (dsc *DaemonSetsController) podsShouldBeOnNode( hash string, ) (nodesNeedingDaemonPods, podsToDelete []string) { - shouldRun, shouldContinueRunning := NodeShouldRunDaemonPod(node, ds) + shouldRun, shouldContinueRunning := dsc.nodeShouldRunDaemonPod(node, ds) daemonPods, exists := nodeToDaemonPods[node.Name] switch { @@ -1118,7 +1118,7 @@ func (dsc *DaemonSetsController) updateDaemonSetStatus(ctx context.Context, ds * var desiredNumberScheduled, currentNumberScheduled, numberMisscheduled, numberReady, updatedNumberScheduled, numberAvailable int now := dsc.failedPodsBackoff.Clock.Now() for _, node := range nodeList { - shouldRun, _ := NodeShouldRunDaemonPod(node, ds) + shouldRun, _ := dsc.nodeShouldRunDaemonPod(node, ds) scheduled := len(nodeToDaemonPods[node.Name]) > 0 if shouldRun { @@ -1254,7 +1254,7 @@ func (dsc *DaemonSetsController) syncDaemonSet(ctx context.Context, key string) return dsc.updateDaemonSetStatus(ctx, ds, nodeList, hash, true) } -// NodeShouldRunDaemonPod checks a set of preconditions against a (node,daemonset) and returns a +// nodeShouldRunDaemonPod checks a set of preconditions against a (node,daemonset) and returns a // summary. Returned booleans are: // * shouldRun: // Returns true when a daemonset should run on the node if a daemonset pod is not already @@ -1262,7 +1262,7 @@ func (dsc *DaemonSetsController) syncDaemonSet(ctx context.Context, key string) // * shouldContinueRunning: // Returns true when a daemonset should continue running on a node if a daemonset pod is already // running on that node. -func NodeShouldRunDaemonPod(node *v1.Node, ds *apps.DaemonSet) (bool, bool) { +func (dsc *DaemonSetsController) nodeShouldRunDaemonPod(node *v1.Node, ds *apps.DaemonSet) (bool, bool) { pod := NewPod(ds, node.Name) // If the daemon set specifies a node name, check that it matches with node.Name. @@ -1271,7 +1271,7 @@ func NodeShouldRunDaemonPod(node *v1.Node, ds *apps.DaemonSet) (bool, bool) { } taints := node.Spec.Taints - fitsNodeName, fitsNodeAffinity, fitsTaints := predicates(pod, node, taints) + fitsNodeName, fitsNodeAffinity, fitsTaints := Predicates(pod, node, taints) if !fitsNodeName || !fitsNodeAffinity { return false, false } @@ -1287,8 +1287,8 @@ func NodeShouldRunDaemonPod(node *v1.Node, ds *apps.DaemonSet) (bool, bool) { return true, true } -// predicates checks if a DaemonSet's pod can run on a node. -func predicates(pod *v1.Pod, node *v1.Node, taints []v1.Taint) (fitsNodeName, fitsNodeAffinity, fitsTaints bool) { +// Predicates checks if a DaemonSet's pod can run on a node. +func Predicates(pod *v1.Pod, node *v1.Node, taints []v1.Taint) (fitsNodeName, fitsNodeAffinity, fitsTaints bool) { fitsNodeName = len(pod.Spec.NodeName) == 0 || pod.Spec.NodeName == node.Name // Ignore parsing errors for backwards compatibility. fitsNodeAffinity, _ = nodeaffinity.GetRequiredNodeAffinity(pod).Match(node) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/daemon/update.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/daemon/update.go index 3983fbb87b45..4f5bcafbfc5f 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/daemon/update.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/daemon/update.go @@ -528,7 +528,7 @@ func (dsc *DaemonSetsController) updatedDesiredNodeCounts(ds *apps.DaemonSet, no var desiredNumberScheduled int for i := range nodeList { node := nodeList[i] - wantToRun, _ := NodeShouldRunDaemonPod(node, ds) + wantToRun, _ := dsc.nodeShouldRunDaemonPod(node, ds) if !wantToRun { continue } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/daemon/util/daemonset_util.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/daemon/util/daemonset_util.go index 5058f747df3d..acff170506cc 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/daemon/util/daemonset_util.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/daemon/util/daemonset_util.go @@ -169,7 +169,7 @@ func UnavailableCount(ds *apps.DaemonSet, numberToSchedule int) (int, error) { func IsPodUpdated(pod *v1.Pod, hash string, dsTemplateGeneration *int64) bool { // Compare with hash to see if the pod is updated, need to maintain backward compatibility of templateGeneration templateMatches := dsTemplateGeneration != nil && - pod.Labels[extensions.DaemonSetTemplateGenerationKey] == fmt.Sprint(*dsTemplateGeneration) + pod.Labels[extensions.DaemonSetTemplateGenerationKey] == fmt.Sprint(dsTemplateGeneration) hashMatches := len(hash) > 0 && pod.Labels[extensions.DefaultDaemonSetUniqueLabelKey] == hash return hashMatches || templateMatches } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/deployment_util.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/deployment_util.go index d06d392e97c5..2eb94ff59a41 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/deployment_util.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/deployment/util/deployment_util.go @@ -900,8 +900,7 @@ func GetDeploymentsForReplicaSet(deploymentLister appslisters.DeploymentLister, for _, d := range dList { selector, err := metav1.LabelSelectorAsSelector(d.Spec.Selector) if err != nil { - // This object has an invalid selector, it does not match the replicaset - continue + return nil, fmt.Errorf("invalid label selector: %v", err) } // If a deployment with a nil or empty selector creeps in, it should match nothing, not everything. if selector.Empty() || !selector.Matches(labels.Set(rs.Labels)) { diff --git a/cluster-autoscaler/vendor/k8s.io/component-helpers/storage/volume/pv_helpers.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/util/util.go similarity index 92% rename from cluster-autoscaler/vendor/k8s.io/component-helpers/storage/volume/pv_helpers.go rename to cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/util/util.go index f927b72314a6..754c79adaede 100644 --- a/cluster-autoscaler/vendor/k8s.io/component-helpers/storage/volume/pv_helpers.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/util/util.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package volume +package persistentvolume import ( "fmt" @@ -28,6 +28,8 @@ import ( "k8s.io/client-go/kubernetes/scheme" storagelisters "k8s.io/client-go/listers/storage/v1" "k8s.io/client-go/tools/reference" + storagehelpers "k8s.io/component-helpers/storage/volume" + volumeutil "k8s.io/kubernetes/pkg/volume/util" ) const ( @@ -76,9 +78,6 @@ const ( //PVDeletionProtectionFinalizer is the finalizer added by the external-provisioner on the PV PVDeletionProtectionFinalizer = "external-provisioner.volume.kubernetes.io/finalizer" - - // PVDeletionInTreeProtectionFinalizer is the finalizer added to protect PV deletion for in-tree volumes. - PVDeletionInTreeProtectionFinalizer = "kubernetes.io/pv-controller" ) // IsDelayBindingProvisioning checks if claim provisioning with selected-node annotation @@ -93,7 +92,7 @@ func IsDelayBindingProvisioning(claim *v1.PersistentVolumeClaim) bool { // IsDelayBindingMode checks if claim is in delay binding mode. func IsDelayBindingMode(claim *v1.PersistentVolumeClaim, classLister storagelisters.StorageClassLister) (bool, error) { - className := GetPersistentVolumeClaimClass(claim) + className := storagehelpers.GetPersistentVolumeClaimClass(claim) if className == "" { return false, nil } @@ -192,12 +191,13 @@ func FindMatchingVolume( var smallestVolume *v1.PersistentVolume var smallestVolumeQty resource.Quantity requestedQty := claim.Spec.Resources.Requests[v1.ResourceName(v1.ResourceStorage)] - requestedClass := GetPersistentVolumeClaimClass(claim) + requestedClass := storagehelpers.GetPersistentVolumeClaimClass(claim) var selector labels.Selector if claim.Spec.Selector != nil { internalSelector, err := metav1.LabelSelectorAsSelector(claim.Spec.Selector) if err != nil { + // should be unreachable code due to validation return nil, fmt.Errorf("error creating internal label selector for claim: %v: %v", claimToClaimKey(claim), err) } selector = internalSelector @@ -236,9 +236,9 @@ func FindMatchingVolume( if node != nil { // Scheduler path, check that the PV NodeAffinity // is satisfied by the node - // CheckNodeAffinity is the most expensive call in this loop. + // volumeutil.CheckNodeAffinity is the most expensive call in this loop. // We should check cheaper conditions first or consider optimizing this function. - err := CheckNodeAffinity(volume, node.Labels) + err := volumeutil.CheckNodeAffinity(volume, node.Labels) if err != nil { nodeAffinityValid = false } @@ -276,7 +276,7 @@ func FindMatchingVolume( } else if selector != nil && !selector.Matches(labels.Set(volume.Labels)) { continue } - if GetPersistentVolumeClass(volume) != requestedClass { + if storagehelpers.GetPersistentVolumeClass(volume) != requestedClass { continue } if !nodeAffinityValid { @@ -340,3 +340,22 @@ func CheckAccessModes(claim *v1.PersistentVolumeClaim, volume *v1.PersistentVolu func claimToClaimKey(claim *v1.PersistentVolumeClaim) string { return fmt.Sprintf("%s/%s", claim.Namespace, claim.Name) } + +// GetVolumeNodeAffinity returns a VolumeNodeAffinity for given key and value. +func GetVolumeNodeAffinity(key string, value string) *v1.VolumeNodeAffinity { + return &v1.VolumeNodeAffinity{ + Required: &v1.NodeSelector{ + NodeSelectorTerms: []v1.NodeSelectorTerm{ + { + MatchExpressions: []v1.NodeSelectorRequirement{ + { + Key: key, + Operator: v1.NodeSelectorOpIn, + Values: []string{value}, + }, + }, + }, + }, + }, + } +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/OWNERS index b5632399e52f..ba3007ca8667 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/OWNERS @@ -1,16 +1,24 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - deads2k - - liggitt +- deads2k +- liggitt reviewers: - - thockin - - smarterclayton - - yujuhong - - derekwaynecarr - - mikedanese - - dchen1107 - - justinsb - - dims - - andrewsykim - - andyzhangx +- thockin +- smarterclayton +- yujuhong +- brendandburns +- derekwaynecarr +- vishh +- mikedanese +- davidopp +- pmorie +- dchen1107 +- justinsb +- dims +- resouer +- mfojtik +- therc +- andrewsykim +- mcrute +- andyzhangx diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/aws/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/aws/OWNERS index a2cdbe9c7c08..b581d7c8b4ad 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/aws/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/aws/OWNERS @@ -1,4 +1,6 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - justinsb +- justinsb +- therc +- chrislovecnm diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/azure/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/azure/OWNERS index 78e3eb1df61b..957a7271e163 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/azure/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/azure/OWNERS @@ -1,13 +1,14 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - andyzhangx - - feiskyer - - khenidak +- andyzhangx +- brendandburns +- feiskyer +- karataliu +- khenidak reviewers: - - andyzhangx - - feiskyer - - khenidak -emeritus_approvers: - - karataliu - - brendandburns +- andyzhangx +- brendandburns +- feiskyer +- karataliu +- khenidak diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/azure/azure_acr_helper.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/azure/azure_acr_helper.go index bcde4f385f2f..de6aad3d810c 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/azure/azure_acr_helper.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/azure/azure_acr_helper.go @@ -81,7 +81,7 @@ const dockerTokenLoginUsernameGUID = "00000000-0000-0000-0000-000000000000" var client = &http.Client{ Transport: utilnet.SetTransportDefaults(&http.Transport{}), - Timeout: time.Second * 60, + Timeout: time.Second * 10, } func receiveChallengeFromLoginServer(serverAddress string) (*authDirective, error) { diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/gcp/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/gcp/OWNERS index e0a5e459a166..d42107bcc36b 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/gcp/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/gcp/OWNERS @@ -1,9 +1,12 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - thockin - - deads2k - - yujuhong - - derekwaynecarr - - mikedanese - - dims +- thockin +- deads2k +- yujuhong +- derekwaynecarr +- vishh +- mikedanese +- davidopp +- dims +- therc diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/keyring.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/keyring.go index 4bbe5c4d9f12..0af960a384fc 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/keyring.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/keyring.go @@ -120,7 +120,7 @@ func (dk *BasicDockerKeyring) Add(cfg DockerConfig) { // Update the index used to identify which credentials to use for a given // image. The index is reverse-sorted so more specific paths are matched - // first. For example, if for the given image "gcr.io/etcd-development/etcd", + // first. For example, if for the given image "quay.io/coreos/etcd", // credentials for "quay.io/coreos" should match before "quay.io". sort.Sort(sort.Reverse(sort.StringSlice(dk.index))) } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/plugin/plugin.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/plugin/plugin.go index 297f3164aa9b..bb5aa9fb2a04 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/plugin/plugin.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/credentialprovider/plugin/plugin.go @@ -39,11 +39,9 @@ import ( credentialproviderapi "k8s.io/kubelet/pkg/apis/credentialprovider" "k8s.io/kubelet/pkg/apis/credentialprovider/install" credentialproviderv1alpha1 "k8s.io/kubelet/pkg/apis/credentialprovider/v1alpha1" - credentialproviderv1beta1 "k8s.io/kubelet/pkg/apis/credentialprovider/v1beta1" "k8s.io/kubernetes/pkg/credentialprovider" kubeletconfig "k8s.io/kubernetes/pkg/kubelet/apis/config" kubeletconfigv1alpha1 "k8s.io/kubernetes/pkg/kubelet/apis/config/v1alpha1" - kubeletconfigv1beta1 "k8s.io/kubernetes/pkg/kubelet/apis/config/v1beta1" "k8s.io/utils/clock" ) @@ -58,7 +56,6 @@ var ( apiVersions = map[string]schema.GroupVersion{ credentialproviderv1alpha1.SchemeGroupVersion.String(): credentialproviderv1alpha1.SchemeGroupVersion, - credentialproviderv1beta1.SchemeGroupVersion.String(): credentialproviderv1beta1.SchemeGroupVersion, } ) @@ -66,7 +63,6 @@ func init() { install.Install(scheme) kubeletconfig.AddToScheme(scheme) kubeletconfigv1alpha1.AddToScheme(scheme) - kubeletconfigv1beta1.AddToScheme(scheme) } // RegisterCredentialProviderPlugins is called from kubelet to register external credential provider diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/features/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/features/OWNERS index 3e1dd9f081d6..05b08249aed3 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/features/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/features/OWNERS @@ -1,4 +1,4 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - feature-approvers +- feature-approvers diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/features/kube_features.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/features/kube_features.go index c1a3e6e7f9a3..bcc80f8fd44d 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/features/kube_features.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/features/kube_features.go @@ -78,20 +78,17 @@ const ( // owner: @gnufied // beta: v1.11 - // GA: 1.24 // Ability to Expand persistent volumes ExpandPersistentVolumes featuregate.Feature = "ExpandPersistentVolumes" - // owner: @mlmhl @gnufied + // owner: @mlmhl // beta: v1.15 - // GA: 1.24 // Ability to expand persistent volumes' file system without unmounting volumes. ExpandInUsePersistentVolumes featuregate.Feature = "ExpandInUsePersistentVolumes" // owner: @gnufied // alpha: v1.14 // beta: v1.16 - // GA: 1.24 // Ability to expand CSI volumes ExpandCSIVolumes featuregate.Feature = "ExpandCSIVolumes" @@ -160,15 +157,12 @@ const ( // owner: @pohly // alpha: v1.19 // beta: v1.21 - // GA: v1.24 // // Enables tracking of available storage capacity that CSI drivers provide. CSIStorageCapacity featuregate.Feature = "CSIStorageCapacity" // owner: @alculquicondor - // alpha: v1.19 // beta: v1.20 - // GA: v1.24 // // Enables the use of PodTopologySpread scheduling plugin to do default // spreading and disables legacy SelectorSpread plugin. @@ -185,7 +179,6 @@ const ( // owner: @chendave // alpha: v1.21 // beta: v1.22 - // GA: v1.24 // // PreferNominatedNode tells scheduler whether the nominated node will be checked first before looping // all the rest of nodes in the cluster. @@ -194,6 +187,14 @@ const ( // and hence is the best candidate instead. PreferNominatedNode featuregate.Feature = "PreferNominatedNode" + // owner: @tallclair + // alpha: v1.12 + // beta: v1.14 + // GA: v1.20 + // + // Enables RuntimeClass, for selecting between multiple runtimes to run a pod. + RuntimeClass featuregate.Feature = "RuntimeClass" + // owner: @rikatz // kep: http://kep.k8s.io/2079 // alpha: v1.21 @@ -218,7 +219,6 @@ const ( // owner: @alculquicondor // alpha: v1.21 // beta: v1.22 - // stable: v1.24 // // Allows Job controller to manage Pod completions per completion index. IndexedJob featuregate.Feature = "IndexedJob" @@ -235,7 +235,6 @@ const ( // owner: @alculquicondor // alpha: v1.23 - // beta: v1.24 // // Track the number of pods with Ready condition in the Job status. JobReadyPods featuregate.Feature = "JobReadyPods" @@ -283,7 +282,6 @@ const ( // owner: @andyzhangx // alpha: v1.15 // beta: v1.19 - // GA: v1.24 // // Enables the Azure Disk in-tree driver to Azure Disk Driver migration feature. CSIMigrationAzureDisk featuregate.Feature = "CSIMigrationAzureDisk" @@ -308,7 +306,7 @@ const ( InTreePluginAzureFileUnregister featuregate.Feature = "InTreePluginAzureFileUnregister" // owner: @divyenpatel - // beta: v1.19 (requires: vSphere vCenter/ESXi Version: 7.0u2, HW Version: VM version 15) + // beta: v1.19 (requires: vSphere vCenter/ESXi Version: 7.0u1, HW Version: VM version 15) // // Enables the vSphere in-tree driver to vSphere CSI Driver migration feature. CSIMigrationvSphere featuregate.Feature = "CSIMigrationvSphere" @@ -348,7 +346,7 @@ const ( // alpha: v1.23 // // Enables the RBD in-tree driver to RBD CSI Driver migration feature. - CSIMigrationRBD featuregate.Feature = "CSIMigrationRBD" + CSIMigrationRBD featuregate.Feature = "csiMigrationRBD" // owner: @humblec // alpha: v1.23 @@ -390,7 +388,6 @@ const ( // owner: @denkensk // alpha: v1.15 // beta: v1.19 - // ga: v1.24 // // Enables NonPreempting option for priorityClass and pod. NonPreemptingPriority featuregate.Feature = "NonPreemptingPriority" @@ -398,7 +395,6 @@ const ( // owner: @egernst // alpha: v1.16 // beta: v1.18 - // ga: v1.24 // // Enables PodOverhead, for accounting pod overheads which are specific to a given RuntimeClass PodOverhead featuregate.Feature = "PodOverhead" @@ -407,7 +403,6 @@ const ( // kep: http://kep.k8s.io/563 // alpha: v1.15 // beta: v1.21 - // ga: v1.23 // // Enables ipv6 dual stack IPv6DualStack featuregate.Feature = "IPv6DualStack" @@ -452,6 +447,24 @@ const ( // DaemonSets allow workloads to maintain availability during update per node DaemonSetUpdateSurge featuregate.Feature = "DaemonSetUpdateSurge" + // owner: @wojtek-t + // alpha: v1.18 + // beta: v1.19 + // ga: v1.21 + // + // Enables a feature to make secrets and configmaps data immutable. + ImmutableEphemeralVolumes featuregate.Feature = "ImmutableEphemeralVolumes" + + // owner: @bart0sh + // alpha: v1.18 + // beta: v1.19 + // GA: 1.22 + // + // Enables usage of HugePages- in a volume medium, + // e.g. emptyDir: + // medium: HugePages-1Gi + HugePageStorageMediumSize featuregate.Feature = "HugePageStorageMediumSize" + // owner: @derekwaynecarr // alpha: v1.20 // beta: v1.21 (off by default until 1.22) @@ -461,11 +474,20 @@ const ( // owner: @bswartz // alpha: v1.18 - // beta: v1.24 // // Enables usage of any object for volume data source in PVCs AnyVolumeDataSource featuregate.Feature = "AnyVolumeDataSource" + // owner: @javidiaz + // kep: http://kep.k8s.io/1797 + // alpha: v1.19 + // beta: v1.20 + // GA: v1.22 + // + // Allow setting the Fully Qualified Domain Name (FQDN) in the hostname of a Pod. If a Pod does not + // have FQDN, this feature has no effect. + SetHostnameAsFQDN featuregate.Feature = "SetHostnameAsFQDN" + // owner: @ksubrmnn // alpha: v1.14 // beta: v1.20 @@ -530,9 +552,8 @@ const ( // Lock to default and remove after v1.22 based on user feedback that should be reflected in KEP #1972 update ExecProbeTimeout featuregate.Feature = "ExecProbeTimeout" - // owner: @andrewsykim @adisky + // owner: @andrewsykim // alpha: v1.20 - // beta: v1.24 // // Enable kubelet exec plugins for image pull credentials. KubeletCredentialProviders featuregate.Feature = "KubeletCredentialProviders" @@ -566,7 +587,7 @@ const ( // owner: @wzshiming // alpha: v1.23 - // beta: v1.24 + // // Make the kubelet use shutdown configuration based on pod priority values for graceful shutdown. GracefulNodeShutdownBasedOnPodPriority featuregate.Feature = "GracefulNodeShutdownBasedOnPodPriority" @@ -574,15 +595,13 @@ const ( // kep: http://kep.k8s.io/1864 // alpha: v1.20 // beta: v1.22 - // ga: v1.24 // // Allows control if NodePorts shall be created for services with "type: LoadBalancer" by defining the spec.AllocateLoadBalancerNodePorts field (bool) ServiceLBNodePortControl featuregate.Feature = "ServiceLBNodePortControl" - // owner: @janosi @bridgetkromhout + // owner: @janosi // kep: http://kep.k8s.io/1435 // alpha: v1.20 - // beta: v1.24 // // Enables the usage of different protocols in the same Service with type=LoadBalancer MixedProtocolLBService featuregate.Feature = "MixedProtocolLBService" @@ -627,7 +646,6 @@ const ( // owner: @ahg-g // alpha: v1.21 // beta: v1.22 - // GA: v1.24 // // Allow specifying NamespaceSelector in PodAffinityTerm. PodAffinityNamespaceSelector featuregate.Feature = "PodAffinityNamespaceSelector" @@ -636,7 +654,6 @@ const ( // kep: http://kep.k8s.io/1959 // alpha: v1.21 // beta: v1.22 - // GA: v1.24 // // Enable support multiple Service "type: LoadBalancer" implementations in a cluster by specifying LoadBalancerClass ServiceLoadBalancerClass featuregate.Feature = "ServiceLoadBalancerClass" @@ -668,7 +685,6 @@ const ( // owner: @adtac // alpha: v1.21 // beta: v1.22 - // GA: v1.24 // // Allows jobs to be created in the suspended state. SuspendJob featuregate.Feature = "SuspendJob" @@ -679,6 +695,14 @@ const ( // Enable POD resources API to return allocatable resources KubeletPodResourcesGetAllocatable featuregate.Feature = "KubeletPodResourcesGetAllocatable" + // owner: @jayunit100 @abhiraut @rikatz + // kep: http://kep.k8s.io/2161 + // beta: v1.21 + // ga: v1.22 + // + // Labels all namespaces with a default label "kubernetes.io/metadata.name: " + NamespaceDefaultLabelName featuregate.Feature = "NamespaceDefaultLabelName" + // owner: @fengzixu // alpha: v1.21 // @@ -701,7 +725,7 @@ const ( // owner: @ravig // alpha: v1.23 - // beta: v1.24 + // // IdentifyPodOS allows user to specify OS on which they'd like the Pod run. The user should still set the nodeSelector // with appropriate `kubernetes.io/os` label for scheduler to identify appropriate node for the pod to run. IdentifyPodOS featuregate.Feature = "IdentifyPodOS" @@ -734,7 +758,6 @@ const ( // owner: @enj // beta: v1.22 - // ga: v1.24 // // Allows clients to request a duration for certificates issued via the Kubernetes CSR API. CSRDuration featuregate.Feature = "CSRDuration" @@ -764,7 +787,6 @@ const ( // owner: @jiahuif // alpha: v1.21 // beta: v1.22 - // GA: v1.24 // // Enables Leader Migration for kube-controller-manager and cloud-controller-manager ControllerManagerLeaderMigration featuregate.Feature = "ControllerManagerLeaderMigration" @@ -827,61 +849,12 @@ const ( // Allow users to recover from volume expansion failure RecoverVolumeExpansionFailure featuregate.Feature = "RecoverVolumeExpansionFailure" - // owner: @yuzhiquan, @bowei, @PxyUp, @SergeyKanzhelev + // owner: @yuzhiquan, @bowei, @PxyUp // kep: http://kep.k8s.io/2727 // alpha: v1.23 - // beta: v1.24 // // Enables GRPC probe method for {Liveness,Readiness,Startup}Probe. GRPCContainerProbe featuregate.Feature = "GRPCContainerProbe" - - // owner: @zshihang - // kep: http://kep.k8s.io/2800 - // beta: v1.24 - // - // Stop auto-generation of secret-based service account tokens. - LegacyServiceAccountTokenNoAutoGeneration featuregate.Feature = "LegacyServiceAccountTokenNoAutoGeneration" - - // owner: @sanposhiho - // kep: http://kep.k8s.io/3022 - // alpha: v1.24 - // - // Enable MinDomains in Pod Topology Spread. - MinDomainsInPodTopologySpread featuregate.Feature = "MinDomainsInPodTopologySpread" - - // owner: @aojea - // kep: http://kep.k8s.io/3070 - // alpha: v1.24 - // - // Subdivide the ClusterIP range for dynamic and static IP allocation. - ServiceIPStaticSubrange featuregate.Feature = "ServiceIPStaticSubrange" - - // owner: @xing-yang @sonasingh46 - // kep: http://kep.k8s.io/2268 - // alpha: v1.24 - // - // Allow pods to failover to a different node in case of non graceful node shutdown - NodeOutOfServiceVolumeDetach featuregate.Feature = "NodeOutOfServiceVolumeDetach" - - // owner: @krmayankk - // alpha: v1.24 - // - // Enables maxUnavailable for StatefulSet - MaxUnavailableStatefulSet featuregate.Feature = "MaxUnavailableStatefulSet" - - // owner: @rikatz - // kep: http://kep.k8s.io/2943 - // alpha: v1.24 - // - // Enables NetworkPolicy status subresource - NetworkPolicyStatus featuregate.Feature = "NetworkPolicyStatus" - - // owner: @deejross - // kep: http://kep.k8s.io/3140 - // alpha: v1.24 - // - // Enables support for time zones in CronJobs. - CronJobTimeZone featuregate.Feature = "CronJobTimeZone" ) func init() { @@ -893,16 +866,16 @@ func init() { // available throughout Kubernetes binaries. var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{ AppArmor: {Default: true, PreRelease: featuregate.Beta}, - DynamicKubeletConfig: {Default: false, PreRelease: featuregate.Deprecated}, // feature gate is deprecated in 1.22, kubelet logic is removed in 1.24, api server logic can be removed in 1.26 + DynamicKubeletConfig: {Default: false, PreRelease: featuregate.Deprecated}, // feature gate is deprecated in 1.22, remove no early than 1.23 ExperimentalHostUserNamespaceDefaultingGate: {Default: false, PreRelease: featuregate.Beta}, DevicePlugins: {Default: true, PreRelease: featuregate.Beta}, RotateKubeletServerCertificate: {Default: true, PreRelease: featuregate.Beta}, LocalStorageCapacityIsolation: {Default: true, PreRelease: featuregate.Beta}, EphemeralContainers: {Default: true, PreRelease: featuregate.Beta}, QOSReserved: {Default: false, PreRelease: featuregate.Alpha}, - ExpandPersistentVolumes: {Default: true, PreRelease: featuregate.GA}, // remove in 1.25 - ExpandInUsePersistentVolumes: {Default: true, PreRelease: featuregate.GA}, // remove in 1.25 - ExpandCSIVolumes: {Default: true, PreRelease: featuregate.GA}, // remove in 1.25 + ExpandPersistentVolumes: {Default: true, PreRelease: featuregate.Beta}, + ExpandInUsePersistentVolumes: {Default: true, PreRelease: featuregate.Beta}, + ExpandCSIVolumes: {Default: true, PreRelease: featuregate.Beta}, CPUManager: {Default: true, PreRelease: featuregate.Beta}, MemoryManager: {Default: true, PreRelease: featuregate.Beta}, CPUCFSQuotaPeriod: {Default: false, PreRelease: featuregate.Alpha}, @@ -913,13 +886,13 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS InTreePluginGCEUnregister: {Default: false, PreRelease: featuregate.Alpha}, CSIMigrationAWS: {Default: true, PreRelease: featuregate.Beta}, InTreePluginAWSUnregister: {Default: false, PreRelease: featuregate.Alpha}, - CSIMigrationAzureDisk: {Default: true, PreRelease: featuregate.GA}, // On by default in 1.23 (requires Azure Disk CSI driver) + CSIMigrationAzureDisk: {Default: true, PreRelease: featuregate.Beta}, // On by default in 1.23 (requires Azure Disk CSI driver) InTreePluginAzureDiskUnregister: {Default: false, PreRelease: featuregate.Alpha}, - CSIMigrationAzureFile: {Default: true, PreRelease: featuregate.Beta}, // On by default in 1.24 (requires Azure File CSI driver) + CSIMigrationAzureFile: {Default: false, PreRelease: featuregate.Beta}, // Off by default (requires Azure File CSI driver) InTreePluginAzureFileUnregister: {Default: false, PreRelease: featuregate.Alpha}, CSIMigrationvSphere: {Default: false, PreRelease: featuregate.Beta}, // Off by default (requires vSphere CSI driver) InTreePluginvSphereUnregister: {Default: false, PreRelease: featuregate.Alpha}, - CSIMigrationOpenStack: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.26 + CSIMigrationOpenStack: {Default: true, PreRelease: featuregate.Beta}, InTreePluginOpenStackUnregister: {Default: false, PreRelease: featuregate.Alpha}, CSIMigrationRBD: {Default: false, PreRelease: featuregate.Alpha}, // Off by default (requires RBD CSI driver) InTreePluginRBDUnregister: {Default: false, PreRelease: featuregate.Alpha}, @@ -927,21 +900,22 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS CSIMigrationPortworx: {Default: false, PreRelease: featuregate.Alpha}, // Off by default (requires Portworx CSI driver) InTreePluginPortworxUnregister: {Default: false, PreRelease: featuregate.Alpha}, CSIInlineVolume: {Default: true, PreRelease: featuregate.Beta}, - CSIStorageCapacity: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.26 + CSIStorageCapacity: {Default: true, PreRelease: featuregate.Beta}, CSIServiceAccountToken: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.23 GenericEphemeralVolume: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.25 CSIVolumeFSGroupPolicy: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.25 VolumeSubpath: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.25 + RuntimeClass: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.23 NetworkPolicyEndPort: {Default: true, PreRelease: featuregate.Beta}, ProcMountType: {Default: false, PreRelease: featuregate.Alpha}, TTLAfterFinished: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.25 - IndexedJob: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.26 - JobTrackingWithFinalizers: {Default: false, PreRelease: featuregate.Beta}, // Disabled due to #109485 - JobReadyPods: {Default: true, PreRelease: featuregate.Beta}, + IndexedJob: {Default: true, PreRelease: featuregate.Beta}, + JobTrackingWithFinalizers: {Default: true, PreRelease: featuregate.Beta}, + JobReadyPods: {Default: false, PreRelease: featuregate.Alpha}, KubeletPodResources: {Default: true, PreRelease: featuregate.Beta}, LocalStorageCapacityIsolationFSQuotaMonitoring: {Default: false, PreRelease: featuregate.Alpha}, - NonPreemptingPriority: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.25 - PodOverhead: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.26 + NonPreemptingPriority: {Default: true, PreRelease: featuregate.Beta}, + PodOverhead: {Default: true, PreRelease: featuregate.Beta}, IPv6DualStack: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.25 EndpointSlice: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.25 EndpointSliceProxying: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.25 @@ -951,34 +925,38 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS WindowsEndpointSliceProxying: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.25 PodDisruptionBudget: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.25 DaemonSetUpdateSurge: {Default: true, PreRelease: featuregate.Beta}, // on by default in 1.22 + ImmutableEphemeralVolumes: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.24 + HugePageStorageMediumSize: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.24 DownwardAPIHugePages: {Default: true, PreRelease: featuregate.Beta}, // on by default in 1.22 - AnyVolumeDataSource: {Default: true, PreRelease: featuregate.Beta}, // on by default in 1.24 - DefaultPodTopologySpread: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.26 + AnyVolumeDataSource: {Default: false, PreRelease: featuregate.Alpha}, + DefaultPodTopologySpread: {Default: true, PreRelease: featuregate.Beta}, + SetHostnameAsFQDN: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.24 WinOverlay: {Default: true, PreRelease: featuregate.Beta}, WinDSR: {Default: false, PreRelease: featuregate.Alpha}, DisableAcceleratorUsageMetrics: {Default: true, PreRelease: featuregate.Beta}, HPAContainerMetrics: {Default: false, PreRelease: featuregate.Alpha}, SizeMemoryBackedVolumes: {Default: true, PreRelease: featuregate.Beta}, ExecProbeTimeout: {Default: true, PreRelease: featuregate.GA}, // lock to default and remove after v1.22 based on KEP #1972 update - KubeletCredentialProviders: {Default: true, PreRelease: featuregate.Beta}, + KubeletCredentialProviders: {Default: false, PreRelease: featuregate.Alpha}, GracefulNodeShutdown: {Default: true, PreRelease: featuregate.Beta}, - GracefulNodeShutdownBasedOnPodPriority: {Default: true, PreRelease: featuregate.Beta}, - ServiceLBNodePortControl: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.26 - MixedProtocolLBService: {Default: true, PreRelease: featuregate.Beta}, + GracefulNodeShutdownBasedOnPodPriority: {Default: false, PreRelease: featuregate.Alpha}, + ServiceLBNodePortControl: {Default: true, PreRelease: featuregate.Beta}, + MixedProtocolLBService: {Default: false, PreRelease: featuregate.Alpha}, VolumeCapacityPriority: {Default: false, PreRelease: featuregate.Alpha}, - PreferNominatedNode: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.25 - ProbeTerminationGracePeriod: {Default: false, PreRelease: featuregate.Beta}, // Default to false in beta 1.22, set to true in 1.24 + PreferNominatedNode: {Default: true, PreRelease: featuregate.Beta}, + ProbeTerminationGracePeriod: {Default: false, PreRelease: featuregate.Beta}, // Default to false in beta 1.22, set to true in 1.24 NodeSwap: {Default: false, PreRelease: featuregate.Alpha}, PodDeletionCost: {Default: true, PreRelease: featuregate.Beta}, StatefulSetAutoDeletePVC: {Default: false, PreRelease: featuregate.Alpha}, - TopologyAwareHints: {Default: true, PreRelease: featuregate.Beta}, - PodAffinityNamespaceSelector: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.26 - ServiceLoadBalancerClass: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.26 - IngressClassNamespacedParams: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.25 + TopologyAwareHints: {Default: false, PreRelease: featuregate.Beta}, + PodAffinityNamespaceSelector: {Default: true, PreRelease: featuregate.Beta}, + ServiceLoadBalancerClass: {Default: true, PreRelease: featuregate.Beta}, + IngressClassNamespacedParams: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.24 ServiceInternalTrafficPolicy: {Default: true, PreRelease: featuregate.Beta}, LogarithmicScaleDown: {Default: true, PreRelease: featuregate.Beta}, - SuspendJob: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.26 + SuspendJob: {Default: true, PreRelease: featuregate.Beta}, KubeletPodResourcesGetAllocatable: {Default: true, PreRelease: featuregate.Beta}, + NamespaceDefaultLabelName: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.24 CSIVolumeHealth: {Default: false, PreRelease: featuregate.Alpha}, WindowsHostProcessContainers: {Default: true, PreRelease: featuregate.Beta}, DisableCloudProviders: {Default: false, PreRelease: featuregate.Alpha}, @@ -988,39 +966,35 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS SeccompDefault: {Default: false, PreRelease: featuregate.Alpha}, PodSecurity: {Default: true, PreRelease: featuregate.Beta}, ReadWriteOncePod: {Default: false, PreRelease: featuregate.Alpha}, - CSRDuration: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.26 + CSRDuration: {Default: true, PreRelease: featuregate.Beta}, DelegateFSGroupToCSIDriver: {Default: true, PreRelease: featuregate.Beta}, KubeletInUserNamespace: {Default: false, PreRelease: featuregate.Alpha}, MemoryQoS: {Default: false, PreRelease: featuregate.Alpha}, CPUManagerPolicyOptions: {Default: true, PreRelease: featuregate.Beta}, - ControllerManagerLeaderMigration: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.26 + ControllerManagerLeaderMigration: {Default: true, PreRelease: featuregate.Beta}, CPUManagerPolicyAlphaOptions: {Default: false, PreRelease: featuregate.Alpha}, CPUManagerPolicyBetaOptions: {Default: true, PreRelease: featuregate.Beta}, JobMutableNodeSchedulingDirectives: {Default: true, PreRelease: featuregate.Beta}, - IdentifyPodOS: {Default: true, PreRelease: featuregate.Beta}, + IdentifyPodOS: {Default: false, PreRelease: featuregate.Alpha}, PodAndContainerStatsFromCRI: {Default: false, PreRelease: featuregate.Alpha}, HonorPVReclaimPolicy: {Default: false, PreRelease: featuregate.Alpha}, RecoverVolumeExpansionFailure: {Default: false, PreRelease: featuregate.Alpha}, - GRPCContainerProbe: {Default: true, PreRelease: featuregate.Beta}, - LegacyServiceAccountTokenNoAutoGeneration: {Default: true, PreRelease: featuregate.Beta}, - MinDomainsInPodTopologySpread: {Default: false, PreRelease: featuregate.Alpha}, - ServiceIPStaticSubrange: {Default: false, PreRelease: featuregate.Alpha}, - NodeOutOfServiceVolumeDetach: {Default: false, PreRelease: featuregate.Alpha}, - MaxUnavailableStatefulSet: {Default: false, PreRelease: featuregate.Alpha}, - NetworkPolicyStatus: {Default: false, PreRelease: featuregate.Alpha}, - CronJobTimeZone: {Default: false, PreRelease: featuregate.Alpha}, + GRPCContainerProbe: {Default: false, PreRelease: featuregate.Alpha}, // inherited features from generic apiserver, relisted here to get a conflict if it is changed // unintentionally on either side: + genericfeatures.StreamingProxyRedirects: {Default: false, PreRelease: featuregate.Deprecated}, // remove in 1.24 + genericfeatures.ValidateProxyRedirects: {Default: true, PreRelease: featuregate.Deprecated}, genericfeatures.AdvancedAuditing: {Default: true, PreRelease: featuregate.GA}, genericfeatures.APIResponseCompression: {Default: true, PreRelease: featuregate.Beta}, genericfeatures.APIListChunking: {Default: true, PreRelease: featuregate.Beta}, genericfeatures.DryRun: {Default: true, PreRelease: featuregate.GA}, genericfeatures.ServerSideApply: {Default: true, PreRelease: featuregate.GA}, genericfeatures.APIPriorityAndFairness: {Default: true, PreRelease: featuregate.Beta}, - genericfeatures.OpenAPIEnums: {Default: true, PreRelease: featuregate.Beta}, + genericfeatures.WarningHeaders: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.24 + genericfeatures.OpenAPIEnums: {Default: false, PreRelease: featuregate.Alpha}, genericfeatures.CustomResourceValidationExpressions: {Default: false, PreRelease: featuregate.Alpha}, - genericfeatures.OpenAPIV3: {Default: true, PreRelease: featuregate.Beta}, + genericfeatures.OpenAPIV3: {Default: false, PreRelease: featuregate.Alpha}, genericfeatures.ServerSideFieldValidation: {Default: false, PreRelease: featuregate.Alpha}, // features that enable backwards compatibility but are scheduled to be removed // ... diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/OWNERS index 46c315fb21db..9b0a9215c3c2 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/OWNERS @@ -2,19 +2,22 @@ # same list as in https://github.com/kubernetes/kubernetes/blob/master/OWNERS_ALIASES#LC220:~:text=sig%2Dnode%2Dapprovers approvers: - - Random-Liu - - dchen1107 - - derekwaynecarr - - yujuhong - - sjenning - - mrunalp - - klueska +- Random-Liu +- dchen1107 +- derekwaynecarr +- yujuhong +- sjenning +- mrunalp +- klueska + emeritus_approvers: - - dashpole - - vishh +- dashpole +- vishh + reviewers: - - sig-node-reviewers # see https://github.com/kubernetes/kubernetes/blob/master/OWNERS_ALIASES#LC220:~:text=sig%2Dnode%2Dreviewers - - tallclair +- sig-node-reviewers # see https://github.com/kubernetes/kubernetes/blob/master/OWNERS_ALIASES#LC220:~:text=sig%2Dnode%2Dreviewers +- tallclair + labels: - - area/kubelet - - sig/node +- area/kubelet +- sig/node diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/OWNERS index 12e5e15b1831..70b1183c89d3 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/OWNERS @@ -4,6 +4,6 @@ options: no_parent_owners: true approvers: - - api-approvers +- api-approvers reviewers: - - sig-node-api-reviewers +- sig-node-api-reviewers diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/types.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/types.go index c586b0cf6d19..bf6557b70a35 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/types.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/types.go @@ -98,7 +98,7 @@ type KubeletConfiguration struct { // staticPodURL is the URL for accessing static pods to run StaticPodURL string // staticPodURLHeader is a map of slices with HTTP headers to use when accessing the podURL - StaticPodURLHeader map[string][]string `datapolicy:"token"` + StaticPodURLHeader map[string][]string // address is the IP address for the Kubelet to serve on (set to 0.0.0.0 // for all interfaces) Address string @@ -340,10 +340,9 @@ type KubeletConfiguration struct { ContainerLogMaxFiles int32 // ConfigMapAndSecretChangeDetectionStrategy is a mode in which config map and secret managers are running. ConfigMapAndSecretChangeDetectionStrategy ResourceChangeDetectionStrategy - // A comma separated allowlist of unsafe sysctls or sysctl patterns (ending in `*`). - // Unsafe sysctl groups are `kernel.shm*`, `kernel.msg*`, `kernel.sem`, `fs.mqueue.*`, and `net.*`. - // These sysctls are namespaced but not allowed by default. - // For example: "`kernel.msg*,net.ipv4.route.min_pmtu`" + // A comma separated allowlist of unsafe sysctls or sysctl patterns (ending in *). + // Unsafe sysctl groups are kernel.shm*, kernel.msg*, kernel.sem, fs.mqueue.*, and net.*. + // These sysctls are namespaced but not allowed by default. For example: "kernel.msg*,net.ipv4.route.min_pmtu" // +optional AllowedUnsafeSysctls []string // kernelMemcgNotification if enabled, the kubelet will integrate with the kernel memcg @@ -555,9 +554,9 @@ type CredentialProvider struct { // // Each entry in matchImages is a pattern which can optionally contain a port and a path. // Globs can be used in the domain, but not in the port or the path. Globs are supported - // as subdomains like `*.k8s.io` or `k8s.*.io`, and top-level-domains such as `k8s.*`. - // Matching partial subdomains like `app*.k8s.io` is also supported. Each glob can only match - // a single subdomain segment, so `*.io` does not match *.k8s.io. + // as subdomains like '*.k8s.io' or 'k8s.*.io', and top-level-domains such as 'k8s.*'. + // Matching partial subdomains like 'app*.k8s.io' is also supported. Each glob can only match + // a single subdomain segment, so *.io does not match *.k8s.io. // // A match exists between an image and a matchImage when all of the below are true: // - Both contain the same number of domain parts and each part matches. @@ -565,11 +564,11 @@ type CredentialProvider struct { // - If the imageMatch contains a port, then the port must match in the image as well. // // Example values of matchImages: - // - `123456789.dkr.ecr.us-east-1.amazonaws.com` - // - `*.azurecr.io` - // - `gcr.io` - // - `*.*.registry.io` - // - `registry.io:8080/path` + // - 123456789.dkr.ecr.us-east-1.amazonaws.com + // - *.azurecr.io + // - gcr.io + // - *.*.registry.io + // - registry.io:8080/path MatchImages []string // defaultCacheDuration is the default duration the plugin will cache credentials in-memory @@ -579,7 +578,6 @@ type CredentialProvider struct { // Required input version of the exec CredentialProviderRequest. The returned CredentialProviderResponse // MUST use the same encoding version as the input. Current supported values are: // - credentialprovider.kubelet.k8s.io/v1alpha1 - // - credentialprovider.kubelet.k8s.io/v1beta1 APIVersion string // Arguments to pass to the command when executing it. diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/v1beta1/zz_generated.conversion.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/v1beta1/zz_generated.conversion.go index 5cc1efddcd7f..95659af0de06 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/v1beta1/zz_generated.conversion.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/v1beta1/zz_generated.conversion.go @@ -40,36 +40,6 @@ func init() { // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*v1beta1.CredentialProvider)(nil), (*config.CredentialProvider)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CredentialProvider_To_config_CredentialProvider(a.(*v1beta1.CredentialProvider), b.(*config.CredentialProvider), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*config.CredentialProvider)(nil), (*v1beta1.CredentialProvider)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_config_CredentialProvider_To_v1beta1_CredentialProvider(a.(*config.CredentialProvider), b.(*v1beta1.CredentialProvider), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.CredentialProviderConfig)(nil), (*config.CredentialProviderConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CredentialProviderConfig_To_config_CredentialProviderConfig(a.(*v1beta1.CredentialProviderConfig), b.(*config.CredentialProviderConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*config.CredentialProviderConfig)(nil), (*v1beta1.CredentialProviderConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_config_CredentialProviderConfig_To_v1beta1_CredentialProviderConfig(a.(*config.CredentialProviderConfig), b.(*v1beta1.CredentialProviderConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1beta1.ExecEnvVar)(nil), (*config.ExecEnvVar)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ExecEnvVar_To_config_ExecEnvVar(a.(*v1beta1.ExecEnvVar), b.(*config.ExecEnvVar), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*config.ExecEnvVar)(nil), (*v1beta1.ExecEnvVar)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_config_ExecEnvVar_To_v1beta1_ExecEnvVar(a.(*config.ExecEnvVar), b.(*v1beta1.ExecEnvVar), scope) - }); err != nil { - return err - } if err := s.AddGeneratedConversionFunc((*v1beta1.KubeletAnonymousAuthentication)(nil), (*config.KubeletAnonymousAuthentication)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_KubeletAnonymousAuthentication_To_config_KubeletAnonymousAuthentication(a.(*v1beta1.KubeletAnonymousAuthentication), b.(*config.KubeletAnonymousAuthentication), scope) }); err != nil { @@ -183,78 +153,6 @@ func RegisterConversions(s *runtime.Scheme) error { return nil } -func autoConvert_v1beta1_CredentialProvider_To_config_CredentialProvider(in *v1beta1.CredentialProvider, out *config.CredentialProvider, s conversion.Scope) error { - out.Name = in.Name - out.MatchImages = *(*[]string)(unsafe.Pointer(&in.MatchImages)) - out.DefaultCacheDuration = (*v1.Duration)(unsafe.Pointer(in.DefaultCacheDuration)) - out.APIVersion = in.APIVersion - out.Args = *(*[]string)(unsafe.Pointer(&in.Args)) - out.Env = *(*[]config.ExecEnvVar)(unsafe.Pointer(&in.Env)) - return nil -} - -// Convert_v1beta1_CredentialProvider_To_config_CredentialProvider is an autogenerated conversion function. -func Convert_v1beta1_CredentialProvider_To_config_CredentialProvider(in *v1beta1.CredentialProvider, out *config.CredentialProvider, s conversion.Scope) error { - return autoConvert_v1beta1_CredentialProvider_To_config_CredentialProvider(in, out, s) -} - -func autoConvert_config_CredentialProvider_To_v1beta1_CredentialProvider(in *config.CredentialProvider, out *v1beta1.CredentialProvider, s conversion.Scope) error { - out.Name = in.Name - out.MatchImages = *(*[]string)(unsafe.Pointer(&in.MatchImages)) - out.DefaultCacheDuration = (*v1.Duration)(unsafe.Pointer(in.DefaultCacheDuration)) - out.APIVersion = in.APIVersion - out.Args = *(*[]string)(unsafe.Pointer(&in.Args)) - out.Env = *(*[]v1beta1.ExecEnvVar)(unsafe.Pointer(&in.Env)) - return nil -} - -// Convert_config_CredentialProvider_To_v1beta1_CredentialProvider is an autogenerated conversion function. -func Convert_config_CredentialProvider_To_v1beta1_CredentialProvider(in *config.CredentialProvider, out *v1beta1.CredentialProvider, s conversion.Scope) error { - return autoConvert_config_CredentialProvider_To_v1beta1_CredentialProvider(in, out, s) -} - -func autoConvert_v1beta1_CredentialProviderConfig_To_config_CredentialProviderConfig(in *v1beta1.CredentialProviderConfig, out *config.CredentialProviderConfig, s conversion.Scope) error { - out.Providers = *(*[]config.CredentialProvider)(unsafe.Pointer(&in.Providers)) - return nil -} - -// Convert_v1beta1_CredentialProviderConfig_To_config_CredentialProviderConfig is an autogenerated conversion function. -func Convert_v1beta1_CredentialProviderConfig_To_config_CredentialProviderConfig(in *v1beta1.CredentialProviderConfig, out *config.CredentialProviderConfig, s conversion.Scope) error { - return autoConvert_v1beta1_CredentialProviderConfig_To_config_CredentialProviderConfig(in, out, s) -} - -func autoConvert_config_CredentialProviderConfig_To_v1beta1_CredentialProviderConfig(in *config.CredentialProviderConfig, out *v1beta1.CredentialProviderConfig, s conversion.Scope) error { - out.Providers = *(*[]v1beta1.CredentialProvider)(unsafe.Pointer(&in.Providers)) - return nil -} - -// Convert_config_CredentialProviderConfig_To_v1beta1_CredentialProviderConfig is an autogenerated conversion function. -func Convert_config_CredentialProviderConfig_To_v1beta1_CredentialProviderConfig(in *config.CredentialProviderConfig, out *v1beta1.CredentialProviderConfig, s conversion.Scope) error { - return autoConvert_config_CredentialProviderConfig_To_v1beta1_CredentialProviderConfig(in, out, s) -} - -func autoConvert_v1beta1_ExecEnvVar_To_config_ExecEnvVar(in *v1beta1.ExecEnvVar, out *config.ExecEnvVar, s conversion.Scope) error { - out.Name = in.Name - out.Value = in.Value - return nil -} - -// Convert_v1beta1_ExecEnvVar_To_config_ExecEnvVar is an autogenerated conversion function. -func Convert_v1beta1_ExecEnvVar_To_config_ExecEnvVar(in *v1beta1.ExecEnvVar, out *config.ExecEnvVar, s conversion.Scope) error { - return autoConvert_v1beta1_ExecEnvVar_To_config_ExecEnvVar(in, out, s) -} - -func autoConvert_config_ExecEnvVar_To_v1beta1_ExecEnvVar(in *config.ExecEnvVar, out *v1beta1.ExecEnvVar, s conversion.Scope) error { - out.Name = in.Name - out.Value = in.Value - return nil -} - -// Convert_config_ExecEnvVar_To_v1beta1_ExecEnvVar is an autogenerated conversion function. -func Convert_config_ExecEnvVar_To_v1beta1_ExecEnvVar(in *config.ExecEnvVar, out *v1beta1.ExecEnvVar, s conversion.Scope) error { - return autoConvert_config_ExecEnvVar_To_v1beta1_ExecEnvVar(in, out, s) -} - func autoConvert_v1beta1_KubeletAnonymousAuthentication_To_config_KubeletAnonymousAuthentication(in *v1beta1.KubeletAnonymousAuthentication, out *config.KubeletAnonymousAuthentication, s conversion.Scope) error { if err := v1.Convert_Pointer_bool_To_bool(&in.Enabled, &out.Enabled, s); err != nil { return err diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/validation/validation.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/validation/validation.go index 5e38bbfdd018..7a89f87ddd7d 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/validation/validation.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/validation/validation.go @@ -68,7 +68,7 @@ func ValidateKubeletConfiguration(kc *kubeletconfig.KubeletConfiguration) error allErrors = append(allErrors, fmt.Errorf("invalid configuration: healthzPort (--healthz-port) %v must be between 1 and 65535, inclusive", kc.HealthzPort)) } if !localFeatureGate.Enabled(features.CPUCFSQuotaPeriod) && kc.CPUCFSQuotaPeriod != defaultCFSQuota { - allErrors = append(allErrors, fmt.Errorf("invalid configuration: cpuCFSQuotaPeriod (--cpu-cfs-quota-period) %v requires feature gate CustomCPUCFSQuotaPeriod", kc.CPUCFSQuotaPeriod)) + allErrors = append(allErrors, fmt.Errorf("invalid configuration: cpuCFSQuotaPeriod %v requires feature gate CustomCPUCFSQuotaPeriod", kc.CPUCFSQuotaPeriod)) } if localFeatureGate.Enabled(features.CPUCFSQuotaPeriod) && utilvalidation.IsInRange(int(kc.CPUCFSQuotaPeriod.Duration), int(1*time.Microsecond), int(time.Second)) != nil { allErrors = append(allErrors, fmt.Errorf("invalid configuration: cpuCFSQuotaPeriod (--cpu-cfs-quota-period) %v must be between 1usec and 1sec, inclusive", kc.CPUCFSQuotaPeriod)) @@ -95,7 +95,7 @@ func ValidateKubeletConfiguration(kc *kubeletconfig.KubeletConfiguration) error allErrors = append(allErrors, fmt.Errorf("invalid configuration: kubeAPIQPS (--kube-api-qps) %v must not be a negative number", kc.KubeAPIQPS)) } if kc.NodeStatusMaxImages < -1 { - allErrors = append(allErrors, fmt.Errorf("invalid configuration: nodeStatusMaxImages (--node-status-max-images) %v must be -1 or greater", kc.NodeStatusMaxImages)) + allErrors = append(allErrors, fmt.Errorf("invalid configuration: nodeStatusMaxImages (--node-status-max-images) must be -1 or greater")) } if kc.MaxOpenFiles < 0 { allErrors = append(allErrors, fmt.Errorf("invalid configuration: maxOpenFiles (--max-open-files) %v must not be a negative number", kc.MaxOpenFiles)) @@ -133,7 +133,7 @@ func ValidateKubeletConfiguration(kc *kubeletconfig.KubeletConfiguration) error allErrors = append(allErrors, fmt.Errorf("invalid taint: %v", nodeTaint)) } if nodeTaint.TimeAdded != nil { - allErrors = append(allErrors, fmt.Errorf("invalid configuration: taint.TimeAdded is not nil")) + allErrors = append(allErrors, fmt.Errorf("taint TimeAdded is not nil")) } } @@ -143,31 +143,28 @@ func ValidateKubeletConfiguration(kc *kubeletconfig.KubeletConfiguration) error case kubeletconfig.RestrictedTopologyManagerPolicy: case kubeletconfig.SingleNumaNodeTopologyManagerPolicy: default: - allErrors = append(allErrors, fmt.Errorf("invalid configuration: topologyManagerPolicy (--topology-manager-policy) %q must be one of: %q", kc.TopologyManagerPolicy, []string{kubeletconfig.NoneTopologyManagerPolicy, kubeletconfig.BestEffortTopologyManagerPolicy, kubeletconfig.RestrictedTopologyManagerPolicy, kubeletconfig.SingleNumaNodeTopologyManagerPolicy})) + allErrors = append(allErrors, fmt.Errorf("invalid configuration: topologyManagerPolicy non-allowable value: %v", kc.TopologyManagerPolicy)) } if kc.TopologyManagerScope != kubeletconfig.ContainerTopologyManagerScope && !localFeatureGate.Enabled(features.TopologyManager) { allErrors = append(allErrors, fmt.Errorf("invalid configuration: topologyManagerScope %v requires feature gate TopologyManager", kc.TopologyManagerScope)) } - switch kc.TopologyManagerScope { - case kubeletconfig.ContainerTopologyManagerScope: - case kubeletconfig.PodTopologyManagerScope: - default: - allErrors = append(allErrors, fmt.Errorf("invalid configuration: topologyManagerScope (--topology-manager-scope) %q must be one of: %q, or %q", kc.TopologyManagerScope, kubeletconfig.ContainerTopologyManagerScope, kubeletconfig.PodTopologyManagerScope)) + if kc.TopologyManagerScope != kubeletconfig.ContainerTopologyManagerScope && kc.TopologyManagerScope != kubeletconfig.PodTopologyManagerScope { + allErrors = append(allErrors, fmt.Errorf("invalid configuration: topologyManagerScope non-allowable value: %v", kc.TopologyManagerScope)) } if localFeatureGate.Enabled(features.GracefulNodeShutdown) { - if kc.ShutdownGracePeriodCriticalPods.Duration > kc.ShutdownGracePeriod.Duration { - allErrors = append(allErrors, fmt.Errorf("invalid configuration: shutdownGracePeriodCriticalPods %v must be <= shutdownGracePeriod %v", kc.ShutdownGracePeriodCriticalPods, kc.ShutdownGracePeriod)) + if kc.ShutdownGracePeriod.Duration < 0 || kc.ShutdownGracePeriodCriticalPods.Duration < 0 || kc.ShutdownGracePeriodCriticalPods.Duration > kc.ShutdownGracePeriod.Duration { + allErrors = append(allErrors, fmt.Errorf("invalid configuration: ShutdownGracePeriod %v must be >= 0, ShutdownGracePeriodCriticalPods %v must be >= 0, and ShutdownGracePeriodCriticalPods %v must be <= ShutdownGracePeriod %v", kc.ShutdownGracePeriod, kc.ShutdownGracePeriodCriticalPods, kc.ShutdownGracePeriodCriticalPods, kc.ShutdownGracePeriod)) } - if kc.ShutdownGracePeriod.Duration < 0 || (kc.ShutdownGracePeriod.Duration > 0 && kc.ShutdownGracePeriod.Duration < time.Second) { - allErrors = append(allErrors, fmt.Errorf("invalid configuration: shutdownGracePeriod %v must be either zero or otherwise >= 1 sec", kc.ShutdownGracePeriod)) + if kc.ShutdownGracePeriod.Duration > 0 && kc.ShutdownGracePeriod.Duration < time.Duration(time.Second) { + allErrors = append(allErrors, fmt.Errorf("invalid configuration: ShutdownGracePeriod %v must be either zero or otherwise >= 1 sec", kc.ShutdownGracePeriod)) } - if kc.ShutdownGracePeriodCriticalPods.Duration < 0 || (kc.ShutdownGracePeriodCriticalPods.Duration > 0 && kc.ShutdownGracePeriodCriticalPods.Duration < time.Second) { - allErrors = append(allErrors, fmt.Errorf("invalid configuration: shutdownGracePeriodCriticalPods %v must be either zero or otherwise >= 1 sec", kc.ShutdownGracePeriodCriticalPods)) + if kc.ShutdownGracePeriodCriticalPods.Duration > 0 && kc.ShutdownGracePeriodCriticalPods.Duration < time.Duration(time.Second) { + allErrors = append(allErrors, fmt.Errorf("invalid configuration: ShutdownGracePeriodCriticalPods %v must be either zero or otherwise >= 1 sec", kc.ShutdownGracePeriodCriticalPods)) } } if (kc.ShutdownGracePeriod.Duration > 0 || kc.ShutdownGracePeriodCriticalPods.Duration > 0) && !localFeatureGate.Enabled(features.GracefulNodeShutdown) { - allErrors = append(allErrors, fmt.Errorf("invalid configuration: specifying shutdownGracePeriod or shutdownGracePeriodCriticalPods requires feature gate GracefulNodeShutdown")) + allErrors = append(allErrors, fmt.Errorf("invalid configuration: Specifying ShutdownGracePeriod or ShutdownGracePeriodCriticalPods requires feature gate GracefulNodeShutdown")) } if localFeatureGate.Enabled(features.GracefulNodeShutdownBasedOnPodPriority) { if len(kc.ShutdownGracePeriodByPodPriority) != 0 && (kc.ShutdownGracePeriod.Duration > 0 || kc.ShutdownGracePeriodCriticalPods.Duration > 0) { @@ -180,16 +177,12 @@ func ValidateKubeletConfiguration(kc *kubeletconfig.KubeletConfiguration) error } } if localFeatureGate.Enabled(features.NodeSwap) { - switch kc.MemorySwap.SwapBehavior { - case "": - case kubetypes.LimitedSwap: - case kubetypes.UnlimitedSwap: - default: - allErrors = append(allErrors, fmt.Errorf("invalid configuration: memorySwap.swapBehavior %q must be one of: \"\", %q, or %q", kc.MemorySwap.SwapBehavior, kubetypes.LimitedSwap, kubetypes.UnlimitedSwap)) + if kc.MemorySwap.SwapBehavior != "" && kc.MemorySwap.SwapBehavior != kubetypes.LimitedSwap && kc.MemorySwap.SwapBehavior != kubetypes.UnlimitedSwap { + allErrors = append(allErrors, fmt.Errorf("invalid configuration: MemorySwap.SwapBehavior %v must be one of: LimitedSwap, UnlimitedSwap", kc.MemorySwap.SwapBehavior)) } } if !localFeatureGate.Enabled(features.NodeSwap) && kc.MemorySwap != (kubeletconfig.MemorySwapConfiguration{}) { - allErrors = append(allErrors, fmt.Errorf("invalid configuration: memorySwap.swapBehavior cannot be set when NodeSwap feature flag is disabled")) + allErrors = append(allErrors, fmt.Errorf("invalid configuration: MemorySwap.SwapBehavior cannot be set when NodeSwap feature flag is disabled")) } for _, val := range kc.EnforceNodeAllocatable { @@ -197,15 +190,15 @@ func ValidateKubeletConfiguration(kc *kubeletconfig.KubeletConfiguration) error case kubetypes.NodeAllocatableEnforcementKey: case kubetypes.SystemReservedEnforcementKey: if kc.SystemReservedCgroup == "" { - allErrors = append(allErrors, fmt.Errorf("invalid configuration: systemReservedCgroup (--system-reserved-cgroup) must be specified when %q contained in enforceNodeAllocatable (--enforce-node-allocatable)", kubetypes.SystemReservedEnforcementKey)) + allErrors = append(allErrors, fmt.Errorf("invalid configuration: systemReservedCgroup (--system-reserved-cgroup) must be specified when 'system-reserved' contained in enforceNodeAllocatable (--enforce-node-allocatable)")) } case kubetypes.KubeReservedEnforcementKey: if kc.KubeReservedCgroup == "" { - allErrors = append(allErrors, fmt.Errorf("invalid configuration: kubeReservedCgroup (--kube-reserved-cgroup) must be specified when %q contained in enforceNodeAllocatable (--enforce-node-allocatable)", kubetypes.KubeReservedEnforcementKey)) + allErrors = append(allErrors, fmt.Errorf("invalid configuration: kubeReservedCgroup (--kube-reserved-cgroup) must be specified when 'kube-reserved' contained in enforceNodeAllocatable (--enforce-node-allocatable)")) } case kubetypes.NodeAllocatableNoneKey: if len(kc.EnforceNodeAllocatable) > 1 { - allErrors = append(allErrors, fmt.Errorf("invalid configuration: enforceNodeAllocatable (--enforce-node-allocatable) may not contain additional enforcements when %q is specified", kubetypes.NodeAllocatableNoneKey)) + allErrors = append(allErrors, fmt.Errorf("invalid configuration: enforceNodeAllocatable (--enforce-node-allocatable) may not contain additional enforcements when '%s' is specified", kubetypes.NodeAllocatableNoneKey)) } default: allErrors = append(allErrors, fmt.Errorf("invalid configuration: option %q specified for enforceNodeAllocatable (--enforce-node-allocatable). Valid options are %q, %q, %q, or %q", @@ -223,10 +216,10 @@ func ValidateKubeletConfiguration(kc *kubeletconfig.KubeletConfiguration) error if kc.ReservedSystemCPUs != "" { // --reserved-cpus does not support --system-reserved-cgroup or --kube-reserved-cgroup if kc.SystemReservedCgroup != "" || kc.KubeReservedCgroup != "" { - allErrors = append(allErrors, fmt.Errorf("invalid configuration: can't use reservedSystemCPUs (--reserved-cpus) with systemReservedCgroup (--system-reserved-cgroup) or kubeReservedCgroup (--kube-reserved-cgroup)")) + allErrors = append(allErrors, fmt.Errorf("can't use reservedSystemCPUs (--reserved-cpus) with systemReservedCgroup (--system-reserved-cgroup) or kubeReservedCgroup (--kube-reserved-cgroup)")) } if _, err := cpuset.Parse(kc.ReservedSystemCPUs); err != nil { - allErrors = append(allErrors, fmt.Errorf("invalid configuration: unable to parse reservedSystemCPUs (--reserved-cpus) %v, error: %w", kc.ReservedSystemCPUs, err)) + allErrors = append(allErrors, fmt.Errorf("unable to parse reservedSystemCPUs (--reserved-cpus), error: %v", err)) } } @@ -245,7 +238,7 @@ func ValidateKubeletConfiguration(kc *kubeletconfig.KubeletConfiguration) error allErrors = append(allErrors, fmt.Errorf("invalid configuration: memoryThrottlingFactor is required when MemoryQoS feature flag is enabled")) } if kc.MemoryThrottlingFactor != nil && (*kc.MemoryThrottlingFactor <= 0 || *kc.MemoryThrottlingFactor > 1.0) { - allErrors = append(allErrors, fmt.Errorf("invalid configuration: memoryThrottlingFactor %v must be greater than 0 and less than or equal to 1.0", *kc.MemoryThrottlingFactor)) + allErrors = append(allErrors, fmt.Errorf("invalid configuration: memoryThrottlingFactor %v must be greater than 0 and less than or equal to 1.0", kc.MemoryThrottlingFactor)) } return utilerrors.NewAggregate(allErrors) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/validation/validation_reserved_memory.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/validation/validation_reserved_memory.go index abc133ce876f..ba4d9a289ffb 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/validation/validation_reserved_memory.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/apis/config/validation/validation_reserved_memory.go @@ -41,17 +41,17 @@ func validateReservedMemoryConfiguration(kc *kubeletconfig.KubeletConfiguration) for resourceName, q := range reservedMemory.Limits { if !reservedMemorySupportedLimit(resourceName) { - errors = append(errors, fmt.Errorf("invalid configuration: the limit type %q for NUMA node %d is not supported, only %v is accepted", resourceName, numaNode, []v1.ResourceName{v1.ResourceMemory, v1.ResourceHugePagesPrefix + ""})) + errors = append(errors, fmt.Errorf("the limit type %q for NUMA node %d is not supported, only %v is accepted", resourceName, numaNode, []v1.ResourceName{v1.ResourceMemory, v1.ResourceHugePagesPrefix + ""})) } // validates that the limit has non-zero value if q.IsZero() { - errors = append(errors, fmt.Errorf("invalid configuration: reserved memory may not be zero for NUMA node %d and resource %q", numaNode, resourceName)) + errors = append(errors, fmt.Errorf("reserved memory may not be zero for NUMA node %d and resource %q", numaNode, resourceName)) } // validates that no duplication for NUMA node and limit type occurred if _, ok := numaTypeDuplicates[numaNode][resourceName]; ok { - errors = append(errors, fmt.Errorf("invalid configuration: the reserved memory has a duplicate value for NUMA node %d and resource %q", numaNode, resourceName)) + errors = append(errors, fmt.Errorf("the reserved memory has a duplicate value for NUMA node %d and resource %q", numaNode, resourceName)) } numaTypeDuplicates[numaNode][resourceName] = true } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/cadvisor_linux.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/cadvisor_linux.go index 1b118722777e..92a2a3ca254d 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/cadvisor_linux.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/cadvisor_linux.go @@ -91,7 +91,6 @@ func New(imageFsInfoProvider ImageFsInfoProvider, rootPath string, cgroupRoots [ cadvisormetrics.NetworkUsageMetrics: struct{}{}, cadvisormetrics.AppMetrics: struct{}{}, cadvisormetrics.ProcessMetrics: struct{}{}, - cadvisormetrics.OOMMetrics: struct{}{}, } // Only add the Accelerator metrics if the feature is inactive diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/cadvisor_linux_docker.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/cadvisor_linux_docker.go new file mode 100644 index 000000000000..cdd975efffdd --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/cadvisor_linux_docker.go @@ -0,0 +1,26 @@ +//go:build linux && !dockerless +// +build linux,!dockerless + +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cadvisor + +import ( + // We only want to perform this docker specific cadvisor init when we are not + // using the `dockerless` build tag. + _ "github.com/google/cadvisor/container/docker/install" +) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/helpers_linux.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/helpers_linux.go index c512d3d05101..ee6889b9d571 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/helpers_linux.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/helpers_linux.go @@ -23,27 +23,34 @@ import ( "fmt" cadvisorfs "github.com/google/cadvisor/fs" + "k8s.io/kubernetes/pkg/kubelet/types" ) // imageFsInfoProvider knows how to translate the configured runtime // to its file system label for images. type imageFsInfoProvider struct { + runtime string runtimeEndpoint string } // ImageFsInfoLabel returns the image fs label for the configured runtime. // For remote runtimes, it handles additional runtimes natively understood by cAdvisor. func (i *imageFsInfoProvider) ImageFsInfoLabel() (string, error) { - // This is a temporary workaround to get stats for cri-o from cadvisor - // and should be removed. - // Related to https://github.com/kubernetes/kubernetes/issues/51798 - if i.runtimeEndpoint == CrioSocket || i.runtimeEndpoint == "unix://"+CrioSocket { - return cadvisorfs.LabelCrioImages, nil + switch i.runtime { + case types.DockerContainerRuntime: + return cadvisorfs.LabelDockerImages, nil + case types.RemoteContainerRuntime: + // This is a temporary workaround to get stats for cri-o from cadvisor + // and should be removed. + // Related to https://github.com/kubernetes/kubernetes/issues/51798 + if i.runtimeEndpoint == CrioSocket || i.runtimeEndpoint == "unix://"+CrioSocket { + return cadvisorfs.LabelCrioImages, nil + } } return "", fmt.Errorf("no imagefs label for configured runtime") } // NewImageFsInfoProvider returns a provider for the specified runtime configuration. -func NewImageFsInfoProvider(runtimeEndpoint string) ImageFsInfoProvider { - return &imageFsInfoProvider{runtimeEndpoint: runtimeEndpoint} +func NewImageFsInfoProvider(runtime, runtimeEndpoint string) ImageFsInfoProvider { + return &imageFsInfoProvider{runtime: runtime, runtimeEndpoint: runtimeEndpoint} } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/helpers_unsupported.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/helpers_unsupported.go index 2379ef1f1883..26e6bbc122f4 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/helpers_unsupported.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/helpers_unsupported.go @@ -30,6 +30,6 @@ func (i *unsupportedImageFsInfoProvider) ImageFsInfoLabel() (string, error) { } // NewImageFsInfoProvider returns a provider for the specified runtime configuration. -func NewImageFsInfoProvider(runtimeEndpoint string) ImageFsInfoProvider { +func NewImageFsInfoProvider(runtime, runtimeEndpoint string) ImageFsInfoProvider { return &unsupportedImageFsInfoProvider{} } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/util.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/util.go index d5ad3a6b580b..6020abd4dee1 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/util.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/util.go @@ -17,11 +17,14 @@ limitations under the License. package cadvisor import ( + goruntime "runtime" + cadvisorapi "github.com/google/cadvisor/info/v1" cadvisorapi2 "github.com/google/cadvisor/info/v2" "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" + kubetypes "k8s.io/kubernetes/pkg/kubelet/types" ) const ( @@ -64,10 +67,13 @@ func EphemeralStorageCapacityFromFsInfo(info cadvisorapi2.FsInfo) v1.ResourceLis } // UsingLegacyCadvisorStats returns true if container stats are provided by cadvisor instead of through the CRI. -// CRI integrations should get container metrics via CRI. +// CRI integrations should get container metrics via CRI. Docker +// uses the built-in cadvisor to gather such metrics on Linux for +// historical reasons. // TODO: cri-o relies on cadvisor as a temporary workaround. The code should // be removed. Related issue: // https://github.com/kubernetes/kubernetes/issues/51798 -func UsingLegacyCadvisorStats(runtimeEndpoint string) bool { - return runtimeEndpoint == CrioSocket || runtimeEndpoint == "unix://"+CrioSocket +func UsingLegacyCadvisorStats(runtime, runtimeEndpoint string) bool { + return (runtime == kubetypes.DockerContainerRuntime && goruntime.GOOS == "linux") || + runtimeEndpoint == CrioSocket || runtimeEndpoint == "unix://"+CrioSocket } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/certificate/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/certificate/OWNERS index 3c3b94c58c3f..3cf03643835a 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/certificate/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/certificate/OWNERS @@ -1,8 +1,9 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - sig-auth-certificates-approvers +- sig-auth-certificates-approvers reviewers: - - sig-auth-certificates-reviewers +- sig-auth-certificates-reviewers labels: - - sig/auth +- sig/auth + diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/certificate/kubelet.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/certificate/kubelet.go index d27777554473..5f370e11c30b 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/certificate/kubelet.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/certificate/kubelet.go @@ -130,7 +130,7 @@ func NewKubeletServerCertificateManager(kubeClient clientset.Interface, kubeCfg return nil, fmt.Errorf("failed to initialize server certificate manager: %v", err) } legacyregistry.RawMustRegister(compbasemetrics.NewGaugeFunc( - &compbasemetrics.GaugeOpts{ + compbasemetrics.GaugeOpts{ Subsystem: metrics.KubeletSubsystem, Name: "certificate_manager_server_ttl_seconds", Help: "Gauge of the shortest TTL (time-to-live) of " + diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/OWNERS index cc6704003540..94a3d54d2bd9 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/OWNERS @@ -1,13 +1,12 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - Random-Liu - - dchen1107 - - derekwaynecarr - - yujuhong - - klueska +- Random-Liu +- dchen1107 +- derekwaynecarr +- vishh +- yujuhong +- ConnorDoyle +- klueska reviewers: - - sig-node-reviewers -emeritus_approvers: - - ConnorDoyle - - vishh +- sig-node-reviewers diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cgroup_manager_linux.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cgroup_manager_linux.go index fa36d6bc1d7c..230173690d56 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cgroup_manager_linux.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cgroup_manager_linux.go @@ -28,8 +28,9 @@ import ( "time" libcontainercgroups "github.com/opencontainers/runc/libcontainer/cgroups" + cgroupfs "github.com/opencontainers/runc/libcontainer/cgroups/fs" + cgroupfs2 "github.com/opencontainers/runc/libcontainer/cgroups/fs2" "github.com/opencontainers/runc/libcontainer/cgroups/fscommon" - "github.com/opencontainers/runc/libcontainer/cgroups/manager" cgroupsystemd "github.com/opencontainers/runc/libcontainer/cgroups/systemd" libcontainerconfigs "github.com/opencontainers/runc/libcontainer/configs" "k8s.io/klog/v2" @@ -41,7 +42,14 @@ import ( "k8s.io/kubernetes/pkg/kubelet/metrics" ) +// libcontainerCgroupManagerType defines how to interface with libcontainer +type libcontainerCgroupManagerType string + const ( + // libcontainerCgroupfs means use libcontainer with cgroupfs + libcontainerCgroupfs libcontainerCgroupManagerType = "cgroupfs" + // libcontainerSystemd means use libcontainer with systemd + libcontainerSystemd libcontainerCgroupManagerType = "systemd" // systemdSuffix is the cgroup name suffix for systemd systemdSuffix string = ".slice" // MemoryMin is memory.min for cgroup v2 @@ -125,6 +133,39 @@ func IsSystemdStyleName(name string) bool { return strings.HasSuffix(name, systemdSuffix) } +// libcontainerAdapter provides a simplified interface to libcontainer based on libcontainer type. +type libcontainerAdapter struct { + // cgroupManagerType defines how to interface with libcontainer + cgroupManagerType libcontainerCgroupManagerType +} + +// newLibcontainerAdapter returns a configured libcontainerAdapter for specified manager. +// it does any initialization required by that manager to function. +func newLibcontainerAdapter(cgroupManagerType libcontainerCgroupManagerType) *libcontainerAdapter { + return &libcontainerAdapter{cgroupManagerType: cgroupManagerType} +} + +// newManager returns an implementation of cgroups.Manager +func (l *libcontainerAdapter) newManager(cgroups *libcontainerconfigs.Cgroup, paths map[string]string) (libcontainercgroups.Manager, error) { + switch l.cgroupManagerType { + case libcontainerCgroupfs: + if libcontainercgroups.IsCgroup2UnifiedMode() { + return cgroupfs2.NewManager(cgroups, paths["memory"], false) + } + return cgroupfs.NewManager(cgroups, paths, false), nil + case libcontainerSystemd: + // this means you asked systemd to manage cgroups, but systemd was not on the host, so all you can do is panic... + if !cgroupsystemd.IsRunningSystemd() { + panic("systemd cgroup manager not available") + } + if libcontainercgroups.IsCgroup2UnifiedMode() { + return cgroupsystemd.NewUnifiedManager(cgroups, paths["memory"], false), nil + } + return cgroupsystemd.NewLegacyManager(cgroups, paths), nil + } + return nil, fmt.Errorf("invalid cgroup manager configuration") +} + // CgroupSubsystems holds information about the mounted cgroup subsystems type CgroupSubsystems struct { // Cgroup subsystem mounts. @@ -139,14 +180,13 @@ type CgroupSubsystems struct { // cgroupManagerImpl implements the CgroupManager interface. // Its a stateless object which can be used to // update,create or delete any number of cgroups -// It relies on runc/libcontainer cgroup managers. +// It uses the Libcontainer raw fs cgroup manager for cgroup management. type cgroupManagerImpl struct { // subsystems holds information about all the // mounted cgroup subsystems on the node subsystems *CgroupSubsystems - - // useSystemd tells if systemd cgroup manager should be used. - useSystemd bool + // simplifies interaction with libcontainer and its cgroup managers + adapter *libcontainerAdapter } // Make sure that cgroupManagerImpl implements the CgroupManager interface @@ -154,16 +194,20 @@ var _ CgroupManager = &cgroupManagerImpl{} // NewCgroupManager is a factory method that returns a CgroupManager func NewCgroupManager(cs *CgroupSubsystems, cgroupDriver string) CgroupManager { + managerType := libcontainerCgroupfs + if cgroupDriver == string(libcontainerSystemd) { + managerType = libcontainerSystemd + } return &cgroupManagerImpl{ subsystems: cs, - useSystemd: cgroupDriver == "systemd", + adapter: newLibcontainerAdapter(managerType), } } // Name converts the cgroup to the driver specific value in cgroupfs form. // This always returns a valid cgroupfs path even when systemd driver is in use! func (m *cgroupManagerImpl) Name(name CgroupName) string { - if m.useSystemd { + if m.adapter.cgroupManagerType == libcontainerSystemd { return name.ToSystemd() } return name.ToCgroupfs() @@ -171,7 +215,7 @@ func (m *cgroupManagerImpl) Name(name CgroupName) string { // CgroupName converts the literal cgroupfs name on the host to an internal identifier. func (m *cgroupManagerImpl) CgroupName(name string) CgroupName { - if m.useSystemd { + if m.adapter.cgroupManagerType == libcontainerSystemd { return ParseSystemdToCgroupName(name) } return ParseCgroupfsToCgroupName(name) @@ -193,59 +237,37 @@ func (m *cgroupManagerImpl) buildCgroupUnifiedPath(name CgroupName) string { return path.Join(cmutil.CgroupRoot, cgroupFsAdaptedName) } -// libctCgroupConfig converts CgroupConfig to libcontainer's Cgroup config. -func (m *cgroupManagerImpl) libctCgroupConfig(in *CgroupConfig, needResources bool) *libcontainerconfigs.Cgroup { - config := &libcontainerconfigs.Cgroup{ - Systemd: m.useSystemd, - } - if needResources { - config.Resources = m.toResources(in.ResourceParameters) - } else { - config.Resources = &libcontainerconfigs.Resources{} - } - - if !config.Systemd { - // For fs cgroup manager, we can either set Path or Name and Parent. - // Setting Path is easier. - config.Path = in.Name.ToCgroupfs() - - return config - } - - // For systemd, we have to set Name and Parent, as they are needed to talk to systemd. - // Setting Path is optional as it can be deduced from Name and Parent. - - // TODO(filbranden): This logic belongs in libcontainer/cgroup/systemd instead. - // It should take a libcontainerconfigs.Cgroup.Path field (rather than Name and Parent) - // and split it appropriately, using essentially the logic below. - // This was done for cgroupfs in opencontainers/runc#497 but a counterpart - // for systemd was never introduced. - dir, base := path.Split(in.Name.ToSystemd()) +// TODO(filbranden): This logic belongs in libcontainer/cgroup/systemd instead. +// It should take a libcontainerconfigs.Cgroup.Path field (rather than Name and Parent) +// and split it appropriately, using essentially the logic below. +// This was done for cgroupfs in opencontainers/runc#497 but a counterpart +// for systemd was never introduced. +func updateSystemdCgroupInfo(cgroupConfig *libcontainerconfigs.Cgroup, cgroupName CgroupName) { + dir, base := path.Split(cgroupName.ToSystemd()) if dir == "/" { dir = "-.slice" } else { dir = path.Base(dir) } - config.Parent = dir - config.Name = base - - return config + cgroupConfig.Parent = dir + cgroupConfig.Name = base } -// Validate checks if all subsystem cgroups already exist -func (m *cgroupManagerImpl) Validate(name CgroupName) error { +// Exists checks if all subsystem cgroups already exist +func (m *cgroupManagerImpl) Exists(name CgroupName) bool { if libcontainercgroups.IsCgroup2UnifiedMode() { cgroupPath := m.buildCgroupUnifiedPath(name) neededControllers := getSupportedUnifiedControllers() enabledControllers, err := readUnifiedControllers(cgroupPath) if err != nil { - return fmt.Errorf("could not read controllers for cgroup %q: %w", name, err) + return false } difference := neededControllers.Difference(enabledControllers) if difference.Len() > 0 { - return fmt.Errorf("cgroup %q has some missing controllers: %v", name, strings.Join(difference.List(), ", ")) + klog.V(4).InfoS("The cgroup has some missing controllers", "cgroupName", name, "controllers", difference) + return false } - return nil // valid V2 cgroup + return true } // Get map of all cgroup paths on the system for the particular cgroup @@ -275,15 +297,11 @@ func (m *cgroupManagerImpl) Validate(name CgroupName) error { } if len(missingPaths) > 0 { - return fmt.Errorf("cgroup %q has some missing paths: %v", name, strings.Join(missingPaths, ", ")) + klog.V(4).InfoS("The cgroup has some missing paths", "cgroupName", name, "paths", missingPaths) + return false } - return nil // valid V1 cgroup -} - -// Exists checks if all subsystem cgroups already exist -func (m *cgroupManagerImpl) Exists(name CgroupName) bool { - return m.Validate(name) == nil + return true } // Destroy destroys the specified cgroup @@ -293,8 +311,18 @@ func (m *cgroupManagerImpl) Destroy(cgroupConfig *CgroupConfig) error { metrics.CgroupManagerDuration.WithLabelValues("destroy").Observe(metrics.SinceInSeconds(start)) }() - libcontainerCgroupConfig := m.libctCgroupConfig(cgroupConfig, false) - manager, err := manager.New(libcontainerCgroupConfig) + cgroupPaths := m.buildCgroupPaths(cgroupConfig.Name) + + libcontainerCgroupConfig := &libcontainerconfigs.Cgroup{} + // libcontainer consumes a different field and expects a different syntax + // depending on the cgroup driver in use, so we need this conditional here. + if m.adapter.cgroupManagerType == libcontainerSystemd { + updateSystemdCgroupInfo(libcontainerCgroupConfig, cgroupConfig.Name) + } else { + libcontainerCgroupConfig.Path = cgroupConfig.Name.ToCgroupfs() + } + + manager, err := m.adapter.newManager(libcontainerCgroupConfig, cgroupPaths) if err != nil { return err } @@ -376,34 +404,8 @@ func (m *cgroupManagerImpl) toResources(resourceConfig *ResourceConfig) *libcont if resourceConfig.PidsLimit != nil { resources.PidsLimit = *resourceConfig.PidsLimit } - - m.maybeSetHugetlb(resourceConfig, resources) - - // Ideally unified is used for all the resources when running on cgroup v2. - // It doesn't make difference for the memory.max limit, but for e.g. the cpu controller - // you can specify the correct setting without relying on the conversions performed by the OCI runtime. - if resourceConfig.Unified != nil && libcontainercgroups.IsCgroup2UnifiedMode() { - resources.Unified = make(map[string]string) - for k, v := range resourceConfig.Unified { - resources.Unified[k] = v - } - } - return resources -} - -func (m *cgroupManagerImpl) maybeSetHugetlb(resourceConfig *ResourceConfig, resources *libcontainerconfigs.Resources) { - // Check if hugetlb is supported. - if libcontainercgroups.IsCgroup2UnifiedMode() { - if !getSupportedUnifiedControllers().Has("hugetlb") { - klog.V(6).InfoS("Optional subsystem not supported: hugetlb") - return - } - } else if _, ok := m.subsystems.MountPoints["hugetlb"]; !ok { - klog.V(6).InfoS("Optional subsystem not supported: hugetlb") - return - } - - // For each page size enumerated, set that value. + // if huge pages are enabled, we set them in libcontainer + // for each page size enumerated, set that value pageSizes := sets.NewString() for pageSize, limit := range resourceConfig.HugePageLimit { sizeString, err := v1helper.HugePageUnitSizeFromByteSize(pageSize) @@ -418,7 +420,7 @@ func (m *cgroupManagerImpl) maybeSetHugetlb(resourceConfig *ResourceConfig, reso pageSizes.Insert(sizeString) } // for each page size omitted, limit to 0 - for _, pageSize := range libcontainercgroups.HugePageSizes() { + for _, pageSize := range cgroupfs.HugePageSizes { if pageSizes.Has(pageSize) { continue } @@ -427,6 +429,16 @@ func (m *cgroupManagerImpl) maybeSetHugetlb(resourceConfig *ResourceConfig, reso Limit: uint64(0), }) } + // Ideally unified is used for all the resources when running on cgroup v2. + // It doesn't make difference for the memory.max limit, but for e.g. the cpu controller + // you can specify the correct setting without relying on the conversions performed by the OCI runtime. + if resourceConfig.Unified != nil && libcontainercgroups.IsCgroup2UnifiedMode() { + resources.Unified = make(map[string]string) + for k, v := range resourceConfig.Unified { + resources.Unified[k] = v + } + } + return resources } // Update updates the cgroup with the specified Cgroup Configuration @@ -436,12 +448,48 @@ func (m *cgroupManagerImpl) Update(cgroupConfig *CgroupConfig) error { metrics.CgroupManagerDuration.WithLabelValues("update").Observe(metrics.SinceInSeconds(start)) }() - libcontainerCgroupConfig := m.libctCgroupConfig(cgroupConfig, true) - manager, err := manager.New(libcontainerCgroupConfig) + // Extract the cgroup resource parameters + resourceConfig := cgroupConfig.ResourceParameters + resources := m.toResources(resourceConfig) + + libcontainerCgroupConfig := &libcontainerconfigs.Cgroup{ + Resources: resources, + } + + unified := libcontainercgroups.IsCgroup2UnifiedMode() + var paths map[string]string + if unified { + libcontainerCgroupConfig.Path = m.Name(cgroupConfig.Name) + } else { + paths = m.buildCgroupPaths(cgroupConfig.Name) + } + + // libcontainer consumes a different field and expects a different syntax + // depending on the cgroup driver in use, so we need this conditional here. + if m.adapter.cgroupManagerType == libcontainerSystemd { + updateSystemdCgroupInfo(libcontainerCgroupConfig, cgroupConfig.Name) + } + + if cgroupConfig.ResourceParameters != nil && cgroupConfig.ResourceParameters.PidsLimit != nil { + resources.PidsLimit = *cgroupConfig.ResourceParameters.PidsLimit + } + + if unified { + supportedControllers := getSupportedUnifiedControllers() + if !supportedControllers.Has("hugetlb") { + resources.HugetlbLimit = nil + klog.V(6).InfoS("Optional subsystem not supported: hugetlb") + } + } else if _, ok := m.subsystems.MountPoints["hugetlb"]; !ok { + resources.HugetlbLimit = nil + klog.V(6).InfoS("Optional subsystem not supported: hugetlb") + } + + manager, err := m.adapter.newManager(libcontainerCgroupConfig, paths) if err != nil { return fmt.Errorf("failed to create cgroup manager: %v", err) } - return manager.Set(libcontainerCgroupConfig.Resources) + return manager.Set(resources) } // Create creates the specified cgroup @@ -451,8 +499,25 @@ func (m *cgroupManagerImpl) Create(cgroupConfig *CgroupConfig) error { metrics.CgroupManagerDuration.WithLabelValues("create").Observe(metrics.SinceInSeconds(start)) }() - libcontainerCgroupConfig := m.libctCgroupConfig(cgroupConfig, true) - manager, err := manager.New(libcontainerCgroupConfig) + resources := m.toResources(cgroupConfig.ResourceParameters) + + libcontainerCgroupConfig := &libcontainerconfigs.Cgroup{ + Resources: resources, + } + // libcontainer consumes a different field and expects a different syntax + // depending on the cgroup driver in use, so we need this conditional here. + if m.adapter.cgroupManagerType == libcontainerSystemd { + updateSystemdCgroupInfo(libcontainerCgroupConfig, cgroupConfig.Name) + } else { + libcontainerCgroupConfig.Path = cgroupConfig.Name.ToCgroupfs() + } + + if cgroupConfig.ResourceParameters != nil && cgroupConfig.ResourceParameters.PidsLimit != nil { + libcontainerCgroupConfig.PidsLimit = *cgroupConfig.ResourceParameters.PidsLimit + } + + // get the manager with the specified cgroup configuration + manager, err := m.adapter.newManager(libcontainerCgroupConfig, nil) if err != nil { return err } @@ -469,8 +534,8 @@ func (m *cgroupManagerImpl) Create(cgroupConfig *CgroupConfig) error { // it may confuse why we call set after we do apply, but the issue is that runc // follows a similar pattern. it's needed to ensure cpu quota is set properly. - if err := manager.Set(libcontainerCgroupConfig.Resources); err != nil { - utilruntime.HandleError(fmt.Errorf("cgroup manager.Set failed: %w", err)) + if err := m.Update(cgroupConfig); err != nil { + utilruntime.HandleError(fmt.Errorf("cgroup update failed %v", err)) } return nil diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cgroup_manager_unsupported.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cgroup_manager_unsupported.go index 684a1f12f299..527ddfc444af 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cgroup_manager_unsupported.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cgroup_manager_unsupported.go @@ -41,10 +41,6 @@ func (m *unsupportedCgroupManager) Name(_ CgroupName) string { return "" } -func (m *unsupportedCgroupManager) Validate(_ CgroupName) error { - return errNotSupported -} - func (m *unsupportedCgroupManager) Exists(_ CgroupName) bool { return false } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/container_manager.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/container_manager.go index e67dbfc3daaa..5dbe856094cb 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/container_manager.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/container_manager.go @@ -125,7 +125,6 @@ type NodeConfig struct { RuntimeCgroupsName string SystemCgroupsName string KubeletCgroupsName string - KubeletOOMScoreAdj int32 ContainerRuntime string CgroupsPerQOS bool CgroupRoot string diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/container_manager_linux.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/container_manager_linux.go index 0f09f3eb3312..3892bae081d3 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/container_manager_linux.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/container_manager_linux.go @@ -25,15 +25,18 @@ import ( "io/ioutil" "os" "path" + "strconv" "strings" "sync" "time" "github.com/opencontainers/runc/libcontainer/cgroups" - "github.com/opencontainers/runc/libcontainer/cgroups/manager" + cgroupfs "github.com/opencontainers/runc/libcontainer/cgroups/fs" + cgroupfs2 "github.com/opencontainers/runc/libcontainer/cgroups/fs2" "github.com/opencontainers/runc/libcontainer/configs" "k8s.io/klog/v2" "k8s.io/mount-utils" + utilio "k8s.io/utils/io" utilpath "k8s.io/utils/path" libcontaineruserns "github.com/opencontainers/runc/libcontainer/userns" @@ -41,6 +44,7 @@ import ( "k8s.io/apimachinery/pkg/api/resource" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/sets" + utilversion "k8s.io/apimachinery/pkg/util/version" "k8s.io/apimachinery/pkg/util/wait" utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/client-go/tools/record" @@ -61,10 +65,25 @@ import ( kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/lifecycle" "k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache" + "k8s.io/kubernetes/pkg/kubelet/qos" "k8s.io/kubernetes/pkg/kubelet/stats/pidlimit" "k8s.io/kubernetes/pkg/kubelet/status" schedulerframework "k8s.io/kubernetes/pkg/scheduler/framework" "k8s.io/kubernetes/pkg/util/oom" + "k8s.io/kubernetes/pkg/util/procfs" +) + +const ( + dockerProcessName = "dockerd" + // dockerd option --pidfile can specify path to use for daemon PID file, pid file path is default "/var/run/docker.pid" + dockerPidFile = "/var/run/docker.pid" + containerdProcessName = "containerd" + maxPidFileLength = 1 << 10 // 1KB +) + +var ( + // The docker version in which containerd was introduced. + containerdAPIVersion = utilversion.MustParseGeneric("1.23") ) // A non-user container tracked by the Kubelet. @@ -256,8 +275,8 @@ func NewContainerManager(mountUtil mount.Interface, cadvisorInterface cadvisor.I // of note, we always use the cgroupfs driver when performing this check since // the input is provided in that format. // this is important because we do not want any name conversion to occur. - if err := cgroupManager.Validate(cgroupRoot); err != nil { - return nil, fmt.Errorf("invalid configuration: %w", err) + if !cgroupManager.Exists(cgroupRoot) { + return nil, fmt.Errorf("invalid configuration: cgroup-root %q doesn't exist", cgroupRoot) } klog.InfoS("Container manager verified user specified cgroup-root exists", "cgroupRoot", cgroupRoot) // Include the top level cgroup for enforcing node allocatable into cgroup-root. @@ -379,10 +398,13 @@ func createManager(containerName string) (cgroups.Manager, error) { Resources: &configs.Resources{ SkipDevices: true, }, - Systemd: false, } - return manager.New(cg) + if cgroups.IsCgroup2UnifiedMode() { + return cgroupfs2.NewManager(cg, "", false) + + } + return cgroupfs.NewManager(cg, nil, false), nil } type KernelTunableBehavior string @@ -474,6 +496,24 @@ func (cm *containerManagerImpl) setupNode(activePods ActivePodsFunc) error { } systemContainers := []*systemContainer{} + if cm.ContainerRuntime == "docker" { + // With the docker-CRI integration, dockershim manages the cgroups + // and oom score for the docker processes. + // Check the cgroup for docker periodically, so kubelet can serve stats for the docker runtime. + // TODO(KEP#866): remove special processing for CRI "docker" enablement + cm.periodicTasks = append(cm.periodicTasks, func() { + klog.V(4).InfoS("Adding periodic tasks for docker CRI integration") + cont, err := getContainerNameForProcess(dockerProcessName, dockerPidFile) + if err != nil { + klog.ErrorS(err, "Failed to get container name for process") + return + } + klog.V(2).InfoS("Discovered runtime cgroup name", "cgroupName", cont) + cm.Lock() + defer cm.Unlock() + cm.RuntimeCgroupsName = cont + }) + } if cm.SystemCgroupsName != "" { if cm.SystemCgroupsName == "/" { @@ -496,12 +536,12 @@ func (cm *containerManagerImpl) setupNode(activePods ActivePodsFunc) error { } cont.ensureStateFunc = func(_ cgroups.Manager) error { - return ensureProcessInContainerWithOOMScore(os.Getpid(), int(cm.KubeletOOMScoreAdj), cont.manager) + return ensureProcessInContainerWithOOMScore(os.Getpid(), qos.KubeletOOMScoreAdj, cont.manager) } systemContainers = append(systemContainers, cont) } else { cm.periodicTasks = append(cm.periodicTasks, func() { - if err := ensureProcessInContainerWithOOMScore(os.Getpid(), int(cm.KubeletOOMScoreAdj), nil); err != nil { + if err := ensureProcessInContainerWithOOMScore(os.Getpid(), qos.KubeletOOMScoreAdj, nil); err != nil { klog.ErrorS(err, "Failed to ensure process in container with oom score") return } @@ -521,6 +561,21 @@ func (cm *containerManagerImpl) setupNode(activePods ActivePodsFunc) error { return nil } +func getContainerNameForProcess(name, pidFile string) (string, error) { + pids, err := getPidsForProcess(name, pidFile) + if err != nil { + return "", fmt.Errorf("failed to detect process id for %q - %v", name, err) + } + if len(pids) == 0 { + return "", nil + } + cont, err := getContainer(pids[0]) + if err != nil { + return "", err + } + return cont, nil +} + func (cm *containerManagerImpl) GetNodeConfig() NodeConfig { cm.RLock() defer cm.RUnlock() @@ -558,8 +613,11 @@ func (cm *containerManagerImpl) Start(node *v1.Node, // Initialize CPU manager if utilfeature.DefaultFeatureGate.Enabled(kubefeatures.CPUManager) { - containerMap := buildContainerMapFromRuntime(runtimeService) - err := cm.cpuManager.Start(cpumanager.ActivePodsFunc(activePods), sourcesReady, podStatusProvider, runtimeService, containerMap) + containerMap, err := buildContainerMapFromRuntime(runtimeService) + if err != nil { + return fmt.Errorf("failed to build map of initial containers from runtime: %v", err) + } + err = cm.cpuManager.Start(cpumanager.ActivePodsFunc(activePods), sourcesReady, podStatusProvider, runtimeService, containerMap) if err != nil { return fmt.Errorf("start cpu manager error: %v", err) } @@ -567,8 +625,11 @@ func (cm *containerManagerImpl) Start(node *v1.Node, // Initialize memory manager if utilfeature.DefaultFeatureGate.Enabled(kubefeatures.MemoryManager) { - containerMap := buildContainerMapFromRuntime(runtimeService) - err := cm.memoryManager.Start(memorymanager.ActivePodsFunc(activePods), sourcesReady, podStatusProvider, runtimeService, containerMap) + containerMap, err := buildContainerMapFromRuntime(runtimeService) + if err != nil { + return fmt.Errorf("failed to build map of initial containers from runtime: %v", err) + } + err = cm.memoryManager.Start(memorymanager.ActivePodsFunc(activePods), sourcesReady, podStatusProvider, runtimeService, containerMap) if err != nil { return fmt.Errorf("start memory manager error: %v", err) } @@ -725,7 +786,7 @@ func (cm *containerManagerImpl) SystemCgroupsLimit() v1.ResourceList { } } -func buildContainerMapFromRuntime(runtimeService internalapi.RuntimeService) containermap.ContainerMap { +func buildContainerMapFromRuntime(runtimeService internalapi.RuntimeService) (containermap.ContainerMap, error) { podSandboxMap := make(map[string]string) podSandboxList, _ := runtimeService.ListPodSandbox(nil) for _, p := range podSandboxList { @@ -736,13 +797,12 @@ func buildContainerMapFromRuntime(runtimeService internalapi.RuntimeService) con containerList, _ := runtimeService.ListContainers(nil) for _, c := range containerList { if _, exists := podSandboxMap[c.PodSandboxId]; !exists { - klog.InfoS("no PodSandBox found for the container", "podSandboxId", c.PodSandboxId, "containerName", c.Metadata.Name, "containerId", c.Id) - continue + return nil, fmt.Errorf("no PodsandBox found with Id '%s'", c.PodSandboxId) } containerMap.Add(podSandboxMap[c.PodSandboxId], c.Metadata.Name, c.Id) } - return containerMap + return containerMap, nil } func isProcessRunningInHost(pid int) (bool, error) { @@ -760,6 +820,78 @@ func isProcessRunningInHost(pid int) (bool, error) { return initPidNs == processPidNs, nil } +func getPidFromPidFile(pidFile string) (int, error) { + file, err := os.Open(pidFile) + if err != nil { + return 0, fmt.Errorf("error opening pid file %s: %v", pidFile, err) + } + defer file.Close() + + data, err := utilio.ReadAtMost(file, maxPidFileLength) + if err != nil { + return 0, fmt.Errorf("error reading pid file %s: %v", pidFile, err) + } + + pid, err := strconv.Atoi(string(data)) + if err != nil { + return 0, fmt.Errorf("error parsing %s as a number: %v", string(data), err) + } + + return pid, nil +} + +func getPidsForProcess(name, pidFile string) ([]int, error) { + if len(pidFile) == 0 { + return procfs.PidOf(name) + } + + pid, err := getPidFromPidFile(pidFile) + if err == nil { + return []int{pid}, nil + } + + // Try to lookup pid by process name + pids, err2 := procfs.PidOf(name) + if err2 == nil { + return pids, nil + } + + // Return error from getPidFromPidFile since that should have worked + // and is the real source of the problem. + klog.V(4).InfoS("Unable to get pid from file", "path", pidFile, "err", err) + return []int{}, err +} + +// Ensures that the Docker daemon is in the desired container. +// Temporarily export the function to be used by dockershim. +// TODO(yujuhong): Move this function to dockershim once kubelet migrates to +// dockershim as the default. +func EnsureDockerInContainer(dockerAPIVersion *utilversion.Version, oomScoreAdj int, manager cgroups.Manager) error { + type process struct{ name, file string } + dockerProcs := []process{{dockerProcessName, dockerPidFile}} + if dockerAPIVersion.AtLeast(containerdAPIVersion) { + // By default containerd is started separately, so there is no pid file. + containerdPidFile := "" + dockerProcs = append(dockerProcs, process{containerdProcessName, containerdPidFile}) + } + var errs []error + for _, proc := range dockerProcs { + pids, err := getPidsForProcess(proc.name, proc.file) + if err != nil { + errs = append(errs, fmt.Errorf("failed to get pids for %q: %v", proc.name, err)) + continue + } + + // Move if the pid is not already in the desired container. + for _, pid := range pids { + if err := ensureProcessInContainerWithOOMScore(pid, oomScoreAdj, manager); err != nil { + errs = append(errs, fmt.Errorf("errors moving %q pid: %v", proc.name, err)) + } + } + } + return utilerrors.NewAggregate(errs) +} + func ensureProcessInContainerWithOOMScore(pid int, oomScoreAdj int, manager cgroups.Manager) error { if runningInHost, err := isProcessRunningInHost(pid); err != nil { // Err on the side of caution. Avoid moving the docker daemon unless we are able to identify its context. diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/OWNERS index 8e5a30d91d8a..72b536f87c74 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/OWNERS @@ -1,10 +1,11 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - derekwaynecarr +- derekwaynecarr +- vishh +- ConnorDoyle reviewers: - - klueska +- klueska + emeritus_approvers: - - balajismaniam - - ConnorDoyle - - vishh +- balajismaniam diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/cpu_assignment.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/cpu_assignment.go index 01ddf57bb7b7..df6cc3b82651 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/cpu_assignment.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/cpu_assignment.go @@ -45,39 +45,27 @@ func (m mapIntInt) Clone() mapIntInt { } func (m mapIntInt) Keys() []int { - var keys []int + keys := make([]int, len(m)) for k := range m { keys = append(keys, k) } return keys } -func (m mapIntInt) Values(keys ...int) []int { - if keys == nil { - keys = m.Keys() - } - var values []int - for _, k := range keys { - values = append(values, m[k]) +func (m mapIntInt) Values() []int { + values := make([]int, len(m)) + for _, v := range m { + values = append(values, v) } return values } -func sum(xs []int) int { - var s int - for _, x := range xs { - s += x - } - return s -} - func mean(xs []int) float64 { var sum float64 for _, x := range xs { sum += float64(x) } - m := sum / float64(len(xs)) - return math.Round(m*1000) / 1000 + return sum / float64(len(xs)) } func standardDeviation(xs []int) float64 { @@ -86,8 +74,7 @@ func standardDeviation(xs []int) float64 { for _, x := range xs { sum += (float64(x) - m) * (float64(x) - m) } - s := math.Sqrt(sum / float64(len(xs))) - return math.Round(s*1000) / 1000 + return math.Sqrt(sum / float64(len(xs))) } func min(x, y int) int { @@ -378,25 +365,20 @@ func (a *cpuAccumulator) takeRemainingCPUs() { } func (a *cpuAccumulator) rangeNUMANodesNeededToSatisfy(cpuGroupSize int) (int, int) { - // Get the total number of NUMA nodes in the system. - numNUMANodes := a.topo.CPUDetails.NUMANodes().Size() - // Get the total number of NUMA nodes that have CPUs available on them. numNUMANodesAvailable := a.details.NUMANodes().Size() - // Get the total number of CPUs in the system. - numCPUs := a.topo.CPUDetails.CPUs().Size() - - // Get the total number of 'cpuGroups' in the system. - numCPUGroups := (numCPUs-1)/cpuGroupSize + 1 - - // Calculate the number of 'cpuGroups' per NUMA Node in the system (rounding up). - numCPUGroupsPerNUMANode := (numCPUGroups-1)/numNUMANodes + 1 + // Get the total number of CPUs available across all NUMA nodes. + numCPUsAvailable := a.details.CPUs().Size() // Calculate the number of available 'cpuGroups' across all NUMA nodes as // well as the number of 'cpuGroups' that need to be allocated (rounding up). + numCPUGroupsAvailable := (numCPUsAvailable-1)/cpuGroupSize + 1 numCPUGroupsNeeded := (a.numCPUsNeeded-1)/cpuGroupSize + 1 + // Calculate the number of available 'cpuGroups' per NUMA Node (rounding up). + numCPUGroupsPerNUMANode := (numCPUGroupsAvailable-1)/numNUMANodesAvailable + 1 + // Calculate the minimum number of numa nodes required to satisfy the // allocation (rounding up). minNUMAs := (numCPUGroupsNeeded-1)/numCPUGroupsPerNUMANode + 1 @@ -550,14 +532,6 @@ func takeByTopologyNUMAPacked(topo *topology.CPUTopology, availableCPUs cpuset.C // important, for example, to ensure that all CPUs (i.e. all hyperthreads) from // a single core are allocated together. func takeByTopologyNUMADistributed(topo *topology.CPUTopology, availableCPUs cpuset.CPUSet, numCPUs int, cpuGroupSize int) (cpuset.CPUSet, error) { - // If the number of CPUs requested cannot be handed out in chunks of - // 'cpuGroupSize', then we just call out the packing algorithm since we - // can't distribute CPUs in this chunk size. - if (numCPUs % cpuGroupSize) != 0 { - return takeByTopologyNUMAPacked(topo, availableCPUs, numCPUs) - } - - // Otherwise build an accumulator to start allocating CPUs from. acc := newCPUAccumulator(topo, availableCPUs, numCPUs) if acc.isSatisfied() { return acc.result, nil @@ -621,16 +595,13 @@ func takeByTopologyNUMADistributed(topo *topology.CPUTopology, availableCPUs cpu } // Calculate how many CPUs will be available on each NUMA node in - // the system after allocating an even distribution of CPU groups - // of size 'cpuGroupSize' from each NUMA node in 'combo'. This will - // be used in the "balance score" calculation to help decide if - // this combo should ultimately be chosen. - availableAfterAllocation := make(mapIntInt, len(numas)) - for _, numa := range numas { - availableAfterAllocation[numa] = acc.details.CPUsInNUMANodes(numa).Size() - } + // 'combo' after allocating an even distribution of CPU groups of + // size 'cpuGroupSize' from them. This will be used in the "balance + // score" calculation to help decide if this combo should + // ultimately be chosen. + availableAfterAllocation := make(mapIntInt, len(combo)) for _, numa := range combo { - availableAfterAllocation[numa] -= distribution + availableAfterAllocation[numa] = acc.details.CPUsInNUMANodes(numa).Size() - distribution } // Check if there are any remaining CPUs to distribute across the @@ -638,20 +609,9 @@ func takeByTopologyNUMADistributed(topo *topology.CPUTopology, availableCPUs cpu // size 'cpuGroupSize'. remainder := numCPUs - (distribution * len(combo)) - // Get a list of NUMA nodes to consider pulling the remainder CPUs - // from. This list excludes NUMA nodes that don't have at least - // 'cpuGroupSize' CPUs available after being allocated - // 'distribution' number of CPUs. - var remainderCombo []int - for _, numa := range combo { - if availableAfterAllocation[numa] >= cpuGroupSize { - remainderCombo = append(remainderCombo, numa) - } - } - // Declare a set of local variables to help track the "balance - // scores" calculated when using different subsets of - // 'remainderCombo' to allocate remainder CPUs from. + // scores" calculated when using different subsets of 'combo' to + // allocate remainder CPUs from. var bestLocalBalance float64 = math.MaxFloat64 var bestLocalRemainder []int = nil @@ -664,54 +624,31 @@ func takeByTopologyNUMADistributed(topo *topology.CPUTopology, availableCPUs cpu } // Otherwise, find the best "balance score" when allocating the - // remainder CPUs across different subsets of NUMA nodes in 'remainderCombo'. + // remainder CPUs across different subsets of NUMA nodes in 'combo'. // These remainder CPUs are handed out in groups of size 'cpuGroupSize'. - // We start from k=len(remainderCombo) and walk down to k=1 so that - // we continue to distribute CPUs as much as possible across - // multiple NUMA nodes. - for k := len(remainderCombo); remainder > 0 && k >= 1; k-- { - acc.iterateCombinations(remainderCombo, k, func(subset []int) LoopControl { - // Make a local copy of 'remainder'. - remainder := remainder - - // Make a local copy of 'availableAfterAllocation'. - availableAfterAllocation := availableAfterAllocation.Clone() - - // If this subset is not capable of allocating all - // remainder CPUs, continue to the next one. - if sum(availableAfterAllocation.Values(subset...)) < remainder { - return Continue - } - - // For all NUMA nodes in 'subset', walk through them, - // removing 'cpuGroupSize' number of CPUs from each - // until all remainder CPUs have been accounted for. - for remainder > 0 { - for _, numa := range subset { - if remainder == 0 { - break - } - if availableAfterAllocation[numa] < cpuGroupSize { - continue - } - availableAfterAllocation[numa] -= cpuGroupSize - remainder -= cpuGroupSize - } - } - - // Calculate the "balance score" as the standard deviation - // of the number of CPUs available on all NUMA nodes in the - // system after the remainder CPUs have been allocated - // across 'subset' in groups of size 'cpuGroupSize'. - balance := standardDeviation(availableAfterAllocation.Values()) - if balance < bestLocalBalance { - bestLocalBalance = balance - bestLocalRemainder = subset - } + acc.iterateCombinations(combo, remainder/cpuGroupSize, func(subset []int) LoopControl { + // Make a local copy of 'availableAfterAllocation'. + availableAfterAllocation := availableAfterAllocation.Clone() + + // For all NUMA nodes in 'subset', remove another + // 'cpuGroupSize' number of CPUs (to account for any remainder + // CPUs that will be allocated on them). + for _, numa := range subset { + availableAfterAllocation[numa] -= cpuGroupSize + } - return Continue - }) - } + // Calculate the "balance score" as the standard deviation of + // the number of CPUs available on all NUMA nodes in 'combo' + // after the remainder CPUs have been allocated across 'subset' + // in groups of size 'cpuGroupSize'. + balance := standardDeviation(availableAfterAllocation.Values()) + if balance < bestLocalBalance { + bestLocalBalance = balance + bestLocalRemainder = subset + } + + return Continue + }) // If the best "balance score" for this combo is less than the // lowest "balance score" of all previous combos, then update this @@ -743,19 +680,9 @@ func takeByTopologyNUMADistributed(topo *topology.CPUTopology, availableCPUs cpu // Then allocate any remaining CPUs in groups of size 'cpuGroupSize' // from each NUMA node in the remainder set. - remainder := numCPUs - (distribution * len(bestCombo)) - for remainder > 0 { - for _, numa := range bestRemainder { - if remainder == 0 { - break - } - if acc.details.CPUsInNUMANodes(numa).Size() < cpuGroupSize { - continue - } - cpus, _ := takeByTopologyNUMAPacked(acc.topo, acc.details.CPUsInNUMANodes(numa), cpuGroupSize) - acc.take(cpus) - remainder -= cpuGroupSize - } + for _, numa := range bestRemainder { + cpus, _ := takeByTopologyNUMAPacked(acc.topo, acc.details.CPUsInNUMANodes(numa), cpuGroupSize) + acc.take(cpus) } // If we haven't allocated all of our CPUs at this point, then something diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/policy_static.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/policy_static.go index a872b389c461..f7ff26cd3130 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/policy_static.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/policy_static.go @@ -292,26 +292,11 @@ func (p *staticPolicy) Allocate(s state.State, pod *v1.Pod, container *v1.Contai return nil } -// getAssignedCPUsOfSiblings returns assigned cpus of given container's siblings(all containers other than the given container) in the given pod `podUID`. -func getAssignedCPUsOfSiblings(s state.State, podUID string, containerName string) cpuset.CPUSet { - assignments := s.GetCPUAssignments() - cset := cpuset.NewCPUSet() - for name, cpus := range assignments[podUID] { - if containerName == name { - continue - } - cset = cset.Union(cpus) - } - return cset -} - func (p *staticPolicy) RemoveContainer(s state.State, podUID string, containerName string) error { klog.InfoS("Static policy: RemoveContainer", "podUID", podUID, "containerName", containerName) - cpusInUse := getAssignedCPUsOfSiblings(s, podUID, containerName) if toRelease, ok := s.GetCPUSet(podUID, containerName); ok { s.Delete(podUID, containerName) // Mutate the shared pool, adding released cpus. - toRelease = toRelease.Difference(cpusInUse) s.SetDefaultCPUSet(s.GetDefaultCPUSet().Union(toRelease)) } return nil diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpuset/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpuset/OWNERS index d4c6257fd184..fe38ab54ee93 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpuset/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpuset/OWNERS @@ -1,7 +1,6 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - derekwaynecarr -emeritus_approvers: - - ConnorDoyle - - vishh +- derekwaynecarr +- vishh +- ConnorDoyle diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpuset/cpuset.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpuset/cpuset.go index 0bc4a1c3c206..ffae3c58b72c 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpuset/cpuset.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/cpuset/cpuset.go @@ -76,7 +76,7 @@ func NewCPUSet(cpus ...int) CPUSet { return b.Result() } -// NewCPUSetInt64 returns a new CPUSet containing the supplied elements, as slice of int64. +// NewCPUSet returns a new CPUSet containing the supplied elements, as slice of int64. func NewCPUSetInt64(cpus ...int64) CPUSet { b := NewBuilder() for _, c := range cpus { diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/OWNERS index 5c8da238f8e2..47978ec20b97 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/OWNERS @@ -1,8 +1,10 @@ # See the OWNERS docs at https://go.k8s.io/owners -approvers: [] +approvers: +- jiayingz +- vishh reviewers: - - klueska -emeritus_approvers: - - vishh - - jiayingz +- klueska +- mindprince +- RenaudWasTaken +- vikaschoudhary16 diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/manager.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/manager.go index b367aa30781c..db6a015031a2 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/manager.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/devicemanager/manager.go @@ -28,7 +28,6 @@ import ( "time" cadvisorapi "github.com/google/cadvisor/info/v1" - "github.com/opencontainers/selinux/go-selinux" "google.golang.org/grpc" "k8s.io/klog/v2" @@ -49,6 +48,7 @@ import ( "k8s.io/kubernetes/pkg/kubelet/metrics" "k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache" schedulerframework "k8s.io/kubernetes/pkg/scheduler/framework" + "k8s.io/kubernetes/pkg/util/selinux" ) const nodeWithoutTopology = -1 @@ -259,7 +259,7 @@ func (m *ManagerImpl) Start(activePods ActivePodsFunc, sourcesReady config.Sourc if err = os.MkdirAll(m.socketdir, 0750); err != nil { return err } - if selinux.GetEnabled() { + if selinux.SELinuxEnabled() { if err := selinux.SetFileLabel(m.socketdir, config.KubeletPluginsDirSELinuxLabel); err != nil { klog.InfoS("Unprivileged containerized plugins might not work. Could not set selinux context on socket dir", "path", m.socketdir, "err", err) } @@ -997,18 +997,6 @@ func (m *ManagerImpl) allocateContainerResources(pod *v1.Pod, container *v1.Cont return nil } -// checkPodActive checks if the given pod is still in activePods list -func (m *ManagerImpl) checkPodActive(pod *v1.Pod) bool { - activePods := m.activePods() - for _, activePod := range activePods { - if activePod.UID == pod.UID { - return true - } - } - - return false -} - // GetDeviceRunContainerOptions checks whether we have cached containerDevices // for the passed-in and returns its DeviceRunContainerOptions // for the found one. An empty struct is returned in case no cached state is found. @@ -1025,12 +1013,6 @@ func (m *ManagerImpl) GetDeviceRunContainerOptions(pod *v1.Pod, container *v1.Co if err != nil { return nil, err } - - if !m.checkPodActive(pod) { - klog.ErrorS(nil, "pod deleted from activePods, skip to reAllocate", "podUID", podUID) - continue - } - // This is a device plugin resource yet we don't have cached // resource state. This is likely due to a race during node // restart. We re-issue allocate request to cover this race. diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/helpers_linux.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/helpers_linux.go index 25ff3f13b820..83c80501f5d0 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/helpers_linux.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/helpers_linux.go @@ -25,7 +25,7 @@ import ( libcontainercgroups "github.com/opencontainers/runc/libcontainer/cgroups" - v1 "k8s.io/api/core/v1" + "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/kubernetes/pkg/api/v1/resource" @@ -320,7 +320,7 @@ func NodeAllocatableRoot(cgroupRoot string, cgroupsPerQOS bool, cgroupDriver str if cgroupsPerQOS { nodeAllocatableRoot = NewCgroupName(nodeAllocatableRoot, defaultNodeAllocatableCgroupName) } - if cgroupDriver == "systemd" { + if libcontainerCgroupManagerType(cgroupDriver) == libcontainerSystemd { return nodeAllocatableRoot.ToSystemd() } return nodeAllocatableRoot.ToCgroupfs() @@ -337,3 +337,15 @@ func GetKubeletContainer(kubeletCgroups string) (string, error) { } return kubeletCgroups, nil } + +// GetRuntimeContainer returns the cgroup used by the container runtime +func GetRuntimeContainer(containerRuntime, runtimeCgroups string) (string, error) { + if containerRuntime == "docker" { + cont, err := getContainerNameForProcess(dockerProcessName, dockerPidFile) + if err != nil { + return "", fmt.Errorf("failed to get container name for docker process: %v", err) + } + return cont, nil + } + return runtimeCgroups, nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/helpers_unsupported.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/helpers_unsupported.go index c0677c7bfc76..323f4642b584 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/helpers_unsupported.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/helpers_unsupported.go @@ -70,3 +70,8 @@ func NodeAllocatableRoot(cgroupRoot string, cgroupsPerQOS bool, cgroupDriver str func GetKubeletContainer(kubeletCgroups string) (string, error) { return "", nil } + +// GetRuntimeContainer returns the cgroup used by the container runtime +func GetRuntimeContainer(containerRuntime, runtimeCgroups string) (string, error) { + return "", nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/node_container_manager_linux.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/node_container_manager_linux.go index 4b35d3c4fe3d..3217be598730 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/node_container_manager_linux.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/node_container_manager_linux.go @@ -136,9 +136,6 @@ func (cm *containerManagerImpl) enforceNodeAllocatableCgroups() error { // enforceExistingCgroup updates the limits `rl` on existing cgroup `cName` using `cgroupManager` interface. func enforceExistingCgroup(cgroupManager CgroupManager, cName CgroupName, rl v1.ResourceList) error { rp := getCgroupConfig(rl) - if rp == nil { - return fmt.Errorf("%q cgroup is not configured properly", cName) - } // Enforce MemoryQoS for cgroups of kube-reserved/system-reserved. For more information, // see https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/2570-memory-qos @@ -155,9 +152,12 @@ func enforceExistingCgroup(cgroupManager CgroupManager, cName CgroupName, rl v1. Name: cName, ResourceParameters: rp, } + if cgroupConfig.ResourceParameters == nil { + return fmt.Errorf("%q cgroup is not config properly", cgroupConfig.Name) + } klog.V(4).InfoS("Enforcing limits on cgroup", "cgroupName", cName, "cpuShares", cgroupConfig.ResourceParameters.CpuShares, "memory", cgroupConfig.ResourceParameters.Memory, "pidsLimit", cgroupConfig.ResourceParameters.PidsLimit) - if err := cgroupManager.Validate(cgroupConfig.Name); err != nil { - return err + if !cgroupManager.Exists(cgroupConfig.Name) { + return fmt.Errorf("%q cgroup does not exist", cgroupConfig.Name) } if err := cgroupManager.Update(cgroupConfig); err != nil { return err diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/pod_container_manager_linux.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/pod_container_manager_linux.go index c225029fbf8c..53cd74e6854d 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/pod_container_manager_linux.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/pod_container_manager_linux.go @@ -17,7 +17,6 @@ limitations under the License. package cm import ( - "errors" "fmt" "io/ioutil" "os" @@ -128,7 +127,10 @@ func (m *podContainerManagerImpl) killOnePid(pid int) error { p, _ := os.FindProcess(pid) if err := p.Kill(); err != nil { // If the process already exited, that's fine. - if errors.Is(err, os.ErrProcessDone) { + if strings.Contains(err.Error(), "process already finished") { + // Hate parsing strings, but + // vendor/github.com/opencontainers/runc/libcontainer/ + // also does this. klog.V(3).InfoS("Process no longer exists", "pid", pid) return nil } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/qos_container_manager_linux.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/qos_container_manager_linux.go index 0ddd44ac2343..bb79109b141c 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/qos_container_manager_linux.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/qos_container_manager_linux.go @@ -23,13 +23,14 @@ import ( "sync" "time" - v1 "k8s.io/api/core/v1" "k8s.io/klog/v2" "k8s.io/apimachinery/pkg/util/wait" units "github.com/docker/go-units" libcontainercgroups "github.com/opencontainers/runc/libcontainer/cgroups" + cgroupfs "github.com/opencontainers/runc/libcontainer/cgroups/fs" + v1 "k8s.io/api/core/v1" utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/kubernetes/pkg/api/v1/resource" v1qos "k8s.io/kubernetes/pkg/apis/core/v1/helper/qos" @@ -146,7 +147,7 @@ func (m *qosContainerManagerImpl) Start(getNodeAllocatable func() v1.ResourceLis // setHugePagesUnbounded ensures hugetlb is effectively unbounded func (m *qosContainerManagerImpl) setHugePagesUnbounded(cgroupConfig *CgroupConfig) error { hugePageLimit := map[int64]int64{} - for _, pageSize := range libcontainercgroups.HugePageSizes() { + for _, pageSize := range cgroupfs.HugePageSizes { pageSizeBytes, err := units.RAMInBytes(pageSize) if err != nil { return err diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/OWNERS index f0df77f40c47..453f9465dcb2 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/OWNERS @@ -1,9 +1,10 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - derekwaynecarr - - klueska -reviewers: [] -emeritus_approvers: - - ConnorDoyle - - lmdaly +- ConnorDoyle +- derekwaynecarr +- klueska +- lmdaly + +reviewers: +- nolancon diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/policy.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/policy.go index 40255ed95cc7..b548e4afdbe5 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/policy.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/policy.go @@ -41,14 +41,12 @@ func mergePermutation(numaNodes []int, permutation []TopologyHint) TopologyHint var numaAffinities []bitmask.BitMask for _, hint := range permutation { // Only consider hints that have an actual NUMANodeAffinity set. - if hint.NUMANodeAffinity != nil { + if hint.NUMANodeAffinity == nil { + numaAffinities = append(numaAffinities, defaultAffinity) + } else { numaAffinities = append(numaAffinities, hint.NUMANodeAffinity) - // Only mark preferred if all affinities are equal. - if !hint.NUMANodeAffinity.IsEqual(numaAffinities[0]) { - preferred = false - } } - // Only mark preferred if all affinities are preferred. + if !hint.Preferred { preferred = false } @@ -56,8 +54,8 @@ func mergePermutation(numaNodes []int, permutation []TopologyHint) TopologyHint // Merge the affinities using a bitwise-and operation. mergedAffinity := bitmask.And(defaultAffinity, numaAffinities...) - // Build a mergedHint from the merged affinity mask, setting preferred as - // appropriate based on the logic above. + // Build a mergedHint from the merged affinity mask, indicating if an + // preferred allocation was used to generate the affinity mask or not. return TopologyHint{mergedAffinity, preferred} } @@ -94,196 +92,51 @@ func filterProvidersHints(providersHints []map[string][]TopologyHint) [][]Topolo return allProviderHints } -func narrowestHint(hints []TopologyHint) *TopologyHint { - if len(hints) == 0 { - return nil - } - var narrowestHint *TopologyHint - for i := range hints { - if hints[i].NUMANodeAffinity == nil { - continue - } - if narrowestHint == nil { - narrowestHint = &hints[i] - } - if hints[i].NUMANodeAffinity.IsNarrowerThan(narrowestHint.NUMANodeAffinity) { - narrowestHint = &hints[i] - } - } - return narrowestHint -} +func mergeFilteredHints(numaNodes []int, filteredHints [][]TopologyHint) TopologyHint { + // Set the default affinity as an any-numa affinity containing the list + // of NUMA Nodes available on this machine. + defaultAffinity, _ := bitmask.NewBitMask(numaNodes...) -func maxOfMinAffinityCounts(filteredHints [][]TopologyHint) int { - maxOfMinCount := 0 - for _, resourceHints := range filteredHints { - narrowestHint := narrowestHint(resourceHints) - if narrowestHint == nil { - continue - } - if narrowestHint.NUMANodeAffinity.Count() > maxOfMinCount { - maxOfMinCount = narrowestHint.NUMANodeAffinity.Count() + // Set the bestHint to return from this function as {nil false}. + // This will only be returned if no better hint can be found when + // merging hints from each hint provider. + bestHint := TopologyHint{defaultAffinity, false} + iterateAllProviderTopologyHints(filteredHints, func(permutation []TopologyHint) { + // Get the NUMANodeAffinity from each hint in the permutation and see if any + // of them encode unpreferred allocations. + mergedHint := mergePermutation(numaNodes, permutation) + // Only consider mergedHints that result in a NUMANodeAffinity > 0 to + // replace the current bestHint. + if mergedHint.NUMANodeAffinity.Count() == 0 { + return } - } - return maxOfMinCount -} - -func compareHints(bestNonPreferredAffinityCount int, current *TopologyHint, candidate *TopologyHint) *TopologyHint { - // Only consider candidates that result in a NUMANodeAffinity > 0 to - // replace the current bestHint. - if candidate.NUMANodeAffinity.Count() == 0 { - return current - } - - // If no current bestHint is set, return the candidate as the bestHint. - if current == nil { - return candidate - } - - // If the current bestHint is non-preferred and the candidate hint is - // preferred, always choose the preferred hint over the non-preferred one. - if !current.Preferred && candidate.Preferred { - return candidate - } - // If the current bestHint is preferred and the candidate hint is - // non-preferred, never update the bestHint, regardless of the - // candidate hint's narowness. - if current.Preferred && !candidate.Preferred { - return current - } - - // If the current bestHint and the candidate hint are both preferred, - // then only consider candidate hints that have a narrower - // NUMANodeAffinity than the NUMANodeAffinity in the current bestHint. - if current.Preferred && candidate.Preferred { - if candidate.NUMANodeAffinity.IsNarrowerThan(current.NUMANodeAffinity) { - return candidate + // If the current bestHint is non-preferred and the new mergedHint is + // preferred, always choose the preferred hint over the non-preferred one. + if mergedHint.Preferred && !bestHint.Preferred { + bestHint = mergedHint + return } - return current - } - // The only case left is if the current best bestHint and the candidate - // hint are both non-preferred. In this case, try and find a hint whose - // affinity count is as close to (but not higher than) the - // bestNonPreferredAffinityCount as possible. To do this we need to - // consider the following cases and react accordingly: - // - // 1. current.NUMANodeAffinity.Count() > bestNonPreferredAffinityCount - // 2. current.NUMANodeAffinity.Count() == bestNonPreferredAffinityCount - // 3. current.NUMANodeAffinity.Count() < bestNonPreferredAffinityCount - // - // For case (1), the current bestHint is larger than the - // bestNonPreferredAffinityCount, so updating to any narrower mergeHint - // is preferred over staying where we are. - // - // For case (2), the current bestHint is equal to the - // bestNonPreferredAffinityCount, so we would like to stick with what - // we have *unless* the candidate hint is also equal to - // bestNonPreferredAffinityCount and it is narrower. - // - // For case (3), the current bestHint is less than - // bestNonPreferredAffinityCount, so we would like to creep back up to - // bestNonPreferredAffinityCount as close as we can. There are three - // cases to consider here: - // - // 3a. candidate.NUMANodeAffinity.Count() > bestNonPreferredAffinityCount - // 3b. candidate.NUMANodeAffinity.Count() == bestNonPreferredAffinityCount - // 3c. candidate.NUMANodeAffinity.Count() < bestNonPreferredAffinityCount - // - // For case (3a), we just want to stick with the current bestHint - // because choosing a new hint that is greater than - // bestNonPreferredAffinityCount would be counter-productive. - // - // For case (3b), we want to immediately update bestHint to the - // candidate hint, making it now equal to bestNonPreferredAffinityCount. - // - // For case (3c), we know that *both* the current bestHint and the - // candidate hint are less than bestNonPreferredAffinityCount, so we - // want to choose one that brings us back up as close to - // bestNonPreferredAffinityCount as possible. There are three cases to - // consider here: - // - // 3ca. candidate.NUMANodeAffinity.Count() > current.NUMANodeAffinity.Count() - // 3cb. candidate.NUMANodeAffinity.Count() < current.NUMANodeAffinity.Count() - // 3cc. candidate.NUMANodeAffinity.Count() == current.NUMANodeAffinity.Count() - // - // For case (3ca), we want to immediately update bestHint to the - // candidate hint because that will bring us closer to the (higher) - // value of bestNonPreferredAffinityCount. - // - // For case (3cb), we want to stick with the current bestHint because - // choosing the candidate hint would strictly move us further away from - // the bestNonPreferredAffinityCount. - // - // Finally, for case (3cc), we know that the current bestHint and the - // candidate hint are equal, so we simply choose the narrower of the 2. - - // Case 1 - if current.NUMANodeAffinity.Count() > bestNonPreferredAffinityCount { - if candidate.NUMANodeAffinity.IsNarrowerThan(current.NUMANodeAffinity) { - return candidate - } - return current - } - // Case 2 - if current.NUMANodeAffinity.Count() == bestNonPreferredAffinityCount { - if candidate.NUMANodeAffinity.Count() != bestNonPreferredAffinityCount { - return current - } - if candidate.NUMANodeAffinity.IsNarrowerThan(current.NUMANodeAffinity) { - return candidate + // If the current bestHint is preferred and the new mergedHint is + // non-preferred, never update bestHint, regardless of mergedHint's + // narowness. + if !mergedHint.Preferred && bestHint.Preferred { + return } - return current - } - // Case 3a - if candidate.NUMANodeAffinity.Count() > bestNonPreferredAffinityCount { - return current - } - // Case 3b - if candidate.NUMANodeAffinity.Count() == bestNonPreferredAffinityCount { - return candidate - } - // Case 3ca - if candidate.NUMANodeAffinity.Count() > current.NUMANodeAffinity.Count() { - return candidate - } - // Case 3cb - if candidate.NUMANodeAffinity.Count() < current.NUMANodeAffinity.Count() { - return current - } - // Case 3cc - if candidate.NUMANodeAffinity.IsNarrowerThan(current.NUMANodeAffinity) { - return candidate - } - return current -} -func mergeFilteredHints(numaNodes []int, filteredHints [][]TopologyHint) TopologyHint { - // Set bestNonPreferredAffinityCount to help decide which affinity mask is - // preferred amongst all non-preferred hints. We calculate this value as - // the maximum of the minimum affinity counts supplied for any given hint - // provider. In other words, prefer a hint that has an affinity mask that - // includes all of the NUMA nodes from the provider that requires the most - // NUMA nodes to satisfy its allocation. - bestNonPreferredAffinityCount := maxOfMinAffinityCounts(filteredHints) - - var bestHint *TopologyHint - iterateAllProviderTopologyHints(filteredHints, func(permutation []TopologyHint) { - // Get the NUMANodeAffinity from each hint in the permutation and see if any - // of them encode unpreferred allocations. - mergedHint := mergePermutation(numaNodes, permutation) + // If mergedHint and bestHint has the same preference, only consider + // mergedHints that have a narrower NUMANodeAffinity than the + // NUMANodeAffinity in the current bestHint. + if !mergedHint.NUMANodeAffinity.IsNarrowerThan(bestHint.NUMANodeAffinity) { + return + } - // Compare the current bestHint with the candidate mergedHint and - // update bestHint if appropriate. - bestHint = compareHints(bestNonPreferredAffinityCount, bestHint, &mergedHint) + // In all other cases, update bestHint to the current mergedHint + bestHint = mergedHint }) - if bestHint == nil { - defaultAffinity, _ := bitmask.NewBitMask(numaNodes...) - bestHint = &TopologyHint{defaultAffinity, false} - } - - return *bestHint + return bestHint } // Iterate over all permutations of hints in 'allProviderHints [][]TopologyHint'. diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/types.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/types.go index edf97334781d..83dd8fcd205d 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/types.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cm/types.go @@ -66,8 +66,6 @@ type CgroupManager interface { Destroy(*CgroupConfig) error // Update cgroup configuration. Update(*CgroupConfig) error - // Validate checks if the cgroup is valid - Validate(name CgroupName) error // Exists checks if the cgroup already exists Exists(name CgroupName) bool // Name returns the literal cgroupfs name on the host after any driver specific conversions. diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/config/common.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/config/common.go index 7dade01b9c3a..4dd515d33fe0 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/config/common.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/config/common.go @@ -80,6 +80,8 @@ func applyDefaults(pod *api.Pod, source string, isFile bool, nodeName types.Node // Set the Host field to indicate this pod is scheduled on the current node. pod.Spec.NodeName = string(nodeName) + pod.ObjectMeta.SelfLink = getSelfLink(pod.Name, pod.Namespace) + if pod.Annotations == nil { pod.Annotations = make(map[string]string) } @@ -100,6 +102,15 @@ func applyDefaults(pod *api.Pod, source string, isFile bool, nodeName types.Node return nil } +func getSelfLink(name, namespace string) string { + var selfLink string + if len(namespace) == 0 { + namespace = metav1.NamespaceDefault + } + selfLink = fmt.Sprintf("/api/v1/namespaces/%s/pods/%s", namespace, name) + return selfLink +} + type defaultFunc func(pod *api.Pod) error // tryDecodeSinglePod takes data and tries to extract valid Pod config information from it. diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/config/config.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/config/config.go index 7a83868cb8ab..f6befde2d7f1 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/config/config.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/config/config.go @@ -17,7 +17,6 @@ limitations under the License. package config import ( - "context" "fmt" "reflect" "sync" @@ -82,11 +81,11 @@ func NewPodConfig(mode PodConfigNotificationMode, recorder record.EventRecorder) // Channel creates or returns a config source channel. The channel // only accepts PodUpdates -func (c *PodConfig) Channel(ctx context.Context, source string) chan<- interface{} { +func (c *PodConfig) Channel(source string) chan<- interface{} { c.sourcesLock.Lock() defer c.sourcesLock.Unlock() c.sources.Insert(source) - return c.mux.ChannelWithContext(ctx, source) + return c.mux.Channel(source) } // SeenAllSources returns true if seenSources contains all sources in the diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/config/flags.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/config/flags.go index 45ee304f9b26..80d0c77f41d9 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/config/flags.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/config/flags.go @@ -20,6 +20,7 @@ import ( "fmt" "github.com/spf13/pflag" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // ContainerRuntimeOptions defines options for the container runtime. @@ -30,13 +31,45 @@ type ContainerRuntimeOptions struct { ContainerRuntime string // RuntimeCgroups that container runtime is expected to be isolated in. RuntimeCgroups string + + // Docker-specific options. + + // DockershimRootDirectory is the path to the dockershim root directory. Defaults to + // /var/lib/dockershim if unset. Exposed for integration testing (e.g. in OpenShift). + DockershimRootDirectory string // PodSandboxImage is the image whose network/ipc namespaces // containers in each pod will use. PodSandboxImage string + // DockerEndpoint is the path to the docker endpoint to communicate with. + DockerEndpoint string + // If no pulling progress is made before the deadline imagePullProgressDeadline, + // the image pulling will be cancelled. Defaults to 1m0s. + // +optional + ImagePullProgressDeadline metav1.Duration + + // Network plugin options. + + // networkPluginName is the name of the network plugin to be invoked for + // various events in kubelet/pod lifecycle + NetworkPluginName string + // NetworkPluginMTU is the MTU to be passed to the network plugin, + // and overrides the default MTU for cases where it cannot be automatically + // computed (such as IPSEC). + NetworkPluginMTU int32 + // CNIConfDir is the full path of the directory in which to search for + // CNI config files + CNIConfDir string + // CNIBinDir is the full path of the directory in which to search for + // CNI plugin binaries + CNIBinDir string + // CNICacheDir is the full path of the directory in which CNI should store + // cache files + CNICacheDir string + // Image credential provider plugin options // ImageCredentialProviderConfigFile is the path to the credential provider plugin config file. - // This config file is a specification for what credential providers are enabled and invoked + // This config file is a specification for what credential providers are enabled and invokved // by the kubelet. The plugin config should contain information about what plugin binary // to execute and what container images the plugin should be called for. // +optional @@ -50,12 +83,33 @@ type ContainerRuntimeOptions struct { // AddFlags adds flags to the container runtime, according to ContainerRuntimeOptions. func (s *ContainerRuntimeOptions) AddFlags(fs *pflag.FlagSet) { + dockerOnlyWarning := "This docker-specific flag only works when container-runtime is set to docker." + // General settings. - fs.StringVar(&s.ContainerRuntime, "container-runtime", s.ContainerRuntime, "The container runtime to use. Possible value: 'remote'.") - fs.MarkDeprecated("container-runtime", "will be removed in 1.27 as the only valid value is 'remote'") + fs.StringVar(&s.ContainerRuntime, "container-runtime", s.ContainerRuntime, "The container runtime to use. Possible values: 'docker', 'remote'.") fs.StringVar(&s.RuntimeCgroups, "runtime-cgroups", s.RuntimeCgroups, "Optional absolute name of cgroups to create and run the runtime in.") - fs.StringVar(&s.PodSandboxImage, "pod-infra-container-image", s.PodSandboxImage, fmt.Sprintf("Specified image will not be pruned by the image garbage collector. CRI implementations have their own configuration to set this image.")) - fs.MarkDeprecated("pod-infra-container-image", "will be removed in 1.27. Image garbage collector will get sandbox image information from CRI.") + + // Docker-specific settings. + fs.StringVar(&s.DockershimRootDirectory, "experimental-dockershim-root-directory", s.DockershimRootDirectory, "Path to the dockershim root directory.") + fs.MarkHidden("experimental-dockershim-root-directory") + fs.StringVar(&s.PodSandboxImage, "pod-infra-container-image", s.PodSandboxImage, fmt.Sprintf("Specified image will not be pruned by the image garbage collector. "+ + "When container-runtime is set to 'docker', all containers in each pod will use the network/ipc namespaces from this image. Other CRI implementations have their own configuration to set this image.")) + fs.StringVar(&s.DockerEndpoint, "docker-endpoint", s.DockerEndpoint, fmt.Sprintf("Use this for the docker endpoint to communicate with. %s", dockerOnlyWarning)) + fs.MarkDeprecated("docker-endpoint", "will be removed along with dockershim.") + fs.DurationVar(&s.ImagePullProgressDeadline.Duration, "image-pull-progress-deadline", s.ImagePullProgressDeadline.Duration, fmt.Sprintf("If no pulling progress is made before this deadline, the image pulling will be cancelled. %s", dockerOnlyWarning)) + fs.MarkDeprecated("image-pull-progress-deadline", "will be removed along with dockershim.") + + // Network plugin settings for Docker. + fs.StringVar(&s.NetworkPluginName, "network-plugin", s.NetworkPluginName, fmt.Sprintf("The name of the network plugin to be invoked for various events in kubelet/pod lifecycle. %s", dockerOnlyWarning)) + fs.MarkDeprecated("network-plugin", "will be removed along with dockershim.") + fs.StringVar(&s.CNIConfDir, "cni-conf-dir", s.CNIConfDir, fmt.Sprintf("The full path of the directory in which to search for CNI config files. %s", dockerOnlyWarning)) + fs.MarkDeprecated("cni-conf-dir", "will be removed along with dockershim.") + fs.StringVar(&s.CNIBinDir, "cni-bin-dir", s.CNIBinDir, fmt.Sprintf("A comma-separated list of full paths of directories in which to search for CNI plugin binaries. %s", dockerOnlyWarning)) + fs.MarkDeprecated("cni-bin-dir", "will be removed along with dockershim.") + fs.StringVar(&s.CNICacheDir, "cni-cache-dir", s.CNICacheDir, fmt.Sprintf("The full path of the directory in which CNI should store cache files. %s", dockerOnlyWarning)) + fs.MarkDeprecated("cni-cache-dir", "will be removed along with dockershim.") + fs.Int32Var(&s.NetworkPluginMTU, "network-plugin-mtu", s.NetworkPluginMTU, fmt.Sprintf("The MTU to be passed to the network plugin, to override the default. Set to 0 to use the default 1460 MTU. %s", dockerOnlyWarning)) + fs.MarkDeprecated("network-plugin-mtu", "will be removed along with dockershim.") // Image credential provider settings. fs.StringVar(&s.ImageCredentialProviderConfigFile, "image-credential-provider-config", s.ImageCredentialProviderConfigFile, "The path to the credential provider plugin config file.") diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/container/helpers.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/container/helpers.go index a9be02a32d60..a972f867feed 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/container/helpers.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/container/helpers.go @@ -277,6 +277,14 @@ func SandboxToContainerState(state runtimeapi.PodSandboxState) State { return ContainerStateUnknown } +// FormatPod returns a string representing a pod in a human readable format, +// with pod UID as part of the string. +func FormatPod(pod *Pod) string { + // Use underscore as the delimiter because it is not allowed in pod name + // (DNS subdomain format), while allowed in the container name format. + return fmt.Sprintf("%s_%s(%s)", pod.Name, pod.Namespace, pod.ID) +} + // GetContainerSpec gets the container spec by containerName. func GetContainerSpec(pod *v1.Pod, containerName string) *v1.Container { var containerSpec *v1.Container @@ -317,7 +325,7 @@ func HasWindowsHostProcessContainer(pod *v1.Pod) bool { return hasHostProcess } -// AllContainersAreWindowsHostProcess returns true if all containers in a pod are HostProcess containers. +// AllContainersAreWindowsHostProcess returns true if all containres in a pod are HostProcess containers. func AllContainersAreWindowsHostProcess(pod *v1.Pod) bool { allHostProcess := true podutil.VisitContainers(&pod.Spec, podutil.AllFeatureEnabledContainers(), func(c *v1.Container, containerType podutil.ContainerType) bool { @@ -354,7 +362,7 @@ func MakePortMappings(container *v1.Container) (ports []PortMapping) { } } - var name = p.Name + var name string = p.Name if name == "" { name = fmt.Sprintf("%s-%s-%s:%d:%d", family, p.Protocol, p.HostIP, p.ContainerPort, p.HostPort) } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/container/ref.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/container/ref.go index e4f860378a14..3d366dc188c8 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/container/ref.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/container/ref.go @@ -32,6 +32,9 @@ var ImplicitContainerPrefix = "implicitly required container " // GenerateContainerRef returns an *v1.ObjectReference which references the given container // within the given pod. Returns an error if the reference can't be constructed or the // container doesn't actually belong to the pod. +// +// This function will return an error if the provided Pod does not have a selfLink, +// but we expect selfLink to be populated at all call sites for the function. func GenerateContainerRef(pod *v1.Pod, container *v1.Container) (*v1.ObjectReference, error) { fieldPath, err := fieldPath(pod, container) if err != nil { diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime.go index 0810e938f267..631796169528 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/container/runtime.go @@ -69,6 +69,9 @@ type Runtime interface { // Type returns the type of the container runtime. Type() string + //SupportsSingleFileMapping returns whether the container runtime supports single file mappings or not. + SupportsSingleFileMapping() bool + // Version returns the version information of the container runtime. Version() (Version, error) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/container/testing/fake_runtime.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/container/testing/fake_runtime.go index 3765e87c8a66..fa02d4b57145 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/container/testing/fake_runtime.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/container/testing/fake_runtime.go @@ -179,6 +179,10 @@ func (f *FakeRuntime) Type() string { return f.RuntimeType } +func (f *FakeRuntime) SupportsSingleFileMapping() bool { + return true +} + func (f *FakeRuntime) Version() (kubecontainer.Version, error) { f.Lock() defer f.Unlock() diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/container/testing/mock_runtime_cache.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/container/testing/mock_runtime_cache.go index 2c77f3583326..d281146b80ad 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/container/testing/mock_runtime_cache.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/container/testing/mock_runtime_cache.go @@ -21,51 +21,36 @@ limitations under the License. package testing import ( - reflect "reflect" - time "time" - gomock "github.com/golang/mock/gomock" container "k8s.io/kubernetes/pkg/kubelet/container" + reflect "reflect" + time "time" ) -// MockRuntimeCache is a mock of RuntimeCache interface. +// MockRuntimeCache is a mock of RuntimeCache interface type MockRuntimeCache struct { ctrl *gomock.Controller recorder *MockRuntimeCacheMockRecorder } -// MockRuntimeCacheMockRecorder is the mock recorder for MockRuntimeCache. +// MockRuntimeCacheMockRecorder is the mock recorder for MockRuntimeCache type MockRuntimeCacheMockRecorder struct { mock *MockRuntimeCache } -// NewMockRuntimeCache creates a new mock instance. +// NewMockRuntimeCache creates a new mock instance func NewMockRuntimeCache(ctrl *gomock.Controller) *MockRuntimeCache { mock := &MockRuntimeCache{ctrl: ctrl} mock.recorder = &MockRuntimeCacheMockRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use. +// EXPECT returns an object that allows the caller to indicate expected use func (m *MockRuntimeCache) EXPECT() *MockRuntimeCacheMockRecorder { return m.recorder } -// ForceUpdateIfOlder mocks base method. -func (m *MockRuntimeCache) ForceUpdateIfOlder(arg0 time.Time) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ForceUpdateIfOlder", arg0) - ret0, _ := ret[0].(error) - return ret0 -} - -// ForceUpdateIfOlder indicates an expected call of ForceUpdateIfOlder. -func (mr *MockRuntimeCacheMockRecorder) ForceUpdateIfOlder(arg0 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForceUpdateIfOlder", reflect.TypeOf((*MockRuntimeCache)(nil).ForceUpdateIfOlder), arg0) -} - -// GetPods mocks base method. +// GetPods mocks base method func (m *MockRuntimeCache) GetPods() ([]*container.Pod, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetPods") @@ -74,36 +59,50 @@ func (m *MockRuntimeCache) GetPods() ([]*container.Pod, error) { return ret0, ret1 } -// GetPods indicates an expected call of GetPods. +// GetPods indicates an expected call of GetPods func (mr *MockRuntimeCacheMockRecorder) GetPods() *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPods", reflect.TypeOf((*MockRuntimeCache)(nil).GetPods)) } -// MockpodsGetter is a mock of podsGetter interface. +// ForceUpdateIfOlder mocks base method +func (m *MockRuntimeCache) ForceUpdateIfOlder(arg0 time.Time) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ForceUpdateIfOlder", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// ForceUpdateIfOlder indicates an expected call of ForceUpdateIfOlder +func (mr *MockRuntimeCacheMockRecorder) ForceUpdateIfOlder(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForceUpdateIfOlder", reflect.TypeOf((*MockRuntimeCache)(nil).ForceUpdateIfOlder), arg0) +} + +// MockpodsGetter is a mock of podsGetter interface type MockpodsGetter struct { ctrl *gomock.Controller recorder *MockpodsGetterMockRecorder } -// MockpodsGetterMockRecorder is the mock recorder for MockpodsGetter. +// MockpodsGetterMockRecorder is the mock recorder for MockpodsGetter type MockpodsGetterMockRecorder struct { mock *MockpodsGetter } -// NewMockpodsGetter creates a new mock instance. +// NewMockpodsGetter creates a new mock instance func NewMockpodsGetter(ctrl *gomock.Controller) *MockpodsGetter { mock := &MockpodsGetter{ctrl: ctrl} mock.recorder = &MockpodsGetterMockRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use. +// EXPECT returns an object that allows the caller to indicate expected use func (m *MockpodsGetter) EXPECT() *MockpodsGetterMockRecorder { return m.recorder } -// GetPods mocks base method. +// GetPods mocks base method func (m *MockpodsGetter) GetPods(arg0 bool) ([]*container.Pod, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetPods", arg0) @@ -112,7 +111,7 @@ func (m *MockpodsGetter) GetPods(arg0 bool) ([]*container.Pod, error) { return ret0, ret1 } -// GetPods indicates an expected call of GetPods. +// GetPods indicates an expected call of GetPods func (mr *MockpodsGetterMockRecorder) GetPods(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPods", reflect.TypeOf((*MockpodsGetter)(nil).GetPods), arg0) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/container/testing/runtime_mock.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/container/testing/runtime_mock.go index b26330959120..255b767a7459 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/container/testing/runtime_mock.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/container/testing/runtime_mock.go @@ -22,44 +22,43 @@ package testing import ( context "context" - io "io" - url "net/url" - reflect "reflect" - time "time" - gomock "github.com/golang/mock/gomock" + io "io" v1 "k8s.io/api/core/v1" types "k8s.io/apimachinery/pkg/types" remotecommand "k8s.io/client-go/tools/remotecommand" flowcontrol "k8s.io/client-go/util/flowcontrol" v10 "k8s.io/cri-api/pkg/apis/runtime/v1" container "k8s.io/kubernetes/pkg/kubelet/container" + url "net/url" + reflect "reflect" + time "time" ) -// MockVersion is a mock of Version interface. +// MockVersion is a mock of Version interface type MockVersion struct { ctrl *gomock.Controller recorder *MockVersionMockRecorder } -// MockVersionMockRecorder is the mock recorder for MockVersion. +// MockVersionMockRecorder is the mock recorder for MockVersion type MockVersionMockRecorder struct { mock *MockVersion } -// NewMockVersion creates a new mock instance. +// NewMockVersion creates a new mock instance func NewMockVersion(ctrl *gomock.Controller) *MockVersion { mock := &MockVersion{ctrl: ctrl} mock.recorder = &MockVersionMockRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use. +// EXPECT returns an object that allows the caller to indicate expected use func (m *MockVersion) EXPECT() *MockVersionMockRecorder { return m.recorder } -// Compare mocks base method. +// Compare mocks base method func (m *MockVersion) Compare(other string) (int, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Compare", other) @@ -68,13 +67,13 @@ func (m *MockVersion) Compare(other string) (int, error) { return ret0, ret1 } -// Compare indicates an expected call of Compare. +// Compare indicates an expected call of Compare func (mr *MockVersionMockRecorder) Compare(other interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Compare", reflect.TypeOf((*MockVersion)(nil).Compare), other) } -// String mocks base method. +// String mocks base method func (m *MockVersion) String() string { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "String") @@ -82,123 +81,109 @@ func (m *MockVersion) String() string { return ret0 } -// String indicates an expected call of String. +// String indicates an expected call of String func (mr *MockVersionMockRecorder) String() *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockVersion)(nil).String)) } -// MockRuntime is a mock of Runtime interface. +// MockRuntime is a mock of Runtime interface type MockRuntime struct { ctrl *gomock.Controller recorder *MockRuntimeMockRecorder } -// MockRuntimeMockRecorder is the mock recorder for MockRuntime. +// MockRuntimeMockRecorder is the mock recorder for MockRuntime type MockRuntimeMockRecorder struct { mock *MockRuntime } -// NewMockRuntime creates a new mock instance. +// NewMockRuntime creates a new mock instance func NewMockRuntime(ctrl *gomock.Controller) *MockRuntime { mock := &MockRuntime{ctrl: ctrl} mock.recorder = &MockRuntimeMockRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use. +// EXPECT returns an object that allows the caller to indicate expected use func (m *MockRuntime) EXPECT() *MockRuntimeMockRecorder { return m.recorder } -// APIVersion mocks base method. -func (m *MockRuntime) APIVersion() (container.Version, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "APIVersion") - ret0, _ := ret[0].(container.Version) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// APIVersion indicates an expected call of APIVersion. -func (mr *MockRuntimeMockRecorder) APIVersion() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIVersion", reflect.TypeOf((*MockRuntime)(nil).APIVersion)) -} - -// DeleteContainer mocks base method. -func (m *MockRuntime) DeleteContainer(containerID container.ContainerID) error { +// Type mocks base method +func (m *MockRuntime) Type() string { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteContainer", containerID) - ret0, _ := ret[0].(error) + ret := m.ctrl.Call(m, "Type") + ret0, _ := ret[0].(string) return ret0 } -// DeleteContainer indicates an expected call of DeleteContainer. -func (mr *MockRuntimeMockRecorder) DeleteContainer(containerID interface{}) *gomock.Call { +// Type indicates an expected call of Type +func (mr *MockRuntimeMockRecorder) Type() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContainer", reflect.TypeOf((*MockRuntime)(nil).DeleteContainer), containerID) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockRuntime)(nil).Type)) } -// GarbageCollect mocks base method. -func (m *MockRuntime) GarbageCollect(gcPolicy container.GCPolicy, allSourcesReady, evictNonDeletedPods bool) error { +// SupportsSingleFileMapping mocks base method +func (m *MockRuntime) SupportsSingleFileMapping() bool { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GarbageCollect", gcPolicy, allSourcesReady, evictNonDeletedPods) - ret0, _ := ret[0].(error) + ret := m.ctrl.Call(m, "SupportsSingleFileMapping") + ret0, _ := ret[0].(bool) return ret0 } -// GarbageCollect indicates an expected call of GarbageCollect. -func (mr *MockRuntimeMockRecorder) GarbageCollect(gcPolicy, allSourcesReady, evictNonDeletedPods interface{}) *gomock.Call { +// SupportsSingleFileMapping indicates an expected call of SupportsSingleFileMapping +func (mr *MockRuntimeMockRecorder) SupportsSingleFileMapping() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GarbageCollect", reflect.TypeOf((*MockRuntime)(nil).GarbageCollect), gcPolicy, allSourcesReady, evictNonDeletedPods) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportsSingleFileMapping", reflect.TypeOf((*MockRuntime)(nil).SupportsSingleFileMapping)) } -// GetContainerLogs mocks base method. -func (m *MockRuntime) GetContainerLogs(ctx context.Context, pod *v1.Pod, containerID container.ContainerID, logOptions *v1.PodLogOptions, stdout, stderr io.Writer) error { +// Version mocks base method +func (m *MockRuntime) Version() (container.Version, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetContainerLogs", ctx, pod, containerID, logOptions, stdout, stderr) - ret0, _ := ret[0].(error) - return ret0 + ret := m.ctrl.Call(m, "Version") + ret0, _ := ret[0].(container.Version) + ret1, _ := ret[1].(error) + return ret0, ret1 } -// GetContainerLogs indicates an expected call of GetContainerLogs. -func (mr *MockRuntimeMockRecorder) GetContainerLogs(ctx, pod, containerID, logOptions, stdout, stderr interface{}) *gomock.Call { +// Version indicates an expected call of Version +func (mr *MockRuntimeMockRecorder) Version() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerLogs", reflect.TypeOf((*MockRuntime)(nil).GetContainerLogs), ctx, pod, containerID, logOptions, stdout, stderr) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockRuntime)(nil).Version)) } -// GetImageRef mocks base method. -func (m *MockRuntime) GetImageRef(image container.ImageSpec) (string, error) { +// APIVersion mocks base method +func (m *MockRuntime) APIVersion() (container.Version, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetImageRef", image) - ret0, _ := ret[0].(string) + ret := m.ctrl.Call(m, "APIVersion") + ret0, _ := ret[0].(container.Version) ret1, _ := ret[1].(error) return ret0, ret1 } -// GetImageRef indicates an expected call of GetImageRef. -func (mr *MockRuntimeMockRecorder) GetImageRef(image interface{}) *gomock.Call { +// APIVersion indicates an expected call of APIVersion +func (mr *MockRuntimeMockRecorder) APIVersion() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageRef", reflect.TypeOf((*MockRuntime)(nil).GetImageRef), image) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIVersion", reflect.TypeOf((*MockRuntime)(nil).APIVersion)) } -// GetPodStatus mocks base method. -func (m *MockRuntime) GetPodStatus(uid types.UID, name, namespace string) (*container.PodStatus, error) { +// Status mocks base method +func (m *MockRuntime) Status() (*container.RuntimeStatus, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetPodStatus", uid, name, namespace) - ret0, _ := ret[0].(*container.PodStatus) + ret := m.ctrl.Call(m, "Status") + ret0, _ := ret[0].(*container.RuntimeStatus) ret1, _ := ret[1].(error) return ret0, ret1 } -// GetPodStatus indicates an expected call of GetPodStatus. -func (mr *MockRuntimeMockRecorder) GetPodStatus(uid, name, namespace interface{}) *gomock.Call { +// Status indicates an expected call of Status +func (mr *MockRuntimeMockRecorder) Status() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPodStatus", reflect.TypeOf((*MockRuntime)(nil).GetPodStatus), uid, name, namespace) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockRuntime)(nil).Status)) } -// GetPods mocks base method. +// GetPods mocks base method func (m *MockRuntime) GetPods(all bool) ([]*container.Pod, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetPods", all) @@ -207,28 +192,41 @@ func (m *MockRuntime) GetPods(all bool) ([]*container.Pod, error) { return ret0, ret1 } -// GetPods indicates an expected call of GetPods. +// GetPods indicates an expected call of GetPods func (mr *MockRuntimeMockRecorder) GetPods(all interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPods", reflect.TypeOf((*MockRuntime)(nil).GetPods), all) } -// ImageStats mocks base method. -func (m *MockRuntime) ImageStats() (*container.ImageStats, error) { +// GarbageCollect mocks base method +func (m *MockRuntime) GarbageCollect(gcPolicy container.GCPolicy, allSourcesReady, evictNonDeletedPods bool) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ImageStats") - ret0, _ := ret[0].(*container.ImageStats) - ret1, _ := ret[1].(error) - return ret0, ret1 + ret := m.ctrl.Call(m, "GarbageCollect", gcPolicy, allSourcesReady, evictNonDeletedPods) + ret0, _ := ret[0].(error) + return ret0 } -// ImageStats indicates an expected call of ImageStats. -func (mr *MockRuntimeMockRecorder) ImageStats() *gomock.Call { +// GarbageCollect indicates an expected call of GarbageCollect +func (mr *MockRuntimeMockRecorder) GarbageCollect(gcPolicy, allSourcesReady, evictNonDeletedPods interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImageStats", reflect.TypeOf((*MockRuntime)(nil).ImageStats)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GarbageCollect", reflect.TypeOf((*MockRuntime)(nil).GarbageCollect), gcPolicy, allSourcesReady, evictNonDeletedPods) +} + +// SyncPod mocks base method +func (m *MockRuntime) SyncPod(pod *v1.Pod, podStatus *container.PodStatus, pullSecrets []v1.Secret, backOff *flowcontrol.Backoff) container.PodSyncResult { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SyncPod", pod, podStatus, pullSecrets, backOff) + ret0, _ := ret[0].(container.PodSyncResult) + return ret0 +} + +// SyncPod indicates an expected call of SyncPod +func (mr *MockRuntimeMockRecorder) SyncPod(pod, podStatus, pullSecrets, backOff interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncPod", reflect.TypeOf((*MockRuntime)(nil).SyncPod), pod, podStatus, pullSecrets, backOff) } -// KillPod mocks base method. +// KillPod mocks base method func (m *MockRuntime) KillPod(pod *v1.Pod, runningPod container.Pod, gracePeriodOverride *int64) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "KillPod", pod, runningPod, gracePeriodOverride) @@ -236,28 +234,56 @@ func (m *MockRuntime) KillPod(pod *v1.Pod, runningPod container.Pod, gracePeriod return ret0 } -// KillPod indicates an expected call of KillPod. +// KillPod indicates an expected call of KillPod func (mr *MockRuntimeMockRecorder) KillPod(pod, runningPod, gracePeriodOverride interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KillPod", reflect.TypeOf((*MockRuntime)(nil).KillPod), pod, runningPod, gracePeriodOverride) } -// ListImages mocks base method. -func (m *MockRuntime) ListImages() ([]container.Image, error) { +// GetPodStatus mocks base method +func (m *MockRuntime) GetPodStatus(uid types.UID, name, namespace string) (*container.PodStatus, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ListImages") - ret0, _ := ret[0].([]container.Image) + ret := m.ctrl.Call(m, "GetPodStatus", uid, name, namespace) + ret0, _ := ret[0].(*container.PodStatus) ret1, _ := ret[1].(error) return ret0, ret1 } -// ListImages indicates an expected call of ListImages. -func (mr *MockRuntimeMockRecorder) ListImages() *gomock.Call { +// GetPodStatus indicates an expected call of GetPodStatus +func (mr *MockRuntimeMockRecorder) GetPodStatus(uid, name, namespace interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListImages", reflect.TypeOf((*MockRuntime)(nil).ListImages)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPodStatus", reflect.TypeOf((*MockRuntime)(nil).GetPodStatus), uid, name, namespace) +} + +// GetContainerLogs mocks base method +func (m *MockRuntime) GetContainerLogs(ctx context.Context, pod *v1.Pod, containerID container.ContainerID, logOptions *v1.PodLogOptions, stdout, stderr io.Writer) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetContainerLogs", ctx, pod, containerID, logOptions, stdout, stderr) + ret0, _ := ret[0].(error) + return ret0 +} + +// GetContainerLogs indicates an expected call of GetContainerLogs +func (mr *MockRuntimeMockRecorder) GetContainerLogs(ctx, pod, containerID, logOptions, stdout, stderr interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerLogs", reflect.TypeOf((*MockRuntime)(nil).GetContainerLogs), ctx, pod, containerID, logOptions, stdout, stderr) +} + +// DeleteContainer mocks base method +func (m *MockRuntime) DeleteContainer(containerID container.ContainerID) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteContainer", containerID) + ret0, _ := ret[0].(error) + return ret0 } -// PullImage mocks base method. +// DeleteContainer indicates an expected call of DeleteContainer +func (mr *MockRuntimeMockRecorder) DeleteContainer(containerID interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteContainer", reflect.TypeOf((*MockRuntime)(nil).DeleteContainer), containerID) +} + +// PullImage mocks base method func (m *MockRuntime) PullImage(image container.ImageSpec, pullSecrets []v1.Secret, podSandboxConfig *v10.PodSandboxConfig) (string, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "PullImage", image, pullSecrets, podSandboxConfig) @@ -266,70 +292,72 @@ func (m *MockRuntime) PullImage(image container.ImageSpec, pullSecrets []v1.Secr return ret0, ret1 } -// PullImage indicates an expected call of PullImage. +// PullImage indicates an expected call of PullImage func (mr *MockRuntimeMockRecorder) PullImage(image, pullSecrets, podSandboxConfig interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PullImage", reflect.TypeOf((*MockRuntime)(nil).PullImage), image, pullSecrets, podSandboxConfig) } -// RemoveImage mocks base method. -func (m *MockRuntime) RemoveImage(image container.ImageSpec) error { +// GetImageRef mocks base method +func (m *MockRuntime) GetImageRef(image container.ImageSpec) (string, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RemoveImage", image) - ret0, _ := ret[0].(error) - return ret0 + ret := m.ctrl.Call(m, "GetImageRef", image) + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 } -// RemoveImage indicates an expected call of RemoveImage. -func (mr *MockRuntimeMockRecorder) RemoveImage(image interface{}) *gomock.Call { +// GetImageRef indicates an expected call of GetImageRef +func (mr *MockRuntimeMockRecorder) GetImageRef(image interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveImage", reflect.TypeOf((*MockRuntime)(nil).RemoveImage), image) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageRef", reflect.TypeOf((*MockRuntime)(nil).GetImageRef), image) } -// Status mocks base method. -func (m *MockRuntime) Status() (*container.RuntimeStatus, error) { +// ListImages mocks base method +func (m *MockRuntime) ListImages() ([]container.Image, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Status") - ret0, _ := ret[0].(*container.RuntimeStatus) + ret := m.ctrl.Call(m, "ListImages") + ret0, _ := ret[0].([]container.Image) ret1, _ := ret[1].(error) return ret0, ret1 } -// Status indicates an expected call of Status. -func (mr *MockRuntimeMockRecorder) Status() *gomock.Call { +// ListImages indicates an expected call of ListImages +func (mr *MockRuntimeMockRecorder) ListImages() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Status", reflect.TypeOf((*MockRuntime)(nil).Status)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListImages", reflect.TypeOf((*MockRuntime)(nil).ListImages)) } -// SyncPod mocks base method. -func (m *MockRuntime) SyncPod(pod *v1.Pod, podStatus *container.PodStatus, pullSecrets []v1.Secret, backOff *flowcontrol.Backoff) container.PodSyncResult { +// RemoveImage mocks base method +func (m *MockRuntime) RemoveImage(image container.ImageSpec) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SyncPod", pod, podStatus, pullSecrets, backOff) - ret0, _ := ret[0].(container.PodSyncResult) + ret := m.ctrl.Call(m, "RemoveImage", image) + ret0, _ := ret[0].(error) return ret0 } -// SyncPod indicates an expected call of SyncPod. -func (mr *MockRuntimeMockRecorder) SyncPod(pod, podStatus, pullSecrets, backOff interface{}) *gomock.Call { +// RemoveImage indicates an expected call of RemoveImage +func (mr *MockRuntimeMockRecorder) RemoveImage(image interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncPod", reflect.TypeOf((*MockRuntime)(nil).SyncPod), pod, podStatus, pullSecrets, backOff) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveImage", reflect.TypeOf((*MockRuntime)(nil).RemoveImage), image) } -// Type mocks base method. -func (m *MockRuntime) Type() string { +// ImageStats mocks base method +func (m *MockRuntime) ImageStats() (*container.ImageStats, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Type") - ret0, _ := ret[0].(string) - return ret0 + ret := m.ctrl.Call(m, "ImageStats") + ret0, _ := ret[0].(*container.ImageStats) + ret1, _ := ret[1].(error) + return ret0, ret1 } -// Type indicates an expected call of Type. -func (mr *MockRuntimeMockRecorder) Type() *gomock.Call { +// ImageStats indicates an expected call of ImageStats +func (mr *MockRuntimeMockRecorder) ImageStats() *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Type", reflect.TypeOf((*MockRuntime)(nil).Type)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImageStats", reflect.TypeOf((*MockRuntime)(nil).ImageStats)) } -// UpdatePodCIDR mocks base method. +// UpdatePodCIDR mocks base method func (m *MockRuntime) UpdatePodCIDR(podCIDR string) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "UpdatePodCIDR", podCIDR) @@ -337,81 +365,66 @@ func (m *MockRuntime) UpdatePodCIDR(podCIDR string) error { return ret0 } -// UpdatePodCIDR indicates an expected call of UpdatePodCIDR. +// UpdatePodCIDR indicates an expected call of UpdatePodCIDR func (mr *MockRuntimeMockRecorder) UpdatePodCIDR(podCIDR interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatePodCIDR", reflect.TypeOf((*MockRuntime)(nil).UpdatePodCIDR), podCIDR) } -// Version mocks base method. -func (m *MockRuntime) Version() (container.Version, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Version") - ret0, _ := ret[0].(container.Version) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// Version indicates an expected call of Version. -func (mr *MockRuntimeMockRecorder) Version() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockRuntime)(nil).Version)) -} - -// MockStreamingRuntime is a mock of StreamingRuntime interface. +// MockStreamingRuntime is a mock of StreamingRuntime interface type MockStreamingRuntime struct { ctrl *gomock.Controller recorder *MockStreamingRuntimeMockRecorder } -// MockStreamingRuntimeMockRecorder is the mock recorder for MockStreamingRuntime. +// MockStreamingRuntimeMockRecorder is the mock recorder for MockStreamingRuntime type MockStreamingRuntimeMockRecorder struct { mock *MockStreamingRuntime } -// NewMockStreamingRuntime creates a new mock instance. +// NewMockStreamingRuntime creates a new mock instance func NewMockStreamingRuntime(ctrl *gomock.Controller) *MockStreamingRuntime { mock := &MockStreamingRuntime{ctrl: ctrl} mock.recorder = &MockStreamingRuntimeMockRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use. +// EXPECT returns an object that allows the caller to indicate expected use func (m *MockStreamingRuntime) EXPECT() *MockStreamingRuntimeMockRecorder { return m.recorder } -// GetAttach mocks base method. -func (m *MockStreamingRuntime) GetAttach(id container.ContainerID, stdin, stdout, stderr, tty bool) (*url.URL, error) { +// GetExec mocks base method +func (m *MockStreamingRuntime) GetExec(id container.ContainerID, cmd []string, stdin, stdout, stderr, tty bool) (*url.URL, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAttach", id, stdin, stdout, stderr, tty) + ret := m.ctrl.Call(m, "GetExec", id, cmd, stdin, stdout, stderr, tty) ret0, _ := ret[0].(*url.URL) ret1, _ := ret[1].(error) return ret0, ret1 } -// GetAttach indicates an expected call of GetAttach. -func (mr *MockStreamingRuntimeMockRecorder) GetAttach(id, stdin, stdout, stderr, tty interface{}) *gomock.Call { +// GetExec indicates an expected call of GetExec +func (mr *MockStreamingRuntimeMockRecorder) GetExec(id, cmd, stdin, stdout, stderr, tty interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAttach", reflect.TypeOf((*MockStreamingRuntime)(nil).GetAttach), id, stdin, stdout, stderr, tty) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetExec", reflect.TypeOf((*MockStreamingRuntime)(nil).GetExec), id, cmd, stdin, stdout, stderr, tty) } -// GetExec mocks base method. -func (m *MockStreamingRuntime) GetExec(id container.ContainerID, cmd []string, stdin, stdout, stderr, tty bool) (*url.URL, error) { +// GetAttach mocks base method +func (m *MockStreamingRuntime) GetAttach(id container.ContainerID, stdin, stdout, stderr, tty bool) (*url.URL, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetExec", id, cmd, stdin, stdout, stderr, tty) + ret := m.ctrl.Call(m, "GetAttach", id, stdin, stdout, stderr, tty) ret0, _ := ret[0].(*url.URL) ret1, _ := ret[1].(error) return ret0, ret1 } -// GetExec indicates an expected call of GetExec. -func (mr *MockStreamingRuntimeMockRecorder) GetExec(id, cmd, stdin, stdout, stderr, tty interface{}) *gomock.Call { +// GetAttach indicates an expected call of GetAttach +func (mr *MockStreamingRuntimeMockRecorder) GetAttach(id, stdin, stdout, stderr, tty interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetExec", reflect.TypeOf((*MockStreamingRuntime)(nil).GetExec), id, cmd, stdin, stdout, stderr, tty) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAttach", reflect.TypeOf((*MockStreamingRuntime)(nil).GetAttach), id, stdin, stdout, stderr, tty) } -// GetPortForward mocks base method. +// GetPortForward mocks base method func (m *MockStreamingRuntime) GetPortForward(podName, podNamespace string, podUID types.UID, ports []int32) (*url.URL, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetPortForward", podName, podNamespace, podUID, ports) @@ -420,66 +433,66 @@ func (m *MockStreamingRuntime) GetPortForward(podName, podNamespace string, podU return ret0, ret1 } -// GetPortForward indicates an expected call of GetPortForward. +// GetPortForward indicates an expected call of GetPortForward func (mr *MockStreamingRuntimeMockRecorder) GetPortForward(podName, podNamespace, podUID, ports interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPortForward", reflect.TypeOf((*MockStreamingRuntime)(nil).GetPortForward), podName, podNamespace, podUID, ports) } -// MockImageService is a mock of ImageService interface. +// MockImageService is a mock of ImageService interface type MockImageService struct { ctrl *gomock.Controller recorder *MockImageServiceMockRecorder } -// MockImageServiceMockRecorder is the mock recorder for MockImageService. +// MockImageServiceMockRecorder is the mock recorder for MockImageService type MockImageServiceMockRecorder struct { mock *MockImageService } -// NewMockImageService creates a new mock instance. +// NewMockImageService creates a new mock instance func NewMockImageService(ctrl *gomock.Controller) *MockImageService { mock := &MockImageService{ctrl: ctrl} mock.recorder = &MockImageServiceMockRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use. +// EXPECT returns an object that allows the caller to indicate expected use func (m *MockImageService) EXPECT() *MockImageServiceMockRecorder { return m.recorder } -// GetImageRef mocks base method. -func (m *MockImageService) GetImageRef(image container.ImageSpec) (string, error) { +// PullImage mocks base method +func (m *MockImageService) PullImage(image container.ImageSpec, pullSecrets []v1.Secret, podSandboxConfig *v10.PodSandboxConfig) (string, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetImageRef", image) + ret := m.ctrl.Call(m, "PullImage", image, pullSecrets, podSandboxConfig) ret0, _ := ret[0].(string) ret1, _ := ret[1].(error) return ret0, ret1 } -// GetImageRef indicates an expected call of GetImageRef. -func (mr *MockImageServiceMockRecorder) GetImageRef(image interface{}) *gomock.Call { +// PullImage indicates an expected call of PullImage +func (mr *MockImageServiceMockRecorder) PullImage(image, pullSecrets, podSandboxConfig interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageRef", reflect.TypeOf((*MockImageService)(nil).GetImageRef), image) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PullImage", reflect.TypeOf((*MockImageService)(nil).PullImage), image, pullSecrets, podSandboxConfig) } -// ImageStats mocks base method. -func (m *MockImageService) ImageStats() (*container.ImageStats, error) { +// GetImageRef mocks base method +func (m *MockImageService) GetImageRef(image container.ImageSpec) (string, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ImageStats") - ret0, _ := ret[0].(*container.ImageStats) + ret := m.ctrl.Call(m, "GetImageRef", image) + ret0, _ := ret[0].(string) ret1, _ := ret[1].(error) return ret0, ret1 } -// ImageStats indicates an expected call of ImageStats. -func (mr *MockImageServiceMockRecorder) ImageStats() *gomock.Call { +// GetImageRef indicates an expected call of GetImageRef +func (mr *MockImageServiceMockRecorder) GetImageRef(image interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImageStats", reflect.TypeOf((*MockImageService)(nil).ImageStats)) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageRef", reflect.TypeOf((*MockImageService)(nil).GetImageRef), image) } -// ListImages mocks base method. +// ListImages mocks base method func (m *MockImageService) ListImages() ([]container.Image, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ListImages") @@ -488,28 +501,13 @@ func (m *MockImageService) ListImages() ([]container.Image, error) { return ret0, ret1 } -// ListImages indicates an expected call of ListImages. +// ListImages indicates an expected call of ListImages func (mr *MockImageServiceMockRecorder) ListImages() *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListImages", reflect.TypeOf((*MockImageService)(nil).ListImages)) } -// PullImage mocks base method. -func (m *MockImageService) PullImage(image container.ImageSpec, pullSecrets []v1.Secret, podSandboxConfig *v10.PodSandboxConfig) (string, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "PullImage", image, pullSecrets, podSandboxConfig) - ret0, _ := ret[0].(string) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// PullImage indicates an expected call of PullImage. -func (mr *MockImageServiceMockRecorder) PullImage(image, pullSecrets, podSandboxConfig interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PullImage", reflect.TypeOf((*MockImageService)(nil).PullImage), image, pullSecrets, podSandboxConfig) -} - -// RemoveImage mocks base method. +// RemoveImage mocks base method func (m *MockImageService) RemoveImage(image container.ImageSpec) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "RemoveImage", image) @@ -517,36 +515,51 @@ func (m *MockImageService) RemoveImage(image container.ImageSpec) error { return ret0 } -// RemoveImage indicates an expected call of RemoveImage. +// RemoveImage indicates an expected call of RemoveImage func (mr *MockImageServiceMockRecorder) RemoveImage(image interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveImage", reflect.TypeOf((*MockImageService)(nil).RemoveImage), image) } -// MockAttacher is a mock of Attacher interface. +// ImageStats mocks base method +func (m *MockImageService) ImageStats() (*container.ImageStats, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ImageStats") + ret0, _ := ret[0].(*container.ImageStats) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ImageStats indicates an expected call of ImageStats +func (mr *MockImageServiceMockRecorder) ImageStats() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImageStats", reflect.TypeOf((*MockImageService)(nil).ImageStats)) +} + +// MockAttacher is a mock of Attacher interface type MockAttacher struct { ctrl *gomock.Controller recorder *MockAttacherMockRecorder } -// MockAttacherMockRecorder is the mock recorder for MockAttacher. +// MockAttacherMockRecorder is the mock recorder for MockAttacher type MockAttacherMockRecorder struct { mock *MockAttacher } -// NewMockAttacher creates a new mock instance. +// NewMockAttacher creates a new mock instance func NewMockAttacher(ctrl *gomock.Controller) *MockAttacher { mock := &MockAttacher{ctrl: ctrl} mock.recorder = &MockAttacherMockRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use. +// EXPECT returns an object that allows the caller to indicate expected use func (m *MockAttacher) EXPECT() *MockAttacherMockRecorder { return m.recorder } -// AttachContainer mocks base method. +// AttachContainer mocks base method func (m *MockAttacher) AttachContainer(id container.ContainerID, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AttachContainer", id, stdin, stdout, stderr, tty, resize) @@ -554,36 +567,36 @@ func (m *MockAttacher) AttachContainer(id container.ContainerID, stdin io.Reader return ret0 } -// AttachContainer indicates an expected call of AttachContainer. +// AttachContainer indicates an expected call of AttachContainer func (mr *MockAttacherMockRecorder) AttachContainer(id, stdin, stdout, stderr, tty, resize interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AttachContainer", reflect.TypeOf((*MockAttacher)(nil).AttachContainer), id, stdin, stdout, stderr, tty, resize) } -// MockCommandRunner is a mock of CommandRunner interface. +// MockCommandRunner is a mock of CommandRunner interface type MockCommandRunner struct { ctrl *gomock.Controller recorder *MockCommandRunnerMockRecorder } -// MockCommandRunnerMockRecorder is the mock recorder for MockCommandRunner. +// MockCommandRunnerMockRecorder is the mock recorder for MockCommandRunner type MockCommandRunnerMockRecorder struct { mock *MockCommandRunner } -// NewMockCommandRunner creates a new mock instance. +// NewMockCommandRunner creates a new mock instance func NewMockCommandRunner(ctrl *gomock.Controller) *MockCommandRunner { mock := &MockCommandRunner{ctrl: ctrl} mock.recorder = &MockCommandRunnerMockRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use. +// EXPECT returns an object that allows the caller to indicate expected use func (m *MockCommandRunner) EXPECT() *MockCommandRunnerMockRecorder { return m.recorder } -// RunInContainer mocks base method. +// RunInContainer mocks base method func (m *MockCommandRunner) RunInContainer(id container.ContainerID, cmd []string, timeout time.Duration) ([]byte, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "RunInContainer", id, cmd, timeout) @@ -592,7 +605,7 @@ func (m *MockCommandRunner) RunInContainer(id container.ContainerID, cmd []strin return ret0, ret1 } -// RunInContainer indicates an expected call of RunInContainer. +// RunInContainer indicates an expected call of RunInContainer func (mr *MockCommandRunnerMockRecorder) RunInContainer(id, cmd, timeout interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunInContainer", reflect.TypeOf((*MockCommandRunner)(nil).RunInContainer), id, cmd, timeout) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/OWNERS index 1d3d2227700a..b1e7523c7fcc 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/OWNERS @@ -1,4 +1,4 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - feiskyer +- feiskyer diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/conversion.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/conversion.go index 355393977558..de4a3cab49e2 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/conversion.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/conversion.go @@ -27,8 +27,8 @@ func fromV1alpha2VersionResponse(from *v1alpha2.VersionResponse) *runtimeapi.Ver return (*runtimeapi.VersionResponse)(unsafe.Pointer(from)) } -func fromV1alpha2PodSandboxStatusResponse(from *v1alpha2.PodSandboxStatusResponse) *runtimeapi.PodSandboxStatusResponse { - return (*runtimeapi.PodSandboxStatusResponse)(unsafe.Pointer(from)) +func fromV1alpha2PodSandboxStatus(from *v1alpha2.PodSandboxStatus) *runtimeapi.PodSandboxStatus { + return (*runtimeapi.PodSandboxStatus)(unsafe.Pointer(from)) } func fromV1alpha2ListPodSandboxResponse(from *v1alpha2.ListPodSandboxResponse) *runtimeapi.ListPodSandboxResponse { @@ -39,30 +39,30 @@ func fromV1alpha2ListContainersResponse(from *v1alpha2.ListContainersResponse) * return (*runtimeapi.ListContainersResponse)(unsafe.Pointer(from)) } -func fromV1alpha2ContainerStatusResponse(from *v1alpha2.ContainerStatusResponse) *runtimeapi.ContainerStatusResponse { - return (*runtimeapi.ContainerStatusResponse)(unsafe.Pointer(from)) +func fromV1alpha2ContainerStatus(from *v1alpha2.ContainerStatus) *runtimeapi.ContainerStatus { + return (*runtimeapi.ContainerStatus)(unsafe.Pointer(from)) } func fromV1alpha2ExecResponse(from *v1alpha2.ExecResponse) *runtimeapi.ExecResponse { - // If this function changes, also adapt the corresponding Exec code in - // pkg/kubelet/cri/remote/remote_runtime.go + // If this function changes, also adapt the corresponding Exec dockershim code in + // pkg/kubelet/dockershim/docker_streaming.go return (*runtimeapi.ExecResponse)(unsafe.Pointer(from)) } func fromV1alpha2AttachResponse(from *v1alpha2.AttachResponse) *runtimeapi.AttachResponse { - // If this function changes, also adapt the corresponding Attach code in - // pkg/kubelet/cri/remote/remote_runtime.go + // If this function changes, also adapt the corresponding Attach dockershim code in + // pkg/kubelet/dockershim/docker_streaming.go return (*runtimeapi.AttachResponse)(unsafe.Pointer(from)) } func fromV1alpha2PortForwardResponse(from *v1alpha2.PortForwardResponse) *runtimeapi.PortForwardResponse { - // If this function changes, also adapt the corresponding PortForward code in - // pkg/kubelet/cri/remote/remote_runtime.go + // If this function changes, also adapt the corresponding PortForward dockershim code in + // pkg/kubelet/dockershim/docker_streaming.go return (*runtimeapi.PortForwardResponse)(unsafe.Pointer(from)) } -func fromV1alpha2StatusResponse(from *v1alpha2.StatusResponse) *runtimeapi.StatusResponse { - return (*runtimeapi.StatusResponse)(unsafe.Pointer(from)) +func fromV1alpha2RuntimeStatus(from *v1alpha2.RuntimeStatus) *runtimeapi.RuntimeStatus { + return (*runtimeapi.RuntimeStatus)(unsafe.Pointer(from)) } func fromV1alpha2ContainerStats(from *v1alpha2.ContainerStats) *runtimeapi.ContainerStats { @@ -85,8 +85,8 @@ func fromV1alpha2ListPodSandboxStatsResponse(from *v1alpha2.ListPodSandboxStatsR return (*runtimeapi.ListPodSandboxStatsResponse)(unsafe.Pointer(from)) } -func fromV1alpha2ImageStatusResponse(from *v1alpha2.ImageStatusResponse) *runtimeapi.ImageStatusResponse { - return (*runtimeapi.ImageStatusResponse)(unsafe.Pointer(from)) +func fromV1alpha2Image(from *v1alpha2.Image) *runtimeapi.Image { + return (*runtimeapi.Image)(unsafe.Pointer(from)) } func fromV1alpha2ListImagesResponse(from *v1alpha2.ListImagesResponse) *runtimeapi.ListImagesResponse { @@ -114,20 +114,20 @@ func v1alpha2LinuxContainerResources(from *runtimeapi.LinuxContainerResources) * } func v1alpha2ExecRequest(from *runtimeapi.ExecRequest) *v1alpha2.ExecRequest { - // If this function changes, also adapt the corresponding Exec code in - // pkg/kubelet/cri/remote/remote_runtime.go + // If this function changes, also adapt the corresponding Exec dockershim code in + // pkg/kubelet/dockershim/docker_streaming.go return (*v1alpha2.ExecRequest)(unsafe.Pointer(from)) } func v1alpha2AttachRequest(from *runtimeapi.AttachRequest) *v1alpha2.AttachRequest { - // If this function changes, also adapt the corresponding Attach code in - // pkg/kubelet/cri/remote/remote_runtime.go + // If this function changes, also adapt the corresponding Attach dockershim code in + // pkg/kubelet/dockershim/docker_streaming.go return (*v1alpha2.AttachRequest)(unsafe.Pointer(from)) } func v1alpha2PortForwardRequest(from *runtimeapi.PortForwardRequest) *v1alpha2.PortForwardRequest { - // If this function changes, also adapt the corresponding PortForward code in - // pkg/kubelet/cri/remote/remote_runtime.go + // If this function changes, also adapt the corresponding PortForward dockershim code in + // pkg/kubelet/dockershim/docker_streaming.go return (*v1alpha2.PortForwardRequest)(unsafe.Pointer(from)) } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/remote_image.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/remote_image.go index 6a8912e8bcd7..851bca36ce9f 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/remote_image.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/remote_image.go @@ -137,7 +137,7 @@ func (r *remoteImageService) listImagesV1(ctx context.Context, filter *runtimeap } // ImageStatus returns the status of the image. -func (r *remoteImageService) ImageStatus(image *runtimeapi.ImageSpec, verbose bool) (*runtimeapi.ImageStatusResponse, error) { +func (r *remoteImageService) ImageStatus(image *runtimeapi.ImageSpec) (*runtimeapi.Image, error) { ctx, cancel := getContextWithTimeout(r.timeout) defer cancel() @@ -146,16 +146,15 @@ func (r *remoteImageService) ImageStatus(image *runtimeapi.ImageSpec, verbose bo // https://github.com/kubernetes/kubernetes/pull/104575/files#r705600987 // https://github.com/kubernetes/kubernetes/pull/104575/files#r696793706 if r.useV1API() { - return r.imageStatusV1(ctx, image, verbose) + return r.imageStatusV1(ctx, image) } - return r.imageStatusV1alpha2(ctx, image, verbose) + return r.imageStatusV1alpha2(ctx, image) } -func (r *remoteImageService) imageStatusV1alpha2(ctx context.Context, image *runtimeapi.ImageSpec, verbose bool) (*runtimeapi.ImageStatusResponse, error) { +func (r *remoteImageService) imageStatusV1alpha2(ctx context.Context, image *runtimeapi.ImageSpec) (*runtimeapi.Image, error) { resp, err := r.imageClientV1alpha2.ImageStatus(ctx, &runtimeapiV1alpha2.ImageStatusRequest{ - Image: v1alpha2ImageSpec(image), - Verbose: verbose, + Image: v1alpha2ImageSpec(image), }) if err != nil { klog.ErrorS(err, "Get ImageStatus from image service failed", "image", image.Image) @@ -171,13 +170,12 @@ func (r *remoteImageService) imageStatusV1alpha2(ctx context.Context, image *run } } - return fromV1alpha2ImageStatusResponse(resp), nil + return fromV1alpha2Image(resp.Image), nil } -func (r *remoteImageService) imageStatusV1(ctx context.Context, image *runtimeapi.ImageSpec, verbose bool) (*runtimeapi.ImageStatusResponse, error) { +func (r *remoteImageService) imageStatusV1(ctx context.Context, image *runtimeapi.ImageSpec) (*runtimeapi.Image, error) { resp, err := r.imageClient.ImageStatus(ctx, &runtimeapi.ImageStatusRequest{ - Image: image, - Verbose: verbose, + Image: image, }) if err != nil { klog.ErrorS(err, "Get ImageStatus from image service failed", "image", image.Image) @@ -193,7 +191,7 @@ func (r *remoteImageService) imageStatusV1(ctx context.Context, image *runtimeap } } - return resp, nil + return resp.Image, nil } // PullImage pulls an image with authentication config. diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/remote_runtime.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/remote_runtime.go index cd7b781e8c7b..00fc9f84002b 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/remote_runtime.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cri/remote/remote_runtime.go @@ -55,11 +55,8 @@ const ( // versions. type CRIVersion string -// ErrContainerStatusNil indicates that the returned container status is nil. -var ErrContainerStatusNil = errors.New("container status is nil") - const ( - // CRIVersionV1 references the v1 CRI API. + // APIVersionV1 references the v1 CRI API. CRIVersionV1 CRIVersion = "v1" // CRIVersionV1alpha2 references the v1alpha2 CRI API. @@ -281,22 +278,21 @@ func (r *remoteRuntimeService) RemovePodSandbox(podSandBoxID string) (err error) } // PodSandboxStatus returns the status of the PodSandbox. -func (r *remoteRuntimeService) PodSandboxStatus(podSandBoxID string, verbose bool) (*runtimeapi.PodSandboxStatusResponse, error) { +func (r *remoteRuntimeService) PodSandboxStatus(podSandBoxID string) (*runtimeapi.PodSandboxStatus, error) { klog.V(10).InfoS("[RemoteRuntimeService] PodSandboxStatus", "podSandboxID", podSandBoxID, "timeout", r.timeout) ctx, cancel := getContextWithTimeout(r.timeout) defer cancel() if r.useV1API() { - return r.podSandboxStatusV1(ctx, podSandBoxID, verbose) + return r.podSandboxStatusV1(ctx, podSandBoxID) } - return r.podSandboxStatusV1alpha2(ctx, podSandBoxID, verbose) + return r.podSandboxStatusV1alpha2(ctx, podSandBoxID) } -func (r *remoteRuntimeService) podSandboxStatusV1alpha2(ctx context.Context, podSandBoxID string, verbose bool) (*runtimeapi.PodSandboxStatusResponse, error) { +func (r *remoteRuntimeService) podSandboxStatusV1alpha2(ctx context.Context, podSandBoxID string) (*runtimeapi.PodSandboxStatus, error) { resp, err := r.runtimeClientV1alpha2.PodSandboxStatus(ctx, &runtimeapiV1alpha2.PodSandboxStatusRequest{ PodSandboxId: podSandBoxID, - Verbose: verbose, }) if err != nil { return nil, err @@ -304,20 +300,19 @@ func (r *remoteRuntimeService) podSandboxStatusV1alpha2(ctx context.Context, pod klog.V(10).InfoS("[RemoteRuntimeService] PodSandboxStatus Response", "podSandboxID", podSandBoxID, "status", resp.Status) - res := fromV1alpha2PodSandboxStatusResponse(resp) - if res.Status != nil { - if err := verifySandboxStatus(res.Status); err != nil { + status := fromV1alpha2PodSandboxStatus(resp.Status) + if resp.Status != nil { + if err := verifySandboxStatus(status); err != nil { return nil, err } } - return res, nil + return status, nil } -func (r *remoteRuntimeService) podSandboxStatusV1(ctx context.Context, podSandBoxID string, verbose bool) (*runtimeapi.PodSandboxStatusResponse, error) { +func (r *remoteRuntimeService) podSandboxStatusV1(ctx context.Context, podSandBoxID string) (*runtimeapi.PodSandboxStatus, error) { resp, err := r.runtimeClient.PodSandboxStatus(ctx, &runtimeapi.PodSandboxStatusRequest{ PodSandboxId: podSandBoxID, - Verbose: verbose, }) if err != nil { return nil, err @@ -332,7 +327,7 @@ func (r *remoteRuntimeService) podSandboxStatusV1(ctx context.Context, podSandBo } } - return resp, nil + return status, nil } // ListPodSandbox returns a list of PodSandboxes. @@ -555,22 +550,21 @@ func (r *remoteRuntimeService) listContainersV1(ctx context.Context, filter *run } // ContainerStatus returns the container status. -func (r *remoteRuntimeService) ContainerStatus(containerID string, verbose bool) (*runtimeapi.ContainerStatusResponse, error) { +func (r *remoteRuntimeService) ContainerStatus(containerID string) (*runtimeapi.ContainerStatus, error) { klog.V(10).InfoS("[RemoteRuntimeService] ContainerStatus", "containerID", containerID, "timeout", r.timeout) ctx, cancel := getContextWithTimeout(r.timeout) defer cancel() if r.useV1API() { - return r.containerStatusV1(ctx, containerID, verbose) + return r.containerStatusV1(ctx, containerID) } - return r.containerStatusV1alpha2(ctx, containerID, verbose) + return r.containerStatusV1alpha2(ctx, containerID) } -func (r *remoteRuntimeService) containerStatusV1alpha2(ctx context.Context, containerID string, verbose bool) (*runtimeapi.ContainerStatusResponse, error) { +func (r *remoteRuntimeService) containerStatusV1alpha2(ctx context.Context, containerID string) (*runtimeapi.ContainerStatus, error) { resp, err := r.runtimeClientV1alpha2.ContainerStatus(ctx, &runtimeapiV1alpha2.ContainerStatusRequest{ ContainerId: containerID, - Verbose: verbose, }) if err != nil { // Don't spam the log with endless messages about the same failure. @@ -582,21 +576,20 @@ func (r *remoteRuntimeService) containerStatusV1alpha2(ctx context.Context, cont r.logReduction.ClearID(containerID) klog.V(10).InfoS("[RemoteRuntimeService] ContainerStatus Response", "containerID", containerID, "status", resp.Status) - res := fromV1alpha2ContainerStatusResponse(resp) + status := fromV1alpha2ContainerStatus(resp.Status) if resp.Status != nil { - if err := verifyContainerStatus(res.Status); err != nil { + if err := verifyContainerStatus(status); err != nil { klog.ErrorS(err, "verify ContainerStatus failed", "containerID", containerID) return nil, err } } - return res, nil + return status, nil } -func (r *remoteRuntimeService) containerStatusV1(ctx context.Context, containerID string, verbose bool) (*runtimeapi.ContainerStatusResponse, error) { +func (r *remoteRuntimeService) containerStatusV1(ctx context.Context, containerID string) (*runtimeapi.ContainerStatus, error) { resp, err := r.runtimeClient.ContainerStatus(ctx, &runtimeapi.ContainerStatusRequest{ ContainerId: containerID, - Verbose: verbose, }) if err != nil { // Don't spam the log with endless messages about the same failure. @@ -616,7 +609,7 @@ func (r *remoteRuntimeService) containerStatusV1(ctx context.Context, containerI } } - return resp, nil + return status, nil } // UpdateContainerResources updates a containers resource config @@ -905,22 +898,20 @@ func (r *remoteRuntimeService) UpdateRuntimeConfig(runtimeConfig *runtimeapi.Run } // Status returns the status of the runtime. -func (r *remoteRuntimeService) Status(verbose bool) (*runtimeapi.StatusResponse, error) { +func (r *remoteRuntimeService) Status() (*runtimeapi.RuntimeStatus, error) { klog.V(10).InfoS("[RemoteRuntimeService] Status", "timeout", r.timeout) ctx, cancel := getContextWithTimeout(r.timeout) defer cancel() if r.useV1API() { - return r.statusV1(ctx, verbose) + return r.statusV1(ctx) } - return r.statusV1alpha2(ctx, verbose) + return r.statusV1alpha2(ctx) } -func (r *remoteRuntimeService) statusV1alpha2(ctx context.Context, verbose bool) (*runtimeapi.StatusResponse, error) { - resp, err := r.runtimeClientV1alpha2.Status(ctx, &runtimeapiV1alpha2.StatusRequest{ - Verbose: verbose, - }) +func (r *remoteRuntimeService) statusV1alpha2(ctx context.Context) (*runtimeapi.RuntimeStatus, error) { + resp, err := r.runtimeClientV1alpha2.Status(ctx, &runtimeapiV1alpha2.StatusRequest{}) if err != nil { klog.ErrorS(err, "Status from runtime service failed") return nil, err @@ -935,13 +926,11 @@ func (r *remoteRuntimeService) statusV1alpha2(ctx context.Context, verbose bool) return nil, err } - return fromV1alpha2StatusResponse(resp), nil + return fromV1alpha2RuntimeStatus(resp.Status), nil } -func (r *remoteRuntimeService) statusV1(ctx context.Context, verbose bool) (*runtimeapi.StatusResponse, error) { - resp, err := r.runtimeClient.Status(ctx, &runtimeapi.StatusRequest{ - Verbose: verbose, - }) +func (r *remoteRuntimeService) statusV1(ctx context.Context) (*runtimeapi.RuntimeStatus, error) { + resp, err := r.runtimeClient.Status(ctx, &runtimeapi.StatusRequest{}) if err != nil { klog.ErrorS(err, "Status from runtime service failed") return nil, err @@ -956,7 +945,7 @@ func (r *remoteRuntimeService) statusV1(ctx context.Context, verbose bool) (*run return nil, err } - return resp, nil + return resp.Status, nil } // ContainerStats returns the stats of the container. diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/request_cache.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/request_cache.go index 136f549311c0..f55cb24b7093 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/request_cache.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/cri/streaming/request_cache.go @@ -56,7 +56,7 @@ type requestCache struct { type request interface{} type cacheEntry struct { - token string `datapolicy:"token"` + token string req request expireTime time.Time } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger/signal.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/container_manager.go similarity index 68% rename from cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger/signal.go rename to cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/container_manager.go index df5c83cea0d0..f2255cd9ec06 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger/signal.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/container_manager.go @@ -1,8 +1,8 @@ -//go:build !windows -// +build !windows +//go:build !dockerless +// +build !dockerless /* -Copyright 2018 The Kubernetes Authors. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,10 +17,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -package debugger +package cm -import "syscall" - -// compareSignal is the signal to trigger cache compare. For non-windows -// environment it's SIGUSR2. -var compareSignal = syscall.SIGUSR2 +// ContainerManager is an interface that abstracts the basic operations of a +// container manager. +type ContainerManager interface { + Start() error +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/container_manager_linux.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/container_manager_linux.go new file mode 100644 index 000000000000..759e27f26c5f --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/container_manager_linux.go @@ -0,0 +1,158 @@ +//go:build linux && !dockerless +// +build linux,!dockerless + +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cm + +import ( + "fmt" + "io/ioutil" + "regexp" + "strconv" + "time" + + "github.com/opencontainers/runc/libcontainer/cgroups" + cgroupfs "github.com/opencontainers/runc/libcontainer/cgroups/fs" + "github.com/opencontainers/runc/libcontainer/configs" + utilversion "k8s.io/apimachinery/pkg/util/version" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/klog/v2" + kubecm "k8s.io/kubernetes/pkg/kubelet/cm" + + "k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker" +) + +const ( + // The percent of the machine memory capacity. The value is used to calculate + // docker memory resource container's hardlimit to workaround docker memory + // leakage issue. Please see kubernetes/issues/9881 for more detail. + dockerMemoryLimitThresholdPercent = 70 + + // The minimum memory limit allocated to docker container: 150Mi + minDockerMemoryLimit = 150 * 1024 * 1024 + + // The OOM score adjustment for the docker process (i.e. the docker + // daemon). Essentially, makes docker very unlikely to experience an oom + // kill. + dockerOOMScoreAdj = -999 +) + +var ( + memoryCapacityRegexp = regexp.MustCompile(`MemTotal:\s*([0-9]+) kB`) +) + +// NewContainerManager creates a new instance of ContainerManager +func NewContainerManager(cgroupsName string, client libdocker.Interface) ContainerManager { + return &containerManager{ + cgroupsName: cgroupsName, + client: client, + } +} + +type containerManager struct { + // Docker client. + client libdocker.Interface + // Name of the cgroups. + cgroupsName string + // Manager for the cgroups. + cgroupsManager cgroups.Manager +} + +func (m *containerManager) Start() error { + // TODO: check if the required cgroups are mounted. + if len(m.cgroupsName) != 0 { + manager, err := createCgroupManager(m.cgroupsName) + if err != nil { + return err + } + m.cgroupsManager = manager + } + go wait.Until(m.doWork, 5*time.Minute, wait.NeverStop) + return nil +} + +func (m *containerManager) doWork() { + v, err := m.client.Version() + if err != nil { + klog.ErrorS(err, "Unable to get docker version") + return + } + version, err := utilversion.ParseGeneric(v.APIVersion) + if err != nil { + klog.ErrorS(err, "Unable to parse docker version", "dockerVersion", v.APIVersion) + return + } + // EnsureDockerInContainer does two things. + // 1. Ensure processes run in the cgroups if m.cgroupsManager is not nil. + // 2. Ensure processes have the OOM score applied. + if err := kubecm.EnsureDockerInContainer(version, dockerOOMScoreAdj, m.cgroupsManager); err != nil { + klog.ErrorS(err, "Unable to ensure the docker processes run in the desired containers") + } +} + +func createCgroupManager(name string) (cgroups.Manager, error) { + var memoryLimit uint64 + + memoryCapacity, err := getMemoryCapacity() + if err != nil { + klog.ErrorS(err, "Failed to get the memory capacity on machine") + } else { + memoryLimit = memoryCapacity * dockerMemoryLimitThresholdPercent / 100 + } + + if err != nil || memoryLimit < minDockerMemoryLimit { + memoryLimit = minDockerMemoryLimit + } + klog.V(2).InfoS("Configure resource-only container with memory limit", "containerName", name, "memoryLimit", memoryLimit) + + cg := &configs.Cgroup{ + Parent: "/", + Name: name, + Resources: &configs.Resources{ + Memory: int64(memoryLimit), + MemorySwap: -1, + SkipDevices: true, + }, + } + return cgroupfs.NewManager(cg, nil, false), nil +} + +// getMemoryCapacity returns the memory capacity on the machine in bytes. +func getMemoryCapacity() (uint64, error) { + out, err := ioutil.ReadFile("/proc/meminfo") + if err != nil { + return 0, err + } + return parseCapacity(out, memoryCapacityRegexp) +} + +// parseCapacity matches a Regexp in a []byte, returning the resulting value in bytes. +// Assumes that the value matched by the Regexp is in KB. +func parseCapacity(b []byte, r *regexp.Regexp) (uint64, error) { + matches := r.FindSubmatch(b) + if len(matches) != 2 { + return 0, fmt.Errorf("failed to match regexp in output: %q", string(b)) + } + m, err := strconv.ParseUint(string(matches[1]), 10, 64) + if err != nil { + return 0, err + } + + // Convert to bytes. + return m * 1024, err +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/container_manager_unsupported.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/container_manager_unsupported.go new file mode 100644 index 000000000000..6c9bd3544468 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/container_manager_unsupported.go @@ -0,0 +1,38 @@ +//go:build !linux && !windows && !dockerless +// +build !linux,!windows,!dockerless + +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cm + +import ( + "fmt" + + "k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker" +) + +type unsupportedContainerManager struct { +} + +// NewContainerManager creates a new instance of ContainerManager +func NewContainerManager(_ string, _ libdocker.Interface) ContainerManager { + return &unsupportedContainerManager{} +} + +func (m *unsupportedContainerManager) Start() error { + return fmt.Errorf("Container Manager is unsupported in this build") +} diff --git a/cluster-autoscaler/vendor/k8s.io/client-go/openapi/cached/groupversion.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/container_manager_windows.go similarity index 54% rename from cluster-autoscaler/vendor/k8s.io/client-go/openapi/cached/groupversion.go rename to cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/container_manager_windows.go index ba78b048b518..135c20c15d61 100644 --- a/cluster-autoscaler/vendor/k8s.io/client-go/openapi/cached/groupversion.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/cm/container_manager_windows.go @@ -1,3 +1,6 @@ +//go:build windows && !dockerless +// +build windows,!dockerless + /* Copyright 2017 The Kubernetes Authors. @@ -14,32 +17,21 @@ See the License for the specific language governing permissions and limitations under the License. */ -package cached +package cm import ( - "sync" - - openapi_v3 "github.com/google/gnostic/openapiv3" - "k8s.io/client-go/openapi" + "k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker" ) -type groupversion struct { - delegate openapi.GroupVersion - once sync.Once - doc *openapi_v3.Document - err error +// no-op +type containerManager struct { } -func newGroupVersion(delegate openapi.GroupVersion) *groupversion { - return &groupversion{ - delegate: delegate, - } +// NewContainerManager creates a new instance of ContainerManager +func NewContainerManager(_ string, _ libdocker.Interface) ContainerManager { + return &containerManager{} } -func (g *groupversion) Schema() (*openapi_v3.Document, error) { - g.once.Do(func() { - g.doc, g.err = g.delegate.Schema() - }) - - return g.doc, g.err +func (m *containerManager) Start() error { + return nil } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/convert.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/convert.go new file mode 100644 index 000000000000..dcbe9d073335 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/convert.go @@ -0,0 +1,181 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dockershim + +import ( + "fmt" + "strings" + "time" + + dockertypes "github.com/docker/docker/api/types" + + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + "k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker" +) + +// This file contains helper functions to convert docker API types to runtime +// API types, or vice versa. + +func imageToRuntimeAPIImage(image *dockertypes.ImageSummary) (*runtimeapi.Image, error) { + if image == nil { + return nil, fmt.Errorf("unable to convert a nil pointer to a runtime API image") + } + + size := uint64(image.VirtualSize) + return &runtimeapi.Image{ + Id: image.ID, + RepoTags: image.RepoTags, + RepoDigests: image.RepoDigests, + Size_: size, + }, nil +} + +func imageInspectToRuntimeAPIImage(image *dockertypes.ImageInspect) (*runtimeapi.Image, error) { + if image == nil || image.Config == nil { + return nil, fmt.Errorf("unable to convert a nil pointer to a runtime API image") + } + + size := uint64(image.VirtualSize) + runtimeImage := &runtimeapi.Image{ + Id: image.ID, + RepoTags: image.RepoTags, + RepoDigests: image.RepoDigests, + Size_: size, + } + + uid, username := getUserFromImageUser(image.Config.User) + if uid != nil { + runtimeImage.Uid = &runtimeapi.Int64Value{Value: *uid} + } + runtimeImage.Username = username + return runtimeImage, nil +} + +func toPullableImageID(id string, image *dockertypes.ImageInspect) string { + // Default to the image ID, but if RepoDigests is not empty, use + // the first digest instead. + imageID := DockerImageIDPrefix + id + if image != nil && len(image.RepoDigests) > 0 { + imageID = DockerPullableImageIDPrefix + image.RepoDigests[0] + } + return imageID +} + +func toRuntimeAPIContainer(c *dockertypes.Container) (*runtimeapi.Container, error) { + state := toRuntimeAPIContainerState(c.Status) + if len(c.Names) == 0 { + return nil, fmt.Errorf("unexpected empty container name: %+v", c) + } + metadata, err := parseContainerName(c.Names[0]) + if err != nil { + return nil, err + } + labels, annotations := extractLabels(c.Labels) + sandboxID := c.Labels[sandboxIDLabelKey] + // The timestamp in dockertypes.Container is in seconds. + createdAt := c.Created * int64(time.Second) + return &runtimeapi.Container{ + Id: c.ID, + PodSandboxId: sandboxID, + Metadata: metadata, + Image: &runtimeapi.ImageSpec{Image: c.Image}, + ImageRef: c.ImageID, + State: state, + CreatedAt: createdAt, + Labels: labels, + Annotations: annotations, + }, nil +} + +func toDockerContainerStatus(state runtimeapi.ContainerState) string { + switch state { + case runtimeapi.ContainerState_CONTAINER_CREATED: + return "created" + case runtimeapi.ContainerState_CONTAINER_RUNNING: + return "running" + case runtimeapi.ContainerState_CONTAINER_EXITED: + return "exited" + case runtimeapi.ContainerState_CONTAINER_UNKNOWN: + fallthrough + default: + return "unknown" + } +} + +func toRuntimeAPIContainerState(state string) runtimeapi.ContainerState { + // Parse the state string in dockertypes.Container. This could break when + // we upgrade docker. + switch { + case strings.HasPrefix(state, libdocker.StatusRunningPrefix): + return runtimeapi.ContainerState_CONTAINER_RUNNING + case strings.HasPrefix(state, libdocker.StatusExitedPrefix): + return runtimeapi.ContainerState_CONTAINER_EXITED + case strings.HasPrefix(state, libdocker.StatusCreatedPrefix): + return runtimeapi.ContainerState_CONTAINER_CREATED + default: + return runtimeapi.ContainerState_CONTAINER_UNKNOWN + } +} + +func toRuntimeAPISandboxState(state string) runtimeapi.PodSandboxState { + // Parse the state string in dockertypes.Container. This could break when + // we upgrade docker. + switch { + case strings.HasPrefix(state, libdocker.StatusRunningPrefix): + return runtimeapi.PodSandboxState_SANDBOX_READY + default: + return runtimeapi.PodSandboxState_SANDBOX_NOTREADY + } +} + +func containerToRuntimeAPISandbox(c *dockertypes.Container) (*runtimeapi.PodSandbox, error) { + state := toRuntimeAPISandboxState(c.Status) + if len(c.Names) == 0 { + return nil, fmt.Errorf("unexpected empty sandbox name: %+v", c) + } + metadata, err := parseSandboxName(c.Names[0]) + if err != nil { + return nil, err + } + labels, annotations := extractLabels(c.Labels) + // The timestamp in dockertypes.Container is in seconds. + createdAt := c.Created * int64(time.Second) + return &runtimeapi.PodSandbox{ + Id: c.ID, + Metadata: metadata, + State: state, + CreatedAt: createdAt, + Labels: labels, + Annotations: annotations, + }, nil +} + +func checkpointToRuntimeAPISandbox(id string, checkpoint ContainerCheckpoint) *runtimeapi.PodSandbox { + state := runtimeapi.PodSandboxState_SANDBOX_NOTREADY + _, name, namespace, _, _ := checkpoint.GetData() + return &runtimeapi.PodSandbox{ + Id: id, + Metadata: &runtimeapi.PodSandboxMetadata{ + Name: name, + Namespace: namespace, + }, + State: state, + } +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/doc.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/doc.go new file mode 100644 index 000000000000..e630364b2a84 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/doc.go @@ -0,0 +1,22 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package dockershim implements a container runtime interface +// Docker integration using k8s.io/cri-api/pkg/apis/runtime/v1/api.pb.go +package dockershim diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_checkpoint.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_checkpoint.go new file mode 100644 index 000000000000..37ac73050be1 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_checkpoint.go @@ -0,0 +1,109 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dockershim + +import ( + "encoding/json" + + "k8s.io/kubernetes/pkg/kubelet/checkpointmanager" + "k8s.io/kubernetes/pkg/kubelet/checkpointmanager/checksum" +) + +const ( + // default directory to store pod sandbox checkpoint files + sandboxCheckpointDir = "sandbox" + protocolTCP = Protocol("tcp") + protocolUDP = Protocol("udp") + protocolSCTP = Protocol("sctp") + schemaVersion = "v1" +) + +// ContainerCheckpoint provides the interface for process container's checkpoint data +type ContainerCheckpoint interface { + checkpointmanager.Checkpoint + GetData() (string, string, string, []*PortMapping, bool) +} + +// Protocol is the type of port mapping protocol +type Protocol string + +// PortMapping is the port mapping configurations of a sandbox. +type PortMapping struct { + // Protocol of the port mapping. + Protocol *Protocol `json:"protocol,omitempty"` + // Port number within the container. + ContainerPort *int32 `json:"container_port,omitempty"` + // Port number on the host. + HostPort *int32 `json:"host_port,omitempty"` + // Host ip to expose. + HostIP string `json:"host_ip,omitempty"` +} + +// CheckpointData contains all types of data that can be stored in the checkpoint. +type CheckpointData struct { + PortMappings []*PortMapping `json:"port_mappings,omitempty"` + HostNetwork bool `json:"host_network,omitempty"` +} + +// PodSandboxCheckpoint is the checkpoint structure for a sandbox +type PodSandboxCheckpoint struct { + // Version of the pod sandbox checkpoint schema. + Version string `json:"version"` + // Pod name of the sandbox. Same as the pod name in the Pod ObjectMeta. + Name string `json:"name"` + // Pod namespace of the sandbox. Same as the pod namespace in the Pod ObjectMeta. + Namespace string `json:"namespace"` + // Data to checkpoint for pod sandbox. + Data *CheckpointData `json:"data,omitempty"` + // Checksum is calculated with fnv hash of the checkpoint object with checksum field set to be zero + Checksum checksum.Checksum `json:"checksum"` +} + +// NewPodSandboxCheckpoint inits a PodSandboxCheckpoint with the given args +func NewPodSandboxCheckpoint(namespace, name string, data *CheckpointData) ContainerCheckpoint { + return &PodSandboxCheckpoint{ + Version: schemaVersion, + Namespace: namespace, + Name: name, + Data: data, + } +} + +// MarshalCheckpoint encodes the PodSandboxCheckpoint instance to a json object +func (cp *PodSandboxCheckpoint) MarshalCheckpoint() ([]byte, error) { + cp.Checksum = checksum.New(*cp.Data) + return json.Marshal(*cp) +} + +// UnmarshalCheckpoint decodes the blob data to the PodSandboxCheckpoint instance +func (cp *PodSandboxCheckpoint) UnmarshalCheckpoint(blob []byte) error { + return json.Unmarshal(blob, cp) +} + +// VerifyChecksum verifies whether the PodSandboxCheckpoint's data checksum is +// the same as calculated checksum +func (cp *PodSandboxCheckpoint) VerifyChecksum() error { + return cp.Checksum.Verify(*cp.Data) +} + +// GetData gets the PodSandboxCheckpoint's version and some net information +func (cp *PodSandboxCheckpoint) GetData() (string, string, string, []*PortMapping, bool) { + return cp.Version, cp.Name, cp.Namespace, cp.Data.PortMappings, cp.Data.HostNetwork +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_container.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_container.go new file mode 100644 index 000000000000..8cc686d98851 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_container.go @@ -0,0 +1,508 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dockershim + +import ( + "context" + "fmt" + "os" + "path/filepath" + "time" + + dockertypes "github.com/docker/docker/api/types" + dockercontainer "github.com/docker/docker/api/types/container" + dockerfilters "github.com/docker/docker/api/types/filters" + dockerstrslice "github.com/docker/docker/api/types/strslice" + "k8s.io/klog/v2" + + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + "k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker" +) + +// ListContainers lists all containers matching the filter. +func (ds *dockerService) ListContainers(_ context.Context, r *runtimeapi.ListContainersRequest) (*runtimeapi.ListContainersResponse, error) { + filter := r.GetFilter() + opts := dockertypes.ContainerListOptions{All: true} + + opts.Filters = dockerfilters.NewArgs() + f := newDockerFilter(&opts.Filters) + // Add filter to get *only* (non-sandbox) containers. + f.AddLabel(containerTypeLabelKey, containerTypeLabelContainer) + + if filter != nil { + if filter.Id != "" { + f.Add("id", filter.Id) + } + if filter.State != nil { + f.Add("status", toDockerContainerStatus(filter.GetState().State)) + } + if filter.PodSandboxId != "" { + f.AddLabel(sandboxIDLabelKey, filter.PodSandboxId) + } + + if filter.LabelSelector != nil { + for k, v := range filter.LabelSelector { + f.AddLabel(k, v) + } + } + } + containers, err := ds.client.ListContainers(opts) + if err != nil { + return nil, err + } + // Convert docker to runtime api containers. + result := []*runtimeapi.Container{} + for i := range containers { + c := containers[i] + + converted, err := toRuntimeAPIContainer(&c) + if err != nil { + klog.V(4).InfoS("Unable to convert docker to runtime API container", "err", err) + continue + } + + result = append(result, converted) + } + + return &runtimeapi.ListContainersResponse{Containers: result}, nil +} + +func (ds *dockerService) getContainerCleanupInfo(containerID string) (*containerCleanupInfo, bool) { + ds.cleanupInfosLock.RLock() + defer ds.cleanupInfosLock.RUnlock() + info, ok := ds.containerCleanupInfos[containerID] + return info, ok +} + +func (ds *dockerService) setContainerCleanupInfo(containerID string, info *containerCleanupInfo) { + ds.cleanupInfosLock.Lock() + defer ds.cleanupInfosLock.Unlock() + ds.containerCleanupInfos[containerID] = info +} + +func (ds *dockerService) clearContainerCleanupInfo(containerID string) { + ds.cleanupInfosLock.Lock() + defer ds.cleanupInfosLock.Unlock() + delete(ds.containerCleanupInfos, containerID) +} + +// CreateContainer creates a new container in the given PodSandbox +// Docker cannot store the log to an arbitrary location (yet), so we create an +// symlink at LogPath, linking to the actual path of the log. +// TODO: check if the default values returned by the runtime API are ok. +func (ds *dockerService) CreateContainer(_ context.Context, r *runtimeapi.CreateContainerRequest) (*runtimeapi.CreateContainerResponse, error) { + podSandboxID := r.PodSandboxId + config := r.GetConfig() + sandboxConfig := r.GetSandboxConfig() + + if config == nil { + return nil, fmt.Errorf("container config is nil") + } + if sandboxConfig == nil { + return nil, fmt.Errorf("sandbox config is nil for container %q", config.Metadata.Name) + } + + labels := makeLabels(config.GetLabels(), config.GetAnnotations()) + // Apply a the container type label. + labels[containerTypeLabelKey] = containerTypeLabelContainer + // Write the container log path in the labels. + labels[containerLogPathLabelKey] = filepath.Join(sandboxConfig.LogDirectory, config.LogPath) + // Write the sandbox ID in the labels. + labels[sandboxIDLabelKey] = podSandboxID + + apiVersion, err := ds.getDockerAPIVersion() + if err != nil { + return nil, fmt.Errorf("unable to get the docker API version: %v", err) + } + + image := "" + if iSpec := config.GetImage(); iSpec != nil { + image = iSpec.Image + } + containerName := makeContainerName(sandboxConfig, config) + createConfig := dockertypes.ContainerCreateConfig{ + Name: containerName, + Config: &dockercontainer.Config{ + // TODO: set User. + Entrypoint: dockerstrslice.StrSlice(config.Command), + Cmd: dockerstrslice.StrSlice(config.Args), + Env: generateEnvList(config.GetEnvs()), + Image: image, + WorkingDir: config.WorkingDir, + Labels: labels, + // Interactive containers: + OpenStdin: config.Stdin, + StdinOnce: config.StdinOnce, + Tty: config.Tty, + // Disable Docker's health check until we officially support it + // (https://github.com/kubernetes/kubernetes/issues/25829). + Healthcheck: &dockercontainer.HealthConfig{ + Test: []string{"NONE"}, + }, + }, + HostConfig: &dockercontainer.HostConfig{ + Binds: generateMountBindings(config.GetMounts()), + RestartPolicy: dockercontainer.RestartPolicy{ + Name: "no", + }, + }, + } + + hc := createConfig.HostConfig + err = ds.updateCreateConfig(&createConfig, config, sandboxConfig, podSandboxID, securityOptSeparator, apiVersion) + if err != nil { + return nil, fmt.Errorf("failed to update container create config: %v", err) + } + // Set devices for container. + devices := make([]dockercontainer.DeviceMapping, len(config.Devices)) + for i, device := range config.Devices { + devices[i] = dockercontainer.DeviceMapping{ + PathOnHost: device.HostPath, + PathInContainer: device.ContainerPath, + CgroupPermissions: device.Permissions, + } + } + hc.Resources.Devices = devices + + //nolint:staticcheck // SA1019 backwards compatibility + securityOpts, err := ds.getSecurityOpts(config.GetLinux().GetSecurityContext().GetSeccompProfilePath(), securityOptSeparator) + if err != nil { + return nil, fmt.Errorf("failed to generate security options for container %q: %v", config.Metadata.Name, err) + } + + hc.SecurityOpt = append(hc.SecurityOpt, securityOpts...) + + cleanupInfo, err := ds.applyPlatformSpecificDockerConfig(r, &createConfig) + if err != nil { + return nil, err + } + + createResp, createErr := ds.client.CreateContainer(createConfig) + if createErr != nil { + createResp, createErr = recoverFromCreationConflictIfNeeded(ds.client, createConfig, createErr) + } + + if createResp != nil { + containerID := createResp.ID + + if cleanupInfo != nil { + // we don't perform the clean up just yet at that could destroy information + // needed for the container to start (e.g. Windows credentials stored in + // registry keys); instead, we'll clean up when the container gets removed + ds.setContainerCleanupInfo(containerID, cleanupInfo) + } + return &runtimeapi.CreateContainerResponse{ContainerId: containerID}, nil + } + + // the creation failed, let's clean up right away - we ignore any errors though, + // this is best effort + ds.performPlatformSpecificContainerCleanupAndLogErrors(containerName, cleanupInfo) + + return nil, createErr +} + +// getContainerLogPath returns the container log path specified by kubelet and the real +// path where docker stores the container log. +func (ds *dockerService) getContainerLogPath(containerID string) (string, string, error) { + info, err := ds.client.InspectContainer(containerID) + if err != nil { + return "", "", fmt.Errorf("failed to inspect container %q: %v", containerID, err) + } + return info.Config.Labels[containerLogPathLabelKey], info.LogPath, nil +} + +// createContainerLogSymlink creates the symlink for docker container log. +func (ds *dockerService) createContainerLogSymlink(containerID string) error { + path, realPath, err := ds.getContainerLogPath(containerID) + if err != nil { + return fmt.Errorf("failed to get container %q log path: %v", containerID, err) + } + + if path == "" { + klog.V(5).InfoS("Container log path isn't specified, will not create the symlink", "containerID", containerID) + return nil + } + + if realPath != "" { + // Only create the symlink when container log path is specified and log file exists. + // Delete possibly existing file first + if err = ds.os.Remove(path); err == nil { + klog.InfoS("Deleted previously existing symlink file", "path", path) + } + if err = ds.os.Symlink(realPath, path); err != nil { + return fmt.Errorf("failed to create symbolic link %q to the container log file %q for container %q: %v", + path, realPath, containerID, err) + } + } else { + supported, err := ds.IsCRISupportedLogDriver() + if err != nil { + klog.InfoS("Failed to check supported logging driver by CRI", "err", err) + return nil + } + + if supported { + klog.InfoS("Cannot create symbolic link because container log file doesn't exist!") + } else { + klog.V(5).InfoS("Unsupported logging driver by CRI") + } + } + + return nil +} + +// removeContainerLogSymlink removes the symlink for docker container log. +func (ds *dockerService) removeContainerLogSymlink(containerID string) error { + path, _, err := ds.getContainerLogPath(containerID) + if err != nil { + return fmt.Errorf("failed to get container %q log path: %v", containerID, err) + } + if path != "" { + // Only remove the symlink when container log path is specified. + err := ds.os.Remove(path) + if err != nil && !os.IsNotExist(err) { + return fmt.Errorf("failed to remove container %q log symlink %q: %v", containerID, path, err) + } + } + return nil +} + +// StartContainer starts the container. +func (ds *dockerService) StartContainer(_ context.Context, r *runtimeapi.StartContainerRequest) (*runtimeapi.StartContainerResponse, error) { + err := ds.client.StartContainer(r.ContainerId) + + // Create container log symlink for all containers (including failed ones). + if linkError := ds.createContainerLogSymlink(r.ContainerId); linkError != nil { + // Do not stop the container if we failed to create symlink because: + // 1. This is not a critical failure. + // 2. We don't have enough information to properly stop container here. + // Kubelet will surface this error to user via an event. + return nil, linkError + } + + if err != nil { + err = transformStartContainerError(err) + return nil, fmt.Errorf("failed to start container %q: %v", r.ContainerId, err) + } + + return &runtimeapi.StartContainerResponse{}, nil +} + +// StopContainer stops a running container with a grace period (i.e., timeout). +func (ds *dockerService) StopContainer(_ context.Context, r *runtimeapi.StopContainerRequest) (*runtimeapi.StopContainerResponse, error) { + err := ds.client.StopContainer(r.ContainerId, time.Duration(r.Timeout)*time.Second) + if err != nil { + return nil, err + } + return &runtimeapi.StopContainerResponse{}, nil +} + +// RemoveContainer removes the container. +func (ds *dockerService) RemoveContainer(_ context.Context, r *runtimeapi.RemoveContainerRequest) (*runtimeapi.RemoveContainerResponse, error) { + // Ideally, log lifecycle should be independent of container lifecycle. + // However, docker will remove container log after container is removed, + // we can't prevent that now, so we also clean up the symlink here. + err := ds.removeContainerLogSymlink(r.ContainerId) + if err != nil { + return nil, err + } + errors := ds.performPlatformSpecificContainerForContainer(r.ContainerId) + if len(errors) != 0 { + return nil, fmt.Errorf("failed to run platform-specific clean ups for container %q: %v", r.ContainerId, errors) + } + err = ds.client.RemoveContainer(r.ContainerId, dockertypes.ContainerRemoveOptions{RemoveVolumes: true, Force: true}) + if err != nil { + return nil, fmt.Errorf("failed to remove container %q: %v", r.ContainerId, err) + } + + return &runtimeapi.RemoveContainerResponse{}, nil +} + +func getContainerTimestamps(r *dockertypes.ContainerJSON) (time.Time, time.Time, time.Time, error) { + var createdAt, startedAt, finishedAt time.Time + var err error + + createdAt, err = libdocker.ParseDockerTimestamp(r.Created) + if err != nil { + return createdAt, startedAt, finishedAt, err + } + startedAt, err = libdocker.ParseDockerTimestamp(r.State.StartedAt) + if err != nil { + return createdAt, startedAt, finishedAt, err + } + finishedAt, err = libdocker.ParseDockerTimestamp(r.State.FinishedAt) + if err != nil { + return createdAt, startedAt, finishedAt, err + } + return createdAt, startedAt, finishedAt, nil +} + +// ContainerStatus inspects the docker container and returns the status. +func (ds *dockerService) ContainerStatus(_ context.Context, req *runtimeapi.ContainerStatusRequest) (*runtimeapi.ContainerStatusResponse, error) { + containerID := req.ContainerId + r, err := ds.client.InspectContainer(containerID) + if err != nil { + return nil, err + } + + // Parse the timestamps. + createdAt, startedAt, finishedAt, err := getContainerTimestamps(r) + if err != nil { + return nil, fmt.Errorf("failed to parse timestamp for container %q: %v", containerID, err) + } + + // Convert the image id to a pullable id. + ir, err := ds.client.InspectImageByID(r.Image) + if err != nil { + if !libdocker.IsImageNotFoundError(err) { + return nil, fmt.Errorf("unable to inspect docker image %q while inspecting docker container %q: %v", r.Image, containerID, err) + } + klog.InfoS("Ignore error image not found while inspecting docker container", "containerID", containerID, "image", r.Image, "err", err) + } + imageID := toPullableImageID(r.Image, ir) + + // Convert the mounts. + mounts := make([]*runtimeapi.Mount, 0, len(r.Mounts)) + for i := range r.Mounts { + m := r.Mounts[i] + readonly := !m.RW + mounts = append(mounts, &runtimeapi.Mount{ + HostPath: m.Source, + ContainerPath: m.Destination, + Readonly: readonly, + // Note: Can't set SeLinuxRelabel + }) + } + // Interpret container states and convert time to unix timestamps. + var state runtimeapi.ContainerState + var reason, message string + ct, st, ft := createdAt.UnixNano(), int64(0), int64(0) + if r.State.Running { + // Container is running. + state = runtimeapi.ContainerState_CONTAINER_RUNNING + // If container is not in the exited state, not set finished timestamp + st = startedAt.UnixNano() + } else { + // Container is *not* running. We need to get more details. + // * Case 1: container has run and exited with non-zero finishedAt + // time. + // * Case 2: container has failed to start; it has a zero finishedAt + // time, but a non-zero exit code. + // * Case 3: container has been created, but not started (yet). + if !finishedAt.IsZero() { // Case 1 + state = runtimeapi.ContainerState_CONTAINER_EXITED + st, ft = startedAt.UnixNano(), finishedAt.UnixNano() + switch { + case r.State.OOMKilled: + // TODO: consider exposing OOMKilled via the runtimeAPI. + // Note: if an application handles OOMKilled gracefully, the + // exit code could be zero. + reason = "OOMKilled" + case r.State.ExitCode == 0: + reason = "Completed" + default: + reason = "Error" + } + } else if r.State.ExitCode != 0 { // Case 2 + state = runtimeapi.ContainerState_CONTAINER_EXITED + // Adjust finished and started timestamp to createdAt time to avoid + // the confusion. + st, ft = createdAt.UnixNano(), createdAt.UnixNano() + reason = "ContainerCannotRun" + } else { // Case 3 + state = runtimeapi.ContainerState_CONTAINER_CREATED + } + message = r.State.Error + } + exitCode := int32(r.State.ExitCode) + + metadata, err := parseContainerName(r.Name) + if err != nil { + return nil, err + } + + labels, annotations := extractLabels(r.Config.Labels) + imageName := r.Config.Image + if ir != nil && len(ir.RepoTags) > 0 { + imageName = ir.RepoTags[0] + } + status := &runtimeapi.ContainerStatus{ + Id: r.ID, + Metadata: metadata, + Image: &runtimeapi.ImageSpec{Image: imageName}, + ImageRef: imageID, + Mounts: mounts, + ExitCode: exitCode, + State: state, + CreatedAt: ct, + StartedAt: st, + FinishedAt: ft, + Reason: reason, + Message: message, + Labels: labels, + Annotations: annotations, + LogPath: r.Config.Labels[containerLogPathLabelKey], + } + return &runtimeapi.ContainerStatusResponse{Status: status}, nil +} + +func (ds *dockerService) UpdateContainerResources(_ context.Context, r *runtimeapi.UpdateContainerResourcesRequest) (*runtimeapi.UpdateContainerResourcesResponse, error) { + resources := r.Linux + updateConfig := dockercontainer.UpdateConfig{ + Resources: dockercontainer.Resources{ + CPUPeriod: resources.CpuPeriod, + CPUQuota: resources.CpuQuota, + CPUShares: resources.CpuShares, + Memory: resources.MemoryLimitInBytes, + CpusetCpus: resources.CpusetCpus, + CpusetMems: resources.CpusetMems, + }, + } + + err := ds.client.UpdateContainerResources(r.ContainerId, updateConfig) + if err != nil { + return nil, fmt.Errorf("failed to update container %q: %v", r.ContainerId, err) + } + return &runtimeapi.UpdateContainerResourcesResponse{}, nil +} + +func (ds *dockerService) performPlatformSpecificContainerForContainer(containerID string) (errors []error) { + if cleanupInfo, present := ds.getContainerCleanupInfo(containerID); present { + errors = ds.performPlatformSpecificContainerCleanupAndLogErrors(containerID, cleanupInfo) + + if len(errors) == 0 { + ds.clearContainerCleanupInfo(containerID) + } + } + + return +} + +func (ds *dockerService) performPlatformSpecificContainerCleanupAndLogErrors(containerNameOrID string, cleanupInfo *containerCleanupInfo) []error { + if cleanupInfo == nil { + return nil + } + + errors := ds.performPlatformSpecificContainerCleanup(cleanupInfo) + for _, err := range errors { + klog.InfoS("Error when cleaning up after container", "containerNameOrID", containerNameOrID, "err", err) + } + + return errors +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_container_unsupported.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_container_unsupported.go new file mode 100644 index 000000000000..597002bbe4d3 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_container_unsupported.go @@ -0,0 +1,48 @@ +//go:build !windows && !dockerless +// +build !windows,!dockerless + +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dockershim + +import ( + dockertypes "github.com/docker/docker/api/types" + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" +) + +type containerCleanupInfo struct{} + +// applyPlatformSpecificDockerConfig applies platform-specific configurations to a dockertypes.ContainerCreateConfig struct. +// The containerCleanupInfo struct it returns will be passed as is to performPlatformSpecificContainerCleanup +// after either the container creation has failed or the container has been removed. +func (ds *dockerService) applyPlatformSpecificDockerConfig(*runtimeapi.CreateContainerRequest, *dockertypes.ContainerCreateConfig) (*containerCleanupInfo, error) { + return nil, nil +} + +// performPlatformSpecificContainerCleanup is responsible for doing any platform-specific cleanup +// after either the container creation has failed or the container has been removed. +func (ds *dockerService) performPlatformSpecificContainerCleanup(cleanupInfo *containerCleanupInfo) (errors []error) { + return +} + +// platformSpecificContainerInitCleanup is called when dockershim +// is starting, and is meant to clean up any cruft left by previous runs +// creating containers. +// Errors are simply logged, but don't prevent dockershim from starting. +func (ds *dockerService) platformSpecificContainerInitCleanup() (errors []error) { + return +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_container_windows.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_container_windows.go new file mode 100644 index 000000000000..e76b4fd30800 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_container_windows.go @@ -0,0 +1,218 @@ +//go:build windows && !dockerless +// +build windows,!dockerless + +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dockershim + +import ( + "crypto/rand" + "encoding/hex" + "fmt" + "regexp" + + "golang.org/x/sys/windows/registry" + + dockertypes "github.com/docker/docker/api/types" + dockercontainer "github.com/docker/docker/api/types/container" + + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" +) + +type containerCleanupInfo struct { + gMSARegistryValueName string +} + +// applyPlatformSpecificDockerConfig applies platform-specific configurations to a dockertypes.ContainerCreateConfig struct. +// The containerCleanupInfo struct it returns will be passed as is to performPlatformSpecificContainerCleanup +// after either the container creation has failed or the container has been removed. +func (ds *dockerService) applyPlatformSpecificDockerConfig(request *runtimeapi.CreateContainerRequest, createConfig *dockertypes.ContainerCreateConfig) (*containerCleanupInfo, error) { + cleanupInfo := &containerCleanupInfo{} + + if err := applyGMSAConfig(request.GetConfig(), createConfig, cleanupInfo); err != nil { + return nil, err + } + + return cleanupInfo, nil +} + +// applyGMSAConfig looks at the container's .Windows.SecurityContext.GMSACredentialSpec field; if present, +// it copies its contents to a unique registry value, and sets a SecurityOpt on the config pointing to that registry value. +// We use registry values instead of files since their location cannot change - as opposed to credential spec files, +// whose location could potentially change down the line, or even be unknown (eg if docker is not installed on the +// C: drive) +// When docker supports passing a credential spec's contents directly, we should switch to using that +// as it will avoid cluttering the registry - there is a moby PR out for this: +// https://github.com/moby/moby/pull/38777 +func applyGMSAConfig(config *runtimeapi.ContainerConfig, createConfig *dockertypes.ContainerCreateConfig, cleanupInfo *containerCleanupInfo) error { + var credSpec string + if config.Windows != nil && config.Windows.SecurityContext != nil { + credSpec = config.Windows.SecurityContext.CredentialSpec + } + if credSpec == "" { + return nil + } + + valueName, err := copyGMSACredSpecToRegistryValue(credSpec) + if err != nil { + return err + } + + if createConfig.HostConfig == nil { + createConfig.HostConfig = &dockercontainer.HostConfig{} + } + + createConfig.HostConfig.SecurityOpt = append(createConfig.HostConfig.SecurityOpt, "credentialspec=registry://"+valueName) + cleanupInfo.gMSARegistryValueName = valueName + + return nil +} + +const ( + // same as https://github.com/moby/moby/blob/93d994e29c9cc8d81f1b0477e28d705fa7e2cd72/daemon/oci_windows.go#L23 + credentialSpecRegistryLocation = `SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers\CredentialSpecs` + // the prefix for the registry values we write GMSA cred specs to + gMSARegistryValueNamePrefix = "k8s-cred-spec-" + // the number of random bytes to generate suffixes for registry value names + gMSARegistryValueNameSuffixRandomBytes = 40 +) + +// registryKey is an interface wrapper around `registry.Key`, +// listing only the methods we care about here. +// It's mainly useful to easily allow mocking the registry in tests. +type registryKey interface { + SetStringValue(name, value string) error + DeleteValue(name string) error + ReadValueNames(n int) ([]string, error) + Close() error +} + +var registryCreateKeyFunc = func(baseKey registry.Key, path string, access uint32) (registryKey, bool, error) { + return registry.CreateKey(baseKey, path, access) +} + +// randomReader is only meant to ever be overridden for testing purposes, +// same idea as for `registryKey` above +var randomReader = rand.Reader + +// gMSARegistryValueNamesRegex is the regex used to detect gMSA cred spec +// registry values in `removeAllGMSARegistryValues` below. +var gMSARegistryValueNamesRegex = regexp.MustCompile(fmt.Sprintf("^%s[0-9a-f]{%d}$", gMSARegistryValueNamePrefix, 2*gMSARegistryValueNameSuffixRandomBytes)) + +// copyGMSACredSpecToRegistryKey copies the credential specs to a unique registry value, and returns its name. +func copyGMSACredSpecToRegistryValue(credSpec string) (string, error) { + valueName, err := gMSARegistryValueName() + if err != nil { + return "", err + } + + // write to the registry + key, _, err := registryCreateKeyFunc(registry.LOCAL_MACHINE, credentialSpecRegistryLocation, registry.SET_VALUE) + if err != nil { + return "", fmt.Errorf("unable to open registry key %q: %v", credentialSpecRegistryLocation, err) + } + defer key.Close() + if err = key.SetStringValue(valueName, credSpec); err != nil { + return "", fmt.Errorf("unable to write into registry value %q/%q: %v", credentialSpecRegistryLocation, valueName, err) + } + + return valueName, nil +} + +// gMSARegistryValueName computes the name of the registry value where to store the GMSA cred spec contents. +// The value's name is a purely random suffix appended to `gMSARegistryValueNamePrefix`. +func gMSARegistryValueName() (string, error) { + randomSuffix, err := randomString(gMSARegistryValueNameSuffixRandomBytes) + + if err != nil { + return "", fmt.Errorf("error when generating gMSA registry value name: %v", err) + } + + return gMSARegistryValueNamePrefix + randomSuffix, nil +} + +// randomString returns a random hex string. +func randomString(length int) (string, error) { + randBytes := make([]byte, length) + + if n, err := randomReader.Read(randBytes); err != nil || n != length { + if err == nil { + err = fmt.Errorf("only got %v random bytes, expected %v", n, length) + } + return "", fmt.Errorf("unable to generate random string: %v", err) + } + + return hex.EncodeToString(randBytes), nil +} + +// performPlatformSpecificContainerCleanup is responsible for doing any platform-specific cleanup +// after either the container creation has failed or the container has been removed. +func (ds *dockerService) performPlatformSpecificContainerCleanup(cleanupInfo *containerCleanupInfo) (errors []error) { + if err := removeGMSARegistryValue(cleanupInfo); err != nil { + errors = append(errors, err) + } + + return +} + +func removeGMSARegistryValue(cleanupInfo *containerCleanupInfo) error { + if cleanupInfo == nil || cleanupInfo.gMSARegistryValueName == "" { + return nil + } + + key, _, err := registryCreateKeyFunc(registry.LOCAL_MACHINE, credentialSpecRegistryLocation, registry.SET_VALUE) + if err != nil { + return fmt.Errorf("unable to open registry key %q: %v", credentialSpecRegistryLocation, err) + } + defer key.Close() + if err = key.DeleteValue(cleanupInfo.gMSARegistryValueName); err != nil { + return fmt.Errorf("unable to remove registry value %q/%q: %v", credentialSpecRegistryLocation, cleanupInfo.gMSARegistryValueName, err) + } + + return nil +} + +// platformSpecificContainerInitCleanup is called when dockershim +// is starting, and is meant to clean up any cruft left by previous runs +// creating containers. +// Errors are simply logged, but don't prevent dockershim from starting. +func (ds *dockerService) platformSpecificContainerInitCleanup() (errors []error) { + return removeAllGMSARegistryValues() +} + +func removeAllGMSARegistryValues() (errors []error) { + key, _, err := registryCreateKeyFunc(registry.LOCAL_MACHINE, credentialSpecRegistryLocation, registry.SET_VALUE) + if err != nil { + return []error{fmt.Errorf("unable to open registry key %q: %v", credentialSpecRegistryLocation, err)} + } + defer key.Close() + + valueNames, err := key.ReadValueNames(0) + if err != nil { + return []error{fmt.Errorf("unable to list values under registry key %q: %v", credentialSpecRegistryLocation, err)} + } + + for _, valueName := range valueNames { + if gMSARegistryValueNamesRegex.MatchString(valueName) { + if err = key.DeleteValue(valueName); err != nil { + errors = append(errors, fmt.Errorf("unable to remove registry value %q/%q: %v", credentialSpecRegistryLocation, valueName, err)) + } + } + } + + return +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image.go new file mode 100644 index 000000000000..1982adedbd09 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image.go @@ -0,0 +1,192 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dockershim + +import ( + "context" + "fmt" + "net/http" + + dockertypes "github.com/docker/docker/api/types" + dockerfilters "github.com/docker/docker/api/types/filters" + "github.com/docker/docker/pkg/jsonmessage" + + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + "k8s.io/klog/v2" + "k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker" +) + +// This file implements methods in ImageManagerService. + +// ListImages lists existing images. +func (ds *dockerService) ListImages(_ context.Context, r *runtimeapi.ListImagesRequest) (*runtimeapi.ListImagesResponse, error) { + filter := r.GetFilter() + opts := dockertypes.ImageListOptions{} + if filter != nil { + if filter.GetImage().GetImage() != "" { + opts.Filters = dockerfilters.NewArgs() + opts.Filters.Add("reference", filter.GetImage().GetImage()) + } + } + + images, err := ds.client.ListImages(opts) + if err != nil { + return nil, err + } + + result := make([]*runtimeapi.Image, 0, len(images)) + for _, i := range images { + apiImage, err := imageToRuntimeAPIImage(&i) + if err != nil { + klog.V(5).InfoS("Failed to convert docker API image to runtime API image", "image", i, "err", err) + continue + } + result = append(result, apiImage) + } + return &runtimeapi.ListImagesResponse{Images: result}, nil +} + +// ImageStatus returns the status of the image, returns nil if the image doesn't present. +func (ds *dockerService) ImageStatus(_ context.Context, r *runtimeapi.ImageStatusRequest) (*runtimeapi.ImageStatusResponse, error) { + image := r.GetImage() + + imageInspect, err := ds.client.InspectImageByRef(image.Image) + if err != nil { + if !libdocker.IsImageNotFoundError(err) { + return nil, err + } + imageInspect, err = ds.client.InspectImageByID(image.Image) + if err != nil { + if libdocker.IsImageNotFoundError(err) { + return &runtimeapi.ImageStatusResponse{}, nil + } + return nil, err + } + } + + imageStatus, err := imageInspectToRuntimeAPIImage(imageInspect) + if err != nil { + return nil, err + } + + res := runtimeapi.ImageStatusResponse{Image: imageStatus} + if r.GetVerbose() { + res.Info = imageInspect.Config.Labels + } + return &res, nil +} + +// PullImage pulls an image with authentication config. +func (ds *dockerService) PullImage(_ context.Context, r *runtimeapi.PullImageRequest) (*runtimeapi.PullImageResponse, error) { + image := r.GetImage() + auth := r.GetAuth() + authConfig := dockertypes.AuthConfig{} + + if auth != nil { + authConfig.Username = auth.Username + authConfig.Password = auth.Password + authConfig.ServerAddress = auth.ServerAddress + authConfig.IdentityToken = auth.IdentityToken + authConfig.RegistryToken = auth.RegistryToken + } + err := ds.client.PullImage(image.Image, + authConfig, + dockertypes.ImagePullOptions{}, + ) + if err != nil { + return nil, filterHTTPError(err, image.Image) + } + + imageRef, err := getImageRef(ds.client, image.Image) + if err != nil { + return nil, err + } + + return &runtimeapi.PullImageResponse{ImageRef: imageRef}, nil +} + +// RemoveImage removes the image. +func (ds *dockerService) RemoveImage(_ context.Context, r *runtimeapi.RemoveImageRequest) (*runtimeapi.RemoveImageResponse, error) { + image := r.GetImage() + // If the image has multiple tags, we need to remove all the tags + // TODO: We assume image.Image is image ID here, which is true in the current implementation + // of kubelet, but we should still clarify this in CRI. + imageInspect, err := ds.client.InspectImageByID(image.Image) + + // dockerclient.InspectImageByID doesn't work with digest and repoTags, + // it is safe to continue removing it since there is another check below. + if err != nil && !libdocker.IsImageNotFoundError(err) { + return nil, err + } + + if imageInspect == nil { + // image is nil, assuming it doesn't exist. + return &runtimeapi.RemoveImageResponse{}, nil + } + + // An image can have different numbers of RepoTags and RepoDigests. + // Iterating over both of them plus the image ID ensures the image really got removed. + // It also prevents images from being deleted, which actually are deletable using this approach. + var images []string + images = append(images, imageInspect.RepoTags...) + images = append(images, imageInspect.RepoDigests...) + images = append(images, image.Image) + + for _, image := range images { + if _, err := ds.client.RemoveImage(image, dockertypes.ImageRemoveOptions{PruneChildren: true}); err != nil && !libdocker.IsImageNotFoundError(err) { + return nil, err + } + } + + return &runtimeapi.RemoveImageResponse{}, nil +} + +// getImageRef returns the image digest if exists, or else returns the image ID. +func getImageRef(client libdocker.Interface, image string) (string, error) { + img, err := client.InspectImageByRef(image) + if err != nil { + return "", err + } + if img == nil { + return "", fmt.Errorf("unable to inspect image %s", image) + } + + // Returns the digest if it exist. + if len(img.RepoDigests) > 0 { + return img.RepoDigests[0], nil + } + + return img.ID, nil +} + +func filterHTTPError(err error, image string) error { + // docker/docker/pull/11314 prints detailed error info for docker pull. + // When it hits 502, it returns a verbose html output including an inline svg, + // which makes the output of kubectl get pods much harder to parse. + // Here converts such verbose output to a concise one. + jerr, ok := err.(*jsonmessage.JSONError) + if ok && (jerr.Code == http.StatusBadGateway || + jerr.Code == http.StatusServiceUnavailable || + jerr.Code == http.StatusGatewayTimeout) { + return fmt.Errorf("RegistryUnavailable: %v", err) + } + return err + +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image_linux.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image_linux.go new file mode 100644 index 000000000000..ecd695d65dbf --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image_linux.go @@ -0,0 +1,70 @@ +//go:build linux && !dockerless +// +build linux,!dockerless + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dockershim + +import ( + "context" + "os" + "path/filepath" + "time" + + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" +) + +// ImageFsInfo returns information of the filesystem that is used to store images. +func (ds *dockerService) ImageFsInfo(_ context.Context, _ *runtimeapi.ImageFsInfoRequest) (*runtimeapi.ImageFsInfoResponse, error) { + bytes, inodes, err := dirSize(filepath.Join(ds.dockerRootDir, "image")) + if err != nil { + return nil, err + } + + return &runtimeapi.ImageFsInfoResponse{ + ImageFilesystems: []*runtimeapi.FilesystemUsage{ + { + Timestamp: time.Now().Unix(), + FsId: &runtimeapi.FilesystemIdentifier{ + Mountpoint: ds.dockerRootDir, + }, + UsedBytes: &runtimeapi.UInt64Value{ + Value: uint64(bytes), + }, + InodesUsed: &runtimeapi.UInt64Value{ + Value: uint64(inodes), + }, + }, + }, + }, nil +} + +func dirSize(path string) (int64, int64, error) { + bytes := int64(0) + inodes := int64(0) + err := filepath.Walk(path, func(dir string, info os.FileInfo, err error) error { + if err != nil { + return err + } + inodes++ + if !info.IsDir() { + bytes += info.Size() + } + return nil + }) + return bytes, inodes, err +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image_unsupported.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image_unsupported.go new file mode 100644 index 000000000000..02420213e54a --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image_unsupported.go @@ -0,0 +1,32 @@ +//go:build !linux && !windows && !dockerless +// +build !linux,!windows,!dockerless + +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dockershim + +import ( + "context" + "fmt" + + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" +) + +// ImageFsInfo returns information of the filesystem that is used to store images. +func (ds *dockerService) ImageFsInfo(_ context.Context, r *runtimeapi.ImageFsInfoRequest) (*runtimeapi.ImageFsInfoResponse, error) { + return nil, fmt.Errorf("not implemented") +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image_windows.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image_windows.go new file mode 100644 index 000000000000..ad617116677c --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_image_windows.go @@ -0,0 +1,52 @@ +//go:build windows && !dockerless +// +build windows,!dockerless + +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dockershim + +import ( + "context" + "time" + + "k8s.io/klog/v2" + + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + "k8s.io/kubernetes/pkg/kubelet/winstats" +) + +// ImageFsInfo returns information of the filesystem that is used to store images. +func (ds *dockerService) ImageFsInfo(_ context.Context, _ *runtimeapi.ImageFsInfoRequest) (*runtimeapi.ImageFsInfoResponse, error) { + statsClient := &winstats.StatsClient{} + fsinfo, err := statsClient.GetDirFsInfo(ds.dockerRootDir) + if err != nil { + klog.ErrorS(err, "Failed to get fsInfo for dockerRootDir", "path", ds.dockerRootDir) + return nil, err + } + + filesystems := []*runtimeapi.FilesystemUsage{ + { + Timestamp: time.Now().UnixNano(), + UsedBytes: &runtimeapi.UInt64Value{Value: fsinfo.Usage}, + FsId: &runtimeapi.FilesystemIdentifier{ + Mountpoint: ds.dockerRootDir, + }, + }, + } + + return &runtimeapi.ImageFsInfoResponse{ImageFilesystems: filesystems}, nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_legacy_service.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_legacy_service.go new file mode 100644 index 000000000000..b2b6529ad9fb --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_legacy_service.go @@ -0,0 +1,132 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dockershim + +import ( + "context" + "errors" + "fmt" + "io" + "strconv" + "time" + + "github.com/armon/circbuf" + dockertypes "github.com/docker/docker/api/types" + + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + kubetypes "k8s.io/apimachinery/pkg/types" + "k8s.io/klog/v2" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + + "k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker" +) + +// We define `DockerLegacyService` in `pkg/kubelet/legacy`, instead of in this +// file. We make this decision because `pkg/kubelet` depends on +// `DockerLegacyService`, and we want to be able to build the `kubelet` without +// relying on `github.com/docker/docker` or `pkg/kubelet/dockershim`. +// +// See https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/1547-building-kubelet-without-docker/README.md +// for details. + +// GetContainerLogs get container logs directly from docker daemon. +func (d *dockerService) GetContainerLogs(_ context.Context, pod *v1.Pod, containerID kubecontainer.ContainerID, logOptions *v1.PodLogOptions, stdout, stderr io.Writer) error { + container, err := d.client.InspectContainer(containerID.ID) + if err != nil { + return err + } + + var since int64 + if logOptions.SinceSeconds != nil { + t := metav1.Now().Add(-time.Duration(*logOptions.SinceSeconds) * time.Second) + since = t.Unix() + } + if logOptions.SinceTime != nil { + since = logOptions.SinceTime.Unix() + } + opts := dockertypes.ContainerLogsOptions{ + ShowStdout: true, + ShowStderr: true, + Since: strconv.FormatInt(since, 10), + Timestamps: logOptions.Timestamps, + Follow: logOptions.Follow, + } + if logOptions.TailLines != nil { + opts.Tail = strconv.FormatInt(*logOptions.TailLines, 10) + } + + if logOptions.LimitBytes != nil { + // stdout and stderr share the total write limit + max := *logOptions.LimitBytes + stderr = sharedLimitWriter(stderr, &max) + stdout = sharedLimitWriter(stdout, &max) + } + sopts := libdocker.StreamOptions{ + OutputStream: stdout, + ErrorStream: stderr, + RawTerminal: container.Config.Tty, + } + err = d.client.Logs(containerID.ID, opts, sopts) + if errors.Is(err, errMaximumWrite) { + klog.V(2).InfoS("Finished logs, hit byte limit", "byteLimit", *logOptions.LimitBytes) + err = nil + } + return err +} + +// GetContainerLogTail attempts to read up to MaxContainerTerminationMessageLogLength +// from the end of the log when docker is configured with a log driver other than json-log. +// It reads up to MaxContainerTerminationMessageLogLines lines. +func (d *dockerService) GetContainerLogTail(uid kubetypes.UID, name, namespace string, containerID kubecontainer.ContainerID) (string, error) { + value := int64(kubecontainer.MaxContainerTerminationMessageLogLines) + buf, _ := circbuf.NewBuffer(kubecontainer.MaxContainerTerminationMessageLogLength) + // Although this is not a full spec pod, dockerLegacyService.GetContainerLogs() currently completely ignores its pod param + pod := &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + UID: uid, + Name: name, + Namespace: namespace, + }, + } + err := d.GetContainerLogs(context.Background(), pod, containerID, &v1.PodLogOptions{TailLines: &value}, buf, buf) + if err != nil { + return "", err + } + return buf.String(), nil +} + +// criSupportedLogDrivers are log drivers supported by native CRI integration. +var criSupportedLogDrivers = []string{"json-file"} + +// IsCRISupportedLogDriver checks whether the logging driver used by docker is +// supported by native CRI integration. +func (d *dockerService) IsCRISupportedLogDriver() (bool, error) { + info, err := d.client.Info() + if err != nil { + return false, fmt.Errorf("failed to get docker info: %v", err) + } + for _, driver := range criSupportedLogDrivers { + if info.LoggingDriver == driver { + return true, nil + } + } + return false, nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_logs.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_logs.go new file mode 100644 index 000000000000..d68903ef15c0 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_logs.go @@ -0,0 +1,32 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dockershim + +import ( + "context" + "fmt" + + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" +) + +// ReopenContainerLog reopens the container log file. +func (ds *dockerService) ReopenContainerLog(_ context.Context, _ *runtimeapi.ReopenContainerLogRequest) (*runtimeapi.ReopenContainerLogResponse, error) { + return nil, fmt.Errorf("docker does not support reopening container log files") +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_sandbox.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_sandbox.go new file mode 100644 index 000000000000..8914786a91d8 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_sandbox.go @@ -0,0 +1,773 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dockershim + +import ( + "context" + "encoding/json" + "fmt" + "os" + "strings" + "time" + + dockertypes "github.com/docker/docker/api/types" + dockercontainer "github.com/docker/docker/api/types/container" + dockerfilters "github.com/docker/docker/api/types/filters" + utilerrors "k8s.io/apimachinery/pkg/util/errors" + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + "k8s.io/klog/v2" + "k8s.io/kubernetes/pkg/kubelet/checkpointmanager" + "k8s.io/kubernetes/pkg/kubelet/checkpointmanager/errors" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + "k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker" + "k8s.io/kubernetes/pkg/kubelet/types" +) + +const ( + defaultSandboxImage = "k8s.gcr.io/pause:3.6" + + // Various default sandbox resources requests/limits. + defaultSandboxCPUshares int64 = 2 + + // defaultSandboxOOMAdj is the oom score adjustment for the docker + // sandbox container. Using this OOM adj makes it very unlikely, but not + // impossible, that the defaultSandox will experience an oom kill. -998 + // is chosen to signify sandbox should be OOM killed before other more + // vital processes like the docker daemon, the kubelet, etc... + defaultSandboxOOMAdj int = -998 + + // Name of the underlying container runtime + runtimeName = "docker" +) + +var ( + // Termination grace period + defaultSandboxGracePeriod = time.Duration(10) * time.Second +) + +// Returns whether the sandbox network is ready, and whether the sandbox is known +func (ds *dockerService) getNetworkReady(podSandboxID string) (bool, bool) { + ds.networkReadyLock.Lock() + defer ds.networkReadyLock.Unlock() + ready, ok := ds.networkReady[podSandboxID] + return ready, ok +} + +func (ds *dockerService) setNetworkReady(podSandboxID string, ready bool) { + ds.networkReadyLock.Lock() + defer ds.networkReadyLock.Unlock() + ds.networkReady[podSandboxID] = ready +} + +func (ds *dockerService) clearNetworkReady(podSandboxID string) { + ds.networkReadyLock.Lock() + defer ds.networkReadyLock.Unlock() + delete(ds.networkReady, podSandboxID) +} + +// RunPodSandbox creates and starts a pod-level sandbox. Runtimes should ensure +// the sandbox is in ready state. +// For docker, PodSandbox is implemented by a container holding the network +// namespace for the pod. +// Note: docker doesn't use LogDirectory (yet). +func (ds *dockerService) RunPodSandbox(ctx context.Context, r *runtimeapi.RunPodSandboxRequest) (*runtimeapi.RunPodSandboxResponse, error) { + config := r.GetConfig() + + // Step 1: Pull the image for the sandbox. + image := defaultSandboxImage + podSandboxImage := ds.podSandboxImage + if len(podSandboxImage) != 0 { + image = podSandboxImage + } + + // NOTE: To use a custom sandbox image in a private repository, users need to configure the nodes with credentials properly. + // see: https://kubernetes.io/docs/user-guide/images/#configuring-nodes-to-authenticate-to-a-private-registry + // Only pull sandbox image when it's not present - v1.PullIfNotPresent. + if err := ensureSandboxImageExists(ds.client, image); err != nil { + return nil, err + } + + // Step 2: Create the sandbox container. + if r.GetRuntimeHandler() != "" && r.GetRuntimeHandler() != runtimeName { + return nil, fmt.Errorf("RuntimeHandler %q not supported", r.GetRuntimeHandler()) + } + createConfig, err := ds.makeSandboxDockerConfig(config, image) + if err != nil { + return nil, fmt.Errorf("failed to make sandbox docker config for pod %q: %v", config.Metadata.Name, err) + } + createResp, err := ds.client.CreateContainer(*createConfig) + if err != nil { + createResp, err = recoverFromCreationConflictIfNeeded(ds.client, *createConfig, err) + } + + if err != nil || createResp == nil { + return nil, fmt.Errorf("failed to create a sandbox for pod %q: %v", config.Metadata.Name, err) + } + resp := &runtimeapi.RunPodSandboxResponse{PodSandboxId: createResp.ID} + + ds.setNetworkReady(createResp.ID, false) + defer func(e *error) { + // Set networking ready depending on the error return of + // the parent function + if *e == nil { + ds.setNetworkReady(createResp.ID, true) + } + }(&err) + + // Step 3: Create Sandbox Checkpoint. + if err = ds.checkpointManager.CreateCheckpoint(createResp.ID, constructPodSandboxCheckpoint(config)); err != nil { + return nil, err + } + + // Step 4: Start the sandbox container. + // Assume kubelet's garbage collector would remove the sandbox later, if + // startContainer failed. + err = ds.client.StartContainer(createResp.ID) + if err != nil { + return nil, fmt.Errorf("failed to start sandbox container for pod %q: %v", config.Metadata.Name, err) + } + + // Rewrite resolv.conf file generated by docker. + // NOTE: cluster dns settings aren't passed anymore to docker api in all cases, + // not only for pods with host network: the resolver conf will be overwritten + // after sandbox creation to override docker's behaviour. This resolv.conf + // file is shared by all containers of the same pod, and needs to be modified + // only once per pod. + if dnsConfig := config.GetDnsConfig(); dnsConfig != nil { + containerInfo, err := ds.client.InspectContainer(createResp.ID) + if err != nil { + return nil, fmt.Errorf("failed to inspect sandbox container for pod %q: %v", config.Metadata.Name, err) + } + + if err := rewriteResolvFile(containerInfo.ResolvConfPath, dnsConfig.Servers, dnsConfig.Searches, dnsConfig.Options); err != nil { + return nil, fmt.Errorf("rewrite resolv.conf failed for pod %q: %v", config.Metadata.Name, err) + } + } + + // Do not invoke network plugins if in hostNetwork mode. + if config.GetLinux().GetSecurityContext().GetNamespaceOptions().GetNetwork() == runtimeapi.NamespaceMode_NODE { + return resp, nil + } + + // Step 5: Setup networking for the sandbox. + // All pod networking is setup by a CNI plugin discovered at startup time. + // This plugin assigns the pod ip, sets up routes inside the sandbox, + // creates interfaces etc. In theory, its jurisdiction ends with pod + // sandbox networking, but it might insert iptables rules or open ports + // on the host as well, to satisfy parts of the pod spec that aren't + // recognized by the CNI standard yet. + cID := kubecontainer.BuildContainerID(runtimeName, createResp.ID) + networkOptions := make(map[string]string) + if dnsConfig := config.GetDnsConfig(); dnsConfig != nil { + // Build DNS options. + dnsOption, err := json.Marshal(dnsConfig) + if err != nil { + return nil, fmt.Errorf("failed to marshal dns config for pod %q: %v", config.Metadata.Name, err) + } + networkOptions["dns"] = string(dnsOption) + } + err = ds.network.SetUpPod(config.GetMetadata().Namespace, config.GetMetadata().Name, cID, config.Annotations, networkOptions) + if err != nil { + errList := []error{fmt.Errorf("failed to set up sandbox container %q network for pod %q: %v", createResp.ID, config.Metadata.Name, err)} + + // Ensure network resources are cleaned up even if the plugin + // succeeded but an error happened between that success and here. + err = ds.network.TearDownPod(config.GetMetadata().Namespace, config.GetMetadata().Name, cID) + if err != nil { + errList = append(errList, fmt.Errorf("failed to clean up sandbox container %q network for pod %q: %v", createResp.ID, config.Metadata.Name, err)) + } + + err = ds.client.StopContainer(createResp.ID, defaultSandboxGracePeriod) + if err != nil { + errList = append(errList, fmt.Errorf("failed to stop sandbox container %q for pod %q: %v", createResp.ID, config.Metadata.Name, err)) + } + + return resp, utilerrors.NewAggregate(errList) + } + + return resp, nil +} + +// StopPodSandbox stops the sandbox. If there are any running containers in the +// sandbox, they should be force terminated. +// TODO: This function blocks sandbox teardown on networking teardown. Is it +// better to cut our losses assuming an out of band GC routine will cleanup +// after us? +func (ds *dockerService) StopPodSandbox(ctx context.Context, r *runtimeapi.StopPodSandboxRequest) (*runtimeapi.StopPodSandboxResponse, error) { + var namespace, name string + var hostNetwork bool + + podSandboxID := r.PodSandboxId + resp := &runtimeapi.StopPodSandboxResponse{} + + // Try to retrieve minimal sandbox information from docker daemon or sandbox checkpoint. + inspectResult, metadata, statusErr := ds.getPodSandboxDetails(podSandboxID) + if statusErr == nil { + namespace = metadata.Namespace + name = metadata.Name + hostNetwork = (networkNamespaceMode(inspectResult) == runtimeapi.NamespaceMode_NODE) + } else { + checkpoint := NewPodSandboxCheckpoint("", "", &CheckpointData{}) + checkpointErr := ds.checkpointManager.GetCheckpoint(podSandboxID, checkpoint) + + // Proceed if both sandbox container and checkpoint could not be found. This means that following + // actions will only have sandbox ID and not have pod namespace and name information. + // Return error if encounter any unexpected error. + if checkpointErr != nil { + if checkpointErr != errors.ErrCheckpointNotFound { + err := ds.checkpointManager.RemoveCheckpoint(podSandboxID) + if err != nil { + klog.ErrorS(err, "Failed to delete corrupt checkpoint for sandbox", "podSandboxID", podSandboxID) + } + } + if libdocker.IsContainerNotFoundError(statusErr) { + klog.InfoS("Both sandbox container and checkpoint could not be found. Proceed without further sandbox information.", "podSandboxID", podSandboxID) + } else { + return nil, utilerrors.NewAggregate([]error{ + fmt.Errorf("failed to get checkpoint for sandbox %q: %v", podSandboxID, checkpointErr), + fmt.Errorf("failed to get sandbox status: %v", statusErr)}) + } + } else { + _, name, namespace, _, hostNetwork = checkpoint.GetData() + } + } + + // WARNING: The following operations made the following assumption: + // 1. kubelet will retry on any error returned by StopPodSandbox. + // 2. tearing down network and stopping sandbox container can succeed in any sequence. + // This depends on the implementation detail of network plugin and proper error handling. + // For kubenet, if tearing down network failed and sandbox container is stopped, kubelet + // will retry. On retry, kubenet will not be able to retrieve network namespace of the sandbox + // since it is stopped. With empty network namespace, CNI bridge plugin will conduct best + // effort clean up and will not return error. + errList := []error{} + ready, ok := ds.getNetworkReady(podSandboxID) + if !hostNetwork && (ready || !ok) { + // Only tear down the pod network if we haven't done so already + cID := kubecontainer.BuildContainerID(runtimeName, podSandboxID) + err := ds.network.TearDownPod(namespace, name, cID) + if err == nil { + ds.setNetworkReady(podSandboxID, false) + } else { + errList = append(errList, err) + } + } + if err := ds.client.StopContainer(podSandboxID, defaultSandboxGracePeriod); err != nil { + // Do not return error if the container does not exist + if !libdocker.IsContainerNotFoundError(err) { + klog.ErrorS(err, "Failed to stop sandbox", "podSandboxID", podSandboxID) + errList = append(errList, err) + } else { + // remove the checkpoint for any sandbox that is not found in the runtime + ds.checkpointManager.RemoveCheckpoint(podSandboxID) + } + } + + if len(errList) == 0 { + return resp, nil + } + + // TODO: Stop all running containers in the sandbox. + return nil, utilerrors.NewAggregate(errList) +} + +// RemovePodSandbox removes the sandbox. If there are running containers in the +// sandbox, they should be forcibly removed. +func (ds *dockerService) RemovePodSandbox(ctx context.Context, r *runtimeapi.RemovePodSandboxRequest) (*runtimeapi.RemovePodSandboxResponse, error) { + podSandboxID := r.PodSandboxId + var errs []error + + opts := dockertypes.ContainerListOptions{All: true} + + opts.Filters = dockerfilters.NewArgs() + f := newDockerFilter(&opts.Filters) + f.AddLabel(sandboxIDLabelKey, podSandboxID) + + containers, err := ds.client.ListContainers(opts) + if err != nil { + errs = append(errs, err) + } + + // Remove all containers in the sandbox. + for i := range containers { + if _, err := ds.RemoveContainer(ctx, &runtimeapi.RemoveContainerRequest{ContainerId: containers[i].ID}); err != nil && !libdocker.IsContainerNotFoundError(err) { + errs = append(errs, err) + } + } + + // Remove the sandbox container. + err = ds.client.RemoveContainer(podSandboxID, dockertypes.ContainerRemoveOptions{RemoveVolumes: true, Force: true}) + if err == nil || libdocker.IsContainerNotFoundError(err) { + // Only clear network ready when the sandbox has actually been + // removed from docker or doesn't exist + ds.clearNetworkReady(podSandboxID) + } else { + errs = append(errs, err) + } + + // Remove the checkpoint of the sandbox. + if err := ds.checkpointManager.RemoveCheckpoint(podSandboxID); err != nil { + errs = append(errs, err) + } + if len(errs) == 0 { + return &runtimeapi.RemovePodSandboxResponse{}, nil + } + return nil, utilerrors.NewAggregate(errs) +} + +// getIPsFromPlugin interrogates the network plugin for sandbox IPs. +func (ds *dockerService) getIPsFromPlugin(sandbox *dockertypes.ContainerJSON) ([]string, error) { + metadata, err := parseSandboxName(sandbox.Name) + if err != nil { + return nil, err + } + msg := fmt.Sprintf("Couldn't find network status for %s/%s through plugin", metadata.Namespace, metadata.Name) + cID := kubecontainer.BuildContainerID(runtimeName, sandbox.ID) + networkStatus, err := ds.network.GetPodNetworkStatus(metadata.Namespace, metadata.Name, cID) + if err != nil { + return nil, err + } + if networkStatus == nil { + return nil, fmt.Errorf("%v: invalid network status for", msg) + } + + ips := make([]string, 0) + for _, ip := range networkStatus.IPs { + ips = append(ips, ip.String()) + } + // if we don't have any ip in our list then cni is using classic primary IP only + if len(ips) == 0 { + ips = append(ips, networkStatus.IP.String()) + } + return ips, nil +} + +// getIPs returns the ip given the output of `docker inspect` on a pod sandbox, +// first interrogating any registered plugins, then simply trusting the ip +// in the sandbox itself. We look for an ipv4 address before ipv6. +func (ds *dockerService) getIPs(podSandboxID string, sandbox *dockertypes.ContainerJSON) []string { + if sandbox.NetworkSettings == nil { + return nil + } + if networkNamespaceMode(sandbox) == runtimeapi.NamespaceMode_NODE { + // For sandboxes using host network, the shim is not responsible for + // reporting the IP. + return nil + } + + // Don't bother getting IP if the pod is known and networking isn't ready + ready, ok := ds.getNetworkReady(podSandboxID) + if ok && !ready { + return nil + } + + ips, err := ds.getIPsFromPlugin(sandbox) + if err == nil { + return ips + } + + ips = make([]string, 0) + // TODO: trusting the docker ip is not a great idea. However docker uses + // eth0 by default and so does CNI, so if we find a docker IP here, we + // conclude that the plugin must have failed setup, or forgotten its ip. + // This is not a sensible assumption for plugins across the board, but if + // a plugin doesn't want this behavior, it can throw an error. + if sandbox.NetworkSettings.IPAddress != "" { + ips = append(ips, sandbox.NetworkSettings.IPAddress) + } + if sandbox.NetworkSettings.GlobalIPv6Address != "" { + ips = append(ips, sandbox.NetworkSettings.GlobalIPv6Address) + } + + // If all else fails, warn but don't return an error, as pod status + // should generally not return anything except fatal errors + // FIXME: handle network errors by restarting the pod somehow? + klog.InfoS("Failed to read pod IP from plugin/docker", "err", err) + return ips +} + +// Returns the inspect container response, the sandbox metadata, and network namespace mode +func (ds *dockerService) getPodSandboxDetails(podSandboxID string) (*dockertypes.ContainerJSON, *runtimeapi.PodSandboxMetadata, error) { + resp, err := ds.client.InspectContainer(podSandboxID) + if err != nil { + return nil, nil, err + } + + metadata, err := parseSandboxName(resp.Name) + if err != nil { + return nil, nil, err + } + + return resp, metadata, nil +} + +// PodSandboxStatus returns the status of the PodSandbox. +func (ds *dockerService) PodSandboxStatus(ctx context.Context, req *runtimeapi.PodSandboxStatusRequest) (*runtimeapi.PodSandboxStatusResponse, error) { + podSandboxID := req.PodSandboxId + + r, metadata, err := ds.getPodSandboxDetails(podSandboxID) + if err != nil { + return nil, err + } + + // Parse the timestamps. + createdAt, _, _, err := getContainerTimestamps(r) + if err != nil { + return nil, fmt.Errorf("failed to parse timestamp for container %q: %v", podSandboxID, err) + } + ct := createdAt.UnixNano() + + // Translate container to sandbox state. + state := runtimeapi.PodSandboxState_SANDBOX_NOTREADY + if r.State.Running { + state = runtimeapi.PodSandboxState_SANDBOX_READY + } + + var ips []string + // TODO: Remove this when sandbox is available on windows + // This is a workaround for windows, where sandbox is not in use, and pod IP is determined through containers belonging to the Pod. + if ips = ds.determinePodIPBySandboxID(podSandboxID); len(ips) == 0 { + ips = ds.getIPs(podSandboxID, r) + } + + // ip is primary ips + // ips is all other ips + ip := "" + if len(ips) != 0 { + ip = ips[0] + ips = ips[1:] + } + + labels, annotations := extractLabels(r.Config.Labels) + status := &runtimeapi.PodSandboxStatus{ + Id: r.ID, + State: state, + CreatedAt: ct, + Metadata: metadata, + Labels: labels, + Annotations: annotations, + Network: &runtimeapi.PodSandboxNetworkStatus{ + Ip: ip, + }, + Linux: &runtimeapi.LinuxPodSandboxStatus{ + Namespaces: &runtimeapi.Namespace{ + Options: &runtimeapi.NamespaceOption{ + Network: networkNamespaceMode(r), + Pid: pidNamespaceMode(r), + Ipc: ipcNamespaceMode(r), + }, + }, + }, + } + // add additional IPs + additionalPodIPs := make([]*runtimeapi.PodIP, 0, len(ips)) + for _, ip := range ips { + additionalPodIPs = append(additionalPodIPs, &runtimeapi.PodIP{ + Ip: ip, + }) + } + status.Network.AdditionalIps = additionalPodIPs + return &runtimeapi.PodSandboxStatusResponse{Status: status}, nil +} + +// ListPodSandbox returns a list of Sandbox. +func (ds *dockerService) ListPodSandbox(_ context.Context, r *runtimeapi.ListPodSandboxRequest) (*runtimeapi.ListPodSandboxResponse, error) { + filter := r.GetFilter() + + // By default, list all containers whether they are running or not. + opts := dockertypes.ContainerListOptions{All: true} + filterOutReadySandboxes := false + + opts.Filters = dockerfilters.NewArgs() + f := newDockerFilter(&opts.Filters) + // Add filter to select only sandbox containers. + f.AddLabel(containerTypeLabelKey, containerTypeLabelSandbox) + + if filter != nil { + if filter.Id != "" { + f.Add("id", filter.Id) + } + if filter.State != nil { + if filter.GetState().State == runtimeapi.PodSandboxState_SANDBOX_READY { + // Only list running containers. + opts.All = false + } else { + // runtimeapi.PodSandboxState_SANDBOX_NOTREADY can mean the + // container is in any of the non-running state (e.g., created, + // exited). We can't tell docker to filter out running + // containers directly, so we'll need to filter them out + // ourselves after getting the results. + filterOutReadySandboxes = true + } + } + + if filter.LabelSelector != nil { + for k, v := range filter.LabelSelector { + f.AddLabel(k, v) + } + } + } + + // Make sure we get the list of checkpoints first so that we don't include + // new PodSandboxes that are being created right now. + var err error + checkpoints := []string{} + if filter == nil { + checkpoints, err = ds.checkpointManager.ListCheckpoints() + if err != nil { + klog.ErrorS(err, "Failed to list checkpoints") + } + } + + containers, err := ds.client.ListContainers(opts) + if err != nil { + return nil, err + } + + // Convert docker containers to runtime api sandboxes. + result := []*runtimeapi.PodSandbox{} + // using map as set + sandboxIDs := make(map[string]bool) + for i := range containers { + c := containers[i] + converted, err := containerToRuntimeAPISandbox(&c) + if err != nil { + klog.V(4).InfoS("Unable to convert docker to runtime API sandbox", "containerName", c.Names, "err", err) + continue + } + if filterOutReadySandboxes && converted.State == runtimeapi.PodSandboxState_SANDBOX_READY { + continue + } + sandboxIDs[converted.Id] = true + result = append(result, converted) + } + + // Include sandbox that could only be found with its checkpoint if no filter is applied + // These PodSandbox will only include PodSandboxID, Name, Namespace. + // These PodSandbox will be in PodSandboxState_SANDBOX_NOTREADY state. + for _, id := range checkpoints { + if _, ok := sandboxIDs[id]; ok { + continue + } + checkpoint := NewPodSandboxCheckpoint("", "", &CheckpointData{}) + err := ds.checkpointManager.GetCheckpoint(id, checkpoint) + if err != nil { + klog.ErrorS(err, "Failed to retrieve checkpoint for sandbox", "sandboxID", id) + if err == errors.ErrCorruptCheckpoint { + err = ds.checkpointManager.RemoveCheckpoint(id) + if err != nil { + klog.ErrorS(err, "Failed to delete corrupt checkpoint for sandbox", "sandboxID", id) + } + } + continue + } + result = append(result, checkpointToRuntimeAPISandbox(id, checkpoint)) + } + + return &runtimeapi.ListPodSandboxResponse{Items: result}, nil +} + +// applySandboxLinuxOptions applies LinuxPodSandboxConfig to dockercontainer.HostConfig and dockercontainer.ContainerCreateConfig. +func (ds *dockerService) applySandboxLinuxOptions(hc *dockercontainer.HostConfig, lc *runtimeapi.LinuxPodSandboxConfig, createConfig *dockertypes.ContainerCreateConfig, image string, separator rune) error { + if lc == nil { + return nil + } + // Apply security context. + if err := applySandboxSecurityContext(lc, createConfig.Config, hc, ds.network, separator); err != nil { + return err + } + + // Set sysctls. + hc.Sysctls = lc.Sysctls + return nil +} + +func (ds *dockerService) applySandboxResources(hc *dockercontainer.HostConfig, lc *runtimeapi.LinuxPodSandboxConfig) error { + hc.Resources = dockercontainer.Resources{ + MemorySwap: DefaultMemorySwap(), + CPUShares: defaultSandboxCPUshares, + // Use docker's default cpu quota/period. + } + + if lc != nil { + // Apply Cgroup options. + cgroupParent, err := ds.GenerateExpectedCgroupParent(lc.CgroupParent) + if err != nil { + return err + } + hc.CgroupParent = cgroupParent + } + return nil +} + +// makeSandboxDockerConfig returns dockertypes.ContainerCreateConfig based on runtimeapi.PodSandboxConfig. +func (ds *dockerService) makeSandboxDockerConfig(c *runtimeapi.PodSandboxConfig, image string) (*dockertypes.ContainerCreateConfig, error) { + // Merge annotations and labels because docker supports only labels. + labels := makeLabels(c.GetLabels(), c.GetAnnotations()) + // Apply a label to distinguish sandboxes from regular containers. + labels[containerTypeLabelKey] = containerTypeLabelSandbox + // Apply a container name label for infra container. This is used in summary v1. + // TODO(random-liu): Deprecate this label once container metrics is directly got from CRI. + labels[types.KubernetesContainerNameLabel] = sandboxContainerName + + hc := &dockercontainer.HostConfig{ + IpcMode: dockercontainer.IpcMode("shareable"), + } + createConfig := &dockertypes.ContainerCreateConfig{ + Name: makeSandboxName(c), + Config: &dockercontainer.Config{ + Hostname: c.Hostname, + // TODO: Handle environment variables. + Image: image, + Labels: labels, + }, + HostConfig: hc, + } + + // Apply linux-specific options. + if err := ds.applySandboxLinuxOptions(hc, c.GetLinux(), createConfig, image, securityOptSeparator); err != nil { + return nil, err + } + + // Set port mappings. + exposedPorts, portBindings := makePortsAndBindings(c.GetPortMappings()) + createConfig.Config.ExposedPorts = exposedPorts + hc.PortBindings = portBindings + + hc.OomScoreAdj = defaultSandboxOOMAdj + + // Apply resource options. + if err := ds.applySandboxResources(hc, c.GetLinux()); err != nil { + return nil, err + } + + // Set security options. + securityOpts := ds.getSandBoxSecurityOpts(securityOptSeparator) + hc.SecurityOpt = append(hc.SecurityOpt, securityOpts...) + + return createConfig, nil +} + +// networkNamespaceMode returns the network runtimeapi.NamespaceMode for this container. +// Supports: POD, NODE +func networkNamespaceMode(container *dockertypes.ContainerJSON) runtimeapi.NamespaceMode { + if container != nil && container.HostConfig != nil && string(container.HostConfig.NetworkMode) == namespaceModeHost { + return runtimeapi.NamespaceMode_NODE + } + return runtimeapi.NamespaceMode_POD +} + +// pidNamespaceMode returns the PID runtimeapi.NamespaceMode for this container. +// Supports: CONTAINER, NODE +// TODO(verb): add support for POD PID namespace sharing +func pidNamespaceMode(container *dockertypes.ContainerJSON) runtimeapi.NamespaceMode { + if container != nil && container.HostConfig != nil && string(container.HostConfig.PidMode) == namespaceModeHost { + return runtimeapi.NamespaceMode_NODE + } + return runtimeapi.NamespaceMode_CONTAINER +} + +// ipcNamespaceMode returns the IPC runtimeapi.NamespaceMode for this container. +// Supports: POD, NODE +func ipcNamespaceMode(container *dockertypes.ContainerJSON) runtimeapi.NamespaceMode { + if container != nil && container.HostConfig != nil && string(container.HostConfig.IpcMode) == namespaceModeHost { + return runtimeapi.NamespaceMode_NODE + } + return runtimeapi.NamespaceMode_POD +} + +func constructPodSandboxCheckpoint(config *runtimeapi.PodSandboxConfig) checkpointmanager.Checkpoint { + data := CheckpointData{} + for _, pm := range config.GetPortMappings() { + proto := toCheckpointProtocol(pm.Protocol) + data.PortMappings = append(data.PortMappings, &PortMapping{ + HostPort: &pm.HostPort, + ContainerPort: &pm.ContainerPort, + Protocol: &proto, + HostIP: pm.HostIp, + }) + } + if config.GetLinux().GetSecurityContext().GetNamespaceOptions().GetNetwork() == runtimeapi.NamespaceMode_NODE { + data.HostNetwork = true + } + return NewPodSandboxCheckpoint(config.Metadata.Namespace, config.Metadata.Name, &data) +} + +func toCheckpointProtocol(protocol runtimeapi.Protocol) Protocol { + switch protocol { + case runtimeapi.Protocol_TCP: + return protocolTCP + case runtimeapi.Protocol_UDP: + return protocolUDP + case runtimeapi.Protocol_SCTP: + return protocolSCTP + } + klog.InfoS("Unknown protocol, defaulting to TCP", "protocol", protocol) + return protocolTCP +} + +// rewriteResolvFile rewrites resolv.conf file generated by docker. +func rewriteResolvFile(resolvFilePath string, dns []string, dnsSearch []string, dnsOptions []string) error { + if len(resolvFilePath) == 0 { + klog.ErrorS(nil, "ResolvConfPath is empty.") + return nil + } + + if _, err := os.Stat(resolvFilePath); os.IsNotExist(err) { + return fmt.Errorf("ResolvConfPath %q does not exist", resolvFilePath) + } + + var resolvFileContent []string + for _, srv := range dns { + resolvFileContent = append(resolvFileContent, "nameserver "+srv) + } + + if len(dnsSearch) > 0 { + resolvFileContent = append(resolvFileContent, "search "+strings.Join(dnsSearch, " ")) + } + + if len(dnsOptions) > 0 { + resolvFileContent = append(resolvFileContent, "options "+strings.Join(dnsOptions, " ")) + } + + if len(resolvFileContent) > 0 { + resolvFileContentStr := strings.Join(resolvFileContent, "\n") + resolvFileContentStr += "\n" + + klog.V(4).InfoS("Will attempt to re-write config file", "path", resolvFilePath, "fileContent", resolvFileContent) + if err := rewriteFile(resolvFilePath, resolvFileContentStr); err != nil { + klog.ErrorS(err, "Resolv.conf could not be updated") + return err + } + } + + return nil +} + +func rewriteFile(filePath, stringToWrite string) error { + f, err := os.OpenFile(filePath, os.O_TRUNC|os.O_WRONLY, 0644) + if err != nil { + return err + } + defer f.Close() + + _, err = f.WriteString(stringToWrite) + return err +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_service.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_service.go new file mode 100644 index 000000000000..c6ad4aed011d --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_service.go @@ -0,0 +1,579 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dockershim + +import ( + "context" + "fmt" + "net/http" + "os" + "path" + "path/filepath" + "runtime" + "sync" + "time" + + "github.com/blang/semver" + dockertypes "github.com/docker/docker/api/types" + "k8s.io/klog/v2" + + v1 "k8s.io/api/core/v1" + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + kubeletconfig "k8s.io/kubernetes/pkg/kubelet/apis/config" + "k8s.io/kubernetes/pkg/kubelet/checkpointmanager" + "k8s.io/kubernetes/pkg/kubelet/checkpointmanager/errors" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + "k8s.io/kubernetes/pkg/kubelet/cri/streaming" + "k8s.io/kubernetes/pkg/kubelet/dockershim/cm" + "k8s.io/kubernetes/pkg/kubelet/dockershim/network" + "k8s.io/kubernetes/pkg/kubelet/dockershim/network/cni" + "k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport" + "k8s.io/kubernetes/pkg/kubelet/dockershim/network/kubenet" + "k8s.io/kubernetes/pkg/kubelet/legacy" + "k8s.io/kubernetes/pkg/kubelet/util/cache" + + "k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker" + "k8s.io/kubernetes/pkg/kubelet/dockershim/metrics" +) + +const ( + dockerRuntimeName = "docker" + kubeAPIVersion = "0.1.0" + + // String used to detect docker host mode for various namespaces (e.g. + // networking). Must match the value returned by docker inspect -f + // '{{.HostConfig.NetworkMode}}'. + namespaceModeHost = "host" + + dockerNetNSFmt = "/proc/%v/ns/net" + + // Internal docker labels used to identify whether a container is a sandbox + // or a regular container. + // TODO: This is not backward compatible with older containers. We will + // need to add filtering based on names. + containerTypeLabelKey = "io.kubernetes.docker.type" + containerTypeLabelSandbox = "podsandbox" + containerTypeLabelContainer = "container" + containerLogPathLabelKey = "io.kubernetes.container.logpath" + sandboxIDLabelKey = "io.kubernetes.sandbox.id" + + // The expiration time of version cache. + versionCacheTTL = 60 * time.Second + + defaultCgroupDriver = "cgroupfs" + + // TODO: https://github.com/kubernetes/kubernetes/pull/31169 provides experimental + // defaulting of host user namespace that may be enabled when the docker daemon + // is using remapped UIDs. + // Dockershim should provide detection support for a remapping environment . + // This should be included in the feature proposal. Defaulting may still occur according + // to kubelet behavior and system settings in addition to any API flags that may be introduced. +) + +// CRIService includes all methods necessary for a CRI server. +type CRIService interface { + runtimeapi.RuntimeServiceServer + runtimeapi.ImageServiceServer + Start() error +} + +// DockerService is an interface that embeds the new RuntimeService and +// ImageService interfaces. +type DockerService interface { + CRIService + + // For serving streaming calls. + http.Handler + + // For supporting legacy features. + legacy.DockerLegacyService +} + +// NetworkPluginSettings is the subset of kubelet runtime args we pass +// to the container runtime shim so it can probe for network plugins. +// In the future we will feed these directly to a standalone container +// runtime process. +type NetworkPluginSettings struct { + // HairpinMode is best described by comments surrounding the kubelet arg + HairpinMode kubeletconfig.HairpinMode + // NonMasqueradeCIDR is the range of ips which should *not* be included + // in any MASQUERADE rules applied by the plugin + NonMasqueradeCIDR string + // PluginName is the name of the plugin, runtime shim probes for + PluginName string + // PluginBinDirString is a list of directiores delimited by commas, in + // which the binaries for the plugin with PluginName may be found. + PluginBinDirString string + // PluginBinDirs is an array of directories in which the binaries for + // the plugin with PluginName may be found. The admin is responsible for + // provisioning these binaries before-hand. + PluginBinDirs []string + // PluginConfDir is the directory in which the admin places a CNI conf. + // Depending on the plugin, this may be an optional field, eg: kubenet + // generates its own plugin conf. + PluginConfDir string + // PluginCacheDir is the directory in which CNI should store cache files. + PluginCacheDir string + // MTU is the desired MTU for network devices created by the plugin. + MTU int +} + +// namespaceGetter is a wrapper around the dockerService that implements +// the network.NamespaceGetter interface. +type namespaceGetter struct { + ds *dockerService +} + +func (n *namespaceGetter) GetNetNS(containerID string) (string, error) { + return n.ds.GetNetNS(containerID) +} + +// portMappingGetter is a wrapper around the dockerService that implements +// the network.PortMappingGetter interface. +type portMappingGetter struct { + ds *dockerService +} + +func (p *portMappingGetter) GetPodPortMappings(containerID string) ([]*hostport.PortMapping, error) { + return p.ds.GetPodPortMappings(containerID) +} + +// dockerNetworkHost implements network.Host by wrapping the legacy host passed in by the kubelet +// and dockerServices which implements the rest of the network host interfaces. +// The legacy host methods are slated for deletion. +type dockerNetworkHost struct { + *namespaceGetter + *portMappingGetter +} + +var internalLabelKeys = []string{containerTypeLabelKey, containerLogPathLabelKey, sandboxIDLabelKey} + +// ClientConfig is parameters used to initialize docker client +type ClientConfig struct { + DockerEndpoint string + RuntimeRequestTimeout time.Duration + ImagePullProgressDeadline time.Duration + + // Configuration for fake docker client + EnableSleep bool + WithTraceDisabled bool +} + +// NewDockerClientFromConfig create a docker client from given configure +// return nil if nil configure is given. +func NewDockerClientFromConfig(config *ClientConfig) libdocker.Interface { + if config != nil { + // Create docker client. + client := libdocker.ConnectToDockerOrDie( + config.DockerEndpoint, + config.RuntimeRequestTimeout, + config.ImagePullProgressDeadline, + ) + return client + } + + return nil +} + +// NewDockerService creates a new `DockerService` struct. +// NOTE: Anything passed to DockerService should be eventually handled in another way when we switch to running the shim as a different process. +func NewDockerService(config *ClientConfig, podSandboxImage string, streamingConfig *streaming.Config, pluginSettings *NetworkPluginSettings, + cgroupsName string, kubeCgroupDriver string, dockershimRootDir string) (DockerService, error) { + + client := NewDockerClientFromConfig(config) + + c := libdocker.NewInstrumentedInterface(client) + + checkpointManager, err := checkpointmanager.NewCheckpointManager(filepath.Join(dockershimRootDir, sandboxCheckpointDir)) + if err != nil { + return nil, err + } + + ds := &dockerService{ + client: c, + os: kubecontainer.RealOS{}, + podSandboxImage: podSandboxImage, + streamingRuntime: &streamingRuntime{ + client: client, + execHandler: &NativeExecHandler{}, + }, + containerManager: cm.NewContainerManager(cgroupsName, client), + checkpointManager: checkpointManager, + networkReady: make(map[string]bool), + containerCleanupInfos: make(map[string]*containerCleanupInfo), + } + + // check docker version compatibility. + if err = ds.checkVersionCompatibility(); err != nil { + return nil, err + } + + // create streaming server if configured. + if streamingConfig != nil { + var err error + ds.streamingServer, err = streaming.NewServer(*streamingConfig, ds.streamingRuntime) + if err != nil { + return nil, err + } + } + + // Determine the hairpin mode. + if err := effectiveHairpinMode(pluginSettings); err != nil { + // This is a non-recoverable error. Returning it up the callstack will just + // lead to retries of the same failure, so just fail hard. + return nil, err + } + klog.InfoS("Hairpin mode is set", "hairpinMode", pluginSettings.HairpinMode) + + // dockershim currently only supports CNI plugins. + pluginSettings.PluginBinDirs = cni.SplitDirs(pluginSettings.PluginBinDirString) + cniPlugins := cni.ProbeNetworkPlugins(pluginSettings.PluginConfDir, pluginSettings.PluginCacheDir, pluginSettings.PluginBinDirs) + cniPlugins = append(cniPlugins, kubenet.NewPlugin(pluginSettings.PluginBinDirs, pluginSettings.PluginCacheDir)) + netHost := &dockerNetworkHost{ + &namespaceGetter{ds}, + &portMappingGetter{ds}, + } + plug, err := network.InitNetworkPlugin(cniPlugins, pluginSettings.PluginName, netHost, pluginSettings.HairpinMode, pluginSettings.NonMasqueradeCIDR, pluginSettings.MTU) + if err != nil { + return nil, fmt.Errorf("didn't find compatible CNI plugin with given settings %+v: %v", pluginSettings, err) + } + ds.network = network.NewPluginManager(plug) + klog.InfoS("Docker cri networking managed by the network plugin", "networkPluginName", plug.Name()) + + dockerInfo, err := ds.client.Info() + if err != nil { + return nil, fmt.Errorf("Failed to execute Info() call to the Docker client") + } + klog.InfoS("Docker Info", "dockerInfo", dockerInfo) + ds.dockerRootDir = dockerInfo.DockerRootDir + + // skipping cgroup driver checks for Windows + if runtime.GOOS == "linux" { + cgroupDriver := defaultCgroupDriver + if len(dockerInfo.CgroupDriver) == 0 { + klog.InfoS("No cgroup driver is set in Docker") + klog.InfoS("Falling back to use the default driver", "cgroupDriver", cgroupDriver) + } else { + cgroupDriver = dockerInfo.CgroupDriver + } + if len(kubeCgroupDriver) != 0 && kubeCgroupDriver != cgroupDriver { + return nil, fmt.Errorf("misconfiguration: kubelet cgroup driver: %q is different from docker cgroup driver: %q", kubeCgroupDriver, cgroupDriver) + } + klog.InfoS("Setting cgroupDriver", "cgroupDriver", cgroupDriver) + ds.cgroupDriver = cgroupDriver + } + + ds.versionCache = cache.NewObjectCache( + func() (interface{}, error) { + return ds.getDockerVersion() + }, + versionCacheTTL, + ) + + // Register prometheus metrics. + metrics.Register() + + return ds, nil +} + +type dockerService struct { + client libdocker.Interface + os kubecontainer.OSInterface + podSandboxImage string + streamingRuntime *streamingRuntime + streamingServer streaming.Server + + network *network.PluginManager + // Map of podSandboxID :: network-is-ready + networkReady map[string]bool + networkReadyLock sync.Mutex + + containerManager cm.ContainerManager + // cgroup driver used by Docker runtime. + cgroupDriver string + checkpointManager checkpointmanager.CheckpointManager + // caches the version of the runtime. + // To be compatible with multiple docker versions, we need to perform + // version checking for some operations. Use this cache to avoid querying + // the docker daemon every time we need to do such checks. + versionCache *cache.ObjectCache + + // docker root directory + dockerRootDir string + + // containerCleanupInfos maps container IDs to the `containerCleanupInfo` structs + // needed to clean up after containers have been removed. + // (see `applyPlatformSpecificDockerConfig` and `performPlatformSpecificContainerCleanup` + // methods for more info). + containerCleanupInfos map[string]*containerCleanupInfo + cleanupInfosLock sync.RWMutex +} + +// TODO: handle context. + +// Version returns the runtime name, runtime version and runtime API version +func (ds *dockerService) Version(_ context.Context, r *runtimeapi.VersionRequest) (*runtimeapi.VersionResponse, error) { + v, err := ds.getDockerVersion() + if err != nil { + return nil, err + } + return &runtimeapi.VersionResponse{ + Version: kubeAPIVersion, + RuntimeName: dockerRuntimeName, + RuntimeVersion: v.Version, + RuntimeApiVersion: v.APIVersion, + }, nil +} + +// getDockerVersion gets the version information from docker. +func (ds *dockerService) getDockerVersion() (*dockertypes.Version, error) { + v, err := ds.client.Version() + if err != nil { + return nil, fmt.Errorf("failed to get docker version: %v", err) + } + // Docker API version (e.g., 1.23) is not semver compatible. Add a ".0" + // suffix to remedy this. + v.APIVersion = fmt.Sprintf("%s.0", v.APIVersion) + return v, nil +} + +// UpdateRuntimeConfig updates the runtime config. Currently only handles podCIDR updates. +func (ds *dockerService) UpdateRuntimeConfig(_ context.Context, r *runtimeapi.UpdateRuntimeConfigRequest) (*runtimeapi.UpdateRuntimeConfigResponse, error) { + runtimeConfig := r.GetRuntimeConfig() + if runtimeConfig == nil { + return &runtimeapi.UpdateRuntimeConfigResponse{}, nil + } + + klog.InfoS("Docker cri received runtime config", "runtimeConfig", runtimeConfig) + if ds.network != nil && runtimeConfig.NetworkConfig.PodCidr != "" { + event := make(map[string]interface{}) + event[network.NET_PLUGIN_EVENT_POD_CIDR_CHANGE_DETAIL_CIDR] = runtimeConfig.NetworkConfig.PodCidr + ds.network.Event(network.NET_PLUGIN_EVENT_POD_CIDR_CHANGE, event) + } + + return &runtimeapi.UpdateRuntimeConfigResponse{}, nil +} + +// GetNetNS returns the network namespace of the given containerID. The ID +// supplied is typically the ID of a pod sandbox. This getter doesn't try +// to map non-sandbox IDs to their respective sandboxes. +func (ds *dockerService) GetNetNS(podSandboxID string) (string, error) { + r, err := ds.client.InspectContainer(podSandboxID) + if err != nil { + return "", err + } + return getNetworkNamespace(r) +} + +// GetPodPortMappings returns the port mappings of the given podSandbox ID. +func (ds *dockerService) GetPodPortMappings(podSandboxID string) ([]*hostport.PortMapping, error) { + // TODO: get portmappings from docker labels for backward compatibility + checkpoint := NewPodSandboxCheckpoint("", "", &CheckpointData{}) + err := ds.checkpointManager.GetCheckpoint(podSandboxID, checkpoint) + // Return empty portMappings if checkpoint is not found + if err != nil { + if err == errors.ErrCheckpointNotFound { + return nil, nil + } + errRem := ds.checkpointManager.RemoveCheckpoint(podSandboxID) + if errRem != nil { + klog.ErrorS(errRem, "Failed to delete corrupt checkpoint for sandbox", "podSandboxID", podSandboxID) + } + return nil, err + } + _, _, _, checkpointedPortMappings, _ := checkpoint.GetData() + portMappings := make([]*hostport.PortMapping, 0, len(checkpointedPortMappings)) + for _, pm := range checkpointedPortMappings { + proto := toAPIProtocol(*pm.Protocol) + portMappings = append(portMappings, &hostport.PortMapping{ + HostPort: *pm.HostPort, + ContainerPort: *pm.ContainerPort, + Protocol: proto, + HostIP: pm.HostIP, + }) + } + return portMappings, nil +} + +// Start initializes and starts components in dockerService. +func (ds *dockerService) Start() error { + ds.initCleanup() + + go func() { + if err := ds.streamingServer.Start(true); err != nil { + klog.ErrorS(err, "Streaming server stopped unexpectedly") + os.Exit(1) + } + }() + + return ds.containerManager.Start() +} + +// initCleanup is responsible for cleaning up any crufts left by previous +// runs. If there are any errors, it simply logs them. +func (ds *dockerService) initCleanup() { + errors := ds.platformSpecificContainerInitCleanup() + + for _, err := range errors { + klog.InfoS("Initialization error", "err", err) + } +} + +// Status returns the status of the runtime. +func (ds *dockerService) Status(_ context.Context, r *runtimeapi.StatusRequest) (*runtimeapi.StatusResponse, error) { + runtimeReady := &runtimeapi.RuntimeCondition{ + Type: runtimeapi.RuntimeReady, + Status: true, + } + networkReady := &runtimeapi.RuntimeCondition{ + Type: runtimeapi.NetworkReady, + Status: true, + } + conditions := []*runtimeapi.RuntimeCondition{runtimeReady, networkReady} + if _, err := ds.client.Version(); err != nil { + runtimeReady.Status = false + runtimeReady.Reason = "DockerDaemonNotReady" + runtimeReady.Message = fmt.Sprintf("docker: failed to get docker version: %v", err) + } + if err := ds.network.Status(); err != nil { + networkReady.Status = false + networkReady.Reason = "NetworkPluginNotReady" + networkReady.Message = fmt.Sprintf("docker: network plugin is not ready: %v", err) + } + status := &runtimeapi.RuntimeStatus{Conditions: conditions} + return &runtimeapi.StatusResponse{Status: status}, nil +} + +func (ds *dockerService) ServeHTTP(w http.ResponseWriter, r *http.Request) { + if ds.streamingServer != nil { + ds.streamingServer.ServeHTTP(w, r) + } else { + http.NotFound(w, r) + } +} + +// GenerateExpectedCgroupParent returns cgroup parent in syntax expected by cgroup driver +func (ds *dockerService) GenerateExpectedCgroupParent(cgroupParent string) (string, error) { + if cgroupParent != "" { + // if docker uses the systemd cgroup driver, it expects *.slice style names for cgroup parent. + // if we configured kubelet to use --cgroup-driver=cgroupfs, and docker is configured to use systemd driver + // docker will fail to launch the container because the name we provide will not be a valid slice. + // this is a very good thing. + if ds.cgroupDriver == "systemd" { + // Pass only the last component of the cgroup path to systemd. + cgroupParent = path.Base(cgroupParent) + } + } + klog.V(3).InfoS("Setting cgroup parent", "cgroupParent", cgroupParent) + return cgroupParent, nil +} + +// checkVersionCompatibility verifies whether docker is in a compatible version. +func (ds *dockerService) checkVersionCompatibility() error { + apiVersion, err := ds.getDockerAPIVersion() + if err != nil { + return err + } + + minAPIVersion, err := semver.Parse(libdocker.MinimumDockerAPIVersion) + if err != nil { + return err + } + + // Verify the docker version. + result := apiVersion.Compare(minAPIVersion) + if result < 0 { + return fmt.Errorf("docker API version is older than %s", libdocker.MinimumDockerAPIVersion) + } + + return nil +} + +// getDockerAPIVersion gets the semver-compatible docker api version. +func (ds *dockerService) getDockerAPIVersion() (*semver.Version, error) { + var dv *dockertypes.Version + var err error + if ds.versionCache != nil { + dv, err = ds.getDockerVersionFromCache() + } else { + dv, err = ds.getDockerVersion() + } + if err != nil { + return nil, err + } + + apiVersion, err := semver.Parse(dv.APIVersion) + if err != nil { + return nil, err + } + return &apiVersion, nil +} + +func (ds *dockerService) getDockerVersionFromCache() (*dockertypes.Version, error) { + // We only store on key in the cache. + const dummyKey = "version" + value, err := ds.versionCache.Get(dummyKey) + if err != nil { + return nil, err + } + dv, ok := value.(*dockertypes.Version) + if !ok { + return nil, fmt.Errorf("converted to *dockertype.Version error") + } + return dv, nil +} + +func toAPIProtocol(protocol Protocol) v1.Protocol { + switch protocol { + case protocolTCP: + return v1.ProtocolTCP + case protocolUDP: + return v1.ProtocolUDP + case protocolSCTP: + return v1.ProtocolSCTP + } + klog.InfoS("Unknown protocol, defaulting to TCP", "protocol", protocol) + return v1.ProtocolTCP +} + +// effectiveHairpinMode determines the effective hairpin mode given the +// configured mode, and whether cbr0 should be configured. +func effectiveHairpinMode(s *NetworkPluginSettings) error { + // The hairpin mode setting doesn't matter if: + // - We're not using a bridge network. This is hard to check because we might + // be using a plugin. + // - It's set to hairpin-veth for a container runtime that doesn't know how + // to set the hairpin flag on the veth's of containers. Currently the + // docker runtime is the only one that understands this. + // - It's set to "none". + if s.HairpinMode == kubeletconfig.PromiscuousBridge || s.HairpinMode == kubeletconfig.HairpinVeth { + if s.HairpinMode == kubeletconfig.PromiscuousBridge && s.PluginName != "kubenet" { + // This is not a valid combination, since promiscuous-bridge only works on kubenet. Users might be using the + // default values (from before the hairpin-mode flag existed) and we + // should keep the old behavior. + klog.InfoS("Hairpin mode is set but kubenet is not enabled, falling back to HairpinVeth", "hairpinMode", s.HairpinMode) + s.HairpinMode = kubeletconfig.HairpinVeth + return nil + } + } else if s.HairpinMode != kubeletconfig.HairpinNone { + return fmt.Errorf("unknown value: %q", s.HairpinMode) + } + return nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_stats.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_stats.go new file mode 100644 index 000000000000..e673bcd1170b --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_stats.go @@ -0,0 +1,91 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dockershim + +import ( + "context" + "errors" + "fmt" + + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" +) + +var ErrNotImplemented = errors.New("Not implemented") + +// ContainerStats returns stats for a container stats request based on container id. +func (ds *dockerService) ContainerStats(ctx context.Context, r *runtimeapi.ContainerStatsRequest) (*runtimeapi.ContainerStatsResponse, error) { + filter := &runtimeapi.ContainerFilter{ + Id: r.ContainerId, + } + listResp, err := ds.ListContainers(ctx, &runtimeapi.ListContainersRequest{Filter: filter}) + if err != nil { + return nil, err + } + if len(listResp.Containers) != 1 { + return nil, fmt.Errorf("container with id %s not found", r.ContainerId) + } + stats, err := ds.getContainerStats(listResp.Containers[0]) + if err != nil { + return nil, err + } + return &runtimeapi.ContainerStatsResponse{Stats: stats}, nil +} + +// ListContainerStats returns stats for a list container stats request based on a filter. +func (ds *dockerService) ListContainerStats(ctx context.Context, r *runtimeapi.ListContainerStatsRequest) (*runtimeapi.ListContainerStatsResponse, error) { + containerStatsFilter := r.GetFilter() + filter := &runtimeapi.ContainerFilter{} + + if containerStatsFilter != nil { + filter.Id = containerStatsFilter.Id + filter.PodSandboxId = containerStatsFilter.PodSandboxId + filter.LabelSelector = containerStatsFilter.LabelSelector + } + + listResp, err := ds.ListContainers(ctx, &runtimeapi.ListContainersRequest{Filter: filter}) + if err != nil { + return nil, err + } + + var stats []*runtimeapi.ContainerStats + for _, container := range listResp.Containers { + containerStats, err := ds.getContainerStats(container) + if err != nil { + return nil, err + } + if containerStats != nil { + stats = append(stats, containerStats) + } + } + + return &runtimeapi.ListContainerStatsResponse{Stats: stats}, nil +} + +// PodSandboxStats returns stats for a pod sandbox based on pod sandbox id. +// This function is not implemented for the dockershim. +func (ds *dockerService) PodSandboxStats(_ context.Context, r *runtimeapi.PodSandboxStatsRequest) (*runtimeapi.PodSandboxStatsResponse, error) { + return nil, ErrNotImplemented +} + +// ListPodSandboxStats returns stats for a list of pod sandboxes based on a filter. +// This function is not implemented for the dockershim. +func (ds *dockerService) ListPodSandboxStats(ctx context.Context, r *runtimeapi.ListPodSandboxStatsRequest) (*runtimeapi.ListPodSandboxStatsResponse, error) { + return nil, ErrNotImplemented +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_stats_linux.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_stats_linux.go new file mode 100644 index 000000000000..b7be67a6fe4c --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_stats_linux.go @@ -0,0 +1,63 @@ +//go:build linux && !dockerless +// +build linux,!dockerless + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dockershim + +import ( + "time" + + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" +) + +func (ds *dockerService) getContainerStats(c *runtimeapi.Container) (*runtimeapi.ContainerStats, error) { + statsJSON, err := ds.client.GetContainerStats(c.Id) + if err != nil { + return nil, err + } + + containerJSON, err := ds.client.InspectContainerWithSize(c.Id) + if err != nil { + return nil, err + } + + dockerStats := statsJSON.Stats + timestamp := time.Now().UnixNano() + containerStats := &runtimeapi.ContainerStats{ + Attributes: &runtimeapi.ContainerAttributes{ + Id: c.Id, + Metadata: c.Metadata, + Labels: c.Labels, + Annotations: c.Annotations, + }, + Cpu: &runtimeapi.CpuUsage{ + Timestamp: timestamp, + UsageCoreNanoSeconds: &runtimeapi.UInt64Value{Value: dockerStats.CPUStats.CPUUsage.TotalUsage}, + }, + Memory: &runtimeapi.MemoryUsage{ + Timestamp: timestamp, + WorkingSetBytes: &runtimeapi.UInt64Value{Value: dockerStats.MemoryStats.PrivateWorkingSet}, + }, + WritableLayer: &runtimeapi.FilesystemUsage{ + Timestamp: timestamp, + FsId: &runtimeapi.FilesystemIdentifier{Mountpoint: ds.dockerRootDir}, + UsedBytes: &runtimeapi.UInt64Value{Value: uint64(*containerJSON.SizeRw)}, + }, + } + return containerStats, nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_stats_unsupported.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_stats_unsupported.go new file mode 100644 index 000000000000..1f3f5747a4b4 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_stats_unsupported.go @@ -0,0 +1,30 @@ +//go:build !linux && !windows && !dockerless +// +build !linux,!windows,!dockerless + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dockershim + +import ( + "fmt" + + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" +) + +func (ds *dockerService) getContainerStats(c *runtimeapi.Container) (*runtimeapi.ContainerStats, error) { + return nil, fmt.Errorf("not implemented") +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_stats_windows.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_stats_windows.go new file mode 100644 index 000000000000..df9f0b37597f --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_stats_windows.go @@ -0,0 +1,91 @@ +//go:build windows && !dockerless +// +build windows,!dockerless + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dockershim + +import ( + "strings" + "time" + + "github.com/Microsoft/hcsshim" + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + "k8s.io/klog/v2" +) + +func (ds *dockerService) getContainerStats(c *runtimeapi.Container) (*runtimeapi.ContainerStats, error) { + hcsshimContainer, err := hcsshim.OpenContainer(c.Id) + if err != nil { + // As we moved from using Docker stats to hcsshim directly, we may query HCS with already exited container IDs. + // That will typically happen with init-containers in Exited state. Docker still knows about them but the HCS does not. + // As we don't want to block stats retrieval for other containers, we only log errors. + if !hcsshim.IsNotExist(err) && !hcsshim.IsAlreadyStopped(err) { + klog.V(4).InfoS("Error opening container (stats will be missing)", "containerID", c.Id, "err", err) + } + return nil, nil + } + defer func() { + closeErr := hcsshimContainer.Close() + if closeErr != nil { + klog.ErrorS(closeErr, "Error closing container", "containerID", c.Id) + } + }() + + stats, err := hcsshimContainer.Statistics() + if err != nil { + if strings.Contains(err.Error(), "0x5") || strings.Contains(err.Error(), "0xc0370105") { + // When the container is just created, querying for stats causes access errors because it hasn't started yet + // This is transient; skip container for now + // + // These hcs errors do not have helpers exposed in public package so need to query for the known codes + // https://github.com/microsoft/hcsshim/blob/master/internal/hcs/errors.go + // PR to expose helpers in hcsshim: https://github.com/microsoft/hcsshim/pull/933 + klog.V(4).InfoS("Container is not in a state that stats can be accessed. This occurs when the container is created but not started.", "containerID", c.Id, "err", err) + return nil, nil + } + return nil, err + } + + timestamp := time.Now().UnixNano() + containerStats := &runtimeapi.ContainerStats{ + Attributes: &runtimeapi.ContainerAttributes{ + Id: c.Id, + Metadata: c.Metadata, + Labels: c.Labels, + Annotations: c.Annotations, + }, + Cpu: &runtimeapi.CpuUsage{ + Timestamp: timestamp, + // have to multiply cpu usage by 100 since stats units is in 100's of nano seconds for Windows + UsageCoreNanoSeconds: &runtimeapi.UInt64Value{Value: stats.Processor.TotalRuntime100ns * 100}, + }, + Memory: &runtimeapi.MemoryUsage{ + Timestamp: timestamp, + WorkingSetBytes: &runtimeapi.UInt64Value{Value: stats.Memory.UsagePrivateWorkingSetBytes}, + }, + WritableLayer: &runtimeapi.FilesystemUsage{ + Timestamp: timestamp, + FsId: &runtimeapi.FilesystemIdentifier{Mountpoint: ds.dockerRootDir}, + // used bytes from image are not implemented on Windows + // don't query for it since it is expensive to call docker over named pipe + // https://github.com/moby/moby/blob/1ba54a5fd0ba293db3bea46cd67604b593f2048b/daemon/images/image_windows.go#L11-L14 + UsedBytes: &runtimeapi.UInt64Value{Value: 0}, + }, + } + return containerStats, nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_streaming.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_streaming.go new file mode 100644 index 000000000000..106a5ff1f433 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_streaming.go @@ -0,0 +1,209 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dockershim + +import ( + "bytes" + "context" + "errors" + "fmt" + "io" + "math" + "time" + "unsafe" + + dockertypes "github.com/docker/docker/api/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "k8s.io/client-go/tools/remotecommand" + runtimeapiv1 "k8s.io/cri-api/pkg/apis/runtime/v1" + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + "k8s.io/kubernetes/pkg/kubelet/cri/streaming" + "k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker" + "k8s.io/kubernetes/pkg/kubelet/util/ioutils" + utilexec "k8s.io/utils/exec" +) + +type streamingRuntime struct { + client libdocker.Interface + execHandler ExecHandler +} + +var _ streaming.Runtime = &streamingRuntime{} + +const maxMsgSize = 1024 * 1024 * 16 + +func (r *streamingRuntime) Exec(containerID string, cmd []string, in io.Reader, out, err io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) error { + return r.exec(context.TODO(), containerID, cmd, in, out, err, tty, resize, 0) +} + +// Internal version of Exec adds a timeout. +func (r *streamingRuntime) exec(ctx context.Context, containerID string, cmd []string, in io.Reader, out, errw io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize, timeout time.Duration) error { + container, err := checkContainerStatus(r.client, containerID) + if err != nil { + return err + } + + return r.execHandler.ExecInContainer(ctx, r.client, container, cmd, in, out, errw, tty, resize, timeout) +} + +func (r *streamingRuntime) Attach(containerID string, in io.Reader, out, errw io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) error { + _, err := checkContainerStatus(r.client, containerID) + if err != nil { + return err + } + + return attachContainer(r.client, containerID, in, out, errw, tty, resize) +} + +func (r *streamingRuntime) PortForward(podSandboxID string, port int32, stream io.ReadWriteCloser) error { + if port < 0 || port > math.MaxUint16 { + return fmt.Errorf("invalid port %d", port) + } + return r.portForward(podSandboxID, port, stream) +} + +// ExecSync executes a command in the container, and returns the stdout output. +// If command exits with a non-zero exit code, an error is returned. +func (ds *dockerService) ExecSync(ctx context.Context, req *runtimeapi.ExecSyncRequest) (*runtimeapi.ExecSyncResponse, error) { + timeout := time.Duration(req.Timeout) * time.Second + var stdoutBuffer, stderrBuffer bytes.Buffer + err := ds.streamingRuntime.exec(ctx, req.ContainerId, req.Cmd, + nil, // in + ioutils.WriteCloserWrapper(ioutils.LimitWriter(&stdoutBuffer, maxMsgSize)), + ioutils.WriteCloserWrapper(ioutils.LimitWriter(&stderrBuffer, maxMsgSize)), + false, // tty + nil, // resize + timeout) + + // kubelet's remote runtime expects a grpc error with status code DeadlineExceeded on time out. + if errors.Is(err, context.DeadlineExceeded) { + return nil, status.Errorf(codes.DeadlineExceeded, err.Error()) + } + + var exitCode int32 + if err != nil { + exitError, ok := err.(utilexec.ExitError) + if !ok { + return nil, err + } + + exitCode = int32(exitError.ExitStatus()) + } + return &runtimeapi.ExecSyncResponse{ + Stdout: stdoutBuffer.Bytes(), + Stderr: stderrBuffer.Bytes(), + ExitCode: exitCode, + }, nil +} + +// Exec prepares a streaming endpoint to execute a command in the container, and returns the address. +func (ds *dockerService) Exec(_ context.Context, req *runtimeapi.ExecRequest) (*runtimeapi.ExecResponse, error) { + if ds.streamingServer == nil { + return nil, streaming.NewErrorStreamingDisabled("exec") + } + _, err := checkContainerStatus(ds.client, req.ContainerId) + if err != nil { + return nil, err + } + // This conversion has been copied from the functions in + // pkg/kubelet/cri/remote/conversion.go + r := (*runtimeapiv1.ExecRequest)(unsafe.Pointer(req)) + resp, err := ds.streamingServer.GetExec(r) + if err != nil { + return nil, err + } + return (*runtimeapi.ExecResponse)(unsafe.Pointer(resp)), nil +} + +// Attach prepares a streaming endpoint to attach to a running container, and returns the address. +func (ds *dockerService) Attach(_ context.Context, req *runtimeapi.AttachRequest) (*runtimeapi.AttachResponse, error) { + if ds.streamingServer == nil { + return nil, streaming.NewErrorStreamingDisabled("attach") + } + _, err := checkContainerStatus(ds.client, req.ContainerId) + if err != nil { + return nil, err + } + // This conversion has been copied from the functions in + // pkg/kubelet/cri/remote/conversion.go + r := (*runtimeapiv1.AttachRequest)(unsafe.Pointer(req)) + resp, err := ds.streamingServer.GetAttach(r) + if err != nil { + return nil, err + } + return (*runtimeapi.AttachResponse)(unsafe.Pointer(resp)), nil +} + +// PortForward prepares a streaming endpoint to forward ports from a PodSandbox, and returns the address. +func (ds *dockerService) PortForward(_ context.Context, req *runtimeapi.PortForwardRequest) (*runtimeapi.PortForwardResponse, error) { + if ds.streamingServer == nil { + return nil, streaming.NewErrorStreamingDisabled("port forward") + } + _, err := checkContainerStatus(ds.client, req.PodSandboxId) + if err != nil { + return nil, err + } + // TODO(tallclair): Verify that ports are exposed. + // This conversion has been copied from the functions in + // pkg/kubelet/cri/remote/conversion.go + r := (*runtimeapiv1.PortForwardRequest)(unsafe.Pointer(req)) + resp, err := ds.streamingServer.GetPortForward(r) + if err != nil { + return nil, err + } + return (*runtimeapi.PortForwardResponse)(unsafe.Pointer(resp)), nil +} + +func checkContainerStatus(client libdocker.Interface, containerID string) (*dockertypes.ContainerJSON, error) { + container, err := client.InspectContainer(containerID) + if err != nil { + return nil, err + } + if !container.State.Running { + return nil, fmt.Errorf("container not running (%s)", container.ID) + } + return container, nil +} + +func attachContainer(client libdocker.Interface, containerID string, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize) error { + // Have to start this before the call to client.AttachToContainer because client.AttachToContainer is a blocking + // call :-( Otherwise, resize events don't get processed and the terminal never resizes. + kubecontainer.HandleResizing(resize, func(size remotecommand.TerminalSize) { + client.ResizeContainerTTY(containerID, uint(size.Height), uint(size.Width)) + }) + + // TODO(random-liu): Do we really use the *Logs* field here? + opts := dockertypes.ContainerAttachOptions{ + Stream: true, + Stdin: stdin != nil, + Stdout: stdout != nil, + Stderr: stderr != nil, + } + sopts := libdocker.StreamOptions{ + InputStream: stdin, + OutputStream: stdout, + ErrorStream: stderr, + RawTerminal: tty, + } + return client.AttachToContainer(containerID, opts, sopts) +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_streaming_others.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_streaming_others.go new file mode 100644 index 000000000000..eb041c1073c1 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_streaming_others.go @@ -0,0 +1,87 @@ +//go:build !windows && !dockerless +// +build !windows,!dockerless + +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dockershim + +import ( + "bytes" + "fmt" + "io" + "os/exec" + "strings" + + "k8s.io/klog/v2" +) + +func (r *streamingRuntime) portForward(podSandboxID string, port int32, stream io.ReadWriteCloser) error { + container, err := r.client.InspectContainer(podSandboxID) + if err != nil { + return err + } + + if !container.State.Running { + return fmt.Errorf("container not running (%s)", container.ID) + } + + containerPid := container.State.Pid + socatPath, lookupErr := exec.LookPath("socat") + if lookupErr != nil { + return fmt.Errorf("unable to do port forwarding: socat not found") + } + + args := []string{"-t", fmt.Sprintf("%d", containerPid), "-n", socatPath, "-", fmt.Sprintf("TCP4:localhost:%d", port)} + + nsenterPath, lookupErr := exec.LookPath("nsenter") + if lookupErr != nil { + return fmt.Errorf("unable to do port forwarding: nsenter not found") + } + + commandString := fmt.Sprintf("%s %s", nsenterPath, strings.Join(args, " ")) + klog.V(4).InfoS("Executing port forwarding command", "command", commandString) + + command := exec.Command(nsenterPath, args...) + command.Stdout = stream + + stderr := new(bytes.Buffer) + command.Stderr = stderr + + // If we use Stdin, command.Run() won't return until the goroutine that's copying + // from stream finishes. Unfortunately, if you have a client like telnet connected + // via port forwarding, as long as the user's telnet client is connected to the user's + // local listener that port forwarding sets up, the telnet session never exits. This + // means that even if socat has finished running, command.Run() won't ever return + // (because the client still has the connection and stream open). + // + // The work around is to use StdinPipe(), as Wait() (called by Run()) closes the pipe + // when the command (socat) exits. + inPipe, err := command.StdinPipe() + if err != nil { + return fmt.Errorf("unable to do port forwarding: error creating stdin pipe: %v", err) + } + go func() { + io.Copy(inPipe, stream) + inPipe.Close() + }() + + if err := command.Run(); err != nil { + return fmt.Errorf("%v: %s", err, stderr.String()) + } + + return nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_streaming_windows.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_streaming_windows.go new file mode 100644 index 000000000000..cad09a9980dd --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/docker_streaming_windows.go @@ -0,0 +1,39 @@ +//go:build windows && !dockerless +// +build windows,!dockerless + +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dockershim + +import ( + "bytes" + "context" + "fmt" + "io" + + "k8s.io/kubernetes/pkg/kubelet/util/ioutils" +) + +func (r *streamingRuntime) portForward(podSandboxID string, port int32, stream io.ReadWriteCloser) error { + stderr := new(bytes.Buffer) + err := r.exec(context.TODO(), podSandboxID, []string{"wincat.exe", "127.0.0.1", fmt.Sprint(port)}, stream, stream, ioutils.WriteCloserWrapper(stderr), false, nil, 0) + if err != nil { + return fmt.Errorf("%v: %s", err, stderr.String()) + } + + return nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/cri-api/pkg/errors/doc.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/dockershim_nodocker.go similarity index 79% rename from cluster-autoscaler/vendor/k8s.io/cri-api/pkg/errors/doc.go rename to cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/dockershim_nodocker.go index f3413ee98046..9cb89fa79065 100644 --- a/cluster-autoscaler/vendor/k8s.io/cri-api/pkg/errors/doc.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/dockershim_nodocker.go @@ -1,3 +1,6 @@ +//go:build dockerless +// +build dockerless + /* Copyright 2020 The Kubernetes Authors. @@ -14,6 +17,4 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package errors provides helper functions for use by the kubelet -// to deal with CRI errors. -package errors // import "k8s.io/cri-api/pkg/errors" +package dockershim diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/exec.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/exec.go new file mode 100644 index 000000000000..6c8aac5989e4 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/exec.go @@ -0,0 +1,162 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dockershim + +import ( + "context" + "fmt" + "io" + "time" + + dockertypes "github.com/docker/docker/api/types" + + utilfeature "k8s.io/apiserver/pkg/util/feature" + "k8s.io/client-go/tools/remotecommand" + "k8s.io/klog/v2" + "k8s.io/kubernetes/pkg/features" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + "k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker" +) + +// ExecHandler knows how to execute a command in a running Docker container. +type ExecHandler interface { + ExecInContainer(ctx context.Context, client libdocker.Interface, container *dockertypes.ContainerJSON, cmd []string, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize, timeout time.Duration) error +} + +type dockerExitError struct { + Inspect *dockertypes.ContainerExecInspect +} + +func (d *dockerExitError) String() string { + return d.Error() +} + +func (d *dockerExitError) Error() string { + return fmt.Sprintf("Error executing in Docker Container: %d", d.Inspect.ExitCode) +} + +func (d *dockerExitError) Exited() bool { + return !d.Inspect.Running +} + +func (d *dockerExitError) ExitStatus() int { + return d.Inspect.ExitCode +} + +// NativeExecHandler executes commands in Docker containers using Docker's exec API. +type NativeExecHandler struct{} + +// ExecInContainer executes the cmd in container using the Docker's exec API +func (*NativeExecHandler) ExecInContainer(ctx context.Context, client libdocker.Interface, container *dockertypes.ContainerJSON, cmd []string, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize, timeout time.Duration) error { + done := make(chan struct{}) + defer close(done) + + createOpts := dockertypes.ExecConfig{ + Cmd: cmd, + AttachStdin: stdin != nil, + AttachStdout: stdout != nil, + AttachStderr: stderr != nil, + Tty: tty, + } + execObj, err := client.CreateExec(container.ID, createOpts) + if err != nil { + return fmt.Errorf("failed to exec in container - Exec setup failed - %v", err) + } + + // Have to start this before the call to client.StartExec because client.StartExec is a blocking + // call :-( Otherwise, resize events don't get processed and the terminal never resizes. + // + // We also have to delay attempting to send a terminal resize request to docker until after the + // exec has started; otherwise, the initial resize request will fail. + execStarted := make(chan struct{}) + go func() { + select { + case <-execStarted: + // client.StartExec has started the exec, so we can start resizing + case <-done: + // ExecInContainer has returned, so short-circuit + return + } + + kubecontainer.HandleResizing(resize, func(size remotecommand.TerminalSize) { + client.ResizeExecTTY(execObj.ID, uint(size.Height), uint(size.Width)) + }) + }() + + startOpts := dockertypes.ExecStartCheck{Detach: false, Tty: tty} + streamOpts := libdocker.StreamOptions{ + InputStream: stdin, + OutputStream: stdout, + ErrorStream: stderr, + RawTerminal: tty, + ExecStarted: execStarted, + } + + if timeout > 0 && utilfeature.DefaultFeatureGate.Enabled(features.ExecProbeTimeout) { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, timeout) + defer cancel() + } + + // StartExec is a blocking call, so we need to run it concurrently and catch + // its error in a channel + execErr := make(chan error, 1) + go func() { + execErr <- client.StartExec(execObj.ID, startOpts, streamOpts) + }() + + select { + case <-ctx.Done(): + return ctx.Err() + case err := <-execErr: + if err != nil { + return err + } + } + + // InspectExec may not always return latest state of exec, so call it a few times until + // it returns an exec inspect that shows that the process is no longer running. + retries := 0 + maxRetries := 5 + ticker := time.NewTicker(2 * time.Second) + defer ticker.Stop() + for { + inspect, err := client.InspectExec(execObj.ID) + if err != nil { + return err + } + + if !inspect.Running { + if inspect.ExitCode != 0 { + return &dockerExitError{inspect} + } + + return nil + } + + retries++ + if retries == maxRetries { + klog.ErrorS(nil, "Exec session in the container terminated but process still running!", "execSession", execObj.ID, "containerID", container.ID) + return nil + } + + <-ticker.C + } +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers.go new file mode 100644 index 000000000000..ca3db5e18188 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers.go @@ -0,0 +1,442 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dockershim + +import ( + "errors" + "fmt" + "io" + "regexp" + "strconv" + "strings" + "sync/atomic" + + dockertypes "github.com/docker/docker/api/types" + dockercontainer "github.com/docker/docker/api/types/container" + dockerfilters "github.com/docker/docker/api/types/filters" + dockernat "github.com/docker/go-connections/nat" + "k8s.io/klog/v2" + + v1 "k8s.io/api/core/v1" + utilerrors "k8s.io/apimachinery/pkg/util/errors" + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + "k8s.io/kubernetes/pkg/credentialprovider" + "k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker" + "k8s.io/kubernetes/pkg/kubelet/types" + "k8s.io/kubernetes/pkg/util/parsers" +) + +const ( + annotationPrefix = "annotation." + securityOptSeparator = '=' +) + +var ( + conflictRE = regexp.MustCompile(`Conflict. (?:.)+ is already in use by container \"?([0-9a-z]+)\"?`) + + // this is hacky, but extremely common. + // if a container starts but the executable file is not found, runc gives a message that matches + startRE = regexp.MustCompile(`\\\\\\\"(.*)\\\\\\\": executable file not found`) + + defaultSeccompOpt = []dockerOpt{{"seccomp", v1.SeccompProfileNameUnconfined, ""}} +) + +// generateEnvList converts KeyValue list to a list of strings, in the form of +// '=', which can be understood by docker. +func generateEnvList(envs []*runtimeapi.KeyValue) (result []string) { + for _, env := range envs { + result = append(result, fmt.Sprintf("%s=%s", env.Key, env.Value)) + } + return +} + +// makeLabels converts annotations to labels and merge them with the given +// labels. This is necessary because docker does not support annotations; +// we *fake* annotations using labels. Note that docker labels are not +// updatable. +func makeLabels(labels, annotations map[string]string) map[string]string { + merged := make(map[string]string) + for k, v := range labels { + merged[k] = v + } + for k, v := range annotations { + // Assume there won't be conflict. + merged[fmt.Sprintf("%s%s", annotationPrefix, k)] = v + } + return merged +} + +// extractLabels converts raw docker labels to the CRI labels and annotations. +// It also filters out internal labels used by this shim. +func extractLabels(input map[string]string) (map[string]string, map[string]string) { + labels := make(map[string]string) + annotations := make(map[string]string) + for k, v := range input { + // Check if the key is used internally by the shim. + internal := false + for _, internalKey := range internalLabelKeys { + if k == internalKey { + internal = true + break + } + } + if internal { + continue + } + + // Delete the container name label for the sandbox. It is added in the shim, + // should not be exposed via CRI. + if k == types.KubernetesContainerNameLabel && + input[containerTypeLabelKey] == containerTypeLabelSandbox { + continue + } + + // Check if the label should be treated as an annotation. + if strings.HasPrefix(k, annotationPrefix) { + annotations[strings.TrimPrefix(k, annotationPrefix)] = v + continue + } + labels[k] = v + } + return labels, annotations +} + +// generateMountBindings converts the mount list to a list of strings that +// can be understood by docker. +// ':[:options]', where 'options' +// is a comma-separated list of the following strings: +// 'ro', if the path is read only +// 'Z', if the volume requires SELinux relabeling +// propagation mode such as 'rslave' +func generateMountBindings(mounts []*runtimeapi.Mount) []string { + result := make([]string, 0, len(mounts)) + for _, m := range mounts { + bind := fmt.Sprintf("%s:%s", m.HostPath, m.ContainerPath) + var attrs []string + if m.Readonly { + attrs = append(attrs, "ro") + } + // Only request relabeling if the pod provides an SELinux context. If the pod + // does not provide an SELinux context relabeling will label the volume with + // the container's randomly allocated MCS label. This would restrict access + // to the volume to the container which mounts it first. + if m.SelinuxRelabel { + attrs = append(attrs, "Z") + } + switch m.Propagation { + case runtimeapi.MountPropagation_PROPAGATION_PRIVATE: + // noop, private is default + case runtimeapi.MountPropagation_PROPAGATION_BIDIRECTIONAL: + attrs = append(attrs, "rshared") + case runtimeapi.MountPropagation_PROPAGATION_HOST_TO_CONTAINER: + attrs = append(attrs, "rslave") + default: + klog.InfoS("Unknown propagation mode for hostPath", "path", m.HostPath) + // Falls back to "private" + } + + if len(attrs) > 0 { + bind = fmt.Sprintf("%s:%s", bind, strings.Join(attrs, ",")) + } + result = append(result, bind) + } + return result +} + +func makePortsAndBindings(pm []*runtimeapi.PortMapping) (dockernat.PortSet, map[dockernat.Port][]dockernat.PortBinding) { + exposedPorts := dockernat.PortSet{} + portBindings := map[dockernat.Port][]dockernat.PortBinding{} + for _, port := range pm { + exteriorPort := port.HostPort + if exteriorPort == 0 { + // No need to do port binding when HostPort is not specified + continue + } + interiorPort := port.ContainerPort + // Some of this port stuff is under-documented voodoo. + // See http://stackoverflow.com/questions/20428302/binding-a-port-to-a-host-interface-using-the-rest-api + var protocol string + switch port.Protocol { + case runtimeapi.Protocol_UDP: + protocol = "/udp" + case runtimeapi.Protocol_TCP: + protocol = "/tcp" + case runtimeapi.Protocol_SCTP: + protocol = "/sctp" + default: + klog.InfoS("Unknown protocol, defaulting to TCP", "protocol", port.Protocol) + protocol = "/tcp" + } + + dockerPort := dockernat.Port(strconv.Itoa(int(interiorPort)) + protocol) + exposedPorts[dockerPort] = struct{}{} + + hostBinding := dockernat.PortBinding{ + HostPort: strconv.Itoa(int(exteriorPort)), + HostIP: port.HostIp, + } + + // Allow multiple host ports bind to same docker port + if existedBindings, ok := portBindings[dockerPort]; ok { + // If a docker port already map to a host port, just append the host ports + portBindings[dockerPort] = append(existedBindings, hostBinding) + } else { + // Otherwise, it's fresh new port binding + portBindings[dockerPort] = []dockernat.PortBinding{ + hostBinding, + } + } + } + return exposedPorts, portBindings +} + +// getApparmorSecurityOpts gets apparmor options from container config. +func getApparmorSecurityOpts(sc *runtimeapi.LinuxContainerSecurityContext, separator rune) ([]string, error) { + if sc == nil || sc.ApparmorProfile == "" { + return nil, nil + } + + appArmorOpts, err := getAppArmorOpts(sc.ApparmorProfile) + if err != nil { + return nil, err + } + + fmtOpts := fmtDockerOpts(appArmorOpts, separator) + return fmtOpts, nil +} + +// dockerFilter wraps around dockerfilters.Args and provides methods to modify +// the filter easily. +type dockerFilter struct { + args *dockerfilters.Args +} + +func newDockerFilter(args *dockerfilters.Args) *dockerFilter { + return &dockerFilter{args: args} +} + +func (f *dockerFilter) Add(key, value string) { + f.args.Add(key, value) +} + +func (f *dockerFilter) AddLabel(key, value string) { + f.Add("label", fmt.Sprintf("%s=%s", key, value)) +} + +// parseUserFromImageUser splits the user out of an user:group string. +func parseUserFromImageUser(id string) string { + if id == "" { + return id + } + // split instances where the id may contain user:group + if strings.Contains(id, ":") { + return strings.Split(id, ":")[0] + } + // no group, just return the id + return id +} + +// getUserFromImageUser gets uid or user name of the image user. +// If user is numeric, it will be treated as uid; or else, it is treated as user name. +func getUserFromImageUser(imageUser string) (*int64, string) { + user := parseUserFromImageUser(imageUser) + // return both nil if user is not specified in the image. + if user == "" { + return nil, "" + } + // user could be either uid or user name. Try to interpret as numeric uid. + uid, err := strconv.ParseInt(user, 10, 64) + if err != nil { + // If user is non numeric, assume it's user name. + return nil, user + } + // If user is a numeric uid. + return &uid, "" +} + +// See #33189. If the previous attempt to create a sandbox container name FOO +// failed due to "device or resource busy", it is possible that docker did +// not clean up properly and has inconsistent internal state. Docker would +// not report the existence of FOO, but would complain if user wants to +// create a new container named FOO. To work around this, we parse the error +// message to identify failure caused by naming conflict, and try to remove +// the old container FOO. +// See #40443. Sometimes even removal may fail with "no such container" error. +// In that case we have to create the container with a randomized name. +// TODO(random-liu): Remove this work around after docker 1.11 is deprecated. +// TODO(#33189): Monitor the tests to see if the fix is sufficient. +func recoverFromCreationConflictIfNeeded(client libdocker.Interface, createConfig dockertypes.ContainerCreateConfig, err error) (*dockercontainer.ContainerCreateCreatedBody, error) { + matches := conflictRE.FindStringSubmatch(err.Error()) + if len(matches) != 2 { + return nil, err + } + + id := matches[1] + klog.InfoS("Unable to create pod sandbox due to conflict. Attempting to remove sandbox", "containerID", id) + rmErr := client.RemoveContainer(id, dockertypes.ContainerRemoveOptions{RemoveVolumes: true}) + if rmErr == nil { + klog.V(2).InfoS("Successfully removed conflicting container", "containerID", id) + return nil, err + } + klog.ErrorS(rmErr, "Failed to remove the conflicting container", "containerID", id) + // Return if the error is not container not found error. + if !libdocker.IsContainerNotFoundError(rmErr) { + return nil, err + } + + // randomize the name to avoid conflict. + createConfig.Name = randomizeName(createConfig.Name) + klog.V(2).InfoS("Create the container with the randomized name", "containerName", createConfig.Name) + return client.CreateContainer(createConfig) +} + +// transformStartContainerError does regex parsing on returned error +// for where container runtimes are giving less than ideal error messages. +func transformStartContainerError(err error) error { + if err == nil { + return nil + } + matches := startRE.FindStringSubmatch(err.Error()) + if len(matches) > 0 { + return fmt.Errorf("executable not found in $PATH") + } + return err +} + +// ensureSandboxImageExists pulls the sandbox image when it's not present. +func ensureSandboxImageExists(client libdocker.Interface, image string) error { + _, err := client.InspectImageByRef(image) + if err == nil { + return nil + } + if !libdocker.IsImageNotFoundError(err) { + return fmt.Errorf("failed to inspect sandbox image %q: %v", image, err) + } + + repoToPull, _, _, err := parsers.ParseImageName(image) + if err != nil { + return err + } + + keyring := credentialprovider.NewDockerKeyring() + creds, withCredentials := keyring.Lookup(repoToPull) + if !withCredentials { + klog.V(3).InfoS("Pulling the image without credentials", "image", image) + + err := client.PullImage(image, dockertypes.AuthConfig{}, dockertypes.ImagePullOptions{}) + if err != nil { + return fmt.Errorf("failed pulling image %q: %v", image, err) + } + + return nil + } + + var pullErrs []error + for _, currentCreds := range creds { + authConfig := dockertypes.AuthConfig(currentCreds) + err := client.PullImage(image, authConfig, dockertypes.ImagePullOptions{}) + // If there was no error, return success + if err == nil { + return nil + } + + pullErrs = append(pullErrs, err) + } + + return utilerrors.NewAggregate(pullErrs) +} + +func getAppArmorOpts(profile string) ([]dockerOpt, error) { + if profile == "" || profile == v1.AppArmorBetaProfileRuntimeDefault { + // The docker applies the default profile by default. + return nil, nil + } + + // Return unconfined profile explicitly + if profile == v1.AppArmorBetaProfileNameUnconfined { + return []dockerOpt{{"apparmor", v1.AppArmorBetaProfileNameUnconfined, ""}}, nil + } + + // Assume validation has already happened. + profileName := strings.TrimPrefix(profile, v1.AppArmorBetaProfileNamePrefix) + return []dockerOpt{{"apparmor", profileName, ""}}, nil +} + +// fmtDockerOpts formats the docker security options using the given separator. +func fmtDockerOpts(opts []dockerOpt, sep rune) []string { + fmtOpts := make([]string, len(opts)) + for i, opt := range opts { + fmtOpts[i] = fmt.Sprintf("%s%c%s", opt.key, sep, opt.value) + } + return fmtOpts +} + +type dockerOpt struct { + // The key-value pair passed to docker. + key, value string + // The alternative value to use in log/event messages. + msg string +} + +// Expose key/value from dockerOpt. +func (d dockerOpt) GetKV() (string, string) { + return d.key, d.value +} + +// sharedWriteLimiter limits the total output written across one or more streams. +type sharedWriteLimiter struct { + delegate io.Writer + limit *int64 +} + +func (w sharedWriteLimiter) Write(p []byte) (int, error) { + if len(p) == 0 { + return 0, nil + } + limit := atomic.LoadInt64(w.limit) + if limit <= 0 { + return 0, errMaximumWrite + } + var truncated bool + if limit < int64(len(p)) { + p = p[0:limit] + truncated = true + } + n, err := w.delegate.Write(p) + if n > 0 { + atomic.AddInt64(w.limit, -1*int64(n)) + } + if err == nil && truncated { + err = errMaximumWrite + } + return n, err +} + +func sharedLimitWriter(w io.Writer, limit *int64) io.Writer { + if w == nil { + return nil + } + return &sharedWriteLimiter{ + delegate: w, + limit: limit, + } +} + +var errMaximumWrite = errors.New("maximum write") diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers_linux.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers_linux.go new file mode 100644 index 000000000000..154c503a1cac --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers_linux.go @@ -0,0 +1,158 @@ +//go:build linux && !dockerless +// +build linux,!dockerless + +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dockershim + +import ( + "bytes" + "crypto/md5" + "encoding/json" + "fmt" + "io/ioutil" + "path/filepath" + "strings" + + "github.com/blang/semver" + dockertypes "github.com/docker/docker/api/types" + dockercontainer "github.com/docker/docker/api/types/container" + v1 "k8s.io/api/core/v1" + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" +) + +// DefaultMemorySwap always returns 0 for no memory swap in a sandbox +func DefaultMemorySwap() int64 { + return 0 +} + +func (ds *dockerService) getSecurityOpts(seccompProfile string, separator rune) ([]string, error) { + // Apply seccomp options. + seccompSecurityOpts, err := getSeccompSecurityOpts(seccompProfile, separator) + if err != nil { + return nil, fmt.Errorf("failed to generate seccomp security options for container: %v", err) + } + + return seccompSecurityOpts, nil +} + +func (ds *dockerService) getSandBoxSecurityOpts(separator rune) []string { + // run sandbox with no-new-privileges and using runtime/default + // sending no "seccomp=" means docker will use default profile + return []string{"no-new-privileges"} +} + +func getSeccompDockerOpts(seccompProfile string) ([]dockerOpt, error) { + if seccompProfile == "" || seccompProfile == v1.SeccompProfileNameUnconfined { + // return early the default + return defaultSeccompOpt, nil + } + + if seccompProfile == v1.SeccompProfileRuntimeDefault || seccompProfile == v1.DeprecatedSeccompProfileDockerDefault { + // return nil so docker will load the default seccomp profile + return nil, nil + } + + if !strings.HasPrefix(seccompProfile, v1.SeccompLocalhostProfileNamePrefix) { + return nil, fmt.Errorf("unknown seccomp profile option: %s", seccompProfile) + } + + // get the full path of seccomp profile when prefixed with 'localhost/'. + fname := strings.TrimPrefix(seccompProfile, v1.SeccompLocalhostProfileNamePrefix) + if !filepath.IsAbs(fname) { + return nil, fmt.Errorf("seccomp profile path must be absolute, but got relative path %q", fname) + } + file, err := ioutil.ReadFile(filepath.FromSlash(fname)) + if err != nil { + return nil, fmt.Errorf("cannot load seccomp profile %q: %v", fname, err) + } + + b := bytes.NewBuffer(nil) + if err := json.Compact(b, file); err != nil { + return nil, err + } + // Rather than the full profile, just put the filename & md5sum in the event log. + msg := fmt.Sprintf("%s(md5:%x)", fname, md5.Sum(file)) + + return []dockerOpt{{"seccomp", b.String(), msg}}, nil +} + +// getSeccompSecurityOpts gets container seccomp options from container seccomp profile. +// It is an experimental feature and may be promoted to official runtime api in the future. +func getSeccompSecurityOpts(seccompProfile string, separator rune) ([]string, error) { + seccompOpts, err := getSeccompDockerOpts(seccompProfile) + if err != nil { + return nil, err + } + return fmtDockerOpts(seccompOpts, separator), nil +} + +func (ds *dockerService) updateCreateConfig( + createConfig *dockertypes.ContainerCreateConfig, + config *runtimeapi.ContainerConfig, + sandboxConfig *runtimeapi.PodSandboxConfig, + podSandboxID string, securityOptSep rune, apiVersion *semver.Version) error { + // Apply Linux-specific options if applicable. + if lc := config.GetLinux(); lc != nil { + // TODO: Check if the units are correct. + // TODO: Can we assume the defaults are sane? + rOpts := lc.GetResources() + if rOpts != nil { + createConfig.HostConfig.Resources = dockercontainer.Resources{ + // Memory and MemorySwap are set to the same value, this prevents containers from using any swap. + Memory: rOpts.MemoryLimitInBytes, + MemorySwap: rOpts.MemoryLimitInBytes, + CPUShares: rOpts.CpuShares, + CPUQuota: rOpts.CpuQuota, + CPUPeriod: rOpts.CpuPeriod, + CpusetCpus: rOpts.CpusetCpus, + CpusetMems: rOpts.CpusetMems, + } + createConfig.HostConfig.OomScoreAdj = int(rOpts.OomScoreAdj) + } + // Note: ShmSize is handled in kube_docker_client.go + + // Apply security context. + if err := applyContainerSecurityContext(lc, podSandboxID, createConfig.Config, createConfig.HostConfig, securityOptSep); err != nil { + return fmt.Errorf("failed to apply container security context for container %q: %v", config.Metadata.Name, err) + } + } + + // Apply cgroupsParent derived from the sandbox config. + if lc := sandboxConfig.GetLinux(); lc != nil { + // Apply Cgroup options. + cgroupParent, err := ds.GenerateExpectedCgroupParent(lc.CgroupParent) + if err != nil { + return fmt.Errorf("failed to generate cgroup parent in expected syntax for container %q: %v", config.Metadata.Name, err) + } + createConfig.HostConfig.CgroupParent = cgroupParent + } + + return nil +} + +func (ds *dockerService) determinePodIPBySandboxID(uid string) []string { + return nil +} + +func getNetworkNamespace(c *dockertypes.ContainerJSON) (string, error) { + if c.State.Pid == 0 { + // Docker reports pid 0 for an exited container. + return "", fmt.Errorf("cannot find network namespace for the terminated container %q", c.ID) + } + return fmt.Sprintf(dockerNetNSFmt, c.State.Pid), nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers_unsupported.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers_unsupported.go new file mode 100644 index 000000000000..3c655c5551f0 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers_unsupported.go @@ -0,0 +1,62 @@ +//go:build !linux && !windows && !dockerless +// +build !linux,!windows,!dockerless + +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dockershim + +import ( + "fmt" + + "github.com/blang/semver" + dockertypes "github.com/docker/docker/api/types" + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + "k8s.io/klog/v2" +) + +// DefaultMemorySwap always returns -1 for no memory swap in a sandbox +func DefaultMemorySwap() int64 { + return -1 +} + +func (ds *dockerService) getSecurityOpts(seccompProfile string, separator rune) ([]string, error) { + klog.InfoS("getSecurityOpts is unsupported in this build") + return nil, nil +} + +func (ds *dockerService) getSandBoxSecurityOpts(separator rune) []string { + klog.InfoS("getSandBoxSecurityOpts is unsupported in this build") + return nil +} + +func (ds *dockerService) updateCreateConfig( + createConfig *dockertypes.ContainerCreateConfig, + config *runtimeapi.ContainerConfig, + sandboxConfig *runtimeapi.PodSandboxConfig, + podSandboxID string, securityOptSep rune, apiVersion *semver.Version) error { + klog.InfoS("updateCreateConfig is unsupported in this build") + return nil +} + +func (ds *dockerService) determinePodIPBySandboxID(uid string) []string { + klog.InfoS("determinePodIPBySandboxID is unsupported in this build") + return nil +} + +func getNetworkNamespace(c *dockertypes.ContainerJSON) (string, error) { + return "", fmt.Errorf("unsupported platform") +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers_windows.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers_windows.go new file mode 100644 index 000000000000..1fd8155bec4d --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/helpers_windows.go @@ -0,0 +1,161 @@ +//go:build windows && !dockerless +// +build windows,!dockerless + +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dockershim + +import ( + "os" + "runtime" + + "github.com/blang/semver" + dockertypes "github.com/docker/docker/api/types" + dockercontainer "github.com/docker/docker/api/types/container" + dockerfilters "github.com/docker/docker/api/types/filters" + "k8s.io/klog/v2" + + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" +) + +// DefaultMemorySwap always returns 0 for no memory swap in a sandbox +func DefaultMemorySwap() int64 { + return 0 +} + +func (ds *dockerService) getSecurityOpts(seccompProfile string, separator rune) ([]string, error) { + if seccompProfile != "" { + klog.InfoS("seccomp annotations are not supported on windows") + } + return nil, nil +} + +func (ds *dockerService) getSandBoxSecurityOpts(separator rune) []string { + // Currently, Windows container does not support privileged mode, so no no-new-privileges flag can be returned directly like Linux + // If the future Windows container has new support for privileged mode, we can adjust it here + return nil +} + +func (ds *dockerService) updateCreateConfig( + createConfig *dockertypes.ContainerCreateConfig, + config *runtimeapi.ContainerConfig, + sandboxConfig *runtimeapi.PodSandboxConfig, + podSandboxID string, securityOptSep rune, apiVersion *semver.Version) error { + if networkMode := os.Getenv("CONTAINER_NETWORK"); networkMode != "" { + createConfig.HostConfig.NetworkMode = dockercontainer.NetworkMode(networkMode) + } else { + // Todo: Refactor this call in future for calling methods directly in security_context.go + modifyHostOptionsForContainer(nil, podSandboxID, createConfig.HostConfig) + } + + // Apply Windows-specific options if applicable. + if wc := config.GetWindows(); wc != nil { + rOpts := wc.GetResources() + if rOpts != nil { + // Precedence and units for these are described at length in kuberuntime_container_windows.go - generateWindowsContainerConfig() + createConfig.HostConfig.Resources = dockercontainer.Resources{ + Memory: rOpts.MemoryLimitInBytes, + CPUShares: rOpts.CpuShares, + CPUCount: rOpts.CpuCount, + NanoCPUs: rOpts.CpuMaximum * int64(runtime.NumCPU()) * (1e9 / 10000), + } + } + + // Apply security context. + applyWindowsContainerSecurityContext(wc.GetSecurityContext(), createConfig.Config, createConfig.HostConfig) + } + + return nil +} + +// applyWindowsContainerSecurityContext updates docker container options according to security context. +func applyWindowsContainerSecurityContext(wsc *runtimeapi.WindowsContainerSecurityContext, config *dockercontainer.Config, hc *dockercontainer.HostConfig) { + if wsc == nil { + return + } + + if wsc.GetRunAsUsername() != "" { + config.User = wsc.GetRunAsUsername() + } +} + +func (ds *dockerService) determinePodIPBySandboxID(sandboxID string) []string { + opts := dockertypes.ContainerListOptions{ + All: true, + Filters: dockerfilters.NewArgs(), + } + + f := newDockerFilter(&opts.Filters) + f.AddLabel(containerTypeLabelKey, containerTypeLabelContainer) + f.AddLabel(sandboxIDLabelKey, sandboxID) + containers, err := ds.client.ListContainers(opts) + if err != nil { + return nil + } + + for _, c := range containers { + r, err := ds.client.InspectContainer(c.ID) + if err != nil { + continue + } + + // Versions and feature support + // ============================ + // Windows version == Windows Server, Version 1709, Supports both sandbox and non-sandbox case + // Windows version == Windows Server 2016 Support only non-sandbox case + // Windows version < Windows Server 2016 is Not Supported + + // Sandbox support in Windows mandates CNI Plugin. + // Presence of CONTAINER_NETWORK flag is considered as non-Sandbox cases here + + // Todo: Add a kernel version check for more validation + + if networkMode := os.Getenv("CONTAINER_NETWORK"); networkMode == "" { + // On Windows, every container that is created in a Sandbox, needs to invoke CNI plugin again for adding the Network, + // with the shared container name as NetNS info, + // This is passed down to the platform to replicate some necessary information to the new container + + // + // This place is chosen as a hack for now, since ds.getIP would end up calling CNI's addToNetwork + // That is why addToNetwork is required to be idempotent + + // Instead of relying on this call, an explicit call to addToNetwork should be + // done immediately after ContainerCreation, in case of Windows only. TBD Issue # to handle this + + // Do not return any IP, so that we would continue and get the IP of the Sandbox. + // Windows 1709 and 1803 doesn't have the Namespace support, so getIP() is called + // to replicate the DNS registry key to the Workload container (IP/Gateway/MAC is + // set separately than DNS). + // TODO(feiskyer): remove this workaround after Namespace is supported in Windows RS5. + ds.getIPs(sandboxID, r) + } else { + // ds.getIP will call the CNI plugin to fetch the IP + if containerIPs := ds.getIPs(c.ID, r); len(containerIPs) != 0 { + return containerIPs + } + } + } + + return nil +} + +func getNetworkNamespace(c *dockertypes.ContainerJSON) (string, error) { + // Currently in windows there is no identifier exposed for network namespace + // Like docker, the referenced container id is used to figure out the network namespace id internally by the platform + // so returning the docker networkMode (which holds container: for network namespace here + return string(c.HostConfig.NetworkMode), nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/client.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/client.go new file mode 100644 index 000000000000..a1f3feb44ced --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/client.go @@ -0,0 +1,101 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +//go:generate mockgen -copyright_file=$BUILD_TAG_FILE -source=client.go -destination=testing/mock_client.go -package=testing Interface +package libdocker + +import ( + "os" + "time" + + dockertypes "github.com/docker/docker/api/types" + dockercontainer "github.com/docker/docker/api/types/container" + dockerimagetypes "github.com/docker/docker/api/types/image" + dockerapi "github.com/docker/docker/client" + "k8s.io/klog/v2" +) + +const ( + // https://docs.docker.com/engine/reference/api/docker_remote_api/ + // docker version should be at least 1.13.1 + MinimumDockerAPIVersion = "1.26.0" + + // Status of a container returned by ListContainers. + StatusRunningPrefix = "Up" + StatusCreatedPrefix = "Created" + StatusExitedPrefix = "Exited" + + // Fake docker endpoint + FakeDockerEndpoint = "fake://" +) + +// Interface is an abstract interface for testability. It abstracts the interface of docker client. +type Interface interface { + ListContainers(options dockertypes.ContainerListOptions) ([]dockertypes.Container, error) + InspectContainer(id string) (*dockertypes.ContainerJSON, error) + InspectContainerWithSize(id string) (*dockertypes.ContainerJSON, error) + CreateContainer(dockertypes.ContainerCreateConfig) (*dockercontainer.ContainerCreateCreatedBody, error) + StartContainer(id string) error + StopContainer(id string, timeout time.Duration) error + UpdateContainerResources(id string, updateConfig dockercontainer.UpdateConfig) error + RemoveContainer(id string, opts dockertypes.ContainerRemoveOptions) error + InspectImageByRef(imageRef string) (*dockertypes.ImageInspect, error) + InspectImageByID(imageID string) (*dockertypes.ImageInspect, error) + ListImages(opts dockertypes.ImageListOptions) ([]dockertypes.ImageSummary, error) + PullImage(image string, auth dockertypes.AuthConfig, opts dockertypes.ImagePullOptions) error + RemoveImage(image string, opts dockertypes.ImageRemoveOptions) ([]dockertypes.ImageDeleteResponseItem, error) + ImageHistory(id string) ([]dockerimagetypes.HistoryResponseItem, error) + Logs(string, dockertypes.ContainerLogsOptions, StreamOptions) error + Version() (*dockertypes.Version, error) + Info() (*dockertypes.Info, error) + CreateExec(string, dockertypes.ExecConfig) (*dockertypes.IDResponse, error) + StartExec(string, dockertypes.ExecStartCheck, StreamOptions) error + InspectExec(id string) (*dockertypes.ContainerExecInspect, error) + AttachToContainer(string, dockertypes.ContainerAttachOptions, StreamOptions) error + ResizeContainerTTY(id string, height, width uint) error + ResizeExecTTY(id string, height, width uint) error + GetContainerStats(id string) (*dockertypes.StatsJSON, error) +} + +// Get a *dockerapi.Client, either using the endpoint passed in, or using +// DOCKER_HOST, DOCKER_TLS_VERIFY, and DOCKER_CERT path per their spec +func getDockerClient(dockerEndpoint string) (*dockerapi.Client, error) { + if len(dockerEndpoint) > 0 { + klog.InfoS("Connecting to docker on the dockerEndpoint", "endpoint", dockerEndpoint) + return dockerapi.NewClientWithOpts(dockerapi.WithHost(dockerEndpoint), dockerapi.WithVersion("")) + } + return dockerapi.NewClientWithOpts(dockerapi.FromEnv) +} + +// ConnectToDockerOrDie creates docker client connecting to docker daemon. +// If the endpoint passed in is "fake://", a fake docker client +// will be returned. The program exits if error occurs. The requestTimeout +// is the timeout for docker requests. If timeout is exceeded, the request +// will be cancelled and throw out an error. If requestTimeout is 0, a default +// value will be applied. +func ConnectToDockerOrDie(dockerEndpoint string, requestTimeout, imagePullProgressDeadline time.Duration) Interface { + client, err := getDockerClient(dockerEndpoint) + if err != nil { + klog.ErrorS(err, "Couldn't connect to docker") + os.Exit(1) + + } + klog.InfoS("Start docker client with request timeout", "timeout", requestTimeout) + return newKubeDockerClient(client, requestTimeout, imagePullProgressDeadline) +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/fake_client.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/fake_client.go new file mode 100644 index 000000000000..2b9937b98e57 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/fake_client.go @@ -0,0 +1,854 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package libdocker + +import ( + "encoding/json" + "fmt" + "hash/fnv" + "math/rand" + "os" + "reflect" + "strconv" + "strings" + "sync" + "time" + + dockertypes "github.com/docker/docker/api/types" + dockercontainer "github.com/docker/docker/api/types/container" + dockerimagetypes "github.com/docker/docker/api/types/image" + + v1 "k8s.io/api/core/v1" + "k8s.io/utils/clock" +) + +type CalledDetail struct { + name string + arguments []interface{} +} + +// NewCalledDetail create a new call detail item. +func NewCalledDetail(name string, arguments []interface{}) CalledDetail { + return CalledDetail{name: name, arguments: arguments} +} + +// FakeDockerClient is a simple fake docker client, so that kubelet can be run for testing without requiring a real docker setup. +type FakeDockerClient struct { + sync.Mutex + Clock clock.Clock + RunningContainerList []dockertypes.Container + ExitedContainerList []dockertypes.Container + ContainerMap map[string]*dockertypes.ContainerJSON + ImageInspects map[string]*dockertypes.ImageInspect + Images []dockertypes.ImageSummary + ImageIDsNeedingAuth map[string]dockertypes.AuthConfig + Errors map[string]error + called []CalledDetail + pulled []string + EnableTrace bool + RandGenerator *rand.Rand + + // Created, Started, Stopped and Removed all contain container docker ID + Created []string + Started []string + Stopped []string + Removed []string + // Images pulled by ref (name or ID). + ImagesPulled []string + + VersionInfo dockertypes.Version + Information dockertypes.Info + ExecInspect *dockertypes.ContainerExecInspect + execCmd []string + EnableSleep bool + ImageHistoryMap map[string][]dockerimagetypes.HistoryResponseItem + ContainerStatsMap map[string]*dockertypes.StatsJSON +} + +const ( + // Notice that if someday we also have minimum docker version requirement, this should also be updated. + fakeDockerVersion = "1.13.1" + + fakeImageSize = 1024 + + // Docker prepends '/' to the container name. + dockerNamePrefix = "/" +) + +func NewFakeDockerClient() *FakeDockerClient { + return &FakeDockerClient{ + // Docker's API version does not include the patch number. + VersionInfo: dockertypes.Version{Version: fakeDockerVersion, APIVersion: strings.TrimSuffix(MinimumDockerAPIVersion, ".0")}, + Errors: make(map[string]error), + ContainerMap: make(map[string]*dockertypes.ContainerJSON), + Clock: clock.RealClock{}, + // default this to true, so that we trace calls, image pulls and container lifecycle + EnableTrace: true, + ExecInspect: &dockertypes.ContainerExecInspect{}, + ImageInspects: make(map[string]*dockertypes.ImageInspect), + ImageIDsNeedingAuth: make(map[string]dockertypes.AuthConfig), + RandGenerator: rand.New(rand.NewSource(time.Now().UnixNano())), + } +} + +func (f *FakeDockerClient) WithClock(c clock.Clock) *FakeDockerClient { + f.Lock() + defer f.Unlock() + f.Clock = c + return f +} + +func (f *FakeDockerClient) WithVersion(version, apiVersion string) *FakeDockerClient { + f.Lock() + defer f.Unlock() + f.VersionInfo = dockertypes.Version{Version: version, APIVersion: apiVersion} + return f +} + +func (f *FakeDockerClient) WithTraceDisabled() *FakeDockerClient { + f.Lock() + defer f.Unlock() + f.EnableTrace = false + return f +} + +func (f *FakeDockerClient) WithRandSource(source rand.Source) *FakeDockerClient { + f.Lock() + defer f.Unlock() + f.RandGenerator = rand.New(source) + return f +} + +func (f *FakeDockerClient) appendCalled(callDetail CalledDetail) { + if f.EnableTrace { + f.called = append(f.called, callDetail) + } +} + +func (f *FakeDockerClient) appendPulled(pull string) { + if f.EnableTrace { + f.pulled = append(f.pulled, pull) + } +} + +func (f *FakeDockerClient) appendContainerTrace(traceCategory string, containerName string) { + if !f.EnableTrace { + return + } + switch traceCategory { + case "Created": + f.Created = append(f.Created, containerName) + case "Started": + f.Started = append(f.Started, containerName) + case "Stopped": + f.Stopped = append(f.Stopped, containerName) + case "Removed": + f.Removed = append(f.Removed, containerName) + } +} + +func (f *FakeDockerClient) InjectError(fn string, err error) { + f.Lock() + defer f.Unlock() + f.Errors[fn] = err +} + +func (f *FakeDockerClient) InjectErrors(errs map[string]error) { + f.Lock() + defer f.Unlock() + for fn, err := range errs { + f.Errors[fn] = err + } +} + +func (f *FakeDockerClient) ClearErrors() { + f.Lock() + defer f.Unlock() + f.Errors = map[string]error{} +} + +func (f *FakeDockerClient) ClearCalls() { + f.Lock() + defer f.Unlock() + f.called = []CalledDetail{} + f.pulled = []string{} + f.Created = []string{} + f.Started = []string{} + f.Stopped = []string{} + f.Removed = []string{} +} + +func (f *FakeDockerClient) getCalledNames() []string { + names := []string{} + for _, detail := range f.called { + names = append(names, detail.name) + } + return names +} + +// Because the new data type returned by engine-api is too complex to manually initialize, we need a +// fake container which is easier to initialize. +type FakeContainer struct { + ID string + Name string + Running bool + ExitCode int + Pid int + CreatedAt time.Time + StartedAt time.Time + FinishedAt time.Time + Config *dockercontainer.Config + HostConfig *dockercontainer.HostConfig +} + +// convertFakeContainer converts the fake container to real container +func convertFakeContainer(f *FakeContainer) *dockertypes.ContainerJSON { + if f.Config == nil { + f.Config = &dockercontainer.Config{} + } + if f.HostConfig == nil { + f.HostConfig = &dockercontainer.HostConfig{} + } + fakeRWSize := int64(40) + return &dockertypes.ContainerJSON{ + ContainerJSONBase: &dockertypes.ContainerJSONBase{ + ID: f.ID, + Name: f.Name, + Image: f.Config.Image, + State: &dockertypes.ContainerState{ + Running: f.Running, + ExitCode: f.ExitCode, + Pid: f.Pid, + StartedAt: dockerTimestampToString(f.StartedAt), + FinishedAt: dockerTimestampToString(f.FinishedAt), + }, + Created: dockerTimestampToString(f.CreatedAt), + HostConfig: f.HostConfig, + SizeRw: &fakeRWSize, + }, + Config: f.Config, + NetworkSettings: &dockertypes.NetworkSettings{}, + } +} + +func (f *FakeDockerClient) SetFakeContainers(containers []*FakeContainer) { + f.Lock() + defer f.Unlock() + // Reset the lists and the map. + f.ContainerMap = map[string]*dockertypes.ContainerJSON{} + f.RunningContainerList = []dockertypes.Container{} + f.ExitedContainerList = []dockertypes.Container{} + + for i := range containers { + c := containers[i] + f.ContainerMap[c.ID] = convertFakeContainer(c) + container := dockertypes.Container{ + Names: []string{c.Name}, + ID: c.ID, + } + if c.Config != nil { + container.Labels = c.Config.Labels + } + if c.Running { + f.RunningContainerList = append(f.RunningContainerList, container) + } else { + f.ExitedContainerList = append(f.ExitedContainerList, container) + } + } +} + +func (f *FakeDockerClient) AssertCalls(calls []string) (err error) { + f.Lock() + defer f.Unlock() + + if !reflect.DeepEqual(calls, f.getCalledNames()) { + err = fmt.Errorf("expected %#v, got %#v", calls, f.getCalledNames()) + } + + return +} + +func (f *FakeDockerClient) AssertCallDetails(calls ...CalledDetail) (err error) { + f.Lock() + defer f.Unlock() + + if !reflect.DeepEqual(calls, f.called) { + err = fmt.Errorf("expected %#v, got %#v", calls, f.called) + } + + return +} + +func (f *FakeDockerClient) popError(op string) error { + if f.Errors == nil { + return nil + } + err, ok := f.Errors[op] + if ok { + delete(f.Errors, op) + return err + } + return nil +} + +// ListContainers is a test-spy implementation of Interface.ListContainers. +// It adds an entry "list" to the internal method call record. +func (f *FakeDockerClient) ListContainers(options dockertypes.ContainerListOptions) ([]dockertypes.Container, error) { + f.Lock() + defer f.Unlock() + f.appendCalled(CalledDetail{name: "list"}) + err := f.popError("list") + containerList := append([]dockertypes.Container{}, f.RunningContainerList...) + if options.All { + // Although the container is not sorted, but the container with the same name should be in order, + // that is enough for us now. + containerList = append(containerList, f.ExitedContainerList...) + } + // Filters containers with id, only support 1 id. + idFilters := options.Filters.Get("id") + if len(idFilters) != 0 { + var filtered []dockertypes.Container + for _, container := range containerList { + for _, idFilter := range idFilters { + if container.ID == idFilter { + filtered = append(filtered, container) + break + } + } + } + containerList = filtered + } + // Filters containers with status, only support 1 status. + statusFilters := options.Filters.Get("status") + if len(statusFilters) == 1 { + var filtered []dockertypes.Container + for _, container := range containerList { + for _, statusFilter := range statusFilters { + if toDockerContainerStatus(container.Status) == statusFilter { + filtered = append(filtered, container) + break + } + } + } + containerList = filtered + } + // Filters containers with label filter. + labelFilters := options.Filters.Get("label") + if len(labelFilters) != 0 { + var filtered []dockertypes.Container + for _, container := range containerList { + match := true + for _, labelFilter := range labelFilters { + kv := strings.Split(labelFilter, "=") + if len(kv) != 2 { + return nil, fmt.Errorf("invalid label filter %q", labelFilter) + } + if container.Labels[kv[0]] != kv[1] { + match = false + break + } + } + if match { + filtered = append(filtered, container) + } + } + containerList = filtered + } + return containerList, err +} + +func toDockerContainerStatus(state string) string { + switch { + case strings.HasPrefix(state, StatusCreatedPrefix): + return "created" + case strings.HasPrefix(state, StatusRunningPrefix): + return "running" + case strings.HasPrefix(state, StatusExitedPrefix): + return "exited" + default: + return "unknown" + } +} + +// InspectContainer is a test-spy implementation of Interface.InspectContainer. +// It adds an entry "inspect" to the internal method call record. +func (f *FakeDockerClient) InspectContainer(id string) (*dockertypes.ContainerJSON, error) { + f.Lock() + defer f.Unlock() + f.appendCalled(CalledDetail{name: "inspect_container"}) + err := f.popError("inspect_container") + if container, ok := f.ContainerMap[id]; ok { + return container, err + } + if err != nil { + // Use the custom error if it exists. + return nil, err + } + return nil, fmt.Errorf("container %q not found", id) +} + +// InspectContainerWithSize is a test-spy implementation of Interface.InspectContainerWithSize. +// It adds an entry "inspect" to the internal method call record. +func (f *FakeDockerClient) InspectContainerWithSize(id string) (*dockertypes.ContainerJSON, error) { + f.Lock() + defer f.Unlock() + f.appendCalled(CalledDetail{name: "inspect_container_withsize"}) + err := f.popError("inspect_container_withsize") + if container, ok := f.ContainerMap[id]; ok { + return container, err + } + if err != nil { + // Use the custom error if it exists. + return nil, err + } + return nil, fmt.Errorf("container %q not found", id) +} + +// InspectImageByRef is a test-spy implementation of Interface.InspectImageByRef. +// It adds an entry "inspect" to the internal method call record. +func (f *FakeDockerClient) InspectImageByRef(name string) (*dockertypes.ImageInspect, error) { + f.Lock() + defer f.Unlock() + f.appendCalled(CalledDetail{name: "inspect_image"}) + if err := f.popError("inspect_image"); err != nil { + return nil, err + } + if result, ok := f.ImageInspects[name]; ok { + return result, nil + } + return nil, ImageNotFoundError{name} +} + +// InspectImageByID is a test-spy implementation of Interface.InspectImageByID. +// It adds an entry "inspect" to the internal method call record. +func (f *FakeDockerClient) InspectImageByID(name string) (*dockertypes.ImageInspect, error) { + f.Lock() + defer f.Unlock() + f.appendCalled(CalledDetail{name: "inspect_image"}) + if err := f.popError("inspect_image"); err != nil { + return nil, err + } + if result, ok := f.ImageInspects[name]; ok { + return result, nil + } + return nil, ImageNotFoundError{name} +} + +// Sleeps random amount of time with the normal distribution with given mean and stddev +// (in milliseconds), we never sleep less than cutOffMillis +func (f *FakeDockerClient) normalSleep(mean, stdDev, cutOffMillis int) { + if !f.EnableSleep { + return + } + cutoff := (time.Duration)(cutOffMillis) * time.Millisecond + delay := (time.Duration)(f.RandGenerator.NormFloat64()*float64(stdDev)+float64(mean)) * time.Millisecond + if delay < cutoff { + delay = cutoff + } + time.Sleep(delay) +} + +// GetFakeContainerID generates a fake container id from container name with a hash. +func GetFakeContainerID(name string) string { + hash := fnv.New64a() + hash.Write([]byte(name)) + return strconv.FormatUint(hash.Sum64(), 16) +} + +// CreateContainer is a test-spy implementation of Interface.CreateContainer. +// It adds an entry "create" to the internal method call record. +func (f *FakeDockerClient) CreateContainer(c dockertypes.ContainerCreateConfig) (*dockercontainer.ContainerCreateCreatedBody, error) { + f.Lock() + defer f.Unlock() + f.appendCalled(CalledDetail{name: "create"}) + if err := f.popError("create"); err != nil { + return nil, err + } + // This is not a very good fake. We'll just add this container's name to the list. + name := dockerNamePrefix + c.Name + id := GetFakeContainerID(name) + f.appendContainerTrace("Created", id) + timestamp := f.Clock.Now() + // The newest container should be in front, because we assume so in GetPodStatus() + f.RunningContainerList = append([]dockertypes.Container{ + {ID: id, Names: []string{name}, Image: c.Config.Image, Created: timestamp.Unix(), State: StatusCreatedPrefix, Labels: c.Config.Labels}, + }, f.RunningContainerList...) + f.ContainerMap[id] = convertFakeContainer(&FakeContainer{ + ID: id, Name: name, Config: c.Config, HostConfig: c.HostConfig, CreatedAt: timestamp}) + + f.normalSleep(100, 25, 25) + + return &dockercontainer.ContainerCreateCreatedBody{ID: id}, nil +} + +// StartContainer is a test-spy implementation of Interface.StartContainer. +// It adds an entry "start" to the internal method call record. +func (f *FakeDockerClient) StartContainer(id string) error { + f.Lock() + defer f.Unlock() + f.appendCalled(CalledDetail{name: "start"}) + if err := f.popError("start"); err != nil { + return err + } + f.appendContainerTrace("Started", id) + container, ok := f.ContainerMap[id] + if container.HostConfig.NetworkMode.IsContainer() { + hostContainerID := container.HostConfig.NetworkMode.ConnectedContainer() + found := false + for _, container := range f.RunningContainerList { + if container.ID == hostContainerID { + found = true + } + } + if !found { + return fmt.Errorf("failed to start container \"%s\": Error response from daemon: cannot join network of a non running container: %s", id, hostContainerID) + } + } + timestamp := f.Clock.Now() + if !ok { + container = convertFakeContainer(&FakeContainer{ID: id, Name: id, CreatedAt: timestamp}) + } + container.State.Running = true + container.State.Pid = os.Getpid() + container.State.StartedAt = dockerTimestampToString(timestamp) + r := f.RandGenerator.Uint32() + container.NetworkSettings.IPAddress = fmt.Sprintf("10.%d.%d.%d", byte(r>>16), byte(r>>8), byte(r)) + f.ContainerMap[id] = container + f.updateContainerStatus(id, StatusRunningPrefix) + f.normalSleep(200, 50, 50) + return nil +} + +// StopContainer is a test-spy implementation of Interface.StopContainer. +// It adds an entry "stop" to the internal method call record. +func (f *FakeDockerClient) StopContainer(id string, timeout time.Duration) error { + f.Lock() + defer f.Unlock() + f.appendCalled(CalledDetail{name: "stop"}) + if err := f.popError("stop"); err != nil { + return err + } + f.appendContainerTrace("Stopped", id) + // Container status should be Updated before container moved to ExitedContainerList + f.updateContainerStatus(id, StatusExitedPrefix) + var newList []dockertypes.Container + for _, container := range f.RunningContainerList { + if container.ID == id { + // The newest exited container should be in front. Because we assume so in GetPodStatus() + f.ExitedContainerList = append([]dockertypes.Container{container}, f.ExitedContainerList...) + continue + } + newList = append(newList, container) + } + f.RunningContainerList = newList + container, ok := f.ContainerMap[id] + if !ok { + container = convertFakeContainer(&FakeContainer{ + ID: id, + Name: id, + Running: false, + StartedAt: time.Now().Add(-time.Second), + FinishedAt: time.Now(), + }) + } else { + container.State.FinishedAt = dockerTimestampToString(f.Clock.Now()) + container.State.Running = false + } + f.ContainerMap[id] = container + f.normalSleep(200, 50, 50) + return nil +} + +func (f *FakeDockerClient) RemoveContainer(id string, opts dockertypes.ContainerRemoveOptions) error { + f.Lock() + defer f.Unlock() + f.appendCalled(CalledDetail{name: "remove"}) + err := f.popError("remove") + if err != nil { + return err + } + for i := range f.ExitedContainerList { + if f.ExitedContainerList[i].ID == id { + delete(f.ContainerMap, id) + f.ExitedContainerList = append(f.ExitedContainerList[:i], f.ExitedContainerList[i+1:]...) + f.appendContainerTrace("Removed", id) + return nil + } + + } + for i := range f.RunningContainerList { + // allow removal of running containers which are not running + if f.RunningContainerList[i].ID == id && !f.ContainerMap[id].State.Running { + delete(f.ContainerMap, id) + f.RunningContainerList = append(f.RunningContainerList[:i], f.RunningContainerList[i+1:]...) + f.appendContainerTrace("Removed", id) + return nil + } + } + // To be a good fake, report error if container is not stopped. + return fmt.Errorf("container not stopped") +} + +func (f *FakeDockerClient) UpdateContainerResources(id string, updateConfig dockercontainer.UpdateConfig) error { + return nil +} + +// Logs is a test-spy implementation of Interface.Logs. +// It adds an entry "logs" to the internal method call record. +func (f *FakeDockerClient) Logs(id string, opts dockertypes.ContainerLogsOptions, sopts StreamOptions) error { + f.Lock() + defer f.Unlock() + f.appendCalled(CalledDetail{name: "logs"}) + return f.popError("logs") +} + +func (f *FakeDockerClient) isAuthorizedForImage(image string, auth dockertypes.AuthConfig) bool { + if reqd, exists := f.ImageIDsNeedingAuth[image]; !exists { + return true // no auth needed + } else { + return auth.Username == reqd.Username && auth.Password == reqd.Password + } +} + +// PullImage is a test-spy implementation of Interface.PullImage. +// It adds an entry "pull" to the internal method call record. +func (f *FakeDockerClient) PullImage(image string, auth dockertypes.AuthConfig, opts dockertypes.ImagePullOptions) error { + f.Lock() + defer f.Unlock() + f.appendCalled(CalledDetail{name: "pull"}) + err := f.popError("pull") + if err == nil { + if !f.isAuthorizedForImage(image, auth) { + return ImageNotFoundError{ID: image} + } + + authJson, _ := json.Marshal(auth) + inspect := createImageInspectFromRef(image) + f.ImageInspects[image] = inspect + f.appendPulled(fmt.Sprintf("%s using %s", image, string(authJson))) + f.Images = append(f.Images, *createImageFromImageInspect(*inspect)) + f.ImagesPulled = append(f.ImagesPulled, image) + } + return err +} + +func (f *FakeDockerClient) Version() (*dockertypes.Version, error) { + f.Lock() + defer f.Unlock() + v := f.VersionInfo + return &v, f.popError("version") +} + +func (f *FakeDockerClient) Info() (*dockertypes.Info, error) { + return &f.Information, nil +} + +func (f *FakeDockerClient) CreateExec(id string, opts dockertypes.ExecConfig) (*dockertypes.IDResponse, error) { + f.Lock() + defer f.Unlock() + f.execCmd = opts.Cmd + f.appendCalled(CalledDetail{name: "create_exec"}) + return &dockertypes.IDResponse{ID: "12345678"}, nil +} + +func (f *FakeDockerClient) StartExec(startExec string, opts dockertypes.ExecStartCheck, sopts StreamOptions) error { + f.Lock() + defer f.Unlock() + f.appendCalled(CalledDetail{name: "start_exec"}) + return nil +} + +func (f *FakeDockerClient) AttachToContainer(id string, opts dockertypes.ContainerAttachOptions, sopts StreamOptions) error { + f.Lock() + defer f.Unlock() + f.appendCalled(CalledDetail{name: "attach"}) + return nil +} + +func (f *FakeDockerClient) InspectExec(id string) (*dockertypes.ContainerExecInspect, error) { + return f.ExecInspect, f.popError("inspect_exec") +} + +func (f *FakeDockerClient) ListImages(opts dockertypes.ImageListOptions) ([]dockertypes.ImageSummary, error) { + f.Lock() + defer f.Unlock() + f.appendCalled(CalledDetail{name: "list_images"}) + err := f.popError("list_images") + return f.Images, err +} + +func (f *FakeDockerClient) RemoveImage(image string, opts dockertypes.ImageRemoveOptions) ([]dockertypes.ImageDeleteResponseItem, error) { + f.Lock() + defer f.Unlock() + f.appendCalled(CalledDetail{name: "remove_image", arguments: []interface{}{image, opts}}) + err := f.popError("remove_image") + if err == nil { + for i := range f.Images { + if f.Images[i].ID == image { + f.Images = append(f.Images[:i], f.Images[i+1:]...) + break + } + } + } + return []dockertypes.ImageDeleteResponseItem{{Deleted: image}}, err +} + +func (f *FakeDockerClient) InjectImages(images []dockertypes.ImageSummary) { + f.Lock() + defer f.Unlock() + f.Images = append(f.Images, images...) + for _, i := range images { + f.ImageInspects[i.ID] = createImageInspectFromImage(i) + } +} + +func (f *FakeDockerClient) MakeImagesPrivate(images []dockertypes.ImageSummary, auth dockertypes.AuthConfig) { + f.Lock() + defer f.Unlock() + for _, i := range images { + f.ImageIDsNeedingAuth[i.ID] = auth + } +} + +func (f *FakeDockerClient) ResetImages() { + f.Lock() + defer f.Unlock() + f.Images = []dockertypes.ImageSummary{} + f.ImageInspects = make(map[string]*dockertypes.ImageInspect) + f.ImageIDsNeedingAuth = make(map[string]dockertypes.AuthConfig) +} + +func (f *FakeDockerClient) InjectImageInspects(inspects []dockertypes.ImageInspect) { + f.Lock() + defer f.Unlock() + for i := range inspects { + inspect := inspects[i] + f.Images = append(f.Images, *createImageFromImageInspect(inspect)) + f.ImageInspects[inspect.ID] = &inspect + } +} + +func (f *FakeDockerClient) updateContainerStatus(id, status string) { + for i := range f.RunningContainerList { + if f.RunningContainerList[i].ID == id { + f.RunningContainerList[i].Status = status + } + } +} + +func (f *FakeDockerClient) ResizeExecTTY(id string, height, width uint) error { + f.Lock() + defer f.Unlock() + f.appendCalled(CalledDetail{name: "resize_exec"}) + return nil +} + +func (f *FakeDockerClient) ResizeContainerTTY(id string, height, width uint) error { + f.Lock() + defer f.Unlock() + f.appendCalled(CalledDetail{name: "resize_container"}) + return nil +} + +func createImageInspectFromRef(ref string) *dockertypes.ImageInspect { + return &dockertypes.ImageInspect{ + ID: ref, + RepoTags: []string{ref}, + // Image size is required to be non-zero for CRI integration. + VirtualSize: fakeImageSize, + Size: fakeImageSize, + Config: &dockercontainer.Config{}, + } +} + +func createImageInspectFromImage(image dockertypes.ImageSummary) *dockertypes.ImageInspect { + return &dockertypes.ImageInspect{ + ID: image.ID, + RepoTags: image.RepoTags, + // Image size is required to be non-zero for CRI integration. + VirtualSize: fakeImageSize, + Size: fakeImageSize, + Config: &dockercontainer.Config{}, + } +} + +func createImageFromImageInspect(inspect dockertypes.ImageInspect) *dockertypes.ImageSummary { + return &dockertypes.ImageSummary{ + ID: inspect.ID, + RepoTags: inspect.RepoTags, + // Image size is required to be non-zero for CRI integration. + VirtualSize: fakeImageSize, + Size: fakeImageSize, + } +} + +// dockerTimestampToString converts the timestamp to string +func dockerTimestampToString(t time.Time) string { + return t.Format(time.RFC3339Nano) +} + +func (f *FakeDockerClient) ImageHistory(id string) ([]dockerimagetypes.HistoryResponseItem, error) { + f.Lock() + defer f.Unlock() + f.appendCalled(CalledDetail{name: "image_history"}) + history := f.ImageHistoryMap[id] + return history, nil +} + +func (f *FakeDockerClient) InjectImageHistory(data map[string][]dockerimagetypes.HistoryResponseItem) { + f.Lock() + defer f.Unlock() + f.ImageHistoryMap = data +} + +// FakeDockerPuller is meant to be a simple wrapper around FakeDockerClient. +// Please do not add more functionalities to it. +type FakeDockerPuller struct { + client Interface +} + +func (f *FakeDockerPuller) Pull(image string, _ []v1.Secret) error { + return f.client.PullImage(image, dockertypes.AuthConfig{}, dockertypes.ImagePullOptions{}) +} + +func (f *FakeDockerPuller) GetImageRef(image string) (string, error) { + _, err := f.client.InspectImageByRef(image) + if err != nil && IsImageNotFoundError(err) { + return "", nil + } + return image, err +} + +func (f *FakeDockerClient) InjectContainerStats(data map[string]*dockertypes.StatsJSON) { + f.Lock() + defer f.Unlock() + f.ContainerStatsMap = data +} + +func (f *FakeDockerClient) GetContainerStats(id string) (*dockertypes.StatsJSON, error) { + f.Lock() + defer f.Unlock() + f.appendCalled(CalledDetail{name: "get_container_stats"}) + stats, ok := f.ContainerStatsMap[id] + if !ok { + return nil, fmt.Errorf("container %q not found", id) + } + return stats, nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/helpers.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/helpers.go new file mode 100644 index 000000000000..57918629ad62 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/helpers.go @@ -0,0 +1,166 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package libdocker + +import ( + "strings" + "time" + + dockerref "github.com/docker/distribution/reference" + dockertypes "github.com/docker/docker/api/types" + godigest "github.com/opencontainers/go-digest" + "k8s.io/klog/v2" +) + +// ParseDockerTimestamp parses the timestamp returned by Interface from string to time.Time +func ParseDockerTimestamp(s string) (time.Time, error) { + // Timestamp returned by Docker is in time.RFC3339Nano format. + return time.Parse(time.RFC3339Nano, s) +} + +// matchImageTagOrSHA checks if the given image specifier is a valid image ref, +// and that it matches the given image. It should fail on things like image IDs +// (config digests) and other digest-only references, but succeed on image names +// (`foo`), tag references (`foo:bar`), and manifest digest references +// (`foo@sha256:xyz`). +func matchImageTagOrSHA(inspected dockertypes.ImageInspect, image string) bool { + // The image string follows the grammar specified here + // https://github.com/docker/distribution/blob/master/reference/reference.go#L4 + named, err := dockerref.ParseNormalizedNamed(image) + if err != nil { + klog.V(4).InfoS("Couldn't parse image reference", "image", image, "err", err) + return false + } + _, isTagged := named.(dockerref.Tagged) + digest, isDigested := named.(dockerref.Digested) + if !isTagged && !isDigested { + // No Tag or SHA specified, so just return what we have + return true + } + + if isTagged { + // Check the RepoTags for a match. + for _, tag := range inspected.RepoTags { + // An image name (without the tag/digest) can be [hostname '/'] component ['/' component]* + // Because either the RepoTag or the name *may* contain the + // hostname or not, we only check for the suffix match. + if strings.HasSuffix(image, tag) || strings.HasSuffix(tag, image) { + return true + } else { + // TODO: We need to remove this hack when project atomic based + // docker distro(s) like centos/fedora/rhel image fix problems on + // their end. + // Say the tag is "docker.io/busybox:latest" + // and the image is "docker.io/library/busybox:latest" + t, err := dockerref.ParseNormalizedNamed(tag) + if err != nil { + continue + } + // the parsed/normalized tag will look like + // reference.taggedReference { + // namedRepository: reference.repository { + // domain: "docker.io", + // path: "library/busybox" + // }, + // tag: "latest" + // } + // If it does not have tags then we bail out + t2, ok := t.(dockerref.Tagged) + if !ok { + continue + } + // normalized tag would look like "docker.io/library/busybox:latest" + // note the library get added in the string + normalizedTag := t2.String() + if normalizedTag == "" { + continue + } + if strings.HasSuffix(image, normalizedTag) || strings.HasSuffix(normalizedTag, image) { + return true + } + } + } + } + + if isDigested { + for _, repoDigest := range inspected.RepoDigests { + named, err := dockerref.ParseNormalizedNamed(repoDigest) + if err != nil { + klog.V(4).InfoS("Couldn't parse image RepoDigest reference", "digest", repoDigest, "err", err) + continue + } + if d, isDigested := named.(dockerref.Digested); isDigested { + if digest.Digest().Algorithm().String() == d.Digest().Algorithm().String() && + digest.Digest().Hex() == d.Digest().Hex() { + return true + } + } + } + + // process the ID as a digest + id, err := godigest.Parse(inspected.ID) + if err != nil { + klog.V(4).InfoS("Couldn't parse image ID reference", "imageID", id, "err", err) + return false + } + if digest.Digest().Algorithm().String() == id.Algorithm().String() && digest.Digest().Hex() == id.Hex() { + return true + } + } + klog.V(4).InfoS("Inspected image ID does not match image", "inspectedImageID", inspected.ID, "image", image) + return false +} + +// matchImageIDOnly checks that the given image specifier is a digest-only +// reference, and that it matches the given image. +func matchImageIDOnly(inspected dockertypes.ImageInspect, image string) bool { + // If the image ref is literally equal to the inspected image's ID, + // just return true here (this might be the case for Docker 1.9, + // where we won't have a digest for the ID) + if inspected.ID == image { + return true + } + + // Otherwise, we should try actual parsing to be more correct + ref, err := dockerref.Parse(image) + if err != nil { + klog.V(4).InfoS("Couldn't parse image reference", "image", image, "err", err) + return false + } + + digest, isDigested := ref.(dockerref.Digested) + if !isDigested { + klog.V(4).InfoS("The image reference was not a digest reference", "image", image) + return false + } + + id, err := godigest.Parse(inspected.ID) + if err != nil { + klog.V(4).InfoS("Couldn't parse image ID reference", "imageID", id, "err", err) + return false + } + + if digest.Digest().Algorithm().String() == id.Algorithm().String() && digest.Digest().Hex() == id.Hex() { + return true + } + + klog.V(4).InfoS("The image reference does not directly refer to the given image's ID", "image", image, "inspectedImageID", inspected.ID) + return false +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/instrumented_client.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/instrumented_client.go new file mode 100644 index 000000000000..1bd9b77ee072 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/instrumented_client.go @@ -0,0 +1,275 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package libdocker + +import ( + "time" + + dockertypes "github.com/docker/docker/api/types" + dockercontainer "github.com/docker/docker/api/types/container" + dockerimagetypes "github.com/docker/docker/api/types/image" + + "k8s.io/kubernetes/pkg/kubelet/dockershim/metrics" +) + +// instrumentedInterface wraps the Interface and records the operations +// and errors metrics. +type instrumentedInterface struct { + client Interface +} + +// NewInstrumentedInterface creates an instrumented Interface from an existing Interface. +func NewInstrumentedInterface(dockerClient Interface) Interface { + return instrumentedInterface{ + client: dockerClient, + } +} + +// recordOperation records the duration of the operation. +func recordOperation(operation string, start time.Time) { + metrics.DockerOperations.WithLabelValues(operation).Inc() + metrics.DockerOperationsLatency.WithLabelValues(operation).Observe(metrics.SinceInSeconds(start)) +} + +// recordError records error for metric if an error occurred. +func recordError(operation string, err error) { + if err != nil { + if _, ok := err.(operationTimeout); ok { + metrics.DockerOperationsTimeout.WithLabelValues(operation).Inc() + } + // Docker operation timeout error is also a docker error, so we don't add else here. + metrics.DockerOperationsErrors.WithLabelValues(operation).Inc() + } +} + +func (in instrumentedInterface) ListContainers(options dockertypes.ContainerListOptions) ([]dockertypes.Container, error) { + const operation = "list_containers" + defer recordOperation(operation, time.Now()) + + out, err := in.client.ListContainers(options) + recordError(operation, err) + return out, err +} + +func (in instrumentedInterface) InspectContainer(id string) (*dockertypes.ContainerJSON, error) { + const operation = "inspect_container" + defer recordOperation(operation, time.Now()) + + out, err := in.client.InspectContainer(id) + recordError(operation, err) + return out, err +} + +func (in instrumentedInterface) InspectContainerWithSize(id string) (*dockertypes.ContainerJSON, error) { + const operation = "inspect_container_withsize" + defer recordOperation(operation, time.Now()) + + out, err := in.client.InspectContainerWithSize(id) + recordError(operation, err) + return out, err +} + +func (in instrumentedInterface) CreateContainer(opts dockertypes.ContainerCreateConfig) (*dockercontainer.ContainerCreateCreatedBody, error) { + const operation = "create_container" + defer recordOperation(operation, time.Now()) + + out, err := in.client.CreateContainer(opts) + recordError(operation, err) + return out, err +} + +func (in instrumentedInterface) StartContainer(id string) error { + const operation = "start_container" + defer recordOperation(operation, time.Now()) + + err := in.client.StartContainer(id) + recordError(operation, err) + return err +} + +func (in instrumentedInterface) StopContainer(id string, timeout time.Duration) error { + const operation = "stop_container" + defer recordOperation(operation, time.Now()) + + err := in.client.StopContainer(id, timeout) + recordError(operation, err) + return err +} + +func (in instrumentedInterface) RemoveContainer(id string, opts dockertypes.ContainerRemoveOptions) error { + const operation = "remove_container" + defer recordOperation(operation, time.Now()) + + err := in.client.RemoveContainer(id, opts) + recordError(operation, err) + return err +} + +func (in instrumentedInterface) UpdateContainerResources(id string, updateConfig dockercontainer.UpdateConfig) error { + const operation = "update_container" + defer recordOperation(operation, time.Now()) + + err := in.client.UpdateContainerResources(id, updateConfig) + recordError(operation, err) + return err +} + +func (in instrumentedInterface) InspectImageByRef(image string) (*dockertypes.ImageInspect, error) { + const operation = "inspect_image" + defer recordOperation(operation, time.Now()) + + out, err := in.client.InspectImageByRef(image) + recordError(operation, err) + return out, err +} + +func (in instrumentedInterface) InspectImageByID(image string) (*dockertypes.ImageInspect, error) { + const operation = "inspect_image" + defer recordOperation(operation, time.Now()) + + out, err := in.client.InspectImageByID(image) + recordError(operation, err) + return out, err +} + +func (in instrumentedInterface) ListImages(opts dockertypes.ImageListOptions) ([]dockertypes.ImageSummary, error) { + const operation = "list_images" + defer recordOperation(operation, time.Now()) + + out, err := in.client.ListImages(opts) + recordError(operation, err) + return out, err +} + +func (in instrumentedInterface) PullImage(imageID string, auth dockertypes.AuthConfig, opts dockertypes.ImagePullOptions) error { + const operation = "pull_image" + defer recordOperation(operation, time.Now()) + err := in.client.PullImage(imageID, auth, opts) + recordError(operation, err) + return err +} + +func (in instrumentedInterface) RemoveImage(image string, opts dockertypes.ImageRemoveOptions) ([]dockertypes.ImageDeleteResponseItem, error) { + const operation = "remove_image" + defer recordOperation(operation, time.Now()) + + imageDelete, err := in.client.RemoveImage(image, opts) + recordError(operation, err) + return imageDelete, err +} + +func (in instrumentedInterface) Logs(id string, opts dockertypes.ContainerLogsOptions, sopts StreamOptions) error { + const operation = "logs" + defer recordOperation(operation, time.Now()) + + err := in.client.Logs(id, opts, sopts) + recordError(operation, err) + return err +} + +func (in instrumentedInterface) Version() (*dockertypes.Version, error) { + const operation = "version" + defer recordOperation(operation, time.Now()) + + out, err := in.client.Version() + recordError(operation, err) + return out, err +} + +func (in instrumentedInterface) Info() (*dockertypes.Info, error) { + const operation = "info" + defer recordOperation(operation, time.Now()) + + out, err := in.client.Info() + recordError(operation, err) + return out, err +} + +func (in instrumentedInterface) CreateExec(id string, opts dockertypes.ExecConfig) (*dockertypes.IDResponse, error) { + const operation = "create_exec" + defer recordOperation(operation, time.Now()) + + out, err := in.client.CreateExec(id, opts) + recordError(operation, err) + return out, err +} + +func (in instrumentedInterface) StartExec(startExec string, opts dockertypes.ExecStartCheck, sopts StreamOptions) error { + const operation = "start_exec" + defer recordOperation(operation, time.Now()) + + err := in.client.StartExec(startExec, opts, sopts) + recordError(operation, err) + return err +} + +func (in instrumentedInterface) InspectExec(id string) (*dockertypes.ContainerExecInspect, error) { + const operation = "inspect_exec" + defer recordOperation(operation, time.Now()) + + out, err := in.client.InspectExec(id) + recordError(operation, err) + return out, err +} + +func (in instrumentedInterface) AttachToContainer(id string, opts dockertypes.ContainerAttachOptions, sopts StreamOptions) error { + const operation = "attach" + defer recordOperation(operation, time.Now()) + + err := in.client.AttachToContainer(id, opts, sopts) + recordError(operation, err) + return err +} + +func (in instrumentedInterface) ImageHistory(id string) ([]dockerimagetypes.HistoryResponseItem, error) { + const operation = "image_history" + defer recordOperation(operation, time.Now()) + + out, err := in.client.ImageHistory(id) + recordError(operation, err) + return out, err +} + +func (in instrumentedInterface) ResizeExecTTY(id string, height, width uint) error { + const operation = "resize_exec" + defer recordOperation(operation, time.Now()) + + err := in.client.ResizeExecTTY(id, height, width) + recordError(operation, err) + return err +} + +func (in instrumentedInterface) ResizeContainerTTY(id string, height, width uint) error { + const operation = "resize_container" + defer recordOperation(operation, time.Now()) + + err := in.client.ResizeContainerTTY(id, height, width) + recordError(operation, err) + return err +} + +func (in instrumentedInterface) GetContainerStats(id string) (*dockertypes.StatsJSON, error) { + const operation = "stats" + defer recordOperation(operation, time.Now()) + + out, err := in.client.GetContainerStats(id) + recordError(operation, err) + return out, err +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/kube_docker_client.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/kube_docker_client.go new file mode 100644 index 000000000000..7df051f8174f --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker/kube_docker_client.go @@ -0,0 +1,678 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package libdocker + +import ( + "bytes" + "context" + "encoding/base64" + "encoding/json" + "fmt" + "io" + "io/ioutil" + "regexp" + "sync" + "time" + + "k8s.io/klog/v2" + + dockertypes "github.com/docker/docker/api/types" + dockercontainer "github.com/docker/docker/api/types/container" + dockerimagetypes "github.com/docker/docker/api/types/image" + dockerapi "github.com/docker/docker/client" + dockermessage "github.com/docker/docker/pkg/jsonmessage" + dockerstdcopy "github.com/docker/docker/pkg/stdcopy" +) + +// kubeDockerClient is a wrapped layer of docker client for kubelet internal use. This layer is added to: +// 1) Redirect stream for exec and attach operations. +// 2) Wrap the context in this layer to make the Interface cleaner. +type kubeDockerClient struct { + // timeout is the timeout of short running docker operations. + timeout time.Duration + // If no pulling progress is made before imagePullProgressDeadline, the image pulling will be cancelled. + // Docker reports image progress for every 512kB block, so normally there shouldn't be too long interval + // between progress updates. + imagePullProgressDeadline time.Duration + client *dockerapi.Client +} + +// Make sure that kubeDockerClient implemented the Interface. +var _ Interface = &kubeDockerClient{} + +// There are 2 kinds of docker operations categorized by running time: +// * Long running operation: The long running operation could run for arbitrary long time, and the running time +// usually depends on some uncontrollable factors. These operations include: PullImage, Logs, StartExec, AttachToContainer. +// * Non-long running operation: Given the maximum load of the system, the non-long running operation should finish +// in expected and usually short time. These include all other operations. +// kubeDockerClient only applies timeout on non-long running operations. +const ( + // defaultTimeout is the default timeout of short running docker operations. + // Value is slightly offset from 2 minutes to make timeouts due to this + // constant recognizable. + defaultTimeout = 2*time.Minute - 1*time.Second + + // defaultShmSize is the default ShmSize to use (in bytes) if not specified. + defaultShmSize = int64(1024 * 1024 * 64) + + // defaultImagePullingProgressReportInterval is the default interval of image pulling progress reporting. + defaultImagePullingProgressReportInterval = 10 * time.Second +) + +// newKubeDockerClient creates an kubeDockerClient from an existing docker client. If requestTimeout is 0, +// defaultTimeout will be applied. +func newKubeDockerClient(dockerClient *dockerapi.Client, requestTimeout, imagePullProgressDeadline time.Duration) Interface { + if requestTimeout == 0 { + requestTimeout = defaultTimeout + } + + k := &kubeDockerClient{ + client: dockerClient, + timeout: requestTimeout, + imagePullProgressDeadline: imagePullProgressDeadline, + } + + // Notice that this assumes that docker is running before kubelet is started. + ctx, cancel := k.getTimeoutContext() + defer cancel() + dockerClient.NegotiateAPIVersion(ctx) + + return k +} + +func (d *kubeDockerClient) ListContainers(options dockertypes.ContainerListOptions) ([]dockertypes.Container, error) { + ctx, cancel := d.getTimeoutContext() + defer cancel() + containers, err := d.client.ContainerList(ctx, options) + if ctxErr := contextError(ctx); ctxErr != nil { + return nil, ctxErr + } + if err != nil { + return nil, err + } + return containers, nil +} + +func (d *kubeDockerClient) InspectContainer(id string) (*dockertypes.ContainerJSON, error) { + ctx, cancel := d.getTimeoutContext() + defer cancel() + containerJSON, err := d.client.ContainerInspect(ctx, id) + if ctxErr := contextError(ctx); ctxErr != nil { + return nil, ctxErr + } + if err != nil { + return nil, err + } + return &containerJSON, nil +} + +// InspectContainerWithSize is currently only used for Windows container stats +func (d *kubeDockerClient) InspectContainerWithSize(id string) (*dockertypes.ContainerJSON, error) { + ctx, cancel := d.getTimeoutContext() + defer cancel() + // Inspects the container including the fields SizeRw and SizeRootFs. + containerJSON, _, err := d.client.ContainerInspectWithRaw(ctx, id, true) + if ctxErr := contextError(ctx); ctxErr != nil { + return nil, ctxErr + } + if err != nil { + return nil, err + } + return &containerJSON, nil +} + +func (d *kubeDockerClient) CreateContainer(opts dockertypes.ContainerCreateConfig) (*dockercontainer.ContainerCreateCreatedBody, error) { + ctx, cancel := d.getTimeoutContext() + defer cancel() + // we provide an explicit default shm size as to not depend on docker daemon. + // TODO: evaluate exposing this as a knob in the API + if opts.HostConfig != nil && opts.HostConfig.ShmSize <= 0 { + opts.HostConfig.ShmSize = defaultShmSize + } + createResp, err := d.client.ContainerCreate(ctx, opts.Config, opts.HostConfig, opts.NetworkingConfig, nil, opts.Name) + if ctxErr := contextError(ctx); ctxErr != nil { + return nil, ctxErr + } + if err != nil { + return nil, err + } + return &createResp, nil +} + +func (d *kubeDockerClient) StartContainer(id string) error { + ctx, cancel := d.getTimeoutContext() + defer cancel() + err := d.client.ContainerStart(ctx, id, dockertypes.ContainerStartOptions{}) + if ctxErr := contextError(ctx); ctxErr != nil { + return ctxErr + } + return err +} + +// Stopping an already stopped container will not cause an error in dockerapi. +func (d *kubeDockerClient) StopContainer(id string, timeout time.Duration) error { + ctx, cancel := d.getCustomTimeoutContext(timeout) + defer cancel() + err := d.client.ContainerStop(ctx, id, &timeout) + if ctxErr := contextError(ctx); ctxErr != nil { + return ctxErr + } + return err +} + +func (d *kubeDockerClient) RemoveContainer(id string, opts dockertypes.ContainerRemoveOptions) error { + ctx, cancel := d.getTimeoutContext() + defer cancel() + err := d.client.ContainerRemove(ctx, id, opts) + if ctxErr := contextError(ctx); ctxErr != nil { + return ctxErr + } + return err +} + +func (d *kubeDockerClient) UpdateContainerResources(id string, updateConfig dockercontainer.UpdateConfig) error { + ctx, cancel := d.getTimeoutContext() + defer cancel() + _, err := d.client.ContainerUpdate(ctx, id, updateConfig) + if ctxErr := contextError(ctx); ctxErr != nil { + return ctxErr + } + return err +} + +func (d *kubeDockerClient) inspectImageRaw(ref string) (*dockertypes.ImageInspect, error) { + ctx, cancel := d.getTimeoutContext() + defer cancel() + resp, _, err := d.client.ImageInspectWithRaw(ctx, ref) + if ctxErr := contextError(ctx); ctxErr != nil { + return nil, ctxErr + } + if err != nil { + if dockerapi.IsErrNotFound(err) { + err = ImageNotFoundError{ID: ref} + } + return nil, err + } + + return &resp, nil +} + +func (d *kubeDockerClient) InspectImageByID(imageID string) (*dockertypes.ImageInspect, error) { + resp, err := d.inspectImageRaw(imageID) + if err != nil { + return nil, err + } + + if !matchImageIDOnly(*resp, imageID) { + return nil, ImageNotFoundError{ID: imageID} + } + return resp, nil +} + +func (d *kubeDockerClient) InspectImageByRef(imageRef string) (*dockertypes.ImageInspect, error) { + resp, err := d.inspectImageRaw(imageRef) + if err != nil { + return nil, err + } + + if !matchImageTagOrSHA(*resp, imageRef) { + return nil, ImageNotFoundError{ID: imageRef} + } + return resp, nil +} + +func (d *kubeDockerClient) ImageHistory(id string) ([]dockerimagetypes.HistoryResponseItem, error) { + ctx, cancel := d.getTimeoutContext() + defer cancel() + resp, err := d.client.ImageHistory(ctx, id) + if ctxErr := contextError(ctx); ctxErr != nil { + return nil, ctxErr + } + return resp, err +} + +func (d *kubeDockerClient) ListImages(opts dockertypes.ImageListOptions) ([]dockertypes.ImageSummary, error) { + ctx, cancel := d.getTimeoutContext() + defer cancel() + images, err := d.client.ImageList(ctx, opts) + if ctxErr := contextError(ctx); ctxErr != nil { + return nil, ctxErr + } + if err != nil { + return nil, err + } + return images, nil +} + +func base64EncodeAuth(auth dockertypes.AuthConfig) (string, error) { + var buf bytes.Buffer + if err := json.NewEncoder(&buf).Encode(auth); err != nil { + return "", err + } + return base64.URLEncoding.EncodeToString(buf.Bytes()), nil +} + +// progress is a wrapper of dockermessage.JSONMessage with a lock protecting it. +type progress struct { + sync.RWMutex + // message stores the latest docker json message. + message *dockermessage.JSONMessage + // timestamp of the latest update. + timestamp time.Time +} + +func newProgress() *progress { + return &progress{timestamp: time.Now()} +} + +func (p *progress) set(msg *dockermessage.JSONMessage) { + p.Lock() + defer p.Unlock() + p.message = msg + p.timestamp = time.Now() +} + +func (p *progress) get() (string, time.Time) { + p.RLock() + defer p.RUnlock() + if p.message == nil { + return "No progress", p.timestamp + } + // The following code is based on JSONMessage.Display + var prefix string + if p.message.ID != "" { + prefix = fmt.Sprintf("%s: ", p.message.ID) + } + if p.message.Progress == nil { + return fmt.Sprintf("%s%s", prefix, p.message.Status), p.timestamp + } + return fmt.Sprintf("%s%s %s", prefix, p.message.Status, p.message.Progress.String()), p.timestamp +} + +// progressReporter keeps the newest image pulling progress and periodically report the newest progress. +type progressReporter struct { + *progress + image string + cancel context.CancelFunc + stopCh chan struct{} + imagePullProgressDeadline time.Duration +} + +// newProgressReporter creates a new progressReporter for specific image with specified reporting interval +func newProgressReporter(image string, cancel context.CancelFunc, imagePullProgressDeadline time.Duration) *progressReporter { + return &progressReporter{ + progress: newProgress(), + image: image, + cancel: cancel, + stopCh: make(chan struct{}), + imagePullProgressDeadline: imagePullProgressDeadline, + } +} + +// start starts the progressReporter +func (p *progressReporter) start() { + go func() { + ticker := time.NewTicker(defaultImagePullingProgressReportInterval) + defer ticker.Stop() + for { + // TODO(random-liu): Report as events. + select { + case <-ticker.C: + progress, timestamp := p.progress.get() + // If there is no progress for p.imagePullProgressDeadline, cancel the operation. + if time.Since(timestamp) > p.imagePullProgressDeadline { + klog.ErrorS(nil, "Cancel pulling image because of exceed image pull deadline, record latest progress", "image", p.image, "deadline", p.imagePullProgressDeadline, "progress", progress) + p.cancel() + return + } + klog.V(2).InfoS("Pulling image", "image", p.image, "progress", progress) + case <-p.stopCh: + progress, _ := p.progress.get() + klog.V(2).InfoS("Stop pulling image", "image", p.image, "progress", progress) + return + } + } + }() +} + +// stop stops the progressReporter +func (p *progressReporter) stop() { + close(p.stopCh) +} + +func (d *kubeDockerClient) PullImage(image string, auth dockertypes.AuthConfig, opts dockertypes.ImagePullOptions) error { + // RegistryAuth is the base64 encoded credentials for the registry + base64Auth, err := base64EncodeAuth(auth) + if err != nil { + return err + } + opts.RegistryAuth = base64Auth + ctx, cancel := d.getCancelableContext() + defer cancel() + resp, err := d.client.ImagePull(ctx, image, opts) + if err != nil { + return err + } + defer resp.Close() + reporter := newProgressReporter(image, cancel, d.imagePullProgressDeadline) + reporter.start() + defer reporter.stop() + decoder := json.NewDecoder(resp) + for { + var msg dockermessage.JSONMessage + err := decoder.Decode(&msg) + if err == io.EOF { + break + } + if err != nil { + return err + } + if msg.Error != nil { + return msg.Error + } + reporter.set(&msg) + } + return nil +} + +func (d *kubeDockerClient) RemoveImage(image string, opts dockertypes.ImageRemoveOptions) ([]dockertypes.ImageDeleteResponseItem, error) { + ctx, cancel := d.getTimeoutContext() + defer cancel() + resp, err := d.client.ImageRemove(ctx, image, opts) + if ctxErr := contextError(ctx); ctxErr != nil { + return nil, ctxErr + } + if dockerapi.IsErrNotFound(err) { + return nil, ImageNotFoundError{ID: image} + } + return resp, err +} + +func (d *kubeDockerClient) Logs(id string, opts dockertypes.ContainerLogsOptions, sopts StreamOptions) error { + ctx, cancel := d.getCancelableContext() + defer cancel() + resp, err := d.client.ContainerLogs(ctx, id, opts) + if ctxErr := contextError(ctx); ctxErr != nil { + return ctxErr + } + if err != nil { + return err + } + defer resp.Close() + return d.redirectResponseToOutputStream(sopts.RawTerminal, sopts.OutputStream, sopts.ErrorStream, resp) +} + +func (d *kubeDockerClient) Version() (*dockertypes.Version, error) { + ctx, cancel := d.getTimeoutContext() + defer cancel() + resp, err := d.client.ServerVersion(ctx) + if ctxErr := contextError(ctx); ctxErr != nil { + return nil, ctxErr + } + if err != nil { + return nil, err + } + return &resp, nil +} + +func (d *kubeDockerClient) Info() (*dockertypes.Info, error) { + ctx, cancel := d.getTimeoutContext() + defer cancel() + resp, err := d.client.Info(ctx) + if ctxErr := contextError(ctx); ctxErr != nil { + return nil, ctxErr + } + if err != nil { + return nil, err + } + return &resp, nil +} + +// TODO(random-liu): Add unit test for exec and attach functions, just like what go-dockerclient did. +func (d *kubeDockerClient) CreateExec(id string, opts dockertypes.ExecConfig) (*dockertypes.IDResponse, error) { + ctx, cancel := d.getTimeoutContext() + defer cancel() + resp, err := d.client.ContainerExecCreate(ctx, id, opts) + if ctxErr := contextError(ctx); ctxErr != nil { + return nil, ctxErr + } + if err != nil { + return nil, err + } + return &resp, nil +} + +func (d *kubeDockerClient) StartExec(startExec string, opts dockertypes.ExecStartCheck, sopts StreamOptions) error { + ctx, cancel := d.getCancelableContext() + defer cancel() + if opts.Detach { + err := d.client.ContainerExecStart(ctx, startExec, opts) + if ctxErr := contextError(ctx); ctxErr != nil { + return ctxErr + } + return err + } + resp, err := d.client.ContainerExecAttach(ctx, startExec, dockertypes.ExecStartCheck{ + Detach: opts.Detach, + Tty: opts.Tty, + }) + if ctxErr := contextError(ctx); ctxErr != nil { + return ctxErr + } + if err != nil { + return err + } + defer resp.Close() + + if sopts.ExecStarted != nil { + // Send a message to the channel indicating that the exec has started. This is needed so + // interactive execs can handle resizing correctly - the request to resize the TTY has to happen + // after the call to d.client.ContainerExecAttach, and because d.holdHijackedConnection below + // blocks, we use sopts.ExecStarted to signal the caller that it's ok to resize. + sopts.ExecStarted <- struct{}{} + } + + return d.holdHijackedConnection(sopts.RawTerminal || opts.Tty, sopts.InputStream, sopts.OutputStream, sopts.ErrorStream, resp) +} + +func (d *kubeDockerClient) InspectExec(id string) (*dockertypes.ContainerExecInspect, error) { + ctx, cancel := d.getTimeoutContext() + defer cancel() + resp, err := d.client.ContainerExecInspect(ctx, id) + if ctxErr := contextError(ctx); ctxErr != nil { + return nil, ctxErr + } + if err != nil { + return nil, err + } + return &resp, nil +} + +func (d *kubeDockerClient) AttachToContainer(id string, opts dockertypes.ContainerAttachOptions, sopts StreamOptions) error { + ctx, cancel := d.getCancelableContext() + defer cancel() + resp, err := d.client.ContainerAttach(ctx, id, opts) + if ctxErr := contextError(ctx); ctxErr != nil { + return ctxErr + } + if err != nil { + return err + } + defer resp.Close() + return d.holdHijackedConnection(sopts.RawTerminal, sopts.InputStream, sopts.OutputStream, sopts.ErrorStream, resp) +} + +func (d *kubeDockerClient) ResizeExecTTY(id string, height, width uint) error { + ctx, cancel := d.getCancelableContext() + defer cancel() + return d.client.ContainerExecResize(ctx, id, dockertypes.ResizeOptions{ + Height: height, + Width: width, + }) +} + +func (d *kubeDockerClient) ResizeContainerTTY(id string, height, width uint) error { + ctx, cancel := d.getCancelableContext() + defer cancel() + return d.client.ContainerResize(ctx, id, dockertypes.ResizeOptions{ + Height: height, + Width: width, + }) +} + +// GetContainerStats is currently only used for Windows container stats +func (d *kubeDockerClient) GetContainerStats(id string) (*dockertypes.StatsJSON, error) { + ctx, cancel := d.getCancelableContext() + defer cancel() + + response, err := d.client.ContainerStats(ctx, id, false) + if err != nil { + return nil, err + } + + dec := json.NewDecoder(response.Body) + var stats dockertypes.StatsJSON + err = dec.Decode(&stats) + if err != nil { + return nil, err + } + + defer response.Body.Close() + return &stats, nil +} + +// redirectResponseToOutputStream redirect the response stream to stdout and stderr. When tty is true, all stream will +// only be redirected to stdout. +func (d *kubeDockerClient) redirectResponseToOutputStream(tty bool, outputStream, errorStream io.Writer, resp io.Reader) error { + if outputStream == nil { + outputStream = ioutil.Discard + } + if errorStream == nil { + errorStream = ioutil.Discard + } + var err error + if tty { + _, err = io.Copy(outputStream, resp) + } else { + _, err = dockerstdcopy.StdCopy(outputStream, errorStream, resp) + } + return err +} + +// holdHijackedConnection hold the HijackedResponse, redirect the inputStream to the connection, and redirect the response +// stream to stdout and stderr. NOTE: If needed, we could also add context in this function. +func (d *kubeDockerClient) holdHijackedConnection(tty bool, inputStream io.Reader, outputStream, errorStream io.Writer, resp dockertypes.HijackedResponse) error { + receiveStdout := make(chan error) + if outputStream != nil || errorStream != nil { + go func() { + receiveStdout <- d.redirectResponseToOutputStream(tty, outputStream, errorStream, resp.Reader) + }() + } + + stdinDone := make(chan struct{}) + go func() { + if inputStream != nil { + io.Copy(resp.Conn, inputStream) + } + resp.CloseWrite() + close(stdinDone) + }() + + select { + case err := <-receiveStdout: + return err + case <-stdinDone: + if outputStream != nil || errorStream != nil { + return <-receiveStdout + } + } + return nil +} + +// getCancelableContext returns a new cancelable context. For long running requests without timeout, we use cancelable +// context to avoid potential resource leak, although the current implementation shouldn't leak resource. +func (d *kubeDockerClient) getCancelableContext() (context.Context, context.CancelFunc) { + return context.WithCancel(context.Background()) +} + +// getTimeoutContext returns a new context with default request timeout +func (d *kubeDockerClient) getTimeoutContext() (context.Context, context.CancelFunc) { + return context.WithTimeout(context.Background(), d.timeout) +} + +// getCustomTimeoutContext returns a new context with a specific request timeout +func (d *kubeDockerClient) getCustomTimeoutContext(timeout time.Duration) (context.Context, context.CancelFunc) { + // Pick the larger of the two + if d.timeout > timeout { + timeout = d.timeout + } + return context.WithTimeout(context.Background(), timeout) +} + +// contextError checks the context, and returns error if the context is timeout. +func contextError(ctx context.Context) error { + if ctx.Err() == context.DeadlineExceeded { + return operationTimeout{err: ctx.Err()} + } + return ctx.Err() +} + +// StreamOptions are the options used to configure the stream redirection +type StreamOptions struct { + RawTerminal bool + InputStream io.Reader + OutputStream io.Writer + ErrorStream io.Writer + ExecStarted chan struct{} +} + +// operationTimeout is the error returned when the docker operations are timeout. +type operationTimeout struct { + err error +} + +func (e operationTimeout) Error() string { + return fmt.Sprintf("operation timeout: %v", e.err) +} + +// containerNotFoundErrorRegx is the regexp of container not found error message. +var containerNotFoundErrorRegx = regexp.MustCompile(`No such container: [0-9a-z]+`) + +// IsContainerNotFoundError checks whether the error is container not found error. +func IsContainerNotFoundError(err error) bool { + return containerNotFoundErrorRegx.MatchString(err.Error()) +} + +// ImageNotFoundError is the error returned by InspectImage when image not found. +// Expose this to inject error in dockershim for testing. +type ImageNotFoundError struct { + ID string +} + +func (e ImageNotFoundError) Error() string { + return fmt.Sprintf("no such image: %q", e.ID) +} + +// IsImageNotFoundError checks whether the error is image not found error. This is exposed +// to share with dockershim. +func IsImageNotFoundError(err error) bool { + _, ok := err.(ImageNotFoundError) + return ok +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/metrics/metrics.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/metrics/metrics.go new file mode 100644 index 000000000000..be8d65b83eaf --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/metrics/metrics.go @@ -0,0 +1,105 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package metrics + +import ( + "sync" + "time" + + "k8s.io/component-base/metrics" + "k8s.io/component-base/metrics/legacyregistry" +) + +const ( + // DockerOperationsKey is the key for docker operation metrics. + DockerOperationsKey = "docker_operations_total" + // DockerOperationsLatencyKey is the key for the operation latency metrics. + DockerOperationsLatencyKey = "docker_operations_duration_seconds" + // DockerOperationsErrorsKey is the key for the operation error metrics. + DockerOperationsErrorsKey = "docker_operations_errors_total" + // DockerOperationsTimeoutKey is the key for the operation timeout metrics. + DockerOperationsTimeoutKey = "docker_operations_timeout_total" + + // Keep the "kubelet" subsystem for backward compatibility. + kubeletSubsystem = "kubelet" +) + +var ( + // DockerOperationsLatency collects operation latency numbers by operation + // type. + DockerOperationsLatency = metrics.NewHistogramVec( + &metrics.HistogramOpts{ + Subsystem: kubeletSubsystem, + Name: DockerOperationsLatencyKey, + Help: "Latency in seconds of Docker operations. Broken down by operation type.", + Buckets: metrics.DefBuckets, + StabilityLevel: metrics.ALPHA, + }, + []string{"operation_type"}, + ) + // DockerOperations collects operation counts by operation type. + DockerOperations = metrics.NewCounterVec( + &metrics.CounterOpts{ + Subsystem: kubeletSubsystem, + Name: DockerOperationsKey, + Help: "Cumulative number of Docker operations by operation type.", + StabilityLevel: metrics.ALPHA, + }, + []string{"operation_type"}, + ) + // DockerOperationsErrors collects operation errors by operation + // type. + DockerOperationsErrors = metrics.NewCounterVec( + &metrics.CounterOpts{ + Subsystem: kubeletSubsystem, + Name: DockerOperationsErrorsKey, + Help: "Cumulative number of Docker operation errors by operation type.", + StabilityLevel: metrics.ALPHA, + }, + []string{"operation_type"}, + ) + // DockerOperationsTimeout collects operation timeouts by operation type. + DockerOperationsTimeout = metrics.NewCounterVec( + &metrics.CounterOpts{ + Subsystem: kubeletSubsystem, + Name: DockerOperationsTimeoutKey, + Help: "Cumulative number of Docker operation timeout by operation type.", + StabilityLevel: metrics.ALPHA, + }, + []string{"operation_type"}, + ) +) + +var registerMetrics sync.Once + +// Register all metrics. +func Register() { + registerMetrics.Do(func() { + legacyregistry.MustRegister(DockerOperationsLatency) + legacyregistry.MustRegister(DockerOperations) + legacyregistry.MustRegister(DockerOperationsErrors) + legacyregistry.MustRegister(DockerOperationsTimeout) + }) +} + +// SinceInSeconds gets the time since the specified start in seconds. +func SinceInSeconds(start time.Time) float64 { + return time.Since(start).Seconds() +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/naming.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/naming.go new file mode 100644 index 000000000000..faf35b6bf68b --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/naming.go @@ -0,0 +1,152 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dockershim + +import ( + "fmt" + "math/rand" + "strconv" + "strings" + + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + "k8s.io/kubernetes/pkg/kubelet/leaky" +) + +// Container "names" are implementation details that do not concern +// kubelet/CRI. This CRI shim uses names to fulfill the CRI requirement to +// make sandbox/container creation idempotent. CRI states that there can +// only exist one sandbox/container with the given metadata. To enforce this, +// this shim constructs a name using the fields in the metadata so that +// docker will reject the creation request if the name already exists. +// +// Note that changes to naming will likely break the backward compatibility. +// Code must be added to ensure the shim knows how to recognize and extract +// information the older containers. +// +// TODO: Add code to handle backward compatibility, i.e., making sure we can +// recognize older containers and extract information from their names if +// necessary. + +const ( + // kubePrefix is used to identify the containers/sandboxes on the node managed by kubelet + kubePrefix = "k8s" + // sandboxContainerName is a string to include in the docker container so + // that users can easily identify the sandboxes. + sandboxContainerName = leaky.PodInfraContainerName + // Delimiter used to construct docker container names. + nameDelimiter = "_" + // DockerImageIDPrefix is the prefix of image id in container status. + DockerImageIDPrefix = "docker://" + // DockerPullableImageIDPrefix is the prefix of pullable image id in container status. + DockerPullableImageIDPrefix = "docker-pullable://" +) + +func makeSandboxName(s *runtimeapi.PodSandboxConfig) string { + return strings.Join([]string{ + kubePrefix, // 0 + sandboxContainerName, // 1 + s.Metadata.Name, // 2 + s.Metadata.Namespace, // 3 + s.Metadata.Uid, // 4 + fmt.Sprintf("%d", s.Metadata.Attempt), // 5 + }, nameDelimiter) +} + +func makeContainerName(s *runtimeapi.PodSandboxConfig, c *runtimeapi.ContainerConfig) string { + return strings.Join([]string{ + kubePrefix, // 0 + c.Metadata.Name, // 1: + s.Metadata.Name, // 2: sandbox name + s.Metadata.Namespace, // 3: sandbox namesapce + s.Metadata.Uid, // 4 sandbox uid + fmt.Sprintf("%d", c.Metadata.Attempt), // 5 + }, nameDelimiter) +} + +// randomizeName randomizes the container name. This should only be used when we hit the +// docker container name conflict bug. +func randomizeName(name string) string { + return strings.Join([]string{ + name, + fmt.Sprintf("%08x", rand.Uint32()), + }, nameDelimiter) +} + +func parseUint32(s string) (uint32, error) { + n, err := strconv.ParseUint(s, 10, 32) + if err != nil { + return 0, err + } + return uint32(n), nil +} + +// TODO: Evaluate whether we should rely on labels completely. +func parseSandboxName(name string) (*runtimeapi.PodSandboxMetadata, error) { + // Docker adds a "/" prefix to names. so trim it. + name = strings.TrimPrefix(name, "/") + + parts := strings.Split(name, nameDelimiter) + // Tolerate the random suffix. + // TODO(random-liu): Remove 7 field case when docker 1.11 is deprecated. + if len(parts) != 6 && len(parts) != 7 { + return nil, fmt.Errorf("failed to parse the sandbox name: %q", name) + } + if parts[0] != kubePrefix { + return nil, fmt.Errorf("container is not managed by kubernetes: %q", name) + } + + attempt, err := parseUint32(parts[5]) + if err != nil { + return nil, fmt.Errorf("failed to parse the sandbox name %q: %v", name, err) + } + + return &runtimeapi.PodSandboxMetadata{ + Name: parts[2], + Namespace: parts[3], + Uid: parts[4], + Attempt: attempt, + }, nil +} + +// TODO: Evaluate whether we should rely on labels completely. +func parseContainerName(name string) (*runtimeapi.ContainerMetadata, error) { + // Docker adds a "/" prefix to names. so trim it. + name = strings.TrimPrefix(name, "/") + + parts := strings.Split(name, nameDelimiter) + // Tolerate the random suffix. + // TODO(random-liu): Remove 7 field case when docker 1.11 is deprecated. + if len(parts) != 6 && len(parts) != 7 { + return nil, fmt.Errorf("failed to parse the container name: %q", name) + } + if parts[0] != kubePrefix { + return nil, fmt.Errorf("container is not managed by kubernetes: %q", name) + } + + attempt, err := parseUint32(parts[5]) + if err != nil { + return nil, fmt.Errorf("failed to parse the container name %q: %v", name, err) + } + + return &runtimeapi.ContainerMetadata{ + Name: parts[1], + Attempt: attempt, + }, nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/OWNERS new file mode 100644 index 000000000000..e9845a747292 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/OWNERS @@ -0,0 +1,10 @@ +# See the OWNERS docs at https://go.k8s.io/owners + +approvers: +- sig-network-driver-approvers +emeritus_approvers: +- matchstick +reviewers: +- sig-network-reviewers +labels: +- sig/network diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/cni/cni.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/cni/cni.go new file mode 100644 index 000000000000..fd9d1dbb19fe --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/cni/cni.go @@ -0,0 +1,472 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cni + +import ( + "context" + "encoding/json" + "fmt" + "math" + "sort" + "strings" + "sync" + "time" + + "github.com/containernetworking/cni/libcni" + cnitypes "github.com/containernetworking/cni/pkg/types" + "k8s.io/apimachinery/pkg/util/wait" + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + "k8s.io/klog/v2" + kubeletconfig "k8s.io/kubernetes/pkg/kubelet/apis/config" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + "k8s.io/kubernetes/pkg/kubelet/dockershim/network" + "k8s.io/kubernetes/pkg/util/bandwidth" + utilslice "k8s.io/kubernetes/pkg/util/slice" + utilexec "k8s.io/utils/exec" +) + +const ( + // CNIPluginName is the name of CNI plugin + CNIPluginName = "cni" + + // defaultSyncConfigPeriod is the default period to sync CNI config + // TODO: consider making this value configurable or to be a more appropriate value. + defaultSyncConfigPeriod = time.Second * 5 + + // supported capabilities + // https://github.com/containernetworking/cni/blob/master/CONVENTIONS.md + portMappingsCapability = "portMappings" + ipRangesCapability = "ipRanges" + bandwidthCapability = "bandwidth" + dnsCapability = "dns" +) + +type cniNetworkPlugin struct { + network.NoopNetworkPlugin + + loNetwork *cniNetwork + + sync.RWMutex + defaultNetwork *cniNetwork + + host network.Host + execer utilexec.Interface + nsenterPath string + confDir string + binDirs []string + cacheDir string + podCidr string +} + +type cniNetwork struct { + name string + NetworkConfig *libcni.NetworkConfigList + CNIConfig libcni.CNI + Capabilities []string +} + +// cniPortMapping maps to the standard CNI portmapping Capability +// see: https://github.com/containernetworking/cni/blob/master/CONVENTIONS.md +type cniPortMapping struct { + HostPort int32 `json:"hostPort"` + ContainerPort int32 `json:"containerPort"` + Protocol string `json:"protocol"` + HostIP string `json:"hostIP"` +} + +// cniBandwidthEntry maps to the standard CNI bandwidth Capability +// see: https://github.com/containernetworking/cni/blob/master/CONVENTIONS.md and +// https://github.com/containernetworking/plugins/blob/master/plugins/meta/bandwidth/README.md +type cniBandwidthEntry struct { + // IngressRate is the bandwidth rate in bits per second for traffic through container. 0 for no limit. If IngressRate is set, IngressBurst must also be set + IngressRate int `json:"ingressRate,omitempty"` + // IngressBurst is the bandwidth burst in bits for traffic through container. 0 for no limit. If IngressBurst is set, IngressRate must also be set + // NOTE: it's not used for now and defaults to 0. If IngressRate is set IngressBurst will be math.MaxInt32 ~ 2Gbit + IngressBurst int `json:"ingressBurst,omitempty"` + // EgressRate is the bandwidth is the bandwidth rate in bits per second for traffic through container. 0 for no limit. If EgressRate is set, EgressBurst must also be set + EgressRate int `json:"egressRate,omitempty"` + // EgressBurst is the bandwidth burst in bits for traffic through container. 0 for no limit. If EgressBurst is set, EgressRate must also be set + // NOTE: it's not used for now and defaults to 0. If EgressRate is set EgressBurst will be math.MaxInt32 ~ 2Gbit + EgressBurst int `json:"egressBurst,omitempty"` +} + +// cniIPRange maps to the standard CNI ip range Capability +type cniIPRange struct { + Subnet string `json:"subnet"` +} + +// cniDNSConfig maps to the windows CNI dns Capability. +// see: https://github.com/containernetworking/cni/blob/master/CONVENTIONS.md +// Note that dns capability is only used for Windows containers. +type cniDNSConfig struct { + // List of DNS servers of the cluster. + Servers []string `json:"servers,omitempty"` + // List of DNS search domains of the cluster. + Searches []string `json:"searches,omitempty"` + // List of DNS options. + Options []string `json:"options,omitempty"` +} + +// SplitDirs : split dirs by "," +func SplitDirs(dirs string) []string { + // Use comma rather than colon to work better with Windows too + return strings.Split(dirs, ",") +} + +// ProbeNetworkPlugins : get the network plugin based on cni conf file and bin file +func ProbeNetworkPlugins(confDir, cacheDir string, binDirs []string) []network.NetworkPlugin { + old := binDirs + binDirs = make([]string, 0, len(binDirs)) + for _, dir := range old { + if dir != "" { + binDirs = append(binDirs, dir) + } + } + + plugin := &cniNetworkPlugin{ + defaultNetwork: nil, + loNetwork: getLoNetwork(binDirs), + execer: utilexec.New(), + confDir: confDir, + binDirs: binDirs, + cacheDir: cacheDir, + } + + // sync NetworkConfig in best effort during probing. + plugin.syncNetworkConfig() + return []network.NetworkPlugin{plugin} +} + +func getDefaultCNINetwork(confDir string, binDirs []string) (*cniNetwork, error) { + files, err := libcni.ConfFiles(confDir, []string{".conf", ".conflist", ".json"}) + switch { + case err != nil: + return nil, err + case len(files) == 0: + return nil, fmt.Errorf("no networks found in %s", confDir) + } + + cniConfig := &libcni.CNIConfig{Path: binDirs} + + sort.Strings(files) + for _, confFile := range files { + var confList *libcni.NetworkConfigList + if strings.HasSuffix(confFile, ".conflist") { + confList, err = libcni.ConfListFromFile(confFile) + if err != nil { + klog.InfoS("Error loading CNI config list file", "path", confFile, "err", err) + continue + } + } else { + conf, err := libcni.ConfFromFile(confFile) + if err != nil { + klog.InfoS("Error loading CNI config file", "path", confFile, "err", err) + continue + } + // Ensure the config has a "type" so we know what plugin to run. + // Also catches the case where somebody put a conflist into a conf file. + if conf.Network.Type == "" { + klog.InfoS("Error loading CNI config file: no 'type'; perhaps this is a .conflist?", "path", confFile) + continue + } + + confList, err = libcni.ConfListFromConf(conf) + if err != nil { + klog.InfoS("Error converting CNI config file to list", "path", confFile, "err", err) + continue + } + } + if len(confList.Plugins) == 0 { + klog.InfoS("CNI config list has no networks, skipping", "configList", string(confList.Bytes[:maxStringLengthInLog(len(confList.Bytes))])) + continue + } + + // Before using this CNI config, we have to validate it to make sure that + // all plugins of this config exist on disk + caps, err := cniConfig.ValidateNetworkList(context.TODO(), confList) + if err != nil { + klog.InfoS("Error validating CNI config list", "configList", string(confList.Bytes[:maxStringLengthInLog(len(confList.Bytes))]), "err", err) + continue + } + + klog.V(4).InfoS("Using CNI configuration file", "path", confFile) + + return &cniNetwork{ + name: confList.Name, + NetworkConfig: confList, + CNIConfig: cniConfig, + Capabilities: caps, + }, nil + } + return nil, fmt.Errorf("no valid networks found in %s", confDir) +} + +func (plugin *cniNetworkPlugin) Init(host network.Host, hairpinMode kubeletconfig.HairpinMode, nonMasqueradeCIDR string, mtu int) error { + err := plugin.platformInit() + if err != nil { + return err + } + + plugin.host = host + + plugin.syncNetworkConfig() + + // start a goroutine to sync network config from confDir periodically to detect network config updates in every 5 seconds + go wait.Forever(plugin.syncNetworkConfig, defaultSyncConfigPeriod) + + return nil +} + +func (plugin *cniNetworkPlugin) syncNetworkConfig() { + network, err := getDefaultCNINetwork(plugin.confDir, plugin.binDirs) + if err != nil { + klog.InfoS("Unable to update cni config", "err", err) + return + } + plugin.setDefaultNetwork(network) +} + +func (plugin *cniNetworkPlugin) getDefaultNetwork() *cniNetwork { + plugin.RLock() + defer plugin.RUnlock() + return plugin.defaultNetwork +} + +func (plugin *cniNetworkPlugin) setDefaultNetwork(n *cniNetwork) { + plugin.Lock() + defer plugin.Unlock() + plugin.defaultNetwork = n +} + +func (plugin *cniNetworkPlugin) checkInitialized() error { + if plugin.getDefaultNetwork() == nil { + return fmt.Errorf("cni config uninitialized") + } + + if utilslice.ContainsString(plugin.getDefaultNetwork().Capabilities, ipRangesCapability, nil) && plugin.podCidr == "" { + return fmt.Errorf("cni config needs ipRanges but no PodCIDR set") + } + + return nil +} + +// Event handles any change events. The only event ever sent is the PodCIDR change. +// No network plugins support changing an already-set PodCIDR +func (plugin *cniNetworkPlugin) Event(name string, details map[string]interface{}) { + if name != network.NET_PLUGIN_EVENT_POD_CIDR_CHANGE { + return + } + + plugin.Lock() + defer plugin.Unlock() + + podCIDR, ok := details[network.NET_PLUGIN_EVENT_POD_CIDR_CHANGE_DETAIL_CIDR].(string) + if !ok { + klog.InfoS("The event didn't contain pod CIDR", "event", network.NET_PLUGIN_EVENT_POD_CIDR_CHANGE) + return + } + + if plugin.podCidr != "" { + klog.InfoS("Ignoring subsequent pod CIDR update to new cidr", "podCIDR", podCIDR) + return + } + + plugin.podCidr = podCIDR +} + +func (plugin *cniNetworkPlugin) Name() string { + return CNIPluginName +} + +func (plugin *cniNetworkPlugin) Status() error { + // Can't set up pods if we don't have any CNI network configs yet + return plugin.checkInitialized() +} + +func (plugin *cniNetworkPlugin) SetUpPod(namespace string, name string, id kubecontainer.ContainerID, annotations, options map[string]string) error { + if err := plugin.checkInitialized(); err != nil { + return err + } + netnsPath, err := plugin.host.GetNetNS(id.ID) + if err != nil { + return fmt.Errorf("CNI failed to retrieve network namespace path: %v", err) + } + + // Todo get the timeout from parent ctx + cniTimeoutCtx, cancelFunc := context.WithTimeout(context.Background(), network.CNITimeoutSec*time.Second) + defer cancelFunc() + // Windows doesn't have loNetwork. It comes only with Linux + if plugin.loNetwork != nil { + if _, err = plugin.addToNetwork(cniTimeoutCtx, plugin.loNetwork, name, namespace, id, netnsPath, annotations, options); err != nil { + return err + } + } + + _, err = plugin.addToNetwork(cniTimeoutCtx, plugin.getDefaultNetwork(), name, namespace, id, netnsPath, annotations, options) + return err +} + +func (plugin *cniNetworkPlugin) TearDownPod(namespace string, name string, id kubecontainer.ContainerID) error { + if err := plugin.checkInitialized(); err != nil { + return err + } + + // Lack of namespace should not be fatal on teardown + netnsPath, err := plugin.host.GetNetNS(id.ID) + if err != nil { + klog.InfoS("CNI failed to retrieve network namespace path", "err", err) + } + + // Todo get the timeout from parent ctx + cniTimeoutCtx, cancelFunc := context.WithTimeout(context.Background(), network.CNITimeoutSec*time.Second) + defer cancelFunc() + // Windows doesn't have loNetwork. It comes only with Linux + if plugin.loNetwork != nil { + // Loopback network deletion failure should not be fatal on teardown + if err := plugin.deleteFromNetwork(cniTimeoutCtx, plugin.loNetwork, name, namespace, id, netnsPath, nil); err != nil { + klog.InfoS("CNI failed to delete loopback network", "err", err) + } + } + + return plugin.deleteFromNetwork(cniTimeoutCtx, plugin.getDefaultNetwork(), name, namespace, id, netnsPath, nil) +} + +func (plugin *cniNetworkPlugin) addToNetwork(ctx context.Context, network *cniNetwork, podName string, podNamespace string, podSandboxID kubecontainer.ContainerID, podNetnsPath string, annotations, options map[string]string) (cnitypes.Result, error) { + rt, err := plugin.buildCNIRuntimeConf(podName, podNamespace, podSandboxID, podNetnsPath, annotations, options) + if err != nil { + klog.ErrorS(err, "Error adding network when building cni runtime conf") + return nil, err + } + + netConf, cniNet := network.NetworkConfig, network.CNIConfig + klog.V(4).InfoS("Adding pod to network", "pod", klog.KRef(podNamespace, podName), "podSandboxID", podSandboxID, "podNetnsPath", podNetnsPath, "networkType", netConf.Plugins[0].Network.Type, "networkName", netConf.Name) + res, err := cniNet.AddNetworkList(ctx, netConf, rt) + if err != nil { + klog.ErrorS(err, "Error adding pod to network", "pod", klog.KRef(podNamespace, podName), "podSandboxID", podSandboxID, "podNetnsPath", podNetnsPath, "networkType", netConf.Plugins[0].Network.Type, "networkName", netConf.Name) + return nil, err + } + klog.V(4).InfoS("Added pod to network", "pod", klog.KRef(podNamespace, podName), "podSandboxID", podSandboxID, "networkName", netConf.Name, "response", res) + return res, nil +} + +func (plugin *cniNetworkPlugin) deleteFromNetwork(ctx context.Context, network *cniNetwork, podName string, podNamespace string, podSandboxID kubecontainer.ContainerID, podNetnsPath string, annotations map[string]string) error { + rt, err := plugin.buildCNIRuntimeConf(podName, podNamespace, podSandboxID, podNetnsPath, annotations, nil) + if err != nil { + klog.ErrorS(err, "Error deleting network when building cni runtime conf") + return err + } + netConf, cniNet := network.NetworkConfig, network.CNIConfig + klog.V(4).InfoS("Deleting pod from network", "pod", klog.KRef(podNamespace, podName), "podSandboxID", podSandboxID, "podNetnsPath", podNetnsPath, "networkType", netConf.Plugins[0].Network.Type, "networkName", netConf.Name) + err = cniNet.DelNetworkList(ctx, netConf, rt) + // The pod may not get deleted successfully at the first time. + // Ignore "no such file or directory" error in case the network has already been deleted in previous attempts. + if err != nil && !strings.Contains(err.Error(), "no such file or directory") { + klog.ErrorS(err, "Error deleting pod from network", "pod", klog.KRef(podNamespace, podName), "podSandboxID", podSandboxID, "podNetnsPath", podNetnsPath, "networkType", netConf.Plugins[0].Network.Type, "networkName", netConf.Name) + return err + } + klog.V(4).InfoS("Deleted pod from network", "pod", klog.KRef(podNamespace, podName), "podSandboxID", podSandboxID, "networkType", netConf.Plugins[0].Network.Type, "networkName", netConf.Name) + return nil +} + +func (plugin *cniNetworkPlugin) buildCNIRuntimeConf(podName string, podNs string, podSandboxID kubecontainer.ContainerID, podNetnsPath string, annotations, options map[string]string) (*libcni.RuntimeConf, error) { + rt := &libcni.RuntimeConf{ + ContainerID: podSandboxID.ID, + NetNS: podNetnsPath, + IfName: network.DefaultInterfaceName, + CacheDir: plugin.cacheDir, + Args: [][2]string{ + {"IgnoreUnknown", "1"}, + {"K8S_POD_NAMESPACE", podNs}, + {"K8S_POD_NAME", podName}, + {"K8S_POD_INFRA_CONTAINER_ID", podSandboxID.ID}, + }, + } + + // port mappings are a cni capability-based args, rather than parameters + // to a specific plugin + portMappings, err := plugin.host.GetPodPortMappings(podSandboxID.ID) + if err != nil { + return nil, fmt.Errorf("could not retrieve port mappings: %v", err) + } + portMappingsParam := make([]cniPortMapping, 0, len(portMappings)) + for _, p := range portMappings { + if p.HostPort <= 0 { + continue + } + portMappingsParam = append(portMappingsParam, cniPortMapping{ + HostPort: p.HostPort, + ContainerPort: p.ContainerPort, + Protocol: strings.ToLower(string(p.Protocol)), + HostIP: p.HostIP, + }) + } + rt.CapabilityArgs = map[string]interface{}{ + portMappingsCapability: portMappingsParam, + } + + ingress, egress, err := bandwidth.ExtractPodBandwidthResources(annotations) + if err != nil { + return nil, fmt.Errorf("failed to get pod bandwidth from annotations: %v", err) + } + if ingress != nil || egress != nil { + bandwidthParam := cniBandwidthEntry{} + if ingress != nil { + // see: https://github.com/containernetworking/cni/blob/master/CONVENTIONS.md and + // https://github.com/containernetworking/plugins/blob/master/plugins/meta/bandwidth/README.md + // Rates are in bits per second, burst values are in bits. + bandwidthParam.IngressRate = int(ingress.Value()) + // Limit IngressBurst to math.MaxInt32, in practice limiting to 2Gbit is the equivalent of setting no limit + bandwidthParam.IngressBurst = math.MaxInt32 + } + if egress != nil { + bandwidthParam.EgressRate = int(egress.Value()) + // Limit EgressBurst to math.MaxInt32, in practice limiting to 2Gbit is the equivalent of setting no limit + bandwidthParam.EgressBurst = math.MaxInt32 + } + rt.CapabilityArgs[bandwidthCapability] = bandwidthParam + } + + // Set the PodCIDR + rt.CapabilityArgs[ipRangesCapability] = [][]cniIPRange{{{Subnet: plugin.podCidr}}} + + // Set dns capability args. + if dnsOptions, ok := options["dns"]; ok { + dnsConfig := runtimeapi.DNSConfig{} + err := json.Unmarshal([]byte(dnsOptions), &dnsConfig) + if err != nil { + return nil, fmt.Errorf("failed to unmarshal dns config %q: %v", dnsOptions, err) + } + if dnsParam := buildDNSCapabilities(&dnsConfig); dnsParam != nil { + rt.CapabilityArgs[dnsCapability] = *dnsParam + } + } + + return rt, nil +} + +func maxStringLengthInLog(length int) int { + // we allow no more than 4096-length strings to be logged + const maxStringLength = 4096 + + if length < maxStringLength { + return length + } + return maxStringLength +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/cni/cni_others.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/cni/cni_others.go new file mode 100644 index 000000000000..66446d302104 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/cni/cni_others.go @@ -0,0 +1,91 @@ +//go:build !windows && !dockerless +// +build !windows,!dockerless + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cni + +import ( + "fmt" + + "github.com/containernetworking/cni/libcni" + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + "k8s.io/kubernetes/pkg/kubelet/dockershim/network" +) + +func getLoNetwork(binDirs []string) *cniNetwork { + loConfig, err := libcni.ConfListFromBytes([]byte(`{ + "cniVersion": "0.2.0", + "name": "cni-loopback", + "plugins":[{ + "type": "loopback" + }] +}`)) + if err != nil { + // The hardcoded config above should always be valid and unit tests will + // catch this + panic(err) + } + loNetwork := &cniNetwork{ + name: "lo", + NetworkConfig: loConfig, + CNIConfig: &libcni.CNIConfig{Path: binDirs}, + } + + return loNetwork +} + +func (plugin *cniNetworkPlugin) platformInit() error { + var err error + plugin.nsenterPath, err = plugin.execer.LookPath("nsenter") + if err != nil { + return err + } + return nil +} + +// TODO: Use the addToNetwork function to obtain the IP of the Pod. That will assume idempotent ADD call to the plugin. +// Also fix the runtime's call to Status function to be done only in the case that the IP is lost, no need to do periodic calls +func (plugin *cniNetworkPlugin) GetPodNetworkStatus(namespace string, name string, id kubecontainer.ContainerID) (*network.PodNetworkStatus, error) { + netnsPath, err := plugin.host.GetNetNS(id.ID) + if err != nil { + return nil, fmt.Errorf("CNI failed to retrieve network namespace path: %v", err) + } + if netnsPath == "" { + return nil, fmt.Errorf("cannot find the network namespace, skipping pod network status for container %q", id) + } + + ips, err := network.GetPodIPs(plugin.execer, plugin.nsenterPath, netnsPath, network.DefaultInterfaceName) + if err != nil { + return nil, err + } + + if len(ips) == 0 { + return nil, fmt.Errorf("cannot find pod IPs in the network namespace, skipping pod network status for container %q", id) + } + + return &network.PodNetworkStatus{ + IP: ips[0], + IPs: ips, + }, nil +} + +// buildDNSCapabilities builds cniDNSConfig from runtimeapi.DNSConfig. +func buildDNSCapabilities(dnsConfig *runtimeapi.DNSConfig) *cniDNSConfig { + return nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/cni/cni_windows.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/cni/cni_windows.go new file mode 100644 index 000000000000..f1b4aca6fe5f --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/cni/cni_windows.go @@ -0,0 +1,92 @@ +//go:build windows && !dockerless +// +build windows,!dockerless + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cni + +import ( + "context" + "fmt" + cniTypes020 "github.com/containernetworking/cni/pkg/types/020" + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + "k8s.io/klog/v2" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + "k8s.io/kubernetes/pkg/kubelet/dockershim/network" + "net" + "time" +) + +func getLoNetwork(binDirs []string) *cniNetwork { + return nil +} + +func (plugin *cniNetworkPlugin) platformInit() error { + return nil +} + +// GetPodNetworkStatus : Assuming addToNetwork is idempotent, we can call this API as many times as required to get the IPAddress +func (plugin *cniNetworkPlugin) GetPodNetworkStatus(namespace string, name string, id kubecontainer.ContainerID) (*network.PodNetworkStatus, error) { + netnsPath, err := plugin.host.GetNetNS(id.ID) + if err != nil { + return nil, fmt.Errorf("CNI failed to retrieve network namespace path: %v", err) + } + + if plugin.getDefaultNetwork() == nil { + return nil, fmt.Errorf("CNI network not yet initialized, skipping pod network status for container %q", id) + } + + // Because the default remote runtime request timeout is 4 min,so set slightly less than 240 seconds + // Todo get the timeout from parent ctx + cniTimeoutCtx, cancelFunc := context.WithTimeout(context.Background(), network.CNITimeoutSec*time.Second) + defer cancelFunc() + result, err := plugin.addToNetwork(cniTimeoutCtx, plugin.getDefaultNetwork(), name, namespace, id, netnsPath, nil, nil) + klog.V(5).InfoS("GetPodNetworkStatus", "result", result) + if err != nil { + klog.ErrorS(err, "Got error while adding to cni network") + return nil, err + } + + // Parse the result and get the IPAddress + var result020 *cniTypes020.Result + result020, err = cniTypes020.GetResult(result) + if err != nil { + klog.ErrorS(err, "Got error while cni parsing result") + return nil, err + } + + var list = []net.IP{result020.IP4.IP.IP} + + if result020.IP6 != nil { + list = append(list, result020.IP6.IP.IP) + } + + return &network.PodNetworkStatus{IP: result020.IP4.IP.IP, IPs: list}, nil +} + +// buildDNSCapabilities builds cniDNSConfig from runtimeapi.DNSConfig. +func buildDNSCapabilities(dnsConfig *runtimeapi.DNSConfig) *cniDNSConfig { + if dnsConfig != nil { + return &cniDNSConfig{ + Servers: dnsConfig.Servers, + Searches: dnsConfig.Searches, + Options: dnsConfig.Options, + } + } + + return nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport/fake_iptables.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport/fake_iptables.go new file mode 100644 index 000000000000..6d7a51fce932 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport/fake_iptables.go @@ -0,0 +1,375 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package hostport + +import ( + "bytes" + "fmt" + "strings" + "time" + + "k8s.io/apimachinery/pkg/util/sets" + utiliptables "k8s.io/kubernetes/pkg/util/iptables" + netutils "k8s.io/utils/net" +) + +type fakeChain struct { + name utiliptables.Chain + rules []string +} + +type fakeTable struct { + name utiliptables.Table + chains map[string]*fakeChain +} + +type fakeIPTables struct { + tables map[string]*fakeTable + builtinChains map[string]sets.String + protocol utiliptables.Protocol +} + +func NewFakeIPTables() *fakeIPTables { + return &fakeIPTables{ + tables: make(map[string]*fakeTable), + builtinChains: map[string]sets.String{ + string(utiliptables.TableFilter): sets.NewString("INPUT", "FORWARD", "OUTPUT"), + string(utiliptables.TableNAT): sets.NewString("PREROUTING", "INPUT", "OUTPUT", "POSTROUTING"), + string(utiliptables.TableMangle): sets.NewString("PREROUTING", "INPUT", "FORWARD", "OUTPUT", "POSTROUTING"), + }, + protocol: utiliptables.ProtocolIPv4, + } +} + +func (f *fakeIPTables) getTable(tableName utiliptables.Table) (*fakeTable, error) { + table, ok := f.tables[string(tableName)] + if !ok { + return nil, fmt.Errorf("table %s does not exist", tableName) + } + return table, nil +} + +func (f *fakeIPTables) getChain(tableName utiliptables.Table, chainName utiliptables.Chain) (*fakeTable, *fakeChain, error) { + table, err := f.getTable(tableName) + if err != nil { + return nil, nil, err + } + + chain, ok := table.chains[string(chainName)] + if !ok { + return table, nil, fmt.Errorf("chain %s/%s does not exist", tableName, chainName) + } + + return table, chain, nil +} + +func (f *fakeIPTables) ensureChain(tableName utiliptables.Table, chainName utiliptables.Chain) (bool, *fakeChain) { + table, chain, err := f.getChain(tableName, chainName) + if err != nil { + // either table or table+chain don't exist yet + if table == nil { + table = &fakeTable{ + name: tableName, + chains: make(map[string]*fakeChain), + } + f.tables[string(tableName)] = table + } + chain := &fakeChain{ + name: chainName, + rules: make([]string, 0), + } + table.chains[string(chainName)] = chain + return false, chain + } + return true, chain +} + +func (f *fakeIPTables) EnsureChain(tableName utiliptables.Table, chainName utiliptables.Chain) (bool, error) { + existed, _ := f.ensureChain(tableName, chainName) + return existed, nil +} + +func (f *fakeIPTables) FlushChain(tableName utiliptables.Table, chainName utiliptables.Chain) error { + _, chain, err := f.getChain(tableName, chainName) + if err != nil { + return err + } + chain.rules = make([]string, 0) + return nil +} + +func (f *fakeIPTables) DeleteChain(tableName utiliptables.Table, chainName utiliptables.Chain) error { + table, _, err := f.getChain(tableName, chainName) + if err != nil { + return err + } + delete(table.chains, string(chainName)) + return nil +} + +func (f *fakeIPTables) ChainExists(tableName utiliptables.Table, chainName utiliptables.Chain) (bool, error) { + _, _, err := f.getChain(tableName, chainName) + if err != nil { + return false, err + } + return true, nil +} + +// Returns index of rule in array; < 0 if rule is not found +func findRule(chain *fakeChain, rule string) int { + for i, candidate := range chain.rules { + if rule == candidate { + return i + } + } + return -1 +} + +func (f *fakeIPTables) ensureRule(position utiliptables.RulePosition, tableName utiliptables.Table, chainName utiliptables.Chain, rule string) (bool, error) { + _, chain, err := f.getChain(tableName, chainName) + if err != nil { + _, chain = f.ensureChain(tableName, chainName) + } + + rule, err = normalizeRule(rule) + if err != nil { + return false, err + } + ruleIdx := findRule(chain, rule) + if ruleIdx >= 0 { + return true, nil + } + + switch position { + case utiliptables.Prepend: + chain.rules = append([]string{rule}, chain.rules...) + case utiliptables.Append: + chain.rules = append(chain.rules, rule) + default: + return false, fmt.Errorf("unknown position argument %q", position) + } + return false, nil +} + +func normalizeRule(rule string) (string, error) { + normalized := "" + remaining := strings.TrimSpace(rule) + for { + var end int + + if strings.HasPrefix(remaining, "--to-destination=") { + remaining = strings.Replace(remaining, "=", " ", 1) + } + + if remaining[0] == '"' { + end = strings.Index(remaining[1:], "\"") + if end < 0 { + return "", fmt.Errorf("invalid rule syntax: mismatched quotes") + } + end += 2 + } else { + end = strings.Index(remaining, " ") + if end < 0 { + end = len(remaining) + } + } + arg := remaining[:end] + + // Normalize un-prefixed IP addresses like iptables does + if netutils.ParseIPSloppy(arg) != nil { + arg += "/32" + } + + if len(normalized) > 0 { + normalized += " " + } + normalized += strings.TrimSpace(arg) + if len(remaining) == end { + break + } + remaining = remaining[end+1:] + } + return normalized, nil +} + +func (f *fakeIPTables) EnsureRule(position utiliptables.RulePosition, tableName utiliptables.Table, chainName utiliptables.Chain, args ...string) (bool, error) { + ruleArgs := make([]string, 0) + for _, arg := range args { + // quote args with internal spaces (like comments) + if strings.Contains(arg, " ") { + arg = fmt.Sprintf("\"%s\"", arg) + } + ruleArgs = append(ruleArgs, arg) + } + return f.ensureRule(position, tableName, chainName, strings.Join(ruleArgs, " ")) +} + +func (f *fakeIPTables) DeleteRule(tableName utiliptables.Table, chainName utiliptables.Chain, args ...string) error { + _, chain, err := f.getChain(tableName, chainName) + if err == nil { + rule := strings.Join(args, " ") + ruleIdx := findRule(chain, rule) + if ruleIdx < 0 { + return nil + } + chain.rules = append(chain.rules[:ruleIdx], chain.rules[ruleIdx+1:]...) + } + return nil +} + +func (f *fakeIPTables) IsIPv6() bool { + return f.protocol == utiliptables.ProtocolIPv6 +} + +func (f *fakeIPTables) Protocol() utiliptables.Protocol { + return f.protocol +} + +func saveChain(chain *fakeChain, data *bytes.Buffer) { + for _, rule := range chain.rules { + data.WriteString(fmt.Sprintf("-A %s %s\n", chain.name, rule)) + } +} + +func (f *fakeIPTables) SaveInto(tableName utiliptables.Table, buffer *bytes.Buffer) error { + table, err := f.getTable(tableName) + if err != nil { + return err + } + + buffer.WriteString(fmt.Sprintf("*%s\n", table.name)) + + rules := bytes.NewBuffer(nil) + for _, chain := range table.chains { + buffer.WriteString(fmt.Sprintf(":%s - [0:0]\n", string(chain.name))) + saveChain(chain, rules) + } + buffer.Write(rules.Bytes()) + buffer.WriteString("COMMIT\n") + return nil +} + +func (f *fakeIPTables) restore(restoreTableName utiliptables.Table, data []byte, flush utiliptables.FlushFlag) error { + allLines := string(data) + buf := bytes.NewBuffer(data) + var tableName utiliptables.Table + for { + line, err := buf.ReadString('\n') + if err != nil { + break + } + if line[0] == '#' { + continue + } + + line = strings.TrimSuffix(line, "\n") + if strings.HasPrefix(line, "*") { + tableName = utiliptables.Table(line[1:]) + } + if tableName != "" { + if restoreTableName != "" && restoreTableName != tableName { + continue + } + if strings.HasPrefix(line, ":") { + chainName := utiliptables.Chain(strings.Split(line[1:], " ")[0]) + if flush == utiliptables.FlushTables { + table, chain, err := f.getChain(tableName, chainName) + if err != nil { + return err + } + if chain != nil { + delete(table.chains, string(chainName)) + } + } + _, _ = f.ensureChain(tableName, chainName) + // The --noflush option for iptables-restore doesn't work for user-defined chains, only builtin chains. + // We should flush user-defined chains if the chain is not to be deleted + if !f.isBuiltinChain(tableName, chainName) && !strings.Contains(allLines, "-X "+string(chainName)) { + if err := f.FlushChain(tableName, chainName); err != nil { + return err + } + } + } else if strings.HasPrefix(line, "-A") { + parts := strings.Split(line, " ") + if len(parts) < 3 { + return fmt.Errorf("invalid iptables rule '%s'", line) + } + chainName := utiliptables.Chain(parts[1]) + rule := strings.TrimPrefix(line, fmt.Sprintf("-A %s ", chainName)) + _, err := f.ensureRule(utiliptables.Append, tableName, chainName, rule) + if err != nil { + return err + } + } else if strings.HasPrefix(line, "-I") { + parts := strings.Split(line, " ") + if len(parts) < 3 { + return fmt.Errorf("invalid iptables rule '%s'", line) + } + chainName := utiliptables.Chain(parts[1]) + rule := strings.TrimPrefix(line, fmt.Sprintf("-I %s ", chainName)) + _, err := f.ensureRule(utiliptables.Prepend, tableName, chainName, rule) + if err != nil { + return err + } + } else if strings.HasPrefix(line, "-X") { + parts := strings.Split(line, " ") + if len(parts) < 2 { + return fmt.Errorf("invalid iptables rule '%s'", line) + } + if err := f.DeleteChain(tableName, utiliptables.Chain(parts[1])); err != nil { + return err + } + } else if line == "COMMIT" { + if restoreTableName == tableName { + return nil + } + tableName = "" + } + } + } + + return nil +} + +func (f *fakeIPTables) Restore(tableName utiliptables.Table, data []byte, flush utiliptables.FlushFlag, counters utiliptables.RestoreCountersFlag) error { + return f.restore(tableName, data, flush) +} + +func (f *fakeIPTables) RestoreAll(data []byte, flush utiliptables.FlushFlag, counters utiliptables.RestoreCountersFlag) error { + return f.restore("", data, flush) +} + +func (f *fakeIPTables) Monitor(canary utiliptables.Chain, tables []utiliptables.Table, reloadFunc func(), interval time.Duration, stopCh <-chan struct{}) { +} + +func (f *fakeIPTables) isBuiltinChain(tableName utiliptables.Table, chainName utiliptables.Chain) bool { + if builtinChains, ok := f.builtinChains[string(tableName)]; ok && builtinChains.Has(string(chainName)) { + return true + } + return false +} + +func (f *fakeIPTables) HasRandomFully() bool { + return false +} + +func (f *fakeIPTables) Present() bool { + return true +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport/hostport.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport/hostport.go new file mode 100644 index 000000000000..cb68abdc0172 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport/hostport.go @@ -0,0 +1,171 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package hostport + +import ( + "fmt" + "net" + "strconv" + "strings" + + "k8s.io/klog/v2" + + v1 "k8s.io/api/core/v1" + utiliptables "k8s.io/kubernetes/pkg/util/iptables" +) + +const ( + // the hostport chain + kubeHostportsChain utiliptables.Chain = "KUBE-HOSTPORTS" + // prefix for hostport chains + kubeHostportChainPrefix string = "KUBE-HP-" +) + +// PortMapping represents a network port in a container +type PortMapping struct { + HostPort int32 + ContainerPort int32 + Protocol v1.Protocol + HostIP string +} + +// PodPortMapping represents a pod's network state and associated container port mappings +type PodPortMapping struct { + Namespace string + Name string + PortMappings []*PortMapping + HostNetwork bool + IP net.IP +} + +// ipFamily refers to a specific family if not empty, i.e. "4" or "6". +type ipFamily string + +// Constants for valid IPFamily: +const ( + IPv4 ipFamily = "4" + IPv6 ipFamily = "6" +) + +type hostport struct { + ipFamily ipFamily + ip string + port int32 + protocol string +} + +type hostportOpener func(*hostport) (closeable, error) + +type closeable interface { + Close() error +} + +func openLocalPort(hp *hostport) (closeable, error) { + // For ports on node IPs, open the actual port and hold it, even though we + // use iptables to redirect traffic. + // This ensures a) that it's safe to use that port and b) that (a) stays + // true. The risk is that some process on the node (e.g. sshd or kubelet) + // is using a port and we give that same port out to a Service. That would + // be bad because iptables would silently claim the traffic but the process + // would never know. + // NOTE: We should not need to have a real listen()ing socket - bind() + // should be enough, but I can't figure out a way to e2e test without + // it. Tools like 'ss' and 'netstat' do not show sockets that are + // bind()ed but not listen()ed, and at least the default debian netcat + // has no way to avoid about 10 seconds of retries. + var socket closeable + // open the socket on the HostIP and HostPort specified + address := net.JoinHostPort(hp.ip, strconv.Itoa(int(hp.port))) + switch hp.protocol { + case "tcp": + network := "tcp" + string(hp.ipFamily) + listener, err := net.Listen(network, address) + if err != nil { + return nil, err + } + socket = listener + case "udp": + network := "udp" + string(hp.ipFamily) + addr, err := net.ResolveUDPAddr(network, address) + if err != nil { + return nil, err + } + conn, err := net.ListenUDP(network, addr) + if err != nil { + return nil, err + } + socket = conn + default: + return nil, fmt.Errorf("unknown protocol %q", hp.protocol) + } + klog.V(3).InfoS("Opened local port", "port", hp.String()) + return socket, nil +} + +// portMappingToHostport creates hostport structure based on input portmapping +func portMappingToHostport(portMapping *PortMapping, family ipFamily) hostport { + return hostport{ + ipFamily: family, + ip: portMapping.HostIP, + port: portMapping.HostPort, + protocol: strings.ToLower(string(portMapping.Protocol)), + } +} + +// ensureKubeHostportChains ensures the KUBE-HOSTPORTS chain is setup correctly +func ensureKubeHostportChains(iptables utiliptables.Interface, natInterfaceName string) error { + klog.V(4).InfoS("Ensuring kubelet hostport chains") + // Ensure kubeHostportChain + if _, err := iptables.EnsureChain(utiliptables.TableNAT, kubeHostportsChain); err != nil { + return fmt.Errorf("failed to ensure that %s chain %s exists: %v", utiliptables.TableNAT, kubeHostportsChain, err) + } + tableChainsNeedJumpServices := []struct { + table utiliptables.Table + chain utiliptables.Chain + }{ + {utiliptables.TableNAT, utiliptables.ChainOutput}, + {utiliptables.TableNAT, utiliptables.ChainPrerouting}, + } + args := []string{ + "-m", "comment", "--comment", "kube hostport portals", + "-m", "addrtype", "--dst-type", "LOCAL", + "-j", string(kubeHostportsChain), + } + for _, tc := range tableChainsNeedJumpServices { + // KUBE-HOSTPORTS chain needs to be appended to the system chains. + // This ensures KUBE-SERVICES chain gets processed first. + // Since rules in KUBE-HOSTPORTS chain matches broader cases, allow the more specific rules to be processed first. + if _, err := iptables.EnsureRule(utiliptables.Append, tc.table, tc.chain, args...); err != nil { + return fmt.Errorf("failed to ensure that %s chain %s jumps to %s: %v", tc.table, tc.chain, kubeHostportsChain, err) + } + } + if natInterfaceName != "" && natInterfaceName != "lo" { + // Need to SNAT traffic from localhost + localhost := "127.0.0.0/8" + if iptables.IsIPv6() { + localhost = "::1/128" + } + args = []string{"-m", "comment", "--comment", "SNAT for localhost access to hostports", "-o", natInterfaceName, "-s", localhost, "-j", "MASQUERADE"} + if _, err := iptables.EnsureRule(utiliptables.Append, utiliptables.TableNAT, utiliptables.ChainPostrouting, args...); err != nil { + return fmt.Errorf("failed to ensure that %s chain %s jumps to MASQUERADE: %v", utiliptables.TableNAT, utiliptables.ChainPostrouting, err) + } + } + return nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport/hostport_manager.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport/hostport_manager.go new file mode 100644 index 000000000000..3caa2007b62c --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport/hostport_manager.go @@ -0,0 +1,445 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package hostport + +import ( + "bytes" + "crypto/sha256" + "encoding/base32" + "fmt" + "net" + "strconv" + "strings" + "sync" + + v1 "k8s.io/api/core/v1" + utilerrors "k8s.io/apimachinery/pkg/util/errors" + "k8s.io/klog/v2" + iptablesproxy "k8s.io/kubernetes/pkg/proxy/iptables" + "k8s.io/kubernetes/pkg/util/conntrack" + utiliptables "k8s.io/kubernetes/pkg/util/iptables" + "k8s.io/utils/exec" + utilnet "k8s.io/utils/net" +) + +// HostPortManager is an interface for adding and removing hostport for a given pod sandbox. +type HostPortManager interface { + // Add implements port mappings. + // id should be a unique identifier for a pod, e.g. podSandboxID. + // podPortMapping is the associated port mapping information for the pod. + // natInterfaceName is the interface that localhost uses to talk to the given pod, if known. + Add(id string, podPortMapping *PodPortMapping, natInterfaceName string) error + // Remove cleans up matching port mappings + // Remove must be able to clean up port mappings without pod IP + Remove(id string, podPortMapping *PodPortMapping) error +} + +type hostportManager struct { + hostPortMap map[hostport]closeable + execer exec.Interface + conntrackFound bool + iptables utiliptables.Interface + portOpener hostportOpener + mu sync.Mutex +} + +// NewHostportManager creates a new HostPortManager +func NewHostportManager(iptables utiliptables.Interface) HostPortManager { + h := &hostportManager{ + hostPortMap: make(map[hostport]closeable), + execer: exec.New(), + iptables: iptables, + portOpener: openLocalPort, + } + h.conntrackFound = conntrack.Exists(h.execer) + if !h.conntrackFound { + klog.InfoS("The binary conntrack is not installed, this can cause failures in network connection cleanup.") + } + return h +} + +func (hm *hostportManager) Add(id string, podPortMapping *PodPortMapping, natInterfaceName string) (err error) { + if podPortMapping == nil || podPortMapping.HostNetwork { + return nil + } + podFullName := getPodFullName(podPortMapping) + // IP.To16() returns nil if IP is not a valid IPv4 or IPv6 address + if podPortMapping.IP.To16() == nil { + return fmt.Errorf("invalid or missing IP of pod %s", podFullName) + } + podIP := podPortMapping.IP.String() + isIPv6 := utilnet.IsIPv6(podPortMapping.IP) + + // skip if there is no hostport needed + hostportMappings := gatherHostportMappings(podPortMapping, isIPv6) + if len(hostportMappings) == 0 { + return nil + } + + if isIPv6 != hm.iptables.IsIPv6() { + return fmt.Errorf("HostPortManager IP family mismatch: %v, isIPv6 - %v", podIP, isIPv6) + } + + if err := ensureKubeHostportChains(hm.iptables, natInterfaceName); err != nil { + return err + } + + // Ensure atomicity for port opening and iptables operations + hm.mu.Lock() + defer hm.mu.Unlock() + + // try to open hostports + ports, err := hm.openHostports(podPortMapping) + if err != nil { + return err + } + for hostport, socket := range ports { + hm.hostPortMap[hostport] = socket + } + + natChains := bytes.NewBuffer(nil) + natRules := bytes.NewBuffer(nil) + writeLine(natChains, "*nat") + + existingChains, existingRules, err := getExistingHostportIPTablesRules(hm.iptables) + if err != nil { + // clean up opened host port if encounter any error + return utilerrors.NewAggregate([]error{err, hm.closeHostports(hostportMappings)}) + } + + newChains := []utiliptables.Chain{} + conntrackPortsToRemove := []int{} + for _, pm := range hostportMappings { + protocol := strings.ToLower(string(pm.Protocol)) + chain := getHostportChain(id, pm) + newChains = append(newChains, chain) + if pm.Protocol == v1.ProtocolUDP { + conntrackPortsToRemove = append(conntrackPortsToRemove, int(pm.HostPort)) + } + + // Add new hostport chain + writeLine(natChains, utiliptables.MakeChainLine(chain)) + + // Prepend the new chain to KUBE-HOSTPORTS + // This avoids any leaking iptables rule that takes up the same port + writeLine(natRules, "-I", string(kubeHostportsChain), + "-m", "comment", "--comment", fmt.Sprintf(`"%s hostport %d"`, podFullName, pm.HostPort), + "-m", protocol, "-p", protocol, "--dport", fmt.Sprintf("%d", pm.HostPort), + "-j", string(chain), + ) + + // SNAT if the traffic comes from the pod itself + writeLine(natRules, "-A", string(chain), + "-m", "comment", "--comment", fmt.Sprintf(`"%s hostport %d"`, podFullName, pm.HostPort), + "-s", podIP, + "-j", string(iptablesproxy.KubeMarkMasqChain)) + + // DNAT to the podIP:containerPort + hostPortBinding := net.JoinHostPort(podIP, strconv.Itoa(int(pm.ContainerPort))) + if pm.HostIP == "" || pm.HostIP == "0.0.0.0" || pm.HostIP == "::" { + writeLine(natRules, "-A", string(chain), + "-m", "comment", "--comment", fmt.Sprintf(`"%s hostport %d"`, podFullName, pm.HostPort), + "-m", protocol, "-p", protocol, + "-j", "DNAT", fmt.Sprintf("--to-destination=%s", hostPortBinding)) + } else { + writeLine(natRules, "-A", string(chain), + "-m", "comment", "--comment", fmt.Sprintf(`"%s hostport %d"`, podFullName, pm.HostPort), + "-m", protocol, "-p", protocol, "-d", pm.HostIP, + "-j", "DNAT", fmt.Sprintf("--to-destination=%s", hostPortBinding)) + } + } + + // getHostportChain should be able to provide unique hostport chain name using hash + // if there is a chain conflict or multiple Adds have been triggered for a single pod, + // filtering should be able to avoid further problem + filterChains(existingChains, newChains) + existingRules = filterRules(existingRules, newChains) + + for _, chain := range existingChains { + writeLine(natChains, chain) + } + for _, rule := range existingRules { + writeLine(natRules, rule) + } + writeLine(natRules, "COMMIT") + + if err = hm.syncIPTables(append(natChains.Bytes(), natRules.Bytes()...)); err != nil { + // clean up opened host port if encounter any error + return utilerrors.NewAggregate([]error{err, hm.closeHostports(hostportMappings)}) + } + + // Remove conntrack entries just after adding the new iptables rules. If the conntrack entry is removed along with + // the IP tables rule, it can be the case that the packets received by the node after iptables rule removal will + // create a new conntrack entry without any DNAT. That will result in blackhole of the traffic even after correct + // iptables rules have been added back. + if hm.execer != nil && hm.conntrackFound { + klog.InfoS("Starting to delete udp conntrack entries", "conntrackEntries", conntrackPortsToRemove, "isIPv6", isIPv6) + for _, port := range conntrackPortsToRemove { + err = conntrack.ClearEntriesForPort(hm.execer, port, isIPv6, v1.ProtocolUDP) + if err != nil { + klog.ErrorS(err, "Failed to clear udp conntrack for port", "port", port) + } + } + } + return nil +} + +func (hm *hostportManager) Remove(id string, podPortMapping *PodPortMapping) (err error) { + if podPortMapping == nil || podPortMapping.HostNetwork { + return nil + } + + hostportMappings := gatherHostportMappings(podPortMapping, hm.iptables.IsIPv6()) + if len(hostportMappings) == 0 { + return nil + } + + // Ensure atomicity for port closing and iptables operations + hm.mu.Lock() + defer hm.mu.Unlock() + + var existingChains map[utiliptables.Chain]string + var existingRules []string + existingChains, existingRules, err = getExistingHostportIPTablesRules(hm.iptables) + if err != nil { + return err + } + + // Gather target hostport chains for removal + chainsToRemove := []utiliptables.Chain{} + for _, pm := range hostportMappings { + chainsToRemove = append(chainsToRemove, getHostportChain(id, pm)) + } + + // remove rules that consists of target chains + remainingRules := filterRules(existingRules, chainsToRemove) + + // gather target hostport chains that exists in iptables-save result + existingChainsToRemove := []utiliptables.Chain{} + for _, chain := range chainsToRemove { + if _, ok := existingChains[chain]; ok { + existingChainsToRemove = append(existingChainsToRemove, chain) + } + } + + // exit if there is nothing to remove + // don´t forget to clean up opened pod host ports + if len(existingChainsToRemove) == 0 { + return hm.closeHostports(hostportMappings) + } + + natChains := bytes.NewBuffer(nil) + natRules := bytes.NewBuffer(nil) + writeLine(natChains, "*nat") + for _, chain := range existingChains { + writeLine(natChains, chain) + } + for _, rule := range remainingRules { + writeLine(natRules, rule) + } + for _, chain := range existingChainsToRemove { + writeLine(natRules, "-X", string(chain)) + } + writeLine(natRules, "COMMIT") + + if err := hm.syncIPTables(append(natChains.Bytes(), natRules.Bytes()...)); err != nil { + return err + } + + // clean up opened pod host ports + return hm.closeHostports(hostportMappings) +} + +// syncIPTables executes iptables-restore with given lines +func (hm *hostportManager) syncIPTables(lines []byte) error { + klog.V(3).InfoS("Restoring iptables rules", "iptableRules", lines) + err := hm.iptables.RestoreAll(lines, utiliptables.NoFlushTables, utiliptables.RestoreCounters) + if err != nil { + return fmt.Errorf("failed to execute iptables-restore: %v", err) + } + return nil +} + +// openHostports opens all given hostports using the given hostportOpener +// If encounter any error, clean up and return the error +// If all ports are opened successfully, return the hostport and socket mapping +func (hm *hostportManager) openHostports(podPortMapping *PodPortMapping) (map[hostport]closeable, error) { + var retErr error + ports := make(map[hostport]closeable) + for _, pm := range podPortMapping.PortMappings { + if pm.HostPort <= 0 { + continue + } + + // We do not open host ports for SCTP ports, as we agreed in the Support of SCTP KEP + if pm.Protocol == v1.ProtocolSCTP { + continue + } + + // HostIP IP family is not handled by this port opener + if pm.HostIP != "" && utilnet.IsIPv6String(pm.HostIP) != hm.iptables.IsIPv6() { + continue + } + + hp := portMappingToHostport(pm, hm.getIPFamily()) + socket, err := hm.portOpener(&hp) + if err != nil { + retErr = fmt.Errorf("cannot open hostport %d for pod %s: %v", pm.HostPort, getPodFullName(podPortMapping), err) + break + } + ports[hp] = socket + } + + // If encounter any error, close all hostports that just got opened. + if retErr != nil { + for hp, socket := range ports { + if err := socket.Close(); err != nil { + klog.ErrorS(err, "Cannot clean up hostport for the pod", "podFullName", getPodFullName(podPortMapping), "port", hp.port) + } + } + return nil, retErr + } + return ports, nil +} + +// closeHostports tries to close all the listed host ports +func (hm *hostportManager) closeHostports(hostportMappings []*PortMapping) error { + errList := []error{} + for _, pm := range hostportMappings { + hp := portMappingToHostport(pm, hm.getIPFamily()) + if socket, ok := hm.hostPortMap[hp]; ok { + klog.V(2).InfoS("Closing host port", "port", hp.String()) + if err := socket.Close(); err != nil { + errList = append(errList, fmt.Errorf("failed to close host port %s: %v", hp.String(), err)) + continue + } + delete(hm.hostPortMap, hp) + } else { + klog.V(5).InfoS("Host port does not have an open socket", "port", hp.String()) + } + } + return utilerrors.NewAggregate(errList) +} + +// getIPFamily returns the hostPortManager IP family +func (hm *hostportManager) getIPFamily() ipFamily { + family := IPv4 + if hm.iptables.IsIPv6() { + family = IPv6 + } + return family +} + +// getHostportChain takes id, hostport and protocol for a pod and returns associated iptables chain. +// This is computed by hashing (sha256) then encoding to base32 and truncating with the prefix +// "KUBE-HP-". We do this because IPTables Chain Names must be <= 28 chars long, and the longer +// they are the harder they are to read. +// WARNING: Please do not change this function. Otherwise, HostportManager may not be able to +// identify existing iptables chains. +func getHostportChain(id string, pm *PortMapping) utiliptables.Chain { + hash := sha256.Sum256([]byte(id + strconv.Itoa(int(pm.HostPort)) + string(pm.Protocol) + pm.HostIP)) + encoded := base32.StdEncoding.EncodeToString(hash[:]) + return utiliptables.Chain(kubeHostportChainPrefix + encoded[:16]) +} + +// gatherHostportMappings returns all the PortMappings which has hostport for a pod +// it filters the PortMappings that use HostIP and doesn't match the IP family specified +func gatherHostportMappings(podPortMapping *PodPortMapping, isIPv6 bool) []*PortMapping { + mappings := []*PortMapping{} + for _, pm := range podPortMapping.PortMappings { + if pm.HostPort <= 0 { + continue + } + if pm.HostIP != "" && utilnet.IsIPv6String(pm.HostIP) != isIPv6 { + continue + } + mappings = append(mappings, pm) + } + return mappings +} + +// getExistingHostportIPTablesRules retrieves raw data from iptables-save, parse it, +// return all the hostport related chains and rules +func getExistingHostportIPTablesRules(iptables utiliptables.Interface) (map[utiliptables.Chain]string, []string, error) { + iptablesData := bytes.NewBuffer(nil) + err := iptables.SaveInto(utiliptables.TableNAT, iptablesData) + if err != nil { // if we failed to get any rules + return nil, nil, fmt.Errorf("failed to execute iptables-save: %v", err) + } + existingNATChains := utiliptables.GetChainLines(utiliptables.TableNAT, iptablesData.Bytes()) + + existingHostportChains := make(map[utiliptables.Chain]string) + existingHostportRules := []string{} + + for chain := range existingNATChains { + if strings.HasPrefix(string(chain), string(kubeHostportsChain)) || strings.HasPrefix(string(chain), kubeHostportChainPrefix) { + existingHostportChains[chain] = string(existingNATChains[chain]) + } + } + + for _, line := range strings.Split(iptablesData.String(), "\n") { + if strings.HasPrefix(line, fmt.Sprintf("-A %s", kubeHostportChainPrefix)) || + strings.HasPrefix(line, fmt.Sprintf("-A %s", string(kubeHostportsChain))) { + existingHostportRules = append(existingHostportRules, line) + } + } + return existingHostportChains, existingHostportRules, nil +} + +// filterRules filters input rules with input chains. Rules that did not involve any filter chain will be returned. +// The order of the input rules is important and is preserved. +func filterRules(rules []string, filters []utiliptables.Chain) []string { + filtered := []string{} + for _, rule := range rules { + skip := false + for _, filter := range filters { + if strings.Contains(rule, string(filter)) { + skip = true + break + } + } + if !skip { + filtered = append(filtered, rule) + } + } + return filtered +} + +// filterChains deletes all entries of filter chains from chain map +func filterChains(chains map[utiliptables.Chain]string, filterChains []utiliptables.Chain) { + for _, chain := range filterChains { + delete(chains, chain) + } +} + +func getPodFullName(pod *PodPortMapping) string { + // Use underscore as the delimiter because it is not allowed in pod name + // (DNS subdomain format), while allowed in the container name format. + return pod.Name + "_" + pod.Namespace +} + +// Join all words with spaces, terminate with newline and write to buf. +func writeLine(buf *bytes.Buffer, words ...string) { + buf.WriteString(strings.Join(words, " ") + "\n") +} + +func (hp *hostport) String() string { + return fmt.Sprintf("%s:%d", hp.protocol, hp.port) +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger/signal_windows.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/kubenet/kubenet.go similarity index 74% rename from cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger/signal_windows.go rename to cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/kubenet/kubenet.go index 25c015b0e17f..159e7f75aee6 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger/signal_windows.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/kubenet/kubenet.go @@ -1,5 +1,8 @@ +//go:build !dockerless +// +build !dockerless + /* -Copyright 2018 The Kubernetes Authors. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +17,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -package debugger - -import "os" +package kubenet -// compareSignal is the signal to trigger cache compare. For windows, -// it's SIGINT. -var compareSignal = os.Interrupt +const ( + KubenetPluginName = "kubenet" +) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/kubenet/kubenet_linux.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/kubenet/kubenet_linux.go new file mode 100644 index 000000000000..d069336011a6 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/kubenet/kubenet_linux.go @@ -0,0 +1,930 @@ +//go:build linux && !dockerless +// +build linux,!dockerless + +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubenet + +import ( + "context" + "fmt" + "io/ioutil" + "net" + "strings" + "sync" + "time" + + "github.com/containernetworking/cni/libcni" + cnitypes "github.com/containernetworking/cni/pkg/types" + cnitypes020 "github.com/containernetworking/cni/pkg/types/020" + "github.com/vishvananda/netlink" + "golang.org/x/sys/unix" + utilerrors "k8s.io/apimachinery/pkg/util/errors" + utilnet "k8s.io/apimachinery/pkg/util/net" + utilsets "k8s.io/apimachinery/pkg/util/sets" + utilsysctl "k8s.io/component-helpers/node/util/sysctl" + "k8s.io/klog/v2" + kubeletconfig "k8s.io/kubernetes/pkg/kubelet/apis/config" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + "k8s.io/kubernetes/pkg/kubelet/dockershim/network" + "k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport" + "k8s.io/kubernetes/pkg/util/bandwidth" + utiliptables "k8s.io/kubernetes/pkg/util/iptables" + utilexec "k8s.io/utils/exec" + utilebtables "k8s.io/utils/net/ebtables" + + netutils "k8s.io/utils/net" +) + +const ( + BridgeName = "cbr0" + DefaultCNIDir = "/opt/cni/bin" + + sysctlBridgeCallIPTables = "net/bridge/bridge-nf-call-iptables" + + // fallbackMTU is used if an MTU is not specified, and we cannot determine the MTU + fallbackMTU = 1460 + + // ebtables Chain to store dedup rules + dedupChain = utilebtables.Chain("KUBE-DEDUP") + + zeroCIDRv6 = "::/0" + zeroCIDRv4 = "0.0.0.0/0" + + NET_CONFIG_TEMPLATE = `{ + "cniVersion": "0.1.0", + "name": "kubenet", + "type": "bridge", + "bridge": "%s", + "mtu": %d, + "addIf": "%s", + "isGateway": true, + "ipMasq": false, + "hairpinMode": %t, + "ipam": { + "type": "host-local", + "ranges": [%s], + "routes": [%s] + } +}` +) + +// CNI plugins required by kubenet in /opt/cni/bin or user-specified directory +var requiredCNIPlugins = [...]string{"bridge", "host-local", "loopback"} + +type kubenetNetworkPlugin struct { + network.NoopNetworkPlugin + + host network.Host + netConfig *libcni.NetworkConfig + loConfig *libcni.NetworkConfig + cniConfig libcni.CNI + bandwidthShaper bandwidth.Shaper + mu sync.Mutex //Mutex for protecting podIPs map, netConfig, and shaper initialization + podIPs map[kubecontainer.ContainerID]utilsets.String + mtu int + execer utilexec.Interface + nsenterPath string + hairpinMode kubeletconfig.HairpinMode + hostportManager hostport.HostPortManager + hostportManagerv6 hostport.HostPortManager + iptables utiliptables.Interface + iptablesv6 utiliptables.Interface + sysctl utilsysctl.Interface + ebtables utilebtables.Interface + // binDirs is passed by kubelet cni-bin-dir parameter. + // kubenet will search for CNI binaries in DefaultCNIDir first, then continue to binDirs. + binDirs []string + nonMasqueradeCIDR string + cacheDir string + podCIDRs []*net.IPNet +} + +func NewPlugin(networkPluginDirs []string, cacheDir string) network.NetworkPlugin { + execer := utilexec.New() + iptInterface := utiliptables.New(execer, utiliptables.ProtocolIPv4) + iptInterfacev6 := utiliptables.New(execer, utiliptables.ProtocolIPv6) + return &kubenetNetworkPlugin{ + podIPs: make(map[kubecontainer.ContainerID]utilsets.String), + execer: utilexec.New(), + iptables: iptInterface, + iptablesv6: iptInterfacev6, + sysctl: utilsysctl.New(), + binDirs: append([]string{DefaultCNIDir}, networkPluginDirs...), + hostportManager: hostport.NewHostportManager(iptInterface), + hostportManagerv6: hostport.NewHostportManager(iptInterfacev6), + nonMasqueradeCIDR: "10.0.0.0/8", + cacheDir: cacheDir, + podCIDRs: make([]*net.IPNet, 0), + } +} + +func (plugin *kubenetNetworkPlugin) Init(host network.Host, hairpinMode kubeletconfig.HairpinMode, nonMasqueradeCIDR string, mtu int) error { + plugin.host = host + plugin.hairpinMode = hairpinMode + plugin.nonMasqueradeCIDR = nonMasqueradeCIDR + plugin.cniConfig = &libcni.CNIConfig{Path: plugin.binDirs} + + if mtu == network.UseDefaultMTU { + if link, err := findMinMTU(); err == nil { + plugin.mtu = link.MTU + klog.V(5).InfoS("Using the interface MTU value as bridge MTU", "interfaceName", link.Name, "mtuValue", link.MTU) + } else { + plugin.mtu = fallbackMTU + klog.InfoS("Failed to find default bridge MTU, using default value", "mtuValue", fallbackMTU, "err", err) + } + } else { + plugin.mtu = mtu + } + + // Since this plugin uses a Linux bridge, set bridge-nf-call-iptables=1 + // is necessary to ensure kube-proxy functions correctly. + // + // This will return an error on older kernel version (< 3.18) as the module + // was built-in, we simply ignore the error here. A better thing to do is + // to check the kernel version in the future. + plugin.execer.Command("modprobe", "br-netfilter").CombinedOutput() + err := plugin.sysctl.SetSysctl(sysctlBridgeCallIPTables, 1) + if err != nil { + klog.InfoS("can't set sysctl bridge-nf-call-iptables", "err", err) + } + + plugin.loConfig, err = libcni.ConfFromBytes([]byte(`{ + "cniVersion": "0.1.0", + "name": "kubenet-loopback", + "type": "loopback" +}`)) + if err != nil { + return fmt.Errorf("failed to generate loopback config: %v", err) + } + + plugin.nsenterPath, err = plugin.execer.LookPath("nsenter") + if err != nil { + return fmt.Errorf("failed to find nsenter binary: %v", err) + } + + // Need to SNAT outbound traffic from cluster + if err = plugin.ensureMasqRule(); err != nil { + return err + } + return nil +} + +// TODO: move thic logic into cni bridge plugin and remove this from kubenet +func (plugin *kubenetNetworkPlugin) ensureMasqRule() error { + if plugin.nonMasqueradeCIDR != zeroCIDRv4 && plugin.nonMasqueradeCIDR != zeroCIDRv6 { + // switch according to target nonMasqueradeCidr ip family + ipt := plugin.iptables + if netutils.IsIPv6CIDRString(plugin.nonMasqueradeCIDR) { + ipt = plugin.iptablesv6 + } + + if _, err := ipt.EnsureRule(utiliptables.Append, utiliptables.TableNAT, utiliptables.ChainPostrouting, + "-m", "comment", "--comment", "kubenet: SNAT for outbound traffic from cluster", + "-m", "addrtype", "!", "--dst-type", "LOCAL", + "!", "-d", plugin.nonMasqueradeCIDR, + "-j", "MASQUERADE"); err != nil { + return fmt.Errorf("failed to ensure that %s chain %s jumps to MASQUERADE: %v", utiliptables.TableNAT, utiliptables.ChainPostrouting, err) + } + } + return nil +} + +func findMinMTU() (*net.Interface, error) { + intfs, err := net.Interfaces() + if err != nil { + return nil, err + } + + mtu := 999999 + defIntfIndex := -1 + for i, intf := range intfs { + if ((intf.Flags & net.FlagUp) != 0) && (intf.Flags&(net.FlagLoopback|net.FlagPointToPoint) == 0) { + if intf.MTU < mtu { + mtu = intf.MTU + defIntfIndex = i + } + } + } + + if mtu >= 999999 || mtu < 576 || defIntfIndex < 0 { + return nil, fmt.Errorf("no suitable interface: %v", BridgeName) + } + + return &intfs[defIntfIndex], nil +} + +func (plugin *kubenetNetworkPlugin) Event(name string, details map[string]interface{}) { + var err error + if name != network.NET_PLUGIN_EVENT_POD_CIDR_CHANGE { + return + } + + plugin.mu.Lock() + defer plugin.mu.Unlock() + + podCIDR, ok := details[network.NET_PLUGIN_EVENT_POD_CIDR_CHANGE_DETAIL_CIDR].(string) + if !ok { + klog.InfoS("The event didn't contain pod CIDR", "event", network.NET_PLUGIN_EVENT_POD_CIDR_CHANGE) + return + } + + if plugin.netConfig != nil { + klog.InfoS("Ignoring subsequent pod CIDR update to new cidr", "podCIDR", podCIDR) + return + } + + klog.V(4).InfoS("Kubenet: PodCIDR is set to new value", "podCIDR", podCIDR) + podCIDRs := strings.Split(podCIDR, ",") + + for idx, currentPodCIDR := range podCIDRs { + _, cidr, err := netutils.ParseCIDRSloppy(currentPodCIDR) + if nil != err { + klog.InfoS("Failed to generate CNI network config with cidr at the index", "podCIDR", currentPodCIDR, "index", idx, "err", err) + return + } + // create list of ips + plugin.podCIDRs = append(plugin.podCIDRs, cidr) + } + + //setup hairpinMode + setHairpin := plugin.hairpinMode == kubeletconfig.HairpinVeth + + json := fmt.Sprintf(NET_CONFIG_TEMPLATE, BridgeName, plugin.mtu, network.DefaultInterfaceName, setHairpin, plugin.getRangesConfig(), plugin.getRoutesConfig()) + klog.V(4).InfoS("CNI network config set to json format", "cniNetworkConfig", json) + plugin.netConfig, err = libcni.ConfFromBytes([]byte(json)) + if err != nil { + klog.InfoS("** failed to set up CNI with json format", "cniNetworkConfig", json, "err", err) + // just incase it was set by mistake + plugin.netConfig = nil + // we bail out by clearing the *entire* list + // of addresses assigned to cbr0 + plugin.clearUnusedBridgeAddresses() + } +} + +// clear all address on bridge except those operated on by kubenet +func (plugin *kubenetNetworkPlugin) clearUnusedBridgeAddresses() { + cidrIncluded := func(list []*net.IPNet, check *net.IPNet) bool { + for _, thisNet := range list { + if utilnet.IPNetEqual(thisNet, check) { + return true + } + } + return false + } + + bridge, err := netlink.LinkByName(BridgeName) + if err != nil { + return + } + + addrs, err := netlink.AddrList(bridge, unix.AF_INET) + if err != nil { + klog.V(2).InfoS("Attempting to get address for the interface failed", "interfaceName", BridgeName, "err", err) + return + } + + for _, addr := range addrs { + if !cidrIncluded(plugin.podCIDRs, addr.IPNet) { + klog.V(2).InfoS("Removing old address from the interface", "interfaceName", BridgeName, "address", addr.IPNet.String()) + netlink.AddrDel(bridge, &addr) + } + } +} + +func (plugin *kubenetNetworkPlugin) Name() string { + return KubenetPluginName +} + +func (plugin *kubenetNetworkPlugin) Capabilities() utilsets.Int { + return utilsets.NewInt() +} + +// setup sets up networking through CNI using the given ns/name and sandbox ID. +func (plugin *kubenetNetworkPlugin) setup(namespace string, name string, id kubecontainer.ContainerID, annotations map[string]string) error { + var ipv4, ipv6 net.IP + var podGateways []net.IP + var podCIDRs []net.IPNet + + // Disable DAD so we skip the kernel delay on bringing up new interfaces. + if err := plugin.disableContainerDAD(id); err != nil { + klog.V(3).InfoS("Failed to disable DAD in container", "err", err) + } + + // Bring up container loopback interface + if _, err := plugin.addContainerToNetwork(plugin.loConfig, "lo", namespace, name, id); err != nil { + return err + } + + // Hook container up with our bridge + resT, err := plugin.addContainerToNetwork(plugin.netConfig, network.DefaultInterfaceName, namespace, name, id) + if err != nil { + return err + } + // Coerce the CNI result version + res, err := cnitypes020.GetResult(resT) + if err != nil { + return fmt.Errorf("unable to understand network config: %v", err) + } + //TODO: v1.16 (khenidak) update NET_CONFIG_TEMPLATE to CNI version 0.3.0 or later so + // that we get multiple IP addresses in the returned Result structure + if res.IP4 != nil { + ipv4 = res.IP4.IP.IP.To4() + podGateways = append(podGateways, res.IP4.Gateway) + podCIDRs = append(podCIDRs, net.IPNet{IP: ipv4.Mask(res.IP4.IP.Mask), Mask: res.IP4.IP.Mask}) + } + + if res.IP6 != nil { + ipv6 = res.IP6.IP.IP + podGateways = append(podGateways, res.IP6.Gateway) + podCIDRs = append(podCIDRs, net.IPNet{IP: ipv6.Mask(res.IP6.IP.Mask), Mask: res.IP6.IP.Mask}) + } + + if ipv4 == nil && ipv6 == nil { + return fmt.Errorf("cni didn't report ipv4 ipv6") + } + // Put the container bridge into promiscuous mode to force it to accept hairpin packets. + // TODO: Remove this once the kernel bug (#20096) is fixed. + if plugin.hairpinMode == kubeletconfig.PromiscuousBridge { + link, err := netlink.LinkByName(BridgeName) + if err != nil { + return fmt.Errorf("failed to lookup %q: %v", BridgeName, err) + } + if link.Attrs().Promisc != 1 { + // promiscuous mode is not on, then turn it on. + err := netlink.SetPromiscOn(link) + if err != nil { + return fmt.Errorf("error setting promiscuous mode on %s: %v", BridgeName, err) + } + } + + // configure the ebtables rules to eliminate duplicate packets by best effort + plugin.syncEbtablesDedupRules(link.Attrs().HardwareAddr, podCIDRs, podGateways) + } + + // add the ip to tracked ips + if ipv4 != nil { + plugin.addPodIP(id, ipv4.String()) + } + if ipv6 != nil { + plugin.addPodIP(id, ipv6.String()) + } + + if err := plugin.addTrafficShaping(id, annotations); err != nil { + return err + } + + return plugin.addPortMapping(id, name, namespace) +} + +// The first SetUpPod call creates the bridge; get a shaper for the sake of initialization +// TODO: replace with CNI traffic shaper plugin +func (plugin *kubenetNetworkPlugin) addTrafficShaping(id kubecontainer.ContainerID, annotations map[string]string) error { + shaper := plugin.shaper() + ingress, egress, err := bandwidth.ExtractPodBandwidthResources(annotations) + if err != nil { + return fmt.Errorf("error reading pod bandwidth annotations: %v", err) + } + iplist, exists := plugin.getCachedPodIPs(id) + if !exists { + return fmt.Errorf("pod %s does not have recorded ips", id) + } + + if egress != nil || ingress != nil { + for _, ip := range iplist { + mask := 32 + if netutils.IsIPv6String(ip) { + mask = 128 + } + if err != nil { + return fmt.Errorf("failed to setup traffic shaping for pod ip%s", ip) + } + + if err := shaper.ReconcileCIDR(fmt.Sprintf("%v/%v", ip, mask), egress, ingress); err != nil { + return fmt.Errorf("failed to add pod to shaper: %v", err) + } + } + } + return nil +} + +// TODO: replace with CNI port-forwarding plugin +func (plugin *kubenetNetworkPlugin) addPortMapping(id kubecontainer.ContainerID, name, namespace string) error { + portMappings, err := plugin.host.GetPodPortMappings(id.ID) + if err != nil { + return err + } + + if len(portMappings) == 0 { + return nil + } + + iplist, exists := plugin.getCachedPodIPs(id) + if !exists { + return fmt.Errorf("pod %s does not have recorded ips", id) + } + + for _, ip := range iplist { + pm := &hostport.PodPortMapping{ + Namespace: namespace, + Name: name, + PortMappings: portMappings, + IP: netutils.ParseIPSloppy(ip), + HostNetwork: false, + } + if netutils.IsIPv6(pm.IP) { + if err := plugin.hostportManagerv6.Add(id.ID, pm, BridgeName); err != nil { + return err + } + } else { + if err := plugin.hostportManager.Add(id.ID, pm, BridgeName); err != nil { + return err + } + } + } + + return nil +} + +func (plugin *kubenetNetworkPlugin) SetUpPod(namespace string, name string, id kubecontainer.ContainerID, annotations, options map[string]string) error { + start := time.Now() + + if err := plugin.Status(); err != nil { + return fmt.Errorf("kubenet cannot SetUpPod: %v", err) + } + + defer func() { + klog.V(4).InfoS("SetUpPod took time", "pod", klog.KRef(namespace, name), "duration", time.Since(start)) + }() + + if err := plugin.setup(namespace, name, id, annotations); err != nil { + if err := plugin.teardown(namespace, name, id); err != nil { + // Not a hard error or warning + klog.V(4).InfoS("Failed to clean up pod after SetUpPod failure", "pod", klog.KRef(namespace, name), "err", err) + } + return err + } + + // Need to SNAT outbound traffic from cluster + if err := plugin.ensureMasqRule(); err != nil { + klog.ErrorS(err, "Failed to ensure MASQ rule") + } + + return nil +} + +// Tears down as much of a pod's network as it can even if errors occur. Returns +// an aggregate error composed of all errors encountered during the teardown. +func (plugin *kubenetNetworkPlugin) teardown(namespace string, name string, id kubecontainer.ContainerID) error { + errList := []error{} + + // Loopback network deletion failure should not be fatal on teardown + if err := plugin.delContainerFromNetwork(plugin.loConfig, "lo", namespace, name, id); err != nil { + klog.InfoS("Failed to delete loopback network", "err", err) + errList = append(errList, err) + + } + + // no ip dependent actions + if err := plugin.delContainerFromNetwork(plugin.netConfig, network.DefaultInterfaceName, namespace, name, id); err != nil { + klog.InfoS("Failed to delete the interface network", "interfaceName", network.DefaultInterfaceName, "err", err) + errList = append(errList, err) + } + + // If there are no IPs registered we can't teardown pod's IP dependencies + iplist, exists := plugin.getCachedPodIPs(id) + if !exists || len(iplist) == 0 { + klog.V(5).InfoS("Container does not have IP registered. Ignoring teardown call", "containerID", id, "pod", klog.KRef(namespace, name)) + return nil + } + + // get the list of port mappings + portMappings, err := plugin.host.GetPodPortMappings(id.ID) + if err != nil { + errList = append(errList, err) + } + + // process each pod IP + for _, ip := range iplist { + isV6 := netutils.IsIPv6String(ip) + klog.V(5).InfoS("Removing pod port mappings from the IP", "IP", ip) + if portMappings != nil && len(portMappings) > 0 { + if isV6 { + if err = plugin.hostportManagerv6.Remove(id.ID, &hostport.PodPortMapping{ + Namespace: namespace, + Name: name, + PortMappings: portMappings, + HostNetwork: false, + }); err != nil { + errList = append(errList, err) + } + } else { + if err = plugin.hostportManager.Remove(id.ID, &hostport.PodPortMapping{ + Namespace: namespace, + Name: name, + PortMappings: portMappings, + HostNetwork: false, + }); err != nil { + errList = append(errList, err) + } + } + } + + klog.V(5).InfoS("Removing pod IP from shaper for the pod", "pod", klog.KRef(namespace, name), "IP", ip) + // shaper uses a cidr, but we are using a single IP. + mask := "32" + if isV6 { + mask = "128" + } + + if err := plugin.shaper().Reset(fmt.Sprintf("%s/%s", ip, mask)); err != nil { + // Possible bandwidth shaping wasn't enabled for this pod anyways + klog.V(4).InfoS("Failed to remove pod IP from shaper", "IP", ip, "err", err) + } + + plugin.removePodIP(id, ip) + } + return utilerrors.NewAggregate(errList) +} + +func (plugin *kubenetNetworkPlugin) TearDownPod(namespace string, name string, id kubecontainer.ContainerID) error { + start := time.Now() + defer func() { + klog.V(4).InfoS("TearDownPod took time", "pod", klog.KRef(namespace, name), "duration", time.Since(start)) + }() + + if plugin.netConfig == nil { + return fmt.Errorf("kubenet needs a PodCIDR to tear down pods") + } + + if err := plugin.teardown(namespace, name, id); err != nil { + return err + } + + // Need to SNAT outbound traffic from cluster + if err := plugin.ensureMasqRule(); err != nil { + klog.ErrorS(err, "Failed to ensure MASQ rule") + } + return nil +} + +// TODO: Use the addToNetwork function to obtain the IP of the Pod. That will assume idempotent ADD call to the plugin. +// Also fix the runtime's call to Status function to be done only in the case that the IP is lost, no need to do periodic calls +func (plugin *kubenetNetworkPlugin) GetPodNetworkStatus(namespace string, name string, id kubecontainer.ContainerID) (*network.PodNetworkStatus, error) { + // try cached version + networkStatus := plugin.getNetworkStatus(id) + if networkStatus != nil { + return networkStatus, nil + } + + // not a cached version, get via network ns + netnsPath, err := plugin.host.GetNetNS(id.ID) + if err != nil { + return nil, fmt.Errorf("kubenet failed to retrieve network namespace path: %v", err) + } + if netnsPath == "" { + return nil, fmt.Errorf("cannot find the network namespace, skipping pod network status for container %q", id) + } + ips, err := network.GetPodIPs(plugin.execer, plugin.nsenterPath, netnsPath, network.DefaultInterfaceName) + if err != nil { + return nil, err + } + + // cache the ips + for _, ip := range ips { + plugin.addPodIP(id, ip.String()) + } + + // return from cached + return plugin.getNetworkStatus(id), nil +} + +// returns networkstatus +func (plugin *kubenetNetworkPlugin) getNetworkStatus(id kubecontainer.ContainerID) *network.PodNetworkStatus { + // Assuming the ip of pod does not change. Try to retrieve ip from kubenet map first. + iplist, ok := plugin.getCachedPodIPs(id) + if !ok { + return nil + } + + if len(iplist) == 0 { + return nil + } + + ips := make([]net.IP, 0, len(iplist)) + for _, ip := range iplist { + ips = append(ips, netutils.ParseIPSloppy(ip)) + } + + return &network.PodNetworkStatus{ + IP: ips[0], + IPs: ips, + } +} + +func (plugin *kubenetNetworkPlugin) Status() error { + // Can't set up pods if we don't have a PodCIDR yet + if plugin.netConfig == nil { + return fmt.Errorf("kubenet does not have netConfig. This is most likely due to lack of PodCIDR") + } + + if !plugin.checkRequiredCNIPlugins() { + return fmt.Errorf("could not locate kubenet required CNI plugins %v at %q", requiredCNIPlugins, plugin.binDirs) + } + return nil +} + +// checkRequiredCNIPlugins returns if all kubenet required cni plugins can be found at /opt/cni/bin or user specified NetworkPluginDir. +func (plugin *kubenetNetworkPlugin) checkRequiredCNIPlugins() bool { + for _, dir := range plugin.binDirs { + if plugin.checkRequiredCNIPluginsInOneDir(dir) { + return true + } + } + return false +} + +// checkRequiredCNIPluginsInOneDir returns true if all required cni plugins are placed in dir +func (plugin *kubenetNetworkPlugin) checkRequiredCNIPluginsInOneDir(dir string) bool { + files, err := ioutil.ReadDir(dir) + if err != nil { + return false + } + for _, cniPlugin := range requiredCNIPlugins { + found := false + for _, file := range files { + if strings.TrimSpace(file.Name()) == cniPlugin { + found = true + break + } + } + if !found { + return false + } + } + return true +} + +func (plugin *kubenetNetworkPlugin) buildCNIRuntimeConf(ifName string, id kubecontainer.ContainerID, needNetNs bool) (*libcni.RuntimeConf, error) { + netnsPath, err := plugin.host.GetNetNS(id.ID) + if needNetNs && err != nil { + klog.ErrorS(err, "Kubenet failed to retrieve network namespace path") + } + + return &libcni.RuntimeConf{ + ContainerID: id.ID, + NetNS: netnsPath, + IfName: ifName, + CacheDir: plugin.cacheDir, + }, nil +} + +func (plugin *kubenetNetworkPlugin) addContainerToNetwork(config *libcni.NetworkConfig, ifName, namespace, name string, id kubecontainer.ContainerID) (cnitypes.Result, error) { + rt, err := plugin.buildCNIRuntimeConf(ifName, id, true) + if err != nil { + return nil, fmt.Errorf("error building CNI config: %v", err) + } + + klog.V(3).InfoS("Adding pod to network with CNI plugin and runtime", "pod", klog.KRef(namespace, name), "networkName", config.Network.Name, "networkType", config.Network.Type, "rt", rt) + // Because the default remote runtime request timeout is 4 min,so set slightly less than 240 seconds + // Todo get the timeout from parent ctx + cniTimeoutCtx, cancelFunc := context.WithTimeout(context.Background(), network.CNITimeoutSec*time.Second) + defer cancelFunc() + res, err := plugin.cniConfig.AddNetwork(cniTimeoutCtx, config, rt) + if err != nil { + return nil, fmt.Errorf("error adding container to network: %v", err) + } + return res, nil +} + +func (plugin *kubenetNetworkPlugin) delContainerFromNetwork(config *libcni.NetworkConfig, ifName, namespace, name string, id kubecontainer.ContainerID) error { + rt, err := plugin.buildCNIRuntimeConf(ifName, id, false) + if err != nil { + return fmt.Errorf("error building CNI config: %v", err) + } + + klog.V(3).InfoS("Removing pod from network with CNI plugin and runtime", "pod", klog.KRef(namespace, name), "networkName", config.Network.Name, "networkType", config.Network.Type, "rt", rt) + // Because the default remote runtime request timeout is 4 min,so set slightly less than 240 seconds + // Todo get the timeout from parent ctx + cniTimeoutCtx, cancelFunc := context.WithTimeout(context.Background(), network.CNITimeoutSec*time.Second) + defer cancelFunc() + err = plugin.cniConfig.DelNetwork(cniTimeoutCtx, config, rt) + // The pod may not get deleted successfully at the first time. + // Ignore "no such file or directory" error in case the network has already been deleted in previous attempts. + if err != nil && !strings.Contains(err.Error(), "no such file or directory") { + return fmt.Errorf("error removing container from network: %v", err) + } + return nil +} + +// shaper retrieves the bandwidth shaper and, if it hasn't been fetched before, +// initializes it and ensures the bridge is appropriately configured +func (plugin *kubenetNetworkPlugin) shaper() bandwidth.Shaper { + plugin.mu.Lock() + defer plugin.mu.Unlock() + if plugin.bandwidthShaper == nil { + plugin.bandwidthShaper = bandwidth.NewTCShaper(BridgeName) + plugin.bandwidthShaper.ReconcileInterface() + } + return plugin.bandwidthShaper +} + +//TODO: make this into a goroutine and rectify the dedup rules periodically +func (plugin *kubenetNetworkPlugin) syncEbtablesDedupRules(macAddr net.HardwareAddr, podCIDRs []net.IPNet, podGateways []net.IP) { + if plugin.ebtables == nil { + plugin.ebtables = utilebtables.New(plugin.execer) + klog.V(3).InfoS("Flushing dedup chain") + if err := plugin.ebtables.FlushChain(utilebtables.TableFilter, dedupChain); err != nil { + klog.ErrorS(err, "Failed to flush dedup chain") + } + } + _, err := plugin.ebtables.GetVersion() + if err != nil { + klog.InfoS("Failed to get ebtables version. Skip syncing ebtables dedup rules", "err", err) + return + } + + // ensure custom chain exists + _, err = plugin.ebtables.EnsureChain(utilebtables.TableFilter, dedupChain) + if err != nil { + klog.ErrorS(nil, "Failed to ensure filter table KUBE-DEDUP chain") + return + } + + // jump to custom chain to the chain from core tables + _, err = plugin.ebtables.EnsureRule(utilebtables.Append, utilebtables.TableFilter, utilebtables.ChainOutput, "-j", string(dedupChain)) + if err != nil { + klog.ErrorS(err, "Failed to ensure filter table OUTPUT chain jump to KUBE-DEDUP chain") + return + } + + // per gateway rule + for idx, gw := range podGateways { + klog.V(3).InfoS("Filtering packets with ebtables", "mac", macAddr.String(), "gateway", gw.String(), "podCIDR", podCIDRs[idx].String()) + + bIsV6 := netutils.IsIPv6(gw) + IPFamily := "IPv4" + ipSrc := "--ip-src" + if bIsV6 { + IPFamily = "IPv6" + ipSrc = "--ip6-src" + } + commonArgs := []string{"-p", IPFamily, "-s", macAddr.String(), "-o", "veth+"} + _, err = plugin.ebtables.EnsureRule(utilebtables.Prepend, utilebtables.TableFilter, dedupChain, append(commonArgs, ipSrc, gw.String(), "-j", "ACCEPT")...) + if err != nil { + klog.ErrorS(err, "Failed to ensure packets from cbr0 gateway to be accepted with error", "gateway", gw.String()) + return + + } + _, err = plugin.ebtables.EnsureRule(utilebtables.Append, utilebtables.TableFilter, dedupChain, append(commonArgs, ipSrc, podCIDRs[idx].String(), "-j", "DROP")...) + if err != nil { + klog.ErrorS(err, "Failed to ensure packets from podCidr but has mac address of cbr0 to get dropped.", "podCIDR", podCIDRs[idx].String()) + return + } + } +} + +// disableContainerDAD disables duplicate address detection in the container. +// DAD has a negative affect on pod creation latency, since we have to wait +// a second or more for the addresses to leave the "tentative" state. Since +// we're sure there won't be an address conflict (since we manage them manually), +// this is safe. See issue 54651. +// +// This sets net.ipv6.conf.default.dad_transmits to 0. It must be run *before* +// the CNI plugins are run. +func (plugin *kubenetNetworkPlugin) disableContainerDAD(id kubecontainer.ContainerID) error { + key := "net/ipv6/conf/default/dad_transmits" + + sysctlBin, err := plugin.execer.LookPath("sysctl") + if err != nil { + return fmt.Errorf("could not find sysctl binary: %s", err) + } + + netnsPath, err := plugin.host.GetNetNS(id.ID) + if err != nil { + return fmt.Errorf("failed to get netns: %v", err) + } + if netnsPath == "" { + return fmt.Errorf("pod has no network namespace") + } + + // If the sysctl doesn't exist, it means ipv6 is disabled; log and move on + if _, err := plugin.sysctl.GetSysctl(key); err != nil { + return fmt.Errorf("ipv6 not enabled: %v", err) + } + + output, err := plugin.execer.Command(plugin.nsenterPath, + fmt.Sprintf("--net=%s", netnsPath), "-F", "--", + sysctlBin, "-w", fmt.Sprintf("%s=%s", key, "0"), + ).CombinedOutput() + if err != nil { + return fmt.Errorf("failed to write sysctl: output: %s error: %s", + output, err) + } + return nil +} + +// given a n cidrs assigned to nodes, +// create bridge configuration that conforms to them +func (plugin *kubenetNetworkPlugin) getRangesConfig() string { + createRange := func(thisNet *net.IPNet) string { + template := ` +[{ +"subnet": "%s" +}]` + return fmt.Sprintf(template, thisNet.String()) + } + + ranges := make([]string, len(plugin.podCIDRs)) + for idx, thisCIDR := range plugin.podCIDRs { + ranges[idx] = createRange(thisCIDR) + } + //[{range}], [{range}] + // each range contains a subnet. gateway will be fetched from cni result + return strings.Join(ranges[:], ",") +} + +// given a n cidrs assigned to nodes, +// create bridge routes configuration that conforms to them +func (plugin *kubenetNetworkPlugin) getRoutesConfig() string { + var ( + routes []string + hasV4, hasV6 bool + ) + for _, thisCIDR := range plugin.podCIDRs { + if thisCIDR.IP.To4() != nil { + hasV4 = true + } else { + hasV6 = true + } + } + if hasV4 { + routes = append(routes, fmt.Sprintf(`{"dst": "%s"}`, zeroCIDRv4)) + } + if hasV6 { + routes = append(routes, fmt.Sprintf(`{"dst": "%s"}`, zeroCIDRv6)) + } + return strings.Join(routes, ",") +} + +func (plugin *kubenetNetworkPlugin) addPodIP(id kubecontainer.ContainerID, ip string) { + plugin.mu.Lock() + defer plugin.mu.Unlock() + + _, exist := plugin.podIPs[id] + if !exist { + plugin.podIPs[id] = utilsets.NewString() + } + + if !plugin.podIPs[id].Has(ip) { + plugin.podIPs[id].Insert(ip) + } +} + +func (plugin *kubenetNetworkPlugin) removePodIP(id kubecontainer.ContainerID, ip string) { + plugin.mu.Lock() + defer plugin.mu.Unlock() + + _, exist := plugin.podIPs[id] + if !exist { + return // did we restart kubelet? + } + + if plugin.podIPs[id].Has(ip) { + plugin.podIPs[id].Delete(ip) + } + + // if there is no more ips here. let us delete + if plugin.podIPs[id].Len() == 0 { + delete(plugin.podIPs, id) + } +} + +// returns a copy of pod ips +// false is returned if id does not exist +func (plugin *kubenetNetworkPlugin) getCachedPodIPs(id kubecontainer.ContainerID) ([]string, bool) { + plugin.mu.Lock() + defer plugin.mu.Unlock() + + iplist, exists := plugin.podIPs[id] + if !exists { + return nil, false + } + + return iplist.UnsortedList(), true +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/kubenet/kubenet_unsupported.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/kubenet/kubenet_unsupported.go new file mode 100644 index 000000000000..c9adf1c6d3d5 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/kubenet/kubenet_unsupported.go @@ -0,0 +1,56 @@ +//go:build !linux && !dockerless +// +build !linux,!dockerless + +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubenet + +import ( + "fmt" + + kubeletconfig "k8s.io/kubernetes/pkg/kubelet/apis/config" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + "k8s.io/kubernetes/pkg/kubelet/dockershim/network" +) + +type kubenetNetworkPlugin struct { + network.NoopNetworkPlugin +} + +func NewPlugin(networkPluginDirs []string, cacheDir string) network.NetworkPlugin { + return &kubenetNetworkPlugin{} +} + +func (plugin *kubenetNetworkPlugin) Init(host network.Host, hairpinMode kubeletconfig.HairpinMode, nonMasqueradeCIDR string, mtu int) error { + return fmt.Errorf("Kubenet is not supported in this build") +} + +func (plugin *kubenetNetworkPlugin) Name() string { + return "kubenet" +} + +func (plugin *kubenetNetworkPlugin) SetUpPod(namespace string, name string, id kubecontainer.ContainerID, annotations, options map[string]string) error { + return fmt.Errorf("Kubenet is not supported in this build") +} + +func (plugin *kubenetNetworkPlugin) TearDownPod(namespace string, name string, id kubecontainer.ContainerID) error { + return fmt.Errorf("Kubenet is not supported in this build") +} + +func (plugin *kubenetNetworkPlugin) GetPodNetworkStatus(namespace string, name string, id kubecontainer.ContainerID) (*network.PodNetworkStatus, error) { + return nil, fmt.Errorf("Kubenet is not supported in this build") +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/metrics/metrics.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/metrics/metrics.go new file mode 100644 index 000000000000..318feabe31aa --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/metrics/metrics.go @@ -0,0 +1,93 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package metrics + +import ( + "sync" + "time" + + "k8s.io/component-base/metrics" + "k8s.io/component-base/metrics/legacyregistry" +) + +const ( + // NetworkPluginOperationsKey is the key for operation count metrics. + NetworkPluginOperationsKey = "network_plugin_operations_total" + // NetworkPluginOperationsLatencyKey is the key for the operation latency metrics. + NetworkPluginOperationsLatencyKey = "network_plugin_operations_duration_seconds" + // NetworkPluginOperationsErrorsKey is the key for the operations error metrics. + NetworkPluginOperationsErrorsKey = "network_plugin_operations_errors_total" + + // Keep the "kubelet" subsystem for backward compatibility. + kubeletSubsystem = "kubelet" +) + +var ( + // NetworkPluginOperationsLatency collects operation latency numbers by operation + // type. + NetworkPluginOperationsLatency = metrics.NewHistogramVec( + &metrics.HistogramOpts{ + Subsystem: kubeletSubsystem, + Name: NetworkPluginOperationsLatencyKey, + Help: "Latency in seconds of network plugin operations. Broken down by operation type.", + Buckets: metrics.DefBuckets, + StabilityLevel: metrics.ALPHA, + }, + []string{"operation_type"}, + ) + + // NetworkPluginOperations collects operation counts by operation type. + NetworkPluginOperations = metrics.NewCounterVec( + &metrics.CounterOpts{ + Subsystem: kubeletSubsystem, + Name: NetworkPluginOperationsKey, + Help: "Cumulative number of network plugin operations by operation type.", + StabilityLevel: metrics.ALPHA, + }, + []string{"operation_type"}, + ) + + // NetworkPluginOperationsErrors collects operation errors by operation type. + NetworkPluginOperationsErrors = metrics.NewCounterVec( + &metrics.CounterOpts{ + Subsystem: kubeletSubsystem, + Name: NetworkPluginOperationsErrorsKey, + Help: "Cumulative number of network plugin operation errors by operation type.", + StabilityLevel: metrics.ALPHA, + }, + []string{"operation_type"}, + ) +) + +var registerMetrics sync.Once + +// Register all metrics. +func Register() { + registerMetrics.Do(func() { + legacyregistry.MustRegister(NetworkPluginOperationsLatency) + legacyregistry.MustRegister(NetworkPluginOperations) + legacyregistry.MustRegister(NetworkPluginOperationsErrors) + }) +} + +// SinceInSeconds gets the time since the specified start in seconds. +func SinceInSeconds(start time.Time) float64 { + return time.Since(start).Seconds() +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/network.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/network.go new file mode 100644 index 000000000000..82869c7aaf5b --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/network.go @@ -0,0 +1,30 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package network + +// TODO: Consider making this value configurable. +const DefaultInterfaceName = "eth0" + +// CNITimeoutSec is set to be slightly less than 240sec/4mins, which is the default remote runtime request timeout. +const CNITimeoutSec = 220 + +// UseDefaultMTU is a marker value that indicates the plugin should determine its own MTU +// It is the zero value, so a non-initialized value will mean "UseDefault" +const UseDefaultMTU = 0 diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/plugins.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/plugins.go new file mode 100644 index 000000000000..a3eea0466774 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/network/plugins.go @@ -0,0 +1,427 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +//go:generate mockgen -copyright_file=$BUILD_TAG_FILE -source=plugins.go -destination=testing/mock_network_plugin.go -package=testing NetworkPlugin +package network + +import ( + "fmt" + "net" + "strings" + "sync" + "time" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + utilerrors "k8s.io/apimachinery/pkg/util/errors" + utilsets "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/util/validation" + utilsysctl "k8s.io/component-helpers/node/util/sysctl" + "k8s.io/klog/v2" + kubeletconfig "k8s.io/kubernetes/pkg/kubelet/apis/config" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + "k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport" + "k8s.io/kubernetes/pkg/kubelet/dockershim/network/metrics" + utilexec "k8s.io/utils/exec" + netutils "k8s.io/utils/net" +) + +const ( + DefaultPluginName = "kubernetes.io/no-op" + + // Called when the node's Pod CIDR is known when using the + // controller manager's --allocate-node-cidrs=true option + NET_PLUGIN_EVENT_POD_CIDR_CHANGE = "pod-cidr-change" + NET_PLUGIN_EVENT_POD_CIDR_CHANGE_DETAIL_CIDR = "pod-cidr" +) + +// NetworkPlugin is an interface to network plugins for the kubelet +type NetworkPlugin interface { + // Init initializes the plugin. This will be called exactly once + // before any other methods are called. + Init(host Host, hairpinMode kubeletconfig.HairpinMode, nonMasqueradeCIDR string, mtu int) error + + // Called on various events like: + // NET_PLUGIN_EVENT_POD_CIDR_CHANGE + Event(name string, details map[string]interface{}) + + // Name returns the plugin's name. This will be used when searching + // for a plugin by name, e.g. + Name() string + + // Returns a set of NET_PLUGIN_CAPABILITY_* + Capabilities() utilsets.Int + + // SetUpPod is the method called after the infra container of + // the pod has been created but before the other containers of the + // pod are launched. + SetUpPod(namespace string, name string, podSandboxID kubecontainer.ContainerID, annotations, options map[string]string) error + + // TearDownPod is the method called before a pod's infra container will be deleted + TearDownPod(namespace string, name string, podSandboxID kubecontainer.ContainerID) error + + // GetPodNetworkStatus is the method called to obtain the ipv4 or ipv6 addresses of the container + GetPodNetworkStatus(namespace string, name string, podSandboxID kubecontainer.ContainerID) (*PodNetworkStatus, error) + + // Status returns error if the network plugin is in error state + Status() error +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// PodNetworkStatus stores the network status of a pod (currently just the primary IP address) +// This struct represents version "v1beta1" +type PodNetworkStatus struct { + metav1.TypeMeta `json:",inline"` + + // IP is the primary ipv4/ipv6 address of the pod. Among other things it is the address that - + // - kube expects to be reachable across the cluster + // - service endpoints are constructed with + // - will be reported in the PodStatus.PodIP field (will override the IP reported by docker) + IP net.IP `json:"ip" description:"Primary IP address of the pod"` + // IPs is the list of IPs assigned to Pod. IPs[0] == IP. The rest of the list is additional IPs + IPs []net.IP `json:"ips" description:"list of additional ips (inclusive of IP) assigned to pod"` +} + +// Host is an interface that plugins can use to access the kubelet. +// TODO(#35457): get rid of this backchannel to the kubelet. The scope of +// the back channel is restricted to host-ports/testing, and restricted +// to kubenet. No other network plugin wrapper needs it. Other plugins +// only require a way to access namespace information and port mapping +// information , which they can do directly through the embedded interfaces. +type Host interface { + // NamespaceGetter is a getter for sandbox namespace information. + NamespaceGetter + + // PortMappingGetter is a getter for sandbox port mapping information. + PortMappingGetter +} + +// NamespaceGetter is an interface to retrieve namespace information for a given +// podSandboxID. Typically implemented by runtime shims that are closely coupled to +// CNI plugin wrappers like kubenet. +type NamespaceGetter interface { + // GetNetNS returns network namespace information for the given containerID. + // Runtimes should *never* return an empty namespace and nil error for + // a container; if error is nil then the namespace string must be valid. + GetNetNS(containerID string) (string, error) +} + +// PortMappingGetter is an interface to retrieve port mapping information for a given +// podSandboxID. Typically implemented by runtime shims that are closely coupled to +// CNI plugin wrappers like kubenet. +type PortMappingGetter interface { + // GetPodPortMappings returns sandbox port mappings information. + GetPodPortMappings(containerID string) ([]*hostport.PortMapping, error) +} + +// InitNetworkPlugin inits the plugin that matches networkPluginName. Plugins must have unique names. +func InitNetworkPlugin(plugins []NetworkPlugin, networkPluginName string, host Host, hairpinMode kubeletconfig.HairpinMode, nonMasqueradeCIDR string, mtu int) (NetworkPlugin, error) { + if networkPluginName == "" { + // default to the no_op plugin + plug := &NoopNetworkPlugin{} + plug.Sysctl = utilsysctl.New() + if err := plug.Init(host, hairpinMode, nonMasqueradeCIDR, mtu); err != nil { + return nil, err + } + return plug, nil + } + + pluginMap := map[string]NetworkPlugin{} + + allErrs := []error{} + for _, plugin := range plugins { + name := plugin.Name() + if errs := validation.IsQualifiedName(name); len(errs) != 0 { + allErrs = append(allErrs, fmt.Errorf("network plugin has invalid name: %q: %s", name, strings.Join(errs, ";"))) + continue + } + + if _, found := pluginMap[name]; found { + allErrs = append(allErrs, fmt.Errorf("network plugin %q was registered more than once", name)) + continue + } + pluginMap[name] = plugin + } + + chosenPlugin := pluginMap[networkPluginName] + if chosenPlugin != nil { + err := chosenPlugin.Init(host, hairpinMode, nonMasqueradeCIDR, mtu) + if err != nil { + allErrs = append(allErrs, fmt.Errorf("network plugin %q failed init: %v", networkPluginName, err)) + } else { + klog.V(1).InfoS("Loaded network plugin", "networkPluginName", networkPluginName) + } + } else { + allErrs = append(allErrs, fmt.Errorf("network plugin %q not found", networkPluginName)) + } + + return chosenPlugin, utilerrors.NewAggregate(allErrs) +} + +type NoopNetworkPlugin struct { + Sysctl utilsysctl.Interface +} + +const sysctlBridgeCallIPTables = "net/bridge/bridge-nf-call-iptables" +const sysctlBridgeCallIP6Tables = "net/bridge/bridge-nf-call-ip6tables" + +func (plugin *NoopNetworkPlugin) Init(host Host, hairpinMode kubeletconfig.HairpinMode, nonMasqueradeCIDR string, mtu int) error { + // Set bridge-nf-call-iptables=1 to maintain compatibility with older + // kubernetes versions to ensure the iptables-based kube proxy functions + // correctly. Other plugins are responsible for setting this correctly + // depending on whether or not they connect containers to Linux bridges + // or use some other mechanism (ie, SDN vswitch). + + // Ensure the netfilter module is loaded on kernel >= 3.18; previously + // it was built-in. + utilexec.New().Command("modprobe", "br-netfilter").CombinedOutput() + if err := plugin.Sysctl.SetSysctl(sysctlBridgeCallIPTables, 1); err != nil { + klog.InfoS("can't set sysctl bridge-nf-call-iptables", "err", err) + } + if val, err := plugin.Sysctl.GetSysctl(sysctlBridgeCallIP6Tables); err == nil { + if val != 1 { + if err = plugin.Sysctl.SetSysctl(sysctlBridgeCallIP6Tables, 1); err != nil { + klog.InfoS("can't set sysctl bridge-nf-call-ip6tables", "err", err) + } + } + } + + return nil +} + +func (plugin *NoopNetworkPlugin) Event(name string, details map[string]interface{}) { +} + +func (plugin *NoopNetworkPlugin) Name() string { + return DefaultPluginName +} + +func (plugin *NoopNetworkPlugin) Capabilities() utilsets.Int { + return utilsets.NewInt() +} + +func (plugin *NoopNetworkPlugin) SetUpPod(namespace string, name string, id kubecontainer.ContainerID, annotations, options map[string]string) error { + return nil +} + +func (plugin *NoopNetworkPlugin) TearDownPod(namespace string, name string, id kubecontainer.ContainerID) error { + return nil +} + +func (plugin *NoopNetworkPlugin) GetPodNetworkStatus(namespace string, name string, id kubecontainer.ContainerID) (*PodNetworkStatus, error) { + return nil, nil +} + +func (plugin *NoopNetworkPlugin) Status() error { + return nil +} + +func getOnePodIP(execer utilexec.Interface, nsenterPath, netnsPath, interfaceName, addrType string) (net.IP, error) { + // Try to retrieve ip inside container network namespace + output, err := execer.Command(nsenterPath, fmt.Sprintf("--net=%s", netnsPath), "-F", "--", + "ip", "-o", addrType, "addr", "show", "dev", interfaceName, "scope", "global").CombinedOutput() + if err != nil { + return nil, fmt.Errorf("unexpected command output %s with error: %v", output, err) + } + + lines := strings.Split(string(output), "\n") + if len(lines) < 1 { + return nil, fmt.Errorf("unexpected command output %s", output) + } + fields := strings.Fields(lines[0]) + if len(fields) < 4 { + return nil, fmt.Errorf("unexpected address output %s ", lines[0]) + } + ip, _, err := netutils.ParseCIDRSloppy(fields[3]) + if err != nil { + return nil, fmt.Errorf("CNI failed to parse ip from output %s due to %v", output, err) + } + + return ip, nil +} + +// GetPodIP gets the IP of the pod by inspecting the network info inside the pod's network namespace. +// TODO (khenidak). The "primary ip" in dual stack world does not really exist. For now +// we are defaulting to v4 as primary +func GetPodIPs(execer utilexec.Interface, nsenterPath, netnsPath, interfaceName string) ([]net.IP, error) { + var ( + list []net.IP + errs []error + ) + for _, addrType := range []string{"-4", "-6"} { + if ip, err := getOnePodIP(execer, nsenterPath, netnsPath, interfaceName, addrType); err == nil { + list = append(list, ip) + } else { + errs = append(errs, err) + } + } + + if len(list) == 0 { + return nil, utilerrors.NewAggregate(errs) + } + return list, nil + +} + +type NoopPortMappingGetter struct{} + +func (*NoopPortMappingGetter) GetPodPortMappings(containerID string) ([]*hostport.PortMapping, error) { + return nil, nil +} + +// The PluginManager wraps a kubelet network plugin and provides synchronization +// for a given pod's network operations. Each pod's setup/teardown/status operations +// are synchronized against each other, but network operations of other pods can +// proceed in parallel. +type PluginManager struct { + // Network plugin being wrapped + plugin NetworkPlugin + + // Pod list and lock + podsLock sync.Mutex + pods map[string]*podLock +} + +func NewPluginManager(plugin NetworkPlugin) *PluginManager { + metrics.Register() + return &PluginManager{ + plugin: plugin, + pods: make(map[string]*podLock), + } +} + +func (pm *PluginManager) PluginName() string { + return pm.plugin.Name() +} + +func (pm *PluginManager) Event(name string, details map[string]interface{}) { + pm.plugin.Event(name, details) +} + +func (pm *PluginManager) Status() error { + return pm.plugin.Status() +} + +type podLock struct { + // Count of in-flight operations for this pod; when this reaches zero + // the lock can be removed from the pod map + refcount uint + + // Lock to synchronize operations for this specific pod + mu sync.Mutex +} + +// Lock network operations for a specific pod. If that pod is not yet in +// the pod map, it will be added. The reference count for the pod will +// be increased. +func (pm *PluginManager) podLock(fullPodName string) *sync.Mutex { + pm.podsLock.Lock() + defer pm.podsLock.Unlock() + + lock, ok := pm.pods[fullPodName] + if !ok { + lock = &podLock{} + pm.pods[fullPodName] = lock + } + lock.refcount++ + return &lock.mu +} + +// Unlock network operations for a specific pod. The reference count for the +// pod will be decreased. If the reference count reaches zero, the pod will be +// removed from the pod map. +func (pm *PluginManager) podUnlock(fullPodName string) { + pm.podsLock.Lock() + defer pm.podsLock.Unlock() + + lock, ok := pm.pods[fullPodName] + if !ok { + klog.InfoS("Unbalanced pod lock unref for the pod", "podFullName", fullPodName) + return + } else if lock.refcount == 0 { + // This should never ever happen, but handle it anyway + delete(pm.pods, fullPodName) + klog.InfoS("Pod lock for the pod still in map with zero refcount", "podFullName", fullPodName) + return + } + lock.refcount-- + lock.mu.Unlock() + if lock.refcount == 0 { + delete(pm.pods, fullPodName) + } +} + +// recordOperation records operation and duration +func recordOperation(operation string, start time.Time) { + metrics.NetworkPluginOperations.WithLabelValues(operation).Inc() + metrics.NetworkPluginOperationsLatency.WithLabelValues(operation).Observe(metrics.SinceInSeconds(start)) +} + +// recordError records errors for metric. +func recordError(operation string) { + metrics.NetworkPluginOperationsErrors.WithLabelValues(operation).Inc() +} + +func (pm *PluginManager) GetPodNetworkStatus(podNamespace, podName string, id kubecontainer.ContainerID) (*PodNetworkStatus, error) { + const operation = "get_pod_network_status" + defer recordOperation(operation, time.Now()) + fullPodName := kubecontainer.BuildPodFullName(podName, podNamespace) + pm.podLock(fullPodName).Lock() + defer pm.podUnlock(fullPodName) + + netStatus, err := pm.plugin.GetPodNetworkStatus(podNamespace, podName, id) + if err != nil { + recordError(operation) + return nil, fmt.Errorf("networkPlugin %s failed on the status hook for pod %q: %v", pm.plugin.Name(), fullPodName, err) + } + + return netStatus, nil +} + +func (pm *PluginManager) SetUpPod(podNamespace, podName string, id kubecontainer.ContainerID, annotations, options map[string]string) error { + const operation = "set_up_pod" + defer recordOperation(operation, time.Now()) + fullPodName := kubecontainer.BuildPodFullName(podName, podNamespace) + pm.podLock(fullPodName).Lock() + defer pm.podUnlock(fullPodName) + + klog.V(3).InfoS("Calling network plugin to set up the pod", "pod", klog.KRef(podNamespace, podName), "networkPluginName", pm.plugin.Name()) + if err := pm.plugin.SetUpPod(podNamespace, podName, id, annotations, options); err != nil { + recordError(operation) + return fmt.Errorf("networkPlugin %s failed to set up pod %q network: %v", pm.plugin.Name(), fullPodName, err) + } + + return nil +} + +func (pm *PluginManager) TearDownPod(podNamespace, podName string, id kubecontainer.ContainerID) error { + const operation = "tear_down_pod" + defer recordOperation(operation, time.Now()) + fullPodName := kubecontainer.BuildPodFullName(podName, podNamespace) + pm.podLock(fullPodName).Lock() + defer pm.podUnlock(fullPodName) + + klog.V(3).InfoS("Calling network plugin to tear down the pod", "pod", klog.KRef(podNamespace, podName), "networkPluginName", pm.plugin.Name()) + if err := pm.plugin.TearDownPod(podNamespace, podName, id); err != nil { + recordError(operation) + return fmt.Errorf("networkPlugin %s failed to teardown pod %q network: %v", pm.plugin.Name(), fullPodName, err) + } + + return nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/remote/docker_server.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/remote/docker_server.go new file mode 100644 index 000000000000..433f53890e00 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/remote/docker_server.go @@ -0,0 +1,82 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package remote + +import ( + "fmt" + "os" + + "google.golang.org/grpc" + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + "k8s.io/klog/v2" + "k8s.io/kubernetes/pkg/kubelet/dockershim" + "k8s.io/kubernetes/pkg/kubelet/util" +) + +// maxMsgSize use 16MB as the default message size limit. +// grpc library default is 4MB +const maxMsgSize = 1024 * 1024 * 16 + +// DockerServer is the grpc server of dockershim. +type DockerServer struct { + // endpoint is the endpoint to serve on. + endpoint string + // service is the docker service which implements runtime and image services. + service dockershim.CRIService + // server is the grpc server. + server *grpc.Server +} + +// NewDockerServer creates the dockershim grpc server. +func NewDockerServer(endpoint string, s dockershim.CRIService) *DockerServer { + return &DockerServer{ + endpoint: endpoint, + service: s, + } +} + +// Start starts the dockershim grpc server. +func (s *DockerServer) Start() error { + // Start the internal service. + if err := s.service.Start(); err != nil { + klog.ErrorS(err, "Unable to start docker service") + return err + } + + klog.V(2).InfoS("Start dockershim grpc server") + l, err := util.CreateListener(s.endpoint) + if err != nil { + return fmt.Errorf("failed to listen on %q: %v", s.endpoint, err) + } + // Create the grpc server and register runtime and image services. + s.server = grpc.NewServer( + grpc.MaxRecvMsgSize(maxMsgSize), + grpc.MaxSendMsgSize(maxMsgSize), + ) + runtimeapi.RegisterRuntimeServiceServer(s.server, s.service) + runtimeapi.RegisterImageServiceServer(s.server, s.service) + go func() { + if err := s.server.Serve(l); err != nil { + klog.ErrorS(err, "Failed to serve connections") + os.Exit(1) + } + }() + return nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/security_context.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/security_context.go new file mode 100644 index 000000000000..25a12c450eb8 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/security_context.go @@ -0,0 +1,207 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dockershim + +import ( + "fmt" + "strconv" + + dockercontainer "github.com/docker/docker/api/types/container" + + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + knetwork "k8s.io/kubernetes/pkg/kubelet/dockershim/network" +) + +// applySandboxSecurityContext updates docker sandbox options according to security context. +func applySandboxSecurityContext(lc *runtimeapi.LinuxPodSandboxConfig, config *dockercontainer.Config, hc *dockercontainer.HostConfig, network *knetwork.PluginManager, separator rune) error { + if lc == nil { + return nil + } + + var sc *runtimeapi.LinuxContainerSecurityContext + if lc.SecurityContext != nil { + sc = &runtimeapi.LinuxContainerSecurityContext{ + SupplementalGroups: lc.SecurityContext.SupplementalGroups, + RunAsUser: lc.SecurityContext.RunAsUser, + RunAsGroup: lc.SecurityContext.RunAsGroup, + ReadonlyRootfs: lc.SecurityContext.ReadonlyRootfs, + SelinuxOptions: lc.SecurityContext.SelinuxOptions, + NamespaceOptions: lc.SecurityContext.NamespaceOptions, + Privileged: lc.SecurityContext.Privileged, + } + } + + err := modifyContainerConfig(sc, config) + if err != nil { + return err + } + + if err := modifyHostConfig(sc, hc, separator); err != nil { + return err + } + modifySandboxNamespaceOptions(sc.GetNamespaceOptions(), hc, network) + return nil +} + +// applyContainerSecurityContext updates docker container options according to security context. +func applyContainerSecurityContext(lc *runtimeapi.LinuxContainerConfig, podSandboxID string, config *dockercontainer.Config, hc *dockercontainer.HostConfig, separator rune) error { + if lc == nil { + return nil + } + + err := modifyContainerConfig(lc.SecurityContext, config) + if err != nil { + return err + } + if err := modifyHostConfig(lc.SecurityContext, hc, separator); err != nil { + return err + } + modifyContainerNamespaceOptions(lc.SecurityContext.GetNamespaceOptions(), podSandboxID, hc) + return nil +} + +// modifyContainerConfig applies container security context config to dockercontainer.Config. +func modifyContainerConfig(sc *runtimeapi.LinuxContainerSecurityContext, config *dockercontainer.Config) error { + if sc == nil { + return nil + } + if sc.RunAsUser != nil { + config.User = strconv.FormatInt(sc.GetRunAsUser().Value, 10) + } + if sc.RunAsUsername != "" { + config.User = sc.RunAsUsername + } + + user := config.User + if sc.RunAsGroup != nil { + if user == "" { + return fmt.Errorf("runAsGroup is specified without a runAsUser") + } + user = fmt.Sprintf("%s:%d", config.User, sc.GetRunAsGroup().Value) + } + + config.User = user + + return nil +} + +// modifyHostConfig applies security context config to dockercontainer.HostConfig. +func modifyHostConfig(sc *runtimeapi.LinuxContainerSecurityContext, hostConfig *dockercontainer.HostConfig, separator rune) error { + if sc == nil { + return nil + } + + // Apply supplemental groups. + for _, group := range sc.SupplementalGroups { + hostConfig.GroupAdd = append(hostConfig.GroupAdd, strconv.FormatInt(group, 10)) + } + + // Apply security context for the container. + hostConfig.Privileged = sc.Privileged + hostConfig.ReadonlyRootfs = sc.ReadonlyRootfs + if sc.Capabilities != nil { + hostConfig.CapAdd = sc.GetCapabilities().AddCapabilities + hostConfig.CapDrop = sc.GetCapabilities().DropCapabilities + } + if sc.SelinuxOptions != nil { + hostConfig.SecurityOpt = addSELinuxOptions( + hostConfig.SecurityOpt, + sc.SelinuxOptions, + separator, + ) + } + + // Apply apparmor options. + apparmorSecurityOpts, err := getApparmorSecurityOpts(sc, separator) + if err != nil { + return fmt.Errorf("failed to generate apparmor security options: %v", err) + } + hostConfig.SecurityOpt = append(hostConfig.SecurityOpt, apparmorSecurityOpts...) + + if sc.NoNewPrivs { + hostConfig.SecurityOpt = append(hostConfig.SecurityOpt, "no-new-privileges") + } + + if !hostConfig.Privileged { + hostConfig.MaskedPaths = sc.MaskedPaths + hostConfig.ReadonlyPaths = sc.ReadonlyPaths + } + + return nil +} + +// modifySandboxNamespaceOptions apply namespace options for sandbox +func modifySandboxNamespaceOptions(nsOpts *runtimeapi.NamespaceOption, hostConfig *dockercontainer.HostConfig, network *knetwork.PluginManager) { + // The sandbox's PID namespace is the one that's shared, so CONTAINER and POD are equivalent for it + if nsOpts.GetPid() == runtimeapi.NamespaceMode_NODE { + hostConfig.PidMode = namespaceModeHost + } + modifyHostOptionsForSandbox(nsOpts, network, hostConfig) +} + +// modifyContainerNamespaceOptions apply namespace options for container +func modifyContainerNamespaceOptions(nsOpts *runtimeapi.NamespaceOption, podSandboxID string, hostConfig *dockercontainer.HostConfig) { + switch nsOpts.GetPid() { + case runtimeapi.NamespaceMode_NODE: + hostConfig.PidMode = namespaceModeHost + case runtimeapi.NamespaceMode_POD: + hostConfig.PidMode = dockercontainer.PidMode(fmt.Sprintf("container:%v", podSandboxID)) + case runtimeapi.NamespaceMode_TARGET: + hostConfig.PidMode = dockercontainer.PidMode(fmt.Sprintf("container:%v", nsOpts.GetTargetId())) + } + modifyHostOptionsForContainer(nsOpts, podSandboxID, hostConfig) +} + +// modifyHostOptionsForSandbox applies NetworkMode/UTSMode to sandbox's dockercontainer.HostConfig. +func modifyHostOptionsForSandbox(nsOpts *runtimeapi.NamespaceOption, network *knetwork.PluginManager, hc *dockercontainer.HostConfig) { + if nsOpts.GetIpc() == runtimeapi.NamespaceMode_NODE { + hc.IpcMode = namespaceModeHost + } + if nsOpts.GetNetwork() == runtimeapi.NamespaceMode_NODE { + hc.NetworkMode = namespaceModeHost + return + } + + if network == nil { + hc.NetworkMode = "default" + return + } + + switch network.PluginName() { + case "cni": + fallthrough + case "kubenet": + hc.NetworkMode = "none" + default: + hc.NetworkMode = "default" + } +} + +// modifyHostOptionsForContainer applies NetworkMode/UTSMode to container's dockercontainer.HostConfig. +func modifyHostOptionsForContainer(nsOpts *runtimeapi.NamespaceOption, podSandboxID string, hc *dockercontainer.HostConfig) { + sandboxNSMode := fmt.Sprintf("container:%v", podSandboxID) + hc.NetworkMode = dockercontainer.NetworkMode(sandboxNSMode) + hc.IpcMode = dockercontainer.IpcMode(sandboxNSMode) + hc.UTSMode = "" + + if nsOpts.GetNetwork() == runtimeapi.NamespaceMode_NODE { + hc.UTSMode = namespaceModeHost + } +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/selinux_util.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/selinux_util.go new file mode 100644 index 000000000000..4d299a7f9347 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/dockershim/selinux_util.go @@ -0,0 +1,89 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dockershim + +import ( + "fmt" + + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" +) + +// selinuxLabelUser returns the fragment of a Docker security opt that +// describes the SELinux user. Note that strictly speaking this is not +// actually the name of the security opt, but a fragment of the whole key- +// value pair necessary to set the opt. +func selinuxLabelUser(separator rune) string { + return fmt.Sprintf("label%cuser", separator) +} + +// selinuxLabelRole returns the fragment of a Docker security opt that +// describes the SELinux role. Note that strictly speaking this is not +// actually the name of the security opt, but a fragment of the whole key- +// value pair necessary to set the opt. +func selinuxLabelRole(separator rune) string { + return fmt.Sprintf("label%crole", separator) +} + +// selinuxLabelType returns the fragment of a Docker security opt that +// describes the SELinux type. Note that strictly speaking this is not +// actually the name of the security opt, but a fragment of the whole key- +// value pair necessary to set the opt. +func selinuxLabelType(separator rune) string { + return fmt.Sprintf("label%ctype", separator) +} + +// selinuxLabelLevel returns the fragment of a Docker security opt that +// describes the SELinux level. Note that strictly speaking this is not +// actually the name of the security opt, but a fragment of the whole key- +// value pair necessary to set the opt. +func selinuxLabelLevel(separator rune) string { + return fmt.Sprintf("label%clevel", separator) +} + +// addSELinuxOptions adds SELinux options to config using the given +// separator. +func addSELinuxOptions(config []string, selinuxOpts *runtimeapi.SELinuxOption, separator rune) []string { + // Note, strictly speaking, we are actually mutating the values of these + // keys, rather than formatting name and value into a string. Docker re- + // uses the same option name multiple times (it's just 'label') with + // different values which are themselves key-value pairs. For example, + // the SELinux type is represented by the security opt: + // + // labeltype: + // + // In Docker API versions before 1.23, the separator was the `:` rune; in + // API version 1.23 it changed to the `=` rune. + config = modifySecurityOption(config, selinuxLabelUser(separator), selinuxOpts.User) + config = modifySecurityOption(config, selinuxLabelRole(separator), selinuxOpts.Role) + config = modifySecurityOption(config, selinuxLabelType(separator), selinuxOpts.Type) + config = modifySecurityOption(config, selinuxLabelLevel(separator), selinuxOpts.Level) + + return config +} + +// modifySecurityOption adds the security option of name to the config array +// with value in the form of name:value. +func modifySecurityOption(config []string, name, value string) []string { + if len(value) > 0 { + config = append(config, fmt.Sprintf("%s:%s", name, value)) + } + + return config +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/eviction_manager.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/eviction_manager.go index f905ae079833..a943e0a1ab59 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/eviction_manager.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/eviction_manager.go @@ -63,7 +63,7 @@ type managerImpl struct { config Config // the function to invoke to kill a pod killPodFunc KillPodFunc - // the function to get the mirror pod by a given static pod + // the function to get the mirror pod by a given statid pod mirrorPodFunc MirrorPodFunc // the interface that knows how to do image gc imageGC ImageGC diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/helpers.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/helpers.go index 332111171d27..23fe1b3cf442 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/helpers.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/helpers.go @@ -766,22 +766,20 @@ func thresholdsMet(thresholds []evictionapi.Threshold, observations signalObserv } func debugLogObservations(logPrefix string, observations signalObservations) { - klogV := klog.V(3) - if !klogV.Enabled() { + if !klog.V(3).Enabled() { return } for k, v := range observations { if !v.time.IsZero() { - klogV.InfoS("Eviction manager:", "log", logPrefix, "signal", k, "resourceName", v.available, "capacity", v.capacity, "time", v.time) + klog.InfoS("Eviction manager:", "log", logPrefix, "signal", k, "resourceName", v.available, "capacity", v.capacity, "time", v.time) } else { - klogV.InfoS("Eviction manager:", "log", logPrefix, "signal", k, "resourceName", v.available, "capacity", v.capacity) + klog.InfoS("Eviction manager:", "log", logPrefix, "signal", k, "resourceName", v.available, "capacity", v.capacity) } } } func debugLogThresholdsWithObservation(logPrefix string, thresholds []evictionapi.Threshold, observations signalObservations) { - klogV := klog.V(3) - if !klogV.Enabled() { + if !klog.V(3).Enabled() { return } for i := range thresholds { @@ -789,9 +787,9 @@ func debugLogThresholdsWithObservation(logPrefix string, thresholds []evictionap observed, found := observations[threshold.Signal] if found { quantity := evictionapi.GetThresholdQuantity(threshold.Value, observed.capacity) - klogV.InfoS("Eviction manager: threshold observed resource", "log", logPrefix, "signal", threshold.Signal, "quantity", quantity, "resource", observed.available) + klog.InfoS("Eviction manager: threshold observed resource", "log", logPrefix, "signal", threshold.Signal, "quantity", quantity, "resource", observed.available) } else { - klogV.InfoS("Eviction manager: threshold had no observation", "log", logPrefix, "signal", threshold.Signal) + klog.InfoS("Eviction manager: threshold had no observation", "log", logPrefix, "signal", threshold.Signal) } } } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/threshold_notifier_linux.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/threshold_notifier_linux.go index c2387fc33fe0..9ab907a9cd2b 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/threshold_notifier_linux.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/eviction/threshold_notifier_linux.go @@ -116,7 +116,6 @@ func (n *linuxCgroupNotifier) Start(eventCh chan<- struct{}) { klog.InfoS("Eviction manager: error adding epoll eventfd", "err", err) return } - buf := make([]byte, eventSize) for { select { case <-n.stop: @@ -132,6 +131,7 @@ func (n *linuxCgroupNotifier) Start(eventCh chan<- struct{}) { continue } // Consume the event from the eventfd + buf := make([]byte, eventSize) _, err = unix.Read(n.eventfd, buf) if err != nil { klog.InfoS("Eviction manager: error reading memcg events", "err", err) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet.go index 01e9c49c6f1c..2013c871a608 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet.go @@ -32,7 +32,6 @@ import ( "sync/atomic" "time" - "github.com/opencontainers/selinux/go-selinux" "k8s.io/client-go/informers" cadvisorapi "github.com/google/cadvisor/info/v1" @@ -74,10 +73,13 @@ import ( "k8s.io/kubernetes/pkg/kubelet/configmap" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/cri/remote" + "k8s.io/kubernetes/pkg/kubelet/cri/streaming" "k8s.io/kubernetes/pkg/kubelet/events" "k8s.io/kubernetes/pkg/kubelet/eviction" "k8s.io/kubernetes/pkg/kubelet/images" + "k8s.io/kubernetes/pkg/kubelet/kubeletconfig" "k8s.io/kubernetes/pkg/kubelet/kuberuntime" + "k8s.io/kubernetes/pkg/kubelet/legacy" "k8s.io/kubernetes/pkg/kubelet/lifecycle" "k8s.io/kubernetes/pkg/kubelet/logs" "k8s.io/kubernetes/pkg/kubelet/metrics" @@ -110,6 +112,7 @@ import ( "k8s.io/kubernetes/pkg/security/apparmor" sysctlallowlist "k8s.io/kubernetes/pkg/security/podsecuritypolicy/sysctl" "k8s.io/kubernetes/pkg/util/oom" + "k8s.io/kubernetes/pkg/util/selinux" "k8s.io/kubernetes/pkg/volume" "k8s.io/kubernetes/pkg/volume/csi" "k8s.io/kubernetes/pkg/volume/util/hostutil" @@ -219,31 +222,42 @@ type Dependencies struct { Options []Option // Injected Dependencies - Auth server.AuthInterface - CAdvisorInterface cadvisor.Interface - Cloud cloudprovider.Interface - ContainerManager cm.ContainerManager - EventClient v1core.EventsGetter - HeartbeatClient clientset.Interface - OnHeartbeatFailure func() - KubeClient clientset.Interface - Mounter mount.Interface - HostUtil hostutil.HostUtils - OOMAdjuster *oom.OOMAdjuster - OSInterface kubecontainer.OSInterface - PodConfig *config.PodConfig - ProbeManager prober.Manager - Recorder record.EventRecorder - Subpather subpath.Interface - VolumePlugins []volume.VolumePlugin - DynamicPluginProber volume.DynamicPluginProber - TLSOptions *server.TLSOptions - RemoteRuntimeService internalapi.RuntimeService - RemoteImageService internalapi.ImageManagerService + Auth server.AuthInterface + CAdvisorInterface cadvisor.Interface + Cloud cloudprovider.Interface + ContainerManager cm.ContainerManager + DockerOptions *DockerOptions + EventClient v1core.EventsGetter + HeartbeatClient clientset.Interface + OnHeartbeatFailure func() + KubeClient clientset.Interface + Mounter mount.Interface + HostUtil hostutil.HostUtils + OOMAdjuster *oom.OOMAdjuster + OSInterface kubecontainer.OSInterface + PodConfig *config.PodConfig + Recorder record.EventRecorder + Subpather subpath.Interface + VolumePlugins []volume.VolumePlugin + DynamicPluginProber volume.DynamicPluginProber + TLSOptions *server.TLSOptions + KubeletConfigController *kubeletconfig.Controller + RemoteRuntimeService internalapi.RuntimeService + RemoteImageService internalapi.ImageManagerService + dockerLegacyService legacy.DockerLegacyService // remove it after cadvisor.UsingLegacyCadvisorStats dropped. useLegacyCadvisorStats bool } +// DockerOptions contains docker specific configuration. Importantly, since it +// lives outside of `dockershim`, it should not depend on the `docker/docker` +// client library. +type DockerOptions struct { + DockerEndpoint string + RuntimeRequestTimeout time.Duration + ImagePullProgressDeadline time.Duration +} + // makePodSourceConfig creates a config.PodConfig from the given // KubeletConfiguration or returns an error. func makePodSourceConfig(kubeCfg *kubeletconfiginternal.KubeletConfiguration, kubeDeps *Dependencies, nodeName types.NodeName, nodeHasSynced func() bool) (*config.PodConfig, error) { @@ -259,24 +273,21 @@ func makePodSourceConfig(kubeCfg *kubeletconfiginternal.KubeletConfiguration, ku // source of all configuration cfg := config.NewPodConfig(config.PodConfigNotificationIncremental, kubeDeps.Recorder) - // TODO: it needs to be replaced by a proper context in the future - ctx := context.TODO() - // define file config source if kubeCfg.StaticPodPath != "" { klog.InfoS("Adding static pod path", "path", kubeCfg.StaticPodPath) - config.NewSourceFile(kubeCfg.StaticPodPath, nodeName, kubeCfg.FileCheckFrequency.Duration, cfg.Channel(ctx, kubetypes.FileSource)) + config.NewSourceFile(kubeCfg.StaticPodPath, nodeName, kubeCfg.FileCheckFrequency.Duration, cfg.Channel(kubetypes.FileSource)) } // define url config source if kubeCfg.StaticPodURL != "" { klog.InfoS("Adding pod URL with HTTP header", "URL", kubeCfg.StaticPodURL, "header", manifestURLHeader) - config.NewSourceURL(kubeCfg.StaticPodURL, manifestURLHeader, nodeName, kubeCfg.HTTPCheckFrequency.Duration, cfg.Channel(ctx, kubetypes.HTTPSource)) + config.NewSourceURL(kubeCfg.StaticPodURL, manifestURLHeader, nodeName, kubeCfg.HTTPCheckFrequency.Duration, cfg.Channel(kubetypes.HTTPSource)) } if kubeDeps.KubeClient != nil { klog.InfoS("Adding apiserver pod source") - config.NewSourceApiserver(kubeDeps.KubeClient, nodeName, nodeHasSynced, cfg.Channel(ctx, kubetypes.ApiserverSource)) + config.NewSourceApiserver(kubeDeps.KubeClient, nodeName, nodeHasSynced, cfg.Channel(kubetypes.ApiserverSource)) } return cfg, nil } @@ -284,11 +295,38 @@ func makePodSourceConfig(kubeCfg *kubeletconfiginternal.KubeletConfiguration, ku // PreInitRuntimeService will init runtime service before RunKubelet. func PreInitRuntimeService(kubeCfg *kubeletconfiginternal.KubeletConfiguration, kubeDeps *Dependencies, + crOptions *config.ContainerRuntimeOptions, + containerRuntime string, + runtimeCgroups string, remoteRuntimeEndpoint string, - remoteImageEndpoint string) error { - // remoteImageEndpoint is same as remoteRuntimeEndpoint if not explicitly specified - if remoteRuntimeEndpoint != "" && remoteImageEndpoint == "" { - remoteImageEndpoint = remoteRuntimeEndpoint + remoteImageEndpoint string, + nonMasqueradeCIDR string) error { + if remoteRuntimeEndpoint != "" { + // remoteImageEndpoint is same as remoteRuntimeEndpoint if not explicitly specified + if remoteImageEndpoint == "" { + remoteImageEndpoint = remoteRuntimeEndpoint + } + } + + switch containerRuntime { + case kubetypes.DockerContainerRuntime: + klog.InfoS("Using dockershim is deprecated, please consider using a full-fledged CRI implementation") + if err := runDockershim( + kubeCfg, + kubeDeps, + crOptions, + runtimeCgroups, + remoteRuntimeEndpoint, + remoteImageEndpoint, + nonMasqueradeCIDR, + ); err != nil { + return err + } + case kubetypes.RemoteContainerRuntime: + // No-op. + break + default: + return fmt.Errorf("unsupported CRI runtime: %q", containerRuntime) } var err error @@ -299,7 +337,7 @@ func PreInitRuntimeService(kubeCfg *kubeletconfiginternal.KubeletConfiguration, return err } - kubeDeps.useLegacyCadvisorStats = cadvisor.UsingLegacyCadvisorStats(remoteRuntimeEndpoint) + kubeDeps.useLegacyCadvisorStats = cadvisor.UsingLegacyCadvisorStats(containerRuntime, remoteRuntimeEndpoint) return nil } @@ -309,6 +347,7 @@ func PreInitRuntimeService(kubeCfg *kubeletconfiginternal.KubeletConfiguration, func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, kubeDeps *Dependencies, crOptions *config.ContainerRuntimeOptions, + containerRuntime string, hostname string, hostnameOverridden bool, nodeName types.NodeName, @@ -324,6 +363,7 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, allowedUnsafeSysctls []string, experimentalMounterPath string, kernelMemcgNotification bool, + experimentalCheckNodeCapabilitiesBeforeMount bool, experimentalNodeAllocatableIgnoreEvictionThreshold bool, minimumGCAge metav1.Duration, maxPerPodContainerCount int32, @@ -513,6 +553,7 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, syncLoopMonitor: atomic.Value{}, daemonEndpoints: daemonEndpoints, containerManager: kubeDeps.ContainerManager, + containerRuntimeName: containerRuntime, nodeIPs: nodeIPs, nodeIPValidator: validateNodeIP, clock: clock.RealClock{}, @@ -579,23 +620,28 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, klet.resourceAnalyzer = serverstats.NewResourceAnalyzer(klet, kubeCfg.VolumeStatsAggPeriod.Duration, kubeDeps.Recorder) + klet.dockerLegacyService = kubeDeps.dockerLegacyService klet.runtimeService = kubeDeps.RemoteRuntimeService if kubeDeps.KubeClient != nil { klet.runtimeClassManager = runtimeclass.NewManager(kubeDeps.KubeClient) } - // setup containerLogManager for CRI container runtime - containerLogManager, err := logs.NewContainerLogManager( - klet.runtimeService, - kubeDeps.OSInterface, - kubeCfg.ContainerLogMaxSize, - int(kubeCfg.ContainerLogMaxFiles), - ) - if err != nil { - return nil, fmt.Errorf("failed to initialize container log manager: %v", err) + if containerRuntime == kubetypes.RemoteContainerRuntime { + // setup containerLogManager for CRI container runtime + containerLogManager, err := logs.NewContainerLogManager( + klet.runtimeService, + kubeDeps.OSInterface, + kubeCfg.ContainerLogMaxSize, + int(kubeCfg.ContainerLogMaxFiles), + ) + if err != nil { + return nil, fmt.Errorf("failed to initialize container log manager: %v", err) + } + klet.containerLogManager = containerLogManager + } else { + klet.containerLogManager = logs.NewStubContainerLogManager() } - klet.containerLogManager = containerLogManager klet.reasonCache = NewReasonCache() klet.workQueue = queue.NewBasicWorkQueue(klet.clock) @@ -633,6 +679,7 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, kubeDeps.RemoteRuntimeService, kubeDeps.RemoteImageService, kubeDeps.ContainerManager.InternalContainerLifecycle(), + kubeDeps.dockerLegacyService, klet.containerLogManager, klet.runtimeClassManager, seccompDefault, @@ -654,8 +701,8 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, klet.runtimeCache = runtimeCache // common provider to get host file system usage associated with a pod managed by kubelet - hostStatsProvider := stats.NewHostStatsProvider(kubecontainer.RealOS{}, func(podUID types.UID) string { - return getEtcHostsPath(klet.getPodDir(podUID)) + hostStatsProvider := stats.NewHostStatsProvider(kubecontainer.RealOS{}, func(podUID types.UID) (string, bool) { + return getEtcHostsPath(klet.getPodDir(podUID)), klet.containerRuntime.SupportsSingleFileMapping() }) if kubeDeps.useLegacyCadvisorStats { klet.StatsProvider = stats.NewCadvisorStatsProvider( @@ -715,17 +762,13 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, } } - if kubeDeps.ProbeManager != nil { - klet.probeManager = kubeDeps.ProbeManager - } else { - klet.probeManager = prober.NewManager( - klet.statusManager, - klet.livenessManager, - klet.readinessManager, - klet.startupManager, - klet.runner, - kubeDeps.Recorder) - } + klet.probeManager = prober.NewManager( + klet.statusManager, + klet.livenessManager, + klet.readinessManager, + klet.startupManager, + klet.runner, + kubeDeps.Recorder) tokenManager := token.NewManager(kubeDeps.KubeClient) @@ -745,7 +788,8 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, // If the experimentalMounterPathFlag is set, we do not want to // check node capabilities since the mount path is not the default if len(experimentalMounterPath) != 0 { - // Replace the nameserver in containerized-mounter's rootfs/etc/resolv.conf with kubelet.ClusterDNS + experimentalCheckNodeCapabilitiesBeforeMount = false + // Replace the nameserver in containerized-mounter's rootfs/etc/resolve.conf with kubelet.ClusterDNS // so that service name could be resolved klet.dnsConfigurer.SetupDNSinContainerizedMounter(experimentalMounterPath) } @@ -763,6 +807,7 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, kubeDeps.HostUtil, klet.getPodsDir(), kubeDeps.Recorder, + experimentalCheckNodeCapabilitiesBeforeMount, keepTerminatedPodVolumes, volumepathhandler.NewBlockVolumePathHandler()) @@ -802,9 +847,11 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, if sysruntime.GOOS == "linux" { // AppArmor is a Linux kernel security module and it does not support other operating systems. - klet.appArmorValidator = apparmor.NewValidator() + klet.appArmorValidator = apparmor.NewValidator(containerRuntime) klet.softAdmitHandlers.AddPodAdmitHandler(lifecycle.NewAppArmorAdmitHandler(klet.appArmorValidator)) } + klet.softAdmitHandlers.AddPodAdmitHandler(lifecycle.NewNoNewPrivsAdmitHandler(klet.containerRuntime)) + klet.softAdmitHandlers.AddPodAdmitHandler(lifecycle.NewProcMountAdmitHandler(klet.containerRuntime)) leaseDuration := time.Duration(kubeCfg.NodeLeaseDurationSeconds) * time.Second renewInterval := time.Duration(float64(leaseDuration) * nodeLeaseRenewIntervalFraction) @@ -829,7 +876,6 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration, ShutdownGracePeriodRequested: kubeCfg.ShutdownGracePeriod.Duration, ShutdownGracePeriodCriticalPods: kubeCfg.ShutdownGracePeriodCriticalPods.Duration, ShutdownGracePeriodByPodPriority: kubeCfg.ShutdownGracePeriodByPodPriority, - StateDirectory: rootDirectory, }) klet.shutdownManager = shutdownManager klet.admitHandlers.AddPodAdmitHandler(shutdownAdmitHandler) @@ -983,6 +1029,9 @@ type Kubelet struct { // Reference to this node. nodeRef *v1.ObjectReference + // The name of the container runtime + containerRuntimeName string + // Container runtime. containerRuntime kubecontainer.Runtime @@ -1151,6 +1200,10 @@ type Kubelet struct { // experimental behavior is desired. experimentalHostUserNamespaceDefaulting bool + // dockerLegacyService contains some legacy methods for backward compatibility. + // It should be set only when docker is using non json-file logging driver. + dockerLegacyService legacy.DockerLegacyService + // StatsProvider provides the node and the container stats. StatsProvider *stats.Provider @@ -1249,7 +1302,7 @@ func (kl *Kubelet) setupDataDirs() error { if err := os.MkdirAll(kl.getPodResourcesDir(), 0750); err != nil { return fmt.Errorf("error creating podresources directory: %v", err) } - if selinux.GetEnabled() { + if selinux.SELinuxEnabled() { err := selinux.SetFileLabel(pluginRegistrationDir, config.KubeletPluginsDirSELinuxLabel) if err != nil { klog.InfoS("Unprivileged containerized plugins might not work, could not set selinux context on plugin registration dir", "path", pluginRegistrationDir, "err", err) @@ -1453,26 +1506,15 @@ func (kl *Kubelet) Run(updates <-chan kubetypes.PodUpdate) { } // syncPod is the transaction script for the sync of a single pod (setting up) -// a pod. This method is reentrant and expected to converge a pod towards the -// desired state of the spec. The reverse (teardown) is handled in -// syncTerminatingPod and syncTerminatedPod. If syncPod exits without error, -// then the pod runtime state is in sync with the desired configuration state -// (pod is running). If syncPod exits with a transient error, the next -// invocation of syncPod is expected to make progress towards reaching the -// runtime state. syncPod exits with isTerminal when the pod was detected to -// have reached a terminal lifecycle phase due to container exits (for -// RestartNever or RestartOnFailure) and the next method invoked will by -// syncTerminatingPod. +// a pod. The reverse (teardown) is handled in syncTerminatingPod and +// syncTerminatedPod. If syncPod exits without error, then the pod runtime +// state is in sync with the desired configuration state (pod is running). +// If syncPod exits with a transient error, the next invocation of syncPod +// is expected to make progress towards reaching the runtime state. // // Arguments: // -// updateType - whether this is a create (first time) or an update, should -// only be used for metrics since this method must be reentrant -// pod - the pod that is being set up -// mirrorPod - the mirror pod known to the kubelet for this pod, if any -// podStatus - the most recent pod status observed for this pod which can -// be used to determine the set of actions that should be taken during -// this loop of syncPod +// o - the SyncPodOptions for this invocation // // The workflow is: // * If the pod is being created, record pod worker start latency @@ -1480,9 +1522,7 @@ func (kl *Kubelet) Run(updates <-chan kubetypes.PodUpdate) { // * If the pod is being seen as running for the first time, record pod // start latency // * Update the status of the pod in the status manager -// * Stop the pod's containers if it should not be running due to soft -// admission -// * Ensure any background tracking for a runnable pod is started +// * Kill the pod if it should not be running due to soft admission // * Create a mirror pod if the pod is a static pod, and does not // already have a mirror pod // * Create the data directories for the pod if they do not exist @@ -1496,15 +1536,13 @@ func (kl *Kubelet) Run(updates <-chan kubetypes.PodUpdate) { // // This operation writes all events that are dispatched in order to provide // the most accurate information possible about an error situation to aid debugging. -// Callers should not write an event if this operation returns an error. -func (kl *Kubelet) syncPod(ctx context.Context, updateType kubetypes.SyncPodType, pod, mirrorPod *v1.Pod, podStatus *kubecontainer.PodStatus) (isTerminal bool, err error) { +// Callers should not throw an event if this operation returns an error. +func (kl *Kubelet) syncPod(ctx context.Context, updateType kubetypes.SyncPodType, pod, mirrorPod *v1.Pod, podStatus *kubecontainer.PodStatus) error { klog.V(4).InfoS("syncPod enter", "pod", klog.KObj(pod), "podUID", pod.UID) - defer func() { - klog.V(4).InfoS("syncPod exit", "pod", klog.KObj(pod), "podUID", pod.UID, "isTerminal", isTerminal) - }() + defer klog.V(4).InfoS("syncPod exit", "pod", klog.KObj(pod), "podUID", pod.UID) // Latency measurements for the main workflow are relative to the - // first time the pod was seen by kubelet. + // first time the pod was seen by the API server. var firstSeenTime time.Time if firstSeenTimeStr, ok := pod.Annotations[kubetypes.ConfigFirstSeenAnnotationKey]; ok { firstSeenTime = kubetypes.ConvertToTimestamp(firstSeenTimeStr).Get() @@ -1533,17 +1571,11 @@ func (kl *Kubelet) syncPod(ctx context.Context, updateType kubetypes.SyncPodType for _, ipInfo := range apiPodStatus.PodIPs { podStatus.IPs = append(podStatus.IPs, ipInfo.IP) } + if len(podStatus.IPs) == 0 && len(apiPodStatus.PodIP) > 0 { podStatus.IPs = []string{apiPodStatus.PodIP} } - // If the pod is terminal, we don't need to continue to setup the pod - if apiPodStatus.Phase == v1.PodSucceeded || apiPodStatus.Phase == v1.PodFailed { - kl.statusManager.SetPodStatus(pod, apiPodStatus) - isTerminal = true - return isTerminal, nil - } - // If the pod should not be running, we request the pod's containers be stopped. This is not the same // as termination (we want to stop the pod, but potentially restart it later if soft admission allows // it later). Set the status and phase appropriately @@ -1569,8 +1601,7 @@ func (kl *Kubelet) syncPod(ctx context.Context, updateType kubetypes.SyncPodType } } - // Record the time it takes for the pod to become running - // since kubelet first saw the pod if firstSeenTime is set. + // Record the time it takes for the pod to become running. existingStatus, ok := kl.statusManager.GetPodStatus(pod.UID) if !ok || existingStatus.Phase == v1.PodPending && apiPodStatus.Phase == v1.PodRunning && !firstSeenTime.IsZero() { @@ -1593,23 +1624,13 @@ func (kl *Kubelet) syncPod(ctx context.Context, updateType kubetypes.SyncPodType // Return an error to signal that the sync loop should back off. syncErr = fmt.Errorf("pod cannot be run: %s", runnable.Message) } - return false, syncErr + return syncErr } // If the network plugin is not ready, only start the pod if it uses the host network if err := kl.runtimeState.networkErrors(); err != nil && !kubecontainer.IsHostNetworkPod(pod) { kl.recorder.Eventf(pod, v1.EventTypeWarning, events.NetworkNotReady, "%s: %v", NetworkNotReadyErrorMsg, err) - return false, fmt.Errorf("%s: %v", NetworkNotReadyErrorMsg, err) - } - - // ensure the kubelet knows about referenced secrets or configmaps used by the pod - if !kl.podWorkers.IsPodTerminationRequested(pod.UID) { - if kl.secretManager != nil { - kl.secretManager.RegisterPod(pod) - } - if kl.configMapManager != nil { - kl.configMapManager.RegisterPod(pod) - } + return fmt.Errorf("%s: %v", NetworkNotReadyErrorMsg, err) } // Create Cgroups for the pod and apply resource parameters @@ -1656,7 +1677,7 @@ func (kl *Kubelet) syncPod(ctx context.Context, updateType kubetypes.SyncPodType } if err := pcm.EnsureExists(pod); err != nil { kl.recorder.Eventf(pod, v1.EventTypeWarning, events.FailedToCreatePodContainer, "unable to ensure pod container exists: %v", err) - return false, fmt.Errorf("failed to ensure that the pod: %v cgroups exist and are correctly applied: %v", pod.UID, err) + return fmt.Errorf("failed to ensure that the pod: %v cgroups exist and are correctly applied: %v", pod.UID, err) } } } @@ -1697,7 +1718,7 @@ func (kl *Kubelet) syncPod(ctx context.Context, updateType kubetypes.SyncPodType if err := kl.makePodDataDirs(pod); err != nil { kl.recorder.Eventf(pod, v1.EventTypeWarning, events.FailedToMakePodDataDirectories, "error making pod data directories: %v", err) klog.ErrorS(err, "Unable to make pod data directories for pod", "pod", klog.KObj(pod)) - return false, err + return err } // Volume manager will not mount volumes for terminating pods @@ -1707,7 +1728,7 @@ func (kl *Kubelet) syncPod(ctx context.Context, updateType kubetypes.SyncPodType if err := kl.volumeManager.WaitForAttachAndMount(pod); err != nil { kl.recorder.Eventf(pod, v1.EventTypeWarning, events.FailedMountVolume, "Unable to attach or mount volumes: %v", err) klog.ErrorS(err, "Unable to attach or mount volumes for pod; skipping pod", "pod", klog.KObj(pod)) - return false, err + return err } } @@ -1722,15 +1743,15 @@ func (kl *Kubelet) syncPod(ctx context.Context, updateType kubetypes.SyncPodType for _, r := range result.SyncResults { if r.Error != kubecontainer.ErrCrashLoopBackOff && r.Error != images.ErrImagePullBackOff { // Do not record an event here, as we keep all event logging for sync pod failures - // local to container runtime, so we get better errors. - return false, err + // local to container runtime so we get better errors + return err } } - return false, nil + return nil } - return false, nil + return nil } // syncTerminatingPod is expected to terminate all running containers in a pod. Once this method @@ -1790,26 +1811,16 @@ func (kl *Kubelet) syncTerminatingPod(ctx context.Context, pod *v1.Pod, podStatu return err } var runningContainers []string - type container struct { - Name string - State string - ExitCode int - FinishedAt string - } - var containers []container - klogV := klog.V(4) - klogVEnabled := klogV.Enabled() + var containers []string for _, s := range podStatus.ContainerStatuses { if s.State == kubecontainer.ContainerStateRunning { runningContainers = append(runningContainers, s.ID.String()) } - if klogVEnabled { - containers = append(containers, container{Name: s.Name, State: string(s.State), ExitCode: s.ExitCode, FinishedAt: s.FinishedAt.UTC().Format(time.RFC3339Nano)}) - } + containers = append(containers, fmt.Sprintf("(%s state=%s exitCode=%d finishedAt=%s)", s.Name, s.State, s.ExitCode, s.FinishedAt.UTC().Format(time.RFC3339Nano))) } - if klogVEnabled { - sort.Slice(containers, func(i, j int) bool { return containers[i].Name < containers[j].Name }) - klog.V(4).InfoS("Post-termination container state", "pod", klog.KObj(pod), "podUID", pod.UID, "containers", containers) + if klog.V(4).Enabled() { + sort.Strings(containers) + klog.InfoS("Post-termination container state", "pod", klog.KObj(pod), "podUID", pod.UID, "containers", strings.Join(containers, " ")) } if len(runningContainers) > 0 { return fmt.Errorf("detected running containers after a successful KillPod, CRI violation: %v", runningContainers) @@ -1841,14 +1852,6 @@ func (kl *Kubelet) syncTerminatedPod(ctx context.Context, pod *v1.Pod, podStatus } klog.V(4).InfoS("Pod termination unmounted volumes", "pod", klog.KObj(pod), "podUID", pod.UID) - // After volume unmount is complete, let the secret and configmap managers know we're done with this pod - if kl.secretManager != nil { - kl.secretManager.UnregisterPod(pod) - } - if kl.configMapManager != nil { - kl.configMapManager.UnregisterPod(pod) - } - // Note: we leave pod containers to be reclaimed in the background since dockershim requires the // container for retrieving logs and we want to make sure logs are available until the pod is // physically deleted. @@ -2437,3 +2440,15 @@ func isSyncPodWorthy(event *pleg.PodLifecycleEvent) bool { // ContainerRemoved doesn't affect pod state return event.Type != pleg.ContainerRemoved } + +// Gets the streaming server configuration to use with in-process CRI shims. +func getStreamingConfig(kubeCfg *kubeletconfiginternal.KubeletConfiguration, kubeDeps *Dependencies, crOptions *config.ContainerRuntimeOptions) *streaming.Config { + config := &streaming.Config{ + StreamIdleTimeout: kubeCfg.StreamingConnectionIdleTimeout.Duration, + StreamCreationTimeout: streaming.DefaultConfig.StreamCreationTimeout, + SupportedRemoteCommandProtocols: streaming.DefaultConfig.SupportedRemoteCommandProtocols, + SupportedPortForwardProtocols: streaming.DefaultConfig.SupportedPortForwardProtocols, + } + config.Addr = net.JoinHostPort("localhost", "0") + return config +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_dockershim.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_dockershim.go new file mode 100644 index 000000000000..edc486949e84 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_dockershim.go @@ -0,0 +1,80 @@ +//go:build !dockerless +// +build !dockerless + +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "k8s.io/klog/v2" + + kubeletconfiginternal "k8s.io/kubernetes/pkg/kubelet/apis/config" + "k8s.io/kubernetes/pkg/kubelet/config" + "k8s.io/kubernetes/pkg/kubelet/dockershim" + dockerremote "k8s.io/kubernetes/pkg/kubelet/dockershim/remote" +) + +func runDockershim(kubeCfg *kubeletconfiginternal.KubeletConfiguration, + kubeDeps *Dependencies, + crOptions *config.ContainerRuntimeOptions, + runtimeCgroups string, + remoteRuntimeEndpoint string, + remoteImageEndpoint string, + nonMasqueradeCIDR string) error { + pluginSettings := dockershim.NetworkPluginSettings{ + HairpinMode: kubeletconfiginternal.HairpinMode(kubeCfg.HairpinMode), + NonMasqueradeCIDR: nonMasqueradeCIDR, + PluginName: crOptions.NetworkPluginName, + PluginConfDir: crOptions.CNIConfDir, + PluginBinDirString: crOptions.CNIBinDir, + PluginCacheDir: crOptions.CNICacheDir, + MTU: int(crOptions.NetworkPluginMTU), + } + + // Create and start the CRI shim running as a grpc server. + streamingConfig := getStreamingConfig(kubeCfg, kubeDeps, crOptions) + dockerClientConfig := &dockershim.ClientConfig{ + DockerEndpoint: kubeDeps.DockerOptions.DockerEndpoint, + RuntimeRequestTimeout: kubeDeps.DockerOptions.RuntimeRequestTimeout, + ImagePullProgressDeadline: kubeDeps.DockerOptions.ImagePullProgressDeadline, + } + ds, err := dockershim.NewDockerService(dockerClientConfig, crOptions.PodSandboxImage, streamingConfig, + &pluginSettings, runtimeCgroups, kubeCfg.CgroupDriver, crOptions.DockershimRootDirectory) + if err != nil { + return err + } + + // The unix socket for kubelet <-> dockershim communication, dockershim start before runtime service init. + klog.V(5).InfoS("Using remote runtime endpoint and image endpoint", "runtimeEndpoint", remoteRuntimeEndpoint, "imageEndpoint", remoteImageEndpoint) + klog.V(2).InfoS("Starting the GRPC server for the docker CRI shim.") + + dockerServer := dockerremote.NewDockerServer(remoteRuntimeEndpoint, ds) + if err := dockerServer.Start(); err != nil { + return err + } + + // Create dockerLegacyService when the logging driver is not supported. + supported, err := ds.IsCRISupportedLogDriver() + if err != nil { + return err + } + if !supported { + kubeDeps.dockerLegacyService = ds + } + + return nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_dockershim_nodocker.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_dockershim_nodocker.go new file mode 100644 index 000000000000..85dbc4497915 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_dockershim_nodocker.go @@ -0,0 +1,37 @@ +//go:build dockerless +// +build dockerless + +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubelet + +import ( + "fmt" + kubeletconfiginternal "k8s.io/kubernetes/pkg/kubelet/apis/config" + "k8s.io/kubernetes/pkg/kubelet/config" +) + +func runDockershim(kubeCfg *kubeletconfiginternal.KubeletConfiguration, + kubeDeps *Dependencies, + crOptions *config.ContainerRuntimeOptions, + runtimeCgroups string, + remoteRuntimeEndpoint string, + remoteImageEndpoint string, + nonMasqueradeCIDR string) error { + + return fmt.Errorf("trying to use docker runtime when Kubelet was compiled without docker support") +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network.go index bacbc27c7ff9..5b68d10efb49 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network.go @@ -22,6 +22,22 @@ import ( "k8s.io/api/core/v1" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" "k8s.io/klog/v2" + utiliptables "k8s.io/kubernetes/pkg/util/iptables" +) + +const ( + // KubeMarkMasqChain is the mark-for-masquerade chain + // TODO: clean up this logic in kube-proxy + KubeMarkMasqChain utiliptables.Chain = "KUBE-MARK-MASQ" + + // KubeMarkDropChain is the mark-for-drop chain + KubeMarkDropChain utiliptables.Chain = "KUBE-MARK-DROP" + + // KubePostroutingChain is kubernetes postrouting rules + KubePostroutingChain utiliptables.Chain = "KUBE-POSTROUTING" + + // KubeFirewallChain is kubernetes firewall rules + KubeFirewallChain utiliptables.Chain = "KUBE-FIREWALL" ) // providerRequiresNetworkingConfiguration returns whether the cloud provider diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network_linux.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network_linux.go index ae7d9235a557..2aee3fb540cf 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network_linux.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_network_linux.go @@ -30,25 +30,6 @@ import ( utilnet "k8s.io/utils/net" ) -const ( - // KubeIPTablesHintChain is the chain whose existence in either iptables-legacy - // or iptables-nft indicates which version of iptables the system is using - KubeIPTablesHintChain utiliptables.Chain = "KUBE-IPTABLES-HINT" - - // KubeMarkMasqChain is the mark-for-masquerade chain - // TODO: clean up this logic in kube-proxy - KubeMarkMasqChain utiliptables.Chain = "KUBE-MARK-MASQ" - - // KubeMarkDropChain is the mark-for-drop chain - KubeMarkDropChain utiliptables.Chain = "KUBE-MARK-DROP" - - // KubePostroutingChain is kubernetes postrouting rules - KubePostroutingChain utiliptables.Chain = "KUBE-POSTROUTING" - - // KubeFirewallChain is kubernetes firewall rules - KubeFirewallChain utiliptables.Chain = "KUBE-FIREWALL" -) - func (kl *Kubelet) initNetworkUtil() { exec := utilexec.New() // TODO: @khenidak review when there is no IPv6 iptables exec what should happen here (note: no error returned from this func) @@ -188,13 +169,6 @@ func (kl *Kubelet) syncNetworkUtil(iptClient utiliptables.Interface) bool { return false } - // Create hint chain so other components can see whether we are using iptables-legacy - // or iptables-nft. - if _, err := iptClient.EnsureChain(utiliptables.TableMangle, KubeIPTablesHintChain); err != nil { - klog.ErrorS(err, "Failed to ensure that iptables hint chain exists") - return false - } - return true } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods.go index 45a3bb61b46d..ba0ab34b5c7f 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_pods.go @@ -144,11 +144,12 @@ func (kl *Kubelet) makeBlockVolumes(pod *v1.Pod, container *v1.Container, podVol // Kubernetes only mounts on /etc/hosts if: // - container is not an infrastructure (pause) container // - container is not already mounting on /etc/hosts +// - if it is Windows and ContainerD is used. // Kubernetes will not mount /etc/hosts if: // - when the Pod sandbox is being created, its IP is still unknown. Hence, PodIP will not have been set. // - Windows pod contains a hostProcess container -func shouldMountHostsFile(pod *v1.Pod, podIPs []string) bool { - shouldMount := len(podIPs) > 0 +func shouldMountHostsFile(pod *v1.Pod, podIPs []string, supportsSingleFileMapping bool) bool { + shouldMount := len(podIPs) > 0 && supportsSingleFileMapping if runtime.GOOS == "windows" && utilfeature.DefaultFeatureGate.Enabled(features.WindowsHostProcessContainers) { return shouldMount && !kubecontainer.HasWindowsHostProcessContainer(pod) } @@ -156,8 +157,8 @@ func shouldMountHostsFile(pod *v1.Pod, podIPs []string) bool { } // makeMounts determines the mount points for the given container. -func makeMounts(pod *v1.Pod, podDir string, container *v1.Container, hostName, hostDomain string, podIPs []string, podVolumes kubecontainer.VolumeMap, hu hostutil.HostUtils, subpather subpath.Interface, expandEnvs []kubecontainer.EnvVar) ([]kubecontainer.Mount, func(), error) { - mountEtcHostsFile := shouldMountHostsFile(pod, podIPs) +func makeMounts(pod *v1.Pod, podDir string, container *v1.Container, hostName, hostDomain string, podIPs []string, podVolumes kubecontainer.VolumeMap, hu hostutil.HostUtils, subpather subpath.Interface, expandEnvs []kubecontainer.EnvVar, supportsSingleFileMapping bool) ([]kubecontainer.Mount, func(), error) { + mountEtcHostsFile := shouldMountHostsFile(pod, podIPs, supportsSingleFileMapping) klog.V(3).InfoS("Creating hosts mount for container", "pod", klog.KObj(pod), "containerName", container.Name, "podIPs", podIPs, "path", mountEtcHostsFile) mounts := []kubecontainer.Mount{} var cleanupAction func() @@ -175,7 +176,7 @@ func makeMounts(pod *v1.Pod, podDir string, container *v1.Container, hostName, h // If the volume supports SELinux and it has not been // relabeled already and it is not a read-only volume, // relabel it and mark it as labeled - if vol.Mounter.GetAttributes().Managed && vol.Mounter.GetAttributes().SELinuxRelabel && !vol.SELinuxLabeled { + if vol.Mounter.GetAttributes().Managed && vol.Mounter.GetAttributes().SupportsSELinux && !vol.SELinuxLabeled { vol.SELinuxLabeled = true relabelVolume = true } @@ -491,8 +492,10 @@ func (kl *Kubelet) GenerateRunContainerOptions(pod *v1.Pod, container *v1.Contai } opts.Envs = append(opts.Envs, envs...) + // we can only mount individual files (e.g.: /etc/hosts, termination-log files) on Windows only if we're using Containerd. + supportsSingleFileMapping := kl.containerRuntime.SupportsSingleFileMapping() // only podIPs is sent to makeMounts, as podIPs is populated even if dual-stack feature flag is not enabled. - mounts, cleanupAction, err := makeMounts(pod, kl.getPodDir(pod.UID), container, hostname, hostDomainName, podIPs, volumes, kl.hostutil, kl.subpather, opts.Envs) + mounts, cleanupAction, err := makeMounts(pod, kl.getPodDir(pod.UID), container, hostname, hostDomainName, podIPs, volumes, kl.hostutil, kl.subpather, opts.Envs, supportsSingleFileMapping) if err != nil { return nil, cleanupAction, err } @@ -500,7 +503,7 @@ func (kl *Kubelet) GenerateRunContainerOptions(pod *v1.Pod, container *v1.Contai // adding TerminationMessagePath on Windows is only allowed if ContainerD is used. Individual files cannot // be mounted as volumes using Docker for Windows. - if len(container.TerminationMessagePath) != 0 { + if len(container.TerminationMessagePath) != 0 && supportsSingleFileMapping { p := kl.getPodContainerDir(pod.UID, container.Name) if err := os.MkdirAll(p, 0750); err != nil { klog.ErrorS(err, "Error on creating dir", "path", p) @@ -915,12 +918,6 @@ func countRunningContainerStatus(status v1.PodStatus) int { return runningContainers } -// PodCouldHaveRunningContainers returns true if the pod with the given UID could still have running -// containers. This returns false if the pod has not yet been started or the pod is unknown. -func (kl *Kubelet) PodCouldHaveRunningContainers(pod *v1.Pod) bool { - return kl.podWorkers.CouldHaveRunningContainers(pod.UID) -} - // PodResourcesAreReclaimed returns true if all required node-level resources that a pod was consuming have // been reclaimed by the kubelet. Reclaiming resources is a prerequisite to deleting a pod from the API server. func (kl *Kubelet) PodResourcesAreReclaimed(pod *v1.Pod, status v1.PodStatus) bool { @@ -1324,6 +1321,12 @@ func (kl *Kubelet) GetKubeletContainerLogs(ctx context.Context, podFullName, con return err } + if kl.dockerLegacyService != nil { + // dockerLegacyService should only be non-nil when we actually need it, so + // inject it into the runtimeService. + // TODO(random-liu): Remove this hack after deprecating unsupported log driver. + return kl.dockerLegacyService.GetContainerLogs(ctx, pod, containerID, logOptions, stdout, stderr) + } return kl.containerRuntime.GetContainerLogs(ctx, pod, containerID, logOptions, stdout, stderr) } @@ -1430,7 +1433,7 @@ func getPhase(spec *v1.PodSpec, info []v1.ContainerStatus) v1.PodPhase { } // generateAPIPodStatus creates the final API pod status for a pod, given the -// internal pod status. This method should only be called from within sync*Pod methods. +// internal pod status. func (kl *Kubelet) generateAPIPodStatus(pod *v1.Pod, podStatus *kubecontainer.PodStatus) v1.PodStatus { klog.V(3).InfoS("Generating pod status", "pod", klog.KObj(pod)) @@ -1517,16 +1520,10 @@ func (kl *Kubelet) generateAPIPodStatus(pod *v1.Pod, podStatus *kubecontainer.Po klog.V(4).InfoS("Cannot get host IPs", "err", err) } else { s.HostIP = hostIPs[0].String() - // HostNetwork Pods inherit the node IPs as PodIPs. They are immutable once set, - // other than that if the node becomes dual-stack, we add the secondary IP. - if kubecontainer.IsHostNetworkPod(pod) { - // Primary IP is not set - if s.PodIP == "" { - s.PodIP = hostIPs[0].String() - s.PodIPs = []v1.PodIP{{IP: s.PodIP}} - } - // Secondary IP is not set #105320 - if len(hostIPs) == 2 && len(s.PodIPs) == 1 { + if kubecontainer.IsHostNetworkPod(pod) && s.PodIP == "" { + s.PodIP = hostIPs[0].String() + s.PodIPs = []v1.PodIP{{IP: s.PodIP}} + if len(hostIPs) == 2 { s.PodIPs = append(s.PodIPs, v1.PodIP{IP: hostIPs[1].String()}) } } @@ -1641,8 +1638,12 @@ func (kl *Kubelet) convertToAPIContainerStatuses(pod *v1.Pod, podStatus *kubecon case cs.State == kubecontainer.ContainerStateRunning: status.State.Running = &v1.ContainerStateRunning{StartedAt: metav1.NewTime(cs.StartedAt)} case cs.State == kubecontainer.ContainerStateCreated: - // containers that are created but not running are "waiting to be running" - status.State.Waiting = &v1.ContainerStateWaiting{} + // Treat containers in the "created" state as if they are exited. + // The pod workers are supposed start all containers it creates in + // one sync (syncPod) iteration. There should not be any normal + // "created" containers when the pod worker generates the status at + // the beginning of a sync iteration. + fallthrough case cs.State == kubecontainer.ContainerStateExited: status.State.Terminated = &v1.ContainerStateTerminated{ ExitCode: int32(cs.ExitCode), diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_volumes.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_volumes.go index 8439ce8945ca..5e6809bdc45c 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_volumes.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubelet_volumes.go @@ -122,7 +122,7 @@ func (kl *Kubelet) removeOrphanedPodVolumeDirs(uid types.UID) []error { // If there are still volume directories, attempt to rmdir them volumePaths, err := kl.getPodVolumePathListFromDisk(uid) if err != nil { - orphanVolumeErrors = append(orphanVolumeErrors, fmt.Errorf("orphaned pod %q found, but error occurred during reading volume dir from disk: %v", uid, err)) + orphanVolumeErrors = append(orphanVolumeErrors, fmt.Errorf("orphaned pod %q found, but error %v occurred during reading volume dir from disk", uid, err)) return orphanVolumeErrors } if len(volumePaths) > 0 { @@ -138,7 +138,7 @@ func (kl *Kubelet) removeOrphanedPodVolumeDirs(uid types.UID) []error { // If there are any volume-subpaths, attempt to rmdir them subpathVolumePaths, err := kl.getPodVolumeSubpathListFromDisk(uid) if err != nil { - orphanVolumeErrors = append(orphanVolumeErrors, fmt.Errorf("orphaned pod %q found, but error occurred during reading of volume-subpaths dir from disk: %v", uid, err)) + orphanVolumeErrors = append(orphanVolumeErrors, fmt.Errorf("orphaned pod %q found, but error %v occurred during reading of volume-subpaths dir from disk", uid, err)) return orphanVolumeErrors } if len(subpathVolumePaths) > 0 { @@ -155,7 +155,7 @@ func (kl *Kubelet) removeOrphanedPodVolumeDirs(uid types.UID) []error { // Fail if any regular files are encountered. podVolDir := kl.getPodVolumesDir(uid) if err := removeall.RemoveDirsOneFilesystem(kl.mounter, podVolDir); err != nil { - orphanVolumeErrors = append(orphanVolumeErrors, fmt.Errorf("orphaned pod %q found, but error occurred when trying to remove the volumes dir: %v", uid, err)) + orphanVolumeErrors = append(orphanVolumeErrors, fmt.Errorf("orphaned pod %q found, but error %v occurred when trying to remove the volumes dir", uid, err)) } else { klog.InfoS("Cleaned up orphaned pod volumes dir", "podUID", uid, "path", podVolDir) } @@ -212,7 +212,7 @@ func (kl *Kubelet) cleanupOrphanedPodDirs(pods []*v1.Pod, runningPods []*kubecon podSubdirs, err := ioutil.ReadDir(podDir) if err != nil { klog.ErrorS(err, "Could not read directory", "path", podDir) - orphanRemovalErrors = append(orphanRemovalErrors, fmt.Errorf("orphaned pod %q found, but error occurred during reading the pod dir from disk: %v", uid, err)) + orphanRemovalErrors = append(orphanRemovalErrors, fmt.Errorf("orphaned pod %q found, but error %v occurred during reading the pod dir from disk", uid, err)) continue } for _, podSubdir := range podSubdirs { @@ -228,7 +228,7 @@ func (kl *Kubelet) cleanupOrphanedPodDirs(pods []*v1.Pod, runningPods []*kubecon } if err := removeall.RemoveAllOneFilesystem(kl.mounter, podSubdirPath); err != nil { klog.ErrorS(err, "Failed to remove orphaned pod subdir", "podUID", uid, "path", podSubdirPath) - orphanRemovalErrors = append(orphanRemovalErrors, fmt.Errorf("orphaned pod %q found, but error occurred when trying to remove subdir %q: %v", uid, podSubdirPath, err)) + orphanRemovalErrors = append(orphanRemovalErrors, fmt.Errorf("orphaned pod %q found, but error %v occurred when trying to remove subdir %q", uid, err, podSubdirPath)) } } @@ -236,7 +236,7 @@ func (kl *Kubelet) cleanupOrphanedPodDirs(pods []*v1.Pod, runningPods []*kubecon klog.V(3).InfoS("Orphaned pod found, removing", "podUID", uid) if err := syscall.Rmdir(podDir); err != nil { klog.ErrorS(err, "Failed to remove orphaned pod dir", "podUID", uid) - orphanRemovalErrors = append(orphanRemovalErrors, fmt.Errorf("orphaned pod %q found, but error occurred when trying to remove the pod directory: %v", uid, err)) + orphanRemovalErrors = append(orphanRemovalErrors, fmt.Errorf("orphaned pod %q found, but error %v occurred when trying to remove the pod directory", uid, err)) } } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/OWNERS new file mode 100644 index 000000000000..22935e940523 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/OWNERS @@ -0,0 +1,7 @@ +# See the OWNERS docs at https://go.k8s.io/owners + +approvers: +- mtaufen +- dchen1107 +reviewers: +- sig-node-reviewers diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/checkpoint/configmap.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/checkpoint/configmap.go new file mode 100644 index 000000000000..5255582ec919 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/checkpoint/configmap.go @@ -0,0 +1,59 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package checkpoint + +import ( + "fmt" + + apiv1 "k8s.io/api/core/v1" +) + +// configMapPayload implements Payload, backed by a v1/ConfigMap config source object +type configMapPayload struct { + cm *apiv1.ConfigMap +} + +var _ Payload = (*configMapPayload)(nil) + +// NewConfigMapPayload constructs a Payload backed by a ConfigMap, which must have a non-empty UID +func NewConfigMapPayload(cm *apiv1.ConfigMap) (Payload, error) { + if cm == nil { + return nil, fmt.Errorf("ConfigMap must be non-nil") + } else if cm.ObjectMeta.UID == "" { + return nil, fmt.Errorf("ConfigMap must have a non-empty UID") + } else if cm.ObjectMeta.ResourceVersion == "" { + return nil, fmt.Errorf("ConfigMap must have a non-empty ResourceVersion") + } + + return &configMapPayload{cm}, nil +} + +func (p *configMapPayload) UID() string { + return string(p.cm.UID) +} + +func (p *configMapPayload) ResourceVersion() string { + return p.cm.ResourceVersion +} + +func (p *configMapPayload) Files() map[string]string { + return p.cm.Data +} + +func (p *configMapPayload) object() interface{} { + return p.cm +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/checkpoint/download.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/checkpoint/download.go new file mode 100644 index 000000000000..1b2a3c852ada --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/checkpoint/download.go @@ -0,0 +1,262 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package checkpoint + +import ( + "context" + "fmt" + "k8s.io/klog/v2" + "math/rand" + "time" + + apiv1 "k8s.io/api/core/v1" + apiequality "k8s.io/apimachinery/pkg/api/equality" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/serializer" + clientset "k8s.io/client-go/kubernetes" + "k8s.io/client-go/tools/cache" + kubeletconfigv1beta1 "k8s.io/kubelet/config/v1beta1" + kubeletconfiginternal "k8s.io/kubernetes/pkg/kubelet/apis/config" + "k8s.io/kubernetes/pkg/kubelet/apis/config/scheme" + "k8s.io/kubernetes/pkg/kubelet/kubeletconfig/status" + utilcodec "k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/codec" +) + +// Payload represents a local copy of a config source (payload) object +type Payload interface { + // UID returns a globally unique (space and time) identifier for the payload. + // The return value is guaranteed non-empty. + UID() string + + // ResourceVersion returns a resource version for the payload. + // The return value is guaranteed non-empty. + ResourceVersion() string + + // Files returns a map of filenames to file contents. + Files() map[string]string + + // object returns the underlying checkpointed object. + object() interface{} +} + +// RemoteConfigSource represents a remote config source object that can be downloaded as a Checkpoint +type RemoteConfigSource interface { + // KubeletFilename returns the name of the Kubelet config file as it should appear in the keys of Payload.Files() + KubeletFilename() string + + // APIPath returns the API path to the remote resource, e.g. its SelfLink + APIPath() string + + // UID returns the globally unique identifier for the most recently downloaded payload targeted by the source. + UID() string + + // ResourceVersion returns the resource version of the most recently downloaded payload targeted by the source. + ResourceVersion() string + + // Download downloads the remote config source's target object and returns a Payload backed by the object, + // or a sanitized failure reason and error if the download fails. + // Download takes an optional store as an argument. If provided, Download will check this store for the + // target object prior to contacting the API server. + // Download updates the local UID and ResourceVersion tracked by this source, based on the downloaded payload. + Download(client clientset.Interface, store cache.Store) (Payload, string, error) + + // Informer returns an informer that can be used to detect changes to the remote config source + Informer(client clientset.Interface, handler cache.ResourceEventHandlerFuncs) cache.SharedInformer + + // Encode returns a []byte representation of the object behind the RemoteConfigSource + Encode() ([]byte, error) + + // NodeConfigSource returns a copy of the underlying apiv1.NodeConfigSource object. + // All RemoteConfigSources are expected to be backed by a NodeConfigSource, + // though the convenience methods on the interface will target the source + // type that was detected in a call to NewRemoteConfigSource. + NodeConfigSource() *apiv1.NodeConfigSource +} + +// NewRemoteConfigSource constructs a RemoteConfigSource from a v1/NodeConfigSource object +// You should only call this with a non-nil config source. +// Note that the API server validates Node.Spec.ConfigSource. +func NewRemoteConfigSource(source *apiv1.NodeConfigSource) (RemoteConfigSource, string, error) { + // NOTE: Even though the API server validates the config, we check whether all *known* fields are + // nil here, so that if a new API server allows a new config source type, old clients can send + // an error message rather than crashing due to a nil pointer dereference. + + // Exactly one reference subfield of the config source must be non-nil. + // Currently ConfigMap is the only reference subfield. + if source.ConfigMap == nil { + return nil, status.AllNilSubfieldsError, fmt.Errorf("%s, NodeConfigSource was: %#v", status.AllNilSubfieldsError, source) + } + return &remoteConfigMap{source}, "", nil +} + +// DecodeRemoteConfigSource is a helper for using the apimachinery to decode serialized RemoteConfigSources; +// e.g. the metadata stored by checkpoint/store/fsstore.go +func DecodeRemoteConfigSource(data []byte) (RemoteConfigSource, error) { + // Decode the remote config source. We want this to be non-strict + // so we don't error out on newer API keys. + _, codecs, err := scheme.NewSchemeAndCodecs(serializer.DisableStrict) + if err != nil { + return nil, err + } + + obj, err := runtime.Decode(codecs.UniversalDecoder(), data) + if err != nil { + return nil, fmt.Errorf("failed to decode, error: %v", err) + } + + // for now we assume we are trying to load an kubeletconfigv1beta1.SerializedNodeConfigSource, + // this may need to be extended if e.g. a new version of the api is born + cs, ok := obj.(*kubeletconfiginternal.SerializedNodeConfigSource) + if !ok { + return nil, fmt.Errorf("failed to cast decoded remote config source to *k8s.io/kubernetes/pkg/kubelet/apis/kubeletconfig.SerializedNodeConfigSource") + } + + // we use the v1.NodeConfigSource type on internal and external, so no need to convert to external here + source, _, err := NewRemoteConfigSource(&cs.Source) + if err != nil { + return nil, err + } + + return source, nil +} + +// EqualRemoteConfigSources is a helper for comparing remote config sources by +// comparing the underlying API objects for semantic equality. +func EqualRemoteConfigSources(a, b RemoteConfigSource) bool { + if a != nil && b != nil { + return apiequality.Semantic.DeepEqual(a.NodeConfigSource(), b.NodeConfigSource()) + } + return a == b +} + +// remoteConfigMap implements RemoteConfigSource for v1/ConfigMap config sources +type remoteConfigMap struct { + source *apiv1.NodeConfigSource +} + +var _ RemoteConfigSource = (*remoteConfigMap)(nil) + +func (r *remoteConfigMap) KubeletFilename() string { + return r.source.ConfigMap.KubeletConfigKey +} + +const configMapAPIPathFmt = "/api/v1/namespaces/%s/configmaps/%s" + +func (r *remoteConfigMap) APIPath() string { + ref := r.source.ConfigMap + return fmt.Sprintf(configMapAPIPathFmt, ref.Namespace, ref.Name) +} + +func (r *remoteConfigMap) UID() string { + return string(r.source.ConfigMap.UID) +} + +func (r *remoteConfigMap) ResourceVersion() string { + return r.source.ConfigMap.ResourceVersion +} + +func (r *remoteConfigMap) Download(client clientset.Interface, store cache.Store) (Payload, string, error) { + var ( + cm *apiv1.ConfigMap + err error + ) + // check the in-memory store for the ConfigMap, so we can skip unnecessary downloads + if store != nil { + klog.InfoS("Kubelet config controller checking in-memory store for remoteConfigMap", "apiPath", r.APIPath()) + cm, err = getConfigMapFromStore(store, r.source.ConfigMap.Namespace, r.source.ConfigMap.Name) + if err != nil { + // just log the error, we'll attempt a direct download instead + klog.ErrorS(err, "Kubelet config controller failed to check in-memory store for remoteConfigMap", "apiPath", r.APIPath()) + } else if cm != nil { + klog.InfoS("Kubelet config controller found remoteConfigMap in in-memory store", "apiPath", r.APIPath(), "configMapUID", cm.UID, "resourceVersion", cm.ResourceVersion) + } else { + klog.InfoS("Kubelet config controller did not find remoteConfigMap in in-memory store", "apiPath", r.APIPath()) + } + } + // if we didn't find the ConfigMap in the in-memory store, download it from the API server + if cm == nil { + klog.InfoS("Kubelet config controller attempting to download remoteConfigMap", "apiPath", r.APIPath()) + cm, err = client.CoreV1().ConfigMaps(r.source.ConfigMap.Namespace).Get(context.TODO(), r.source.ConfigMap.Name, metav1.GetOptions{}) + if err != nil { + return nil, status.DownloadError, fmt.Errorf("%s, error: %v", status.DownloadError, err) + } + klog.InfoS("Kubelet config controller successfully downloaded remoteConfigMap", "apiPath", r.APIPath(), "configMapUID", cm.UID, "resourceVersion", cm.ResourceVersion) + } // Assert: Now we have a non-nil ConfigMap + // construct Payload from the ConfigMap + payload, err := NewConfigMapPayload(cm) + if err != nil { + // We only expect an error here if ObjectMeta is lacking UID or ResourceVersion. This should + // never happen on objects in the informer's store, or objects downloaded from the API server + // directly, so we report InternalError. + return nil, status.InternalError, fmt.Errorf("%s, error: %v", status.InternalError, err) + } + // update internal UID and ResourceVersion based on latest ConfigMap + r.source.ConfigMap.UID = cm.UID + r.source.ConfigMap.ResourceVersion = cm.ResourceVersion + return payload, "", nil +} + +func (r *remoteConfigMap) Informer(client clientset.Interface, handler cache.ResourceEventHandlerFuncs) cache.SharedInformer { + // select ConfigMap by name + fieldSelector := fields.OneTermEqualSelector("metadata.name", r.source.ConfigMap.Name) + + // add some randomness to resync period, which can help avoid controllers falling into lock-step + minResyncPeriod := 15 * time.Minute + factor := rand.Float64() + 1 + resyncPeriod := time.Duration(float64(minResyncPeriod.Nanoseconds()) * factor) + + lw := cache.NewListWatchFromClient(client.CoreV1().RESTClient(), "configmaps", r.source.ConfigMap.Namespace, fieldSelector) + + informer := cache.NewSharedInformer(lw, &apiv1.ConfigMap{}, resyncPeriod) + informer.AddEventHandler(handler) + + return informer +} + +func (r *remoteConfigMap) Encode() ([]byte, error) { + encoder, err := utilcodec.NewKubeletconfigYAMLEncoder(kubeletconfigv1beta1.SchemeGroupVersion) + if err != nil { + return nil, err + } + + data, err := runtime.Encode(encoder, &kubeletconfigv1beta1.SerializedNodeConfigSource{Source: *r.source}) + if err != nil { + return nil, err + } + return data, nil +} + +func (r *remoteConfigMap) NodeConfigSource() *apiv1.NodeConfigSource { + return r.source.DeepCopy() +} + +func getConfigMapFromStore(store cache.Store, namespace, name string) (*apiv1.ConfigMap, error) { + key := fmt.Sprintf("%s/%s", namespace, name) + obj, ok, err := store.GetByKey(key) + if err != nil || !ok { + return nil, err + } + cm, ok := obj.(*apiv1.ConfigMap) + if !ok { + err := fmt.Errorf("failed to cast object %s from informer's store to ConfigMap", key) + klog.ErrorS(err, "Kubelet config controller") + return nil, err + } + return cm, nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/checkpoint/store/fakestore.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/checkpoint/store/fakestore.go new file mode 100644 index 000000000000..854294806b0d --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/checkpoint/store/fakestore.go @@ -0,0 +1,80 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package store + +import ( + "fmt" + "time" + + kubeletconfig "k8s.io/kubernetes/pkg/kubelet/apis/config" + "k8s.io/kubernetes/pkg/kubelet/kubeletconfig/checkpoint" +) + +// so far only implements Assigned(), LastKnownGood(), SetAssigned(), and SetLastKnownGood() +type fakeStore struct { + assigned checkpoint.RemoteConfigSource + lastKnownGood checkpoint.RemoteConfigSource +} + +var _ Store = (*fakeStore)(nil) + +// NewFakeStore constructs a fake Store +func NewFakeStore() Store { + return &fakeStore{} +} + +func (s *fakeStore) Initialize() error { + return fmt.Errorf("Initialize method not supported") +} + +func (s *fakeStore) Exists(source checkpoint.RemoteConfigSource) (bool, error) { + return false, fmt.Errorf("Exists method not supported") +} + +func (s *fakeStore) Save(c checkpoint.Payload) error { + return fmt.Errorf("Save method not supported") +} + +func (s *fakeStore) Load(source checkpoint.RemoteConfigSource) (*kubeletconfig.KubeletConfiguration, error) { + return nil, fmt.Errorf("Load method not supported") +} + +func (s *fakeStore) AssignedModified() (time.Time, error) { + return time.Time{}, fmt.Errorf("AssignedModified method not supported") +} + +func (s *fakeStore) Assigned() (checkpoint.RemoteConfigSource, error) { + return s.assigned, nil +} + +func (s *fakeStore) LastKnownGood() (checkpoint.RemoteConfigSource, error) { + return s.lastKnownGood, nil +} + +func (s *fakeStore) SetAssigned(source checkpoint.RemoteConfigSource) error { + s.assigned = source + return nil +} + +func (s *fakeStore) SetLastKnownGood(source checkpoint.RemoteConfigSource) error { + s.lastKnownGood = source + return nil +} + +func (s *fakeStore) Reset() (bool, error) { + return false, fmt.Errorf("Reset method not supported") +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/checkpoint/store/fsstore.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/checkpoint/store/fsstore.go new file mode 100644 index 000000000000..ca5aa9a7efa9 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/checkpoint/store/fsstore.go @@ -0,0 +1,194 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package store + +import ( + "fmt" + "k8s.io/klog/v2" + "path/filepath" + "time" + + kubeletconfig "k8s.io/kubernetes/pkg/kubelet/apis/config" + "k8s.io/kubernetes/pkg/kubelet/kubeletconfig/checkpoint" + "k8s.io/kubernetes/pkg/kubelet/kubeletconfig/configfiles" + utilfiles "k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/files" + utilfs "k8s.io/kubernetes/pkg/util/filesystem" +) + +const ( + metaDir = "meta" + assignedFile = "assigned" + lastKnownGoodFile = "last-known-good" + + checkpointsDir = "checkpoints" +) + +// fsStore is for tracking checkpoints in the local filesystem, implements Store +type fsStore struct { + // fs is the filesystem to use for storage operations; can be mocked for testing + fs utilfs.Filesystem + // dir is the absolute path to the storage directory for fsStore + dir string +} + +var _ Store = (*fsStore)(nil) + +// NewFsStore returns a Store that saves its data in dir +func NewFsStore(fs utilfs.Filesystem, dir string) Store { + return &fsStore{ + fs: fs, + dir: dir, + } +} + +func (s *fsStore) Initialize() error { + klog.InfoS("Kubelet config controller initializing config checkpoints directory", "path", s.dir) + // ensure top-level dir for store + if err := utilfiles.EnsureDir(s.fs, s.dir); err != nil { + return err + } + // ensure metadata directory and reference files (tracks assigned and lkg configs) + if err := utilfiles.EnsureDir(s.fs, filepath.Join(s.dir, metaDir)); err != nil { + return err + } + if err := utilfiles.EnsureFile(s.fs, s.metaPath(assignedFile)); err != nil { + return err + } + if err := utilfiles.EnsureFile(s.fs, s.metaPath(lastKnownGoodFile)); err != nil { + return err + } + // ensure checkpoints directory (saves unpacked payloads in subdirectories named after payload UID) + return utilfiles.EnsureDir(s.fs, filepath.Join(s.dir, checkpointsDir)) +} + +func (s *fsStore) Exists(source checkpoint.RemoteConfigSource) (bool, error) { + const errfmt = "failed to determine whether checkpoint exists for source %s, UID: %s, ResourceVersion: %s exists, error: %v" + if len(source.UID()) == 0 { + return false, fmt.Errorf(errfmt, source.APIPath(), source.UID(), source.ResourceVersion(), "empty UID is ambiguous") + } + if len(source.ResourceVersion()) == 0 { + return false, fmt.Errorf(errfmt, source.APIPath(), source.UID(), source.ResourceVersion(), "empty ResourceVersion is ambiguous") + } + + // we check whether the directory was created for the resource + ok, err := utilfiles.DirExists(s.fs, s.checkpointPath(source.UID(), source.ResourceVersion())) + if err != nil { + return false, fmt.Errorf(errfmt, source.APIPath(), source.UID(), source.ResourceVersion(), err) + } + return ok, nil +} + +func (s *fsStore) Save(payload checkpoint.Payload) error { + // Note: Payload interface guarantees UID() and ResourceVersion() to be non-empty + path := s.checkpointPath(payload.UID(), payload.ResourceVersion()) + // ensure the parent dir (checkpoints/uid) exists, since ReplaceDir requires the parent of the replace + // to exist, and we checkpoint as checkpoints/uid/resourceVersion/files-from-configmap + if err := utilfiles.EnsureDir(s.fs, filepath.Dir(path)); err != nil { + return err + } + // save the checkpoint's files in the appropriate checkpoint dir + return utilfiles.ReplaceDir(s.fs, path, payload.Files()) +} + +func (s *fsStore) Load(source checkpoint.RemoteConfigSource) (*kubeletconfig.KubeletConfiguration, error) { + sourceFmt := fmt.Sprintf("%s, UID: %s, ResourceVersion: %s", source.APIPath(), source.UID(), source.ResourceVersion()) + // check if a checkpoint exists for the source + if ok, err := s.Exists(source); err != nil { + return nil, err + } else if !ok { + return nil, fmt.Errorf("no checkpoint for source %s", sourceFmt) + } + // load the kubelet config file + klog.InfoS("Kubelet config controller loading Kubelet configuration checkpoint for source", "apiPath", source.APIPath(), "sourceUID", source.UID(), "resourceVersion", source.ResourceVersion()) + loader, err := configfiles.NewFsLoader(s.fs, filepath.Join(s.checkpointPath(source.UID(), source.ResourceVersion()), source.KubeletFilename())) + if err != nil { + return nil, err + } + kc, err := loader.Load() + if err != nil { + return nil, err + } + return kc, nil +} + +func (s *fsStore) AssignedModified() (time.Time, error) { + path := s.metaPath(assignedFile) + info, err := s.fs.Stat(path) + if err != nil { + return time.Time{}, fmt.Errorf("failed to stat %q while checking modification time, error: %v", path, err) + } + return info.ModTime(), nil +} + +func (s *fsStore) Assigned() (checkpoint.RemoteConfigSource, error) { + return readRemoteConfigSource(s.fs, s.metaPath(assignedFile)) +} + +func (s *fsStore) LastKnownGood() (checkpoint.RemoteConfigSource, error) { + return readRemoteConfigSource(s.fs, s.metaPath(lastKnownGoodFile)) +} + +func (s *fsStore) SetAssigned(source checkpoint.RemoteConfigSource) error { + return writeRemoteConfigSource(s.fs, s.metaPath(assignedFile), source) +} + +func (s *fsStore) SetLastKnownGood(source checkpoint.RemoteConfigSource) error { + return writeRemoteConfigSource(s.fs, s.metaPath(lastKnownGoodFile), source) +} + +func (s *fsStore) Reset() (bool, error) { + return reset(s) +} + +func (s *fsStore) checkpointPath(uid, resourceVersion string) string { + return filepath.Join(s.dir, checkpointsDir, uid, resourceVersion) +} + +func (s *fsStore) metaPath(name string) string { + return filepath.Join(s.dir, metaDir, name) +} + +func readRemoteConfigSource(fs utilfs.Filesystem, path string) (checkpoint.RemoteConfigSource, error) { + data, err := fs.ReadFile(path) + if err != nil { + return nil, err + } else if len(data) == 0 { + return nil, nil + } + return checkpoint.DecodeRemoteConfigSource(data) +} + +func writeRemoteConfigSource(fs utilfs.Filesystem, path string, source checkpoint.RemoteConfigSource) error { + // if nil, reset the file + if source == nil { + return utilfiles.ReplaceFile(fs, path, []byte{}) + } + // check that UID and ResourceVersion are non-empty, + // error to save reference if the checkpoint can't be fully resolved + if source.UID() == "" { + return fmt.Errorf("failed to write RemoteConfigSource, empty UID is ambiguous") + } + if source.ResourceVersion() == "" { + return fmt.Errorf("failed to write RemoteConfigSource, empty ResourceVersion is ambiguous") + } + // encode the source and save it to the file + data, err := source.Encode() + if err != nil { + return err + } + return utilfiles.ReplaceFile(fs, path, data) +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/checkpoint/store/store.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/checkpoint/store/store.go new file mode 100644 index 000000000000..5d2bc6f54ed1 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/checkpoint/store/store.go @@ -0,0 +1,70 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package store + +import ( + "fmt" + "time" + + kubeletconfig "k8s.io/kubernetes/pkg/kubelet/apis/config" + "k8s.io/kubernetes/pkg/kubelet/kubeletconfig/checkpoint" +) + +// Store saves checkpoints and information about which is the assigned and last-known-good checkpoint to a storage layer +type Store interface { + // Initialize sets up the storage layer + Initialize() error + + // Exists returns true if the object referenced by `source` has been checkpointed. + // The source must be unambiguous - e.g. if referencing an API object it must specify both uid and resourceVersion. + Exists(source checkpoint.RemoteConfigSource) (bool, error) + // Save Kubelet config payloads to the storage layer. It must be possible to unmarshal the payload to a KubeletConfiguration. + // The following payload types are supported: + // - k8s.io/api/core/v1.ConfigMap + Save(c checkpoint.Payload) error + // Load loads the KubeletConfiguration from the checkpoint referenced by `source`. + Load(source checkpoint.RemoteConfigSource) (*kubeletconfig.KubeletConfiguration, error) + + // AssignedModified returns the last time that the assigned checkpoint was set + AssignedModified() (time.Time, error) + // Assigned returns the source that points to the checkpoint currently assigned to the Kubelet, or nil if no assigned checkpoint is set + Assigned() (checkpoint.RemoteConfigSource, error) + // LastKnownGood returns the source that points to the last-known-good checkpoint, or nil if no last-known-good checkpoint is set + LastKnownGood() (checkpoint.RemoteConfigSource, error) + + // SetAssigned saves the source that points to the assigned checkpoint, set to nil to unset + SetAssigned(source checkpoint.RemoteConfigSource) error + // SetLastKnownGood saves the source that points to the last-known-good checkpoint, set to nil to unset + SetLastKnownGood(source checkpoint.RemoteConfigSource) error + // Reset unsets the assigned and last-known-good checkpoints and returns whether the assigned checkpoint was unset as a result of the reset + Reset() (bool, error) +} + +// reset is a helper for implementing Reset, which can be implemented in terms of Store methods +func reset(s Store) (bool, error) { + assigned, err := s.Assigned() + if err != nil { + return false, err + } + if err := s.SetLastKnownGood(nil); err != nil { + return false, fmt.Errorf("failed to reset last-known-good UID in checkpoint store, error: %v", err) + } + if err := s.SetAssigned(nil); err != nil { + return false, fmt.Errorf("failed to reset assigned UID in checkpoint store, error: %v", err) + } + return assigned != nil, nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/configsync.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/configsync.go new file mode 100644 index 000000000000..f4dea057d194 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/configsync.go @@ -0,0 +1,265 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubeletconfig + +import ( + "context" + "fmt" + "os" + "time" + + "k8s.io/klog/v2" + + apiv1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + clientset "k8s.io/client-go/kubernetes" + v1core "k8s.io/client-go/kubernetes/typed/core/v1" + "k8s.io/client-go/tools/cache" + "k8s.io/kubernetes/pkg/kubelet/kubeletconfig/checkpoint" + "k8s.io/kubernetes/pkg/kubelet/kubeletconfig/status" +) + +const ( + // KubeletConfigChangedEventReason identifies an event as a change of Kubelet configuration + KubeletConfigChangedEventReason = "KubeletConfigChanged" + // LocalEventMessage is sent when the Kubelet restarts to use local config + LocalEventMessage = "Kubelet restarting to use local config" + // RemoteEventMessageFmt is sent when the Kubelet restarts to use a remote config + RemoteEventMessageFmt = "Kubelet restarting to use %s, UID: %s, ResourceVersion: %s, KubeletConfigKey: %s" +) + +// pokeConfiSourceWorker tells the worker thread that syncs config sources that work needs to be done +func (cc *Controller) pokeConfigSourceWorker() { + select { + case cc.pendingConfigSource <- true: + default: + } +} + +// syncConfigSource checks if work needs to be done to use a new configuration, and does that work if necessary +func (cc *Controller) syncConfigSource(client clientset.Interface, eventClient v1core.EventsGetter, nodeName string) { + select { + case <-cc.pendingConfigSource: + default: + // no work to be done, return + return + } + + // if the sync fails, we want to retry + var syncerr error + defer func() { + if syncerr != nil { + klog.ErrorS(syncerr, "Kubelet config controller") + cc.pokeConfigSourceWorker() + } + }() + + // get the latest Node.Spec.ConfigSource from the informer + source, err := latestNodeConfigSource(cc.nodeInformer.GetStore(), nodeName) + if err != nil { + cc.configStatus.SetErrorOverride(fmt.Sprintf(status.SyncErrorFmt, status.InternalError)) + syncerr = fmt.Errorf("%s, error: %v", status.InternalError, err) + return + } + + // a nil source simply means we reset to local defaults + if source == nil { + klog.InfoS("Kubelet config controller Node.Spec.ConfigSource is empty, will reset assigned and last-known-good to defaults") + if updated, reason, err := cc.resetConfig(); err != nil { + reason = fmt.Sprintf(status.SyncErrorFmt, reason) + cc.configStatus.SetErrorOverride(reason) + syncerr = fmt.Errorf("%s, error: %v", reason, err) + return + } else if updated { + restartForNewConfig(eventClient, nodeName, nil) + } + return + } + + // a non-nil source means we should attempt to download the config, and checkpoint it if necessary + klog.InfoS("Kubelet config controller Node.Spec.ConfigSource is non-empty, will checkpoint source and update config if necessary") + + // TODO(mtaufen): It would be nice if we could check the payload's metadata before (re)downloading the whole payload + // we at least try pulling the latest configmap out of the local informer store. + + // construct the interface that can dynamically dispatch the correct Download, etc. methods for the given source type + remote, reason, err := checkpoint.NewRemoteConfigSource(source) + if err != nil { + reason = fmt.Sprintf(status.SyncErrorFmt, reason) + cc.configStatus.SetErrorOverride(reason) + syncerr = fmt.Errorf("%s, error: %v", reason, err) + return + } + + // "download" source, either from informer's in-memory store or directly from the API server, if the informer doesn't have a copy + payload, reason, err := cc.downloadConfigPayload(client, remote) + if err != nil { + reason = fmt.Sprintf(status.SyncErrorFmt, reason) + cc.configStatus.SetErrorOverride(reason) + syncerr = fmt.Errorf("%s, error: %v", reason, err) + return + } + + // save a checkpoint for the payload, if one does not already exist + if reason, err := cc.saveConfigCheckpoint(remote, payload); err != nil { + reason = fmt.Sprintf(status.SyncErrorFmt, reason) + cc.configStatus.SetErrorOverride(reason) + syncerr = fmt.Errorf("%s, error: %v", reason, err) + return + } + + // update the local, persistent record of assigned config + if updated, reason, err := cc.setAssignedConfig(remote); err != nil { + reason = fmt.Sprintf(status.SyncErrorFmt, reason) + cc.configStatus.SetErrorOverride(reason) + syncerr = fmt.Errorf("%s, error: %v", reason, err) + return + } else if updated { + restartForNewConfig(eventClient, nodeName, remote) + } + + // If we get here: + // - there is no need to restart to use new config + // - there was no error trying to sync configuration + // - if, previously, there was an error trying to sync configuration, we need to clear that error from the status + cc.configStatus.SetErrorOverride("") +} + +// Note: source has up-to-date uid and resourceVersion after calling downloadConfigPayload. +func (cc *Controller) downloadConfigPayload(client clientset.Interface, source checkpoint.RemoteConfigSource) (checkpoint.Payload, string, error) { + var store cache.Store + if cc.remoteConfigSourceInformer != nil { + store = cc.remoteConfigSourceInformer.GetStore() + } + return source.Download(client, store) +} + +func (cc *Controller) saveConfigCheckpoint(source checkpoint.RemoteConfigSource, payload checkpoint.Payload) (string, error) { + ok, err := cc.checkpointStore.Exists(source) + if err != nil { + return status.InternalError, fmt.Errorf("%s, error: %v", status.InternalError, err) + } + if ok { + klog.InfoS("Kubelet config controller checkpoint already exists for source", "apiPath", source.APIPath(), "checkpointUID", payload.UID(), "resourceVersion", payload.ResourceVersion()) + return "", nil + } + if err := cc.checkpointStore.Save(payload); err != nil { + return status.InternalError, fmt.Errorf("%s, error: %v", status.InternalError, err) + } + return "", nil +} + +// setAssignedConfig updates the assigned checkpoint config in the store. +// Returns whether the assigned config changed as a result, or a sanitized failure reason and an error. +func (cc *Controller) setAssignedConfig(source checkpoint.RemoteConfigSource) (bool, string, error) { + assigned, err := cc.checkpointStore.Assigned() + if err != nil { + return false, status.InternalError, err + } + if err := cc.checkpointStore.SetAssigned(source); err != nil { + return false, status.InternalError, err + } + return !checkpoint.EqualRemoteConfigSources(assigned, source), "", nil +} + +// resetConfig resets the assigned and last-known-good checkpoints in the checkpoint store to their default values and +// returns whether the assigned checkpoint changed as a result, or a sanitized failure reason and an error. +func (cc *Controller) resetConfig() (bool, string, error) { + updated, err := cc.checkpointStore.Reset() + if err != nil { + return false, status.InternalError, err + } + return updated, "", nil +} + +// restartForNewConfig presumes the Kubelet is managed by a babysitter, e.g. systemd +// It will send an event before exiting. +func restartForNewConfig(eventClient v1core.EventsGetter, nodeName string, source checkpoint.RemoteConfigSource) { + message := LocalEventMessage + if source != nil { + message = fmt.Sprintf(RemoteEventMessageFmt, source.APIPath(), source.UID(), source.ResourceVersion(), source.KubeletFilename()) + } + // we directly log and send the event, instead of using the event recorder, + // because the event recorder won't flush its queue before we exit (we'd lose the event) + event := makeEvent(nodeName, apiv1.EventTypeNormal, KubeletConfigChangedEventReason, message) + klog.V(3).InfoS("Event created", "event", klog.KObj(event), "involvedObject", event.InvolvedObject, "eventType", event.Type, "reason", event.Reason, "message", event.Message) + if _, err := eventClient.Events(apiv1.NamespaceDefault).Create(context.TODO(), event, metav1.CreateOptions{}); err != nil { + klog.ErrorS(err, "Kubelet config controller failed to send event") + } + klog.InfoS("Kubelet config controller event", "message", message) + os.Exit(0) +} + +// latestNodeConfigSource returns a copy of the most recent NodeConfigSource from the Node with `nodeName` in `store` +func latestNodeConfigSource(store cache.Store, nodeName string) (*apiv1.NodeConfigSource, error) { + obj, ok, err := store.GetByKey(nodeName) + if err != nil { + err := fmt.Errorf("failed to retrieve Node %q from informer's store, error: %v", nodeName, err) + klog.ErrorS(err, "Kubelet config controller") + return nil, err + } else if !ok { + err := fmt.Errorf("node %q does not exist in the informer's store, can't sync config source", nodeName) + klog.ErrorS(err, "Kubelet config controller") + return nil, err + } + node, ok := obj.(*apiv1.Node) + if !ok { + err := fmt.Errorf("failed to cast object from informer's store to Node, can't sync config source for Node %q", nodeName) + klog.ErrorS(err, "Kubelet config controller") + return nil, err + } + // Copy the source, so anyone who modifies it after here doesn't mess up the informer's store! + // This was previously the cause of a bug that made the Kubelet frequently resync config; Download updated + // the UID and ResourceVersion on the NodeConfigSource, but the pointer was still drilling all the way + // into the informer's copy! + return node.Spec.ConfigSource.DeepCopy(), nil +} + +// makeEvent constructs an event +// similar to makeEvent in k8s.io/client-go/tools/record/event.go +func makeEvent(nodeName, eventtype, reason, message string) *apiv1.Event { + const componentKubelet = "kubelet" + // NOTE(mtaufen): This is consistent with pkg/kubelet/kubelet.go. Even though setting the node + // name as the UID looks strange, it appears to be conventional for events sent by the Kubelet. + ref := apiv1.ObjectReference{ + Kind: "Node", + Name: nodeName, + UID: types.UID(nodeName), + Namespace: "", + } + + t := metav1.Time{Time: time.Now()} + namespace := ref.Namespace + if namespace == "" { + namespace = metav1.NamespaceDefault + } + return &apiv1.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: fmt.Sprintf("%v.%x", ref.Name, t.UnixNano()), + Namespace: namespace, + }, + InvolvedObject: ref, + Reason: reason, + Message: message, + FirstTimestamp: t, + LastTimestamp: t, + Count: 1, + Type: eventtype, + Source: apiv1.EventSource{Component: componentKubelet, Host: string(nodeName)}, + } +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/controller.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/controller.go new file mode 100644 index 000000000000..762a74b1e1ef --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/controller.go @@ -0,0 +1,324 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubeletconfig + +import ( + "fmt" + "k8s.io/klog/v2" + "path/filepath" + "time" + + apiequality "k8s.io/apimachinery/pkg/api/equality" + "k8s.io/apimachinery/pkg/util/wait" + clientset "k8s.io/client-go/kubernetes" + v1core "k8s.io/client-go/kubernetes/typed/core/v1" + "k8s.io/client-go/tools/cache" + kubeletconfig "k8s.io/kubernetes/pkg/kubelet/apis/config" + "k8s.io/kubernetes/pkg/kubelet/apis/config/validation" + + "k8s.io/kubernetes/pkg/kubelet/kubeletconfig/checkpoint" + "k8s.io/kubernetes/pkg/kubelet/kubeletconfig/checkpoint/store" + "k8s.io/kubernetes/pkg/kubelet/kubeletconfig/status" + utilpanic "k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/panic" + utilfs "k8s.io/kubernetes/pkg/util/filesystem" +) + +const ( + storeDir = "store" + // TODO(mtaufen): We may expose this in a future API, but for the time being we use an internal default, + // because it is not especially clear where this should live in the API. + configTrialDuration = 10 * time.Minute +) + +// TransformFunc edits the KubeletConfiguration in-place, and returns an +// error if any of the transformations failed. +type TransformFunc func(kc *kubeletconfig.KubeletConfiguration) error + +// Controller manages syncing dynamic Kubelet configurations +// For more information, see the proposal: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/node/dynamic-kubelet-configuration.md +type Controller struct { + // transform applies an arbitrary transformation to config after loading, and before validation. + // This can be used, for example, to include config from flags before the controller's validation step. + // If transform returns an error, loadConfig will fail, and an InternalError will be reported. + // Be wary if using this function as an extension point, in most cases the controller should + // probably just be natively extended to do what you need. Injecting flag precedence transformations + // is something of an exception because the caller of this controller (cmd/) is aware of flags, but this + // controller's tree (pkg/) is not. + transform TransformFunc + + // pendingConfigSource; write to this channel to indicate that the config source needs to be synced from the API server + pendingConfigSource chan bool + + // configStatus manages the status we report on the Node object + configStatus status.NodeConfigStatus + + // nodeInformer is the informer that watches the Node object + nodeInformer cache.SharedInformer + + // remoteConfigSourceInformer is the informer that watches the assigned config source + remoteConfigSourceInformer cache.SharedInformer + + // checkpointStore persists config source checkpoints to a storage layer + checkpointStore store.Store +} + +// NewController constructs a new Controller object and returns it. The dynamicConfigDir +// path must be absolute. transform applies an arbitrary transformation to config after loading, and before validation. +// This can be used, for example, to include config from flags before the controller's validation step. +// If transform returns an error, loadConfig will fail, and an InternalError will be reported. +// Be wary if using this function as an extension point, in most cases the controller should +// probably just be natively extended to do what you need. Injecting flag precedence transformations +// is something of an exception because the caller of this controller (cmd/) is aware of flags, but this +// controller's tree (pkg/) is not. +func NewController(dynamicConfigDir string, transform TransformFunc) *Controller { + return &Controller{ + transform: transform, + // channels must have capacity at least 1, since we signal with non-blocking writes + pendingConfigSource: make(chan bool, 1), + configStatus: status.NewNodeConfigStatus(), + checkpointStore: store.NewFsStore(&utilfs.DefaultFs{}, filepath.Join(dynamicConfigDir, storeDir)), + } +} + +// Bootstrap attempts to return a valid KubeletConfiguration based on the configuration of the Controller, +// or returns an error if no valid configuration could be produced. Bootstrap should be called synchronously before StartSync. +// If the pre-existing local configuration should be used, Bootstrap returns a nil config. +func (cc *Controller) Bootstrap() (*kubeletconfig.KubeletConfiguration, error) { + klog.InfoS("Kubelet config controller starting controller") + + // ensure the filesystem is initialized + if err := cc.initializeDynamicConfigDir(); err != nil { + return nil, err + } + + // determine assigned source and set status + assignedSource, err := cc.checkpointStore.Assigned() + if err != nil { + return nil, err + } + if assignedSource != nil { + cc.configStatus.SetAssigned(assignedSource.NodeConfigSource()) + } + + // determine last-known-good source and set status + lastKnownGoodSource, err := cc.checkpointStore.LastKnownGood() + if err != nil { + return nil, err + } + if lastKnownGoodSource != nil { + cc.configStatus.SetLastKnownGood(lastKnownGoodSource.NodeConfigSource()) + } + + // if the assigned source is nil, return nil to indicate local config + if assignedSource == nil { + return nil, nil + } + + // attempt to load assigned config + assignedConfig, reason, err := cc.loadConfig(assignedSource) + if err == nil { + // update the active source to the non-nil assigned source + cc.configStatus.SetActive(assignedSource.NodeConfigSource()) + + // update the last-known-good config if necessary, and start a timer that + // periodically checks whether the last-known good needs to be updated + // we only do this when the assigned config loads and passes validation + // wait.Forever will call the func once before starting the timer + go wait.Forever(func() { cc.checkTrial(configTrialDuration) }, 10*time.Second) + + return assignedConfig, nil + } // Assert: the assigned config failed to load or validate + + // TODO(mtaufen): consider re-attempting download when a load/verify/parse/validate + // error happens outside trial period, we already made it past the trial so it's probably filesystem corruption + // or something else scary + + // log the reason and error details for the failure to load the assigned config + klog.ErrorS(err, "Kubelet config controller", "reason", reason) + + // set status to indicate the failure with the assigned config + cc.configStatus.SetError(reason) + + // if the last-known-good source is nil, return nil to indicate local config + if lastKnownGoodSource == nil { + return nil, nil + } + + // attempt to load the last-known-good config + lastKnownGoodConfig, _, err := cc.loadConfig(lastKnownGoodSource) + if err != nil { + // we failed to load the last-known-good, so something is really messed up and we just return the error + return nil, err + } + + // set status to indicate the active source is the non-nil last-known-good source + cc.configStatus.SetActive(lastKnownGoodSource.NodeConfigSource()) + return lastKnownGoodConfig, nil +} + +// StartSync tells the controller to start the goroutines that sync status/config to/from the API server. +// The clients must be non-nil, and the nodeName must be non-empty. +func (cc *Controller) StartSync(client clientset.Interface, eventClient v1core.EventsGetter, nodeName string) error { + const errFmt = "cannot start Kubelet config sync: %s" + if client == nil { + return fmt.Errorf(errFmt, "nil client") + } + if eventClient == nil { + return fmt.Errorf(errFmt, "nil event client") + } + if nodeName == "" { + return fmt.Errorf(errFmt, "empty nodeName") + } + + // Rather than use utilruntime.HandleCrash, which doesn't actually crash in the Kubelet, + // we use HandlePanic to manually call the panic handlers and then crash. + // We have a better chance of recovering normal operation if we just restart the Kubelet in the event + // of a Go runtime error. + // NOTE(mtaufen): utilpanic.HandlePanic returns a function and you have to call it for your thing to run! + // This was EVIL to debug (difficult to see missing `()`). + // The code now uses `go name()` instead of `go utilpanic.HandlePanic(func(){...})()` to avoid confusion. + + // status sync worker + statusSyncLoopFunc := utilpanic.HandlePanic(func() { + klog.InfoS("Kubelet config controller starting status sync loop") + wait.JitterUntil(func() { + cc.configStatus.Sync(client, nodeName) + }, 10*time.Second, 0.2, true, wait.NeverStop) + }) + // remote config source informer, if we have a remote source to watch + assignedSource, err := cc.checkpointStore.Assigned() + if err != nil { + return fmt.Errorf(errFmt, err) + } else if assignedSource == nil { + klog.InfoS("Kubelet config controller local source is assigned, will not start remote config source informer") + } else { + cc.remoteConfigSourceInformer = assignedSource.Informer(client, cache.ResourceEventHandlerFuncs{ + AddFunc: cc.onAddRemoteConfigSourceEvent, + UpdateFunc: cc.onUpdateRemoteConfigSourceEvent, + DeleteFunc: cc.onDeleteRemoteConfigSourceEvent, + }, + ) + } + remoteConfigSourceInformerFunc := utilpanic.HandlePanic(func() { + if cc.remoteConfigSourceInformer != nil { + klog.InfoS("Kubelet config controller starting remote config source informer") + cc.remoteConfigSourceInformer.Run(wait.NeverStop) + } + }) + // node informer + cc.nodeInformer = newSharedNodeInformer(client, nodeName, + cc.onAddNodeEvent, cc.onUpdateNodeEvent, cc.onDeleteNodeEvent) + nodeInformerFunc := utilpanic.HandlePanic(func() { + klog.InfoS("Kubelet config controller starting Node informer") + cc.nodeInformer.Run(wait.NeverStop) + }) + // config sync worker + configSyncLoopFunc := utilpanic.HandlePanic(func() { + klog.InfoS("Kubelet config controller starting Kubelet config sync loop") + wait.JitterUntil(func() { + cc.syncConfigSource(client, eventClient, nodeName) + }, 10*time.Second, 0.2, true, wait.NeverStop) + }) + + go statusSyncLoopFunc() + go remoteConfigSourceInformerFunc() + go nodeInformerFunc() + go configSyncLoopFunc() + return nil +} + +// loadConfig loads Kubelet config from a checkpoint +// It returns the loaded configuration or a clean failure reason (for status reporting) and an error. +func (cc *Controller) loadConfig(source checkpoint.RemoteConfigSource) (*kubeletconfig.KubeletConfiguration, string, error) { + // load KubeletConfiguration from checkpoint + kc, err := cc.checkpointStore.Load(source) + if err != nil { + return nil, status.LoadError, err + } + // apply any required transformations to the KubeletConfiguration + if cc.transform != nil { + if err := cc.transform(kc); err != nil { + return nil, status.InternalError, err + } + } + // validate the result + if err := validation.ValidateKubeletConfiguration(kc); err != nil { + return nil, status.ValidateError, err + } + return kc, "", nil +} + +// initializeDynamicConfigDir makes sure that the storage layers for various controller components are set up correctly +func (cc *Controller) initializeDynamicConfigDir() error { + klog.InfoS("Kubelet config controller ensuring filesystem is set up correctly") + // initializeDynamicConfigDir local checkpoint storage location + return cc.checkpointStore.Initialize() +} + +// checkTrial checks whether the trial duration has passed, and updates the last-known-good config if necessary +func (cc *Controller) checkTrial(duration time.Duration) { + // when the trial period is over, the assigned config becomes the last-known-good + if trial, err := cc.inTrial(duration); err != nil { + klog.ErrorS(err, "Kubelet config controller failed to check trial period for assigned config") + } else if !trial { + if err := cc.graduateAssignedToLastKnownGood(); err != nil { + klog.ErrorS(err, "failed to set last-known-good to assigned config") + } + } +} + +// inTrial returns true if the time elapsed since the last modification of the assigned config does not exceed `trialDur`, false otherwise +func (cc *Controller) inTrial(trialDur time.Duration) (bool, error) { + now := time.Now() + t, err := cc.checkpointStore.AssignedModified() + if err != nil { + return false, err + } + if now.Sub(t) <= trialDur { + return true, nil + } + return false, nil +} + +// graduateAssignedToLastKnownGood sets the last-known-good in the checkpointStore +// to the same value as the assigned config maintained by the checkpointStore +func (cc *Controller) graduateAssignedToLastKnownGood() error { + // get assigned + assigned, err := cc.checkpointStore.Assigned() + if err != nil { + return err + } + // get last-known-good + lastKnownGood, err := cc.checkpointStore.LastKnownGood() + if err != nil { + return err + } + // if the sources are equal, no need to change + if assigned == lastKnownGood || + assigned != nil && lastKnownGood != nil && apiequality.Semantic.DeepEqual(assigned.NodeConfigSource(), lastKnownGood.NodeConfigSource()) { + return nil + } + // update last-known-good + err = cc.checkpointStore.SetLastKnownGood(assigned) + if err != nil { + return err + } + // update the status to reflect the new last-known-good config + cc.configStatus.SetLastKnownGood(assigned.NodeConfigSource()) + klog.InfoS("Kubelet config controller updated last-known-good config to new checkpointStore", "apiPath", assigned.APIPath(), "checkpointUID", assigned.UID(), "resourceVersion", assigned.ResourceVersion()) + return nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/status/status.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/status/status.go new file mode 100644 index 000000000000..5b7576b7fc01 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/status/status.go @@ -0,0 +1,204 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package status + +import ( + "context" + "fmt" + "sync" + + "k8s.io/klog/v2" + + apiv1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + clientset "k8s.io/client-go/kubernetes" + nodeutil "k8s.io/component-helpers/node/util" + "k8s.io/kubernetes/pkg/kubelet/metrics" +) + +const ( + // LoadError indicates that the Kubelet failed to load the config checkpoint + LoadError = "failed to load config, see Kubelet log for details" + // ValidateError indicates that the Kubelet failed to validate the config checkpoint + ValidateError = "failed to validate config, see Kubelet log for details" + // AllNilSubfieldsError is used when no subfields are set + // This could happen in the case that an old client tries to read an object from a newer API server with a set subfield it does not know about + AllNilSubfieldsError = "invalid NodeConfigSource, exactly one subfield must be non-nil, but all were nil" + // DownloadError is used when the download fails, e.g. due to network issues + DownloadError = "failed to download config, see Kubelet log for details" + // InternalError indicates that some internal error happened while trying to sync config, e.g. filesystem issues + InternalError = "internal failure, see Kubelet log for details" + + // SyncErrorFmt is used when the system couldn't sync the config, due to a malformed Node.Spec.ConfigSource, a download failure, etc. + SyncErrorFmt = "failed to sync: %s" +) + +// NodeConfigStatus represents Node.Status.Config +type NodeConfigStatus interface { + // SetActive sets the active source in the status + SetActive(source *apiv1.NodeConfigSource) + // SetAssigned sets the assigned source in the status + SetAssigned(source *apiv1.NodeConfigSource) + // SetLastKnownGood sets the last-known-good source in the status + SetLastKnownGood(source *apiv1.NodeConfigSource) + // SetError sets the error associated with the status + SetError(err string) + // SetErrorOverride sets an error that overrides the base error set by SetError. + // If the override is set to the empty string, the base error is reported in + // the status, otherwise the override is reported. + SetErrorOverride(err string) + // Sync patches the current status into the Node identified by `nodeName` if an update is pending + Sync(client clientset.Interface, nodeName string) +} + +type nodeConfigStatus struct { + // status is the core NodeConfigStatus that we report + status apiv1.NodeConfigStatus + // mux is a mutex on the nodeConfigStatus, alternate between setting and syncing the status + mux sync.Mutex + // errorOverride is sent in place of the usual error if it is non-empty + errorOverride string + // syncCh; write to this channel to indicate that the status needs to be synced to the API server + syncCh chan bool +} + +// NewNodeConfigStatus returns a new NodeConfigStatus interface +func NewNodeConfigStatus() NodeConfigStatus { + // channels must have capacity at least 1, since we signal with non-blocking writes + syncCh := make(chan bool, 1) + // prime new status managers to sync with the API server on the first call to Sync + syncCh <- true + return &nodeConfigStatus{ + syncCh: syncCh, + } +} + +// transact grabs the lock, performs the fn, records the need to sync, and releases the lock +func (s *nodeConfigStatus) transact(fn func()) { + s.mux.Lock() + defer s.mux.Unlock() + fn() + s.sync() +} + +func (s *nodeConfigStatus) SetAssigned(source *apiv1.NodeConfigSource) { + s.transact(func() { + s.status.Assigned = source + }) +} + +func (s *nodeConfigStatus) SetActive(source *apiv1.NodeConfigSource) { + s.transact(func() { + s.status.Active = source + }) +} + +func (s *nodeConfigStatus) SetLastKnownGood(source *apiv1.NodeConfigSource) { + s.transact(func() { + s.status.LastKnownGood = source + }) +} + +func (s *nodeConfigStatus) SetError(err string) { + s.transact(func() { + s.status.Error = err + }) +} + +func (s *nodeConfigStatus) SetErrorOverride(err string) { + s.transact(func() { + s.errorOverride = err + }) +} + +// sync notes that the status needs to be synced to the API server +func (s *nodeConfigStatus) sync() { + select { + case s.syncCh <- true: + default: + } +} + +// Sync attempts to sync the status with the Node object for this Kubelet, +// if syncing fails, an error is logged, and work is queued for retry. +func (s *nodeConfigStatus) Sync(client clientset.Interface, nodeName string) { + select { + case <-s.syncCh: + default: + // no work to be done, return + return + } + + klog.InfoS("Kubelet config controller updating Node.Status.Config") + + // grab the lock + s.mux.Lock() + defer s.mux.Unlock() + + // if the sync fails, we want to retry + var err error + defer func() { + if err != nil { + klog.ErrorS(err, "Kubelet config controller") + s.sync() + } + }() + + // get the Node so we can check the current status + oldNode, err := client.CoreV1().Nodes().Get(context.TODO(), nodeName, metav1.GetOptions{}) + if err != nil { + err = fmt.Errorf("could not get Node %q, will not sync status, error: %v", nodeName, err) + return + } + + status := &s.status + // override error, if necessary + if len(s.errorOverride) > 0 { + // copy the status, so we don't overwrite the prior error + // with the override + status = status.DeepCopy() + status.Error = s.errorOverride + } + + // update metrics based on the status we will sync + metrics.SetConfigError(len(status.Error) > 0) + err = metrics.SetAssignedConfig(status.Assigned) + if err != nil { + err = fmt.Errorf("failed to update Assigned config metric, error: %v", err) + return + } + err = metrics.SetActiveConfig(status.Active) + if err != nil { + err = fmt.Errorf("failed to update Active config metric, error: %v", err) + return + } + err = metrics.SetLastKnownGoodConfig(status.LastKnownGood) + if err != nil { + err = fmt.Errorf("failed to update LastKnownGood config metric, error: %v", err) + return + } + + // apply the status to a copy of the node so we don't modify the object in the informer's store + newNode := oldNode.DeepCopy() + newNode.Status.Config = status + + // patch the node with the new status + if _, _, err := nodeutil.PatchNodeStatus(client.CoreV1(), types.NodeName(nodeName), oldNode, newNode); err != nil { + klog.ErrorS(err, "Kubelet config controller failed to patch node status") + } +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/files/files.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/files/files.go new file mode 100644 index 000000000000..6dfbe3840cd2 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/files/files.go @@ -0,0 +1,229 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package files + +import ( + "fmt" + "os" + "path/filepath" + + utilfs "k8s.io/kubernetes/pkg/util/filesystem" +) + +const ( + defaultPerm = 0755 + tmpTag = "tmp_" // additional prefix to prevent accidental collisions +) + +// FileExists returns true if a regular file exists at `path`, false if `path` does not exist, otherwise an error +func FileExists(fs utilfs.Filesystem, path string) (bool, error) { + if info, err := fs.Stat(path); err == nil { + if info.Mode().IsRegular() { + return true, nil + } + return false, fmt.Errorf("expected regular file at %q, but mode is %q", path, info.Mode().String()) + } else if os.IsNotExist(err) { + return false, nil + } else { + return false, err + } +} + +// EnsureFile ensures that a regular file exists at `path`, and if it must create the file any +// necessary parent directories will also be created and the new file will be empty. +func EnsureFile(fs utilfs.Filesystem, path string) error { + // if file exists, don't change it, but do report any unexpected errors + if ok, err := FileExists(fs, path); ok || err != nil { + return err + } // Assert: file does not exist + + // create any necessary parents + err := fs.MkdirAll(filepath.Dir(path), defaultPerm) + if err != nil { + return err + } + + // create the file + file, err := fs.Create(path) + if err != nil { + return err + } + // close the file, since we don't intend to use it yet + return file.Close() +} + +// WriteTmpFile creates a temporary file at `path`, writes `data` into it, and fsyncs the file +// Expects the parent directory to exist. +func WriteTmpFile(fs utilfs.Filesystem, path string, data []byte) (tmpPath string, retErr error) { + dir := filepath.Dir(path) + prefix := tmpTag + filepath.Base(path) + + // create the tmp file + tmpFile, err := fs.TempFile(dir, prefix) + if err != nil { + return "", err + } + defer func() { + // close the file, return the close error only if there haven't been any other errors + if err := tmpFile.Close(); retErr == nil { + retErr = err + } + // if there was an error writing, syncing, or closing, delete the temporary file and return the error + if retErr != nil { + if err := fs.Remove(tmpPath); err != nil { + retErr = fmt.Errorf("attempted to remove temporary file %q after error %v, but failed due to error: %v", tmpPath, retErr, err) + } + tmpPath = "" + } + }() + + // Name() will be an absolute path when using utilfs.DefaultFS, because ioutil.TempFile passes + // an absolute path to os.Open, and we ensure similar behavior in utilfs.FakeFS for testing. + tmpPath = tmpFile.Name() + + // write data + if _, err := tmpFile.Write(data); err != nil { + return tmpPath, err + } + // sync file, to ensure it's written in case a hard reset happens + return tmpPath, tmpFile.Sync() +} + +// ReplaceFile replaces the contents of the file at `path` with `data` by writing to a tmp file in the same +// dir as `path` and renaming the tmp file over `path`. The file does not have to exist to use ReplaceFile, +// but the parent directory must exist. +// Note ReplaceFile calls fsync. +func ReplaceFile(fs utilfs.Filesystem, path string, data []byte) error { + // write data to a temporary file + tmpPath, err := WriteTmpFile(fs, path, data) + if err != nil { + return err + } + // rename over existing file + return fs.Rename(tmpPath, path) +} + +// DirExists returns true if a directory exists at `path`, false if `path` does not exist, otherwise an error +func DirExists(fs utilfs.Filesystem, path string) (bool, error) { + if info, err := fs.Stat(path); err == nil { + if info.IsDir() { + return true, nil + } + return false, fmt.Errorf("expected dir at %q, but mode is %q", path, info.Mode().String()) + } else if os.IsNotExist(err) { + return false, nil + } else { + return false, err + } +} + +// EnsureDir ensures that a directory exists at `path`, and if it must create the directory any +// necessary parent directories will also be created and the new directory will be empty. +func EnsureDir(fs utilfs.Filesystem, path string) error { + // if dir exists, don't change it, but do report any unexpected errors + if ok, err := DirExists(fs, path); ok || err != nil { + return err + } // Assert: dir does not exist + + // create the dir + return fs.MkdirAll(path, defaultPerm) +} + +// WriteTempDir creates a temporary dir at `path`, writes `files` into it, and fsyncs all the files +// The keys of `files` represent file names. These names must not: +// - be empty +// - be a path that contains more than the base name of a file (e.g. foo/bar is invalid, as is /bar) +// - match `.` or `..` exactly +// - be longer than 255 characters +// The above validation rules are based on atomic_writer.go, though in this case are more restrictive +// because we only allow a flat hierarchy. +func WriteTempDir(fs utilfs.Filesystem, path string, files map[string]string) (tmpPath string, retErr error) { + // validate the filename keys; for now we only allow a flat keyset + for name := range files { + // invalidate empty names + if name == "" { + return "", fmt.Errorf("invalid file key: must not be empty: %q", name) + } + // invalidate: foo/bar and /bar + if name != filepath.Base(name) { + return "", fmt.Errorf("invalid file key %q, only base names are allowed", name) + } + // invalidate `.` and `..` + if name == "." || name == ".." { + return "", fmt.Errorf("invalid file key, may not be '.' or '..'") + } + // invalidate length > 255 characters + if len(name) > 255 { + return "", fmt.Errorf("invalid file key %q, must be less than 255 characters", name) + } + } + + // write the temp directory in parent dir and return path to the tmp directory + dir := filepath.Dir(path) + prefix := tmpTag + filepath.Base(path) + + // create the tmp dir + var err error + tmpPath, err = fs.TempDir(dir, prefix) + if err != nil { + return "", err + } + // be sure to clean up if there was an error + defer func() { + if retErr != nil { + if err := fs.RemoveAll(tmpPath); err != nil { + retErr = fmt.Errorf("attempted to remove temporary directory %q after error %v, but failed due to error: %v", tmpPath, retErr, err) + } + } + }() + // write data + for name, data := range files { + // create the file + file, err := fs.Create(filepath.Join(tmpPath, name)) + if err != nil { + return tmpPath, err + } + // be sure to close the file when we're done + defer func() { + // close the file when we're done, don't overwrite primary retErr if close fails + if err := file.Close(); retErr == nil { + retErr = err + } + }() + // write the file + if _, err := file.Write([]byte(data)); err != nil { + return tmpPath, err + } + // sync the file, to ensure it's written in case a hard reset happens + if err := file.Sync(); err != nil { + return tmpPath, err + } + } + return tmpPath, nil +} + +// ReplaceDir replaces the contents of the dir at `path` with `files` by writing to a tmp dir in the same +// dir as `path` and renaming the tmp dir over `path`. The dir does not have to exist to use ReplaceDir. +func ReplaceDir(fs utilfs.Filesystem, path string, files map[string]string) error { + // write data to a temporary directory + tmpPath, err := WriteTempDir(fs, path, files) + if err != nil { + return err + } + // rename over target directory + return fs.Rename(tmpPath, path) +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/panic/panic.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/panic/panic.go new file mode 100644 index 000000000000..f1916ebf731e --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/panic/panic.go @@ -0,0 +1,36 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package panic + +import utilruntime "k8s.io/apimachinery/pkg/util/runtime" + +// HandlePanic returns a function that wraps `fn` with the utilruntime.PanicHandlers, and continues +// to bubble the panic after the PanicHandlers are called +func HandlePanic(fn func()) func() { + return func() { + defer func() { + if r := recover(); r != nil { + for _, fn := range utilruntime.PanicHandlers { + fn(r) + } + panic(r) + } + }() + // call the function + fn() + } +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/watch.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/watch.go new file mode 100644 index 000000000000..229d23e10151 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kubeletconfig/watch.go @@ -0,0 +1,140 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kubeletconfig + +import ( + "k8s.io/klog/v2" + "math/rand" + "time" + + apiv1 "k8s.io/api/core/v1" + apiequality "k8s.io/apimachinery/pkg/api/equality" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" + clientset "k8s.io/client-go/kubernetes" + "k8s.io/client-go/tools/cache" +) + +// newSharedNodeInformer returns a shared informer that uses `client` to watch the Node with +// `nodeName` for changes and respond with `addFunc`, `updateFunc`, and `deleteFunc`. +func newSharedNodeInformer(client clientset.Interface, nodeName string, + addFunc func(newObj interface{}), + updateFunc func(oldObj interface{}, newObj interface{}), + deleteFunc func(deletedObj interface{})) cache.SharedInformer { + // select nodes by name + fieldSelector := fields.OneTermEqualSelector("metadata.name", nodeName) + + // add some randomness to resync period, which can help avoid controllers falling into lock-step + minResyncPeriod := 15 * time.Minute + factor := rand.Float64() + 1 + resyncPeriod := time.Duration(float64(minResyncPeriod.Nanoseconds()) * factor) + + lw := cache.NewListWatchFromClient(client.CoreV1().RESTClient(), "nodes", metav1.NamespaceAll, fieldSelector) + + handler := cache.ResourceEventHandlerFuncs{ + AddFunc: addFunc, + UpdateFunc: updateFunc, + DeleteFunc: deleteFunc, + } + + informer := cache.NewSharedInformer(lw, &apiv1.Node{}, resyncPeriod) + informer.AddEventHandler(handler) + + return informer +} + +// onAddNodeEvent calls onUpdateNodeEvent with the new object and a nil old object +func (cc *Controller) onAddNodeEvent(newObj interface{}) { + cc.onUpdateNodeEvent(nil, newObj) +} + +// onUpdateNodeEvent checks whether the configSource changed between oldObj and newObj, and pokes the +// configuration sync worker if there was a change +func (cc *Controller) onUpdateNodeEvent(oldObj interface{}, newObj interface{}) { + newNode, ok := newObj.(*apiv1.Node) + if !ok { + klog.ErrorS(nil, "Kubelet config controller failed to cast new object to Node, couldn't handle event") + return + } + if oldObj == nil { + // Node was just added, need to sync + klog.InfoS("Kubelet config controller initial Node watch event") + cc.pokeConfigSourceWorker() + return + } + oldNode, ok := oldObj.(*apiv1.Node) + if !ok { + klog.ErrorS(nil, "Kubelet config controller failed to cast old object to Node, couldn't handle event") + return + } + if !apiequality.Semantic.DeepEqual(oldNode.Spec.ConfigSource, newNode.Spec.ConfigSource) { + klog.InfoS("Kubelet config controller Node.Spec.ConfigSource was updated") + cc.pokeConfigSourceWorker() + } +} + +// onDeleteNodeEvent logs a message if the Node was deleted +// We allow the sync-loop to continue, because it is possible that the Kubelet detected +// a Node with unexpected externalID and is attempting to delete and re-create the Node +// (see pkg/kubelet/kubelet_node_status.go), or that someone accidentally deleted the Node +// (the Kubelet will re-create it). +func (cc *Controller) onDeleteNodeEvent(deletedObj interface{}) { + // For this case, we just log the event. + // We don't want to poke the worker, because a temporary deletion isn't worth reporting an error for. + // If the Node is deleted because the VM is being deleted, then the Kubelet has nothing to do. + klog.InfoS("Kubelet config controller Node was deleted") +} + +// onAddRemoteConfigSourceEvent calls onUpdateConfigMapEvent with the new object and a nil old object +func (cc *Controller) onAddRemoteConfigSourceEvent(newObj interface{}) { + cc.onUpdateRemoteConfigSourceEvent(nil, newObj) +} + +// onUpdateRemoteConfigSourceEvent checks whether the configSource changed between oldObj and newObj, +// and pokes the sync worker if there was a change +func (cc *Controller) onUpdateRemoteConfigSourceEvent(oldObj interface{}, newObj interface{}) { + // since ConfigMap is currently the only source type, we handle that here + newConfigMap, ok := newObj.(*apiv1.ConfigMap) + if !ok { + klog.ErrorS(nil, "Kubelet config controller failed to cast new object to ConfigMap, couldn't handle event") + return + } + if oldObj == nil { + // ConfigMap was just added, need to sync + klog.InfoS("Kubelet config controller initial ConfigMap watch event") + cc.pokeConfigSourceWorker() + return + } + oldConfigMap, ok := oldObj.(*apiv1.ConfigMap) + if !ok { + klog.ErrorS(nil, "Kubelet config controller failed to cast old object to ConfigMap, couldn't handle event") + return + } + if !apiequality.Semantic.DeepEqual(oldConfigMap, newConfigMap) { + klog.InfoS("Kubelet config controller assigned ConfigMap was updated") + cc.pokeConfigSourceWorker() + } +} + +// onDeleteRemoteConfigSourceEvent logs a message if the ConfigMap was deleted and pokes the sync worker +func (cc *Controller) onDeleteRemoteConfigSourceEvent(deletedObj interface{}) { + // If the ConfigMap we're watching is deleted, we log the event and poke the sync worker. + // This requires a sync, because if the Node is still configured to use the deleted ConfigMap, + // the Kubelet should report a DownloadError. + klog.InfoS("Kubelet config controller assigned ConfigMap was deleted") + cc.pokeConfigSourceWorker() +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/helpers.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/helpers.go index de289836a8bf..fa580335cf84 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/helpers.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/helpers.go @@ -120,11 +120,10 @@ func (m *kubeGenericRuntimeManager) sandboxToKubeContainer(s *runtimeapi.PodSand // getImageUser gets uid or user name that will run the command(s) from image. The function // guarantees that only one of them is set. func (m *kubeGenericRuntimeManager) getImageUser(image string) (*int64, string, error) { - resp, err := m.imageService.ImageStatus(&runtimeapi.ImageSpec{Image: image}, false) + imageStatus, err := m.imageService.ImageStatus(&runtimeapi.ImageSpec{Image: image}) if err != nil { return nil, "", err } - imageStatus := resp.GetImage() if imageStatus != nil { if imageStatus.Uid != nil { diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/helpers_linux.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/helpers_linux.go index 3f83ff86e4ab..2a476a526599 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/helpers_linux.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/helpers_linux.go @@ -20,6 +20,9 @@ limitations under the License. package kuberuntime const ( + // Taken from lmctfy https://github.com/google/lmctfy/blob/master/lmctfy/controllers/cpu_controller.cc + minShares = 2 + sharesPerCPU = 1024 milliCPUToCPU = 1000 // 100000 is equivalent to 100ms @@ -27,6 +30,20 @@ const ( minQuotaPeriod = 1000 ) +// milliCPUToShares converts milliCPU to CPU shares +func milliCPUToShares(milliCPU int64) int64 { + if milliCPU == 0 { + // Return 2 here to really match kernel default for zero milliCPU. + return minShares + } + // Conceptually (milliCPU / milliCPUToCPU) * sharesPerCPU, but factored to improve rounding. + shares := (milliCPU * sharesPerCPU) / milliCPUToCPU + if shares < minShares { + return minShares + } + return shares +} + // milliCPUToQuota converts milliCPU to CFS quota and period values func milliCPUToQuota(milliCPU int64, period int64) (quota int64) { // CFS quota is measured in two values: diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/helpers_unsupported.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/helpers_unsupported.go index 95693fadda9c..1f5c8093a1b1 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/helpers_unsupported.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/helpers_unsupported.go @@ -18,3 +18,8 @@ limitations under the License. */ package kuberuntime + +// milliCPUToShares converts milliCPU to CPU shares +func milliCPUToShares(milliCPU int64) int64 { + return 0 +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/instrumented_services.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/instrumented_services.go index eb6ba384b546..45fe5ba34764 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/instrumented_services.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/instrumented_services.go @@ -68,11 +68,11 @@ func (in instrumentedRuntimeService) Version(apiVersion string) (*runtimeapi.Ver return out, err } -func (in instrumentedRuntimeService) Status(verbose bool) (*runtimeapi.StatusResponse, error) { +func (in instrumentedRuntimeService) Status() (*runtimeapi.RuntimeStatus, error) { const operation = "status" defer recordOperation(operation, time.Now()) - out, err := in.service.Status(verbose) + out, err := in.service.Status() recordError(operation, err) return out, err } @@ -122,11 +122,11 @@ func (in instrumentedRuntimeService) ListContainers(filter *runtimeapi.Container return out, err } -func (in instrumentedRuntimeService) ContainerStatus(containerID string, verbose bool) (*runtimeapi.ContainerStatusResponse, error) { +func (in instrumentedRuntimeService) ContainerStatus(containerID string) (*runtimeapi.ContainerStatus, error) { const operation = "container_status" defer recordOperation(operation, time.Now()) - out, err := in.service.ContainerStatus(containerID, verbose) + out, err := in.service.ContainerStatus(containerID) recordError(operation, err) return out, err } @@ -208,11 +208,11 @@ func (in instrumentedRuntimeService) RemovePodSandbox(podSandboxID string) error return err } -func (in instrumentedRuntimeService) PodSandboxStatus(podSandboxID string, verbose bool) (*runtimeapi.PodSandboxStatusResponse, error) { +func (in instrumentedRuntimeService) PodSandboxStatus(podSandboxID string) (*runtimeapi.PodSandboxStatus, error) { const operation = "podsandbox_status" defer recordOperation(operation, time.Now()) - out, err := in.service.PodSandboxStatus(podSandboxID, verbose) + out, err := in.service.PodSandboxStatus(podSandboxID) recordError(operation, err) return out, err } @@ -289,11 +289,11 @@ func (in instrumentedImageManagerService) ListImages(filter *runtimeapi.ImageFil return out, err } -func (in instrumentedImageManagerService) ImageStatus(image *runtimeapi.ImageSpec, verbose bool) (*runtimeapi.ImageStatusResponse, error) { +func (in instrumentedImageManagerService) ImageStatus(image *runtimeapi.ImageSpec) (*runtimeapi.Image, error) { const operation = "image_status" defer recordOperation(operation, time.Now()) - out, err := in.service.ImageStatus(image, verbose) + out, err := in.service.ImageStatus(image) recordError(operation, err) return out, err } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_container.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_container.go index 680eab7a56e9..34337e04b118 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_container.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_container.go @@ -34,9 +34,6 @@ import ( "sync" "time" - crierror "k8s.io/cri-api/pkg/errors" - - "github.com/opencontainers/selinux/go-selinux" grpcstatus "google.golang.org/grpc/status" "github.com/armon/circbuf" @@ -51,10 +48,10 @@ import ( runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" "k8s.io/kubernetes/pkg/features" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" - "k8s.io/kubernetes/pkg/kubelet/cri/remote" "k8s.io/kubernetes/pkg/kubelet/events" "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/kubelet/util/format" + "k8s.io/kubernetes/pkg/util/selinux" "k8s.io/kubernetes/pkg/util/tail" volumeutil "k8s.io/kubernetes/pkg/volume/util" ) @@ -381,7 +378,7 @@ func (m *kubeGenericRuntimeManager) makeMounts(opts *kubecontainer.RunContainerO for idx := range opts.Mounts { v := opts.Mounts[idx] - selinuxRelabel := v.SELinuxRelabel && selinux.GetEnabled() + selinuxRelabel := v.SELinuxRelabel && selinux.SELinuxEnabled() mount := &runtimeapi.Mount{ HostPath: v.HostPath, ContainerPath: v.ContainerPath, @@ -396,7 +393,9 @@ func (m *kubeGenericRuntimeManager) makeMounts(opts *kubecontainer.RunContainerO // The reason we create and mount the log file in here (not in kubelet) is because // the file's location depends on the ID of the container, and we need to create and // mount the file before actually starting the container. - if opts.PodContainerDir != "" && len(container.TerminationMessagePath) != 0 { + // we can only mount individual files (e.g.: /etc/hosts, termination-log files) on Windows only if we're using Containerd. + supportsSingleFileMapping := m.SupportsSingleFileMapping() + if opts.PodContainerDir != "" && len(container.TerminationMessagePath) != 0 && supportsSingleFileMapping { // Because the PodContainerDir contains pod uid and container name which is unique enough, // here we just add a random id to make the path unique for different instances // of the same container. @@ -419,7 +418,7 @@ func (m *kubeGenericRuntimeManager) makeMounts(opts *kubecontainer.RunContainerO // Volume Mounts fail on Windows if it is not of the form C:/ containerLogPath = volumeutil.MakeAbsolutePath(goruntime.GOOS, containerLogPath) terminationMessagePath := volumeutil.MakeAbsolutePath(goruntime.GOOS, container.TerminationMessagePath) - selinuxRelabel := selinux.GetEnabled() + selinuxRelabel := selinux.SELinuxEnabled() volumeMounts = append(volumeMounts, &runtimeapi.Mount{ HostPath: containerLogPath, ContainerPath: terminationMessagePath, @@ -503,26 +502,15 @@ func (m *kubeGenericRuntimeManager) getPodContainerStatuses(uid kubetypes.UID, n return nil, err } - statuses := []*kubecontainer.Status{} + statuses := make([]*kubecontainer.Status, len(containers)) // TODO: optimization: set maximum number of containers per container name to examine. - for _, c := range containers { - resp, err := m.runtimeService.ContainerStatus(c.Id, false) - // Between List (ListContainers) and check (ContainerStatus) another thread might remove a container, and that is normal. - // The previous call (ListContainers) never fails due to a pod container not existing. - // Therefore, this method should not either, but instead act as if the previous call failed, - // which means the error should be ignored. - if crierror.IsNotFound(err) { - continue - } + for i, c := range containers { + status, err := m.runtimeService.ContainerStatus(c.Id) if err != nil { // Merely log this here; GetPodStatus will actually report the error out. klog.V(4).InfoS("ContainerStatus return error", "containerID", c.Id, "err", err) return nil, err } - status := resp.GetStatus() - if status == nil { - return nil, remote.ErrContainerStatusNil - } cStatus := toKubeContainerStatus(status, m.runtimeName) if status.State == runtimeapi.ContainerState_CONTAINER_EXITED { // Populate the termination message if needed. @@ -532,7 +520,15 @@ func (m *kubeGenericRuntimeManager) getPodContainerStatuses(uid kubetypes.UID, n cStatus.ExitCode != 0 && cStatus.Reason != "ContainerCannotRun" tMessage, checkLogs := getTerminationMessage(status, annotatedInfo.TerminationMessagePath, fallbackToLogs) if checkLogs { - tMessage = m.readLastStringFromContainerLogs(status.GetLogPath()) + // if dockerLegacyService is populated, we're supposed to use it to fetch logs + if m.legacyLogProvider != nil { + tMessage, err = m.legacyLogProvider.GetContainerLogTail(uid, name, namespace, kubecontainer.ContainerID{Type: m.runtimeName, ID: c.Id}) + if err != nil { + tMessage = fmt.Sprintf("Error reading termination message from logs: %v", err) + } + } else { + tMessage = m.readLastStringFromContainerLogs(status.GetLogPath()) + } } // Enrich the termination message written by the application is not empty if len(tMessage) != 0 { @@ -542,7 +538,7 @@ func (m *kubeGenericRuntimeManager) getPodContainerStatuses(uid kubetypes.UID, n cStatus.Message += tMessage } } - statuses = append(statuses, cStatus) + statuses[i] = cStatus } sort.Sort(containerStatusByCreated(statuses)) @@ -619,14 +615,10 @@ func (m *kubeGenericRuntimeManager) executePreStopHook(pod *v1.Pod, containerID func (m *kubeGenericRuntimeManager) restoreSpecsFromContainerLabels(containerID kubecontainer.ContainerID) (*v1.Pod, *v1.Container, error) { var pod *v1.Pod var container *v1.Container - resp, err := m.runtimeService.ContainerStatus(containerID.ID, false) + s, err := m.runtimeService.ContainerStatus(containerID.ID) if err != nil { return nil, nil, err } - s := resp.GetStatus() - if s == nil { - return nil, nil, remote.ErrContainerStatusNil - } l := getContainerInfoFromLabels(s.Labels) a := getContainerInfoFromAnnotations(s.Annotations) @@ -723,15 +715,15 @@ func (m *kubeGenericRuntimeManager) killContainer(pod *v1.Pod, containerID kubec "containerName", containerName, "containerID", containerID.String(), "gracePeriod", gracePeriod) err := m.runtimeService.StopContainer(containerID.ID, gracePeriod) - if err != nil && !crierror.IsNotFound(err) { + if err != nil { klog.ErrorS(err, "Container termination failed with gracePeriod", "pod", klog.KObj(pod), "podUID", pod.UID, "containerName", containerName, "containerID", containerID.String(), "gracePeriod", gracePeriod) - return err + } else { + klog.V(3).InfoS("Container exited normally", "pod", klog.KObj(pod), "podUID", pod.UID, + "containerName", containerName, "containerID", containerID.String()) } - klog.V(3).InfoS("Container exited normally", "pod", klog.KObj(pod), "podUID", pod.UID, - "containerName", containerName, "containerID", containerID.String()) - return nil + return err } // killContainersWithSyncResult kills all pod's containers with sync results. @@ -885,15 +877,11 @@ func findNextInitContainerToRun(pod *v1.Pod, podStatus *kubecontainer.PodStatus) // GetContainerLogs returns logs of a specific container. func (m *kubeGenericRuntimeManager) GetContainerLogs(ctx context.Context, pod *v1.Pod, containerID kubecontainer.ContainerID, logOptions *v1.PodLogOptions, stdout, stderr io.Writer) (err error) { - resp, err := m.runtimeService.ContainerStatus(containerID.ID, false) + status, err := m.runtimeService.ContainerStatus(containerID.ID) if err != nil { klog.V(4).InfoS("Failed to get container status", "containerID", containerID.String(), "err", err) return fmt.Errorf("unable to retrieve container logs for %v", containerID.String()) } - status := resp.GetStatus() - if status == nil { - return remote.ErrContainerStatusNil - } return m.ReadLogs(ctx, status.GetLogPath(), containerID.ID, logOptions, stdout, stderr) } @@ -970,14 +958,10 @@ func (m *kubeGenericRuntimeManager) removeContainerLog(containerID string) error return err } - resp, err := m.runtimeService.ContainerStatus(containerID, false) + status, err := m.runtimeService.ContainerStatus(containerID) if err != nil { return fmt.Errorf("failed to get container status %q: %v", containerID, err) } - status := resp.GetStatus() - if status == nil { - return remote.ErrContainerStatusNil - } // Remove the legacy container log symlink. // TODO(random-liu): Remove this after cluster logging supports CRI container log path. labeledInfo := getContainerInfoFromLabels(status.Labels) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_container_linux.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_container_linux.go index 25917803b1ce..6cb9e54729e9 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_container_linux.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_container_linux.go @@ -24,6 +24,7 @@ import ( "time" libcontainercgroups "github.com/opencontainers/runc/libcontainer/cgroups" + cgroupfs "github.com/opencontainers/runc/libcontainer/cgroups/fs" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" utilfeature "k8s.io/apiserver/pkg/util/feature" @@ -138,11 +139,11 @@ func (m *kubeGenericRuntimeManager) calculateLinuxResources(cpuRequest, cpuLimit // API server does this for new containers, but we repeat this logic in Kubelet // for containers running on existing Kubernetes clusters. if cpuRequest.IsZero() && !cpuLimit.IsZero() { - cpuShares = int64(cm.MilliCPUToShares(cpuLimit.MilliValue())) + cpuShares = milliCPUToShares(cpuLimit.MilliValue()) } else { - // if cpuRequest.Amount is nil, then MilliCPUToShares will return the minimal number + // if cpuRequest.Amount is nil, then milliCPUToShares will return the minimal number // of CPU shares. - cpuShares = int64(cm.MilliCPUToShares(cpuRequest.MilliValue())) + cpuShares = milliCPUToShares(cpuRequest.MilliValue()) } resources.CpuShares = cpuShares if memLimit != 0 { @@ -169,7 +170,7 @@ func GetHugepageLimitsFromResources(resources v1.ResourceRequirements) []*runtim var hugepageLimits []*runtimeapi.HugepageLimit // For each page size, limit to 0. - for _, pageSize := range libcontainercgroups.HugePageSizes() { + for _, pageSize := range cgroupfs.HugePageSizes { hugepageLimits = append(hugepageLimits, &runtimeapi.HugepageLimit{ PageSize: pageSize, Limit: uint64(0), diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_gc.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_gc.go index a72691bfcfcb..610026661b7c 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_gc.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_gc.go @@ -354,32 +354,25 @@ func (cgc *containerGC) evictPodLogsDirectories(allSourcesReady bool) error { for _, logSymlink := range logSymlinks { if _, err := osInterface.Stat(logSymlink); os.IsNotExist(err) { if containerID, err := getContainerIDFromLegacyLogSymlink(logSymlink); err == nil { - resp, err := cgc.manager.runtimeService.ContainerStatus(containerID, false) + status, err := cgc.manager.runtimeService.ContainerStatus(containerID) if err != nil { // TODO: we should handle container not found (i.e. container was deleted) case differently // once https://github.com/kubernetes/kubernetes/issues/63336 is resolved klog.InfoS("Error getting ContainerStatus for containerID", "containerID", containerID, "err", err) - } else { - status := resp.GetStatus() - if status == nil { - klog.V(4).InfoS("Container status is nil") - continue - } - if status.State != runtimeapi.ContainerState_CONTAINER_EXITED { - // Here is how container log rotation works (see containerLogManager#rotateLatestLog): - // - // 1. rename current log to rotated log file whose filename contains current timestamp (fmt.Sprintf("%s.%s", log, timestamp)) - // 2. reopen the container log - // 3. if #2 fails, rename rotated log file back to container log - // - // There is small but indeterministic amount of time during which log file doesn't exist (between steps #1 and #2, between #1 and #3). - // Hence the symlink may be deemed unhealthy during that period. - // See https://github.com/kubernetes/kubernetes/issues/52172 - // - // We only remove unhealthy symlink for dead containers - klog.V(5).InfoS("Container is still running, not removing symlink", "containerID", containerID, "path", logSymlink) - continue - } + } else if status.State != runtimeapi.ContainerState_CONTAINER_EXITED { + // Here is how container log rotation works (see containerLogManager#rotateLatestLog): + // + // 1. rename current log to rotated log file whose filename contains current timestamp (fmt.Sprintf("%s.%s", log, timestamp)) + // 2. reopen the container log + // 3. if #2 fails, rename rotated log file back to container log + // + // There is small but indeterministic amount of time during which log file doesn't exist (between steps #1 and #2, between #1 and #3). + // Hence the symlink may be deemed unhealthy during that period. + // See https://github.com/kubernetes/kubernetes/issues/52172 + // + // We only remove unhealthy symlink for dead containers + klog.V(5).InfoS("Container is still running, not removing symlink", "containerID", containerID, "path", logSymlink) + continue } } else { klog.V(4).InfoS("Unable to obtain container ID", "err", err) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_image.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_image.go index a52cbaa1a366..039f86d651f3 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_image.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_image.go @@ -81,15 +81,15 @@ func (m *kubeGenericRuntimeManager) PullImage(image kubecontainer.ImageSpec, pul // GetImageRef gets the ID of the image which has already been in // the local storage. It returns ("", nil) if the image isn't in the local storage. func (m *kubeGenericRuntimeManager) GetImageRef(image kubecontainer.ImageSpec) (string, error) { - resp, err := m.imageService.ImageStatus(toRuntimeAPIImageSpec(image), false) + status, err := m.imageService.ImageStatus(toRuntimeAPIImageSpec(image)) if err != nil { klog.ErrorS(err, "Failed to get image status", "image", image.Image) return "", err } - if resp.Image == nil { + if status == nil { return "", nil } - return resp.Image.Id, nil + return status.Id, nil } // ListImages gets all images currently on the machine. diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_manager.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_manager.go index 49cad688cb24..7f4f82aacb66 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_manager.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_manager.go @@ -21,10 +21,10 @@ import ( "fmt" "os" "path/filepath" + goruntime "runtime" "time" cadvisorapi "github.com/google/cadvisor/info/v1" - crierror "k8s.io/cri-api/pkg/errors" "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" @@ -133,6 +133,9 @@ type kubeGenericRuntimeManager struct { // Internal lifecycle event handlers for container resource management. internalLifecycle cm.InternalContainerLifecycle + // A shim to legacy functions for backward compatibility. + legacyLogProvider LegacyLogProvider + // Manage container logs. logManager logs.ContainerLogManager @@ -165,6 +168,12 @@ type KubeGenericRuntime interface { kubecontainer.CommandRunner } +// LegacyLogProvider gives the ability to use unsupported docker log drivers (e.g. journald) +type LegacyLogProvider interface { + // GetContainerLogTail gets the last few lines of the logs for a specific container. + GetContainerLogTail(uid kubetypes.UID, name, namespace string, containerID kubecontainer.ContainerID) (string, error) +} + // NewKubeGenericRuntimeManager creates a new kubeGenericRuntimeManager func NewKubeGenericRuntimeManager( recorder record.EventRecorder, @@ -188,6 +197,7 @@ func NewKubeGenericRuntimeManager( runtimeService internalapi.RuntimeService, imageService internalapi.ImageManagerService, internalLifecycle cm.InternalContainerLifecycle, + legacyLogProvider LegacyLogProvider, logManager logs.ContainerLogManager, runtimeClassManager *runtimeclass.Manager, seccompDefault bool, @@ -195,8 +205,6 @@ func NewKubeGenericRuntimeManager( getNodeAllocatable func() v1.ResourceList, memoryThrottlingFactor float64, ) (KubeGenericRuntime, error) { - runtimeService = newInstrumentedRuntimeService(runtimeService) - imageService = newInstrumentedImageManagerService(imageService) kubeRuntimeManager := &kubeGenericRuntimeManager{ recorder: recorder, cpuCFSQuota: cpuCFSQuota, @@ -208,9 +216,10 @@ func NewKubeGenericRuntimeManager( machineInfo: machineInfo, osInterface: osInterface, runtimeHelper: runtimeHelper, - runtimeService: runtimeService, - imageService: imageService, + runtimeService: newInstrumentedRuntimeService(runtimeService), + imageService: newInstrumentedImageManagerService(imageService), internalLifecycle: internalLifecycle, + legacyLogProvider: legacyLogProvider, logManager: logManager, runtimeClassManager: runtimeClassManager, logReduction: logreduction.NewLogReduction(identicalErrorDelay), @@ -289,6 +298,17 @@ func (m *kubeGenericRuntimeManager) Type() string { return m.runtimeName } +// SupportsSingleFileMapping returns whether the container runtime supports single file mappings or not. +// It is supported on Windows only if the container runtime is containerd. +func (m *kubeGenericRuntimeManager) SupportsSingleFileMapping() bool { + switch goruntime.GOOS { + case "windows": + return m.Type() != types.DockerContainerRuntime + default: + return true + } +} + func newRuntimeVersion(version string) (*utilversion.Version, error) { if ver, err := utilversion.ParseSemantic(version); err == nil { return ver, err @@ -330,14 +350,11 @@ func (m *kubeGenericRuntimeManager) APIVersion() (kubecontainer.Version, error) // Status returns the status of the runtime. An error is returned if the Status // function itself fails, nil otherwise. func (m *kubeGenericRuntimeManager) Status() (*kubecontainer.RuntimeStatus, error) { - resp, err := m.runtimeService.Status(false) + status, err := m.runtimeService.Status() if err != nil { return nil, err } - if resp.GetStatus() == nil { - return nil, errors.New("runtime status is nil") - } - return toKubeRuntimeStatus(resp.GetStatus()), nil + return toKubeRuntimeStatus(status), nil } // GetPods returns a list of containers grouped by pods. The boolean parameter @@ -822,7 +839,7 @@ func (m *kubeGenericRuntimeManager) SyncPod(pod *v1.Pod, podStatus *kubecontaine } klog.V(4).InfoS("Created PodSandbox for pod", "podSandboxID", podSandboxID, "pod", klog.KObj(pod)) - resp, err := m.runtimeService.PodSandboxStatus(podSandboxID, false) + podSandboxStatus, err := m.runtimeService.PodSandboxStatus(podSandboxID) if err != nil { ref, referr := ref.GetReference(legacyscheme.Scheme, pod) if referr != nil { @@ -833,16 +850,12 @@ func (m *kubeGenericRuntimeManager) SyncPod(pod *v1.Pod, podStatus *kubecontaine result.Fail(err) return } - if resp.GetStatus() == nil { - result.Fail(errors.New("pod sandbox status is nil")) - return - } // If we ever allow updating a pod from non-host-network to // host-network, we may use a stale IP. if !kubecontainer.IsHostNetworkPod(pod) { // Overwrite the podIPs passed in the pod status, since we just started the pod sandbox. - podIPs = m.determinePodSandboxIPs(pod.Namespace, pod.Name, resp.GetStatus()) + podIPs = m.determinePodSandboxIPs(pod.Namespace, pod.Name, podSandboxStatus) klog.V(4).InfoS("Determined the ip for pod after sandbox changed", "IPs", podIPs, "pod", klog.KObj(pod)) } } @@ -994,7 +1007,7 @@ func (m *kubeGenericRuntimeManager) killPodWithSyncResult(pod *v1.Pod, runningPo result.AddSyncResult(killSandboxResult) // Stop all sandboxes belongs to same pod for _, podSandbox := range runningPod.Sandboxes { - if err := m.runtimeService.StopPodSandbox(podSandbox.ID.ID); err != nil && !crierror.IsNotFound(err) { + if err := m.runtimeService.StopPodSandbox(podSandbox.ID.ID); err != nil { killSandboxResult.Fail(kubecontainer.ErrKillPodSandbox, err.Error()) klog.ErrorS(nil, "Failed to stop sandbox", "podSandboxID", podSandbox.ID) } @@ -1036,29 +1049,19 @@ func (m *kubeGenericRuntimeManager) GetPodStatus(uid kubetypes.UID, name, namesp klog.V(4).InfoS("getSandboxIDByPodUID got sandbox IDs for pod", "podSandboxID", podSandboxIDs, "pod", klog.KObj(pod)) - sandboxStatuses := []*runtimeapi.PodSandboxStatus{} + sandboxStatuses := make([]*runtimeapi.PodSandboxStatus, len(podSandboxIDs)) podIPs := []string{} for idx, podSandboxID := range podSandboxIDs { - resp, err := m.runtimeService.PodSandboxStatus(podSandboxID, false) - // Between List (getSandboxIDByPodUID) and check (PodSandboxStatus) another thread might remove a container, and that is normal. - // The previous call (getSandboxIDByPodUID) never fails due to a pod sandbox not existing. - // Therefore, this method should not either, but instead act as if the previous call failed, - // which means the error should be ignored. - if crierror.IsNotFound(err) { - continue - } + podSandboxStatus, err := m.runtimeService.PodSandboxStatus(podSandboxID) if err != nil { klog.ErrorS(err, "PodSandboxStatus of sandbox for pod", "podSandboxID", podSandboxID, "pod", klog.KObj(pod)) return nil, err } - if resp.GetStatus() == nil { - return nil, errors.New("pod sandbox status is nil") + sandboxStatuses[idx] = podSandboxStatus - } - sandboxStatuses = append(sandboxStatuses, resp.Status) // Only get pod IP from latest sandbox - if idx == 0 && resp.Status.State == runtimeapi.PodSandboxState_SANDBOX_READY { - podIPs = m.determinePodSandboxIPs(namespace, name, resp.Status) + if idx == 0 && podSandboxStatus.State == runtimeapi.PodSandboxState_SANDBOX_READY { + podIPs = m.determinePodSandboxIPs(namespace, name, podSandboxStatus) } } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_sandbox_linux.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_sandbox_linux.go index 646ee7f23cce..eb2e56ee90f4 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_sandbox_linux.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/kuberuntime_sandbox_linux.go @@ -21,13 +21,15 @@ package kuberuntime import ( v1 "k8s.io/api/core/v1" + utilfeature "k8s.io/apiserver/pkg/util/feature" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" resourcehelper "k8s.io/kubernetes/pkg/api/v1/resource" + "k8s.io/kubernetes/pkg/features" ) func (m *kubeGenericRuntimeManager) convertOverheadToLinuxResources(pod *v1.Pod) *runtimeapi.LinuxContainerResources { resources := &runtimeapi.LinuxContainerResources{} - if pod.Spec.Overhead != nil { + if pod.Spec.Overhead != nil && utilfeature.DefaultFeatureGate.Enabled(features.PodOverhead) { cpu := pod.Spec.Overhead.Cpu() memory := pod.Spec.Overhead.Memory() diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/logs/logs.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/logs/logs.go index 7a3dc51875cd..01f50ef1a883 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/logs/logs.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/kuberuntime/logs/logs.go @@ -35,7 +35,6 @@ import ( v1 "k8s.io/api/core/v1" internalapi "k8s.io/cri-api/pkg/apis" runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" - "k8s.io/kubernetes/pkg/kubelet/cri/remote" "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/util/tail" ) @@ -413,17 +412,13 @@ func ReadLogs(ctx context.Context, path, containerID string, opts *LogOptions, r } func isContainerRunning(id string, r internalapi.RuntimeService) (bool, error) { - resp, err := r.ContainerStatus(id, false) + s, err := r.ContainerStatus(id) if err != nil { return false, err } - status := resp.GetStatus() - if status == nil { - return false, remote.ErrContainerStatusNil - } // Only keep following container log when it is running. - if status.State != runtimeapi.ContainerState_CONTAINER_RUNNING { - klog.V(5).InfoS("Container is not running", "containerId", id, "state", status.State) + if s.State != runtimeapi.ContainerState_CONTAINER_RUNNING { + klog.V(5).InfoS("Container is not running", "containerId", id, "state", s.State) // Do not return error because it's normal that the container stops // during waiting. return false, nil diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/legacy/logs.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/legacy/logs.go new file mode 100644 index 000000000000..d4b938a05c7c --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/legacy/logs.go @@ -0,0 +1,53 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package legacy + +import ( + "context" + "io" + + "k8s.io/api/core/v1" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + "k8s.io/kubernetes/pkg/kubelet/kuberuntime" +) + +// DockerLegacyService interface is used throughout `pkg/kubelet`. +// It used to live in the `pkg/kubelet/dockershim` package. While we +// would eventually like to remove it entirely, we need to give users some form +// of warning. +// +// By including the interface in +// `pkg/kubelet/legacy/logs.go`, we ensure the interface is +// available to `pkg/kubelet`, even when we are building with the `dockerless` +// tag (i.e. not compiling the dockershim). +// While the interface always exists, there will be no implementations of the +// interface when building with the `dockerless` tag. The lack of +// implementations should not be an issue, as we only expect `pkg/kubelet` code +// to need an implementation of the `DockerLegacyService` when we are using +// docker. If we are using docker, but building with the `dockerless` tag, than +// this will be just one of many things that breaks. +type DockerLegacyService interface { + // GetContainerLogs gets logs for a specific container. + GetContainerLogs(context.Context, *v1.Pod, kubecontainer.ContainerID, *v1.PodLogOptions, io.Writer, io.Writer) error + + // IsCRISupportedLogDriver checks whether the logging driver used by docker is + // supported by native CRI integration. + // TODO(resouer): remove this when deprecating unsupported log driver + IsCRISupportedLogDriver() (bool, error) + + kuberuntime.LegacyLogProvider +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/lifecycle/handlers.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/lifecycle/handlers.go index 41a0533382cd..886a3409e0d1 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/lifecycle/handlers.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/lifecycle/handlers.go @@ -173,3 +173,142 @@ func (a *appArmorAdmitHandler) Admit(attrs *PodAdmitAttributes) PodAdmitResult { Message: fmt.Sprintf("Cannot enforce AppArmor: %v", err), } } + +// NewNoNewPrivsAdmitHandler returns a PodAdmitHandler which is used to evaluate +// if a pod can be admitted from the perspective of NoNewPrivs. +func NewNoNewPrivsAdmitHandler(runtime kubecontainer.Runtime) PodAdmitHandler { + return &noNewPrivsAdmitHandler{ + Runtime: runtime, + } +} + +type noNewPrivsAdmitHandler struct { + kubecontainer.Runtime +} + +func (a *noNewPrivsAdmitHandler) Admit(attrs *PodAdmitAttributes) PodAdmitResult { + // If the pod is already running or terminated, no need to recheck NoNewPrivs. + if attrs.Pod.Status.Phase != v1.PodPending { + return PodAdmitResult{Admit: true} + } + + // If the containers in a pod do not require no-new-privs, admit it. + if !noNewPrivsRequired(attrs.Pod) { + return PodAdmitResult{Admit: true} + } + + // Always admit runtimes except docker. + if a.Runtime.Type() != kubetypes.DockerContainerRuntime { + return PodAdmitResult{Admit: true} + } + + // Make sure docker api version is valid. + rversion, err := a.Runtime.APIVersion() + if err != nil { + return PodAdmitResult{ + Admit: false, + Reason: "NoNewPrivs", + Message: fmt.Sprintf("Cannot enforce NoNewPrivs: %v", err), + } + } + v, err := rversion.Compare("1.23.0") + if err != nil { + return PodAdmitResult{ + Admit: false, + Reason: "NoNewPrivs", + Message: fmt.Sprintf("Cannot enforce NoNewPrivs: %v", err), + } + } + // If the version is less than 1.23 it will return -1 above. + if v == -1 { + return PodAdmitResult{ + Admit: false, + Reason: "NoNewPrivs", + Message: fmt.Sprintf("Cannot enforce NoNewPrivs: docker runtime API version %q must be greater than or equal to 1.23", rversion.String()), + } + } + + return PodAdmitResult{Admit: true} +} + +func noNewPrivsRequired(pod *v1.Pod) bool { + // Iterate over pod containers and check if we added no-new-privs. + for _, c := range pod.Spec.Containers { + if c.SecurityContext != nil && c.SecurityContext.AllowPrivilegeEscalation != nil && !*c.SecurityContext.AllowPrivilegeEscalation { + return true + } + } + return false +} + +// NewProcMountAdmitHandler returns a PodAdmitHandler which is used to evaluate +// if a pod can be admitted from the perspective of ProcMount. +func NewProcMountAdmitHandler(runtime kubecontainer.Runtime) PodAdmitHandler { + return &procMountAdmitHandler{ + Runtime: runtime, + } +} + +type procMountAdmitHandler struct { + kubecontainer.Runtime +} + +func (a *procMountAdmitHandler) Admit(attrs *PodAdmitAttributes) PodAdmitResult { + // If the pod is already running or terminated, no need to recheck NoNewPrivs. + if attrs.Pod.Status.Phase != v1.PodPending { + return PodAdmitResult{Admit: true} + } + + // If the containers in a pod only need the default ProcMountType, admit it. + if procMountIsDefault(attrs.Pod) { + return PodAdmitResult{Admit: true} + } + + // Always admit runtimes except docker. + if a.Runtime.Type() != kubetypes.DockerContainerRuntime { + return PodAdmitResult{Admit: true} + } + + // Make sure docker api version is valid. + // Merged in https://github.com/moby/moby/pull/36644 + rversion, err := a.Runtime.APIVersion() + if err != nil { + return PodAdmitResult{ + Admit: false, + Reason: "ProcMount", + Message: fmt.Sprintf("Cannot enforce ProcMount: %v", err), + } + } + v, err := rversion.Compare("1.38.0") + if err != nil { + return PodAdmitResult{ + Admit: false, + Reason: "ProcMount", + Message: fmt.Sprintf("Cannot enforce ProcMount: %v", err), + } + } + // If the version is less than 1.38 it will return -1 above. + if v == -1 { + return PodAdmitResult{ + Admit: false, + Reason: "ProcMount", + Message: fmt.Sprintf("Cannot enforce ProcMount: docker runtime API version %q must be greater than or equal to 1.38", rversion.String()), + } + } + + return PodAdmitResult{Admit: true} +} + +func procMountIsDefault(pod *v1.Pod) bool { + // Iterate over pod containers and check if we are using the DefaultProcMountType + // for all containers. + for _, c := range pod.Spec.Containers { + if c.SecurityContext != nil { + if c.SecurityContext.ProcMount != nil && *c.SecurityContext.ProcMount != v1.DefaultProcMount { + return false + } + } + } + + return true +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/lifecycle/predicate.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/lifecycle/predicate.go index 2700b2d526ed..cee40ed59a3f 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/lifecycle/predicate.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/lifecycle/predicate.go @@ -21,13 +21,16 @@ import ( "runtime" v1 "k8s.io/api/core/v1" - "k8s.io/component-helpers/scheduling/corev1" + "k8s.io/apiserver/pkg/util/feature" + v1affinityhelper "k8s.io/component-helpers/scheduling/corev1/nodeaffinity" "k8s.io/klog/v2" v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" - "k8s.io/kubernetes/pkg/kubelet/types" - "k8s.io/kubernetes/pkg/scheduler" + "k8s.io/kubernetes/pkg/features" schedulerframework "k8s.io/kubernetes/pkg/scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework/plugins/tainttoleration" + "k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeaffinity" + "k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodename" + "k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeports" + "k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources" ) type getNodeAnyWayFuncType func() (*v1.Node, error) @@ -93,8 +96,17 @@ func (w *predicateAdmitHandler) Admit(attrs *PodAdmitAttributes) PodAdmitResult // the Resource Class API in the future. podWithoutMissingExtendedResources := removeMissingExtendedResources(admitPod, nodeInfo) - reasons := generalFilter(podWithoutMissingExtendedResources, nodeInfo) - fit := len(reasons) == 0 + reasons, err := GeneralPredicates(podWithoutMissingExtendedResources, nodeInfo) + fit := len(reasons) == 0 && err == nil + if err != nil { + message := fmt.Sprintf("GeneralPredicates failed due to %v, which is unexpected.", err) + klog.InfoS("Failed to admit pod, GeneralPredicates failed", "pod", klog.KObj(admitPod), "err", err) + return PodAdmitResult{ + Admit: fit, + Reason: "UnexpectedAdmissionError", + Message: message, + } + } if !fit { reasons, err = w.admissionFailureHandler.HandleAdmissionFailure(admitPod, reasons) fit = len(reasons) == 0 && err == nil @@ -257,33 +269,33 @@ func (e *PredicateFailureError) GetReason() string { return e.PredicateDesc } -// generalFilter checks a group of filterings that the kubelet cares about. -func generalFilter(pod *v1.Pod, nodeInfo *schedulerframework.NodeInfo) []PredicateFailureReason { - admissionResults := scheduler.AdmissionCheck(pod, nodeInfo, true) - var reasons []PredicateFailureReason - for _, r := range admissionResults { - if r.InsufficientResource != nil { - reasons = append(reasons, &InsufficientResourceError{ - ResourceName: r.InsufficientResource.ResourceName, - Requested: r.InsufficientResource.Requested, - Used: r.InsufficientResource.Used, - Capacity: r.InsufficientResource.Capacity, - }) - } else { - reasons = append(reasons, &PredicateFailureError{r.Name, r.Reason}) - } +// GeneralPredicates checks a group of predicates that the kubelet cares about. +func GeneralPredicates(pod *v1.Pod, nodeInfo *schedulerframework.NodeInfo) ([]PredicateFailureReason, error) { + if nodeInfo.Node() == nil { + return nil, fmt.Errorf("node not found") } - // Check taint/toleration except for static pods - if !types.IsStaticPod(pod) { - _, isUntolerated := corev1.FindMatchingUntoleratedTaint(nodeInfo.Node().Spec.Taints, pod.Spec.Tolerations, func(t *v1.Taint) bool { - // Kubelet is only interested in the NoExecute taint. - return t.Effect == v1.TaintEffectNoExecute + var reasons []PredicateFailureReason + for _, r := range noderesources.Fits(pod, nodeInfo, feature.DefaultFeatureGate.Enabled(features.PodOverhead)) { + reasons = append(reasons, &InsufficientResourceError{ + ResourceName: r.ResourceName, + Requested: r.Requested, + Used: r.Used, + Capacity: r.Capacity, }) - if isUntolerated { - reasons = append(reasons, &PredicateFailureError{tainttoleration.Name, tainttoleration.ErrReasonNotMatch}) - } } - return reasons + // Ignore parsing errors for backwards compatibility. + match, _ := v1affinityhelper.GetRequiredNodeAffinity(pod).Match(nodeInfo.Node()) + if !match { + reasons = append(reasons, &PredicateFailureError{nodeaffinity.Name, nodeaffinity.ErrReasonPod}) + } + if !nodename.Fits(pod, nodeInfo) { + reasons = append(reasons, &PredicateFailureError{nodename.Name, nodename.ErrReason}) + } + if !nodeports.Fits(pod, nodeInfo) { + reasons = append(reasons, &PredicateFailureError{nodeports.Name, nodeports.ErrReason}) + } + + return reasons, nil } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/logs/container_log_manager.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/logs/container_log_manager.go index 6d440737f3c0..0865426267df 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/logs/container_log_manager.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/logs/container_log_manager.go @@ -189,14 +189,11 @@ func (c *containerLogManager) Start() { func (c *containerLogManager) Clean(containerID string) error { c.mutex.Lock() defer c.mutex.Unlock() - resp, err := c.runtimeService.ContainerStatus(containerID, false) + status, err := c.runtimeService.ContainerStatus(containerID) if err != nil { return fmt.Errorf("failed to get container status %q: %v", containerID, err) } - if resp.GetStatus() == nil { - return fmt.Errorf("container status is nil for %q", containerID) - } - pattern := fmt.Sprintf("%s*", resp.GetStatus().GetLogPath()) + pattern := fmt.Sprintf("%s*", status.GetLogPath()) logs, err := c.osInterface.Glob(pattern) if err != nil { return fmt.Errorf("failed to list all log files with pattern %q: %v", pattern, err) @@ -228,16 +225,12 @@ func (c *containerLogManager) rotateLogs() error { } id := container.GetId() // Note that we should not block log rotate for an error of a single container. - resp, err := c.runtimeService.ContainerStatus(id, false) + status, err := c.runtimeService.ContainerStatus(id) if err != nil { klog.ErrorS(err, "Failed to get container status", "containerID", id) continue } - if resp.GetStatus() == nil { - klog.ErrorS(err, "Container status is nil", "containerID", id) - continue - } - path := resp.GetStatus().GetLogPath() + path := status.GetLogPath() info, err := c.osInterface.Stat(path) if err != nil { if !os.IsNotExist(err) { diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/OWNERS index 4971e7564611..aaf2a60392da 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/OWNERS @@ -1,3 +1,3 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - dashpole +- dashpole diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/collectors/volume_stats.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/collectors/volume_stats.go index b6bf1870c4cf..8ff14a0b2acd 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/collectors/volume_stats.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/collectors/volume_stats.go @@ -61,12 +61,6 @@ var ( []string{"namespace", "persistentvolumeclaim"}, nil, metrics.ALPHA, "", ) - - volumeStatsHealthAbnormalDesc = metrics.NewDesc( - metrics.BuildFQName("", kubeletmetrics.KubeletSubsystem, kubeletmetrics.VolumeStatsHealthStatusAbnormalKey), - "Abnormal volume health status. The count is either 1 or 0. 1 indicates the volume is unhealthy, 0 indicates volume is healthy", - []string{"namespace", "persistentvolumeclaim"}, nil, - metrics.ALPHA, "") ) type volumeStatsCollector struct { @@ -91,7 +85,6 @@ func (collector *volumeStatsCollector) DescribeWithStability(ch chan<- *metrics. ch <- volumeStatsInodesDesc ch <- volumeStatsInodesFreeDesc ch <- volumeStatsInodesUsedDesc - ch <- volumeStatsHealthAbnormalDesc } // CollectWithStability implements the metrics.StableCollector interface. @@ -102,6 +95,7 @@ func (collector *volumeStatsCollector) CollectWithStability(ch chan<- metrics.Me } addGauge := func(desc *metrics.Desc, pvcRef *stats.PVCReference, v float64, lv ...string) { lv = append([]string{pvcRef.Namespace, pvcRef.Name}, lv...) + ch <- metrics.NewLazyConstMetric(desc, metrics.GaugeValue, v, lv...) } allPVCs := sets.String{} @@ -126,18 +120,7 @@ func (collector *volumeStatsCollector) CollectWithStability(ch chan<- metrics.Me addGauge(volumeStatsInodesDesc, pvcRef, float64(*volumeStat.Inodes)) addGauge(volumeStatsInodesFreeDesc, pvcRef, float64(*volumeStat.InodesFree)) addGauge(volumeStatsInodesUsedDesc, pvcRef, float64(*volumeStat.InodesUsed)) - if volumeStat.VolumeHealthStats != nil { - addGauge(volumeStatsHealthAbnormalDesc, pvcRef, convertBoolToFloat64(volumeStat.VolumeHealthStats.Abnormal)) - } allPVCs.Insert(pvcUniqStr) } } } - -func convertBoolToFloat64(boolVal bool) float64 { - if boolVal { - return 1 - } - - return 0 -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/metrics.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/metrics.go index 53b04c058975..162e02857163 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/metrics.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/metrics/metrics.go @@ -17,42 +17,44 @@ limitations under the License. package metrics import ( + "fmt" "sync" "time" "k8s.io/component-base/metrics" "k8s.io/component-base/metrics/legacyregistry" + corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" utilfeature "k8s.io/apiserver/pkg/util/feature" + "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/features" ) // This const block defines the metric names for the kubelet metrics. const ( - KubeletSubsystem = "kubelet" - NodeNameKey = "node_name" - NodeLabelKey = "node" - PodWorkerDurationKey = "pod_worker_duration_seconds" - PodStartDurationKey = "pod_start_duration_seconds" - CgroupManagerOperationsKey = "cgroup_manager_duration_seconds" - PodWorkerStartDurationKey = "pod_worker_start_duration_seconds" - PLEGRelistDurationKey = "pleg_relist_duration_seconds" - PLEGDiscardEventsKey = "pleg_discard_events" - PLEGRelistIntervalKey = "pleg_relist_interval_seconds" - PLEGLastSeenKey = "pleg_last_seen_seconds" - EvictionsKey = "evictions" - EvictionStatsAgeKey = "eviction_stats_age_seconds" - PreemptionsKey = "preemptions" - VolumeStatsCapacityBytesKey = "volume_stats_capacity_bytes" - VolumeStatsAvailableBytesKey = "volume_stats_available_bytes" - VolumeStatsUsedBytesKey = "volume_stats_used_bytes" - VolumeStatsInodesKey = "volume_stats_inodes" - VolumeStatsInodesFreeKey = "volume_stats_inodes_free" - VolumeStatsInodesUsedKey = "volume_stats_inodes_used" - VolumeStatsHealthStatusAbnormalKey = "volume_stats_health_status_abnormal" - RunningPodsKey = "running_pods" - RunningContainersKey = "running_containers" + KubeletSubsystem = "kubelet" + NodeNameKey = "node_name" + NodeLabelKey = "node" + PodWorkerDurationKey = "pod_worker_duration_seconds" + PodStartDurationKey = "pod_start_duration_seconds" + CgroupManagerOperationsKey = "cgroup_manager_duration_seconds" + PodWorkerStartDurationKey = "pod_worker_start_duration_seconds" + PLEGRelistDurationKey = "pleg_relist_duration_seconds" + PLEGDiscardEventsKey = "pleg_discard_events" + PLEGRelistIntervalKey = "pleg_relist_interval_seconds" + PLEGLastSeenKey = "pleg_last_seen_seconds" + EvictionsKey = "evictions" + EvictionStatsAgeKey = "eviction_stats_age_seconds" + PreemptionsKey = "preemptions" + VolumeStatsCapacityBytesKey = "volume_stats_capacity_bytes" + VolumeStatsAvailableBytesKey = "volume_stats_available_bytes" + VolumeStatsUsedBytesKey = "volume_stats_used_bytes" + VolumeStatsInodesKey = "volume_stats_inodes" + VolumeStatsInodesFreeKey = "volume_stats_inodes_free" + VolumeStatsInodesUsedKey = "volume_stats_inodes_used" + RunningPodsKey = "running_pods" + RunningContainersKey = "running_containers" // Metrics keys of remote runtime operations RuntimeOperationsKey = "runtime_operations_total" RuntimeOperationsDurationKey = "runtime_operations_duration_seconds" @@ -67,6 +69,17 @@ const ( PodResourcesEndpointErrorsListKey = "pod_resources_endpoint_errors_list" PodResourcesEndpointErrorsGetAllocatableKey = "pod_resources_endpoint_errors_get_allocatable" + // Metric keys for node config + AssignedConfigKey = "node_config_assigned" + ActiveConfigKey = "node_config_active" + LastKnownGoodConfigKey = "node_config_last_known_good" + ConfigErrorKey = "node_config_error" + ConfigSourceLabelKey = "node_config_source" + ConfigSourceLabelValueLocal = "local" + ConfigUIDLabelKey = "node_config_uid" + ConfigResourceVersionLabelKey = "node_config_resource_version" + KubeletConfigKeyLabelKey = "node_config_kubelet_key" + // Metrics keys for RuntimeClass RunPodSandboxDurationKey = "run_podsandbox_duration_seconds" RunPodSandboxErrorsKey = "run_podsandbox_errors_total" @@ -123,13 +136,12 @@ var ( }, []string{"operation_type"}, ) - // PodStartDuration is a Histogram that tracks the duration (in seconds) it takes for a single pod to run since it's - // first time seen by kubelet. + // PodStartDuration is a Histogram that tracks the duration (in seconds) it takes for a single pod to go from pending to running. PodStartDuration = metrics.NewHistogram( &metrics.HistogramOpts{ Subsystem: KubeletSubsystem, Name: PodStartDurationKey, - Help: "Duration in seconds from kubelet seeing a pod for the first time to the pod starting to run", + Help: "Duration in seconds for a single pod to go from pending to running.", Buckets: metrics.DefBuckets, StabilityLevel: metrics.ALPHA, }, @@ -146,12 +158,12 @@ var ( }, []string{"operation_type"}, ) - // PodWorkerStartDuration is a Histogram that tracks the duration (in seconds) it takes from kubelet seeing a pod to starting a worker. + // PodWorkerStartDuration is a Histogram that tracks the duration (in seconds) it takes from seeing a pod to starting a worker. PodWorkerStartDuration = metrics.NewHistogram( &metrics.HistogramOpts{ Subsystem: KubeletSubsystem, Name: PodWorkerStartDurationKey, - Help: "Duration in seconds from kubelet seeing a pod to starting a worker.", + Help: "Duration in seconds from seeing a pod to starting a worker.", Buckets: metrics.DefBuckets, StabilityLevel: metrics.ALPHA, }, @@ -351,6 +363,52 @@ var ( []string{"server_api_version"}, ) + // Metrics for node config + + // AssignedConfig is a Gauge that is set 1 if the Kubelet has a NodeConfig assigned. + AssignedConfig = metrics.NewGaugeVec( + &metrics.GaugeOpts{ + Subsystem: KubeletSubsystem, + Name: AssignedConfigKey, + Help: "The node's understanding of intended config. The count is always 1.", + DeprecatedVersion: "1.22.0", + StabilityLevel: metrics.ALPHA, + }, + []string{ConfigSourceLabelKey, ConfigUIDLabelKey, ConfigResourceVersionLabelKey, KubeletConfigKeyLabelKey}, + ) + // ActiveConfig is a Gauge that is set to 1 if the Kubelet has an active NodeConfig. + ActiveConfig = metrics.NewGaugeVec( + &metrics.GaugeOpts{ + Subsystem: KubeletSubsystem, + Name: ActiveConfigKey, + Help: "The config source the node is actively using. The count is always 1.", + DeprecatedVersion: "1.22.0", + StabilityLevel: metrics.ALPHA, + }, + []string{ConfigSourceLabelKey, ConfigUIDLabelKey, ConfigResourceVersionLabelKey, KubeletConfigKeyLabelKey}, + ) + // LastKnownGoodConfig is a Gauge that is set to 1 if the Kubelet has a NodeConfig it can fall back to if there + // are certain errors. + LastKnownGoodConfig = metrics.NewGaugeVec( + &metrics.GaugeOpts{ + Subsystem: KubeletSubsystem, + Name: LastKnownGoodConfigKey, + Help: "The config source the node will fall back to when it encounters certain errors. The count is always 1.", + DeprecatedVersion: "1.22.0", + StabilityLevel: metrics.ALPHA, + }, + []string{ConfigSourceLabelKey, ConfigUIDLabelKey, ConfigResourceVersionLabelKey, KubeletConfigKeyLabelKey}, + ) + // ConfigError is a Gauge that is set to 1 if the node is experiencing a configuration-related error. + ConfigError = metrics.NewGauge( + &metrics.GaugeOpts{ + Subsystem: KubeletSubsystem, + Name: ConfigErrorKey, + Help: "This metric is true (1) if the node is experiencing a configuration-related error, false (0) otherwise.", + DeprecatedVersion: "1.22.0", + StabilityLevel: metrics.ALPHA, + }, + ) // RunPodSandboxDuration is a Histogram that tracks the duration (in seconds) it takes to run Pod Sandbox operations. // Broken down by RuntimeClass.Handler. RunPodSandboxDuration = metrics.NewHistogramVec( @@ -463,26 +521,6 @@ var ( StabilityLevel: metrics.ALPHA, }, ) - - // GracefulShutdownStartTime is a gauge that records the time at which the kubelet started graceful shutdown. - GracefulShutdownStartTime = metrics.NewGauge( - &metrics.GaugeOpts{ - Subsystem: KubeletSubsystem, - Name: "graceful_shutdown_start_time_seconds", - Help: "Last graceful shutdown start time since unix epoch in seconds", - StabilityLevel: metrics.ALPHA, - }, - ) - - // GracefulShutdownEndTime is a gauge that records the time at which the kubelet completed graceful shutdown. - GracefulShutdownEndTime = metrics.NewGauge( - &metrics.GaugeOpts{ - Subsystem: KubeletSubsystem, - Name: "graceful_shutdown_end_time_seconds", - Help: "Last graceful shutdown start time since unix epoch in seconds", - StabilityLevel: metrics.ALPHA, - }, - ) ) var registerMetrics sync.Once @@ -522,16 +560,15 @@ func Register(collectors ...metrics.StableCollector) { } legacyregistry.MustRegister(RunPodSandboxDuration) legacyregistry.MustRegister(RunPodSandboxErrors) + if utilfeature.DefaultFeatureGate.Enabled(features.DynamicKubeletConfig) { + legacyregistry.MustRegister(AssignedConfig) + legacyregistry.MustRegister(ActiveConfig) + legacyregistry.MustRegister(LastKnownGoodConfig) + legacyregistry.MustRegister(ConfigError) + } for _, collector := range collectors { legacyregistry.CustomMustRegister(collector) } - - if utilfeature.DefaultFeatureGate.Enabled(features.GracefulNodeShutdown) && - utilfeature.DefaultFeatureGate.Enabled(features.GracefulNodeShutdownBasedOnPodPriority) { - legacyregistry.MustRegister(GracefulShutdownStartTime) - legacyregistry.MustRegister(GracefulShutdownEndTime) - } - }) } @@ -545,6 +582,104 @@ func SinceInSeconds(start time.Time) float64 { return time.Since(start).Seconds() } +const configMapAPIPathFmt = "/api/v1/namespaces/%s/configmaps/%s" + +func configLabels(source *corev1.NodeConfigSource) (map[string]string, error) { + if source == nil { + return map[string]string{ + // prometheus requires all of the labels that can be set on the metric + ConfigSourceLabelKey: "local", + ConfigUIDLabelKey: "", + ConfigResourceVersionLabelKey: "", + KubeletConfigKeyLabelKey: "", + }, nil + } + if source.ConfigMap != nil { + return map[string]string{ + ConfigSourceLabelKey: fmt.Sprintf(configMapAPIPathFmt, source.ConfigMap.Namespace, source.ConfigMap.Name), + ConfigUIDLabelKey: string(source.ConfigMap.UID), + ConfigResourceVersionLabelKey: source.ConfigMap.ResourceVersion, + KubeletConfigKeyLabelKey: source.ConfigMap.KubeletConfigKey, + }, nil + } + return nil, fmt.Errorf("unrecognized config source type, all source subfields were nil") +} + +// track labels across metric updates, so we can delete old label sets and prevent leaks +var assignedConfigLabels map[string]string + +// SetAssignedConfig tracks labels according to the assigned NodeConfig. It also tracks labels +// across metric updates so old labels can be safely deleted. +func SetAssignedConfig(source *corev1.NodeConfigSource) error { + // compute the timeseries labels from the source + labels, err := configLabels(source) + if err != nil { + return err + } + // clean up the old timeseries (WithLabelValues creates a new one for each distinct label set) + if !AssignedConfig.Delete(assignedConfigLabels) { + klog.InfoS("Failed to delete metric for labels. This may result in ambiguity from multiple metrics concurrently indicating different assigned configs.", "labels", assignedConfigLabels) + } + // record the new timeseries + assignedConfigLabels = labels + // expose the new timeseries with a constant count of 1 + AssignedConfig.With(assignedConfigLabels).Set(1) + return nil +} + +// track labels across metric updates, so we can delete old label sets and prevent leaks +var activeConfigLabels map[string]string + +// SetActiveConfig tracks labels according to the NodeConfig that is currently used by the Kubelet. +// It also tracks labels across metric updates so old labels can be safely deleted. +func SetActiveConfig(source *corev1.NodeConfigSource) error { + // compute the timeseries labels from the source + labels, err := configLabels(source) + if err != nil { + return err + } + // clean up the old timeseries (WithLabelValues creates a new one for each distinct label set) + if !ActiveConfig.Delete(activeConfigLabels) { + klog.InfoS("Failed to delete metric for labels. This may result in ambiguity from multiple metrics concurrently indicating different active configs.", "labels", activeConfigLabels) + } + // record the new timeseries + activeConfigLabels = labels + // expose the new timeseries with a constant count of 1 + ActiveConfig.With(activeConfigLabels).Set(1) + return nil +} + +// track labels across metric updates, so we can delete old label sets and prevent leaks +var lastKnownGoodConfigLabels map[string]string + +// SetLastKnownGoodConfig tracks labels according to the NodeConfig that was successfully applied last. +// It also tracks labels across metric updates so old labels can be safely deleted. +func SetLastKnownGoodConfig(source *corev1.NodeConfigSource) error { + // compute the timeseries labels from the source + labels, err := configLabels(source) + if err != nil { + return err + } + // clean up the old timeseries (WithLabelValues creates a new one for each distinct label set) + if !LastKnownGoodConfig.Delete(lastKnownGoodConfigLabels) { + klog.InfoS("Failed to delete metric for labels. This may result in ambiguity from multiple metrics concurrently indicating different last known good configs.", "labels", lastKnownGoodConfigLabels) + } + // record the new timeseries + lastKnownGoodConfigLabels = labels + // expose the new timeseries with a constant count of 1 + LastKnownGoodConfig.With(lastKnownGoodConfigLabels).Set(1) + return nil +} + +// SetConfigError sets a the ConfigError metric to 1 in case any errors were encountered. +func SetConfigError(err bool) { + if err { + ConfigError.Set(1) + } else { + ConfigError.Set(0) + } +} + // SetNodeName sets the NodeName Gauge to 1. func SetNodeName(name types.NodeName) { NodeName.WithLabelValues(string(name)).Set(1) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/network/dns/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/network/dns/OWNERS index bfea9bb15419..a055e4d7024f 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/network/dns/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/network/dns/OWNERS @@ -1,6 +1,6 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - sig-network-approvers +- sig-network-approvers reviewers: - - sig-network-reviewers +- sig-network-reviewers diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/network/dns/dns.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/network/dns/dns.go index cff577bf9369..264f14e02b9d 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/network/dns/dns.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/network/dns/dns.go @@ -55,7 +55,7 @@ const ( ) const ( - maxResolvConfLength = 10 * 1 << 20 // 10MB + maxResolveConfLength = 10 * 1 << 20 // 10MB ) // Configurer is used for setting up DNS resolver configuration when launching pods. @@ -230,7 +230,7 @@ func (c *Configurer) CheckLimitsForResolvConf() { // parseResolvConf reads a resolv.conf file from the given reader, and parses // it into nameservers, searches and options, possibly returning an error. func parseResolvConf(reader io.Reader) (nameservers []string, searches []string, options []string, err error) { - file, err := utilio.ReadAtMost(reader, maxResolvConfLength) + file, err := utilio.ReadAtMost(reader, maxResolveConfLength) if err != nil { return nil, nil, nil, err } @@ -427,7 +427,7 @@ func (c *Configurer) GetPodDNS(pod *v1.Pod) (*runtimeapi.DNSConfig, error) { return c.formDNSConfigFitsLimits(dnsConfig, pod), nil } -// SetupDNSinContainerizedMounter replaces the nameserver in containerized-mounter's rootfs/etc/resolv.conf with kubelet.ClusterDNS +// SetupDNSinContainerizedMounter replaces the nameserver in containerized-mounter's rootfs/etc/resolve.conf with kubelet.ClusterDNS func (c *Configurer) SetupDNSinContainerizedMounter(mounterPath string) { resolvePath := filepath.Join(strings.TrimSuffix(mounterPath, "/mounter"), "rootfs", "etc", "resolv.conf") dnsString := "" diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/nodeshutdown/nodeshutdown_manager.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/nodeshutdown/nodeshutdown_manager.go index 00406299be1a..4e4cfbfe5e97 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/nodeshutdown/nodeshutdown_manager.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/nodeshutdown/nodeshutdown_manager.go @@ -46,7 +46,6 @@ type Config struct { ShutdownGracePeriodRequested time.Duration ShutdownGracePeriodCriticalPods time.Duration ShutdownGracePeriodByPodPriority []kubeletconfig.ShutdownGracePeriodByPodPriority - StateDirectory string Clock clock.Clock } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/nodeshutdown/nodeshutdown_manager_linux.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/nodeshutdown/nodeshutdown_manager_linux.go index 6974d82acf4b..bfbb841a1fa5 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/nodeshutdown/nodeshutdown_manager_linux.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/nodeshutdown/nodeshutdown_manager_linux.go @@ -22,7 +22,6 @@ package nodeshutdown import ( "fmt" - "path/filepath" "sort" "sync" "time" @@ -37,7 +36,6 @@ import ( kubeletevents "k8s.io/kubernetes/pkg/kubelet/events" "k8s.io/kubernetes/pkg/kubelet/eviction" "k8s.io/kubernetes/pkg/kubelet/lifecycle" - "k8s.io/kubernetes/pkg/kubelet/metrics" "k8s.io/kubernetes/pkg/kubelet/nodeshutdown/systemd" "k8s.io/kubernetes/pkg/kubelet/prober" "k8s.io/utils/clock" @@ -49,7 +47,6 @@ const ( nodeShutdownNotAdmittedReason = "NodeShutdown" nodeShutdownNotAdmittedMessage = "Pod was rejected as the node is shutting down." dbusReconnectPeriod = 1 * time.Second - localStorageStateFile = "graceful_node_shutdown_state" ) var systemDbus = func() (dbusInhibiter, error) { @@ -84,9 +81,6 @@ type managerImpl struct { nodeShuttingDownNow bool clock clock.Clock - - enableMetrics bool - storage storage } // NewManager returns a new node shutdown manager. @@ -126,10 +120,6 @@ func NewManager(conf *Config) (Manager, lifecycle.PodAdmitHandler) { syncNodeStatus: conf.SyncNodeStatusFunc, shutdownGracePeriodByPodPriority: shutdownGracePeriodByPodPriority, clock: conf.Clock, - enableMetrics: utilfeature.DefaultFeatureGate.Enabled(features.GracefulNodeShutdownBasedOnPodPriority), - storage: localStorage{ - Path: filepath.Join(conf.StateDirectory, localStorageStateFile), - }, } klog.InfoS("Creating node shutdown manager", "shutdownGracePeriodRequested", conf.ShutdownGracePeriodRequested, @@ -153,24 +143,6 @@ func (m *managerImpl) Admit(attrs *lifecycle.PodAdmitAttributes) lifecycle.PodAd return lifecycle.PodAdmitResult{Admit: true} } -// setMetrics sets the metrics for the node shutdown manager. -func (m *managerImpl) setMetrics() { - if m.enableMetrics && m.storage != nil { - sta := state{} - err := m.storage.Load(&sta) - if err != nil { - klog.ErrorS(err, "Failed to load graceful shutdown state") - } else { - if !sta.StartTime.IsZero() { - metrics.GracefulShutdownStartTime.Set(timestamp(sta.StartTime)) - } - if !sta.EndTime.IsZero() { - metrics.GracefulShutdownEndTime.Set(timestamp(sta.EndTime)) - } - } - } -} - // Start starts the node shutdown manager and will start watching the node for shutdown events. func (m *managerImpl) Start() error { stop, err := m.start() @@ -191,8 +163,6 @@ func (m *managerImpl) Start() error { } } }() - - m.setMetrics() return nil } @@ -319,35 +289,6 @@ func (m *managerImpl) processShutdownEvent() error { klog.V(1).InfoS("Shutdown manager processing shutdown event") activePods := m.getPods() - defer func() { - m.dbusCon.ReleaseInhibitLock(m.inhibitLock) - klog.V(1).InfoS("Shutdown manager completed processing shutdown event, node will shutdown shortly") - }() - - if m.enableMetrics && m.storage != nil { - startTime := time.Now() - err := m.storage.Store(state{ - StartTime: startTime, - }) - if err != nil { - klog.ErrorS(err, "Failed to store graceful shutdown state") - } - metrics.GracefulShutdownStartTime.Set(timestamp(startTime)) - metrics.GracefulShutdownEndTime.Set(0) - - defer func() { - endTime := time.Now() - err := m.storage.Store(state{ - StartTime: startTime, - EndTime: endTime, - }) - if err != nil { - klog.ErrorS(err, "Failed to store graceful shutdown state") - } - metrics.GracefulShutdownStartTime.Set(timestamp(endTime)) - }() - } - groups := groupByPriority(m.shutdownGracePeriodByPodPriority, activePods) for _, group := range groups { // If there are no pods in a particular range, @@ -375,10 +316,6 @@ func (m *managerImpl) processShutdownEvent() error { klog.V(1).InfoS("Shutdown manager killing pod with gracePeriod", "pod", klog.KObj(pod), "gracePeriod", gracePeriodOverride) if err := m.killPodFunc(pod, false, &gracePeriodOverride, func(status *v1.PodStatus) { - // set the pod status to failed (unless it was already in a successful terminal phase) - if status.Phase != v1.PodSucceeded { - status.Phase = v1.PodFailed - } status.Message = nodeShutdownMessage status.Reason = nodeShutdownReason }); err != nil { @@ -389,23 +326,22 @@ func (m *managerImpl) processShutdownEvent() error { }(pod, group) } - var ( - doneCh = make(chan struct{}) - timer = m.clock.NewTimer(time.Duration(group.ShutdownGracePeriodSeconds) * time.Second) - ) + c := make(chan struct{}) go func() { - defer close(doneCh) + defer close(c) wg.Wait() }() select { - case <-doneCh: - timer.Stop() - case <-timer.C(): + case <-c: + case <-time.After(time.Duration(group.ShutdownGracePeriodSeconds) * time.Second): klog.V(1).InfoS("Shutdown manager pod killing time out", "gracePeriod", group.ShutdownGracePeriodSeconds, "priority", group.Priority) } } + m.dbusCon.ReleaseInhibitLock(m.inhibitLock) + klog.V(1).InfoS("Shutdown manager completed processing shutdown event, node will shutdown shortly") + return nil } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/nodeshutdown/storage.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/nodeshutdown/storage.go deleted file mode 100644 index fbf1ea906649..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/nodeshutdown/storage.go +++ /dev/null @@ -1,96 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package nodeshutdown - -import ( - "encoding/json" - "io" - "io/ioutil" - "os" - "path/filepath" - "time" -) - -type storage interface { - Store(data interface{}) (err error) - Load(data interface{}) (err error) -} - -type localStorage struct { - Path string -} - -func (l localStorage) Store(data interface{}) (err error) { - b, err := json.Marshal(data) - if err != nil { - return err - } - return atomicWrite(l.Path, b, 0644) -} - -func (l localStorage) Load(data interface{}) (err error) { - b, err := os.ReadFile(l.Path) - if err != nil { - if os.IsNotExist(err) { - return nil - } - return err - } - return json.Unmarshal(b, data) -} - -func timestamp(t time.Time) float64 { - if t.IsZero() { - return 0 - } - return float64(t.Unix()) -} - -type state struct { - StartTime time.Time `json:"startTime"` - EndTime time.Time `json:"endTime"` -} - -// atomicWrite atomically writes data to a file specified by filename. -func atomicWrite(filename string, data []byte, perm os.FileMode) error { - f, err := ioutil.TempFile(filepath.Dir(filename), ".tmp-"+filepath.Base(filename)) - if err != nil { - return err - } - err = os.Chmod(f.Name(), perm) - if err != nil { - f.Close() - return err - } - n, err := f.Write(data) - if err != nil { - f.Close() - return err - } - if n < len(data) { - f.Close() - return io.ErrShortWrite - } - if err := f.Sync(); err != nil { - f.Close() - return err - } - if err := f.Close(); err != nil { - return err - } - return os.Rename(f.Name(), filename) -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/nodestatus/setters.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/nodestatus/setters.go index 984cad5a619b..c062327ba8e5 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/nodestatus/setters.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/nodestatus/setters.go @@ -34,7 +34,6 @@ import ( utilfeature "k8s.io/apiserver/pkg/util/feature" cloudprovider "k8s.io/cloud-provider" cloudproviderapi "k8s.io/cloud-provider/api" - cloudprovidernodeutil "k8s.io/cloud-provider/node/helpers" "k8s.io/component-base/version" v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" "k8s.io/kubernetes/pkg/features" @@ -116,9 +115,56 @@ func NodeAddress(nodeIPs []net.IP, // typically Kubelet.nodeIPs return err } - nodeAddresses, err := cloudprovidernodeutil.PreferNodeIP(nodeIP, cloudNodeAddresses) - if err != nil { - return err + var nodeAddresses []v1.NodeAddress + + // For every address supplied by the cloud provider that matches nodeIP, nodeIP is the enforced node address for + // that address Type (like InternalIP and ExternalIP), meaning other addresses of the same Type are discarded. + // See #61921 for more information: some cloud providers may supply secondary IPs, so nodeIP serves as a way to + // ensure that the correct IPs show up on a Node object. + if nodeIPSpecified { + enforcedNodeAddresses := []v1.NodeAddress{} + + nodeIPTypes := make(map[v1.NodeAddressType]bool) + for _, nodeAddress := range cloudNodeAddresses { + if nodeAddress.Address == nodeIP.String() { + enforcedNodeAddresses = append(enforcedNodeAddresses, v1.NodeAddress{Type: nodeAddress.Type, Address: nodeAddress.Address}) + nodeIPTypes[nodeAddress.Type] = true + } + } + + // nodeIP must be among the addresses supplied by the cloud provider + if len(enforcedNodeAddresses) == 0 { + return fmt.Errorf("failed to get node address from cloud provider that matches ip: %v", nodeIP) + } + + // nodeIP was found, now use all other addresses supplied by the cloud provider NOT of the same Type as nodeIP. + for _, nodeAddress := range cloudNodeAddresses { + if !nodeIPTypes[nodeAddress.Type] { + enforcedNodeAddresses = append(enforcedNodeAddresses, v1.NodeAddress{Type: nodeAddress.Type, Address: nodeAddress.Address}) + } + } + + nodeAddresses = enforcedNodeAddresses + } else if nodeIP != nil { + // nodeIP is "0.0.0.0" or "::"; sort cloudNodeAddresses to + // prefer addresses of the matching family + sortedAddresses := make([]v1.NodeAddress, 0, len(cloudNodeAddresses)) + for _, nodeAddress := range cloudNodeAddresses { + ip := netutils.ParseIPSloppy(nodeAddress.Address) + if ip == nil || isPreferredIPFamily(ip) { + sortedAddresses = append(sortedAddresses, nodeAddress) + } + } + for _, nodeAddress := range cloudNodeAddresses { + ip := netutils.ParseIPSloppy(nodeAddress.Address) + if ip != nil && !isPreferredIPFamily(ip) { + sortedAddresses = append(sortedAddresses, nodeAddress) + } + } + nodeAddresses = sortedAddresses + } else { + // If nodeIP is unset, just use the addresses provided by the cloud provider as-is + nodeAddresses = cloudNodeAddresses } switch { diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/pleg/generic.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/pleg/generic.go index ef1664da8b17..49ad9797cf0a 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/pleg/generic.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/pleg/generic.go @@ -405,21 +405,12 @@ func (g *GenericPLEG) updateCache(pod *kubecontainer.Pod, pid types.UID) error { // GetPodStatus(pod *kubecontainer.Pod) so that Docker can avoid listing // all containers again. status, err := g.runtime.GetPodStatus(pod.ID, pod.Name, pod.Namespace) - if err != nil { - // nolint:logcheck // Not using the result of klog.V inside the - // if branch is okay, we just use it to determine whether the - // additional "podStatus" key and its value should be added. - if klog.V(6).Enabled() { - klog.ErrorS(err, "PLEG: Write status", "pod", klog.KRef(pod.Namespace, pod.Name), "podStatus", status) - } else { - klog.ErrorS(err, "PLEG: Write status", "pod", klog.KRef(pod.Namespace, pod.Name)) - } + if klog.V(6).Enabled() { + klog.V(6).ErrorS(err, "PLEG: Write status", "pod", klog.KRef(pod.Namespace, pod.Name), "podStatus", status) } else { - if klogV := klog.V(6); klogV.Enabled() { - klogV.InfoS("PLEG: Write status", "pod", klog.KRef(pod.Namespace, pod.Name), "podStatus", status) - } else { - klog.V(4).InfoS("PLEG: Write status", "pod", klog.KRef(pod.Namespace, pod.Name)) - } + klog.V(4).ErrorS(err, "PLEG: Write status", "pod", klog.KRef(pod.Namespace, pod.Name)) + } + if err == nil { // Preserve the pod IP across cache updates if the new IP is empty. // When a pod is torn down, kubelet may race with PLEG and retrieve // a pod status after network teardown, but the kubernetes API expects diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/OWNERS index d509b8e3c622..d3f62b2cf10e 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/OWNERS @@ -1,6 +1,5 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - saad-ali -emeritus_approvers: - - taragu +- saad-ali +- taragu diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache/actual_state_of_world.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache/actual_state_of_world.go index b8c81e76f653..cdf6a0c50a9b 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache/actual_state_of_world.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache/actual_state_of_world.go @@ -43,7 +43,7 @@ type ActualStateOfWorld interface { // Note that this is different from desired world cache's AddOrUpdatePlugin // because for the actual state of world cache, there won't be a scenario where // we need to update an existing plugin if the timestamps don't match. This is - // because the plugin should have been unregistered in the reconciler and therefore + // because the plugin should have been unregistered in the reconciller and therefore // removed from the actual state of world cache first before adding it back into // the actual state of world cache again with the new timestamp AddPlugin(pluginInfo PluginInfo) error diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/pod/pod_manager.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/pod/pod_manager.go index ce342ac7209a..c94e563620cb 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/pod/pod_manager.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/pod/pod_manager.go @@ -159,6 +159,10 @@ func (pm *basicManager) UpdatePod(pod *v1.Pod) { pm.updatePodsInternal(pod) } +func isPodInTerminatedState(pod *v1.Pod) bool { + return pod.Status.Phase == v1.PodFailed || pod.Status.Phase == v1.PodSucceeded +} + // updateMetrics updates the metrics surfaced by the pod manager. // oldPod or newPod may be nil to signify creation or deletion. func updateMetrics(oldPod, newPod *v1.Pod) { @@ -183,6 +187,32 @@ func updateMetrics(oldPod, newPod *v1.Pod) { // lock. func (pm *basicManager) updatePodsInternal(pods ...*v1.Pod) { for _, pod := range pods { + if pm.secretManager != nil { + if isPodInTerminatedState(pod) { + // Pods that are in terminated state and no longer running can be + // ignored as they no longer require access to secrets. + // It is especially important in watch-based manager, to avoid + // unnecessary watches for terminated pods waiting for GC. + pm.secretManager.UnregisterPod(pod) + } else { + // TODO: Consider detecting only status update and in such case do + // not register pod, as it doesn't really matter. + pm.secretManager.RegisterPod(pod) + } + } + if pm.configMapManager != nil { + if isPodInTerminatedState(pod) { + // Pods that are in terminated state and no longer running can be + // ignored as they no longer require access to configmaps. + // It is especially important in watch-based manager, to avoid + // unnecessary watches for terminated pods waiting for GC. + pm.configMapManager.UnregisterPod(pod) + } else { + // TODO: Consider detecting only status update and in such case do + // not register pod, as it doesn't really matter. + pm.configMapManager.RegisterPod(pod) + } + } podFullName := kubecontainer.GetPodFullName(pod) // This logic relies on a static pod and its mirror to have the same name. // It is safe to type convert here due to the IsMirrorPod guard. @@ -209,6 +239,12 @@ func (pm *basicManager) DeletePod(pod *v1.Pod) { updateMetrics(pod, nil) pm.lock.Lock() defer pm.lock.Unlock() + if pm.secretManager != nil { + pm.secretManager.UnregisterPod(pod) + } + if pm.configMapManager != nil { + pm.configMapManager.UnregisterPod(pod) + } podFullName := kubecontainer.GetPodFullName(pod) // It is safe to type convert here due to the IsMirrorPod guard. if kubetypes.IsMirrorPod(pod) { diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/pod_workers.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/pod_workers.go index 5632745e0603..8123ee783c88 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/pod_workers.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/pod_workers.go @@ -218,7 +218,7 @@ type PodWorkers interface { } // the function to invoke to perform a sync (reconcile the kubelet state to the desired shape of the pod) -type syncPodFnType func(ctx context.Context, updateType kubetypes.SyncPodType, pod *v1.Pod, mirrorPod *v1.Pod, podStatus *kubecontainer.PodStatus) (bool, error) +type syncPodFnType func(ctx context.Context, updateType kubetypes.SyncPodType, pod *v1.Pod, mirrorPod *v1.Pod, podStatus *kubecontainer.PodStatus) error // the function to invoke to terminate a pod (ensure no running processes are present) type syncTerminatingPodFnType func(ctx context.Context, pod *v1.Pod, podStatus *kubecontainer.PodStatus, runningPod *kubecontainer.Pod, gracePeriod *int64, podStatusFn func(*v1.PodStatus)) error @@ -392,11 +392,6 @@ type podWorkers struct { syncTerminatingPodFn syncTerminatingPodFnType syncTerminatedPodFn syncTerminatedPodFnType - // workerChannelFn is exposed for testing to allow unit tests to impose delays - // in channel communication. The function is invoked once each time a new worker - // goroutine starts. - workerChannelFn func(uid types.UID, in chan podWork) (out <-chan podWork) - // The EventRecorder to use recorder record.EventRecorder @@ -585,7 +580,6 @@ func (p *podWorkers) UpdatePod(options UpdatePodOptions) { syncedAt: now, startedTerminating: true, finished: true, - fullname: kubecontainer.GetPodFullName(pod), } } } @@ -704,8 +698,9 @@ func (p *podWorkers) UpdatePod(options UpdatePodOptions) { } // start the pod worker goroutine if it doesn't exist - podUpdates, exists := p.podUpdates[uid] - if !exists { + var podUpdates chan podWork + var exists bool + if podUpdates, exists = p.podUpdates[uid]; !exists { // We need to have a buffer here, because checkForUpdates() method that // puts an update into channel is called from the same goroutine where // the channel is consumed. However, it is guaranteed that in such case @@ -719,21 +714,13 @@ func (p *podWorkers) UpdatePod(options UpdatePodOptions) { append(p.waitingToStartStaticPodsByFullname[status.fullname], uid) } - // allow testing of delays in the pod update channel - var outCh <-chan podWork - if p.workerChannelFn != nil { - outCh = p.workerChannelFn(uid, podUpdates) - } else { - outCh = podUpdates - } - // Creating a new pod worker either means this is a new pod, or that the // kubelet just restarted. In either case the kubelet is willing to believe // the status of the pod for the first pod worker sync. See corresponding // comment in syncPod. go func() { defer runtime.HandleCrash() - p.managePodLoop(outCh) + p.managePodLoop(podUpdates) }() } @@ -797,31 +784,28 @@ func calculateEffectiveGracePeriod(status *podSyncStatus, pod *v1.Pod, options * } // allowPodStart tries to start the pod and returns true if allowed, otherwise -// it requeues the pod and returns false. If the pod will never be able to start -// because data is missing, or the pod was terminated before start, canEverStart -// is false. -func (p *podWorkers) allowPodStart(pod *v1.Pod) (canStart bool, canEverStart bool) { +// it requeues the pod and returns false. +func (p *podWorkers) allowPodStart(pod *v1.Pod) bool { if !kubetypes.IsStaticPod(pod) { - // TODO: Do we want to allow non-static pods with the same full name? + // TBD: Do we want to allow non-static pods with the same full name? // Note that it may disable the force deletion of pods. - return true, true + return true } p.podLock.Lock() defer p.podLock.Unlock() status, ok := p.podSyncStatuses[pod.UID] if !ok { - klog.ErrorS(nil, "Pod sync status does not exist, the worker should not be running", "pod", klog.KObj(pod), "podUID", pod.UID) - return false, false - } - if status.IsTerminationRequested() { - return false, false + klog.ErrorS(nil, "Failed to get a valid podSyncStatuses", "pod", klog.KObj(pod), "podUID", pod.UID) + p.workQueue.Enqueue(pod.UID, wait.Jitter(p.backOffPeriod, workerBackOffPeriodJitterFactor)) + status.working = false + return false } if !p.allowStaticPodStart(status.fullname, pod.UID) { p.workQueue.Enqueue(pod.UID, wait.Jitter(p.backOffPeriod, workerBackOffPeriodJitterFactor)) status.working = false - return false, true + return false } - return true, true + return true } // allowStaticPodStart tries to start the static pod and returns true if @@ -834,12 +818,9 @@ func (p *podWorkers) allowStaticPodStart(fullname string, uid types.UID) bool { } waitingPods := p.waitingToStartStaticPodsByFullname[fullname] - // TODO: This is O(N) with respect to the number of updates to static pods - // with overlapping full names, and ideally would be O(1). for i, waitingUID := range waitingPods { // has pod already terminated or been deleted? - status, ok := p.podSyncStatuses[waitingUID] - if !ok || status.IsTerminationRequested() || status.IsTerminated() { + if _, ok := p.podSyncStatuses[waitingUID]; !ok { continue } // another pod is next in line @@ -865,20 +846,8 @@ func (p *podWorkers) managePodLoop(podUpdates <-chan podWork) { var podStarted bool for update := range podUpdates { pod := update.Options.Pod - - // Decide whether to start the pod. If the pod was terminated prior to the pod being allowed - // to start, we have to clean it up and then exit the pod worker loop. if !podStarted { - canStart, canEverStart := p.allowPodStart(pod) - if !canEverStart { - p.completeUnstartedTerminated(pod) - if start := update.Options.StartTime; !start.IsZero() { - metrics.PodWorkerDuration.WithLabelValues("terminated").Observe(metrics.SinceInSeconds(start)) - } - klog.V(4).InfoS("Processing pod event done", "pod", klog.KObj(pod), "podUID", pod.UID, "updateType", update.WorkType) - return - } - if !canStart { + if !p.allowPodStart(pod) { klog.V(4).InfoS("Pod cannot start yet", "pod", klog.KObj(pod), "podUID", pod.UID) continue } @@ -886,7 +855,6 @@ func (p *podWorkers) managePodLoop(podUpdates <-chan podWork) { } klog.V(4).InfoS("Processing pod event", "pod", klog.KObj(pod), "podUID", pod.UID, "updateType", update.WorkType) - var isTerminal bool err := func() error { // The worker is responsible for ensuring the sync method sees the appropriate // status updates on resyncs (the result of the last sync), transitions to @@ -933,14 +901,13 @@ func (p *podWorkers) managePodLoop(podUpdates <-chan podWork) { err = p.syncTerminatingPodFn(ctx, pod, status, update.Options.RunningPod, gracePeriod, podStatusFn) default: - isTerminal, err = p.syncPodFn(ctx, update.Options.UpdateType, pod, update.Options.MirrorPod, status) + err = p.syncPodFn(ctx, update.Options.UpdateType, pod, update.Options.MirrorPod, status) } lastSyncTime = time.Now() return err }() - var phaseTransition bool switch { case err == context.Canceled: // when the context is cancelled we expect an update to already be queued @@ -971,17 +938,10 @@ func (p *podWorkers) managePodLoop(podUpdates <-chan podWork) { } // otherwise we move to the terminating phase p.completeTerminating(pod) - phaseTransition = true - - case isTerminal: - // if syncPod indicated we are now terminal, set the appropriate pod status to move to terminating - klog.V(4).InfoS("Pod is terminal", "pod", klog.KObj(pod), "podUID", pod.UID, "updateType", update.WorkType) - p.completeSync(pod) - phaseTransition = true } - // queue a retry if necessary, then put the next event in the channel if any - p.completeWork(pod, phaseTransition, err) + // queue a retry for errors if necessary, then put the next event in the channel if any + p.completeWork(pod, err) if start := update.Options.StartTime; !start.IsZero() { metrics.PodWorkerDuration.WithLabelValues(update.Options.UpdateType.String()).Observe(metrics.SinceInSeconds(start)) } @@ -1012,33 +972,6 @@ func (p *podWorkers) acknowledgeTerminating(pod *v1.Pod) PodStatusFunc { return nil } -// completeSync is invoked when syncPod completes successfully and indicates the pod is now terminal and should -// be terminated. This happens when the natural pod lifecycle completes - any pod which is not RestartAlways -// exits. Unnatural completions, such as evictions, API driven deletion or phase transition, are handled by -// UpdatePod. -func (p *podWorkers) completeSync(pod *v1.Pod) { - p.podLock.Lock() - defer p.podLock.Unlock() - - klog.V(4).InfoS("Pod indicated lifecycle completed naturally and should now terminate", "pod", klog.KObj(pod), "podUID", pod.UID) - - if status, ok := p.podSyncStatuses[pod.UID]; ok { - if status.terminatingAt.IsZero() { - status.terminatingAt = time.Now() - } else { - klog.V(4).InfoS("Pod worker attempted to set terminatingAt twice, likely programmer error", "pod", klog.KObj(pod), "podUID", pod.UID) - } - status.startedTerminating = true - } - - p.lastUndeliveredWorkUpdate[pod.UID] = podWork{ - WorkType: TerminatingPodWork, - Options: UpdatePodOptions{ - Pod: pod, - }, - } -} - // completeTerminating is invoked when syncTerminatingPod completes successfully, which means // no container is running, no container will be started in the future, and we are ready for // cleanup. This updates the termination state which prevents future syncs and will ensure @@ -1093,7 +1026,12 @@ func (p *podWorkers) completeTerminatingRuntimePod(pod *v1.Pod) { } } - p.cleanupPodUpdates(pod.UID) + ch, ok := p.podUpdates[pod.UID] + if ok { + close(ch) + } + delete(p.podUpdates, pod.UID) + delete(p.lastUndeliveredWorkUpdate, pod.UID) } // completeTerminated is invoked after syncTerminatedPod completes successfully and means we @@ -1104,7 +1042,12 @@ func (p *podWorkers) completeTerminated(pod *v1.Pod) { klog.V(4).InfoS("Pod is complete and the worker can now stop", "pod", klog.KObj(pod), "podUID", pod.UID) - p.cleanupPodUpdates(pod.UID) + ch, ok := p.podUpdates[pod.UID] + if ok { + close(ch) + } + delete(p.podUpdates, pod.UID) + delete(p.lastUndeliveredWorkUpdate, pod.UID) if status, ok := p.podSyncStatuses[pod.UID]; ok { if status.terminatingAt.IsZero() { @@ -1122,40 +1065,11 @@ func (p *podWorkers) completeTerminated(pod *v1.Pod) { } } -// completeUnstartedTerminated is invoked if a pod that has never been started receives a termination -// signal before it can be started. -func (p *podWorkers) completeUnstartedTerminated(pod *v1.Pod) { - p.podLock.Lock() - defer p.podLock.Unlock() - - klog.V(4).InfoS("Pod never started and the worker can now stop", "pod", klog.KObj(pod), "podUID", pod.UID) - - p.cleanupPodUpdates(pod.UID) - - if status, ok := p.podSyncStatuses[pod.UID]; ok { - if status.terminatingAt.IsZero() { - klog.V(4).InfoS("Pod worker is complete but did not have terminatingAt set, likely programmer error", "pod", klog.KObj(pod), "podUID", pod.UID) - } - if !status.terminatedAt.IsZero() { - klog.V(4).InfoS("Pod worker is complete and had terminatedAt set, likely programmer error", "pod", klog.KObj(pod), "podUID", pod.UID) - } - status.finished = true - status.working = false - status.terminatedAt = time.Now() - - if p.startedStaticPodsByFullname[status.fullname] == pod.UID { - delete(p.startedStaticPodsByFullname, status.fullname) - } - } -} - // completeWork requeues on error or the next sync interval and then immediately executes any pending // work. -func (p *podWorkers) completeWork(pod *v1.Pod, phaseTransition bool, syncErr error) { +func (p *podWorkers) completeWork(pod *v1.Pod, syncErr error) { // Requeue the last update if the last sync returned error. switch { - case phaseTransition: - p.workQueue.Enqueue(pod.UID, 0) case syncErr == nil: // No error; requeue at the regular resync interval. p.workQueue.Enqueue(pod.UID, wait.Jitter(p.resyncInterval, workerResyncIntervalJitterFactor)) @@ -1235,10 +1149,10 @@ func (p *podWorkers) SyncKnownPods(desiredPods []*v1.Pod) map[types.UID]PodWorke return workers } -// removeTerminatedWorker cleans up and removes the worker status for a worker -// that has reached a terminal state of "finished" - has successfully exited -// syncTerminatedPod. This "forgets" a pod by UID and allows another pod to be -// recreated with the same UID. +// removeTerminatedWorker cleans up and removes the worker status for a worker that +// has reached a terminal state of "finished" - has successfully exited +// syncTerminatedPod. This "forgets" a pod by UID and allows another pod to be recreated +// with the same UID. func (p *podWorkers) removeTerminatedWorker(uid types.UID) { status, ok := p.podSyncStatuses[uid] if !ok { @@ -1247,6 +1161,11 @@ func (p *podWorkers) removeTerminatedWorker(uid types.UID) { return } + if startedUID, started := p.startedStaticPodsByFullname[status.fullname]; started && startedUID != uid { + klog.V(4).InfoS("Pod cannot start yet but is no longer known to the kubelet, finish it", "podUID", uid) + status.finished = true + } + if !status.finished { klog.V(4).InfoS("Pod worker has been requested for removal but is still not fully terminated", "podUID", uid) return @@ -1258,7 +1177,8 @@ func (p *podWorkers) removeTerminatedWorker(uid types.UID) { klog.V(4).InfoS("Pod has been terminated and is no longer known to the kubelet, remove all history", "podUID", uid) } delete(p.podSyncStatuses, uid) - p.cleanupPodUpdates(uid) + delete(p.podUpdates, uid) + delete(p.lastUndeliveredWorkUpdate, uid) if p.startedStaticPodsByFullname[status.fullname] == uid { delete(p.startedStaticPodsByFullname, status.fullname) @@ -1309,15 +1229,3 @@ func killPodNow(podWorkers PodWorkers, recorder record.EventRecorder) eviction.K } } } - -// cleanupPodUpdates closes the podUpdates channel and removes it from -// podUpdates map so that the corresponding pod worker can stop. It also -// removes any undelivered work. This method must be called holding the -// pod lock. -func (p *podWorkers) cleanupPodUpdates(uid types.UID) { - if ch, ok := p.podUpdates[uid]; ok { - close(ch) - } - delete(p.podUpdates, uid) - delete(p.lastUndeliveredWorkUpdate, uid) -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/prober/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/prober/OWNERS index ec9e7a356681..9faddd8e7eb4 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/prober/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/prober/OWNERS @@ -1,5 +1,5 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - tallclair - - sig-node-approvers +- tallclair +- sig-node-approvers diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/prober/testing/fake_manager.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/prober/testing/fake_manager.go deleted file mode 100644 index 41910382d380..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/prober/testing/fake_manager.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package testing - -import ( - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/sets" -) - -// FakeManager simulates a prober.Manager for testing. -type FakeManager struct{} - -// Unused methods below. - -// AddPod simulates adding a Pod. -func (FakeManager) AddPod(_ *v1.Pod) {} - -// RemovePod simulates removing a Pod. -func (FakeManager) RemovePod(_ *v1.Pod) {} - -// CleanupPods simulates cleaning up Pods. -func (FakeManager) CleanupPods(_ map[types.UID]sets.Empty) {} - -// Start simulates start syncing the probe status -func (FakeManager) Start() {} - -// UpdatePodStatus simulates updating the Pod Status. -func (FakeManager) UpdatePodStatus(_ types.UID, podStatus *v1.PodStatus) { - for i := range podStatus.ContainerStatuses { - podStatus.ContainerStatuses[i].Ready = true - } -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/runonce.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/runonce.go index 00f3022af5a8..19b8a4f6a7b1 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/runonce.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/runonce.go @@ -112,10 +112,9 @@ func (kl *Kubelet) runOnce(pods []*v1.Pod, retryDelay time.Duration) (results [] // runPod runs a single pod and wait until all containers are running. func (kl *Kubelet) runPod(pod *v1.Pod, retryDelay time.Duration) error { - var isTerminal bool delay := retryDelay retry := 0 - for !isTerminal { + for { status, err := kl.containerRuntime.GetPodStatus(pod.UID, pod.Name, pod.Namespace) if err != nil { return fmt.Errorf("unable to get status for pod %q: %v", format.Pod(pod), err) @@ -132,7 +131,7 @@ func (kl *Kubelet) runPod(pod *v1.Pod, retryDelay time.Duration) error { klog.ErrorS(err, "Failed creating a mirror pod", "pod", klog.KObj(pod)) } mirrorPod, _ := kl.podManager.GetMirrorPodByPod(pod) - if isTerminal, err = kl.syncPod(context.Background(), kubetypes.SyncPodUpdate, pod, mirrorPod, status); err != nil { + if err = kl.syncPod(context.Background(), kubetypes.SyncPodUpdate, pod, mirrorPod, status); err != nil { return fmt.Errorf("error syncing pod %q: %v", format.Pod(pod), err) } if retry >= runOnceMaxRetries { @@ -144,7 +143,6 @@ func (kl *Kubelet) runPod(pod *v1.Pod, retryDelay time.Duration) error { retry++ delay *= runOnceRetryDelayBackoff } - return nil } // isPodRunning returns true if all containers of a manifest are running. diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/server/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/server/OWNERS index 943af30ceade..99f049723cc3 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/server/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/server/OWNERS @@ -1,5 +1,5 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - tallclair - - cheftako +- tallclair +- cheftako diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/server/metrics/metrics.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/server/metrics/metrics.go index e9a2b5fca761..d287de225db5 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/server/metrics/metrics.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/server/metrics/metrics.go @@ -64,18 +64,6 @@ var ( }, []string{"method", "path", "server_type", "long_running"}, ) - // VolumeStatCalDuration tracks the duration in seconds to calculate volume stats. - // this metric is mainly for comparison between fsquota monitoring and `du` for disk usage. - VolumeStatCalDuration = metrics.NewHistogramVec( - &metrics.HistogramOpts{ - Subsystem: kubeletSubsystem, - Name: "volume_metric_collection_duration_seconds", - Help: "Duration in seconds to calculate volume stats", - Buckets: metrics.DefBuckets, - StabilityLevel: metrics.ALPHA, - }, - []string{"metric_source"}, - ) ) var registerMetrics sync.Once @@ -86,7 +74,6 @@ func Register() { legacyregistry.MustRegister(HTTPRequests) legacyregistry.MustRegister(HTTPRequestsDuration) legacyregistry.MustRegister(HTTPInflightRequests) - legacyregistry.MustRegister(VolumeStatCalDuration) }) } @@ -94,8 +81,3 @@ func Register() { func SinceInSeconds(start time.Time) float64 { return time.Since(start).Seconds() } - -// CollectVolumeStatCalDuration collects the duration in seconds to calculate volume stats. -func CollectVolumeStatCalDuration(metricSource string, start time.Time) { - VolumeStatCalDuration.WithLabelValues(metricSource).Observe(SinceInSeconds(start)) -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/server/server.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/server/server.go index 127192e00f74..28dfc44977ca 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/server/server.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/server/server.go @@ -353,6 +353,7 @@ func (s *Server) InstallDefaultHandlers() { s.addMetricsBucketMatcher("metrics/cadvisor") s.addMetricsBucketMatcher("metrics/probes") s.addMetricsBucketMatcher("metrics/resource") + //nolint:staticcheck // SA1019 https://github.com/kubernetes/enhancements/issues/1206 s.restfulCont.Handle(metricsPath, legacyregistry.Handler()) // cAdvisor metrics are exposed under the secured handler as well @@ -367,7 +368,6 @@ func (s *Server) InstallDefaultHandlers() { cadvisormetrics.NetworkUsageMetrics: struct{}{}, cadvisormetrics.AppMetrics: struct{}{}, cadvisormetrics.ProcessMetrics: struct{}{}, - cadvisormetrics.OOMMetrics: struct{}{}, } // Only add the Accelerator metrics if the feature is inactive diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/volume_stat_calculator.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/volume_stat_calculator.go index f2580e0e679e..63e9b1e7c396 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/volume_stat_calculator.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/server/stats/volume_stat_calculator.go @@ -177,10 +177,7 @@ func (s *volumeStatCalculator) calcAndStoreStats() { // parsePodVolumeStats converts (internal) volume.Metrics to (external) stats.VolumeStats structures func (s *volumeStatCalculator) parsePodVolumeStats(podName string, pvcRef *stats.PVCReference, metric *volume.Metrics, volSpec v1.Volume) stats.VolumeStats { - var ( - available, capacity, used, inodes, inodesFree, inodesUsed uint64 - ) - + var available, capacity, used, inodes, inodesFree, inodesUsed uint64 if metric.Available != nil { available = uint64(metric.Available.Value()) } @@ -200,18 +197,10 @@ func (s *volumeStatCalculator) parsePodVolumeStats(podName string, pvcRef *stats inodesUsed = uint64(metric.InodesUsed.Value()) } - volumeStats := stats.VolumeStats{ + return stats.VolumeStats{ Name: podName, PVCRef: pvcRef, FsStats: stats.FsStats{Time: metric.Time, AvailableBytes: &available, CapacityBytes: &capacity, UsedBytes: &used, Inodes: &inodes, InodesFree: &inodesFree, InodesUsed: &inodesUsed}, } - - if metric.Abnormal != nil { - volumeStats.VolumeHealthStats = &stats.VolumeHealthStats{ - Abnormal: *metric.Abnormal, - } - } - - return volumeStats } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/stats/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/stats/OWNERS index 4971e7564611..aaf2a60392da 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/stats/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/stats/OWNERS @@ -1,3 +1,3 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - dashpole +- dashpole diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/stats/host_stats_provider.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/stats/host_stats_provider.go index a9d6717843b2..450b832bff5a 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/stats/host_stats_provider.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/stats/host_stats_provider.go @@ -31,7 +31,7 @@ import ( ) // PodEtcHostsPathFunc is a function to fetch a etc hosts path by pod uid and whether etc host path is supported by the runtime -type PodEtcHostsPathFunc func(podUID types.UID) string +type PodEtcHostsPathFunc func(podUID types.UID) (string, bool) // metricsProviderByPath maps a path to its metrics provider type metricsProviderByPath map[string]volume.MetricsProvider @@ -81,7 +81,10 @@ func (h hostStatsProvider) getPodContainerLogStats(podNamespace, podName string, // getPodEtcHostsStats gets status for pod etc hosts usage func (h hostStatsProvider) getPodEtcHostsStats(podUID types.UID, rootFsInfo *cadvisorapiv2.FsInfo) (*statsapi.FsStats, error) { // Runtimes may not support etc hosts file (Windows with docker) - podEtcHostsPath := h.podEtcHostsPathFunc(podUID) + podEtcHostsPath, isEtcHostsSupported := h.podEtcHostsPathFunc(podUID) + if !isEtcHostsSupported { + return nil, nil + } // Some pods have an explicit /etc/hosts mount and the Kubelet will not create an etc-hosts file for them if _, err := os.Stat(podEtcHostsPath); os.IsNotExist(err) { return nil, nil diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/stats/pidlimit/pidlimit_linux.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/stats/pidlimit/pidlimit_linux.go index 5ee620fdc83e..12141974299a 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/stats/pidlimit/pidlimit_linux.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/stats/pidlimit/pidlimit_linux.go @@ -20,14 +20,12 @@ limitations under the License. package pidlimit import ( - "fmt" "io/ioutil" "strconv" - "strings" "syscall" "time" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1" statsapi "k8s.io/kubelet/pkg/apis/stats/v1alpha1" ) @@ -35,53 +33,18 @@ import ( func Stats() (*statsapi.RlimitStats, error) { rlimit := &statsapi.RlimitStats{} - taskMax := int64(-1) - // Calculate the mininum of kernel.pid_max and kernel.threads-max as they both specify the - // system-wide limit on the number of tasks. - for _, file := range []string{"/proc/sys/kernel/pid_max", "/proc/sys/kernel/threads-max"} { - if content, err := ioutil.ReadFile(file); err == nil { - if limit, err := strconv.ParseInt(string(content[:len(content)-1]), 10, 64); err == nil { - if taskMax == -1 || taskMax > limit { - taskMax = limit - } - } + if content, err := ioutil.ReadFile("/proc/sys/kernel/pid_max"); err == nil { + if maxPid, err := strconv.ParseInt(string(content[:len(content)-1]), 10, 64); err == nil { + rlimit.MaxPID = &maxPid } } - // Both reads did not fail. - if taskMax >= 0 { - rlimit.MaxPID = &taskMax - } - // Prefer to read "/proc/loadavg" when possible because sysinfo(2) - // returns truncated number when greater than 65538. See - // https://github.com/kubernetes/kubernetes/issues/107107 - if procs, err := runningTaskCount(); err == nil { - rlimit.NumOfRunningProcesses = &procs - } else { - var info syscall.Sysinfo_t - syscall.Sysinfo(&info) - procs := int64(info.Procs) - rlimit.NumOfRunningProcesses = &procs - } + var info syscall.Sysinfo_t + syscall.Sysinfo(&info) + procs := int64(info.Procs) + rlimit.NumOfRunningProcesses = &procs rlimit.Time = v1.NewTime(time.Now()) return rlimit, nil } - -func runningTaskCount() (int64, error) { - // Example: 1.36 3.49 4.53 2/3518 3715089 - bytes, err := ioutil.ReadFile("/proc/loadavg") - if err != nil { - return 0, err - } - fields := strings.Fields(string(bytes)) - if len(fields) < 5 { - return 0, fmt.Errorf("not enough fields in /proc/loadavg") - } - subfields := strings.Split(fields[3], "/") - if len(subfields) != 2 { - return 0, fmt.Errorf("error parsing fourth field of /proc/loadavg") - } - return strconv.ParseInt(subfields[1], 10, 64) -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/status/status_manager.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/status/status_manager.go index 377d44b4718e..051f0edda908 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/status/status_manager.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/status/status_manager.go @@ -83,10 +83,8 @@ type PodStatusProvider interface { // PodDeletionSafetyProvider provides guarantees that a pod can be safely deleted. type PodDeletionSafetyProvider interface { - // PodResourcesAreReclaimed returns true if the pod can safely be deleted. + // A function which returns true if the pod can safely be deleted PodResourcesAreReclaimed(pod *v1.Pod, status v1.PodStatus) bool - // PodCouldHaveRunningContainers returns true if the pod could have running containers. - PodCouldHaveRunningContainers(pod *v1.Pod) bool } // Manager is the Source of truth for kubelet pod status, and should be kept up-to-date with @@ -326,14 +324,6 @@ func findContainerStatus(status *v1.PodStatus, containerID string) (containerSta } -// TerminatePod ensures that the status of containers is properly defaulted at the end of the pod -// lifecycle. As the Kubelet must reconcile with the container runtime to observe container status -// there is always the possibility we are unable to retrieve one or more container statuses due to -// garbage collection, admin action, or loss of temporary data on a restart. This method ensures -// that any absent container status is treated as a failure so that we do not incorrectly describe -// the pod as successful. If we have not yet initialized the pod in the presence of init containers, -// the init container failure status is sufficient to describe the pod as failing, and we do not need -// to override waiting containers (unless there is evidence the pod previously started those containers). func (m *manager) TerminatePod(pod *v1.Pod) { m.podStatusesLock.Lock() defer m.podStatusesLock.Unlock() @@ -345,26 +335,19 @@ func (m *manager) TerminatePod(pod *v1.Pod) { oldStatus = &cachedStatus.status } status := *oldStatus.DeepCopy() - - // once a pod has initialized, any missing status is treated as a failure - if hasPodInitialized(pod) { - for i := range status.ContainerStatuses { - if status.ContainerStatuses[i].State.Terminated != nil { - continue - } - status.ContainerStatuses[i].State = v1.ContainerState{ - Terminated: &v1.ContainerStateTerminated{ - Reason: "ContainerStatusUnknown", - Message: "The container could not be located when the pod was terminated", - ExitCode: 137, - }, - } + for i := range status.ContainerStatuses { + if status.ContainerStatuses[i].State.Terminated != nil { + continue + } + status.ContainerStatuses[i].State = v1.ContainerState{ + Terminated: &v1.ContainerStateTerminated{ + Reason: "ContainerStatusUnknown", + Message: "The container could not be located when the pod was terminated", + ExitCode: 137, + }, } } - - // all but the final suffix of init containers which have no evidence of a container start are - // marked as failed containers - for i := range initializedContainers(status.InitContainerStatuses) { + for i := range status.InitContainerStatuses { if status.InitContainerStatuses[i].State.Terminated != nil { continue } @@ -381,49 +364,6 @@ func (m *manager) TerminatePod(pod *v1.Pod) { m.updateStatusInternal(pod, status, true) } -// hasPodInitialized returns true if the pod has no evidence of ever starting a regular container, which -// implies those containers should not be transitioned to terminated status. -func hasPodInitialized(pod *v1.Pod) bool { - // a pod without init containers is always initialized - if len(pod.Spec.InitContainers) == 0 { - return true - } - // if any container has ever moved out of waiting state, the pod has initialized - for _, status := range pod.Status.ContainerStatuses { - if status.LastTerminationState.Terminated != nil || status.State.Waiting == nil { - return true - } - } - // if the last init container has ever completed with a zero exit code, the pod is initialized - if l := len(pod.Status.InitContainerStatuses); l > 0 { - container := pod.Status.InitContainerStatuses[l-1] - if state := container.LastTerminationState; state.Terminated != nil && state.Terminated.ExitCode == 0 { - return true - } - if state := container.State; state.Terminated != nil && state.Terminated.ExitCode == 0 { - return true - } - } - // otherwise the pod has no record of being initialized - return false -} - -// initializedContainers returns all status except for suffix of containers that are in Waiting -// state, which is the set of containers that have attempted to start at least once. If all containers -// are Watiing, the first container is always returned. -func initializedContainers(containers []v1.ContainerStatus) []v1.ContainerStatus { - for i := len(containers) - 1; i >= 0; i-- { - if containers[i].State.Waiting == nil || containers[i].LastTerminationState.Terminated != nil { - return containers[0 : i+1] - } - } - // always return at least one container - if len(containers) > 0 { - return containers[0:1] - } - return nil -} - // checkContainerStateTransition ensures that no container is trying to transition // from a terminated to non-terminated state, which is illegal and indicates a // logical error in the kubelet. @@ -499,7 +439,7 @@ func (m *manager) updateStatusInternal(pod *v1.Pod, status v1.PodStatus, forceUp // Perform some more extensive logging of container termination state to assist in // debugging production races (generally not needed). - if klogV := klog.V(5); klogV.Enabled() { + if klog.V(5).Enabled() { var containers []string for _, s := range append(append([]v1.ContainerStatus(nil), status.InitContainerStatuses...), status.ContainerStatuses...) { var current, previous string @@ -526,7 +466,7 @@ func (m *manager) updateStatusInternal(pod *v1.Pod, status v1.PodStatus, forceUp containers = append(containers, fmt.Sprintf("(%s state=%s previous=%s)", s.Name, current, previous)) } sort.Strings(containers) - klogV.InfoS("updateStatusInternal", "version", cachedStatus.version+1, "pod", klog.KObj(pod), "podUID", pod.UID, "containers", strings.Join(containers, " ")) + klog.InfoS("updateStatusInternal", "version", cachedStatus.version+1, "pod", klog.KObj(pod), "podUID", pod.UID, "containers", strings.Join(containers, " ")) } // The intent here is to prevent concurrent updates to a pod's status from @@ -679,9 +619,8 @@ func (m *manager) syncPod(uid types.UID, status versionedPodStatus) { return } - mergedStatus := mergePodStatus(pod.Status, status.status, m.podDeletionSafety.PodCouldHaveRunningContainers(pod)) - - newPod, patchBytes, unchanged, err := statusutil.PatchPodStatus(m.kubeClient, pod.Namespace, pod.Name, pod.UID, pod.Status, mergedStatus) + oldStatus := pod.Status.DeepCopy() + newPod, patchBytes, unchanged, err := statusutil.PatchPodStatus(m.kubeClient, pod.Namespace, pod.Name, pod.UID, *oldStatus, mergePodStatus(*oldStatus, status.status)) klog.V(3).InfoS("Patch status for pod", "pod", klog.KObj(pod), "patch", string(patchBytes)) if err != nil { @@ -691,7 +630,7 @@ func (m *manager) syncPod(uid types.UID, status versionedPodStatus) { if unchanged { klog.V(3).InfoS("Status for pod is up-to-date", "pod", klog.KObj(pod), "statusVersion", status.version) } else { - klog.V(3).InfoS("Status for pod updated successfully", "pod", klog.KObj(pod), "statusVersion", status.version, "status", mergedStatus) + klog.V(3).InfoS("Status for pod updated successfully", "pod", klog.KObj(pod), "statusVersion", status.version, "status", status.status) pod = newPod } @@ -832,49 +771,25 @@ func normalizeStatus(pod *v1.Pod, status *v1.PodStatus) *v1.PodStatus { return status } -// mergePodStatus merges oldPodStatus and newPodStatus to preserve where pod conditions -// not owned by kubelet and to ensure terminal phase transition only happens after all -// running containers have terminated. This method does not modify the old status. -func mergePodStatus(oldPodStatus, newPodStatus v1.PodStatus, couldHaveRunningContainers bool) v1.PodStatus { - podConditions := make([]v1.PodCondition, 0, len(oldPodStatus.Conditions)+len(newPodStatus.Conditions)) - +// mergePodStatus merges oldPodStatus and newPodStatus where pod conditions +// not owned by kubelet is preserved from oldPodStatus +func mergePodStatus(oldPodStatus, newPodStatus v1.PodStatus) v1.PodStatus { + podConditions := []v1.PodCondition{} for _, c := range oldPodStatus.Conditions { if !kubetypes.PodConditionByKubelet(c.Type) { podConditions = append(podConditions, c) } } + for _, c := range newPodStatus.Conditions { if kubetypes.PodConditionByKubelet(c.Type) { podConditions = append(podConditions, c) } } newPodStatus.Conditions = podConditions - - // Delay transitioning a pod to a terminal status unless the pod is actually terminal. - // The Kubelet should never transition a pod to terminal status that could have running - // containers and thus actively be leveraging exclusive resources. Note that resources - // like volumes are reconciled by a subsystem in the Kubelet and will converge if a new - // pod reuses an exclusive resource (unmount -> free -> mount), which means we do not - // need wait for those resources to be detached by the Kubelet. In general, resources - // the Kubelet exclusively owns must be released prior to a pod being reported terminal, - // while resources that have participanting components above the API use the pod's - // transition to a terminal phase (or full deletion) to release those resources. - if !isPhaseTerminal(oldPodStatus.Phase) && isPhaseTerminal(newPodStatus.Phase) { - if couldHaveRunningContainers { - newPodStatus.Phase = oldPodStatus.Phase - newPodStatus.Reason = oldPodStatus.Reason - newPodStatus.Message = oldPodStatus.Message - } - } - return newPodStatus } -// isPhaseTerminal returns true if the pod's phase is terminal. -func isPhaseTerminal(phase v1.PodPhase) bool { - return phase == v1.PodFailed || phase == v1.PodSucceeded -} - // NeedToReconcilePodReadiness returns if the pod "Ready" condition need to be reconcile func NeedToReconcilePodReadiness(pod *v1.Pod) bool { if len(pod.Spec.ReadinessGates) == 0 { diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/token/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/token/OWNERS index e9f4e0b7241e..c6c376de4e1e 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/token/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/token/OWNERS @@ -1,8 +1,9 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - sig-auth-serviceaccounts-approvers +- sig-auth-serviceaccounts-approvers reviewers: - - sig-auth-serviceaccounts-reviewers +- sig-auth-serviceaccounts-reviewers labels: - - sig/auth +- sig/auth + diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/types/constants.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/types/constants.go index 9891348362e3..913a526b06a1 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/types/constants.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/types/constants.go @@ -27,6 +27,7 @@ const ( // Different container runtimes. const ( + DockerContainerRuntime = "docker" RemoteContainerRuntime = "remote" ) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/util/manager/cache_based_manager.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/util/manager/cache_based_manager.go index c291cfe91d9d..a9321919c95f 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/util/manager/cache_based_manager.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/util/manager/cache_based_manager.go @@ -29,7 +29,6 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/utils/clock" ) @@ -43,7 +42,6 @@ type GetObjectFunc func(string, string, metav1.GetOptions) (runtime.Object, erro type objectKey struct { namespace string name string - uid types.UID } // objectStoreItems is a single item stored in objectStore. @@ -228,7 +226,7 @@ func (c *cacheBasedManager) RegisterPod(pod *v1.Pod) { c.objectStore.AddReference(pod.Namespace, name) } var prev *v1.Pod - key := objectKey{namespace: pod.Namespace, name: pod.Name, uid: pod.UID} + key := objectKey{namespace: pod.Namespace, name: pod.Name} prev = c.registeredPods[key] c.registeredPods[key] = pod if prev != nil { @@ -245,7 +243,7 @@ func (c *cacheBasedManager) RegisterPod(pod *v1.Pod) { func (c *cacheBasedManager) UnregisterPod(pod *v1.Pod) { var prev *v1.Pod - key := objectKey{namespace: pod.Namespace, name: pod.Name, uid: pod.UID} + key := objectKey{namespace: pod.Namespace, name: pod.Name} c.lock.Lock() defer c.lock.Unlock() prev = c.registeredPods[key] diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volume_host.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volume_host.go index fe880506b2b8..d2e538539bd3 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volume_host.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volume_host.go @@ -270,20 +270,6 @@ func (kvh *kubeletVolumeHost) GetNodeLabels() (map[string]string, error) { return node.Labels, nil } -func (kvh *kubeletVolumeHost) GetAttachedVolumesFromNodeStatus() (map[v1.UniqueVolumeName]string, error) { - node, err := kvh.kubelet.GetNode() - if err != nil { - return nil, fmt.Errorf("error retrieving node: %v", err) - } - attachedVolumes := node.Status.VolumesAttached - result := map[v1.UniqueVolumeName]string{} - for i := range attachedVolumes { - attachedVolume := attachedVolumes[i] - result[attachedVolume.Name] = attachedVolume.DevicePath - } - return result, nil -} - func (kvh *kubeletVolumeHost) GetNodeName() types.NodeName { return kvh.kubelet.nodeName } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/OWNERS index 6648d20c52fe..22ed1d227024 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/OWNERS @@ -1,7 +1,15 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - jingxu97 - - sig-storage-approvers +- saad-ali +- jsafrane +- msau42 +- jingxu97 reviewers: - - sig-storage-reviewers +- jsafrane +- gnufied +- rootfs +- jingxu97 +- msau42 +- verult +- davidz627 diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/actual_state_of_world.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/actual_state_of_world.go index 7deb6df910dc..b048cf0ecd9c 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/actual_state_of_world.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/actual_state_of_world.go @@ -25,9 +25,10 @@ import ( "sync" v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/types" + utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/klog/v2" + "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/volume" "k8s.io/kubernetes/pkg/volume/util" "k8s.io/kubernetes/pkg/volume/util/operationexecutor" @@ -107,7 +108,7 @@ type ActualStateOfWorld interface { // volumes, depend on this to update the contents of the volume. // All volume mounting calls should be idempotent so a second mount call for // volumes that do not need to update contents should not fail. - PodExistsInVolume(podName volumetypes.UniquePodName, volumeName v1.UniqueVolumeName, desiredVolumeSize resource.Quantity) (bool, string, error) + PodExistsInVolume(podName volumetypes.UniquePodName, volumeName v1.UniqueVolumeName) (bool, string, error) // PodRemovedFromVolume returns true if the given pod does not exist in the list of // mountedPods for the given volume in the cache, indicating that the pod has @@ -161,6 +162,11 @@ type ActualStateOfWorld interface { // no longer referenced and may be globally unmounted and detached. GetUnmountedVolumes() []AttachedVolume + // MarkFSResizeRequired marks each volume that is successfully attached and + // mounted for the specified pod as requiring file system resize (if the plugin for the + // volume indicates it requires file system resize). + MarkFSResizeRequired(volumeName v1.UniqueVolumeName, podName volumetypes.UniquePodName) + // GetAttachedVolumes returns a list of volumes that is known to be attached // to the node. This list can be used to determine volumes that are either in-use // or have a mount/unmount operation pending. @@ -280,10 +286,6 @@ type attachedVolume struct { // volumeInUseErrorForExpansion indicates volume driver has previously returned volume-in-use error // for this volume and volume expansion on this node should not be retried volumeInUseErrorForExpansion bool - - // persistentVolumeSize records size of the volume when pod was started or - // size after successful completion of volume expansion operation. - persistentVolumeSize *resource.Quantity } // The mountedPod object represents a pod for which the kubelet volume manager @@ -325,6 +327,10 @@ type mountedPod struct { // volumeGidValue contains the value of the GID annotation, if present. volumeGidValue string + // fsResizeRequired indicates the underlying volume has been successfully + // mounted to this pod but its size has been expanded after that. + fsResizeRequired bool + // volumeMountStateForPod stores state of volume mount for the pod. if it is: // - VolumeMounted: means volume for pod has been successfully mounted // - VolumeMountUncertain: means volume for pod may not be mounted, but it must be unmounted @@ -544,17 +550,30 @@ func (asw *actualStateOfWorld) AddPodToVolume(markVolumeOpts operationexecutor.M return nil } -func (asw *actualStateOfWorld) MarkVolumeAsResized(volumeName v1.UniqueVolumeName, claimSize *resource.Quantity) bool { +func (asw *actualStateOfWorld) MarkVolumeAsResized( + podName volumetypes.UniquePodName, + volumeName v1.UniqueVolumeName) error { asw.Lock() defer asw.Unlock() - volumeObj, ok := asw.attachedVolumes[volumeName] - if ok { - volumeObj.persistentVolumeSize = claimSize - asw.attachedVolumes[volumeName] = volumeObj - return true + volumeObj, volumeExists := asw.attachedVolumes[volumeName] + if !volumeExists { + return fmt.Errorf( + "no volume with the name %q exists in the list of attached volumes", + volumeName) } - return false + + podObj, podExists := volumeObj.mountedPods[podName] + if !podExists { + return fmt.Errorf( + "no pod with the name %q exists in the mounted pods list of volume %s", + podName, + volumeName) + } + klog.V(5).InfoS("Pod volume has been resized", "uniquePodName", podName, "volumeName", volumeName, "outerVolumeSpecName", podObj.outerVolumeSpecName) + podObj.fsResizeRequired = false + asw.attachedVolumes[volumeName].mountedPods[podName] = podObj + return nil } func (asw *actualStateOfWorld) MarkRemountRequired( @@ -579,6 +598,40 @@ func (asw *actualStateOfWorld) MarkRemountRequired( } } +func (asw *actualStateOfWorld) MarkFSResizeRequired( + volumeName v1.UniqueVolumeName, + podName volumetypes.UniquePodName) { + asw.Lock() + defer asw.Unlock() + volumeObj, volumeExists := asw.attachedVolumes[volumeName] + if !volumeExists { + klog.InfoS("MarkFSResizeRequired for volume failed as volume does not exist", "volumeName", volumeName) + return + } + + podObj, podExists := volumeObj.mountedPods[podName] + if !podExists { + klog.InfoS("MarkFSResizeRequired for volume failed because the pod does not exist", "uniquePodName", podName, "volumeName", volumeName) + return + } + + volumePlugin, err := + asw.volumePluginMgr.FindNodeExpandablePluginBySpec(podObj.volumeSpec) + if err != nil || volumePlugin == nil { + // Log and continue processing + klog.ErrorS(nil, "MarkFSResizeRequired failed to find expandable plugin for volume", "uniquePodName", podObj.podName, "volumeName", volumeObj.volumeName, "volumeSpecName", podObj.volumeSpec.Name()) + return + } + + if volumePlugin.RequiresFSResize() { + if !podObj.fsResizeRequired { + klog.V(3).InfoS("PVC volume of the pod requires file system resize", "uniquePodName", podName, "volumeName", volumeName, "outerVolumeSpecName", podObj.outerVolumeSpecName) + podObj.fsResizeRequired = true + } + asw.attachedVolumes[volumeName].mountedPods[podName] = podObj + } +} + func (asw *actualStateOfWorld) SetDeviceMountState( volumeName v1.UniqueVolumeName, deviceMountState operationexecutor.DeviceMountState, devicePath, deviceMountPath string) error { asw.Lock() @@ -600,30 +653,6 @@ func (asw *actualStateOfWorld) SetDeviceMountState( return nil } -func (asw *actualStateOfWorld) InitializeClaimSize(volumeName v1.UniqueVolumeName, claimSize *resource.Quantity) { - asw.Lock() - defer asw.Unlock() - - volumeObj, ok := asw.attachedVolumes[volumeName] - // only set volume claim size if claimStatusSize is zero - // this can happen when volume was rebuilt after kubelet startup - if ok && volumeObj.persistentVolumeSize == nil { - volumeObj.persistentVolumeSize = claimSize - asw.attachedVolumes[volumeName] = volumeObj - } -} - -func (asw *actualStateOfWorld) GetClaimSize(volumeName v1.UniqueVolumeName) *resource.Quantity { - asw.RLock() - defer asw.RUnlock() - - volumeObj, ok := asw.attachedVolumes[volumeName] - if ok { - return volumeObj.persistentVolumeSize - } - return nil -} - func (asw *actualStateOfWorld) DeletePodFromVolume( podName volumetypes.UniquePodName, volumeName v1.UniqueVolumeName) error { asw.Lock() @@ -664,7 +693,9 @@ func (asw *actualStateOfWorld) DeleteVolume(volumeName v1.UniqueVolumeName) erro return nil } -func (asw *actualStateOfWorld) PodExistsInVolume(podName volumetypes.UniquePodName, volumeName v1.UniqueVolumeName, desiredVolumeSize resource.Quantity) (bool, string, error) { +func (asw *actualStateOfWorld) PodExistsInVolume( + podName volumetypes.UniquePodName, + volumeName v1.UniqueVolumeName) (bool, string, error) { asw.RLock() defer asw.RUnlock() @@ -682,42 +713,16 @@ func (asw *actualStateOfWorld) PodExistsInVolume(podName volumetypes.UniquePodNa if podObj.remountRequired { return true, volumeObj.devicePath, newRemountRequiredError(volumeObj.volumeName, podObj.podName) } - if currentSize, expandVolume := asw.volumeNeedsExpansion(volumeObj, desiredVolumeSize); expandVolume { - return true, volumeObj.devicePath, newFsResizeRequiredError(volumeObj.volumeName, podObj.podName, currentSize) + if podObj.fsResizeRequired && + !volumeObj.volumeInUseErrorForExpansion && + utilfeature.DefaultFeatureGate.Enabled(features.ExpandInUsePersistentVolumes) { + return true, volumeObj.devicePath, newFsResizeRequiredError(volumeObj.volumeName, podObj.podName) } } return podExists, volumeObj.devicePath, nil } -func (asw *actualStateOfWorld) volumeNeedsExpansion(volumeObj attachedVolume, desiredVolumeSize resource.Quantity) (resource.Quantity, bool) { - currentSize := resource.Quantity{} - if volumeObj.persistentVolumeSize != nil { - currentSize = volumeObj.persistentVolumeSize.DeepCopy() - } - if volumeObj.volumeInUseErrorForExpansion { - return currentSize, false - } - if volumeObj.persistentVolumeSize == nil || desiredVolumeSize.IsZero() { - return currentSize, false - } - - if desiredVolumeSize.Cmp(*volumeObj.persistentVolumeSize) > 0 { - volumePlugin, err := asw.volumePluginMgr.FindNodeExpandablePluginBySpec(volumeObj.spec) - if err != nil || volumePlugin == nil { - // Log and continue processing - klog.InfoS("PodExistsInVolume failed to find expandable plugin", - "volume", volumeObj.volumeName, - "volumeSpecName", volumeObj.spec.Name()) - return currentSize, false - } - if volumePlugin.RequiresFSResize() { - return currentSize, true - } - } - return currentSize, false -} - func (asw *actualStateOfWorld) PodRemovedFromVolume( podName volumetypes.UniquePodName, volumeName v1.UniqueVolumeName) bool { @@ -962,31 +967,29 @@ func newRemountRequiredError( // fsResizeRequiredError is an error returned when PodExistsInVolume() found // volume/pod attached/mounted but fsResizeRequired was true, indicating the // given volume receives an resize request after attached/mounted. -type FsResizeRequiredError struct { - CurrentSize resource.Quantity - volumeName v1.UniqueVolumeName - podName volumetypes.UniquePodName +type fsResizeRequiredError struct { + volumeName v1.UniqueVolumeName + podName volumetypes.UniquePodName } -func (err FsResizeRequiredError) Error() string { +func (err fsResizeRequiredError) Error() string { return fmt.Sprintf( "volumeName %q mounted to %q needs to resize file system", err.volumeName, err.podName) } func newFsResizeRequiredError( - volumeName v1.UniqueVolumeName, podName volumetypes.UniquePodName, currentSize resource.Quantity) error { - return FsResizeRequiredError{ - CurrentSize: currentSize, - volumeName: volumeName, - podName: podName, + volumeName v1.UniqueVolumeName, podName volumetypes.UniquePodName) error { + return fsResizeRequiredError{ + volumeName: volumeName, + podName: podName, } } // IsFSResizeRequiredError returns true if the specified error is a // fsResizeRequiredError. func IsFSResizeRequiredError(err error) bool { - _, ok := err.(FsResizeRequiredError) + _, ok := err.(fsResizeRequiredError) return ok } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/desired_state_of_world.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/desired_state_of_world.go index 0a999833a5e4..e56e13b17943 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/desired_state_of_world.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/cache/desired_state_of_world.go @@ -23,7 +23,6 @@ package cache import ( "fmt" "sync" - "time" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" @@ -124,11 +123,6 @@ type DesiredStateOfWorld interface { // MarkVolumeAttachability updates the volume's attachability for a given volume MarkVolumeAttachability(volumeName v1.UniqueVolumeName, attachable bool) - - // UpdatePersistentVolumeSize updates persistentVolumeSize in desired state of the world - // so as it can be compared against actual size and volume expansion performed - // if necessary - UpdatePersistentVolumeSize(volumeName v1.UniqueVolumeName, size *resource.Quantity) } // VolumeToMount represents a volume that is attached to this node and needs to @@ -191,10 +185,6 @@ type volumeToMount struct { // desiredSizeLimit indicates the desired upper bound on the size of the volume // (if so implemented) desiredSizeLimit *resource.Quantity - - // persistentVolumeSize records desired size of a persistent volume. - // Usually this value reflects size recorded in pv.Spec.Capacity - persistentVolumeSize *resource.Quantity } // The pod object represents a pod that references the underlying volume and @@ -217,8 +207,6 @@ type podToMount struct { // volume claim, this contains the volume.Spec.Name() of the persistent // volume claim outerVolumeSpecName string - // mountRequestTime stores time at which mount was requested - mountRequestTime time.Time } const ( @@ -283,7 +271,7 @@ func (dsw *desiredStateOfWorld) AddPodToVolume( } } } - vmt := volumeToMount{ + dsw.volumesToMount[volumeName] = volumeToMount{ volumeName: volumeName, podsToMount: make(map[types.UniquePodName]podToMount), pluginIsAttachable: attachable, @@ -292,21 +280,6 @@ func (dsw *desiredStateOfWorld) AddPodToVolume( reportedInUse: false, desiredSizeLimit: sizeLimit, } - // record desired size of the volume - if volumeSpec.PersistentVolume != nil { - pvCap := volumeSpec.PersistentVolume.Spec.Capacity.Storage() - if pvCap != nil { - pvCapCopy := pvCap.DeepCopy() - vmt.persistentVolumeSize = &pvCapCopy - } - } - - dsw.volumesToMount[volumeName] = vmt - } - oldPodMount, ok := dsw.volumesToMount[volumeName].podsToMount[podName] - mountRequestTime := time.Now() - if ok && !volumePlugin.RequiresRemount(volumeSpec) { - mountRequestTime = oldPodMount.mountRequestTime } // Create new podToMount object. If it already exists, it is refreshed with @@ -317,7 +290,6 @@ func (dsw *desiredStateOfWorld) AddPodToVolume( pod: pod, volumeSpec: volumeSpec, outerVolumeSpecName: outerVolumeSpecName, - mountRequestTime: mountRequestTime, } return volumeName, nil } @@ -366,19 +338,6 @@ func (dsw *desiredStateOfWorld) DeletePodFromVolume( } } -// UpdatePersistentVolumeSize updates last known PV size. This is used for volume expansion and -// should be only used for persistent volumes. -func (dsw *desiredStateOfWorld) UpdatePersistentVolumeSize(volumeName v1.UniqueVolumeName, size *resource.Quantity) { - dsw.Lock() - defer dsw.Unlock() - - vol, volExists := dsw.volumesToMount[volumeName] - if volExists { - vol.persistentVolumeSize = size - dsw.volumesToMount[volumeName] = vol - } -} - func (dsw *desiredStateOfWorld) VolumeExists( volumeName v1.UniqueVolumeName) bool { dsw.RLock() @@ -435,25 +394,20 @@ func (dsw *desiredStateOfWorld) GetVolumesToMount() []VolumeToMount { volumesToMount := make([]VolumeToMount, 0 /* len */, len(dsw.volumesToMount) /* cap */) for volumeName, volumeObj := range dsw.volumesToMount { for podName, podObj := range volumeObj.podsToMount { - vmt := VolumeToMount{ - VolumeToMount: operationexecutor.VolumeToMount{ - VolumeName: volumeName, - PodName: podName, - Pod: podObj.pod, - VolumeSpec: podObj.volumeSpec, - PluginIsAttachable: volumeObj.pluginIsAttachable, - PluginIsDeviceMountable: volumeObj.pluginIsDeviceMountable, - OuterVolumeSpecName: podObj.outerVolumeSpecName, - VolumeGidValue: volumeObj.volumeGidValue, - ReportedInUse: volumeObj.reportedInUse, - MountRequestTime: podObj.mountRequestTime, - DesiredSizeLimit: volumeObj.desiredSizeLimit, - }, - } - if volumeObj.persistentVolumeSize != nil { - vmt.PersistentVolumeSize = volumeObj.persistentVolumeSize.DeepCopy() - } - volumesToMount = append(volumesToMount, vmt) + volumesToMount = append( + volumesToMount, + VolumeToMount{ + VolumeToMount: operationexecutor.VolumeToMount{ + VolumeName: volumeName, + PodName: podName, + Pod: podObj.pod, + VolumeSpec: podObj.volumeSpec, + PluginIsAttachable: volumeObj.pluginIsAttachable, + PluginIsDeviceMountable: volumeObj.pluginIsDeviceMountable, + OuterVolumeSpecName: podObj.outerVolumeSpecName, + VolumeGidValue: volumeObj.volumeGidValue, + ReportedInUse: volumeObj.reportedInUse, + DesiredSizeLimit: volumeObj.desiredSizeLimit}}) } } return volumesToMount diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/populator/desired_state_of_world_populator.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/populator/desired_state_of_world_populator.go index 8bb12d194133..fff3c0586054 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/populator/desired_state_of_world_populator.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/populator/desired_state_of_world_populator.go @@ -34,8 +34,10 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" + utilfeature "k8s.io/apiserver/pkg/util/feature" clientset "k8s.io/client-go/kubernetes" "k8s.io/component-helpers/storage/ephemeral" + "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/kubelet/config" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/pod" @@ -186,21 +188,24 @@ func (dswp *desiredStateOfWorldPopulator) populatorLoop() { func (dswp *desiredStateOfWorldPopulator) findAndAddNewPods() { // Map unique pod name to outer volume name to MountedVolume. mountedVolumesForPod := make(map[volumetypes.UniquePodName]map[string]cache.MountedVolume) - for _, mountedVolume := range dswp.actualStateOfWorld.GetMountedVolumes() { - mountedVolumes, exist := mountedVolumesForPod[mountedVolume.PodName] - if !exist { - mountedVolumes = make(map[string]cache.MountedVolume) - mountedVolumesForPod[mountedVolume.PodName] = mountedVolumes + if utilfeature.DefaultFeatureGate.Enabled(features.ExpandInUsePersistentVolumes) { + for _, mountedVolume := range dswp.actualStateOfWorld.GetMountedVolumes() { + mountedVolumes, exist := mountedVolumesForPod[mountedVolume.PodName] + if !exist { + mountedVolumes = make(map[string]cache.MountedVolume) + mountedVolumesForPod[mountedVolume.PodName] = mountedVolumes + } + mountedVolumes[mountedVolume.OuterVolumeSpecName] = mountedVolume } - mountedVolumes[mountedVolume.OuterVolumeSpecName] = mountedVolume } + processedVolumesForFSResize := sets.NewString() for _, pod := range dswp.podManager.GetPods() { if dswp.podStateProvider.ShouldPodContainersBeTerminating(pod.UID) { // Do not (re)add volumes for pods that can't also be starting containers continue } - dswp.processPodVolumes(pod, mountedVolumesForPod) + dswp.processPodVolumes(pod, mountedVolumesForPod, processedVolumesForFSResize) } } @@ -269,7 +274,8 @@ func (dswp *desiredStateOfWorldPopulator) findAndRemoveDeletedPods() { // desired state of the world. func (dswp *desiredStateOfWorldPopulator) processPodVolumes( pod *v1.Pod, - mountedVolumesForPod map[volumetypes.UniquePodName]map[string]cache.MountedVolume) { + mountedVolumesForPod map[volumetypes.UniquePodName]map[string]cache.MountedVolume, + processedVolumesForFSResize sets.String) { if pod == nil { return } @@ -282,6 +288,7 @@ func (dswp *desiredStateOfWorldPopulator) processPodVolumes( allVolumesAdded := true mounts, devices := util.GetPodVolumeNames(pod) + expandInUsePV := utilfeature.DefaultFeatureGate.Enabled(features.ExpandInUsePersistentVolumes) // Process volume spec for each volume defined in pod for _, podVolume := range pod.Spec.Volumes { if !mounts.Has(podVolume.Name) && !devices.Has(podVolume.Name) { @@ -312,7 +319,10 @@ func (dswp *desiredStateOfWorldPopulator) processPodVolumes( // sync reconstructed volume dswp.actualStateOfWorld.SyncReconstructedVolume(uniqueVolumeName, uniquePodName, podVolume.Name) - dswp.checkVolumeFSResize(pod, podVolume, pvc, volumeSpec, uniquePodName, mountedVolumesForPod) + if expandInUsePV { + dswp.checkVolumeFSResize(pod, podVolume, pvc, volumeSpec, + uniquePodName, mountedVolumesForPod, processedVolumesForFSResize) + } } // some of the volume additions may have failed, should not mark this pod as fully processed @@ -333,17 +343,22 @@ func (dswp *desiredStateOfWorldPopulator) processPodVolumes( } -// checkVolumeFSResize records desired PVC size for a volume mounted by the pod. -// It is used for comparison with actual size(coming from pvc.Status.Capacity) and calling -// volume expansion on the node if needed. +// checkVolumeFSResize checks whether a PVC mounted by the pod requires file +// system resize or not. If so, marks this volume as fsResizeRequired in ASW. +// - mountedVolumesForPod stores all mounted volumes in ASW, because online +// volume resize only considers mounted volumes. +// - processedVolumesForFSResize stores all volumes we have checked in current loop, +// because file system resize operation is a global operation for volume, so +// we only need to check it once if more than one pod use it. func (dswp *desiredStateOfWorldPopulator) checkVolumeFSResize( pod *v1.Pod, podVolume v1.Volume, pvc *v1.PersistentVolumeClaim, volumeSpec *volume.Spec, uniquePodName volumetypes.UniquePodName, - mountedVolumesForPod map[volumetypes.UniquePodName]map[string]cache.MountedVolume) { - if podVolume.PersistentVolumeClaim == nil || pvc == nil { + mountedVolumesForPod map[volumetypes.UniquePodName]map[string]cache.MountedVolume, + processedVolumesForFSResize sets.String) { + if podVolume.PersistentVolumeClaim == nil { // Only PVC supports resize operation. return } @@ -354,6 +369,11 @@ func (dswp *desiredStateOfWorldPopulator) checkVolumeFSResize( // or online resize in subsequent loop(after we confirm it has been mounted). return } + if processedVolumesForFSResize.Has(string(uniqueVolumeName)) { + // File system resize operation is a global operation for volume, + // so we only need to check it once if more than one pod use it. + return + } // volumeSpec.ReadOnly is the value that determines if volume could be formatted when being mounted. // This is the same flag that determines filesystem resizing behaviour for offline resizing and hence // we should use it here. This value comes from Pod.spec.volumes.persistentVolumeClaim.readOnly. @@ -362,12 +382,10 @@ func (dswp *desiredStateOfWorldPopulator) checkVolumeFSResize( klog.V(5).InfoS("Skip file system resize check for the volume, as the volume is mounted as readonly", "pod", klog.KObj(pod), "volumeName", podVolume.Name) return } - pvCap := volumeSpec.PersistentVolume.Spec.Capacity.Storage() - pvcStatusCap := pvc.Status.Capacity.Storage() - dswp.desiredStateOfWorld.UpdatePersistentVolumeSize(uniqueVolumeName, pvCap) - - // in case the actualStateOfWorld was rebuild after kubelet restart ensure that claimSize is set to accurate value - dswp.actualStateOfWorld.InitializeClaimSize(uniqueVolumeName, pvcStatusCap) + if volumeRequiresFSResize(pvc, volumeSpec.PersistentVolume) { + dswp.actualStateOfWorld.MarkFSResizeRequired(uniqueVolumeName, uniquePodName) + } + processedVolumesForFSResize.Insert(string(uniqueVolumeName)) } func getUniqueVolumeName( @@ -385,6 +403,12 @@ func getUniqueVolumeName( return mountedVolume.VolumeName, true } +func volumeRequiresFSResize(pvc *v1.PersistentVolumeClaim, pv *v1.PersistentVolume) bool { + capacity := pvc.Status.Capacity[v1.ResourceStorage] + requested := pv.Spec.Capacity[v1.ResourceStorage] + return requested.Cmp(capacity) > 0 +} + // podPreviouslyProcessed returns true if the volumes for this pod have already // been processed/reprocessed by the populator. Otherwise, the volumes for this pod need to // be reprocessed. diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler/reconciler.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler/reconciler.go index c9af55e62c2c..32ce780267c1 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler/reconciler.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler/reconciler.go @@ -28,8 +28,6 @@ import ( "path/filepath" "time" - "k8s.io/apimachinery/pkg/api/resource" - "k8s.io/klog/v2" "k8s.io/mount-utils" utilpath "k8s.io/utils/path" @@ -39,7 +37,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" + utilfeature "k8s.io/apiserver/pkg/util/feature" clientset "k8s.io/client-go/kubernetes" + "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/kubelet/config" "k8s.io/kubernetes/pkg/kubelet/volumemanager/cache" "k8s.io/kubernetes/pkg/util/goroutinemap/exponentialbackoff" @@ -171,7 +171,7 @@ func (rc *reconciler) reconcile() { // attach if kubelet is responsible for attaching volumes. // If underlying PVC was resized while in-use then this function also handles volume // resizing. - rc.mountOrAttachVolumes() + rc.mountAttachVolumes() // Ensure devices that should be detached/unmounted are detached/unmounted. rc.unmountDetachDevices() @@ -195,95 +195,78 @@ func (rc *reconciler) unmountVolumes() { } } -func (rc *reconciler) mountOrAttachVolumes() { +func (rc *reconciler) mountAttachVolumes() { // Ensure volumes that should be attached/mounted are attached/mounted. for _, volumeToMount := range rc.desiredStateOfWorld.GetVolumesToMount() { - volMounted, devicePath, err := rc.actualStateOfWorld.PodExistsInVolume(volumeToMount.PodName, volumeToMount.VolumeName, volumeToMount.PersistentVolumeSize) + volMounted, devicePath, err := rc.actualStateOfWorld.PodExistsInVolume(volumeToMount.PodName, volumeToMount.VolumeName) volumeToMount.DevicePath = devicePath if cache.IsVolumeNotAttachedError(err) { - rc.waitForVolumeAttach(volumeToMount) + if rc.controllerAttachDetachEnabled || !volumeToMount.PluginIsAttachable { + // Volume is not attached (or doesn't implement attacher), kubelet attach is disabled, wait + // for controller to finish attaching volume. + klog.V(5).InfoS(volumeToMount.GenerateMsgDetailed("Starting operationExecutor.VerifyControllerAttachedVolume", ""), "pod", klog.KObj(volumeToMount.Pod)) + err := rc.operationExecutor.VerifyControllerAttachedVolume( + volumeToMount.VolumeToMount, + rc.nodeName, + rc.actualStateOfWorld) + if err != nil && !isExpectedError(err) { + klog.ErrorS(err, volumeToMount.GenerateErrorDetailed(fmt.Sprintf("operationExecutor.VerifyControllerAttachedVolume failed (controllerAttachDetachEnabled %v)", rc.controllerAttachDetachEnabled), err).Error(), "pod", klog.KObj(volumeToMount.Pod)) + } + if err == nil { + klog.InfoS(volumeToMount.GenerateMsgDetailed("operationExecutor.VerifyControllerAttachedVolume started", ""), "pod", klog.KObj(volumeToMount.Pod)) + } + } else { + // Volume is not attached to node, kubelet attach is enabled, volume implements an attacher, + // so attach it + volumeToAttach := operationexecutor.VolumeToAttach{ + VolumeName: volumeToMount.VolumeName, + VolumeSpec: volumeToMount.VolumeSpec, + NodeName: rc.nodeName, + } + klog.V(5).InfoS(volumeToAttach.GenerateMsgDetailed("Starting operationExecutor.AttachVolume", ""), "pod", klog.KObj(volumeToMount.Pod)) + err := rc.operationExecutor.AttachVolume(volumeToAttach, rc.actualStateOfWorld) + if err != nil && !isExpectedError(err) { + klog.ErrorS(err, volumeToMount.GenerateErrorDetailed(fmt.Sprintf("operationExecutor.AttachVolume failed (controllerAttachDetachEnabled %v)", rc.controllerAttachDetachEnabled), err).Error(), "pod", klog.KObj(volumeToMount.Pod)) + } + if err == nil { + klog.InfoS(volumeToMount.GenerateMsgDetailed("operationExecutor.AttachVolume started", ""), "pod", klog.KObj(volumeToMount.Pod)) + } + } } else if !volMounted || cache.IsRemountRequiredError(err) { - rc.mountAttachedVolumes(volumeToMount, err) - } else if cache.IsFSResizeRequiredError(err) { - fsResizeRequiredErr, _ := err.(cache.FsResizeRequiredError) - rc.expandVolume(volumeToMount, fsResizeRequiredErr.CurrentSize) - } - } -} - -func (rc *reconciler) expandVolume(volumeToMount cache.VolumeToMount, currentSize resource.Quantity) { - klog.V(4).InfoS(volumeToMount.GenerateMsgDetailed("Starting operationExecutor.ExpandInUseVolume", ""), "pod", klog.KObj(volumeToMount.Pod)) - err := rc.operationExecutor.ExpandInUseVolume(volumeToMount.VolumeToMount, rc.actualStateOfWorld, currentSize) - - if err != nil && !isExpectedError(err) { - klog.ErrorS(err, volumeToMount.GenerateErrorDetailed("operationExecutor.ExpandInUseVolume failed", err).Error(), "pod", klog.KObj(volumeToMount.Pod)) - } - - if err == nil { - klog.V(4).InfoS(volumeToMount.GenerateMsgDetailed("operationExecutor.ExpandInUseVolume started", ""), "pod", klog.KObj(volumeToMount.Pod)) - } -} - -func (rc *reconciler) mountAttachedVolumes(volumeToMount cache.VolumeToMount, podExistError error) { - // Volume is not mounted, or is already mounted, but requires remounting - remountingLogStr := "" - isRemount := cache.IsRemountRequiredError(podExistError) - if isRemount { - remountingLogStr = "Volume is already mounted to pod, but remount was requested." - } - klog.V(4).InfoS(volumeToMount.GenerateMsgDetailed("Starting operationExecutor.MountVolume", remountingLogStr), "pod", klog.KObj(volumeToMount.Pod)) - err := rc.operationExecutor.MountVolume( - rc.waitForAttachTimeout, - volumeToMount.VolumeToMount, - rc.actualStateOfWorld, - isRemount) - if err != nil && !isExpectedError(err) { - klog.ErrorS(err, volumeToMount.GenerateErrorDetailed(fmt.Sprintf("operationExecutor.MountVolume failed (controllerAttachDetachEnabled %v)", rc.controllerAttachDetachEnabled), err).Error(), "pod", klog.KObj(volumeToMount.Pod)) - } - if err == nil { - if remountingLogStr == "" { - klog.V(1).InfoS(volumeToMount.GenerateMsgDetailed("operationExecutor.MountVolume started", remountingLogStr), "pod", klog.KObj(volumeToMount.Pod)) - } else { - klog.V(5).InfoS(volumeToMount.GenerateMsgDetailed("operationExecutor.MountVolume started", remountingLogStr), "pod", klog.KObj(volumeToMount.Pod)) - } - } -} - -func (rc *reconciler) waitForVolumeAttach(volumeToMount cache.VolumeToMount) { - if rc.controllerAttachDetachEnabled || !volumeToMount.PluginIsAttachable { - //// lets not spin a goroutine and unnecessarily trigger exponential backoff if this happens - if volumeToMount.PluginIsAttachable && !volumeToMount.ReportedInUse { - klog.V(5).InfoS(volumeToMount.GenerateMsgDetailed("operationExecutor.VerifyControllerAttachedVolume failed", " volume not marked in-use"), "pod", klog.KObj(volumeToMount.Pod)) - return - } - // Volume is not attached (or doesn't implement attacher), kubelet attach is disabled, wait - // for controller to finish attaching volume. - klog.V(5).InfoS(volumeToMount.GenerateMsgDetailed("Starting operationExecutor.VerifyControllerAttachedVolume", ""), "pod", klog.KObj(volumeToMount.Pod)) - err := rc.operationExecutor.VerifyControllerAttachedVolume( - volumeToMount.VolumeToMount, - rc.nodeName, - rc.actualStateOfWorld) - if err != nil && !isExpectedError(err) { - klog.ErrorS(err, volumeToMount.GenerateErrorDetailed(fmt.Sprintf("operationExecutor.VerifyControllerAttachedVolume failed (controllerAttachDetachEnabled %v)", rc.controllerAttachDetachEnabled), err).Error(), "pod", klog.KObj(volumeToMount.Pod)) - } - if err == nil { - klog.InfoS(volumeToMount.GenerateMsgDetailed("operationExecutor.VerifyControllerAttachedVolume started", ""), "pod", klog.KObj(volumeToMount.Pod)) - } - } else { - // Volume is not attached to node, kubelet attach is enabled, volume implements an attacher, - // so attach it - volumeToAttach := operationexecutor.VolumeToAttach{ - VolumeName: volumeToMount.VolumeName, - VolumeSpec: volumeToMount.VolumeSpec, - NodeName: rc.nodeName, - } - klog.V(5).InfoS(volumeToAttach.GenerateMsgDetailed("Starting operationExecutor.AttachVolume", ""), "pod", klog.KObj(volumeToMount.Pod)) - err := rc.operationExecutor.AttachVolume(volumeToAttach, rc.actualStateOfWorld) - if err != nil && !isExpectedError(err) { - klog.ErrorS(err, volumeToMount.GenerateErrorDetailed(fmt.Sprintf("operationExecutor.AttachVolume failed (controllerAttachDetachEnabled %v)", rc.controllerAttachDetachEnabled), err).Error(), "pod", klog.KObj(volumeToMount.Pod)) - } - if err == nil { - klog.InfoS(volumeToMount.GenerateMsgDetailed("operationExecutor.AttachVolume started", ""), "pod", klog.KObj(volumeToMount.Pod)) + // Volume is not mounted, or is already mounted, but requires remounting + remountingLogStr := "" + isRemount := cache.IsRemountRequiredError(err) + if isRemount { + remountingLogStr = "Volume is already mounted to pod, but remount was requested." + } + klog.V(4).InfoS(volumeToMount.GenerateMsgDetailed("Starting operationExecutor.MountVolume", remountingLogStr), "pod", klog.KObj(volumeToMount.Pod)) + err := rc.operationExecutor.MountVolume( + rc.waitForAttachTimeout, + volumeToMount.VolumeToMount, + rc.actualStateOfWorld, + isRemount) + if err != nil && !isExpectedError(err) { + klog.ErrorS(err, volumeToMount.GenerateErrorDetailed(fmt.Sprintf("operationExecutor.MountVolume failed (controllerAttachDetachEnabled %v)", rc.controllerAttachDetachEnabled), err).Error(), "pod", klog.KObj(volumeToMount.Pod)) + } + if err == nil { + if remountingLogStr == "" { + klog.V(1).InfoS(volumeToMount.GenerateMsgDetailed("operationExecutor.MountVolume started", remountingLogStr), "pod", klog.KObj(volumeToMount.Pod)) + } else { + klog.V(5).InfoS(volumeToMount.GenerateMsgDetailed("operationExecutor.MountVolume started", remountingLogStr), "pod", klog.KObj(volumeToMount.Pod)) + } + } + } else if cache.IsFSResizeRequiredError(err) && + utilfeature.DefaultFeatureGate.Enabled(features.ExpandInUsePersistentVolumes) { + klog.V(4).InfoS(volumeToMount.GenerateMsgDetailed("Starting operationExecutor.ExpandInUseVolume", ""), "pod", klog.KObj(volumeToMount.Pod)) + err := rc.operationExecutor.ExpandInUseVolume( + volumeToMount.VolumeToMount, + rc.actualStateOfWorld) + if err != nil && !isExpectedError(err) { + klog.ErrorS(err, volumeToMount.GenerateErrorDetailed("operationExecutor.ExpandInUseVolume failed", err).Error(), "pod", klog.KObj(volumeToMount.Pod)) + } + if err == nil { + klog.V(4).InfoS(volumeToMount.GenerateMsgDetailed("operationExecutor.ExpandInUseVolume started", ""), "pod", klog.KObj(volumeToMount.Pod)) + } } } } @@ -616,11 +599,7 @@ func getDeviceMountPath(volume *reconstructedVolume) (string, error) { func (rc *reconciler) updateStates(volumesNeedUpdate map[v1.UniqueVolumeName]*reconstructedVolume) error { // Get the node status to retrieve volume device path information. - // Skip reporting devicePath in node objects if kubeClient is nil. - // In standalone mode, kubelet is not expected to mount any attachable volume types or secret, configmaps etc. - if rc.kubeClient != nil { - rc.updateDevicePath(volumesNeedUpdate) - } + rc.updateDevicePath(volumesNeedUpdate) for _, volume := range volumesNeedUpdate { err := rc.actualStateOfWorld.MarkVolumeAsAttached( @@ -725,5 +704,5 @@ func getVolumesFromPodDir(podDir string) ([]podVolume, error) { // ignore nestedpendingoperations.IsAlreadyExists and exponentialbackoff.IsExponentialBackoff errors, they are expected. func isExpectedError(err error) bool { - return nestedpendingoperations.IsAlreadyExists(err) || exponentialbackoff.IsExponentialBackoff(err) || operationexecutor.IsMountFailedPreconditionError(err) + return nestedpendingoperations.IsAlreadyExists(err) || exponentialbackoff.IsExponentialBackoff(err) } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/volume_manager.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/volume_manager.go index b1a84807ca4c..22d89583e54e 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/volume_manager.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/volumemanager/volume_manager.go @@ -180,6 +180,7 @@ func NewVolumeManager( hostutil hostutil.HostUtils, kubeletPodsDir string, recorder record.EventRecorder, + checkNodeCapabilitiesBeforeMount bool, keepTerminatedPodVolumes bool, blockVolumePathHandler volumepathhandler.BlockVolumePathHandler) VolumeManager { @@ -192,6 +193,7 @@ func NewVolumeManager( kubeClient, volumePluginMgr, recorder, + checkNodeCapabilitiesBeforeMount, blockVolumePathHandler)), } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/winstats/perfcounter_nodestats.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/winstats/perfcounter_nodestats.go index 9eee9772f65c..e1b3d413f29a 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/winstats/perfcounter_nodestats.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/winstats/perfcounter_nodestats.go @@ -25,7 +25,6 @@ import ( "os" "os/exec" "runtime" - "strconv" "strings" "sync" "syscall" @@ -34,16 +33,10 @@ import ( cadvisorapi "github.com/google/cadvisor/info/v1" "golang.org/x/sys/windows" - "golang.org/x/sys/windows/registry" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/klog/v2" ) -const ( - bootIdRegistry = `SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters` - bootIdKey = `BootId` -) - // MemoryStatusEx is the same as Windows structure MEMORYSTATUSEX // https://msdn.microsoft.com/en-us/library/windows/desktop/aa366770(v=vs.85).aspx type MemoryStatusEx struct { @@ -151,17 +144,11 @@ func (p *perfCounterNodeStatsClient) getMachineInfo() (*cadvisorapi.MachineInfo, return nil, err } - bootId, err := getBootID() - if err != nil { - return nil, err - } - return &cadvisorapi.MachineInfo{ NumCores: processorCount(), MemoryCapacity: p.nodeInfo.memoryPhysicalCapacityBytes, MachineID: hostname, SystemUUID: systemUUID, - BootID: bootId, }, nil } @@ -288,16 +275,3 @@ func getPhysicallyInstalledSystemMemoryBytes() (uint64, error) { return statex.TotalPhys, nil } - -func getBootID() (string, error) { - regKey, err := registry.OpenKey(registry.LOCAL_MACHINE, bootIdRegistry, registry.READ) - if err != nil { - return "", err - } - defer regKey.Close() - regValue, _, err := regKey.GetIntegerValue(bootIdKey) - if err != nil { - return "", err - } - return strconv.FormatUint(regValue, 10), nil -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/winstats/perfcounters.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/winstats/perfcounters.go index 01573e8ecbfc..4096672657e8 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/winstats/perfcounters.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubelet/winstats/perfcounters.go @@ -57,7 +57,7 @@ func newPerfCounter(counter string) (*perfCounter, error) { ret = win_pdh.PdhAddEnglishCounter(queryHandle, counter, 0, &counterHandle) if ret != win_pdh.ERROR_SUCCESS { - return nil, fmt.Errorf("unable to add process counter: %s. Error code is %x", counter, ret) + return nil, fmt.Errorf("unable to add process counter. Error code is %x", ret) } ret = win_pdh.PdhCollectQueryData(queryHandle) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubemark/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubemark/OWNERS index 16eb9516d790..1b1742e9350a 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubemark/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubemark/OWNERS @@ -8,7 +8,9 @@ approvers: - shyamjvs - sig-scalability-approvers - wojtek-t + emeritus_approvers: - - gmarek +- gmarek + labels: - sig/scalability diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubemark/hollow_kubelet.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubemark/hollow_kubelet.go index 8c0e5e0d4142..3108f610c166 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubemark/hollow_kubelet.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubemark/hollow_kubelet.go @@ -34,7 +34,6 @@ import ( "k8s.io/kubernetes/pkg/kubelet/cadvisor" "k8s.io/kubernetes/pkg/kubelet/cm" containertest "k8s.io/kubernetes/pkg/kubelet/container/testing" - probetest "k8s.io/kubernetes/pkg/kubelet/prober/testing" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/util/oom" "k8s.io/kubernetes/pkg/volume" @@ -72,7 +71,7 @@ func volumePlugins() []volume.VolumePlugin { allPlugins := []volume.VolumePlugin{} allPlugins = append(allPlugins, emptydir.ProbeVolumePlugins()...) allPlugins = append(allPlugins, git_repo.ProbeVolumePlugins()...) - allPlugins = append(allPlugins, hostpath.FakeProbeVolumePlugins(volume.VolumeConfig{})...) + allPlugins = append(allPlugins, hostpath.ProbeVolumePlugins(volume.VolumeConfig{})...) allPlugins = append(allPlugins, nfs.ProbeVolumePlugins(volume.VolumeConfig{})...) allPlugins = append(allPlugins, secret.ProbeVolumePlugins()...) allPlugins = append(allPlugins, iscsi.ProbeVolumePlugins()...) @@ -104,7 +103,6 @@ func NewHollowKubelet( d := &kubelet.Dependencies{ KubeClient: client, HeartbeatClient: heartbeatClient, - ProbeManager: probetest.FakeManager{}, RemoteRuntimeService: runtimeService, RemoteImageService: imageService, CAdvisorInterface: cadvisorInterface, @@ -163,6 +161,7 @@ func GetHollowKubeletConfig(opt *HollowKubletOptions) (*options.KubeletFlags, *k f.MaxContainerCount = 100 f.MaxPerPodContainerCount = 2 f.NodeLabels = opt.NodeLabels + f.ContainerRuntimeOptions.ContainerRuntime = kubetypes.RemoteContainerRuntime f.RegisterSchedulable = true f.RemoteImageEndpoint = "unix:///run/containerd/containerd.sock" diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubemark/hollow_proxy.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubemark/hollow_proxy.go index 205c5fe132ad..8adcbc5f0394 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubemark/hollow_proxy.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/kubemark/hollow_proxy.go @@ -118,17 +118,16 @@ func NewHollowProxyOrDie( } return &HollowProxy{ ProxyServer: &proxyapp.ProxyServer{ - Client: client, - EventClient: eventClient, - IptInterface: iptInterface, - Proxier: proxier, - Broadcaster: broadcaster, - Recorder: recorder, - ProxyMode: "fake", - NodeRef: nodeRef, - UseEndpointSlices: true, - OOMScoreAdj: utilpointer.Int32Ptr(0), - ConfigSyncPeriod: 30 * time.Second, + Client: client, + EventClient: eventClient, + IptInterface: iptInterface, + Proxier: proxier, + Broadcaster: broadcaster, + Recorder: recorder, + ProxyMode: "fake", + NodeRef: nodeRef, + OOMScoreAdj: utilpointer.Int32Ptr(0), + ConfigSyncPeriod: 30 * time.Second, }, }, nil } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/probe/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/probe/OWNERS index 65e322510c3f..c6b409276c6e 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/probe/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/probe/OWNERS @@ -4,5 +4,6 @@ approvers: - sig-node-approvers reviewers: - sig-node-reviewers + labels: - - sig/node +- sig/node diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/probe/http/http.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/probe/http/http.go index b6cc57d512d3..ad034ee3fa4a 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/probe/http/http.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/probe/http/http.go @@ -129,7 +129,7 @@ func DoHTTPProbe(url *url.URL, headers http.Header, client GetHTTPInterface) (pr if res.StatusCode >= http.StatusOK && res.StatusCode < http.StatusBadRequest { if res.StatusCode >= http.StatusMultipleChoices { // Redirect klog.V(4).Infof("Probe terminated redirects for %s, Response: %v", url.String(), *res) - return probe.Warning, fmt.Sprintf("Probe terminated redirects, Response body: %v", body), nil + return probe.Warning, body, nil } klog.V(4).Infof("Probe succeeded for %s, Response: %v", url.String(), *res) return probe.Success, body, nil diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/OWNERS index 675d11afb440..c0d7663ba60b 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/OWNERS @@ -1,8 +1,8 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - sig-network-approvers +- sig-network-approvers reviewers: - - sig-network-reviewers +- sig-network-reviewers labels: - - sig/network +- sig/network diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/OWNERS index 08861f7d8521..8b0c7feef3fb 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/OWNERS @@ -1,8 +1,8 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - thockin +- thockin reviewers: - - sig-network-reviewers +- sig-network-reviewers labels: - - sig/network +- sig/network diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/types.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/types.go index 0f162043d90e..7fedb69261bf 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/types.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/types.go @@ -99,24 +99,6 @@ type KubeProxyWinkernelConfiguration struct { // enableDSR tells kube-proxy whether HNS policies should be created // with DSR EnableDSR bool - // RootHnsEndpointName is the name of hnsendpoint that is attached to - // l2bridge for root network namespace - RootHnsEndpointName string - // ForwardHealthCheckVip forwards service VIP for health check port on - // Windows - ForwardHealthCheckVip bool -} - -// DetectLocalConfiguration contains optional settings related to DetectLocalMode option -type DetectLocalConfiguration struct { - // BridgeInterface is a string argument which represents a single bridge interface name. - // Kube-proxy considers traffic as local if originating from this given bridge. - // This argument should be set if DetectLocalMode is set to BridgeInterface. - BridgeInterface string - // InterfaceNamePrefix is a string argument which represents a single interface prefix name. - // Kube-proxy considers traffic as local if originating from one or more interfaces which match - // the given prefix. This argument should be set if DetectLocalMode is set to InterfaceNamePrefix. - InterfaceNamePrefix string } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -186,8 +168,6 @@ type KubeProxyConfiguration struct { ShowHiddenMetricsForVersion string // DetectLocalMode determines mode to use for detecting local traffic, defaults to LocalModeClusterCIDR DetectLocalMode LocalMode - // DetectLocal contains optional configuration settings related to DetectLocalMode. - DetectLocal DetectLocalConfiguration } // ProxyMode represents modes used by the Kubernetes proxy server. Currently, three modes of proxy are available in @@ -218,15 +198,13 @@ type LocalMode string // Currently supported modes for LocalMode const ( - LocalModeClusterCIDR LocalMode = "ClusterCIDR" - LocalModeNodeCIDR LocalMode = "NodeCIDR" - LocalModeBridgeInterface LocalMode = "BridgeInterface" - LocalModeInterfaceNamePrefix LocalMode = "InterfaceNamePrefix" + LocalModeClusterCIDR LocalMode = "ClusterCIDR" + LocalModeNodeCIDR LocalMode = "NodeCIDR" ) // IPVSSchedulerMethod is the algorithm for allocating TCP connections and -// UDP datagrams to real servers. Scheduling algorithms are implemented as kernel modules. -// Ten are shipped with the Linux Virtual Server. +// UDP datagrams to real servers. Scheduling algorithms are imple- +//wanted as kernel modules. Ten are shipped with the Linux Virtual Server. type IPVSSchedulerMethod string const ( diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/v1alpha1/zz_generated.conversion.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/v1alpha1/zz_generated.conversion.go index 3f4e9eed6a9d..4aee5d357a39 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/v1alpha1/zz_generated.conversion.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/v1alpha1/zz_generated.conversion.go @@ -39,16 +39,6 @@ func init() { // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*v1alpha1.DetectLocalConfiguration)(nil), (*config.DetectLocalConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_DetectLocalConfiguration_To_config_DetectLocalConfiguration(a.(*v1alpha1.DetectLocalConfiguration), b.(*config.DetectLocalConfiguration), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*config.DetectLocalConfiguration)(nil), (*v1alpha1.DetectLocalConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_config_DetectLocalConfiguration_To_v1alpha1_DetectLocalConfiguration(a.(*config.DetectLocalConfiguration), b.(*v1alpha1.DetectLocalConfiguration), scope) - }); err != nil { - return err - } if err := s.AddGeneratedConversionFunc((*v1alpha1.KubeProxyConfiguration)(nil), (*config.KubeProxyConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha1_KubeProxyConfiguration_To_config_KubeProxyConfiguration(a.(*v1alpha1.KubeProxyConfiguration), b.(*config.KubeProxyConfiguration), scope) }); err != nil { @@ -102,28 +92,6 @@ func RegisterConversions(s *runtime.Scheme) error { return nil } -func autoConvert_v1alpha1_DetectLocalConfiguration_To_config_DetectLocalConfiguration(in *v1alpha1.DetectLocalConfiguration, out *config.DetectLocalConfiguration, s conversion.Scope) error { - out.BridgeInterface = in.BridgeInterface - out.InterfaceNamePrefix = in.InterfaceNamePrefix - return nil -} - -// Convert_v1alpha1_DetectLocalConfiguration_To_config_DetectLocalConfiguration is an autogenerated conversion function. -func Convert_v1alpha1_DetectLocalConfiguration_To_config_DetectLocalConfiguration(in *v1alpha1.DetectLocalConfiguration, out *config.DetectLocalConfiguration, s conversion.Scope) error { - return autoConvert_v1alpha1_DetectLocalConfiguration_To_config_DetectLocalConfiguration(in, out, s) -} - -func autoConvert_config_DetectLocalConfiguration_To_v1alpha1_DetectLocalConfiguration(in *config.DetectLocalConfiguration, out *v1alpha1.DetectLocalConfiguration, s conversion.Scope) error { - out.BridgeInterface = in.BridgeInterface - out.InterfaceNamePrefix = in.InterfaceNamePrefix - return nil -} - -// Convert_config_DetectLocalConfiguration_To_v1alpha1_DetectLocalConfiguration is an autogenerated conversion function. -func Convert_config_DetectLocalConfiguration_To_v1alpha1_DetectLocalConfiguration(in *config.DetectLocalConfiguration, out *v1alpha1.DetectLocalConfiguration, s conversion.Scope) error { - return autoConvert_config_DetectLocalConfiguration_To_v1alpha1_DetectLocalConfiguration(in, out, s) -} - func autoConvert_v1alpha1_KubeProxyConfiguration_To_config_KubeProxyConfiguration(in *v1alpha1.KubeProxyConfiguration, out *config.KubeProxyConfiguration, s conversion.Scope) error { out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates)) out.BindAddress = in.BindAddress @@ -156,9 +124,6 @@ func autoConvert_v1alpha1_KubeProxyConfiguration_To_config_KubeProxyConfiguratio } out.ShowHiddenMetricsForVersion = in.ShowHiddenMetricsForVersion out.DetectLocalMode = config.LocalMode(in.DetectLocalMode) - if err := Convert_v1alpha1_DetectLocalConfiguration_To_config_DetectLocalConfiguration(&in.DetectLocal, &out.DetectLocal, s); err != nil { - return err - } return nil } @@ -199,9 +164,6 @@ func autoConvert_config_KubeProxyConfiguration_To_v1alpha1_KubeProxyConfiguratio } out.ShowHiddenMetricsForVersion = in.ShowHiddenMetricsForVersion out.DetectLocalMode = v1alpha1.LocalMode(in.DetectLocalMode) - if err := Convert_config_DetectLocalConfiguration_To_v1alpha1_DetectLocalConfiguration(&in.DetectLocal, &out.DetectLocal, s); err != nil { - return err - } return nil } @@ -300,8 +262,6 @@ func autoConvert_v1alpha1_KubeProxyWinkernelConfiguration_To_config_KubeProxyWin out.NetworkName = in.NetworkName out.SourceVip = in.SourceVip out.EnableDSR = in.EnableDSR - out.RootHnsEndpointName = in.RootHnsEndpointName - out.ForwardHealthCheckVip = in.ForwardHealthCheckVip return nil } @@ -314,8 +274,6 @@ func autoConvert_config_KubeProxyWinkernelConfiguration_To_v1alpha1_KubeProxyWin out.NetworkName = in.NetworkName out.SourceVip = in.SourceVip out.EnableDSR = in.EnableDSR - out.RootHnsEndpointName = in.RootHnsEndpointName - out.ForwardHealthCheckVip = in.ForwardHealthCheckVip return nil } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/validation/validation.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/validation/validation.go index aacc00cfb4ec..062b231c7ec9 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/validation/validation.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/validation/validation.go @@ -102,12 +102,6 @@ func Validate(config *kubeproxyconfig.KubeProxyConfiguration) field.ErrorList { allErrs = append(allErrs, validateKubeProxyNodePortAddress(config.NodePortAddresses, newPath.Child("NodePortAddresses"))...) allErrs = append(allErrs, validateShowHiddenMetricsVersion(config.ShowHiddenMetricsForVersion, newPath.Child("ShowHiddenMetricsForVersion"))...) - if config.DetectLocalMode == kubeproxyconfig.LocalModeBridgeInterface { - allErrs = append(allErrs, validateInterface(config.DetectLocal.BridgeInterface, newPath.Child("InterfaceName"))...) - } - if config.DetectLocalMode == kubeproxyconfig.LocalModeInterfaceNamePrefix { - allErrs = append(allErrs, validateInterface(config.DetectLocal.InterfaceNamePrefix, newPath.Child("InterfacePrefix"))...) - } return allErrs } @@ -323,11 +317,3 @@ func validateShowHiddenMetricsVersion(version string, fldPath *field.Path) field return allErrs } - -func validateInterface(iface string, fldPath *field.Path) field.ErrorList { - allErrs := field.ErrorList{} - if len(iface) == 0 { - allErrs = append(allErrs, field.Invalid(fldPath, iface, "must not be empty")) - } - return allErrs -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/zz_generated.deepcopy.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/zz_generated.deepcopy.go index 89adbaae11bc..82d3e3cafea9 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/zz_generated.deepcopy.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/apis/config/zz_generated.deepcopy.go @@ -48,22 +48,6 @@ func (in ConfigurationMap) DeepCopy() ConfigurationMap { return *out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DetectLocalConfiguration) DeepCopyInto(out *DetectLocalConfiguration) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DetectLocalConfiguration. -func (in *DetectLocalConfiguration) DeepCopy() *DetectLocalConfiguration { - if in == nil { - return nil - } - out := new(DetectLocalConfiguration) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *KubeProxyConfiguration) DeepCopyInto(out *KubeProxyConfiguration) { *out = *in @@ -92,7 +76,6 @@ func (in *KubeProxyConfiguration) DeepCopyInto(out *KubeProxyConfiguration) { copy(*out, *in) } out.Winkernel = in.Winkernel - out.DetectLocal = in.DetectLocal return } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/config/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/config/OWNERS index f5f691a16621..1a00bfbfb6db 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/config/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/config/OWNERS @@ -1,8 +1,9 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - sig-network-reviewers - - lavalamp - - smarterclayton +- sig-network-reviewers +- lavalamp +- smarterclayton +- brendandburns labels: - - sig/network +- sig/network diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/endpoints.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/endpoints.go index ee8e778fe0e3..dea19375fe59 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/endpoints.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/endpoints.go @@ -150,7 +150,7 @@ func newBaseEndpointInfo(IP, nodeName, zone string, port int, isLocal bool, } } -type makeEndpointFunc func(info *BaseEndpointInfo, svcPortName *ServicePortName) Endpoint +type makeEndpointFunc func(info *BaseEndpointInfo) Endpoint // This handler is invoked by the apply function on every change. This function should not modify the // EndpointsMap's but just use the changes for any Proxier specific cleanup. @@ -462,7 +462,7 @@ func (ect *EndpointChangeTracker) endpointsToEndpointsMap(endpoints *v1.Endpoint // Zone information is only supported with EndpointSlice API baseEndpointInfo := newBaseEndpointInfo(addr.IP, nodeName, "", int(port.Port), isLocal, isReady, isServing, isTerminating, zoneHints) if ect.makeEndpointInfo != nil { - endpointsMap[svcPortName] = append(endpointsMap[svcPortName], ect.makeEndpointInfo(baseEndpointInfo, &svcPortName)) + endpointsMap[svcPortName] = append(endpointsMap[svcPortName], ect.makeEndpointInfo(baseEndpointInfo)) } else { endpointsMap[svcPortName] = append(endpointsMap[svcPortName], baseEndpointInfo) } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/endpointslicecache.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/endpointslicecache.go index b4e52e23e876..9534c8bd32c3 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/endpointslicecache.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/endpointslicecache.go @@ -158,7 +158,7 @@ func newEndpointSliceInfo(endpointSlice *discovery.EndpointSlice, remove bool) * } // standardEndpointInfo is the default makeEndpointFunc. -func standardEndpointInfo(ep *BaseEndpointInfo, _ *ServicePortName) Endpoint { +func standardEndpointInfo(ep *BaseEndpointInfo) Endpoint { return ep } @@ -250,7 +250,7 @@ func (cache *EndpointSliceCache) endpointInfoByServicePort(serviceNN types.Names Protocol: *port.Protocol, } - endpointInfoBySP[svcPortName] = cache.addEndpoints(&svcPortName, int(*port.Port), endpointInfoBySP[svcPortName], sliceInfo.Endpoints) + endpointInfoBySP[svcPortName] = cache.addEndpoints(serviceNN, int(*port.Port), endpointInfoBySP[svcPortName], sliceInfo.Endpoints) } } @@ -258,7 +258,7 @@ func (cache *EndpointSliceCache) endpointInfoByServicePort(serviceNN types.Names } // addEndpoints adds endpointInfo for each unique endpoint. -func (cache *EndpointSliceCache) addEndpoints(svcPortName *ServicePortName, portNum int, endpointSet map[string]Endpoint, endpoints []*endpointInfo) map[string]Endpoint { +func (cache *EndpointSliceCache) addEndpoints(serviceNN types.NamespacedName, portNum int, endpointSet map[string]Endpoint, endpoints []*endpointInfo) map[string]Endpoint { if endpointSet == nil { endpointSet = map[string]Endpoint{} } @@ -275,7 +275,7 @@ func (cache *EndpointSliceCache) addEndpoints(svcPortName *ServicePortName, port if (cache.ipFamily == v1.IPv6Protocol) != utilnet.IsIPv6String(endpoint.Addresses[0]) { // Emit event on the corresponding service which had a different IP // version than the endpoint. - utilproxy.LogAndEmitIncorrectIPVersionEvent(cache.recorder, "endpointslice", endpoint.Addresses[0], svcPortName.NamespacedName.Namespace, svcPortName.NamespacedName.Name, "") + utilproxy.LogAndEmitIncorrectIPVersionEvent(cache.recorder, "endpointslice", endpoint.Addresses[0], serviceNN.Namespace, serviceNN.Name, "") continue } @@ -298,7 +298,7 @@ func (cache *EndpointSliceCache) addEndpoints(svcPortName *ServicePortName, port // isLocal should not vary between matching endpoints, but if it does, we // favor a true value here if it exists. if _, exists := endpointSet[endpointInfo.String()]; !exists || isLocal { - endpointSet[endpointInfo.String()] = cache.makeEndpointInfo(endpointInfo, svcPortName) + endpointSet[endpointInfo.String()] = cache.makeEndpointInfo(endpointInfo) } } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/healthcheck/service_health.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/healthcheck/service_health.go index 8f97a2190579..48485abd4858 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/healthcheck/service_health.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/healthcheck/service_health.go @@ -255,6 +255,7 @@ func (hcs *server) SyncEndpoints(newEndpoints map[types.NamespacedName]int) erro for nsn, count := range newEndpoints { if hcs.services[nsn] == nil { + klog.V(3).InfoS("Not saving endpoints for unknown healthcheck", "service", nsn) continue } klog.V(3).InfoS("Reporting endpoints for healthcheck", "endpointCount", count, "service", nsn) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/iptables/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/iptables/OWNERS index 5368499adb22..5cda5bc17c8b 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/iptables/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/iptables/OWNERS @@ -1,8 +1,8 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - sig-network-reviewers - - smarterclayton - - justinsb +- sig-network-reviewers +- smarterclayton +- justinsb labels: - - sig/network +- sig/network diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/iptables/proxier.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/iptables/proxier.go index 5f8094ef6057..b7739e756cfd 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/iptables/proxier.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/iptables/proxier.go @@ -117,11 +117,10 @@ const sysctlBridgeCallIPTables = "net/bridge/bridge-nf-call-iptables" type serviceInfo struct { *proxy.BaseServiceInfo // The following fields are computed and stored for performance reasons. - nameString string - clusterPolicyChainName utiliptables.Chain - localPolicyChainName utiliptables.Chain - firewallChainName utiliptables.Chain - externalChainName utiliptables.Chain + serviceNameString string + servicePortChainName utiliptables.Chain + serviceFirewallChainName utiliptables.Chain + serviceLBChainName utiliptables.Chain } // returns a new proxy.ServicePort which abstracts a serviceInfo @@ -132,11 +131,10 @@ func newServiceInfo(port *v1.ServicePort, service *v1.Service, baseInfo *proxy.B svcName := types.NamespacedName{Namespace: service.Namespace, Name: service.Name} svcPortName := proxy.ServicePortName{NamespacedName: svcName, Port: port.Name} protocol := strings.ToLower(string(info.Protocol())) - info.nameString = svcPortName.String() - info.clusterPolicyChainName = servicePortPolicyClusterChain(info.nameString, protocol) - info.localPolicyChainName = servicePortPolicyLocalChainName(info.nameString, protocol) - info.firewallChainName = serviceFirewallChainName(info.nameString, protocol) - info.externalChainName = serviceExternalChainName(info.nameString, protocol) + info.serviceNameString = svcPortName.String() + info.servicePortChainName = servicePortChainName(info.serviceNameString, protocol) + info.serviceFirewallChainName = serviceFirewallChainName(info.serviceNameString, protocol) + info.serviceLBChainName = serviceLBChainName(info.serviceNameString, protocol) return info } @@ -144,16 +142,16 @@ func newServiceInfo(port *v1.ServicePort, service *v1.Service, baseInfo *proxy.B // internal struct for endpoints information type endpointsInfo struct { *proxy.BaseEndpointInfo - - ChainName utiliptables.Chain + // The following fields we lazily compute and store here for performance + // reasons. If the protocol is the same as you expect it to be, then the + // chainName can be reused, otherwise it should be recomputed. + protocol string + chainName utiliptables.Chain } // returns a new proxy.Endpoint which abstracts a endpointsInfo -func newEndpointInfo(baseInfo *proxy.BaseEndpointInfo, svcPortName *proxy.ServicePortName) proxy.Endpoint { - return &endpointsInfo{ - BaseEndpointInfo: baseInfo, - ChainName: servicePortEndpointChainName(svcPortName.String(), strings.ToLower(string(svcPortName.Protocol)), baseInfo.Endpoint), - } +func newEndpointInfo(baseInfo *proxy.BaseEndpointInfo) proxy.Endpoint { + return &endpointsInfo{BaseEndpointInfo: baseInfo} } // Equal overrides the Equal() function implemented by proxy.BaseEndpointInfo. @@ -165,10 +163,20 @@ func (e *endpointsInfo) Equal(other proxy.Endpoint) bool { } return e.Endpoint == o.Endpoint && e.IsLocal == o.IsLocal && - e.ChainName == o.ChainName && + e.protocol == o.protocol && + e.chainName == o.chainName && e.Ready == o.Ready } +// Returns the endpoint chain name for a given endpointsInfo. +func (e *endpointsInfo) endpointChain(svcNameString, protocol string) utiliptables.Chain { + if e.protocol != protocol { + e.protocol = protocol + e.chainName = servicePortEndpointChainName(svcNameString, protocol, e.Endpoint) + } + return e.chainName +} + // Proxier is an iptables based proxy for connections between a localhost:lport // and services that provide the actual backends. type Proxier struct { @@ -182,6 +190,7 @@ type Proxier struct { mu sync.Mutex // protects the following fields serviceMap proxy.ServiceMap endpointsMap proxy.EndpointsMap + portsMap map[netutils.LocalPort]netutils.Closeable nodeLabels map[string]string // endpointSlicesSynced, and servicesSynced are set to true // when corresponding objects are synced after startup. This is used to avoid @@ -200,6 +209,7 @@ type Proxier struct { localDetector proxyutiliptables.LocalTrafficDetector hostname string nodeIP net.IP + portMapper netutils.PortOpener recorder events.EventRecorder serviceHealthServer healthcheck.ServiceHealthServer @@ -254,12 +264,9 @@ func NewProxier(ipt utiliptables.Interface, healthzServer healthcheck.ProxierHealthUpdater, nodePortAddresses []string, ) (*Proxier, error) { - if utilproxy.ContainsIPv4Loopback(nodePortAddresses) { - // Set the route_localnet sysctl we need for exposing NodePorts on loopback addresses - klog.InfoS("Setting route_localnet=1, use nodePortAddresses to filter loopback addresses for NodePorts to skip it https://issues.k8s.io/90259") - if err := utilproxy.EnsureSysctl(sysctl, sysctlRouteLocalnet, 1); err != nil { - return nil, err - } + // Set the route_localnet sysctl we need for + if err := utilproxy.EnsureSysctl(sysctl, sysctlRouteLocalnet, 1); err != nil { + return nil, err } // Proxy needs br_netfilter and bridge-nf-call-iptables=1 when containers @@ -289,6 +296,7 @@ func NewProxier(ipt utiliptables.Interface, } proxier := &Proxier{ + portsMap: make(map[netutils.LocalPort]netutils.Closeable), serviceMap: make(proxy.ServiceMap), serviceChanges: proxy.NewServiceChangeTracker(newServiceInfo, ipFamily, recorder, nil), endpointsMap: make(proxy.EndpointsMap), @@ -301,6 +309,7 @@ func NewProxier(ipt utiliptables.Interface, localDetector: localDetector, hostname: hostname, nodeIP: nodeIP, + portMapper: &netutils.ListenPortOpener, recorder: recorder, serviceHealthServer: serviceHealthServer, healthzServer: healthzServer, @@ -438,7 +447,7 @@ func CleanupLeftovers(ipt utiliptables.Interface) (encounteredError bool) { // Hunt for service and endpoint chains. for chain := range existingNATChains { chainString := string(chain) - if isServiceChainName(chainString) { + if strings.HasPrefix(chainString, "KUBE-SVC-") || strings.HasPrefix(chainString, "KUBE-SEP-") || strings.HasPrefix(chainString, "KUBE-FW-") || strings.HasPrefix(chainString, "KUBE-XLB-") { natChains.WriteBytes(existingNATChains[chain]) // flush natRules.Write("-X", chainString) // delete } @@ -685,69 +694,34 @@ func portProtoHash(servicePortName string, protocol string) string { return encoded[:16] } -const ( - servicePortPolicyClusterChainNamePrefix = "KUBE-SVC-" - servicePortPolicyLocalChainNamePrefix = "KUBE-SVL-" - serviceFirewallChainNamePrefix = "KUBE-FW-" - serviceExternalChainNamePrefix = "KUBE-EXT-" - servicePortEndpointChainNamePrefix = "KUBE-SEP-" - - // For cleanup. This can be removed after 1.26 is released. - deprecatedServiceLBChainNamePrefix = "KUBE-XLB-" -) - -// servicePortPolicyClusterChain returns the name of the KUBE-SVC-XXXX chain for a service, which is the -// main iptables chain for that service, used for dispatching to endpoints when using `Cluster` -// traffic policy. -func servicePortPolicyClusterChain(servicePortName string, protocol string) utiliptables.Chain { - return utiliptables.Chain(servicePortPolicyClusterChainNamePrefix + portProtoHash(servicePortName, protocol)) -} - -// servicePortPolicyLocalChainName returns the name of the KUBE-SVL-XXXX chain for a service, which -// handles dispatching to local endpoints when using `Local` traffic policy. This chain only -// exists if the service has `Local` internal or external traffic policy. -func servicePortPolicyLocalChainName(servicePortName string, protocol string) utiliptables.Chain { - return utiliptables.Chain(servicePortPolicyLocalChainNamePrefix + portProtoHash(servicePortName, protocol)) +// servicePortChainName takes the ServicePortName for a service and +// returns the associated iptables chain. This is computed by hashing (sha256) +// then encoding to base32 and truncating with the prefix "KUBE-SVC-". +func servicePortChainName(servicePortName string, protocol string) utiliptables.Chain { + return utiliptables.Chain("KUBE-SVC-" + portProtoHash(servicePortName, protocol)) } -// serviceFirewallChainName returns the name of the KUBE-FW-XXXX chain for a service, which -// is used to implement the filtering for the LoadBalancerSourceRanges feature. +// serviceFirewallChainName takes the ServicePortName for a service and +// returns the associated iptables chain. This is computed by hashing (sha256) +// then encoding to base32 and truncating with the prefix "KUBE-FW-". func serviceFirewallChainName(servicePortName string, protocol string) utiliptables.Chain { - return utiliptables.Chain(serviceFirewallChainNamePrefix + portProtoHash(servicePortName, protocol)) + return utiliptables.Chain("KUBE-FW-" + portProtoHash(servicePortName, protocol)) } -// serviceExternalChainName returns the name of the KUBE-EXT-XXXX chain for a service, which -// implements "short-circuiting" for internally-originated external-destination traffic when using -// `Local` external traffic policy. It forwards traffic from local sources to the KUBE-SVC-XXXX -// chain and traffic from external sources to the KUBE-SVL-XXXX chain. -func serviceExternalChainName(servicePortName string, protocol string) utiliptables.Chain { - return utiliptables.Chain(serviceExternalChainNamePrefix + portProtoHash(servicePortName, protocol)) +// serviceLBPortChainName takes the ServicePortName for a service and +// returns the associated iptables chain. This is computed by hashing (sha256) +// then encoding to base32 and truncating with the prefix "KUBE-XLB-". We do +// this because IPTables Chain Names must be <= 28 chars long, and the longer +// they are the harder they are to read. +func serviceLBChainName(servicePortName string, protocol string) utiliptables.Chain { + return utiliptables.Chain("KUBE-XLB-" + portProtoHash(servicePortName, protocol)) } -// servicePortEndpointChainName returns the name of the KUBE-SEP-XXXX chain for a particular -// service endpoint. +// This is the same as servicePortChainName but with the endpoint included. func servicePortEndpointChainName(servicePortName string, protocol string, endpoint string) utiliptables.Chain { hash := sha256.Sum256([]byte(servicePortName + protocol + endpoint)) encoded := base32.StdEncoding.EncodeToString(hash[:]) - return utiliptables.Chain(servicePortEndpointChainNamePrefix + encoded[:16]) -} - -func isServiceChainName(chainString string) bool { - prefixes := []string{ - servicePortPolicyClusterChainNamePrefix, - servicePortPolicyLocalChainNamePrefix, - servicePortEndpointChainNamePrefix, - serviceFirewallChainNamePrefix, - serviceExternalChainNamePrefix, - deprecatedServiceLBChainNamePrefix, - } - - for _, p := range prefixes { - if strings.HasPrefix(chainString, p) { - return true - } - } - return false + return utiliptables.Chain("KUBE-SEP-" + encoded[:16]) } // After a UDP or SCTP endpoint has been removed, we must flush any pending conntrack entries to it, or else we @@ -916,6 +890,10 @@ func (proxier *Proxier) syncProxyRules() { proxier.natChains.Reset() proxier.natRules.Reset() + // Write table headers. + proxier.filterChains.Write("*filter") + proxier.natChains.Write("*nat") + // Make sure we keep stats for the top-level chains, if they existed // (which most should have because we created them above). for _, chainName := range []utiliptables.Chain{kubeServicesChain, kubeExternalServicesChain, kubeForwardChain, kubeNodePortsChain} { @@ -968,6 +946,18 @@ func (proxier *Proxier) syncProxyRules() { // Accumulate NAT chains to keep. activeNATChains := map[utiliptables.Chain]bool{} // use a map as a set + // Accumulate the set of local ports that we will be holding open once this update is complete + replacementPortsMap := map[netutils.LocalPort]netutils.Closeable{} + + // We are creating those slices ones here to avoid memory reallocations + // in every loop. Note that reuse the memory, instead of doing: + // slice = + // you should always do one of the below: + // slice = slice[:0] // and then append to it + // slice = append(slice[:0], ...) + readyEndpointChains := make([]utiliptables.Chain, 0) + localEndpointChains := make([]utiliptables.Chain, 0) + // To avoid growing this slice, we arbitrarily set its size to 64, // there is never more than that many arguments for a single line. // Note that even if we go over 64, it will still be correct - it @@ -980,53 +970,87 @@ func (proxier *Proxier) syncProxyRules() { proxier.endpointChainsNumber += len(proxier.endpointsMap[svcName]) } + localAddrSet := utilproxy.GetLocalAddrSet() nodeAddresses, err := utilproxy.GetNodeAddresses(proxier.nodePortAddresses, proxier.networkInterfacer) if err != nil { klog.ErrorS(err, "Failed to get node ip address matching nodeport cidrs, services with nodeport may not work as intended", "CIDRs", proxier.nodePortAddresses) } - // nodeAddresses may contain dual-stack zero-CIDRs if proxier.nodePortAddresses is empty. - // Ensure nodeAddresses only contains the addresses for this proxier's IP family. - isIPv6 := proxier.iptables.IsIPv6() - for addr := range nodeAddresses { - if utilproxy.IsZeroCIDR(addr) && isIPv6 == netutils.IsIPv6CIDRString(addr) { - // if any of the addresses is zero cidr of this IP family, non-zero IPs can be excluded. - nodeAddresses = sets.NewString(addr) - break - } - } - - // These two variables are used to publish the sync_proxy_rules_no_endpoints_total - // metric. - serviceNoLocalEndpointsTotalInternal := 0 - serviceNoLocalEndpointsTotalExternal := 0 - // Build rules for each service-port. + // Build rules for each service. for svcName, svc := range proxier.serviceMap { svcInfo, ok := svc.(*serviceInfo) if !ok { klog.ErrorS(nil, "Failed to cast serviceInfo", "serviceName", svcName) continue } + isIPv6 := netutils.IsIPv6(svcInfo.ClusterIP()) + localPortIPFamily := netutils.IPv4 + if isIPv6 { + localPortIPFamily = netutils.IPv6 + } protocol := strings.ToLower(string(svcInfo.Protocol())) - svcNameString := svcInfo.nameString + svcNameString := svcInfo.serviceNameString allEndpoints := proxier.endpointsMap[svcName] - // Figure out the endpoints for Cluster and Local traffic policy. - // allLocallyReachableEndpoints is the set of all endpoints that can be routed to - // from this node, given the service's traffic policies. hasEndpoints is true - // if the service has any usable endpoints on any node, not just this one. - clusterEndpoints, localEndpoints, allLocallyReachableEndpoints, hasEndpoints := proxy.CategorizeEndpoints(allEndpoints, svcInfo, proxier.nodeLabels) + // Filtering for topology aware endpoints. This function will only + // filter endpoints if appropriate feature gates are enabled and the + // Service does not have conflicting configuration such as + // externalTrafficPolicy=Local. + allEndpoints = proxy.FilterEndpoints(allEndpoints, svcInfo, proxier.nodeLabels) + + // Scan the endpoints list to see what we have. "hasEndpoints" will be true + // if there are any usable endpoints for this service anywhere in the cluster. + var hasEndpoints, hasLocalReadyEndpoints, hasLocalServingTerminatingEndpoints bool + for _, ep := range allEndpoints { + if ep.IsReady() { + hasEndpoints = true + if ep.GetIsLocal() { + hasLocalReadyEndpoints = true + } + } else if svc.NodeLocalExternal() && utilfeature.DefaultFeatureGate.Enabled(features.ProxyTerminatingEndpoints) { + if ep.IsServing() && ep.IsTerminating() { + hasEndpoints = true + if ep.GetIsLocal() { + hasLocalServingTerminatingEndpoints = true + } + } + } + } + useTerminatingEndpoints := !hasLocalReadyEndpoints && hasLocalServingTerminatingEndpoints // Generate the per-endpoint chains. - for _, ep := range allLocallyReachableEndpoints { + readyEndpointChains = readyEndpointChains[:0] + localEndpointChains = localEndpointChains[:0] + for _, ep := range allEndpoints { epInfo, ok := ep.(*endpointsInfo) if !ok { klog.ErrorS(err, "Failed to cast endpointsInfo", "endpointsInfo", ep) continue } - endpointChain := epInfo.ChainName + endpointChain := epInfo.endpointChain(svcNameString, protocol) + endpointInUse := false + + if epInfo.Ready { + readyEndpointChains = append(readyEndpointChains, endpointChain) + endpointInUse = true + } + if svc.NodeLocalExternal() && epInfo.IsLocal { + if useTerminatingEndpoints { + if epInfo.Serving && epInfo.Terminating { + localEndpointChains = append(localEndpointChains, endpointChain) + endpointInUse = true + } + } else if epInfo.Ready { + localEndpointChains = append(localEndpointChains, endpointChain) + endpointInUse = true + } + } + + if !endpointInUse { + continue + } // Create the endpoint chain, retaining counters if possible. if chain, ok := existingNATChains[endpointChain]; ok { @@ -1052,108 +1076,27 @@ func (proxier *Proxier) syncProxyRules() { proxier.natRules.Write(args) } - // These chains represent the sets of endpoints to use when internal or - // external traffic policy is "Cluster" vs "Local". - clusterPolicyChain := svcInfo.clusterPolicyChainName - localPolicyChain := svcInfo.localPolicyChainName - - // These chains designate which policy chain to use for internal- and - // external-destination traffic. - internalPolicyChain := clusterPolicyChain - externalPolicyChain := clusterPolicyChain - if svcInfo.InternalPolicyLocal() { - internalPolicyChain = localPolicyChain - } - if svcInfo.ExternalPolicyLocal() { - externalPolicyChain = localPolicyChain - } - - // These chains are where *ALL* rules which match traffic that is - // service-destined should jump. ClusterIP traffic is considered - // "internal" while NodePort, LoadBalancer, and ExternalIPs traffic is - // considered "external". - internalTrafficChain := internalPolicyChain - externalTrafficChain := svcInfo.externalChainName // eventually jumps to externalPolicyChain - - // Declare the clusterPolicyChain if needed. - if hasEndpoints && svcInfo.UsesClusterEndpoints() { - // Create the Cluster traffic policy chain, retaining counters if possible. - if chain, ok := existingNATChains[clusterPolicyChain]; ok { - proxier.natChains.WriteBytes(chain) - } else { - proxier.natChains.Write(utiliptables.MakeChainLine(clusterPolicyChain)) - } - activeNATChains[clusterPolicyChain] = true - } - - // Declare the localPolicyChain if needed. - if hasEndpoints && svcInfo.UsesLocalEndpoints() { - if chain, ok := existingNATChains[localPolicyChain]; ok { + svcChain := svcInfo.servicePortChainName + if hasEndpoints { + // Create the per-service chain, retaining counters if possible. + if chain, ok := existingNATChains[svcChain]; ok { proxier.natChains.WriteBytes(chain) } else { - proxier.natChains.Write(utiliptables.MakeChainLine(localPolicyChain)) + proxier.natChains.Write(utiliptables.MakeChainLine(svcChain)) } - activeNATChains[localPolicyChain] = true + activeNATChains[svcChain] = true } - // If any "external" destinations are enabled, set up external traffic - // handling. All captured traffic for all external destinations should - // jump to externalTrafficChain, which will handle some special-cases - // and then jump to externalPolicyChain. - if hasEndpoints && svcInfo.ExternallyAccessible() { - if chain, ok := existingNATChains[externalTrafficChain]; ok { - proxier.natChains.WriteBytes(chain) - } else { - proxier.natChains.Write(utiliptables.MakeChainLine(externalTrafficChain)) - } - activeNATChains[externalTrafficChain] = true - - if !svcInfo.ExternalPolicyLocal() { - // If we are using non-local endpoints we need to masquerade, - // in case we cross nodes. - proxier.natRules.Write( - "-A", string(externalTrafficChain), - "-m", "comment", "--comment", fmt.Sprintf(`"masquerade traffic for %s external destinations"`, svcNameString), - "-j", string(KubeMarkMasqChain)) + svcXlbChain := svcInfo.serviceLBChainName + if svcInfo.NodeLocalExternal() { + // Only for services request OnlyLocal traffic + // create the per-service LB chain, retaining counters if possible. + if lbChain, ok := existingNATChains[svcXlbChain]; ok { + proxier.natChains.WriteBytes(lbChain) } else { - // If we are only using same-node endpoints, we can retain the - // source IP in most cases. - - if proxier.localDetector.IsImplemented() { - // Treat all locally-originated pod -> external destination - // traffic as a special-case. It is subject to neither - // form of traffic policy, which simulates going up-and-out - // to an external load-balancer and coming back in. - proxier.natRules.Write( - "-A", string(externalTrafficChain), - "-m", "comment", "--comment", fmt.Sprintf(`"pod traffic for %s external destinations"`, svcNameString), - proxier.localDetector.IfLocal(), - "-j", string(clusterPolicyChain)) - } - - // Locally originated traffic (not a pod, but the host node) - // still needs masquerade because the LBIP itself is a local - // address, so that will be the chosen source IP. - proxier.natRules.Write( - "-A", string(externalTrafficChain), - "-m", "comment", "--comment", fmt.Sprintf(`"masquerade LOCAL traffic for %s external destinations"`, svcNameString), - "-m", "addrtype", "--src-type", "LOCAL", - "-j", string(KubeMarkMasqChain)) - - // Redirect all src-type=LOCAL -> external destination to the - // policy=cluster chain. This allows traffic originating - // from the host to be redirected to the service correctly. - proxier.natRules.Write( - "-A", string(externalTrafficChain), - "-m", "comment", "--comment", fmt.Sprintf(`"route LOCAL traffic for %s external destinations"`, svcNameString), - "-m", "addrtype", "--src-type", "LOCAL", - "-j", string(clusterPolicyChain)) + proxier.natChains.Write(utiliptables.MakeChainLine(svcXlbChain)) } - - // Anything else falls thru to the appropriate policy chain. - proxier.natRules.Write( - "-A", string(externalTrafficChain), - "-j", string(externalPolicyChain)) + activeNATChains[svcXlbChain] = true } // Capture the clusterIP. @@ -1166,7 +1109,7 @@ func (proxier *Proxier) syncProxyRules() { ) if proxier.masqueradeAll { proxier.natRules.Write( - "-A", string(internalTrafficChain), + "-A", string(svcChain), args, "-j", string(KubeMarkMasqChain)) } else if proxier.localDetector.IsImplemented() { @@ -1174,16 +1117,15 @@ func (proxier *Proxier) syncProxyRules() { // is that you can establish a static route for your Service range, // routing to any node, and that node will bridge into the Service // for you. Since that might bounce off-node, we masquerade here. + // If/when we support "Local" policy for VIPs, we should update this. proxier.natRules.Write( - "-A", string(internalTrafficChain), - args, - proxier.localDetector.IfNotLocal(), - "-j", string(KubeMarkMasqChain)) + "-A", string(svcChain), + proxier.localDetector.JumpIfNotLocal(args, string(KubeMarkMasqChain))) } proxier.natRules.Write( "-A", string(kubeServicesChain), args, - "-j", string(internalTrafficChain)) + "-j", string(svcChain)) } else { // No endpoints. proxier.filterRules.Write( @@ -1198,16 +1140,53 @@ func (proxier *Proxier) syncProxyRules() { // Capture externalIPs. for _, externalIP := range svcInfo.ExternalIPStrings() { + // If the "external" IP happens to be an IP that is local to this + // machine, hold the local port open so no other process can open it + // (because the socket might open but it would never work). + if (svcInfo.Protocol() != v1.ProtocolSCTP) && localAddrSet.Has(netutils.ParseIPSloppy(externalIP)) { + lp := netutils.LocalPort{ + Description: "externalIP for " + svcNameString, + IP: externalIP, + IPFamily: localPortIPFamily, + Port: svcInfo.Port(), + Protocol: netutils.Protocol(svcInfo.Protocol()), + } + proxier.openPort(lp, replacementPortsMap) + } + if hasEndpoints { - // Send traffic bound for external IPs to the "external - // destinations" chain. - proxier.natRules.Write( - "-A", string(kubeServicesChain), + args = append(args[:0], "-m", "comment", "--comment", fmt.Sprintf(`"%s external IP"`, svcNameString), "-m", protocol, "-p", protocol, "-d", externalIP, "--dport", strconv.Itoa(svcInfo.Port()), - "-j", string(externalTrafficChain)) + ) + + destChain := svcXlbChain + // We have to SNAT packets to external IPs if externalTrafficPolicy is cluster + // and the traffic is NOT Local. Local traffic coming from Pods and Nodes will + // be always forwarded to the corresponding Service, so no need to SNAT + // If we can't differentiate the local traffic we always SNAT. + if !svcInfo.NodeLocalExternal() { + appendTo := []string{"-A", string(svcChain)} + destChain = svcChain + // This masquerades off-cluster traffic to a External IP. + if proxier.localDetector.IsImplemented() { + proxier.natRules.Write( + appendTo, + proxier.localDetector.JumpIfNotLocal(args, string(KubeMarkMasqChain))) + } else { + proxier.natRules.Write( + appendTo, + args, + "-j", string(KubeMarkMasqChain)) + } + } + // Send traffic bound for external IPs to the service chain. + proxier.natRules.Write( + "-A", string(kubeServicesChain), + args, + "-j", string(destChain)) } else { // No endpoints. @@ -1223,52 +1202,52 @@ func (proxier *Proxier) syncProxyRules() { } // Capture load-balancer ingress. - if len(svcInfo.LoadBalancerIPStrings()) > 0 && hasEndpoints { - // Normally we send LB matches to the "external destination" chain. - nextChain := externalTrafficChain - - // If the service specifies any LB source ranges, we need to insert - // a firewall chain first. - if len(svcInfo.LoadBalancerSourceRanges()) > 0 { - fwChain := svcInfo.firewallChainName - - // Declare the service firewall chain. + fwChain := svcInfo.serviceFirewallChainName + for _, ingress := range svcInfo.LoadBalancerIPStrings() { + if hasEndpoints { + // create service firewall chain if chain, ok := existingNATChains[fwChain]; ok { proxier.natChains.WriteBytes(chain) } else { proxier.natChains.Write(utiliptables.MakeChainLine(fwChain)) } activeNATChains[fwChain] = true + // The service firewall rules are created based on ServiceSpec.loadBalancerSourceRanges field. + // This currently works for loadbalancers that preserves source ips. + // For loadbalancers which direct traffic to service NodePort, the firewall rules will not apply. - // The firewall chain will jump to the "external destination" - // chain. - nextChain = svcInfo.firewallChainName - } - - for _, lbip := range svcInfo.LoadBalancerIPStrings() { - proxier.natRules.Write( + args = append(args[:0], "-A", string(kubeServicesChain), "-m", "comment", "--comment", fmt.Sprintf(`"%s loadbalancer IP"`, svcNameString), "-m", protocol, "-p", protocol, - "-d", lbip, + "-d", ingress, "--dport", strconv.Itoa(svcInfo.Port()), - "-j", string(nextChain)) - - // The service firewall rules are created based on the - // loadBalancerSourceRanges field. This only works for - // VIP-like loadbalancers that preserve source IPs. For - // loadbalancers which direct traffic to service NodePort, the - // firewall rules will not apply. - if len(svcInfo.LoadBalancerSourceRanges()) > 0 { - args = append(args[:0], - "-A", string(nextChain), - "-m", "comment", "--comment", fmt.Sprintf(`"%s loadbalancer IP"`, svcNameString), - ) + ) + // jump to service firewall chain + proxier.natRules.Write(args, "-j", string(fwChain)) + + args = append(args[:0], + "-A", string(fwChain), + "-m", "comment", "--comment", fmt.Sprintf(`"%s loadbalancer IP"`, svcNameString), + ) + + // Each source match rule in the FW chain may jump to either the SVC or the XLB chain + chosenChain := svcXlbChain + // If we are proxying globally, we need to masquerade in case we cross nodes. + // If we are proxying only locally, we can retain the source IP. + if !svcInfo.NodeLocalExternal() { + proxier.natRules.Write(args, "-j", string(KubeMarkMasqChain)) + chosenChain = svcChain + } + if len(svcInfo.LoadBalancerSourceRanges()) == 0 { + // allow all sources, so jump directly to the KUBE-SVC or KUBE-XLB chain + proxier.natRules.Write(args, "-j", string(chosenChain)) + } else { // firewall filter based on each source range allowFromNode := false for _, src := range svcInfo.LoadBalancerSourceRanges() { - proxier.natRules.Write(args, "-s", src, "-j", string(externalTrafficChain)) + proxier.natRules.Write(args, "-s", src, "-j", string(chosenChain)) _, cidr, err := netutils.ParseCIDRSloppy(src) if err != nil { klog.ErrorS(err, "Error parsing CIDR in LoadBalancerSourceRanges, dropping it", "cidr", cidr) @@ -1276,49 +1255,91 @@ func (proxier *Proxier) syncProxyRules() { allowFromNode = true } } - // For VIP-like LBs, the VIP is often added as a local - // address (via an IP route rule). In that case, a request - // from a node to the VIP will not hit the loadbalancer but - // will loop back with the source IP set to the VIP. We - // need the following rule to allow requests from this node. + // generally, ip route rule was added to intercept request to loadbalancer vip from the + // loadbalancer's backend hosts. In this case, request will not hit the loadbalancer but loop back directly. + // Need to add the following rule to allow request on host. if allowFromNode { proxier.natRules.Write( args, - "-s", lbip, - "-j", string(externalTrafficChain)) + "-s", ingress, + "-j", string(chosenChain)) } - // If the packet was able to reach the end of firewall chain, - // then it did not get DNATed. It means the packet cannot go - // thru the firewall, then mark it for DROP. - proxier.natRules.Write(args, "-j", string(KubeMarkDropChain)) } - } - } else { - // No endpoints. - for _, lbip := range svcInfo.LoadBalancerIPStrings() { + + // If the packet was able to reach the end of firewall chain, then it did not get DNATed. + // It means the packet cannot go thru the firewall, then mark it for DROP + proxier.natRules.Write(args, "-j", string(KubeMarkDropChain)) + } else { + // No endpoints. proxier.filterRules.Write( "-A", string(kubeExternalServicesChain), "-m", "comment", "--comment", fmt.Sprintf(`"%s has no endpoints"`, svcNameString), "-m", protocol, "-p", protocol, - "-d", lbip, + "-d", ingress, "--dport", strconv.Itoa(svcInfo.Port()), "-j", "REJECT", ) } } - // Capture nodeports. + // Capture nodeports. If we had more than 2 rules it might be + // worthwhile to make a new per-service chain for nodeport rules, but + // with just 2 rules it ends up being a waste and a cognitive burden. if svcInfo.NodePort() != 0 && len(nodeAddresses) != 0 { + // Hold the local port open so no other process can open it + // (because the socket might open but it would never work). + + // nodeAddresses only contains the addresses for this proxier's IP family. + for address := range nodeAddresses { + if utilproxy.IsZeroCIDR(address) { + address = "" + } + lp := netutils.LocalPort{ + Description: "nodePort for " + svcNameString, + IP: address, + IPFamily: localPortIPFamily, + Port: svcInfo.NodePort(), + Protocol: netutils.Protocol(svcInfo.Protocol()), + } + proxier.openPort(lp, replacementPortsMap) + } + if hasEndpoints { - // Jump to the external destination chain. For better or for - // worse, nodeports are not subect to loadBalancerSourceRanges, - // and we can't change that. - proxier.natRules.Write( - "-A", string(kubeNodePortsChain), + args = append(args[:0], "-m", "comment", "--comment", svcNameString, "-m", protocol, "-p", protocol, "--dport", strconv.Itoa(svcInfo.NodePort()), - "-j", string(externalTrafficChain)) + ) + if !svcInfo.NodeLocalExternal() { + // Nodeports need SNAT, unless they're local. + proxier.natRules.Write( + "-A", string(svcChain), + args, + "-j", string(KubeMarkMasqChain)) + // Jump to the service chain. + proxier.natRules.Write( + "-A", string(kubeNodePortsChain), + args, + "-j", string(svcChain)) + } else { + // TODO: Make all nodePorts jump to the firewall chain. + // Currently we only create it for loadbalancers (#33586). + + // Fix localhost martian source error + loopback := "127.0.0.0/8" + if isIPv6 { + loopback = "::1/128" + } + appendTo := []string{"-A", string(kubeNodePortsChain)} + proxier.natRules.Write( + appendTo, + args, + "-s", loopback, "-j", string(KubeMarkMasqChain)) + proxier.natRules.Write( + appendTo, + args, + "-j", string(svcXlbChain)) + } } else { // No endpoints. proxier.filterRules.Write( @@ -1345,34 +1366,57 @@ func (proxier *Proxier) syncProxyRules() { ) } - if svcInfo.UsesClusterEndpoints() { - // Write rules jumping from clusterPolicyChain to clusterEndpoints - proxier.writeServiceToEndpointRules(svcNameString, svcInfo, clusterPolicyChain, clusterEndpoints, args) + if !hasEndpoints { + continue } - if svcInfo.UsesLocalEndpoints() { - if len(localEndpoints) != 0 { - // Write rules jumping from localPolicyChain to localEndpointChains - proxier.writeServiceToEndpointRules(svcNameString, svcInfo, localPolicyChain, localEndpoints, args) - } else { - if svcInfo.InternalPolicyLocal() && utilfeature.DefaultFeatureGate.Enabled(features.ServiceInternalTrafficPolicy) { - serviceNoLocalEndpointsTotalInternal++ - } - if svcInfo.ExternalPolicyLocal() { - serviceNoLocalEndpointsTotalExternal++ - } - if hasEndpoints { - // Blackhole all traffic since there are no local endpoints - args = append(args[:0], - "-A", string(localPolicyChain), - "-m", "comment", "--comment", - fmt.Sprintf(`"%s has no local endpoints"`, svcNameString), - "-j", - string(KubeMarkDropChain), - ) - proxier.natRules.Write(args) - } - } + // Write rules jumping from svcChain to readyEndpointChains + proxier.writeServiceToEndpointRules(svcNameString, svcInfo, svcChain, readyEndpointChains, args) + + // The logic below this applies only if this service is marked as OnlyLocal + if !svcInfo.NodeLocalExternal() { + continue + } + + // First rule in the chain redirects all pod -> external VIP traffic to the + // Service's ClusterIP instead. This happens whether or not we have local + // endpoints; only if localDetector is implemented + if proxier.localDetector.IsImplemented() { + args = append(args[:0], + "-A", string(svcXlbChain), + "-m", "comment", "--comment", + `"Redirect pods trying to reach external loadbalancer VIP to clusterIP"`, + ) + proxier.natRules.Write(proxier.localDetector.JumpIfLocal(args, string(svcChain))) + } + + // Next, redirect all src-type=LOCAL -> LB IP to the service chain for externalTrafficPolicy=Local + // This allows traffic originating from the host to be redirected to the service correctly, + // otherwise traffic to LB IPs are dropped if there are no local endpoints. + args = append(args[:0], "-A", string(svcXlbChain)) + proxier.natRules.Write( + args, + "-m", "comment", "--comment", fmt.Sprintf(`"masquerade LOCAL traffic for %s LB IP"`, svcNameString), + "-m", "addrtype", "--src-type", "LOCAL", "-j", string(KubeMarkMasqChain)) + proxier.natRules.Write( + args, + "-m", "comment", "--comment", fmt.Sprintf(`"route LOCAL traffic for %s LB IP to service chain"`, svcNameString), + "-m", "addrtype", "--src-type", "LOCAL", "-j", string(svcChain)) + + numLocalEndpoints := len(localEndpointChains) + if numLocalEndpoints == 0 { + // Blackhole all traffic since there are no local endpoints + args = append(args[:0], + "-A", string(svcXlbChain), + "-m", "comment", "--comment", + fmt.Sprintf(`"%s has no local endpoints"`, svcNameString), + "-j", + string(KubeMarkDropChain), + ) + proxier.natRules.Write(args) + } else { + // Write rules jumping from svcXlbChain to localEndpointChains + proxier.writeServiceToEndpointRules(svcNameString, svcInfo, svcXlbChain, localEndpointChains, args) } } @@ -1380,7 +1424,7 @@ func (proxier *Proxier) syncProxyRules() { for chain := range existingNATChains { if !activeNATChains[chain] { chainString := string(chain) - if !isServiceChainName(chainString) { + if !strings.HasPrefix(chainString, "KUBE-SVC-") && !strings.HasPrefix(chainString, "KUBE-SEP-") && !strings.HasPrefix(chainString, "KUBE-FW-") && !strings.HasPrefix(chainString, "KUBE-XLB-") { // Ignore chains that aren't ours. continue } @@ -1394,13 +1438,16 @@ func (proxier *Proxier) syncProxyRules() { // Finally, tail-call to the nodeports chain. This needs to be after all // other service portal rules. + isIPv6 := proxier.iptables.IsIPv6() for address := range nodeAddresses { + // TODO(thockin, m1093782566): If/when we have dual-stack support we will want to distinguish v4 from v6 zero-CIDRs. if utilproxy.IsZeroCIDR(address) { - proxier.natRules.Write( + args = append(args[:0], "-A", string(kubeServicesChain), "-m", "comment", "--comment", `"kubernetes service nodeports; NOTE: this must be the last rule in this chain"`, "-m", "addrtype", "--dst-type", "LOCAL", "-j", string(kubeNodePortsChain)) + proxier.natRules.Write(args) // Nothing else matters after the zero CIDR. break } @@ -1410,11 +1457,12 @@ func (proxier *Proxier) syncProxyRules() { continue } // create nodeport rules for each IP one by one - proxier.natRules.Write( + args = append(args[:0], "-A", string(kubeServicesChain), "-m", "comment", "--comment", `"kubernetes service nodeports; NOTE: this must be the last rule in this chain"`, "-d", address, "-j", string(kubeNodePortsChain)) + proxier.natRules.Write(args) } // Drop the packets in INVALID state, which would potentially cause @@ -1447,40 +1495,31 @@ func (proxier *Proxier) syncProxyRules() { "-j", "ACCEPT", ) - metrics.IptablesRulesTotal.WithLabelValues(string(utiliptables.TableFilter)).Set(float64(proxier.filterRules.Lines())) - metrics.IptablesRulesTotal.WithLabelValues(string(utiliptables.TableNAT)).Set(float64(proxier.natRules.Lines())) + numberFilterIptablesRules := utilproxy.CountBytesLines(proxier.filterRules.Bytes()) + metrics.IptablesRulesTotal.WithLabelValues(string(utiliptables.TableFilter)).Set(float64(numberFilterIptablesRules)) + numberNatIptablesRules := utilproxy.CountBytesLines(proxier.natRules.Bytes()) + metrics.IptablesRulesTotal.WithLabelValues(string(utiliptables.TableNAT)).Set(float64(numberNatIptablesRules)) + + // Write the end-of-table markers. + proxier.filterRules.Write("COMMIT") + proxier.natRules.Write("COMMIT") // Sync rules. + // NOTE: NoFlushTables is used so we don't flush non-kubernetes chains in the table proxier.iptablesData.Reset() - proxier.iptablesData.WriteString("*filter\n") proxier.iptablesData.Write(proxier.filterChains.Bytes()) proxier.iptablesData.Write(proxier.filterRules.Bytes()) - proxier.iptablesData.WriteString("COMMIT\n") - proxier.iptablesData.WriteString("*nat\n") proxier.iptablesData.Write(proxier.natChains.Bytes()) proxier.iptablesData.Write(proxier.natRules.Bytes()) - proxier.iptablesData.WriteString("COMMIT\n") - - klog.V(2).InfoS("Reloading service iptables data", - "numServices", len(proxier.serviceMap), - "numEndpoints", proxier.endpointChainsNumber, - "numFilterChains", proxier.filterChains.Lines(), - "numFilterRules", proxier.filterRules.Lines(), - "numNATChains", proxier.natChains.Lines(), - "numNATRules", proxier.natRules.Lines(), - ) - klog.V(9).InfoS("Restoring iptables", "rules", proxier.iptablesData.Bytes()) - // NOTE: NoFlushTables is used so we don't flush non-kubernetes chains in the table + klog.V(5).InfoS("Restoring iptables", "rules", proxier.iptablesData.Bytes()) err = proxier.iptables.RestoreAll(proxier.iptablesData.Bytes(), utiliptables.NoFlushTables, utiliptables.RestoreCounters) if err != nil { - if pErr, ok := err.(utiliptables.ParseError); ok { - lines := utiliptables.ExtractLines(proxier.iptablesData.Bytes(), pErr.Line(), 3) - klog.ErrorS(pErr, "Failed to execute iptables-restore", "rules", lines) - } else { - klog.ErrorS(err, "Failed to execute iptables-restore") - } + klog.ErrorS(err, "Failed to execute iptables-restore") metrics.IptablesRestoreFailuresTotal.Inc() + // Revert new local ports. + klog.V(2).InfoS("Closing local ports after iptables-restore failure") + utilproxy.RevertPorts(replacementPortsMap, proxier.portsMap) return } success = true @@ -1493,8 +1532,14 @@ func (proxier *Proxier) syncProxyRules() { } } - metrics.SyncProxyRulesNoLocalEndpointsTotal.WithLabelValues("internal").Set(float64(serviceNoLocalEndpointsTotalInternal)) - metrics.SyncProxyRulesNoLocalEndpointsTotal.WithLabelValues("external").Set(float64(serviceNoLocalEndpointsTotalExternal)) + // Close old local ports and save new ones. + for k, v := range proxier.portsMap { + if replacementPortsMap[k] == nil { + v.Close() + } + } + proxier.portsMap = replacementPortsMap + if proxier.healthzServer != nil { proxier.healthzServer.Updated() } @@ -1530,40 +1575,59 @@ func (proxier *Proxier) syncProxyRules() { proxier.deleteEndpointConnections(endpointUpdateResult.StaleEndpoints) } -func (proxier *Proxier) writeServiceToEndpointRules(svcNameString string, svcInfo proxy.ServicePort, svcChain utiliptables.Chain, endpoints []proxy.Endpoint, args []string) { +func (proxier *Proxier) openPort(lp netutils.LocalPort, replacementPortsMap map[netutils.LocalPort]netutils.Closeable) { + // We don't open ports for SCTP services + if lp.Protocol == netutils.Protocol(v1.ProtocolSCTP) { + return + } + + if proxier.portsMap[lp] != nil { + klog.V(4).InfoS("Port was open before and is still needed", "port", lp) + replacementPortsMap[lp] = proxier.portsMap[lp] + return + } + + socket, err := proxier.portMapper.OpenLocalPort(&lp) + if err != nil { + msg := fmt.Sprintf("can't open port %s, skipping it", lp.String()) + proxier.recorder.Eventf( + &v1.ObjectReference{ + Kind: "Node", + Name: proxier.hostname, + UID: types.UID(proxier.hostname), + Namespace: "", + }, nil, v1.EventTypeWarning, err.Error(), "SyncProxyRules", msg) + klog.ErrorS(err, "can't open port, skipping it", "port", lp) + return + } + + klog.V(2).InfoS("Opened local port", "port", lp) + replacementPortsMap[lp] = socket +} + +func (proxier *Proxier) writeServiceToEndpointRules(svcNameString string, svcInfo proxy.ServicePort, svcChain utiliptables.Chain, endpointChains []utiliptables.Chain, args []string) { // First write session affinity rules, if applicable. if svcInfo.SessionAffinityType() == v1.ServiceAffinityClientIP { - for _, ep := range endpoints { - epInfo, ok := ep.(*endpointsInfo) - if !ok { - continue - } - comment := fmt.Sprintf(`"%s -> %s"`, svcNameString, epInfo.Endpoint) - + for _, endpointChain := range endpointChains { args = append(args[:0], "-A", string(svcChain), ) - args = proxier.appendServiceCommentLocked(args, comment) + args = proxier.appendServiceCommentLocked(args, svcNameString) args = append(args, - "-m", "recent", "--name", string(epInfo.ChainName), + "-m", "recent", "--name", string(endpointChain), "--rcheck", "--seconds", strconv.Itoa(svcInfo.StickyMaxAgeSeconds()), "--reap", - "-j", string(epInfo.ChainName), + "-j", string(endpointChain), ) proxier.natRules.Write(args) } } // Now write loadbalancing rules. - numEndpoints := len(endpoints) - for i, ep := range endpoints { - epInfo, ok := ep.(*endpointsInfo) - if !ok { - continue - } - comment := fmt.Sprintf(`"%s -> %s"`, svcNameString, epInfo.Endpoint) - + numEndpoints := len(endpointChains) + for i, endpointChain := range endpointChains { + // Balancing rules in the per-service chain. args = append(args[:0], "-A", string(svcChain)) - args = proxier.appendServiceCommentLocked(args, comment) + args = proxier.appendServiceCommentLocked(args, svcNameString) if i < (numEndpoints - 1) { // Each rule is a probabilistic match. args = append(args, @@ -1572,6 +1636,6 @@ func (proxier *Proxier) writeServiceToEndpointRules(svcNameString string, svcInf "--probability", proxier.probability(numEndpoints-i)) } // The final (or only if n == 1) rule is a guaranteed match. - proxier.natRules.Write(args, "-j", string(epInfo.ChainName)) + proxier.natRules.Write(args, "-j", string(endpointChain)) } } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/OWNERS index cbaad91602cb..5e3e0a9c5798 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/OWNERS @@ -1,17 +1,19 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - sig-network-reviewers - - andrewsykim - - uablrek +- sig-network-reviewers +- brendandburns +- Lion-Wei +- andrewsykim +- lbernail +- uablrek approvers: - - sig-network-approvers - - andrewsykim - - uablrek +- sig-network-approvers +- brendandburns +- m1093782566 +- andrewsykim +- lbernail +- uablrek labels: - - sig/network - - area/ipvs -emeritus_approvers: - - brendandburns - - lbernail - - m1093782566 +- sig/network +- area/ipvs diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/graceful_termination.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/graceful_termination.go index 5cc92db57c09..f39cc7938840 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/graceful_termination.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/graceful_termination.go @@ -80,17 +80,7 @@ func (q *graceTerminateRSList) remove(rs *listItem) bool { return false } -// return the size of the list -func (q *graceTerminateRSList) len() int { - q.lock.Lock() - defer q.lock.Unlock() - - return len(q.list) -} - func (q *graceTerminateRSList) flushList(handler func(rsToDelete *listItem) (bool, error)) bool { - q.lock.Lock() - defer q.lock.Unlock() success := true for name, rs := range q.list { deleted, err := handler(rs) @@ -100,7 +90,7 @@ func (q *graceTerminateRSList) flushList(handler func(rsToDelete *listItem) (boo } if deleted { klog.InfoS("Removed real server from graceful delete real server list", "realServer", name) - delete(q.list, rs.String()) + q.remove(rs) } } return success diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/proxier.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/proxier.go index 28c76622f96e..c2ce3dfa42b4 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/proxier.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/ipvs/proxier.go @@ -222,6 +222,7 @@ type Proxier struct { mu sync.Mutex // protects the following fields serviceMap proxy.ServiceMap endpointsMap proxy.EndpointsMap + portsMap map[netutils.LocalPort]netutils.Closeable nodeLabels map[string]string // endpointSlicesSynced, and servicesSynced are set to true when // corresponding objects are synced after startup. This is used to avoid updating @@ -247,6 +248,7 @@ type Proxier struct { localDetector proxyutiliptables.LocalTrafficDetector hostname string nodeIP net.IP + portMapper netutils.PortOpener recorder events.EventRecorder serviceHealthServer healthcheck.ServiceHealthServer @@ -273,20 +275,6 @@ type Proxier struct { // Inject for test purpose. networkInterfacer utilproxy.NetworkInterfacer gracefuldeleteManager *GracefulTerminationManager - // serviceNoLocalEndpointsInternal represents the set of services that couldn't be applied - // due to the absence of local endpoints when the internal traffic policy is "Local". - // It is used to publish the sync_proxy_rules_no_endpoints_total - // metric with the traffic_policy label set to "internal". - // sets.String is used here since we end up calculating endpoint topology multiple times for the same Service - // if it has multiple ports but each Service should only be counted once. - serviceNoLocalEndpointsInternal sets.String - // serviceNoLocalEndpointsExternal irepresents the set of services that couldn't be applied - // due to the absence of any endpoints when the external traffic policy is "Local". - // It is used to publish the sync_proxy_rules_no_endpoints_total - // metric with the traffic_policy label set to "external". - // sets.String is used here since we end up calculating endpoint topology multiple times for the same Service - // if it has multiple ports but each Service should only be counted once. - serviceNoLocalEndpointsExternal sets.String } // IPGetter helps get node network interface IP and IPs binded to the IPVS dummy interface @@ -465,6 +453,7 @@ func NewProxier(ipt utiliptables.Interface, proxier := &Proxier{ ipFamily: ipFamily, + portsMap: make(map[netutils.LocalPort]netutils.Closeable), serviceMap: make(proxy.ServiceMap), serviceChanges: proxy.NewServiceChangeTracker(newServiceInfo, ipFamily, recorder, nil), endpointsMap: make(proxy.EndpointsMap), @@ -479,6 +468,7 @@ func NewProxier(ipt utiliptables.Interface, localDetector: localDetector, hostname: hostname, nodeIP: nodeIP, + portMapper: &netutils.ListenPortOpener, recorder: recorder, serviceHealthServer: serviceHealthServer, healthzServer: healthzServer, @@ -1041,8 +1031,6 @@ func (proxier *Proxier) syncProxyRules() { klog.V(3).InfoS("Syncing ipvs proxier rules") - proxier.serviceNoLocalEndpointsInternal = sets.NewString() - proxier.serviceNoLocalEndpointsExternal = sets.NewString() // Begin install iptables // Reset all buffers used later. @@ -1073,6 +1061,8 @@ func (proxier *Proxier) syncProxyRules() { set.resetEntries() } + // Accumulate the set of local ports that we will be holding open once this update is complete + replacementPortsMap := map[netutils.LocalPort]netutils.Closeable{} // activeIPVSServices represents IPVS service successfully created in this round of sync activeIPVSServices := map[string]bool{} // currentIPVSServices represent IPVS services listed from the system @@ -1137,6 +1127,8 @@ func (proxier *Proxier) syncProxyRules() { // reset slice to filtered entries nodeIPs = nodeIPs[:idx] + localAddrSet := utilproxy.GetLocalAddrSet() + // Build IPVS rules for each service. for svcName, svc := range proxier.serviceMap { svcInfo, ok := svc.(*serviceInfo) @@ -1218,7 +1210,7 @@ func (proxier *Proxier) syncProxyRules() { // ExternalTrafficPolicy only works for NodePort and external LB traffic, does not affect ClusterIP // So we still need clusterIP rules in onlyNodeLocalEndpoints mode. internalNodeLocal := false - if utilfeature.DefaultFeatureGate.Enabled(features.ServiceInternalTrafficPolicy) && svcInfo.InternalPolicyLocal() { + if utilfeature.DefaultFeatureGate.Enabled(features.ServiceInternalTrafficPolicy) && svcInfo.NodeLocalInternal() { internalNodeLocal = true } if err := proxier.syncEndpoint(svcName, internalNodeLocal, serv); err != nil { @@ -1230,6 +1222,41 @@ func (proxier *Proxier) syncProxyRules() { // Capture externalIPs. for _, externalIP := range svcInfo.ExternalIPStrings() { + // If the "external" IP happens to be an IP that is local to this + // machine, hold the local port open so no other process can open it + // (because the socket might open but it would never work). + if (svcInfo.Protocol() != v1.ProtocolSCTP) && localAddrSet.Has(netutils.ParseIPSloppy(externalIP)) { + // We do not start listening on SCTP ports, according to our agreement in the SCTP support KEP + lp := netutils.LocalPort{ + Description: "externalIP for " + svcNameString, + IP: externalIP, + IPFamily: localPortIPFamily, + Port: svcInfo.Port(), + Protocol: netutils.Protocol(svcInfo.Protocol()), + } + if proxier.portsMap[lp] != nil { + klog.V(4).InfoS("Port was open before and is still needed", "port", lp) + replacementPortsMap[lp] = proxier.portsMap[lp] + } else { + socket, err := proxier.portMapper.OpenLocalPort(&lp) + if err != nil { + msg := fmt.Sprintf("can't open port %s, skipping it", lp.String()) + + proxier.recorder.Eventf( + &v1.ObjectReference{ + Kind: "Node", + Name: proxier.hostname, + UID: types.UID(proxier.hostname), + Namespace: "", + }, nil, v1.EventTypeWarning, err.Error(), "SyncProxyRules", msg) + klog.ErrorS(err, "Can't open port, skipping it", "port", lp) + continue + } + klog.V(2).InfoS("Opened local port", "port", lp) + replacementPortsMap[lp] = socket + } + } // We're holding the port, so it's OK to install IPVS rules. + // ipset call entry := &utilipset.Entry{ IP: externalIP, @@ -1238,7 +1265,7 @@ func (proxier *Proxier) syncProxyRules() { SetType: utilipset.HashIPPort, } - if svcInfo.ExternalPolicyLocal() { + if svcInfo.NodeLocalExternal() { if valid := proxier.ipsetList[kubeExternalIPLocalSet].validateEntry(entry); !valid { klog.ErrorS(nil, "Error adding entry to ipset", "entry", entry, "ipset", proxier.ipsetList[kubeExternalIPLocalSet].Name) continue @@ -1268,7 +1295,7 @@ func (proxier *Proxier) syncProxyRules() { activeIPVSServices[serv.String()] = true activeBindAddrs[serv.Address.String()] = true - if err := proxier.syncEndpoint(svcName, svcInfo.ExternalPolicyLocal(), serv); err != nil { + if err := proxier.syncEndpoint(svcName, svcInfo.NodeLocalExternal(), serv); err != nil { klog.ErrorS(err, "Failed to sync endpoint for service", "serviceName", svcName, "virtualServer", serv) } } else { @@ -1295,7 +1322,7 @@ func (proxier *Proxier) syncProxyRules() { } proxier.ipsetList[kubeLoadBalancerSet].activeEntries.Insert(entry.String()) // insert loadbalancer entry to lbIngressLocalSet if service externaltrafficpolicy=local - if svcInfo.ExternalPolicyLocal() { + if svcInfo.NodeLocalExternal() { if valid := proxier.ipsetList[kubeLoadBalancerLocalSet].validateEntry(entry); !valid { klog.ErrorS(nil, "Error adding entry to ipset", "entry", entry, "ipset", proxier.ipsetList[kubeLoadBalancerLocalSet].Name) continue @@ -1367,7 +1394,7 @@ func (proxier *Proxier) syncProxyRules() { if err := proxier.syncService(svcNameString, serv, true, bindedAddresses); err == nil { activeIPVSServices[serv.String()] = true activeBindAddrs[serv.Address.String()] = true - if err := proxier.syncEndpoint(svcName, svcInfo.ExternalPolicyLocal(), serv); err != nil { + if err := proxier.syncEndpoint(svcName, svcInfo.NodeLocalExternal(), serv); err != nil { klog.ErrorS(err, "Failed to sync endpoint for service", "serviceName", svcName, "virtualServer", serv) } } else { @@ -1403,9 +1430,33 @@ func (proxier *Proxier) syncProxyRules() { // For ports on node IPs, open the actual port and hold it. for _, lp := range lps { - if svcInfo.Protocol() != v1.ProtocolSCTP && lp.Protocol == netutils.UDP { - conntrack.ClearEntriesForPort(proxier.exec, lp.Port, isIPv6, v1.ProtocolUDP) - } + if proxier.portsMap[lp] != nil { + klog.V(4).InfoS("Port was open before and is still needed", "port", lp) + replacementPortsMap[lp] = proxier.portsMap[lp] + // We do not start listening on SCTP ports, according to our agreement in the + // SCTP support KEP + } else if svcInfo.Protocol() != v1.ProtocolSCTP { + socket, err := proxier.portMapper.OpenLocalPort(&lp) + if err != nil { + msg := fmt.Sprintf("can't open port %s, skipping it", lp.String()) + + proxier.recorder.Eventf( + &v1.ObjectReference{ + Kind: "Node", + Name: proxier.hostname, + UID: types.UID(proxier.hostname), + Namespace: "", + }, nil, v1.EventTypeWarning, err.Error(), "SyncProxyRules", msg) + klog.ErrorS(err, "Can't open port, skipping it", "port", lp) + continue + } + klog.V(2).InfoS("Opened local port", "port", lp) + + if lp.Protocol == netutils.UDP { + conntrack.ClearEntriesForPort(proxier.exec, lp.Port, isIPv6, v1.ProtocolUDP) + } + replacementPortsMap[lp] = socket + } // We're holding the port, so it's OK to install ipvs rules. } // Nodeports need SNAT, unless they're local. @@ -1465,7 +1516,7 @@ func (proxier *Proxier) syncProxyRules() { } // Add externaltrafficpolicy=local type nodeport entry - if svcInfo.ExternalPolicyLocal() { + if svcInfo.NodeLocalExternal() { var nodePortLocalSet *IPSet switch protocol { case utilipset.ProtocolTCP: @@ -1510,7 +1561,7 @@ func (proxier *Proxier) syncProxyRules() { // There is no need to bind Node IP to dummy interface, so set parameter `bindAddr` to `false`. if err := proxier.syncService(svcNameString, serv, false, bindedAddresses); err == nil { activeIPVSServices[serv.String()] = true - if err := proxier.syncEndpoint(svcName, svcInfo.ExternalPolicyLocal(), serv); err != nil { + if err := proxier.syncEndpoint(svcName, svcInfo.NodeLocalExternal(), serv); err != nil { klog.ErrorS(err, "Failed to sync endpoint for service", "serviceName", svcName, "virtualServer", serv) } } else { @@ -1556,13 +1607,10 @@ func (proxier *Proxier) syncProxyRules() { klog.V(5).InfoS("Restoring iptables", "rules", string(proxier.iptablesData.Bytes())) err = proxier.iptables.RestoreAll(proxier.iptablesData.Bytes(), utiliptables.NoFlushTables, utiliptables.RestoreCounters) if err != nil { - if pErr, ok := err.(utiliptables.ParseError); ok { - lines := utiliptables.ExtractLines(proxier.iptablesData.Bytes(), pErr.Line(), 3) - klog.ErrorS(pErr, "Failed to execute iptables-restore", "rules", lines) - } else { - klog.ErrorS(err, "Failed to execute iptables-restore", "rules", string(proxier.iptablesData.Bytes())) - } + klog.ErrorS(err, "Failed to execute iptables-restore", "rules", string(proxier.iptablesData.Bytes())) metrics.IptablesRestoreFailuresTotal.Inc() + // Revert new local ports. + utilproxy.RevertPorts(replacementPortsMap, proxier.portsMap) return } for name, lastChangeTriggerTimes := range endpointUpdateResult.LastChangeTriggerTimes { @@ -1573,6 +1621,14 @@ func (proxier *Proxier) syncProxyRules() { } } + // Close old local ports and save new ones. + for k, v := range proxier.portsMap { + if replacementPortsMap[k] == nil { + v.Close() + } + } + proxier.portsMap = replacementPortsMap + // Get legacy bind address // currentBindAddrs represents ip addresses bind to DefaultDummyDevice from the system currentBindAddrs, err := proxier.netlinkHandle.ListBindAddress(DefaultDummyDevice) @@ -1615,9 +1671,6 @@ func (proxier *Proxier) syncProxyRules() { } } proxier.deleteEndpointConnections(endpointUpdateResult.StaleEndpoints) - - metrics.SyncProxyRulesNoLocalEndpointsTotal.WithLabelValues("internal").Set(float64(proxier.serviceNoLocalEndpointsInternal.Len())) - metrics.SyncProxyRulesNoLocalEndpointsTotal.WithLabelValues("external").Set(float64(proxier.serviceNoLocalEndpointsExternal.Len())) } // writeIptablesRules write all iptables rules to proxier.natRules or proxier.FilterRules that ipvs proxier needed @@ -1658,19 +1711,14 @@ func (proxier *Proxier) writeIptablesRules() { "-m", "set", "--match-set", proxier.ipsetList[kubeClusterIPSet].Name, ) if proxier.masqueradeAll { - proxier.natRules.Write( - args, "dst,dst", - "-j", string(KubeMarkMasqChain)) + proxier.natRules.Write(args, "dst,dst", "-j", string(KubeMarkMasqChain)) } else if proxier.localDetector.IsImplemented() { // This masquerades off-cluster traffic to a service VIP. The idea // is that you can establish a static route for your Service range, // routing to any node, and that node will bridge into the Service // for you. Since that might bounce off-node, we masquerade here. // If/when we support "Local" policy for VIPs, we should update this. - proxier.natRules.Write( - args, "dst,dst", - proxier.localDetector.IfNotLocal(), - "-j", string(KubeMarkMasqChain)) + proxier.natRules.Write(proxier.localDetector.JumpIfNotLocal(append(args, "dst,dst"), string(KubeMarkMasqChain))) } else { // Masquerade all OUTPUT traffic coming from a service ip. // The kube dummy interface has all service VIPs assigned which @@ -1679,9 +1727,7 @@ func (proxier *Proxier) writeIptablesRules() { // VIP:. // Always masquerading OUTPUT (node-originating) traffic with a VIP // source ip and service port destination fixes the outgoing connections. - proxier.natRules.Write( - args, "src,dst", - "-j", string(KubeMarkMasqChain)) + proxier.natRules.Write(args, "src,dst", "-j", string(KubeMarkMasqChain)) } } @@ -1970,6 +2016,14 @@ func (proxier *Proxier) syncEndpoint(svcPortName proxy.ServicePortName, onlyNode // curEndpoints represents IPVS destinations listed from current system. curEndpoints := sets.NewString() + // readyEndpoints represents Endpoints watched from API Server. + readyEndpoints := sets.NewString() + // localReadyEndpoints represents local endpoints that are ready and NOT terminating. + localReadyEndpoints := sets.NewString() + // localReadyTerminatingEndpoints represents local endpoints that are ready AND terminating. + // Fall back to these endpoints if no non-terminating ready endpoints exist for node-local traffic. + localReadyTerminatingEndpoints := sets.NewString() + curDests, err := proxier.ipvs.GetRealServers(appliedVirtualServer) if err != nil { klog.ErrorS(err, "Failed to list IPVS destinations") @@ -1989,33 +2043,32 @@ func (proxier *Proxier) syncEndpoint(svcPortName proxy.ServicePortName, onlyNode if !ok { klog.InfoS("Unable to filter endpoints due to missing service info", "servicePortName", svcPortName) } else { - clusterEndpoints, localEndpoints, _, _ := proxy.CategorizeEndpoints(endpoints, svcInfo, proxier.nodeLabels) - if onlyNodeLocalEndpoints { - if len(localEndpoints) > 0 { - endpoints = localEndpoints - } else { - // https://github.com/kubernetes/kubernetes/pull/97081 - // Allow access from local PODs even if no local endpoints exist. - // Traffic from an external source will be routed but the reply - // will have the POD address and will be discarded. - endpoints = clusterEndpoints - - if svcInfo.InternalPolicyLocal() && utilfeature.DefaultFeatureGate.Enabled(features.ServiceInternalTrafficPolicy) { - proxier.serviceNoLocalEndpointsInternal.Insert(svcPortName.NamespacedName.String()) - } + endpoints = proxy.FilterEndpoints(endpoints, svcInfo, proxier.nodeLabels) + } - if svcInfo.ExternalPolicyLocal() { - proxier.serviceNoLocalEndpointsExternal.Insert(svcPortName.NamespacedName.String()) - } + for _, epInfo := range endpoints { + if epInfo.IsReady() { + readyEndpoints.Insert(epInfo.String()) + } + + if onlyNodeLocalEndpoints && epInfo.GetIsLocal() { + if epInfo.IsReady() { + localReadyEndpoints.Insert(epInfo.String()) + } else if epInfo.IsServing() && epInfo.IsTerminating() { + localReadyTerminatingEndpoints.Insert(epInfo.String()) } - } else { - endpoints = clusterEndpoints } } - newEndpoints := sets.NewString() - for _, epInfo := range endpoints { - newEndpoints.Insert(epInfo.String()) + newEndpoints := readyEndpoints + if onlyNodeLocalEndpoints { + newEndpoints = localReadyEndpoints + + if utilfeature.DefaultFeatureGate.Enabled(features.ProxyTerminatingEndpoints) { + if len(newEndpoints) == 0 && localReadyTerminatingEndpoints.Len() > 0 { + newEndpoints = localReadyTerminatingEndpoints + } + } } // Create new endpoints diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/metrics/metrics.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/metrics/metrics.go index f61cf4fc9910..9c1aeca55ba9 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/metrics/metrics.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/metrics/metrics.go @@ -148,19 +148,6 @@ var ( StabilityLevel: metrics.ALPHA, }, ) - - // SyncProxyRulesNoLocalEndpointsTotal is the total number of rules that do - // not have an available endpoint. This can be caused by an internal - // traffic policy with no available local workload. - SyncProxyRulesNoLocalEndpointsTotal = metrics.NewGaugeVec( - &metrics.GaugeOpts{ - Subsystem: kubeProxySubsystem, - Name: "sync_proxy_rules_no_local_endpoints_total", - Help: "Number of services with a Local traffic policy and no endpoints", - StabilityLevel: metrics.ALPHA, - }, - []string{"traffic_policy"}, - ) ) var registerMetricsOnce sync.Once @@ -178,7 +165,6 @@ func RegisterMetrics() { legacyregistry.MustRegister(IptablesRulesTotal) legacyregistry.MustRegister(IptablesRestoreFailuresTotal) legacyregistry.MustRegister(SyncProxyRulesLastQueuedTimestamp) - legacyregistry.MustRegister(SyncProxyRulesNoLocalEndpointsTotal) }) } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/service.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/service.go index 17e746fbfaca..1d149adf1494 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/service.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/service.go @@ -52,8 +52,8 @@ type BaseServiceInfo struct { externalIPs []string loadBalancerSourceRanges []string healthCheckNodePort int - externalPolicyLocal bool - internalPolicyLocal bool + nodeLocalExternal bool + nodeLocalInternal bool internalTrafficPolicy *v1.ServiceInternalTrafficPolicyType hintsAnnotation string } @@ -119,14 +119,14 @@ func (info *BaseServiceInfo) LoadBalancerIPStrings() []string { return ips } -// ExternalPolicyLocal is part of ServicePort interface. -func (info *BaseServiceInfo) ExternalPolicyLocal() bool { - return info.externalPolicyLocal +// NodeLocalExternal is part of ServicePort interface. +func (info *BaseServiceInfo) NodeLocalExternal() bool { + return info.nodeLocalExternal } -// InternalPolicyLocal is part of ServicePort interface -func (info *BaseServiceInfo) InternalPolicyLocal() bool { - return info.internalPolicyLocal +// NodeLocalInternal is part of ServicePort interface +func (info *BaseServiceInfo) NodeLocalInternal() bool { + return info.nodeLocalInternal } // InternalTrafficPolicy is part of ServicePort interface @@ -139,32 +139,14 @@ func (info *BaseServiceInfo) HintsAnnotation() string { return info.hintsAnnotation } -// ExternallyAccessible is part of ServicePort interface. -func (info *BaseServiceInfo) ExternallyAccessible() bool { - return info.nodePort != 0 || len(info.loadBalancerStatus.Ingress) != 0 || len(info.externalIPs) != 0 -} - -// UsesClusterEndpoints is part of ServicePort interface. -func (info *BaseServiceInfo) UsesClusterEndpoints() bool { - // The service port uses Cluster endpoints if the internal traffic policy is "Cluster", - // or if it accepts external traffic at all. (Even if the external traffic policy is - // "Local", we need Cluster endpoints to implement short circuiting.) - return !info.internalPolicyLocal || info.ExternallyAccessible() -} - -// UsesLocalEndpoints is part of ServicePort interface. -func (info *BaseServiceInfo) UsesLocalEndpoints() bool { - return info.internalPolicyLocal || (info.externalPolicyLocal && info.ExternallyAccessible()) -} - func (sct *ServiceChangeTracker) newBaseServiceInfo(port *v1.ServicePort, service *v1.Service) *BaseServiceInfo { - externalPolicyLocal := false - if apiservice.ExternalPolicyLocal(service) { - externalPolicyLocal = true + nodeLocalExternal := false + if apiservice.RequestsOnlyLocalTraffic(service) { + nodeLocalExternal = true } - internalPolicyLocal := false + nodeLocalInternal := false if utilfeature.DefaultFeatureGate.Enabled(features.ServiceInternalTrafficPolicy) { - internalPolicyLocal = apiservice.InternalPolicyLocal(service) + nodeLocalInternal = apiservice.RequestsOnlyLocalTrafficForInternal(service) } var stickyMaxAgeSeconds int if service.Spec.SessionAffinity == v1.ServiceAffinityClientIP { @@ -180,8 +162,8 @@ func (sct *ServiceChangeTracker) newBaseServiceInfo(port *v1.ServicePort, servic nodePort: int(port.NodePort), sessionAffinityType: service.Spec.SessionAffinity, stickyMaxAgeSeconds: stickyMaxAgeSeconds, - externalPolicyLocal: externalPolicyLocal, - internalPolicyLocal: internalPolicyLocal, + nodeLocalExternal: nodeLocalExternal, + nodeLocalInternal: nodeLocalInternal, internalTrafficPolicy: service.Spec.InternalTrafficPolicy, hintsAnnotation: service.Annotations[v1.AnnotationTopologyAwareHints], } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/topology.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/topology.go index d68aeb40f940..ae7274c5b259 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/topology.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/topology.go @@ -23,178 +23,78 @@ import ( "k8s.io/kubernetes/pkg/features" ) -// CategorizeEndpoints returns: -// -// - The service's usable Cluster-traffic-policy endpoints (taking topology into account, if -// relevant). This will be nil if the service does not ever use Cluster traffic policy. -// -// - The service's usable Local-traffic-policy endpoints (including terminating endpoints, if -// relevant). This will be nil if the service does not ever use Local traffic policy. -// -// - The combined list of all endpoints reachable from this node (which is the union of the -// previous two lists, but in the case where it is identical to one or the other, we avoid -// allocating a separate list). -// -// - An indication of whether the service has any endpoints reachable from anywhere in the -// cluster. (This may be true even if allReachableEndpoints is empty.) -func CategorizeEndpoints(endpoints []Endpoint, svcInfo ServicePort, nodeLabels map[string]string) (clusterEndpoints, localEndpoints, allReachableEndpoints []Endpoint, hasAnyEndpoints bool) { - var useTopology, useServingTerminatingEndpoints bool - - if svcInfo.UsesClusterEndpoints() { - useTopology = canUseTopology(endpoints, svcInfo, nodeLabels) - clusterEndpoints = filterEndpoints(endpoints, func(ep Endpoint) bool { - if !ep.IsReady() { - return false - } - if useTopology && !availableForTopology(ep, nodeLabels) { - return false - } - return true - }) - - // if there are 0 cluster-wide endpoints, we can try to fallback to any terminating endpoints that are ready. - // When falling back to terminating endpoints, we do NOT consider topology aware routing since this is a best - // effort attempt to avoid dropping connections. - if len(clusterEndpoints) == 0 && utilfeature.DefaultFeatureGate.Enabled(features.ProxyTerminatingEndpoints) { - clusterEndpoints = filterEndpoints(endpoints, func(ep Endpoint) bool { - if ep.IsServing() && ep.IsTerminating() { - return true - } - - return false - }) - } - - // If there are any Ready endpoints anywhere in the cluster, we are - // guaranteed to get one in clusterEndpoints. - if len(clusterEndpoints) > 0 { - hasAnyEndpoints = true - } - } - - if !svcInfo.UsesLocalEndpoints() { - allReachableEndpoints = clusterEndpoints - return - } - - // Pre-scan the endpoints, to figure out which type of endpoint Local - // traffic policy will use, and also to see if there are any usable - // endpoints anywhere in the cluster. - var hasLocalReadyEndpoints, hasLocalServingTerminatingEndpoints bool - for _, ep := range endpoints { - if ep.IsReady() { - hasAnyEndpoints = true - if ep.GetIsLocal() { - hasLocalReadyEndpoints = true - } - } else if ep.IsServing() && ep.IsTerminating() && utilfeature.DefaultFeatureGate.Enabled(features.ProxyTerminatingEndpoints) { - hasAnyEndpoints = true - if ep.GetIsLocal() { - hasLocalServingTerminatingEndpoints = true - } - } - } - - if hasLocalReadyEndpoints { - localEndpoints = filterEndpoints(endpoints, func(ep Endpoint) bool { - return ep.GetIsLocal() && ep.IsReady() - }) - } else if hasLocalServingTerminatingEndpoints { - useServingTerminatingEndpoints = true - localEndpoints = filterEndpoints(endpoints, func(ep Endpoint) bool { - return ep.GetIsLocal() && ep.IsServing() && ep.IsTerminating() - }) - } - - if !svcInfo.UsesClusterEndpoints() { - allReachableEndpoints = localEndpoints - return +// FilterEndpoints filters endpoints based on Service configuration, node +// labels, and enabled feature gates. This is primarily used to enable topology +// aware routing. +func FilterEndpoints(endpoints []Endpoint, svcInfo ServicePort, nodeLabels map[string]string) []Endpoint { + if svcInfo.NodeLocalExternal() { + return endpoints } - if !useTopology && !useServingTerminatingEndpoints { - // !useServingTerminatingEndpoints means that localEndpoints contains only - // Ready endpoints. !useTopology means that clusterEndpoints contains *every* - // Ready endpoint. So clusterEndpoints must be a superset of localEndpoints. - allReachableEndpoints = clusterEndpoints - return + if utilfeature.DefaultFeatureGate.Enabled(features.ServiceInternalTrafficPolicy) && svcInfo.NodeLocalInternal() { + return FilterLocalEndpoint(endpoints) } - // clusterEndpoints may contain remote endpoints that aren't in localEndpoints, while - // localEndpoints may contain terminating or topologically-unavailable local endpoints - // that aren't in clusterEndpoints. So we have to merge the two lists. - endpointsMap := make(map[string]Endpoint, len(clusterEndpoints)+len(localEndpoints)) - for _, ep := range clusterEndpoints { - endpointsMap[ep.String()] = ep - } - for _, ep := range localEndpoints { - endpointsMap[ep.String()] = ep - } - allReachableEndpoints = make([]Endpoint, 0, len(endpointsMap)) - for _, ep := range endpointsMap { - allReachableEndpoints = append(allReachableEndpoints, ep) + if utilfeature.DefaultFeatureGate.Enabled(features.TopologyAwareHints) { + return filterEndpointsWithHints(endpoints, svcInfo.HintsAnnotation(), nodeLabels) } - return + return endpoints } -// canUseTopology returns true if topology aware routing is enabled and properly configured -// in this cluster. That is, it checks that: -// * The TopologyAwareHints feature is enabled -// * The "service.kubernetes.io/topology-aware-hints" annotation on this Service is set to "Auto" -// * The node's labels include "topology.kubernetes.io/zone" -// * All of the endpoints for this Service have a topology hint -// * At least one endpoint for this Service is hinted for this node's zone. -func canUseTopology(endpoints []Endpoint, svcInfo ServicePort, nodeLabels map[string]string) bool { - hintsAnnotation := svcInfo.HintsAnnotation() +// filterEndpointsWithHints provides filtering based on the hints included in +// EndpointSlices. If any of the following are true, the full list of endpoints +// will be returned without any filtering: +// * The AnnotationTopologyAwareHints annotation is not set to "Auto" for this +// Service. +// * No zone is specified in node labels. +// * No endpoints for this Service have a hint pointing to the zone this +// instance of kube-proxy is running in. +// * One or more endpoints for this Service do not have hints specified. +func filterEndpointsWithHints(endpoints []Endpoint, hintsAnnotation string, nodeLabels map[string]string) []Endpoint { if hintsAnnotation != "Auto" && hintsAnnotation != "auto" { if hintsAnnotation != "" && hintsAnnotation != "Disabled" && hintsAnnotation != "disabled" { klog.InfoS("Skipping topology aware endpoint filtering since Service has unexpected value", "annotationTopologyAwareHints", v1.AnnotationTopologyAwareHints, "hints", hintsAnnotation) } - return false + return endpoints } zone, ok := nodeLabels[v1.LabelTopologyZone] if !ok || zone == "" { klog.InfoS("Skipping topology aware endpoint filtering since node is missing label", "label", v1.LabelTopologyZone) - return false + return endpoints } - hasEndpointForZone := false + filteredEndpoints := []Endpoint{} + for _, endpoint := range endpoints { if !endpoint.IsReady() { continue } if endpoint.GetZoneHints().Len() == 0 { klog.InfoS("Skipping topology aware endpoint filtering since one or more endpoints is missing a zone hint") - return false + return endpoints } - if endpoint.GetZoneHints().Has(zone) { - hasEndpointForZone = true + filteredEndpoints = append(filteredEndpoints, endpoint) } } - if !hasEndpointForZone { + if len(filteredEndpoints) == 0 { klog.InfoS("Skipping topology aware endpoint filtering since no hints were provided for zone", "zone", zone) - return false + return endpoints } - return true -} - -// availableForTopology checks if this endpoint is available for use on this node, given -// topology constraints. (It assumes that canUseTopology() returned true.) -func availableForTopology(endpoint Endpoint, nodeLabels map[string]string) bool { - zone := nodeLabels[v1.LabelTopologyZone] - return endpoint.GetZoneHints().Has(zone) + return filteredEndpoints } -// filterEndpoints filters endpoints according to predicate -func filterEndpoints(endpoints []Endpoint, predicate func(Endpoint) bool) []Endpoint { - filteredEndpoints := make([]Endpoint, 0, len(endpoints)) +// FilterLocalEndpoint returns the node local endpoints +func FilterLocalEndpoint(endpoints []Endpoint) []Endpoint { + var filteredEndpoints []Endpoint + // Get all the local endpoints for _, ep := range endpoints { - if predicate(ep) { + if ep.GetIsLocal() { filteredEndpoints = append(filteredEndpoints, ep) } } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/types.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/types.go index 7b16cd7b5988..b7b6613f0611 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/types.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/types.go @@ -83,23 +83,14 @@ type ServicePort interface { HealthCheckNodePort() int // GetNodePort returns a service Node port if present. If return 0, it means not present. NodePort() int - // ExternalPolicyLocal returns if a service has only node local endpoints for external traffic. - ExternalPolicyLocal() bool - // InternalPolicyLocal returns if a service has only node local endpoints for internal traffic. - InternalPolicyLocal() bool + // NodeLocalExternal returns if a service has only node local endpoints for external traffic. + NodeLocalExternal() bool + // NodeLocalInternal returns if a service has only node local endpoints for internal traffic. + NodeLocalInternal() bool // InternalTrafficPolicy returns service InternalTrafficPolicy InternalTrafficPolicy() *v1.ServiceInternalTrafficPolicyType // HintsAnnotation returns the value of the v1.AnnotationTopologyAwareHints annotation. HintsAnnotation() string - // ExternallyAccessible returns true if the service port is reachable via something - // other than ClusterIP (NodePort/ExternalIP/LoadBalancer) - ExternallyAccessible() bool - // UsesClusterEndpoints returns true if the service port ever sends traffic to - // endpoints based on "Cluster" traffic policy - UsesClusterEndpoints() bool - // UsesLocalEndpoints returns true if the service port ever sends traffic to - // endpoints based on "Local" traffic policy - UsesLocalEndpoints() bool } // Endpoint in an interface which abstracts information about an endpoint. diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/userspace/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/userspace/OWNERS index 1484574c2bfe..7fb99c84d84b 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/userspace/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/userspace/OWNERS @@ -1,10 +1,10 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - sig-network-approvers +- sig-network-approvers reviewers: - - sig-network-reviewers - - lavalamp - - smarterclayton +- sig-network-reviewers +- lavalamp +- smarterclayton labels: - - sig/network +- sig/network diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/util/iptables/traffic.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/util/iptables/traffic.go index 4666c6c3de68..2ee0ae015bec 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/util/iptables/traffic.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/util/iptables/traffic.go @@ -19,6 +19,7 @@ package iptables import ( "fmt" + "k8s.io/klog/v2" utiliptables "k8s.io/kubernetes/pkg/util/iptables" netutils "k8s.io/utils/net" ) @@ -29,11 +30,13 @@ type LocalTrafficDetector interface { // IsImplemented returns true if the implementation does something, false otherwise IsImplemented() bool - // IfLocal returns iptables arguments that will match traffic from a pod - IfLocal() []string + // JumpIfLocal appends conditions to jump to a target chain if traffic detected to be + // of local origin + JumpIfLocal(args []string, toChain string) []string - // IfNotLocal returns iptables arguments that will match traffic that is not from a pod - IfNotLocal() []string + // JumpINotfLocal appends conditions to jump to a target chain if traffic detected not to be + // of local origin + JumpIfNotLocal(args []string, toChain string) []string } type noOpLocalDetector struct{} @@ -47,17 +50,16 @@ func (n *noOpLocalDetector) IsImplemented() bool { return false } -func (n *noOpLocalDetector) IfLocal() []string { - return nil // no-op; matches all traffic +func (n *noOpLocalDetector) JumpIfLocal(args []string, toChain string) []string { + return args // no-op } -func (n *noOpLocalDetector) IfNotLocal() []string { - return nil // no-op; matches all traffic +func (n *noOpLocalDetector) JumpIfNotLocal(args []string, toChain string) []string { + return args // no-op } type detectLocalByCIDR struct { - ifLocal []string - ifNotLocal []string + cidr string } // NewDetectLocalByCIDR implements the LocalTrafficDetector interface using a CIDR. This can be used when a single CIDR @@ -70,79 +72,21 @@ func NewDetectLocalByCIDR(cidr string, ipt utiliptables.Interface) (LocalTraffic if err != nil { return nil, err } - return &detectLocalByCIDR{ - ifLocal: []string{"-s", cidr}, - ifNotLocal: []string{"!", "-s", cidr}, - }, nil + return &detectLocalByCIDR{cidr: cidr}, nil } func (d *detectLocalByCIDR) IsImplemented() bool { return true } -func (d *detectLocalByCIDR) IfLocal() []string { - return d.ifLocal +func (d *detectLocalByCIDR) JumpIfLocal(args []string, toChain string) []string { + line := append(args, "-s", d.cidr, "-j", toChain) + klog.V(4).InfoS("Detect Local By CIDR", "cidr", d.cidr, "jumpLocal", line) + return line } -func (d *detectLocalByCIDR) IfNotLocal() []string { - return d.ifNotLocal -} - -type detectLocalByBridgeInterface struct { - ifLocal []string - ifNotLocal []string -} - -// NewDetectLocalByBridgeInterface implements the LocalTrafficDetector interface using a bridge interface name. -// This can be used when a bridge can be used to capture the notion of local traffic from pods. -func NewDetectLocalByBridgeInterface(interfaceName string) (LocalTrafficDetector, error) { - if len(interfaceName) == 0 { - return nil, fmt.Errorf("no bridge interface name set") - } - return &detectLocalByBridgeInterface{ - ifLocal: []string{"-i", interfaceName}, - ifNotLocal: []string{"!", "-i", interfaceName}, - }, nil -} - -func (d *detectLocalByBridgeInterface) IsImplemented() bool { - return true -} - -func (d *detectLocalByBridgeInterface) IfLocal() []string { - return d.ifLocal -} - -func (d *detectLocalByBridgeInterface) IfNotLocal() []string { - return d.ifNotLocal -} - -type detectLocalByInterfaceNamePrefix struct { - ifLocal []string - ifNotLocal []string -} - -// NewDetectLocalByInterfaceNamePrefix implements the LocalTrafficDetector interface using an interface name prefix. -// This can be used when a pod interface name prefix can be used to capture the notion of local traffic. Note -// that this will match on all interfaces that start with the given prefix. -func NewDetectLocalByInterfaceNamePrefix(interfacePrefix string) (LocalTrafficDetector, error) { - if len(interfacePrefix) == 0 { - return nil, fmt.Errorf("no interface prefix set") - } - return &detectLocalByInterfaceNamePrefix{ - ifLocal: []string{"-i", interfacePrefix + "+"}, - ifNotLocal: []string{"!", "-i", interfacePrefix + "+"}, - }, nil -} - -func (d *detectLocalByInterfaceNamePrefix) IsImplemented() bool { - return true -} - -func (d *detectLocalByInterfaceNamePrefix) IfLocal() []string { - return d.ifLocal -} - -func (d *detectLocalByInterfaceNamePrefix) IfNotLocal() []string { - return d.ifNotLocal +func (d *detectLocalByCIDR) JumpIfNotLocal(args []string, toChain string) []string { + line := append(args, "!", "-s", d.cidr, "-j", toChain) + klog.V(4).InfoS("Detect Local By CIDR", "cidr", d.cidr, "jumpNotLocal", line) + return line } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/util/utils.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/util/utils.go index 1cd78a4a8ca9..4100a1e8bff2 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/util/utils.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/util/utils.go @@ -78,37 +78,6 @@ func BuildPortsToEndpointsMap(endpoints *v1.Endpoints) map[string][]string { return portsToEndpoints } -// ContainsIPv4Loopback returns true if the input is empty or one of the CIDR contains an IPv4 loopback address. -func ContainsIPv4Loopback(cidrStrings []string) bool { - if len(cidrStrings) == 0 { - return true - } - // RFC 5735 127.0.0.0/8 - This block is assigned for use as the Internet host loopback address - ipv4LoopbackStart := netutils.ParseIPSloppy("127.0.0.0") - for _, cidr := range cidrStrings { - if IsZeroCIDR(cidr) { - return true - } - - ip, ipnet, err := netutils.ParseCIDRSloppy(cidr) - if err != nil { - continue - } - - if netutils.IsIPv6CIDR(ipnet) { - continue - } - - if ip.IsLoopback() { - return true - } - if ipnet.Contains(ipv4LoopbackStart) { - return true - } - } - return false -} - // IsZeroCIDR checks whether the input CIDR string is either // the IPv4 or IPv6 zero CIDR func IsZeroCIDR(cidr string) bool { @@ -128,7 +97,7 @@ func IsProxyableIP(ip string) error { } func isProxyableIP(ip net.IP) error { - if !ip.IsGlobalUnicast() { + if ip.IsLoopback() || ip.IsLinkLocalUnicast() || ip.IsLinkLocalMulticast() || ip.IsInterfaceLocalMulticast() { return ErrAddressNotAllowed } return nil @@ -521,8 +490,7 @@ func GetClusterIPByFamily(ipFamily v1.IPFamily, service *v1.Service) string { } type LineBuffer struct { - b bytes.Buffer - lines int + b bytes.Buffer } // Write takes a list of arguments, each a string or []string, joins all the @@ -548,34 +516,22 @@ func (buf *LineBuffer) Write(args ...interface{}) { } } buf.b.WriteByte('\n') - buf.lines++ } // WriteBytes writes bytes to buffer, and terminates with newline. func (buf *LineBuffer) WriteBytes(bytes []byte) { buf.b.Write(bytes) buf.b.WriteByte('\n') - buf.lines++ } -// Reset clears buf func (buf *LineBuffer) Reset() { buf.b.Reset() - buf.lines = 0 } -// Bytes returns the contents of buf as a []byte func (buf *LineBuffer) Bytes() []byte { return buf.b.Bytes() } -// Lines returns the number of lines in buf. Note that more precisely, this returns the -// number of times Write() or WriteBytes() was called; it assumes that you never wrote -// any newlines to the buffer yourself. -func (buf *LineBuffer) Lines() int { - return buf.lines -} - // RevertPorts is closing ports in replacementPortsMap but not in originalPortsMap. In other words, it only // closes the ports opened in this sync. func RevertPorts(replacementPortsMap, originalPortsMap map[netutils.LocalPort]netutils.Closeable) { @@ -587,3 +543,8 @@ func RevertPorts(replacementPortsMap, originalPortsMap map[netutils.LocalPort]ne } } } + +// CountBytesLines counts the number of lines in a bytes slice +func CountBytesLines(b []byte) int { + return bytes.Count(b, []byte{'\n'}) +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/OWNERS index 59b6f30fb3b3..c9f89d6a1a09 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/OWNERS @@ -1,15 +1,18 @@ -# See the OWNERS docs at https://go.k8s.io/owners - -approvers: - - feiskyer - - sbangari -reviewers: - - feiskyer - - sbangari -labels: - - sig/network -emeritus_approvers: - - dineshgovindasamy - - ksubrmnn - - kumarvin123 - - madhanrm +# See the OWNERS docs at https://go.k8s.io/owners + +approvers: +- dineshgovindasamy +- madhanrm +- feiskyer +- ksubrmnn +- kumarvin123 +- sbangari +reviewers: +- dineshgovindasamy +- madhanrm +- feiskyer +- ksubrmnn +- kumarvin123 +- sbangari +labels: +- sig/network diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/hnsV1.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/hnsV1.go index 2c779639998f..68ac02c29b3d 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/hnsV1.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/hnsV1.go @@ -33,7 +33,6 @@ type HostNetworkService interface { getNetworkByName(name string) (*hnsNetworkInfo, error) getEndpointByID(id string) (*endpointsInfo, error) getEndpointByIpAddress(ip string, networkName string) (*endpointsInfo, error) - getEndpointByName(id string) (*endpointsInfo, error) createEndpoint(ep *endpointsInfo, networkName string) (*endpointsInfo, error) deleteEndpoint(hnsID string) error getLoadBalancer(endpoints []endpointsInfo, flags loadBalancerFlags, sourceVip string, vip string, protocol uint16, internalPort uint16, externalPort uint16) (*loadBalancerInfo, error) @@ -63,9 +62,8 @@ func (hns hnsV1) getEndpointByID(id string) (*endpointsInfo, error) { return nil, err } return &endpointsInfo{ - ip: hnsendpoint.IPAddress.String(), - //TODO: Change isLocal to isRemote - isLocal: !hnsendpoint.IsRemoteEndpoint, + ip: hnsendpoint.IPAddress.String(), + isLocal: !hnsendpoint.IsRemoteEndpoint, //TODO: Change isLocal to isRemote macAddress: hnsendpoint.MacAddress, hnsID: hnsendpoint.Id, hns: hns, @@ -110,23 +108,6 @@ func (hns hnsV1) getEndpointByIpAddress(ip string, networkName string) (*endpoin return nil, fmt.Errorf("Endpoint %v not found on network %s", ip, networkName) } - -func (hns hnsV1) getEndpointByName(name string) (*endpointsInfo, error) { - hnsendpoint, err := hcsshim.GetHNSEndpointByName(name) - if err != nil { - klog.ErrorS(err, "failed to get HNS endpoint by name", "name", name) - return nil, err - } - return &endpointsInfo{ - ip: hnsendpoint.IPAddress.String(), - //TODO: Change isLocal to isRemote - isLocal: !hnsendpoint.IsRemoteEndpoint, - macAddress: hnsendpoint.MacAddress, - hnsID: hnsendpoint.Id, - hns: hns, - }, nil -} - func (hns hnsV1) createEndpoint(ep *endpointsInfo, networkName string) (*endpointsInfo, error) { hnsNetwork, err := hcsshim.GetHNSNetworkByName(networkName) if err != nil { diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/hnsV2.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/hnsV2.go index 5e1737a53552..dcb3807e79df 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/hnsV2.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/hnsV2.go @@ -114,19 +114,6 @@ func (hns hnsV2) getEndpointByIpAddress(ip string, networkName string) (*endpoin return nil, fmt.Errorf("Endpoint %v not found on network %s", ip, networkName) } -func (hns hnsV2) getEndpointByName(name string) (*endpointsInfo, error) { - hnsendpoint, err := hcn.GetEndpointByName(name) - if err != nil { - return nil, err - } - return &endpointsInfo{ //TODO: fill out PA - ip: hnsendpoint.IpConfigurations[0].IpAddress, - isLocal: uint32(hnsendpoint.Flags&hcn.EndpointFlagsRemoteEndpoint) == 0, //TODO: Change isLocal to isRemote - macAddress: hnsendpoint.MacAddress, - hnsID: hnsendpoint.Id, - hns: hns, - }, nil -} func (hns hnsV2) createEndpoint(ep *endpointsInfo, networkName string) (*endpointsInfo, error) { hnsNetwork, err := hcn.GetNetworkByName(networkName) if err != nil { diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/metrics.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/metrics.go index e4357e4eceb0..d596210e20c7 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/metrics.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/metrics.go @@ -19,21 +19,40 @@ package winkernel import ( "sync" + "k8s.io/component-base/metrics" "k8s.io/component-base/metrics/legacyregistry" - "k8s.io/kubernetes/pkg/proxy/metrics" +) + +const kubeProxySubsystem = "kubeproxy" + +var ( + SyncProxyRulesLatency = metrics.NewHistogram( + &metrics.HistogramOpts{ + Subsystem: kubeProxySubsystem, + Name: "sync_proxy_rules_duration_seconds", + Help: "SyncProxyRules latency in seconds", + Buckets: metrics.ExponentialBuckets(0.001, 2, 15), + StabilityLevel: metrics.ALPHA, + }, + ) + + // SyncProxyRulesLastTimestamp is the timestamp proxy rules were last + // successfully synced. + SyncProxyRulesLastTimestamp = metrics.NewGauge( + &metrics.GaugeOpts{ + Subsystem: kubeProxySubsystem, + Name: "sync_proxy_rules_last_timestamp_seconds", + Help: "The last time proxy rules were successfully synced", + StabilityLevel: metrics.ALPHA, + }, + ) ) var registerMetricsOnce sync.Once -// RegisterMetrics registers kube-proxy metrics for Windows modes. func RegisterMetrics() { registerMetricsOnce.Do(func() { - legacyregistry.MustRegister(metrics.SyncProxyRulesLatency) - legacyregistry.MustRegister(metrics.SyncProxyRulesLastTimestamp) - legacyregistry.MustRegister(metrics.EndpointChangesPending) - legacyregistry.MustRegister(metrics.EndpointChangesTotal) - legacyregistry.MustRegister(metrics.ServiceChangesPending) - legacyregistry.MustRegister(metrics.ServiceChangesTotal) - legacyregistry.MustRegister(metrics.SyncProxyRulesLastQueuedTimestamp) + legacyregistry.MustRegister(SyncProxyRulesLatency) + legacyregistry.MustRegister(SyncProxyRulesLastTimestamp) }) } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/proxier.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/proxier.go index 53e830283da4..108958edd35d 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/proxier.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/proxy/winkernel/proxier.go @@ -87,9 +87,8 @@ type externalIPInfo struct { } type loadBalancerIngressInfo struct { - ip string - hnsID string - healthCheckHnsID string + ip string + hnsID string } type loadBalancerInfo struct { @@ -378,7 +377,7 @@ func (proxier *Proxier) onServiceMapChange(svcPortName *proxy.ServicePortName) { } // returns a new proxy.Endpoint which abstracts a endpointsInfo -func (proxier *Proxier) newEndpointInfo(baseInfo *proxy.BaseEndpointInfo, _ *proxy.ServicePortName) proxy.Endpoint { +func (proxier *Proxier) newEndpointInfo(baseInfo *proxy.BaseEndpointInfo) proxy.Endpoint { portNumber, err := baseInfo.Port() @@ -549,10 +548,6 @@ type Proxier struct { hostMac string isDSR bool supportedFeatures hcn.SupportedFeatures - healthzPort int - - forwardHealthCheckVip bool - rootHnsEndpointName string } type localPort struct { @@ -598,7 +593,6 @@ func NewProxier( recorder events.EventRecorder, healthzServer healthcheck.ProxierHealthUpdater, config config.KubeProxyWinkernelConfiguration, - healthzPort int, ) (*Proxier, error) { masqueradeValue := 1 << uint(masqueradeBit) masqueradeMark := fmt.Sprintf("%#08x/%#08x", masqueradeValue, masqueradeValue) @@ -690,27 +684,24 @@ func NewProxier( isIPv6 := netutils.IsIPv6(nodeIP) proxier := &Proxier{ - endPointsRefCount: make(endPointsReferenceCountMap), - serviceMap: make(proxy.ServiceMap), - endpointsMap: make(proxy.EndpointsMap), - masqueradeAll: masqueradeAll, - masqueradeMark: masqueradeMark, - clusterCIDR: clusterCIDR, - hostname: hostname, - nodeIP: nodeIP, - recorder: recorder, - serviceHealthServer: serviceHealthServer, - healthzServer: healthzServer, - hns: hns, - network: *hnsNetworkInfo, - sourceVip: sourceVip, - hostMac: hostMac, - isDSR: isDSR, - supportedFeatures: supportedFeatures, - isIPv6Mode: isIPv6, - healthzPort: healthzPort, - rootHnsEndpointName: config.RootHnsEndpointName, - forwardHealthCheckVip: config.ForwardHealthCheckVip, + endPointsRefCount: make(endPointsReferenceCountMap), + serviceMap: make(proxy.ServiceMap), + endpointsMap: make(proxy.EndpointsMap), + masqueradeAll: masqueradeAll, + masqueradeMark: masqueradeMark, + clusterCIDR: clusterCIDR, + hostname: hostname, + nodeIP: nodeIP, + recorder: recorder, + serviceHealthServer: serviceHealthServer, + healthzServer: healthzServer, + hns: hns, + network: *hnsNetworkInfo, + sourceVip: sourceVip, + hostMac: hostMac, + isDSR: isDSR, + supportedFeatures: supportedFeatures, + isIPv6Mode: isIPv6, } ipFamily := v1.IPv4Protocol @@ -739,19 +730,18 @@ func NewDualStackProxier( recorder events.EventRecorder, healthzServer healthcheck.ProxierHealthUpdater, config config.KubeProxyWinkernelConfiguration, - healthzPort int, ) (proxy.Provider, error) { // Create an ipv4 instance of the single-stack proxier ipv4Proxier, err := NewProxier(syncPeriod, minSyncPeriod, masqueradeAll, masqueradeBit, - clusterCIDR, hostname, nodeIP[0], recorder, healthzServer, config, healthzPort) + clusterCIDR, hostname, nodeIP[0], recorder, healthzServer, config) if err != nil { return nil, fmt.Errorf("unable to create ipv4 proxier: %v, hostname: %s, clusterCIDR : %s, nodeIP:%v", err, hostname, clusterCIDR, nodeIP[0]) } ipv6Proxier, err := NewProxier(syncPeriod, minSyncPeriod, masqueradeAll, masqueradeBit, - clusterCIDR, hostname, nodeIP[1], recorder, healthzServer, config, healthzPort) + clusterCIDR, hostname, nodeIP[1], recorder, healthzServer, config) if err != nil { return nil, fmt.Errorf("unable to create ipv6 proxier: %v, hostname: %s, clusterCIDR : %s, nodeIP:%v", err, hostname, clusterCIDR, nodeIP[1]) } @@ -806,10 +796,6 @@ func (svcInfo *serviceInfo) deleteAllHnsLoadBalancerPolicy() { for _, lbIngressIP := range svcInfo.loadBalancerIngressIPs { hns.deleteLoadBalancer(lbIngressIP.hnsID) lbIngressIP.hnsID = "" - if lbIngressIP.healthCheckHnsID != "" { - hns.deleteLoadBalancer(lbIngressIP.healthCheckHnsID) - lbIngressIP.healthCheckHnsID = "" - } } } @@ -986,27 +972,20 @@ func (proxier *Proxier) syncProxyRules() { proxier.mu.Lock() defer proxier.mu.Unlock() + start := time.Now() + defer func() { + SyncProxyRulesLatency.Observe(metrics.SinceInSeconds(start)) + klog.V(4).InfoS("Syncing proxy rules complete", "elapsed", time.Since(start)) + }() // don't sync rules till we've received services and endpoints if !proxier.isInitialized() { klog.V(2).InfoS("Not syncing hns until Services and Endpoints have been received from master") return } - // Keep track of how long syncs take. - start := time.Now() - defer func() { - metrics.SyncProxyRulesLatency.Observe(metrics.SinceInSeconds(start)) - klog.V(4).InfoS("Syncing proxy rules complete", "elapsed", time.Since(start)) - }() - hnsNetworkName := proxier.network.name hns := proxier.hns - var gatewayHnsendpoint *endpointsInfo - if proxier.forwardHealthCheckVip { - gatewayHnsendpoint, _ = hns.getEndpointByName(proxier.rootHnsEndpointName) - } - prevNetworkID := proxier.network.id updatedNetwork, err := hns.getNetworkByName(hnsNetworkName) if updatedNetwork == nil || updatedNetwork.id != prevNetworkID || isNetworkNotFoundError(err) { @@ -1259,27 +1238,22 @@ func (proxier *Proxier) syncProxyRules() { if svcInfo.preserveDIP || svcInfo.localTrafficDSR { nodePortEndpoints = hnsLocalEndpoints } - - if len(nodePortEndpoints) > 0 { - hnsLoadBalancer, err := hns.getLoadBalancer( - nodePortEndpoints, - loadBalancerFlags{isDSR: svcInfo.localTrafficDSR, localRoutedVIP: true, sessionAffinity: sessionAffinityClientIP, isIPv6: proxier.isIPv6Mode}, - sourceVip, - "", - Enum(svcInfo.Protocol()), - uint16(svcInfo.targetPort), - uint16(svcInfo.NodePort()), - ) - if err != nil { - klog.ErrorS(err, "Policy creation failed") - continue - } - - svcInfo.nodePorthnsID = hnsLoadBalancer.hnsID - klog.V(3).InfoS("Hns LoadBalancer resource created for nodePort resources", "clusterIP", svcInfo.ClusterIP(), "nodeport", svcInfo.NodePort(), "hnsID", hnsLoadBalancer.hnsID) - } else { - klog.V(3).InfoS("Skipped creating Hns LoadBalancer for nodePort resources", "clusterIP", svcInfo.ClusterIP(), "nodeport", svcInfo.NodePort(), "hnsID", hnsLoadBalancer.hnsID) + hnsLoadBalancer, err := hns.getLoadBalancer( + nodePortEndpoints, + loadBalancerFlags{isDSR: svcInfo.localTrafficDSR, localRoutedVIP: true, sessionAffinity: sessionAffinityClientIP, isIPv6: proxier.isIPv6Mode}, + sourceVip, + "", + Enum(svcInfo.Protocol()), + uint16(svcInfo.targetPort), + uint16(svcInfo.NodePort()), + ) + if err != nil { + klog.ErrorS(err, "Policy creation failed") + continue } + + svcInfo.nodePorthnsID = hnsLoadBalancer.hnsID + klog.V(3).InfoS("Hns LoadBalancer resource created for nodePort resources", "clusterIP", svcInfo.ClusterIP(), "hnsID", hnsLoadBalancer.hnsID) } // Create a Load Balancer Policy for each external IP @@ -1289,27 +1263,22 @@ func (proxier *Proxier) syncProxyRules() { if svcInfo.localTrafficDSR { externalIPEndpoints = hnsLocalEndpoints } - - if len(externalIPEndpoints) > 0 { - // Try loading existing policies, if already available - hnsLoadBalancer, err = hns.getLoadBalancer( - externalIPEndpoints, - loadBalancerFlags{isDSR: svcInfo.localTrafficDSR, sessionAffinity: sessionAffinityClientIP, isIPv6: proxier.isIPv6Mode}, - sourceVip, - externalIP.ip, - Enum(svcInfo.Protocol()), - uint16(svcInfo.targetPort), - uint16(svcInfo.Port()), - ) - if err != nil { - klog.ErrorS(err, "Policy creation failed") - continue - } - externalIP.hnsID = hnsLoadBalancer.hnsID - klog.V(3).InfoS("Hns LoadBalancer resource created for externalIP resources", "externalIP", externalIP, "hnsID", hnsLoadBalancer.hnsID) - } else { - klog.V(3).InfoS("Skipped creating Hns LoadBalancer for externalIP resources", "externalIP", externalIP, "hnsID", hnsLoadBalancer.hnsID) + // Try loading existing policies, if already available + hnsLoadBalancer, err = hns.getLoadBalancer( + externalIPEndpoints, + loadBalancerFlags{isDSR: svcInfo.localTrafficDSR, sessionAffinity: sessionAffinityClientIP, isIPv6: proxier.isIPv6Mode}, + sourceVip, + externalIP.ip, + Enum(svcInfo.Protocol()), + uint16(svcInfo.targetPort), + uint16(svcInfo.Port()), + ) + if err != nil { + klog.ErrorS(err, "Policy creation failed") + continue } + externalIP.hnsID = hnsLoadBalancer.hnsID + klog.V(3).InfoS("Hns LoadBalancer resource created for externalIP resources", "externalIP", externalIP, "hnsID", hnsLoadBalancer.hnsID) } // Create a Load Balancer Policy for each loadbalancer ingress for _, lbIngressIP := range svcInfo.loadBalancerIngressIPs { @@ -1318,50 +1287,21 @@ func (proxier *Proxier) syncProxyRules() { if svcInfo.preserveDIP || svcInfo.localTrafficDSR { lbIngressEndpoints = hnsLocalEndpoints } - - if len(lbIngressEndpoints) > 0 { - hnsLoadBalancer, err := hns.getLoadBalancer( - lbIngressEndpoints, - loadBalancerFlags{isDSR: svcInfo.preserveDIP || svcInfo.localTrafficDSR, useMUX: svcInfo.preserveDIP, preserveDIP: svcInfo.preserveDIP, sessionAffinity: sessionAffinityClientIP, isIPv6: proxier.isIPv6Mode}, - sourceVip, - lbIngressIP.ip, - Enum(svcInfo.Protocol()), - uint16(svcInfo.targetPort), - uint16(svcInfo.Port()), - ) - if err != nil { - klog.ErrorS(err, "Policy creation failed") - continue - } - lbIngressIP.hnsID = hnsLoadBalancer.hnsID - klog.V(3).InfoS("Hns LoadBalancer resource created for loadBalancer Ingress resources", "lbIngressIP", lbIngressIP) - } else { - klog.V(3).InfoS("Skipped creating Hns LoadBalancer for loadBalancer Ingress resources", "lbIngressIP", lbIngressIP) + hnsLoadBalancer, err := hns.getLoadBalancer( + lbIngressEndpoints, + loadBalancerFlags{isDSR: svcInfo.preserveDIP || svcInfo.localTrafficDSR, useMUX: svcInfo.preserveDIP, preserveDIP: svcInfo.preserveDIP, sessionAffinity: sessionAffinityClientIP, isIPv6: proxier.isIPv6Mode}, + sourceVip, + lbIngressIP.ip, + Enum(svcInfo.Protocol()), + uint16(svcInfo.targetPort), + uint16(svcInfo.Port()), + ) + if err != nil { + klog.ErrorS(err, "Policy creation failed") + continue } lbIngressIP.hnsID = hnsLoadBalancer.hnsID klog.V(3).InfoS("Hns LoadBalancer resource created for loadBalancer Ingress resources", "lbIngressIP", lbIngressIP) - - if proxier.forwardHealthCheckVip && gatewayHnsendpoint != nil { - nodeport := proxier.healthzPort - if svcInfo.HealthCheckNodePort() != 0 { - nodeport = svcInfo.HealthCheckNodePort() - } - hnsHealthCheckLoadBalancer, err := hns.getLoadBalancer( - []endpointsInfo{*gatewayHnsendpoint}, - loadBalancerFlags{isDSR: false, useMUX: svcInfo.preserveDIP, preserveDIP: svcInfo.preserveDIP}, - sourceVip, - lbIngressIP.ip, - Enum(svcInfo.Protocol()), - uint16(nodeport), - uint16(nodeport), - ) - if err != nil { - klog.ErrorS(err, "Policy creation failed") - continue - } - lbIngressIP.healthCheckHnsID = hnsHealthCheckLoadBalancer.hnsID - klog.V(3).InfoS("Hns Health Check LoadBalancer resource created for loadBalancer Ingress resources", "ip", lbIngressIP) - } } svcInfo.policyApplied = true klog.V(2).InfoS("Policy successfully applied for service", "serviceInfo", svcInfo) @@ -1370,7 +1310,7 @@ func (proxier *Proxier) syncProxyRules() { if proxier.healthzServer != nil { proxier.healthzServer.Updated() } - metrics.SyncProxyRulesLastTimestamp.SetToCurrentTime() + SyncProxyRulesLastTimestamp.SetToCurrentTime() // Update service healthchecks. The endpoints list might include services that are // not "OnlyLocal", but the services list will not, and the serviceHealthServer diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/OWNERS index 3023c572ed4b..080c371806a1 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/OWNERS @@ -1,11 +1,11 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - api-approvers +- api-approvers reviewers: - - api-reviewers - - sig-scheduling-api-reviewers - - sig-scheduling-api-approvers +- api-reviewers +- sig-scheduling-api-reviewers +- sig-scheduling-api-approvers labels: - - kind/api-change - - sig/scheduling +- kind/api-change +- sig/scheduling diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/types_pluginargs.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/types_pluginargs.go index 31bb8df0201d..a8143e019d7c 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/types_pluginargs.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/types_pluginargs.go @@ -105,7 +105,8 @@ type PodTopologySpreadArgs struct { // Nodes and Zones. // - "List": Use constraints defined in .defaultConstraints. // - // Defaults to "System". + // Defaults to "List" if feature gate DefaultPodTopologySpread is disabled + // and to "System" if enabled. // +optional DefaultingType PodTopologySpreadConstraintsDefaulting } @@ -183,9 +184,9 @@ type NodeAffinityArgs struct { type ScoringStrategyType string const ( - // LeastAllocated strategy prioritizes nodes with least allocated resources. + // LeastAllocated strategy prioritizes nodes with least allcoated resources. LeastAllocated ScoringStrategyType = "LeastAllocated" - // MostAllocated strategy prioritizes nodes with most allocated resources. + // MostAllocated strategy prioritizes nodes with most allcoated resources. MostAllocated ScoringStrategyType = "MostAllocated" // RequestedToCapacityRatio strategy allows specifying a custom shape function // to score nodes based on the request to capacity ratio. diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta2/default_plugins.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta2/default_plugins.go index 0eb8af06e46d..1d63003aa8bb 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta2/default_plugins.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta2/default_plugins.go @@ -116,6 +116,16 @@ func applyFeatureGates(config *v1beta2.Plugins) { if utilfeature.DefaultFeatureGate.Enabled(features.VolumeCapacityPriority) { config.Score.Enabled = append(config.Score.Enabled, v1beta2.Plugin{Name: names.VolumeBinding, Weight: pointer.Int32Ptr(1)}) } + + if !utilfeature.DefaultFeatureGate.Enabled(features.DefaultPodTopologySpread) { + // When feature is enabled, the default spreading is done by + // PodTopologySpread plugin, which is enabled by default. + klog.InfoS("Registering SelectorSpread plugin") + s := v1beta2.Plugin{Name: names.SelectorSpread} + config.PreScore.Enabled = append(config.PreScore.Enabled, s) + s.Weight = pointer.Int32Ptr(1) + config.Score.Enabled = append(config.Score.Enabled, s) + } } // mergePlugins merges the custom set into the given default one, handling disabled sets. diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta2/defaults.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta2/defaults.go index 9e92a323412f..ebea4c4f62e0 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta2/defaults.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta2/defaults.go @@ -227,8 +227,14 @@ func SetDefaults_NodeResourcesBalancedAllocationArgs(obj *v1beta2.NodeResourcesB } func SetDefaults_PodTopologySpreadArgs(obj *v1beta2.PodTopologySpreadArgs) { + if feature.DefaultFeatureGate.Enabled(features.DefaultPodTopologySpread) { + if obj.DefaultingType == "" { + obj.DefaultingType = v1beta2.SystemDefaulting + } + return + } if obj.DefaultingType == "" { - obj.DefaultingType = v1beta2.SystemDefaulting + obj.DefaultingType = v1beta2.ListDefaulting } } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta3/default_plugins.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta3/default_plugins.go index ca360b78260f..9519eb3e6936 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta3/default_plugins.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta3/default_plugins.go @@ -18,8 +18,10 @@ package v1beta3 import ( "k8s.io/apimachinery/pkg/util/sets" + utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/klog/v2" "k8s.io/kube-scheduler/config/v1beta3" + "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/names" "k8s.io/utils/pointer" ) @@ -52,10 +54,21 @@ func getDefaultPlugins() *v1beta3.Plugins { }, }, } + applyFeatureGates(plugins) return plugins } +func applyFeatureGates(config *v1beta3.Plugins) { + if !utilfeature.DefaultFeatureGate.Enabled(features.DefaultPodTopologySpread) { + // When feature is enabled, the default spreading is done by + // PodTopologySpread plugin, which is enabled by default. + klog.InfoS("Registering SelectorSpread plugin") + s := v1beta3.Plugin{Name: names.SelectorSpread, Weight: pointer.Int32Ptr(1)} + config.MultiPoint.Enabled = append(config.MultiPoint.Enabled, s) + } +} + // mergePlugins merges the custom set into the given default one, handling disabled sets. func mergePlugins(defaultPlugins, customPlugins *v1beta3.Plugins) *v1beta3.Plugins { if customPlugins == nil { diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta3/defaults.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta3/defaults.go index cc785a92b49b..cc333e08667e 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta3/defaults.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/apis/config/v1beta3/defaults.go @@ -227,8 +227,14 @@ func SetDefaults_NodeResourcesBalancedAllocationArgs(obj *v1beta3.NodeResourcesB } func SetDefaults_PodTopologySpreadArgs(obj *v1beta3.PodTopologySpreadArgs) { + if feature.DefaultFeatureGate.Enabled(features.DefaultPodTopologySpread) { + if obj.DefaultingType == "" { + obj.DefaultingType = v1beta3.SystemDefaulting + } + return + } if obj.DefaultingType == "" { - obj.DefaultingType = v1beta3.SystemDefaulting + obj.DefaultingType = v1beta3.ListDefaulting } } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/eventhandlers.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/eventhandlers.go deleted file mode 100644 index 0c39dcde2775..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/eventhandlers.go +++ /dev/null @@ -1,529 +0,0 @@ -/* -Copyright 2019 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package scheduler - -import ( - "fmt" - "reflect" - "strings" - - v1 "k8s.io/api/core/v1" - storagev1 "k8s.io/api/storage/v1" - "k8s.io/apimachinery/pkg/runtime/schema" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/client-go/dynamic/dynamicinformer" - "k8s.io/client-go/informers" - "k8s.io/client-go/tools/cache" - corev1helpers "k8s.io/component-helpers/scheduling/corev1" - corev1nodeaffinity "k8s.io/component-helpers/scheduling/corev1/nodeaffinity" - "k8s.io/klog/v2" - "k8s.io/kubernetes/pkg/scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeaffinity" - "k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodename" - "k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeports" - "k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources" - "k8s.io/kubernetes/pkg/scheduler/internal/queue" - "k8s.io/kubernetes/pkg/scheduler/profile" -) - -func (sched *Scheduler) onStorageClassAdd(obj interface{}) { - sc, ok := obj.(*storagev1.StorageClass) - if !ok { - klog.ErrorS(nil, "Cannot convert to *storagev1.StorageClass", "obj", obj) - return - } - - // CheckVolumeBindingPred fails if pod has unbound immediate PVCs. If these - // PVCs have specified StorageClass name, creating StorageClass objects - // with late binding will cause predicates to pass, so we need to move pods - // to active queue. - // We don't need to invalidate cached results because results will not be - // cached for pod that has unbound immediate PVCs. - if sc.VolumeBindingMode != nil && *sc.VolumeBindingMode == storagev1.VolumeBindingWaitForFirstConsumer { - sched.SchedulingQueue.MoveAllToActiveOrBackoffQueue(queue.StorageClassAdd, nil) - } -} - -func (sched *Scheduler) addNodeToCache(obj interface{}) { - node, ok := obj.(*v1.Node) - if !ok { - klog.ErrorS(nil, "Cannot convert to *v1.Node", "obj", obj) - return - } - - nodeInfo := sched.Cache.AddNode(node) - klog.V(3).InfoS("Add event for node", "node", klog.KObj(node)) - sched.SchedulingQueue.MoveAllToActiveOrBackoffQueue(queue.NodeAdd, preCheckForNode(nodeInfo)) -} - -func (sched *Scheduler) updateNodeInCache(oldObj, newObj interface{}) { - oldNode, ok := oldObj.(*v1.Node) - if !ok { - klog.ErrorS(nil, "Cannot convert oldObj to *v1.Node", "oldObj", oldObj) - return - } - newNode, ok := newObj.(*v1.Node) - if !ok { - klog.ErrorS(nil, "Cannot convert newObj to *v1.Node", "newObj", newObj) - return - } - - nodeInfo := sched.Cache.UpdateNode(oldNode, newNode) - // Only requeue unschedulable pods if the node became more schedulable. - if event := nodeSchedulingPropertiesChange(newNode, oldNode); event != nil { - sched.SchedulingQueue.MoveAllToActiveOrBackoffQueue(*event, preCheckForNode(nodeInfo)) - } -} - -func (sched *Scheduler) deleteNodeFromCache(obj interface{}) { - var node *v1.Node - switch t := obj.(type) { - case *v1.Node: - node = t - case cache.DeletedFinalStateUnknown: - var ok bool - node, ok = t.Obj.(*v1.Node) - if !ok { - klog.ErrorS(nil, "Cannot convert to *v1.Node", "obj", t.Obj) - return - } - default: - klog.ErrorS(nil, "Cannot convert to *v1.Node", "obj", t) - return - } - klog.V(3).InfoS("Delete event for node", "node", klog.KObj(node)) - if err := sched.Cache.RemoveNode(node); err != nil { - klog.ErrorS(err, "Scheduler cache RemoveNode failed") - } -} - -func (sched *Scheduler) addPodToSchedulingQueue(obj interface{}) { - pod := obj.(*v1.Pod) - klog.V(3).InfoS("Add event for unscheduled pod", "pod", klog.KObj(pod)) - if err := sched.SchedulingQueue.Add(pod); err != nil { - utilruntime.HandleError(fmt.Errorf("unable to queue %T: %v", obj, err)) - } -} - -func (sched *Scheduler) updatePodInSchedulingQueue(oldObj, newObj interface{}) { - oldPod, newPod := oldObj.(*v1.Pod), newObj.(*v1.Pod) - // Bypass update event that carries identical objects; otherwise, a duplicated - // Pod may go through scheduling and cause unexpected behavior (see #96071). - if oldPod.ResourceVersion == newPod.ResourceVersion { - return - } - - isAssumed, err := sched.Cache.IsAssumedPod(newPod) - if err != nil { - utilruntime.HandleError(fmt.Errorf("failed to check whether pod %s/%s is assumed: %v", newPod.Namespace, newPod.Name, err)) - } - if isAssumed { - return - } - - if err := sched.SchedulingQueue.Update(oldPod, newPod); err != nil { - utilruntime.HandleError(fmt.Errorf("unable to update %T: %v", newObj, err)) - } -} - -func (sched *Scheduler) deletePodFromSchedulingQueue(obj interface{}) { - var pod *v1.Pod - switch t := obj.(type) { - case *v1.Pod: - pod = obj.(*v1.Pod) - case cache.DeletedFinalStateUnknown: - var ok bool - pod, ok = t.Obj.(*v1.Pod) - if !ok { - utilruntime.HandleError(fmt.Errorf("unable to convert object %T to *v1.Pod in %T", obj, sched)) - return - } - default: - utilruntime.HandleError(fmt.Errorf("unable to handle object in %T: %T", sched, obj)) - return - } - klog.V(3).InfoS("Delete event for unscheduled pod", "pod", klog.KObj(pod)) - if err := sched.SchedulingQueue.Delete(pod); err != nil { - utilruntime.HandleError(fmt.Errorf("unable to dequeue %T: %v", obj, err)) - } - fwk, err := sched.frameworkForPod(pod) - if err != nil { - // This shouldn't happen, because we only accept for scheduling the pods - // which specify a scheduler name that matches one of the profiles. - klog.ErrorS(err, "Unable to get profile", "pod", klog.KObj(pod)) - return - } - // If a waiting pod is rejected, it indicates it's previously assumed and we're - // removing it from the scheduler cache. In this case, signal a AssignedPodDelete - // event to immediately retry some unscheduled Pods. - if fwk.RejectWaitingPod(pod.UID) { - sched.SchedulingQueue.MoveAllToActiveOrBackoffQueue(queue.AssignedPodDelete, nil) - } -} - -func (sched *Scheduler) addPodToCache(obj interface{}) { - pod, ok := obj.(*v1.Pod) - if !ok { - klog.ErrorS(nil, "Cannot convert to *v1.Pod", "obj", obj) - return - } - klog.V(3).InfoS("Add event for scheduled pod", "pod", klog.KObj(pod)) - - if err := sched.Cache.AddPod(pod); err != nil { - klog.ErrorS(err, "Scheduler cache AddPod failed", "pod", klog.KObj(pod)) - } - - sched.SchedulingQueue.AssignedPodAdded(pod) -} - -func (sched *Scheduler) updatePodInCache(oldObj, newObj interface{}) { - oldPod, ok := oldObj.(*v1.Pod) - if !ok { - klog.ErrorS(nil, "Cannot convert oldObj to *v1.Pod", "oldObj", oldObj) - return - } - newPod, ok := newObj.(*v1.Pod) - if !ok { - klog.ErrorS(nil, "Cannot convert newObj to *v1.Pod", "newObj", newObj) - return - } - klog.V(4).InfoS("Update event for scheduled pod", "pod", klog.KObj(oldPod)) - - if err := sched.Cache.UpdatePod(oldPod, newPod); err != nil { - klog.ErrorS(err, "Scheduler cache UpdatePod failed", "pod", klog.KObj(oldPod)) - } - - sched.SchedulingQueue.AssignedPodUpdated(newPod) -} - -func (sched *Scheduler) deletePodFromCache(obj interface{}) { - var pod *v1.Pod - switch t := obj.(type) { - case *v1.Pod: - pod = t - case cache.DeletedFinalStateUnknown: - var ok bool - pod, ok = t.Obj.(*v1.Pod) - if !ok { - klog.ErrorS(nil, "Cannot convert to *v1.Pod", "obj", t.Obj) - return - } - default: - klog.ErrorS(nil, "Cannot convert to *v1.Pod", "obj", t) - return - } - klog.V(3).InfoS("Delete event for scheduled pod", "pod", klog.KObj(pod)) - if err := sched.Cache.RemovePod(pod); err != nil { - klog.ErrorS(err, "Scheduler cache RemovePod failed", "pod", klog.KObj(pod)) - } - - sched.SchedulingQueue.MoveAllToActiveOrBackoffQueue(queue.AssignedPodDelete, nil) -} - -// assignedPod selects pods that are assigned (scheduled and running). -func assignedPod(pod *v1.Pod) bool { - return len(pod.Spec.NodeName) != 0 -} - -// responsibleForPod returns true if the pod has asked to be scheduled by the given scheduler. -func responsibleForPod(pod *v1.Pod, profiles profile.Map) bool { - return profiles.HandlesSchedulerName(pod.Spec.SchedulerName) -} - -// addAllEventHandlers is a helper function used in tests and in Scheduler -// to add event handlers for various informers. -func addAllEventHandlers( - sched *Scheduler, - informerFactory informers.SharedInformerFactory, - dynInformerFactory dynamicinformer.DynamicSharedInformerFactory, - gvkMap map[framework.GVK]framework.ActionType, -) { - // scheduled pod cache - informerFactory.Core().V1().Pods().Informer().AddEventHandler( - cache.FilteringResourceEventHandler{ - FilterFunc: func(obj interface{}) bool { - switch t := obj.(type) { - case *v1.Pod: - return assignedPod(t) - case cache.DeletedFinalStateUnknown: - if _, ok := t.Obj.(*v1.Pod); ok { - // The carried object may be stale, so we don't use it to check if - // it's assigned or not. Attempting to cleanup anyways. - return true - } - utilruntime.HandleError(fmt.Errorf("unable to convert object %T to *v1.Pod in %T", obj, sched)) - return false - default: - utilruntime.HandleError(fmt.Errorf("unable to handle object in %T: %T", sched, obj)) - return false - } - }, - Handler: cache.ResourceEventHandlerFuncs{ - AddFunc: sched.addPodToCache, - UpdateFunc: sched.updatePodInCache, - DeleteFunc: sched.deletePodFromCache, - }, - }, - ) - // unscheduled pod queue - informerFactory.Core().V1().Pods().Informer().AddEventHandler( - cache.FilteringResourceEventHandler{ - FilterFunc: func(obj interface{}) bool { - switch t := obj.(type) { - case *v1.Pod: - return !assignedPod(t) && responsibleForPod(t, sched.Profiles) - case cache.DeletedFinalStateUnknown: - if pod, ok := t.Obj.(*v1.Pod); ok { - // The carried object may be stale, so we don't use it to check if - // it's assigned or not. - return responsibleForPod(pod, sched.Profiles) - } - utilruntime.HandleError(fmt.Errorf("unable to convert object %T to *v1.Pod in %T", obj, sched)) - return false - default: - utilruntime.HandleError(fmt.Errorf("unable to handle object in %T: %T", sched, obj)) - return false - } - }, - Handler: cache.ResourceEventHandlerFuncs{ - AddFunc: sched.addPodToSchedulingQueue, - UpdateFunc: sched.updatePodInSchedulingQueue, - DeleteFunc: sched.deletePodFromSchedulingQueue, - }, - }, - ) - - informerFactory.Core().V1().Nodes().Informer().AddEventHandler( - cache.ResourceEventHandlerFuncs{ - AddFunc: sched.addNodeToCache, - UpdateFunc: sched.updateNodeInCache, - DeleteFunc: sched.deleteNodeFromCache, - }, - ) - - buildEvtResHandler := func(at framework.ActionType, gvk framework.GVK, shortGVK string) cache.ResourceEventHandlerFuncs { - funcs := cache.ResourceEventHandlerFuncs{} - if at&framework.Add != 0 { - evt := framework.ClusterEvent{Resource: gvk, ActionType: framework.Add, Label: fmt.Sprintf("%vAdd", shortGVK)} - funcs.AddFunc = func(_ interface{}) { - sched.SchedulingQueue.MoveAllToActiveOrBackoffQueue(evt, nil) - } - } - if at&framework.Update != 0 { - evt := framework.ClusterEvent{Resource: gvk, ActionType: framework.Update, Label: fmt.Sprintf("%vUpdate", shortGVK)} - funcs.UpdateFunc = func(_, _ interface{}) { - sched.SchedulingQueue.MoveAllToActiveOrBackoffQueue(evt, nil) - } - } - if at&framework.Delete != 0 { - evt := framework.ClusterEvent{Resource: gvk, ActionType: framework.Delete, Label: fmt.Sprintf("%vDelete", shortGVK)} - funcs.DeleteFunc = func(_ interface{}) { - sched.SchedulingQueue.MoveAllToActiveOrBackoffQueue(evt, nil) - } - } - return funcs - } - - for gvk, at := range gvkMap { - switch gvk { - case framework.Node, framework.Pod: - // Do nothing. - case framework.CSINode: - informerFactory.Storage().V1().CSINodes().Informer().AddEventHandler( - buildEvtResHandler(at, framework.CSINode, "CSINode"), - ) - case framework.CSIDriver: - informerFactory.Storage().V1().CSIDrivers().Informer().AddEventHandler( - buildEvtResHandler(at, framework.CSIDriver, "CSIDriver"), - ) - case framework.CSIStorageCapacity: - informerFactory.Storage().V1().CSIStorageCapacities().Informer().AddEventHandler( - buildEvtResHandler(at, framework.CSIStorageCapacity, "CSIStorageCapacity"), - ) - case framework.PersistentVolume: - // MaxPDVolumeCountPredicate: since it relies on the counts of PV. - // - // PvAdd: Pods created when there are no PVs available will be stuck in - // unschedulable queue. But unbound PVs created for static provisioning and - // delay binding storage class are skipped in PV controller dynamic - // provisioning and binding process, will not trigger events to schedule pod - // again. So we need to move pods to active queue on PV add for this - // scenario. - // - // PvUpdate: Scheduler.bindVolumesWorker may fail to update assumed pod volume - // bindings due to conflicts if PVs are updated by PV controller or other - // parties, then scheduler will add pod back to unschedulable queue. We - // need to move pods to active queue on PV update for this scenario. - informerFactory.Core().V1().PersistentVolumes().Informer().AddEventHandler( - buildEvtResHandler(at, framework.PersistentVolume, "Pv"), - ) - case framework.PersistentVolumeClaim: - // MaxPDVolumeCountPredicate: add/update PVC will affect counts of PV when it is bound. - informerFactory.Core().V1().PersistentVolumeClaims().Informer().AddEventHandler( - buildEvtResHandler(at, framework.PersistentVolumeClaim, "Pvc"), - ) - case framework.StorageClass: - if at&framework.Add != 0 { - informerFactory.Storage().V1().StorageClasses().Informer().AddEventHandler( - cache.ResourceEventHandlerFuncs{ - AddFunc: sched.onStorageClassAdd, - }, - ) - } - if at&framework.Update != 0 { - informerFactory.Storage().V1().StorageClasses().Informer().AddEventHandler( - cache.ResourceEventHandlerFuncs{ - UpdateFunc: func(_, _ interface{}) { - sched.SchedulingQueue.MoveAllToActiveOrBackoffQueue(queue.StorageClassUpdate, nil) - }, - }, - ) - } - default: - // Tests may not instantiate dynInformerFactory. - if dynInformerFactory == nil { - continue - } - // GVK is expected to be at least 3-folded, separated by dots. - // .. - // Valid examples: - // - foos.v1.example.com - // - bars.v1beta1.a.b.c - // Invalid examples: - // - foos.v1 (2 sections) - // - foo.v1.example.com (the first section should be plural) - if strings.Count(string(gvk), ".") < 2 { - klog.ErrorS(nil, "incorrect event registration", "gvk", gvk) - continue - } - // Fall back to try dynamic informers. - gvr, _ := schema.ParseResourceArg(string(gvk)) - dynInformer := dynInformerFactory.ForResource(*gvr).Informer() - dynInformer.AddEventHandler( - buildEvtResHandler(at, gvk, strings.Title(gvr.Resource)), - ) - } - } -} - -func nodeSchedulingPropertiesChange(newNode *v1.Node, oldNode *v1.Node) *framework.ClusterEvent { - if nodeSpecUnschedulableChanged(newNode, oldNode) { - return &queue.NodeSpecUnschedulableChange - } - if nodeAllocatableChanged(newNode, oldNode) { - return &queue.NodeAllocatableChange - } - if nodeLabelsChanged(newNode, oldNode) { - return &queue.NodeLabelChange - } - if nodeTaintsChanged(newNode, oldNode) { - return &queue.NodeTaintChange - } - if nodeConditionsChanged(newNode, oldNode) { - return &queue.NodeConditionChange - } - - return nil -} - -func nodeAllocatableChanged(newNode *v1.Node, oldNode *v1.Node) bool { - return !reflect.DeepEqual(oldNode.Status.Allocatable, newNode.Status.Allocatable) -} - -func nodeLabelsChanged(newNode *v1.Node, oldNode *v1.Node) bool { - return !reflect.DeepEqual(oldNode.GetLabels(), newNode.GetLabels()) -} - -func nodeTaintsChanged(newNode *v1.Node, oldNode *v1.Node) bool { - return !reflect.DeepEqual(newNode.Spec.Taints, oldNode.Spec.Taints) -} - -func nodeConditionsChanged(newNode *v1.Node, oldNode *v1.Node) bool { - strip := func(conditions []v1.NodeCondition) map[v1.NodeConditionType]v1.ConditionStatus { - conditionStatuses := make(map[v1.NodeConditionType]v1.ConditionStatus, len(conditions)) - for i := range conditions { - conditionStatuses[conditions[i].Type] = conditions[i].Status - } - return conditionStatuses - } - return !reflect.DeepEqual(strip(oldNode.Status.Conditions), strip(newNode.Status.Conditions)) -} - -func nodeSpecUnschedulableChanged(newNode *v1.Node, oldNode *v1.Node) bool { - return newNode.Spec.Unschedulable != oldNode.Spec.Unschedulable && !newNode.Spec.Unschedulable -} - -func preCheckForNode(nodeInfo *framework.NodeInfo) queue.PreEnqueueCheck { - // Note: the following checks doesn't take preemption into considerations, in very rare - // cases (e.g., node resizing), "pod" may still fail a check but preemption helps. We deliberately - // chose to ignore those cases as unschedulable pods will be re-queued eventually. - return func(pod *v1.Pod) bool { - admissionResults := AdmissionCheck(pod, nodeInfo, false) - if len(admissionResults) != 0 { - return false - } - _, isUntolerated := corev1helpers.FindMatchingUntoleratedTaint(nodeInfo.Node().Spec.Taints, pod.Spec.Tolerations, func(t *v1.Taint) bool { - return t.Effect == v1.TaintEffectNoSchedule - }) - return !isUntolerated - } -} - -// AdmissionCheck calls the filtering logic of noderesources/nodeport/nodeAffinity/nodename -// and returns the failure reasons. It's used in kubelet(pkg/kubelet/lifecycle/predicate.go) and scheduler. -// It returns the first failure if `includeAllFailures` is set to false; otherwise -// returns all failures. -func AdmissionCheck(pod *v1.Pod, nodeInfo *framework.NodeInfo, includeAllFailures bool) []AdmissionResult { - var admissionResults []AdmissionResult - insufficientResources := noderesources.Fits(pod, nodeInfo) - if len(insufficientResources) != 0 { - for i := range insufficientResources { - admissionResults = append(admissionResults, AdmissionResult{InsufficientResource: &insufficientResources[i]}) - } - if !includeAllFailures { - return admissionResults - } - } - - if matches, _ := corev1nodeaffinity.GetRequiredNodeAffinity(pod).Match(nodeInfo.Node()); !matches { - admissionResults = append(admissionResults, AdmissionResult{Name: nodeaffinity.Name, Reason: nodeaffinity.ErrReasonPod}) - if !includeAllFailures { - return admissionResults - } - } - if !nodename.Fits(pod, nodeInfo) { - admissionResults = append(admissionResults, AdmissionResult{Name: nodename.Name, Reason: nodename.ErrReason}) - if !includeAllFailures { - return admissionResults - } - } - if !nodeports.Fits(pod, nodeInfo) { - admissionResults = append(admissionResults, AdmissionResult{Name: nodeports.Name, Reason: nodeports.ErrReason}) - if !includeAllFailures { - return admissionResults - } - } - return admissionResults -} - -// AdmissionResult describes the reason why Scheduler can't admit the pod. -// If the reason is a resource fit one, then AdmissionResult.InsufficientResource includes the details. -type AdmissionResult struct { - Name string - Reason string - InsufficientResource *noderesources.InsufficientResource -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/extender.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/extender.go deleted file mode 100644 index e29026ad1552..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/extender.go +++ /dev/null @@ -1,474 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package scheduler - -import ( - "bytes" - "encoding/json" - "fmt" - "net/http" - "strings" - "time" - - v1 "k8s.io/api/core/v1" - utilnet "k8s.io/apimachinery/pkg/util/net" - "k8s.io/apimachinery/pkg/util/sets" - restclient "k8s.io/client-go/rest" - extenderv1 "k8s.io/kube-scheduler/extender/v1" - schedulerapi "k8s.io/kubernetes/pkg/scheduler/apis/config" - "k8s.io/kubernetes/pkg/scheduler/framework" -) - -const ( - // DefaultExtenderTimeout defines the default extender timeout in second. - DefaultExtenderTimeout = 5 * time.Second -) - -// HTTPExtender implements the Extender interface. -type HTTPExtender struct { - extenderURL string - preemptVerb string - filterVerb string - prioritizeVerb string - bindVerb string - weight int64 - client *http.Client - nodeCacheCapable bool - managedResources sets.String - ignorable bool -} - -func makeTransport(config *schedulerapi.Extender) (http.RoundTripper, error) { - var cfg restclient.Config - if config.TLSConfig != nil { - cfg.TLSClientConfig.Insecure = config.TLSConfig.Insecure - cfg.TLSClientConfig.ServerName = config.TLSConfig.ServerName - cfg.TLSClientConfig.CertFile = config.TLSConfig.CertFile - cfg.TLSClientConfig.KeyFile = config.TLSConfig.KeyFile - cfg.TLSClientConfig.CAFile = config.TLSConfig.CAFile - cfg.TLSClientConfig.CertData = config.TLSConfig.CertData - cfg.TLSClientConfig.KeyData = config.TLSConfig.KeyData - cfg.TLSClientConfig.CAData = config.TLSConfig.CAData - } - if config.EnableHTTPS { - hasCA := len(cfg.CAFile) > 0 || len(cfg.CAData) > 0 - if !hasCA { - cfg.Insecure = true - } - } - tlsConfig, err := restclient.TLSConfigFor(&cfg) - if err != nil { - return nil, err - } - if tlsConfig != nil { - return utilnet.SetTransportDefaults(&http.Transport{ - TLSClientConfig: tlsConfig, - }), nil - } - return utilnet.SetTransportDefaults(&http.Transport{}), nil -} - -// NewHTTPExtender creates an HTTPExtender object. -func NewHTTPExtender(config *schedulerapi.Extender) (framework.Extender, error) { - if config.HTTPTimeout.Duration.Nanoseconds() == 0 { - config.HTTPTimeout.Duration = time.Duration(DefaultExtenderTimeout) - } - - transport, err := makeTransport(config) - if err != nil { - return nil, err - } - client := &http.Client{ - Transport: transport, - Timeout: config.HTTPTimeout.Duration, - } - managedResources := sets.NewString() - for _, r := range config.ManagedResources { - managedResources.Insert(string(r.Name)) - } - return &HTTPExtender{ - extenderURL: config.URLPrefix, - preemptVerb: config.PreemptVerb, - filterVerb: config.FilterVerb, - prioritizeVerb: config.PrioritizeVerb, - bindVerb: config.BindVerb, - weight: config.Weight, - client: client, - nodeCacheCapable: config.NodeCacheCapable, - managedResources: managedResources, - ignorable: config.Ignorable, - }, nil -} - -// Equal is used to check if two extenders are equal -// ignoring the client field, exported for testing -func Equal(e1, e2 *HTTPExtender) bool { - if e1.extenderURL != e2.extenderURL { - return false - } - if e1.preemptVerb != e2.preemptVerb { - return false - } - if e1.prioritizeVerb != e2.prioritizeVerb { - return false - } - if e1.bindVerb != e2.bindVerb { - return false - } - if e1.weight != e2.weight { - return false - } - if e1.nodeCacheCapable != e2.nodeCacheCapable { - return false - } - if !e1.managedResources.Equal(e2.managedResources) { - return false - } - if e1.ignorable != e2.ignorable { - return false - } - return true -} - -// Name returns extenderURL to identify the extender. -func (h *HTTPExtender) Name() string { - return h.extenderURL -} - -// IsIgnorable returns true indicates scheduling should not fail when this extender -// is unavailable -func (h *HTTPExtender) IsIgnorable() bool { - return h.ignorable -} - -// SupportsPreemption returns true if an extender supports preemption. -// An extender should have preempt verb defined and enabled its own node cache. -func (h *HTTPExtender) SupportsPreemption() bool { - return len(h.preemptVerb) > 0 -} - -// ProcessPreemption returns filtered candidate nodes and victims after running preemption logic in extender. -func (h *HTTPExtender) ProcessPreemption( - pod *v1.Pod, - nodeNameToVictims map[string]*extenderv1.Victims, - nodeInfos framework.NodeInfoLister, -) (map[string]*extenderv1.Victims, error) { - var ( - result extenderv1.ExtenderPreemptionResult - args *extenderv1.ExtenderPreemptionArgs - ) - - if !h.SupportsPreemption() { - return nil, fmt.Errorf("preempt verb is not defined for extender %v but run into ProcessPreemption", h.extenderURL) - } - - if h.nodeCacheCapable { - // If extender has cached node info, pass NodeNameToMetaVictims in args. - nodeNameToMetaVictims := convertToMetaVictims(nodeNameToVictims) - args = &extenderv1.ExtenderPreemptionArgs{ - Pod: pod, - NodeNameToMetaVictims: nodeNameToMetaVictims, - } - } else { - args = &extenderv1.ExtenderPreemptionArgs{ - Pod: pod, - NodeNameToVictims: nodeNameToVictims, - } - } - - if err := h.send(h.preemptVerb, args, &result); err != nil { - return nil, err - } - - // Extender will always return NodeNameToMetaVictims. - // So let's convert it to NodeNameToVictims by using . - newNodeNameToVictims, err := h.convertToVictims(result.NodeNameToMetaVictims, nodeInfos) - if err != nil { - return nil, err - } - // Do not override . - return newNodeNameToVictims, nil -} - -// convertToVictims converts "nodeNameToMetaVictims" from object identifiers, -// such as UIDs and names, to object pointers. -func (h *HTTPExtender) convertToVictims( - nodeNameToMetaVictims map[string]*extenderv1.MetaVictims, - nodeInfos framework.NodeInfoLister, -) (map[string]*extenderv1.Victims, error) { - nodeNameToVictims := map[string]*extenderv1.Victims{} - for nodeName, metaVictims := range nodeNameToMetaVictims { - nodeInfo, err := nodeInfos.Get(nodeName) - if err != nil { - return nil, err - } - victims := &extenderv1.Victims{ - Pods: []*v1.Pod{}, - NumPDBViolations: metaVictims.NumPDBViolations, - } - for _, metaPod := range metaVictims.Pods { - pod, err := h.convertPodUIDToPod(metaPod, nodeInfo) - if err != nil { - return nil, err - } - victims.Pods = append(victims.Pods, pod) - } - nodeNameToVictims[nodeName] = victims - } - return nodeNameToVictims, nil -} - -// convertPodUIDToPod returns v1.Pod object for given MetaPod and node info. -// The v1.Pod object is restored by nodeInfo.Pods(). -// It returns an error if there's cache inconsistency between default scheduler -// and extender, i.e. when the pod is not found in nodeInfo.Pods. -func (h *HTTPExtender) convertPodUIDToPod( - metaPod *extenderv1.MetaPod, - nodeInfo *framework.NodeInfo) (*v1.Pod, error) { - for _, p := range nodeInfo.Pods { - if string(p.Pod.UID) == metaPod.UID { - return p.Pod, nil - } - } - return nil, fmt.Errorf("extender: %v claims to preempt pod (UID: %v) on node: %v, but the pod is not found on that node", - h.extenderURL, metaPod, nodeInfo.Node().Name) -} - -// convertToMetaVictims converts from struct type to meta types. -func convertToMetaVictims( - nodeNameToVictims map[string]*extenderv1.Victims, -) map[string]*extenderv1.MetaVictims { - nodeNameToMetaVictims := map[string]*extenderv1.MetaVictims{} - for node, victims := range nodeNameToVictims { - metaVictims := &extenderv1.MetaVictims{ - Pods: []*extenderv1.MetaPod{}, - NumPDBViolations: victims.NumPDBViolations, - } - for _, pod := range victims.Pods { - metaPod := &extenderv1.MetaPod{ - UID: string(pod.UID), - } - metaVictims.Pods = append(metaVictims.Pods, metaPod) - } - nodeNameToMetaVictims[node] = metaVictims - } - return nodeNameToMetaVictims -} - -// Filter based on extender implemented predicate functions. The filtered list is -// expected to be a subset of the supplied list; otherwise the function returns an error. -// The failedNodes and failedAndUnresolvableNodes optionally contains the list -// of failed nodes and failure reasons, except nodes in the latter are -// unresolvable. -func (h *HTTPExtender) Filter( - pod *v1.Pod, - nodes []*v1.Node, -) (filteredList []*v1.Node, failedNodes, failedAndUnresolvableNodes extenderv1.FailedNodesMap, err error) { - var ( - result extenderv1.ExtenderFilterResult - nodeList *v1.NodeList - nodeNames *[]string - nodeResult []*v1.Node - args *extenderv1.ExtenderArgs - ) - fromNodeName := make(map[string]*v1.Node) - for _, n := range nodes { - fromNodeName[n.Name] = n - } - - if h.filterVerb == "" { - return nodes, extenderv1.FailedNodesMap{}, extenderv1.FailedNodesMap{}, nil - } - - if h.nodeCacheCapable { - nodeNameSlice := make([]string, 0, len(nodes)) - for _, node := range nodes { - nodeNameSlice = append(nodeNameSlice, node.Name) - } - nodeNames = &nodeNameSlice - } else { - nodeList = &v1.NodeList{} - for _, node := range nodes { - nodeList.Items = append(nodeList.Items, *node) - } - } - - args = &extenderv1.ExtenderArgs{ - Pod: pod, - Nodes: nodeList, - NodeNames: nodeNames, - } - - if err := h.send(h.filterVerb, args, &result); err != nil { - return nil, nil, nil, err - } - if result.Error != "" { - return nil, nil, nil, fmt.Errorf(result.Error) - } - - if h.nodeCacheCapable && result.NodeNames != nil { - nodeResult = make([]*v1.Node, len(*result.NodeNames)) - for i, nodeName := range *result.NodeNames { - if n, ok := fromNodeName[nodeName]; ok { - nodeResult[i] = n - } else { - return nil, nil, nil, fmt.Errorf( - "extender %q claims a filtered node %q which is not found in the input node list", - h.extenderURL, nodeName) - } - } - } else if result.Nodes != nil { - nodeResult = make([]*v1.Node, len(result.Nodes.Items)) - for i := range result.Nodes.Items { - nodeResult[i] = &result.Nodes.Items[i] - } - } - - return nodeResult, result.FailedNodes, result.FailedAndUnresolvableNodes, nil -} - -// Prioritize based on extender implemented priority functions. Weight*priority is added -// up for each such priority function. The returned score is added to the score computed -// by Kubernetes scheduler. The total score is used to do the host selection. -func (h *HTTPExtender) Prioritize(pod *v1.Pod, nodes []*v1.Node) (*extenderv1.HostPriorityList, int64, error) { - var ( - result extenderv1.HostPriorityList - nodeList *v1.NodeList - nodeNames *[]string - args *extenderv1.ExtenderArgs - ) - - if h.prioritizeVerb == "" { - result := extenderv1.HostPriorityList{} - for _, node := range nodes { - result = append(result, extenderv1.HostPriority{Host: node.Name, Score: 0}) - } - return &result, 0, nil - } - - if h.nodeCacheCapable { - nodeNameSlice := make([]string, 0, len(nodes)) - for _, node := range nodes { - nodeNameSlice = append(nodeNameSlice, node.Name) - } - nodeNames = &nodeNameSlice - } else { - nodeList = &v1.NodeList{} - for _, node := range nodes { - nodeList.Items = append(nodeList.Items, *node) - } - } - - args = &extenderv1.ExtenderArgs{ - Pod: pod, - Nodes: nodeList, - NodeNames: nodeNames, - } - - if err := h.send(h.prioritizeVerb, args, &result); err != nil { - return nil, 0, err - } - return &result, h.weight, nil -} - -// Bind delegates the action of binding a pod to a node to the extender. -func (h *HTTPExtender) Bind(binding *v1.Binding) error { - var result extenderv1.ExtenderBindingResult - if !h.IsBinder() { - // This shouldn't happen as this extender wouldn't have become a Binder. - return fmt.Errorf("unexpected empty bindVerb in extender") - } - req := &extenderv1.ExtenderBindingArgs{ - PodName: binding.Name, - PodNamespace: binding.Namespace, - PodUID: binding.UID, - Node: binding.Target.Name, - } - if err := h.send(h.bindVerb, req, &result); err != nil { - return err - } - if result.Error != "" { - return fmt.Errorf(result.Error) - } - return nil -} - -// IsBinder returns whether this extender is configured for the Bind method. -func (h *HTTPExtender) IsBinder() bool { - return h.bindVerb != "" -} - -// Helper function to send messages to the extender -func (h *HTTPExtender) send(action string, args interface{}, result interface{}) error { - out, err := json.Marshal(args) - if err != nil { - return err - } - - url := strings.TrimRight(h.extenderURL, "/") + "/" + action - - req, err := http.NewRequest("POST", url, bytes.NewReader(out)) - if err != nil { - return err - } - - req.Header.Set("Content-Type", "application/json") - - resp, err := h.client.Do(req) - if err != nil { - return err - } - defer resp.Body.Close() - - if resp.StatusCode != http.StatusOK { - return fmt.Errorf("failed %v with extender at URL %v, code %v", action, url, resp.StatusCode) - } - - return json.NewDecoder(resp.Body).Decode(result) -} - -// IsInterested returns true if at least one extended resource requested by -// this pod is managed by this extender. -func (h *HTTPExtender) IsInterested(pod *v1.Pod) bool { - if h.managedResources.Len() == 0 { - return true - } - if h.hasManagedResources(pod.Spec.Containers) { - return true - } - if h.hasManagedResources(pod.Spec.InitContainers) { - return true - } - return false -} - -func (h *HTTPExtender) hasManagedResources(containers []v1.Container) bool { - for i := range containers { - container := &containers[i] - for resourceName := range container.Resources.Requests { - if h.managedResources.Has(string(resourceName)) { - return true - } - } - for resourceName := range container.Resources.Limits { - if h.managedResources.Has(string(resourceName)) { - return true - } - } - } - return false -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/cycle_state.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/cycle_state.go index 4674878377c0..652a257d9a1f 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/cycle_state.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/cycle_state.go @@ -41,18 +41,18 @@ type StateKey string // StateData stored by one plugin can be read, altered, or deleted by another plugin. // CycleState does not provide any data protection, as all plugins are assumed to be // trusted. -// Note: CycleState uses a sync.Map to back the storage. It's aimed to optimize for the "write once and read many times" scenarios. -// It is the recommended pattern used in all in-tree plugins - plugin-specific state is written once in PreFilter/PreScore and afterwards read many times in Filter/Score. type CycleState struct { - // storage is keyed with StateKey, and valued with StateData. - storage sync.Map + mx sync.RWMutex + storage map[StateKey]StateData // if recordPluginMetrics is true, PluginExecutionDuration will be recorded for this cycle. recordPluginMetrics bool } // NewCycleState initializes a new CycleState and returns its pointer. func NewCycleState() *CycleState { - return &CycleState{} + return &CycleState{ + storage: make(map[StateKey]StateData), + } } // ShouldRecordPluginMetrics returns whether PluginExecutionDuration metrics should be recorded. @@ -78,32 +78,36 @@ func (c *CycleState) Clone() *CycleState { return nil } copy := NewCycleState() - c.storage.Range(func(k, v interface{}) bool { - copy.storage.Store(k, v.(StateData).Clone()) - return true - }) - + for k, v := range c.storage { + copy.Write(k, v.Clone()) + } return copy } // Read retrieves data with the given "key" from CycleState. If the key is not // present an error is returned. -// This function is thread safe by using sync.Map. +// This function is thread safe by acquiring an internal lock first. func (c *CycleState) Read(key StateKey) (StateData, error) { - if v, ok := c.storage.Load(key); ok { - return v.(StateData), nil + c.mx.RLock() + defer c.mx.RUnlock() + if v, ok := c.storage[key]; ok { + return v, nil } return nil, ErrNotFound } // Write stores the given "val" in CycleState with the given "key". -// This function is thread safe by using sync.Map. +// This function is thread safe by acquiring an internal lock first. func (c *CycleState) Write(key StateKey, val StateData) { - c.storage.Store(key, val) + c.mx.Lock() + c.storage[key] = val + c.mx.Unlock() } // Delete deletes data with the given key from CycleState. -// This function is thread safe by using sync.Map. +// This function is thread safe by acquiring an internal lock first. func (c *CycleState) Delete(key StateKey) { - c.storage.Delete(key) + c.mx.Lock() + delete(c.storage, key) + c.mx.Unlock() } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/interface.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/interface.go index 5f14fe031107..a72daab2db89 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/interface.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/interface.go @@ -30,7 +30,6 @@ import ( "github.com/google/go-cmp/cmp/cmpopts" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/informers" clientset "k8s.io/client-go/kubernetes" restclient "k8s.io/client-go/rest" @@ -108,7 +107,7 @@ const ( ) // PodsToActivateKey is a reserved state key for stashing pods. -// If the stashed pods are present in unschedulablePods or backoffQ,they will be +// If the stashed pods are present in unschedulableQ or backoffQ,they will be // activated (i.e., moved to activeQ) in two phases: // - end of a scheduling cycle if it succeeds (will be cleared from `PodsToActivate` if activated) // - end of a binding cycle if it succeeds @@ -338,10 +337,8 @@ type PreFilterExtensions interface { type PreFilterPlugin interface { Plugin // PreFilter is called at the beginning of the scheduling cycle. All PreFilter - // plugins must return success or the pod will be rejected. PreFilter could optionally - // return a PreFilterResult to influence which nodes to evaluate downstream. This is useful - // for cases where it is possible to determine the subset of nodes to process in O(1) time. - PreFilter(ctx context.Context, state *CycleState, p *v1.Pod) (*PreFilterResult, *Status) + // plugins must return success or the pod will be rejected. + PreFilter(ctx context.Context, state *CycleState, p *v1.Pod) *Status // PreFilterExtensions returns a PreFilterExtensions interface if the plugin implements one, // or nil if it does not. A Pre-filter plugin can provide extensions to incrementally // modify its pre-processed info. The framework guarantees that the extensions @@ -501,9 +498,7 @@ type Framework interface { // *Status and its code is set to non-success if any of the plugins returns // anything but Success. If a non-success status is returned, then the scheduling // cycle is aborted. - // It also returns a PreFilterResult, which may influence what or how many nodes to - // evaluate downstream. - RunPreFilterPlugins(ctx context.Context, state *CycleState, pod *v1.Pod) (*PreFilterResult, *Status) + RunPreFilterPlugins(ctx context.Context, state *CycleState, pod *v1.Pod) *Status // RunPostFilterPlugins runs the set of configured PostFilter plugins. // PostFilter plugins can either be informational, in which case should be configured @@ -613,74 +608,16 @@ type Handle interface { Parallelizer() parallelize.Parallelizer } -// PreFilterResult wraps needed info for scheduler framework to act upon PreFilter phase. -type PreFilterResult struct { - // The set of nodes that should be considered downstream; if nil then - // all nodes are eligible. - NodeNames sets.String -} - -func (p *PreFilterResult) AllNodes() bool { - return p == nil || p.NodeNames == nil -} - -func (p *PreFilterResult) Merge(in *PreFilterResult) *PreFilterResult { - if p.AllNodes() && in.AllNodes() { - return nil - } - - r := PreFilterResult{} - if p.AllNodes() { - r.NodeNames = sets.NewString(in.NodeNames.UnsortedList()...) - return &r - } - if in.AllNodes() { - r.NodeNames = sets.NewString(p.NodeNames.UnsortedList()...) - return &r - } - - r.NodeNames = p.NodeNames.Intersection(in.NodeNames) - return &r -} - -type NominatingMode int - -const ( - ModeNoop NominatingMode = iota - ModeOverride -) - -type NominatingInfo struct { - NominatedNodeName string - NominatingMode NominatingMode -} - // PostFilterResult wraps needed info for scheduler framework to act upon PostFilter phase. type PostFilterResult struct { - *NominatingInfo -} - -func NewPostFilterResultWithNominatedNode(name string) *PostFilterResult { - return &PostFilterResult{ - NominatingInfo: &NominatingInfo{ - NominatedNodeName: name, - NominatingMode: ModeOverride, - }, - } -} - -func (ni *NominatingInfo) Mode() NominatingMode { - if ni == nil { - return ModeNoop - } - return ni.NominatingMode + NominatedNodeName string } // PodNominator abstracts operations to maintain nominated Pods. type PodNominator interface { // AddNominatedPod adds the given pod to the nominator or // updates it if it already exists. - AddNominatedPod(pod *PodInfo, nominatingInfo *NominatingInfo) + AddNominatedPod(pod *PodInfo, nodeName string) // DeleteNominatedPodIfExists deletes nominatedPod from internal cache. It's a no-op if it doesn't exist. DeleteNominatedPodIfExists(pod *v1.Pod) // UpdateNominatedPod updates the with . diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultbinder/default_binder.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultbinder/default_binder.go index e695e320dfaf..2a7c337c2bed 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultbinder/default_binder.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultbinder/default_binder.go @@ -49,7 +49,7 @@ func (b DefaultBinder) Name() string { // Bind binds pods to nodes using the k8s client. func (b DefaultBinder) Bind(ctx context.Context, state *framework.CycleState, p *v1.Pod, nodeName string) *framework.Status { - klog.V(3).InfoS("Attempting to bind pod to node", "pod", klog.KObj(p), "node", klog.KRef("", nodeName)) + klog.V(3).InfoS("Attempting to bind pod to node", "pod", klog.KObj(p), "node", nodeName) binding := &v1.Binding{ ObjectMeta: metav1.ObjectMeta{Namespace: p.Namespace, Name: p.Name, UID: p.UID}, Target: v1.ObjectReference{Kind: "Node", Name: nodeName}, diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpreemption/default_preemption.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpreemption/default_preemption.go index e89f520a139f..f96b0d1acc41 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpreemption/default_preemption.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/defaultpreemption/default_preemption.go @@ -95,12 +95,7 @@ func (pl *DefaultPreemption) PostFilter(ctx context.Context, state *framework.Cy State: state, Interface: pl, } - - result, status := pe.Preempt(ctx, pod, m) - if status.Message() != "" { - return result, framework.NewStatus(status.Code(), "preemption: "+status.Message()) - } - return result, status + return pe.Preempt(ctx, pod, m) } // calculateNumCandidates returns the number of candidates the FindCandidates @@ -175,7 +170,7 @@ func (pl *DefaultPreemption) SelectVictimsOnNode( // No potential victims are found, and so we don't need to evaluate the node again since its state didn't change. if len(potentialVictims) == 0 { - message := fmt.Sprintf("No preemption victims found for incoming pod") + message := fmt.Sprintf("No victims found on node %v for preemptor pod %v", nodeInfo.Node().Name, pod.Name) return nil, 0, framework.NewStatus(framework.UnschedulableAndUnresolvable, message) } @@ -227,17 +222,16 @@ func (pl *DefaultPreemption) SelectVictimsOnNode( return victims, numViolatingVictim, framework.NewStatus(framework.Success) } -// PodEligibleToPreemptOthers returns one bool and one string. The bool -// indicates whether this pod should be considered for preempting other pods or -// not. The string includes the reason if this pod isn't eligible. -// If this pod has a preemptionPolicy of Never or has already preempted other +// PodEligibleToPreemptOthers determines whether this pod should be considered +// for preempting other pods or not. If this pod has already preempted other // pods and those are in their graceful termination period, it shouldn't be // considered for preemption. // We look at the node that is nominated for this pod and as long as there are // terminating pods on the node, we don't consider this for preempting more pods. -func (pl *DefaultPreemption) PodEligibleToPreemptOthers(pod *v1.Pod, nominatedNodeStatus *framework.Status) (bool, string) { +func (pl *DefaultPreemption) PodEligibleToPreemptOthers(pod *v1.Pod, nominatedNodeStatus *framework.Status) bool { if pod.Spec.PreemptionPolicy != nil && *pod.Spec.PreemptionPolicy == v1.PreemptNever { - return false, fmt.Sprint("not eligible due to preemptionPolicy=Never.") + klog.V(5).InfoS("Pod is not eligible for preemption because it has a preemptionPolicy of Never", "pod", klog.KObj(pod)) + return false } nodeInfos := pl.fh.SnapshotSharedLister().NodeInfos() nomNodeName := pod.Status.NominatedNodeName @@ -245,7 +239,7 @@ func (pl *DefaultPreemption) PodEligibleToPreemptOthers(pod *v1.Pod, nominatedNo // If the pod's nominated node is considered as UnschedulableAndUnresolvable by the filters, // then the pod should be considered for preempting again. if nominatedNodeStatus.Code() == framework.UnschedulableAndUnresolvable { - return true, "" + return true } if nodeInfo, _ := nodeInfos.Get(nomNodeName); nodeInfo != nil { @@ -253,12 +247,12 @@ func (pl *DefaultPreemption) PodEligibleToPreemptOthers(pod *v1.Pod, nominatedNo for _, p := range nodeInfo.Pods { if p.Pod.DeletionTimestamp != nil && corev1helpers.PodPriority(p.Pod) < podPriority { // There is a terminating pod on the nominated node. - return false, fmt.Sprint("not eligible due to a terminating pod on the nominated node.") + return false } } } } - return true, "" + return true } // filterPodsWithPDBViolation groups the given "pods" into two groups of "violatingPods" @@ -283,7 +277,6 @@ func filterPodsWithPDBViolation(podInfos []*framework.PodInfo, pdbs []*policy.Po } selector, err := metav1.LabelSelectorAsSelector(pdb.Spec.Selector) if err != nil { - // This object has an invalid selector, it does not match the pod continue } // A PDB with a nil or empty selector matches nothing. diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/feature/feature.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/feature/feature.go index 4f24a1c4c977..6c2b4fb0de2c 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/feature/feature.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/feature/feature.go @@ -20,9 +20,10 @@ package feature // This struct allows us to break the dependency of the plugins on // the internal k8s features pkg. type Features struct { - EnablePodAffinityNamespaceSelector bool - EnablePodDisruptionBudget bool - EnableReadWriteOncePod bool - EnableVolumeCapacityPriority bool - EnableMinDomainsInPodTopologySpread bool + EnablePodAffinityNamespaceSelector bool + EnablePodDisruptionBudget bool + EnablePodOverhead bool + EnableReadWriteOncePod bool + EnableVolumeCapacityPriority bool + EnableCSIStorageCapacity bool } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity/filtering.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity/filtering.go index 778a70f2c7bc..3b3d0f6d9a56 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity/filtering.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity/filtering.go @@ -51,7 +51,8 @@ type preFilterState struct { // podInfo of the incoming pod. podInfo *framework.PodInfo // A copy of the incoming pod's namespace labels. - namespaceLabels labels.Set + namespaceLabels labels.Set + enableNamespaceSelector bool } // Clone the prefilter state. @@ -67,6 +68,7 @@ func (s *preFilterState) Clone() framework.StateData { // No need to deep copy the podInfo because it shouldn't change. copy.podInfo = s.podInfo copy.namespaceLabels = s.namespaceLabels + copy.enableNamespaceSelector = s.enableNamespaceSelector return © } @@ -76,11 +78,11 @@ func (s *preFilterState) updateWithPod(pInfo *framework.PodInfo, node *v1.Node, return } - s.existingAntiAffinityCounts.updateWithAntiAffinityTerms(pInfo.RequiredAntiAffinityTerms, s.podInfo.Pod, s.namespaceLabels, node, multiplier) - s.affinityCounts.updateWithAffinityTerms(s.podInfo.RequiredAffinityTerms, pInfo.Pod, node, multiplier) + s.existingAntiAffinityCounts.updateWithAntiAffinityTerms(pInfo.RequiredAntiAffinityTerms, s.podInfo.Pod, s.namespaceLabels, node, multiplier, s.enableNamespaceSelector) + s.affinityCounts.updateWithAffinityTerms(s.podInfo.RequiredAffinityTerms, pInfo.Pod, node, multiplier, s.enableNamespaceSelector) // The incoming pod's terms have the namespaceSelector merged into the namespaces, and so // here we don't lookup the updated pod's namespace labels, hence passing nil for nsLabels. - s.antiAffinityCounts.updateWithAntiAffinityTerms(s.podInfo.RequiredAntiAffinityTerms, pInfo.Pod, nil, node, multiplier) + s.antiAffinityCounts.updateWithAntiAffinityTerms(s.podInfo.RequiredAntiAffinityTerms, pInfo.Pod, nil, node, multiplier, s.enableNamespaceSelector) } type topologyPair struct { @@ -115,8 +117,8 @@ func (m topologyToMatchedTermCount) update(node *v1.Node, tk string, value int64 // updates the topologyToMatchedTermCount map with the specified value // for each affinity term if "targetPod" matches ALL terms. func (m topologyToMatchedTermCount) updateWithAffinityTerms( - terms []framework.AffinityTerm, pod *v1.Pod, node *v1.Node, value int64) { - if podMatchesAllAffinityTerms(terms, pod) { + terms []framework.AffinityTerm, pod *v1.Pod, node *v1.Node, value int64, enableNamespaceSelector bool) { + if podMatchesAllAffinityTerms(terms, pod, enableNamespaceSelector) { for _, t := range terms { m.update(node, t.TopologyKey, value) } @@ -125,24 +127,24 @@ func (m topologyToMatchedTermCount) updateWithAffinityTerms( // updates the topologyToMatchedTermCount map with the specified value // for each anti-affinity term matched the target pod. -func (m topologyToMatchedTermCount) updateWithAntiAffinityTerms(terms []framework.AffinityTerm, pod *v1.Pod, nsLabels labels.Set, node *v1.Node, value int64) { +func (m topologyToMatchedTermCount) updateWithAntiAffinityTerms(terms []framework.AffinityTerm, pod *v1.Pod, nsLabels labels.Set, node *v1.Node, value int64, enableNamespaceSelector bool) { // Check anti-affinity terms. for _, t := range terms { - if t.Matches(pod, nsLabels) { + if t.Matches(pod, nsLabels, enableNamespaceSelector) { m.update(node, t.TopologyKey, value) } } } // returns true IFF the given pod matches all the given terms. -func podMatchesAllAffinityTerms(terms []framework.AffinityTerm, pod *v1.Pod) bool { +func podMatchesAllAffinityTerms(terms []framework.AffinityTerm, pod *v1.Pod, enableNamespaceSelector bool) bool { if len(terms) == 0 { return false } for _, t := range terms { // The incoming pod NamespaceSelector was merged into the Namespaces set, and so // we are not explicitly passing in namespace labels. - if !t.Matches(pod, nil) { + if !t.Matches(pod, nil, enableNamespaceSelector) { return false } } @@ -152,7 +154,7 @@ func podMatchesAllAffinityTerms(terms []framework.AffinityTerm, pod *v1.Pod) boo // calculates the following for each existing pod on each node: // (1) Whether it has PodAntiAffinity // (2) Whether any AffinityTerm matches the incoming pod -func (pl *InterPodAffinity) getExistingAntiAffinityCounts(ctx context.Context, pod *v1.Pod, nsLabels labels.Set, nodes []*framework.NodeInfo) topologyToMatchedTermCount { +func (pl *InterPodAffinity) getExistingAntiAffinityCounts(pod *v1.Pod, nsLabels labels.Set, nodes []*framework.NodeInfo, enableNamespaceSelector bool) topologyToMatchedTermCount { topoMaps := make([]topologyToMatchedTermCount, len(nodes)) index := int32(-1) processNode := func(i int) { @@ -164,13 +166,13 @@ func (pl *InterPodAffinity) getExistingAntiAffinityCounts(ctx context.Context, p } topoMap := make(topologyToMatchedTermCount) for _, existingPod := range nodeInfo.PodsWithRequiredAntiAffinity { - topoMap.updateWithAntiAffinityTerms(existingPod.RequiredAntiAffinityTerms, pod, nsLabels, node, 1) + topoMap.updateWithAntiAffinityTerms(existingPod.RequiredAntiAffinityTerms, pod, nsLabels, node, 1, enableNamespaceSelector) } if len(topoMap) != 0 { topoMaps[atomic.AddInt32(&index, 1)] = topoMap } } - pl.parallelizer.Until(ctx, len(nodes), processNode) + pl.parallelizer.Until(context.Background(), len(nodes), processNode) result := make(topologyToMatchedTermCount) for i := 0; i <= int(index); i++ { @@ -184,7 +186,7 @@ func (pl *InterPodAffinity) getExistingAntiAffinityCounts(ctx context.Context, p // It returns a topologyToMatchedTermCount that are checked later by the affinity // predicate. With this topologyToMatchedTermCount available, the affinity predicate does not // need to check all the pods in the cluster. -func (pl *InterPodAffinity) getIncomingAffinityAntiAffinityCounts(ctx context.Context, podInfo *framework.PodInfo, allNodes []*framework.NodeInfo) (topologyToMatchedTermCount, topologyToMatchedTermCount) { +func (pl *InterPodAffinity) getIncomingAffinityAntiAffinityCounts(podInfo *framework.PodInfo, allNodes []*framework.NodeInfo, enableNamespaceSelector bool) (topologyToMatchedTermCount, topologyToMatchedTermCount) { affinityCounts := make(topologyToMatchedTermCount) antiAffinityCounts := make(topologyToMatchedTermCount) if len(podInfo.RequiredAffinityTerms) == 0 && len(podInfo.RequiredAntiAffinityTerms) == 0 { @@ -204,10 +206,10 @@ func (pl *InterPodAffinity) getIncomingAffinityAntiAffinityCounts(ctx context.Co affinity := make(topologyToMatchedTermCount) antiAffinity := make(topologyToMatchedTermCount) for _, existingPod := range nodeInfo.Pods { - affinity.updateWithAffinityTerms(podInfo.RequiredAffinityTerms, existingPod.Pod, node, 1) + affinity.updateWithAffinityTerms(podInfo.RequiredAffinityTerms, existingPod.Pod, node, 1, enableNamespaceSelector) // The incoming pod's terms have the namespaceSelector merged into the namespaces, and so // here we don't lookup the existing pod's namespace labels, hence passing nil for nsLabels. - antiAffinity.updateWithAntiAffinityTerms(podInfo.RequiredAntiAffinityTerms, existingPod.Pod, nil, node, 1) + antiAffinity.updateWithAntiAffinityTerms(podInfo.RequiredAntiAffinityTerms, existingPod.Pod, nil, node, 1, enableNamespaceSelector) } if len(affinity) > 0 || len(antiAffinity) > 0 { @@ -216,7 +218,7 @@ func (pl *InterPodAffinity) getIncomingAffinityAntiAffinityCounts(ctx context.Co antiAffinityCountsList[k] = antiAffinity } } - pl.parallelizer.Until(ctx, len(allNodes), processNode) + pl.parallelizer.Until(context.Background(), len(allNodes), processNode) for i := 0; i <= int(index); i++ { affinityCounts.append(affinityCountsList[i]) @@ -227,41 +229,45 @@ func (pl *InterPodAffinity) getIncomingAffinityAntiAffinityCounts(ctx context.Co } // PreFilter invoked at the prefilter extension point. -func (pl *InterPodAffinity) PreFilter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod) (*framework.PreFilterResult, *framework.Status) { +func (pl *InterPodAffinity) PreFilter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod) *framework.Status { var allNodes []*framework.NodeInfo var nodesWithRequiredAntiAffinityPods []*framework.NodeInfo var err error if allNodes, err = pl.sharedLister.NodeInfos().List(); err != nil { - return nil, framework.AsStatus(fmt.Errorf("failed to list NodeInfos: %w", err)) + return framework.AsStatus(fmt.Errorf("failed to list NodeInfos: %w", err)) } if nodesWithRequiredAntiAffinityPods, err = pl.sharedLister.NodeInfos().HavePodsWithRequiredAntiAffinityList(); err != nil { - return nil, framework.AsStatus(fmt.Errorf("failed to list NodeInfos with pods with affinity: %w", err)) + return framework.AsStatus(fmt.Errorf("failed to list NodeInfos with pods with affinity: %w", err)) } - s := &preFilterState{} + s := &preFilterState{ + enableNamespaceSelector: pl.enableNamespaceSelector, + } s.podInfo = framework.NewPodInfo(pod) if s.podInfo.ParseError != nil { - return nil, framework.NewStatus(framework.UnschedulableAndUnresolvable, fmt.Sprintf("parsing pod: %+v", s.podInfo.ParseError)) + return framework.NewStatus(framework.UnschedulableAndUnresolvable, fmt.Sprintf("parsing pod: %+v", s.podInfo.ParseError)) } - for i := range s.podInfo.RequiredAffinityTerms { - if err := pl.mergeAffinityTermNamespacesIfNotEmpty(&s.podInfo.RequiredAffinityTerms[i]); err != nil { - return nil, framework.AsStatus(err) + if pl.enableNamespaceSelector { + for i := range s.podInfo.RequiredAffinityTerms { + if err := pl.mergeAffinityTermNamespacesIfNotEmpty(&s.podInfo.RequiredAffinityTerms[i]); err != nil { + return framework.AsStatus(err) + } } - } - for i := range s.podInfo.RequiredAntiAffinityTerms { - if err := pl.mergeAffinityTermNamespacesIfNotEmpty(&s.podInfo.RequiredAntiAffinityTerms[i]); err != nil { - return nil, framework.AsStatus(err) + for i := range s.podInfo.RequiredAntiAffinityTerms { + if err := pl.mergeAffinityTermNamespacesIfNotEmpty(&s.podInfo.RequiredAntiAffinityTerms[i]); err != nil { + return framework.AsStatus(err) + } } + s.namespaceLabels = GetNamespaceLabelsSnapshot(pod.Namespace, pl.nsLister) } - s.namespaceLabels = GetNamespaceLabelsSnapshot(pod.Namespace, pl.nsLister) - s.existingAntiAffinityCounts = pl.getExistingAntiAffinityCounts(ctx, pod, s.namespaceLabels, nodesWithRequiredAntiAffinityPods) - s.affinityCounts, s.antiAffinityCounts = pl.getIncomingAffinityAntiAffinityCounts(ctx, s.podInfo, allNodes) + s.existingAntiAffinityCounts = pl.getExistingAntiAffinityCounts(pod, s.namespaceLabels, nodesWithRequiredAntiAffinityPods, pl.enableNamespaceSelector) + s.affinityCounts, s.antiAffinityCounts = pl.getIncomingAffinityAntiAffinityCounts(s.podInfo, allNodes, pl.enableNamespaceSelector) cycleState.Write(preFilterStateKey, s) - return nil, nil + return nil } // PreFilterExtensions returns prefilter extensions, pod add and remove. @@ -355,7 +361,7 @@ func satisfyPodAffinity(state *preFilterState, nodeInfo *framework.NodeInfo) boo // in the cluster matches the namespace and selector of this pod, the pod matches // its own terms, and the node has all the requested topologies, then we allow the pod // to pass the affinity check. - if len(state.affinityCounts) == 0 && podMatchesAllAffinityTerms(state.podInfo.RequiredAffinityTerms, state.podInfo.Pod) { + if len(state.affinityCounts) == 0 && podMatchesAllAffinityTerms(state.podInfo.RequiredAffinityTerms, state.podInfo.Pod, state.enableNamespaceSelector) { return true } return false diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity/plugin.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity/plugin.go index 4b786e0b7903..da6b35b5e686 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity/plugin.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity/plugin.go @@ -27,6 +27,7 @@ import ( "k8s.io/kubernetes/pkg/scheduler/apis/config/validation" "k8s.io/kubernetes/pkg/scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/framework/parallelize" + "k8s.io/kubernetes/pkg/scheduler/framework/plugins/feature" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/names" ) @@ -43,10 +44,11 @@ var _ framework.EnqueueExtensions = &InterPodAffinity{} // InterPodAffinity is a plugin that checks inter pod affinity type InterPodAffinity struct { - parallelizer parallelize.Parallelizer - args config.InterPodAffinityArgs - sharedLister framework.SharedLister - nsLister listersv1.NamespaceLister + parallelizer parallelize.Parallelizer + args config.InterPodAffinityArgs + sharedLister framework.SharedLister + nsLister listersv1.NamespaceLister + enableNamespaceSelector bool } // Name returns name of the plugin. It is used in logs, etc. @@ -71,7 +73,7 @@ func (pl *InterPodAffinity) EventsToRegister() []framework.ClusterEvent { } // New initializes a new plugin and returns it. -func New(plArgs runtime.Object, h framework.Handle) (framework.Plugin, error) { +func New(plArgs runtime.Object, h framework.Handle, fts feature.Features) (framework.Plugin, error) { if h.SnapshotSharedLister() == nil { return nil, fmt.Errorf("SnapshotSharedlister is nil") } @@ -83,12 +85,15 @@ func New(plArgs runtime.Object, h framework.Handle) (framework.Plugin, error) { return nil, err } pl := &InterPodAffinity{ - parallelizer: h.Parallelizer(), - args: args, - sharedLister: h.SnapshotSharedLister(), - nsLister: h.SharedInformerFactory().Core().V1().Namespaces().Lister(), + parallelizer: h.Parallelizer(), + args: args, + sharedLister: h.SnapshotSharedLister(), + enableNamespaceSelector: fts.EnablePodAffinityNamespaceSelector, } + if pl.enableNamespaceSelector { + pl.nsLister = h.SharedInformerFactory().Core().V1().Namespaces().Lister() + } return pl, nil } @@ -130,6 +135,6 @@ func GetNamespaceLabelsSnapshot(ns string, nsLister listersv1.NamespaceLister) ( // Create and return snapshot of the labels. return labels.Merge(podNS.Labels, nil) } - klog.V(3).InfoS("getting namespace, assuming empty set of namespace labels", "namespace", ns, "err", err) + klog.ErrorS(err, "getting namespace, assuming empty set of namespace labels", "namespace", ns) return } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity/scoring.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity/scoring.go index f333bb6e3ca8..464e0f3b5d1a 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity/scoring.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity/scoring.go @@ -46,8 +46,8 @@ func (s *preScoreState) Clone() framework.StateData { return s } -func (m scoreMap) processTerm(term *framework.AffinityTerm, weight int32, pod *v1.Pod, nsLabels labels.Set, node *v1.Node, multiplier int32) { - if term.Matches(pod, nsLabels) { +func (m scoreMap) processTerm(term *framework.AffinityTerm, weight int32, pod *v1.Pod, nsLabels labels.Set, node *v1.Node, multiplier int32, enableNamespaceSelector bool) { + if term.Matches(pod, nsLabels, enableNamespaceSelector) { if tpValue, tpValueExist := node.Labels[term.TopologyKey]; tpValueExist { if m[term.TopologyKey] == nil { m[term.TopologyKey] = make(map[string]int64) @@ -57,9 +57,9 @@ func (m scoreMap) processTerm(term *framework.AffinityTerm, weight int32, pod *v } } -func (m scoreMap) processTerms(terms []framework.WeightedAffinityTerm, pod *v1.Pod, nsLabels labels.Set, node *v1.Node, multiplier int32) { +func (m scoreMap) processTerms(terms []framework.WeightedAffinityTerm, pod *v1.Pod, nsLabels labels.Set, node *v1.Node, multiplier int32, enableNamespaceSelector bool) { for _, term := range terms { - m.processTerm(&term.AffinityTerm, term.Weight, pod, nsLabels, node, multiplier) + m.processTerm(&term.AffinityTerm, term.Weight, pod, nsLabels, node, multiplier, enableNamespaceSelector) } } @@ -93,33 +93,33 @@ func (pl *InterPodAffinity) processExistingPod( // value as that of `s node by the term`s weight. // Note that the incoming pod's terms have the namespaceSelector merged into the namespaces, and so // here we don't lookup the existing pod's namespace labels, hence passing nil for nsLabels. - topoScore.processTerms(state.podInfo.PreferredAffinityTerms, existingPod.Pod, nil, existingPodNode, 1) + topoScore.processTerms(state.podInfo.PreferredAffinityTerms, existingPod.Pod, nil, existingPodNode, 1, pl.enableNamespaceSelector) // For every soft pod anti-affinity term of , if matches the term, // decrement for every node in the cluster with the same // value as that of `s node by the term`s weight. // Note that the incoming pod's terms have the namespaceSelector merged into the namespaces, and so // here we don't lookup the existing pod's namespace labels, hence passing nil for nsLabels. - topoScore.processTerms(state.podInfo.PreferredAntiAffinityTerms, existingPod.Pod, nil, existingPodNode, -1) + topoScore.processTerms(state.podInfo.PreferredAntiAffinityTerms, existingPod.Pod, nil, existingPodNode, -1, pl.enableNamespaceSelector) // For every hard pod affinity term of , if matches the term, // increment for every node in the cluster with the same // value as that of 's node by the constant if pl.args.HardPodAffinityWeight > 0 && len(existingPodNode.Labels) != 0 { for _, t := range existingPod.RequiredAffinityTerms { - topoScore.processTerm(&t, pl.args.HardPodAffinityWeight, incomingPod, state.namespaceLabels, existingPodNode, 1) + topoScore.processTerm(&t, pl.args.HardPodAffinityWeight, incomingPod, state.namespaceLabels, existingPodNode, 1, pl.enableNamespaceSelector) } } // For every soft pod affinity term of , if matches the term, // increment for every node in the cluster with the same // value as that of 's node by the term's weight. - topoScore.processTerms(existingPod.PreferredAffinityTerms, incomingPod, state.namespaceLabels, existingPodNode, 1) + topoScore.processTerms(existingPod.PreferredAffinityTerms, incomingPod, state.namespaceLabels, existingPodNode, 1, pl.enableNamespaceSelector) // For every soft pod anti-affinity term of , if matches the term, // decrement for every node in the cluster with the same // value as that of 's node by the term's weight. - topoScore.processTerms(existingPod.PreferredAntiAffinityTerms, incomingPod, state.namespaceLabels, existingPodNode, -1) + topoScore.processTerms(existingPod.PreferredAntiAffinityTerms, incomingPod, state.namespaceLabels, existingPodNode, -1, pl.enableNamespaceSelector) } // PreScore builds and writes cycle state used by Score and NormalizeScore. @@ -168,17 +168,19 @@ func (pl *InterPodAffinity) PreScore( return framework.AsStatus(fmt.Errorf("failed to parse pod: %w", state.podInfo.ParseError)) } - for i := range state.podInfo.PreferredAffinityTerms { - if err := pl.mergeAffinityTermNamespacesIfNotEmpty(&state.podInfo.PreferredAffinityTerms[i].AffinityTerm); err != nil { - return framework.AsStatus(fmt.Errorf("updating PreferredAffinityTerms: %w", err)) + if pl.enableNamespaceSelector { + for i := range state.podInfo.PreferredAffinityTerms { + if err := pl.mergeAffinityTermNamespacesIfNotEmpty(&state.podInfo.PreferredAffinityTerms[i].AffinityTerm); err != nil { + return framework.AsStatus(fmt.Errorf("updating PreferredAffinityTerms: %w", err)) + } } - } - for i := range state.podInfo.PreferredAntiAffinityTerms { - if err := pl.mergeAffinityTermNamespacesIfNotEmpty(&state.podInfo.PreferredAntiAffinityTerms[i].AffinityTerm); err != nil { - return framework.AsStatus(fmt.Errorf("updating PreferredAntiAffinityTerms: %w", err)) + for i := range state.podInfo.PreferredAntiAffinityTerms { + if err := pl.mergeAffinityTermNamespacesIfNotEmpty(&state.podInfo.PreferredAntiAffinityTerms[i].AffinityTerm); err != nil { + return framework.AsStatus(fmt.Errorf("updating PreferredAntiAffinityTerms: %w", err)) + } } + state.namespaceLabels = GetNamespaceLabelsSnapshot(pod.Namespace, pl.nsLister) } - state.namespaceLabels = GetNamespaceLabelsSnapshot(pod.Namespace, pl.nsLister) topoScores := make([]scoreMap, len(allNodes)) index := int32(-1) @@ -203,7 +205,7 @@ func (pl *InterPodAffinity) PreScore( topoScores[atomic.AddInt32(&index, 1)] = topoScore } } - pl.parallelizer.Until(pCtx, len(allNodes), processNode) + pl.parallelizer.Until(context.Background(), len(allNodes), processNode) for i := 0; i <= int(index); i++ { state.topologyScore.append(topoScores[i]) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeaffinity/node_affinity.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeaffinity/node_affinity.go index 41e0a27d708d..e5e5f55f35a5 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeaffinity/node_affinity.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeaffinity/node_affinity.go @@ -20,10 +20,8 @@ import ( "context" "fmt" - "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/sets" "k8s.io/component-helpers/scheduling/corev1/nodeaffinity" "k8s.io/kubernetes/pkg/scheduler/apis/config" "k8s.io/kubernetes/pkg/scheduler/apis/config/validation" @@ -60,9 +58,6 @@ const ( // errReasonEnforced is the reason for added node affinity not matching. errReasonEnforced = "node(s) didn't match scheduler-enforced node affinity" - - // errReasonConflict is the reason for pod's conflicting affinity rules. - errReasonConflict = "pod affinity terms conflict" ) // Name returns name of the plugin. It is used in logs, etc. @@ -83,56 +78,15 @@ func (s *preFilterState) Clone() framework.StateData { // failed by this plugin schedulable. func (pl *NodeAffinity) EventsToRegister() []framework.ClusterEvent { return []framework.ClusterEvent{ - {Resource: framework.Node, ActionType: framework.Add | framework.Update}, + {Resource: framework.Node, ActionType: framework.Add | framework.UpdateNodeLabel}, } } // PreFilter builds and writes cycle state used by Filter. -func (pl *NodeAffinity) PreFilter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod) (*framework.PreFilterResult, *framework.Status) { +func (pl *NodeAffinity) PreFilter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod) *framework.Status { state := &preFilterState{requiredNodeSelectorAndAffinity: nodeaffinity.GetRequiredNodeAffinity(pod)} cycleState.Write(preFilterStateKey, state) - affinity := pod.Spec.Affinity - if affinity == nil || - affinity.NodeAffinity == nil || - affinity.NodeAffinity.RequiredDuringSchedulingIgnoredDuringExecution == nil || - len(affinity.NodeAffinity.RequiredDuringSchedulingIgnoredDuringExecution.NodeSelectorTerms) == 0 { - return nil, nil - } - - // Check if there is affinity to a specific node and return it. - terms := affinity.NodeAffinity.RequiredDuringSchedulingIgnoredDuringExecution.NodeSelectorTerms - var nodeNames sets.String - for _, t := range terms { - var termNodeNames sets.String - for _, r := range t.MatchFields { - if r.Key == metav1.ObjectNameField && r.Operator == v1.NodeSelectorOpIn { - // The requirements represent ANDed constraints, and so we need to - // find the intersection of nodes. - s := sets.NewString(r.Values...) - if termNodeNames == nil { - termNodeNames = s - } else { - termNodeNames = termNodeNames.Intersection(s) - } - } - } - if termNodeNames == nil { - // If this term has no node.Name field affinity, - // then all nodes are eligible because the terms are ORed. - return nil, nil - } - // If the set is empty, it means the terms had affinity to different - // sets of nodes, and since they are ANDed, then the pod will not match any node. - if len(termNodeNames) == 0 { - return nil, framework.NewStatus(framework.UnschedulableAndUnresolvable, errReasonConflict) - } - nodeNames = nodeNames.Union(termNodeNames) - } - if nodeNames != nil { - return &framework.PreFilterResult{NodeNames: nodeNames}, nil - } - return nil, nil - + return nil } // PreFilterExtensions not necessary for this plugin as state doesn't depend on pod additions or deletions. diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodename/node_name.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodename/node_name.go index e02134f793c4..356fc5c29fe3 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodename/node_name.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodename/node_name.go @@ -43,7 +43,7 @@ const ( // failed by this plugin schedulable. func (pl *NodeName) EventsToRegister() []framework.ClusterEvent { return []framework.ClusterEvent{ - {Resource: framework.Node, ActionType: framework.Add | framework.Update}, + {Resource: framework.Node, ActionType: framework.Add}, } } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeports/node_ports.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeports/node_ports.go index bfd648efe4a3..12ffc87a7a4e 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeports/node_ports.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeports/node_ports.go @@ -74,10 +74,10 @@ func getContainerPorts(pods ...*v1.Pod) []*v1.ContainerPort { } // PreFilter invoked at the prefilter extension point. -func (pl *NodePorts) PreFilter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod) (*framework.PreFilterResult, *framework.Status) { +func (pl *NodePorts) PreFilter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod) *framework.Status { s := getContainerPorts(pod) cycleState.Write(preFilterStateKey, preFilterState(s)) - return nil, nil + return nil } // PreFilterExtensions do not exist for this plugin. @@ -105,7 +105,7 @@ func (pl *NodePorts) EventsToRegister() []framework.ClusterEvent { return []framework.ClusterEvent{ // Due to immutable fields `spec.containers[*].ports`, pod update events are ignored. {Resource: framework.Pod, ActionType: framework.Delete}, - {Resource: framework.Node, ActionType: framework.Add | framework.Update}, + {Resource: framework.Node, ActionType: framework.Add}, } } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/balanced_allocation.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/balanced_allocation.go index 4f91937ba542..c2dcd6d53d4f 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/balanced_allocation.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/balanced_allocation.go @@ -91,6 +91,7 @@ func NewBalancedAllocation(baArgs runtime.Object, h framework.Handle, fts featur scorer: balancedResourceScorer, useRequested: true, resourceToWeightMap: resToWeightMap, + enablePodOverhead: fts.EnablePodOverhead, }, }, nil } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/fit.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/fit.go index e4b2a5044dd5..6cac32516500 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/fit.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/fit.go @@ -38,12 +38,12 @@ var _ framework.EnqueueExtensions = &Fit{} var _ framework.ScorePlugin = &Fit{} const ( - // Name is the name of the plugin used in the plugin registry and configurations. - Name = names.NodeResourcesFit + // FitName is the name of the plugin used in the plugin registry and configurations. + FitName = names.NodeResourcesFit // preFilterStateKey is the key in CycleState to NodeResourcesFit pre-computed data. // Using the name of the plugin will likely help us avoid collisions with other plugins. - preFilterStateKey = "PreFilter" + Name + preFilterStateKey = "PreFilter" + FitName ) // nodeResourceStrategyTypeMap maps strategy to scorer implementation @@ -78,6 +78,7 @@ var nodeResourceStrategyTypeMap = map[config.ScoringStrategyType]scorer{ type Fit struct { ignoredResources sets.String ignoredResourceGroups sets.String + enablePodOverhead bool handle framework.Handle resourceAllocationScorer } @@ -99,7 +100,7 @@ func (s *preFilterState) Clone() framework.StateData { // Name returns name of the plugin. It is used in logs, etc. func (f *Fit) Name() string { - return Name + return FitName } // NewFit initializes a new plugin and returns it. @@ -125,6 +126,7 @@ func NewFit(plArgs runtime.Object, h framework.Handle, fts feature.Features) (fr return &Fit{ ignoredResources: sets.NewString(args.IgnoredResources...), ignoredResourceGroups: sets.NewString(args.IgnoredResourceGroups...), + enablePodOverhead: fts.EnablePodOverhead, handle: h, resourceAllocationScorer: *scorePlugin(args), }, nil @@ -135,7 +137,8 @@ func NewFit(plArgs runtime.Object, h framework.Handle, fts feature.Features) (fr // the max in each dimension iteratively. In contrast, we sum the resource vectors for // regular containers since they run simultaneously. // -// The resources defined for Overhead should be added to the calculated Resource request sum +// If Pod Overhead is specified and the feature gate is set, the resources defined for Overhead +// are added to the calculated Resource request sum // // Example: // @@ -156,7 +159,7 @@ func NewFit(plArgs runtime.Object, h framework.Handle, fts feature.Features) (fr // Memory: 1G // // Result: CPU: 3, Memory: 3G -func computePodResourceRequest(pod *v1.Pod) *preFilterState { +func computePodResourceRequest(pod *v1.Pod, enablePodOverhead bool) *preFilterState { result := &preFilterState{} for _, container := range pod.Spec.Containers { result.Add(container.Resources.Requests) @@ -168,16 +171,17 @@ func computePodResourceRequest(pod *v1.Pod) *preFilterState { } // If Overhead is being utilized, add to the total requests for the pod - if pod.Spec.Overhead != nil { + if pod.Spec.Overhead != nil && enablePodOverhead { result.Add(pod.Spec.Overhead) } + return result } // PreFilter invoked at the prefilter extension point. -func (f *Fit) PreFilter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod) (*framework.PreFilterResult, *framework.Status) { - cycleState.Write(preFilterStateKey, computePodResourceRequest(pod)) - return nil, nil +func (f *Fit) PreFilter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod) *framework.Status { + cycleState.Write(preFilterStateKey, computePodResourceRequest(pod, f.enablePodOverhead)) + return nil } // PreFilterExtensions returns prefilter extensions, pod add and remove. @@ -207,7 +211,7 @@ func getPreFilterState(cycleState *framework.CycleState) (*preFilterState, error func (f *Fit) EventsToRegister() []framework.ClusterEvent { return []framework.ClusterEvent{ {Resource: framework.Pod, ActionType: framework.Delete}, - {Resource: framework.Node, ActionType: framework.Add | framework.Update}, + {Resource: framework.Node, ActionType: framework.Add | framework.UpdateNodeAllocatable}, } } @@ -245,8 +249,8 @@ type InsufficientResource struct { } // Fits checks if node have enough resources to host the pod. -func Fits(pod *v1.Pod, nodeInfo *framework.NodeInfo) []InsufficientResource { - return fitsRequest(computePodResourceRequest(pod), nodeInfo, nil, nil) +func Fits(pod *v1.Pod, nodeInfo *framework.NodeInfo, enablePodOverhead bool) []InsufficientResource { + return fitsRequest(computePodResourceRequest(pod, enablePodOverhead), nodeInfo, nil, nil) } func fitsRequest(podRequest *preFilterState, nodeInfo *framework.NodeInfo, ignoredExtendedResources, ignoredResourceGroups sets.String) []InsufficientResource { @@ -255,11 +259,11 @@ func fitsRequest(podRequest *preFilterState, nodeInfo *framework.NodeInfo, ignor allowedPodNumber := nodeInfo.Allocatable.AllowedPodNumber if len(nodeInfo.Pods)+1 > allowedPodNumber { insufficientResources = append(insufficientResources, InsufficientResource{ - ResourceName: v1.ResourcePods, - Reason: "Too many pods", - Requested: 1, - Used: int64(len(nodeInfo.Pods)), - Capacity: int64(allowedPodNumber), + v1.ResourcePods, + "Too many pods", + 1, + int64(len(nodeInfo.Pods)), + int64(allowedPodNumber), }) } @@ -272,29 +276,29 @@ func fitsRequest(podRequest *preFilterState, nodeInfo *framework.NodeInfo, ignor if podRequest.MilliCPU > (nodeInfo.Allocatable.MilliCPU - nodeInfo.Requested.MilliCPU) { insufficientResources = append(insufficientResources, InsufficientResource{ - ResourceName: v1.ResourceCPU, - Reason: "Insufficient cpu", - Requested: podRequest.MilliCPU, - Used: nodeInfo.Requested.MilliCPU, - Capacity: nodeInfo.Allocatable.MilliCPU, + v1.ResourceCPU, + "Insufficient cpu", + podRequest.MilliCPU, + nodeInfo.Requested.MilliCPU, + nodeInfo.Allocatable.MilliCPU, }) } if podRequest.Memory > (nodeInfo.Allocatable.Memory - nodeInfo.Requested.Memory) { insufficientResources = append(insufficientResources, InsufficientResource{ - ResourceName: v1.ResourceMemory, - Reason: "Insufficient memory", - Requested: podRequest.Memory, - Used: nodeInfo.Requested.Memory, - Capacity: nodeInfo.Allocatable.Memory, + v1.ResourceMemory, + "Insufficient memory", + podRequest.Memory, + nodeInfo.Requested.Memory, + nodeInfo.Allocatable.Memory, }) } if podRequest.EphemeralStorage > (nodeInfo.Allocatable.EphemeralStorage - nodeInfo.Requested.EphemeralStorage) { insufficientResources = append(insufficientResources, InsufficientResource{ - ResourceName: v1.ResourceEphemeralStorage, - Reason: "Insufficient ephemeral-storage", - Requested: podRequest.EphemeralStorage, - Used: nodeInfo.Requested.EphemeralStorage, - Capacity: nodeInfo.Allocatable.EphemeralStorage, + v1.ResourceEphemeralStorage, + "Insufficient ephemeral-storage", + podRequest.EphemeralStorage, + nodeInfo.Requested.EphemeralStorage, + nodeInfo.Allocatable.EphemeralStorage, }) } @@ -312,11 +316,11 @@ func fitsRequest(podRequest *preFilterState, nodeInfo *framework.NodeInfo, ignor } if rQuant > (nodeInfo.Allocatable.ScalarResources[rName] - nodeInfo.Requested.ScalarResources[rName]) { insufficientResources = append(insufficientResources, InsufficientResource{ - ResourceName: rName, - Reason: fmt.Sprintf("Insufficient %v", rName), - Requested: podRequest.ScalarResources[rName], - Used: nodeInfo.Requested.ScalarResources[rName], - Capacity: nodeInfo.Allocatable.ScalarResources[rName], + rName, + fmt.Sprintf("Insufficient %v", rName), + podRequest.ScalarResources[rName], + nodeInfo.Requested.ScalarResources[rName], + nodeInfo.Allocatable.ScalarResources[rName], }) } } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/least_allocated.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/least_allocated.go index 1abf97bc678a..4c80b4cf8900 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/least_allocated.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/least_allocated.go @@ -21,11 +21,11 @@ import ( ) // leastResourceScorer favors nodes with fewer requested resources. -// It calculates the percentage of memory, CPU and other resources requested by pods scheduled on the node, and +// It calculates the percentage of memory and CPU requested by pods scheduled on the node, and // prioritizes based on the minimum of the average of the fraction of requested to capacity. // // Details: -// (cpu((capacity-requested)*MaxNodeScore*cpuWeight/capacity) + memory((capacity-requested)*MaxNodeScore*memoryWeight/capacity) + ...)/weightSum +// (cpu((capacity-sum(requested))*MaxNodeScore/capacity) + memory((capacity-sum(requested))*MaxNodeScore/capacity))/weightSum func leastResourceScorer(resToWeightMap resourceToWeightMap) func(resourceToValueMap, resourceToValueMap) int64 { return func(requested, allocable resourceToValueMap) int64 { var nodeScore, weightSum int64 diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/resource_allocation.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/resource_allocation.go index 48eadc88ff09..ff6e49b1d69e 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/resource_allocation.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/resource_allocation.go @@ -38,6 +38,8 @@ type resourceAllocationScorer struct { useRequested bool scorer func(requested, allocable resourceToValueMap) int64 resourceToWeightMap resourceToWeightMap + + enablePodOverhead bool } // resourceToValueMap is keyed with resource name and valued with quantity. @@ -67,10 +69,12 @@ func (r *resourceAllocationScorer) score( score := r.scorer(requested, allocatable) - klog.V(10).InfoS("Listing internal info for allocatable resources, requested resources and score", "pod", - klog.KObj(pod), "node", klog.KObj(node), "resourceAllocationScorer", r.Name, - "allocatableResource", allocatable, "requestedResource", requested, "resourceScore", score, - ) + if klog.V(10).Enabled() { + klog.InfoS("Listing internal info for allocatable resources, requested resources and score", "pod", + klog.KObj(pod), "node", klog.KObj(node), "resourceAllocationScorer", r.Name, + "allocatableResource", allocatable, "requestedResource", requested, "resourceScore", score, + ) + } return score, nil } @@ -103,7 +107,9 @@ func (r *resourceAllocationScorer) calculateResourceAllocatableRequest(nodeInfo return nodeInfo.Allocatable.ScalarResources[resource], (nodeInfo.Requested.ScalarResources[resource] + podRequest) } } - klog.V(10).InfoS("Requested resource is omitted for node score calculation", "resourceName", resource) + if klog.V(10).Enabled() { + klog.InfoS("Requested resource is omitted for node score calculation", "resourceName", resource) + } return 0, 0 } @@ -127,7 +133,7 @@ func (r *resourceAllocationScorer) calculatePodResourceRequest(pod *v1.Pod, reso } // If Overhead is being utilized, add to the total requests for the pod - if pod.Spec.Overhead != nil { + if pod.Spec.Overhead != nil && r.enablePodOverhead { if quantity, found := pod.Spec.Overhead[resource]; found { podRequest += quantity.Value() } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/test_util.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/test_util.go index 521d3c218d14..84058b108d75 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/test_util.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources/test_util.go @@ -28,7 +28,23 @@ var ( ignoreBadValueDetail = cmpopts.IgnoreFields(field.Error{}, "BadValue", "Detail") ) -func makeNode(node string, milliCPU, memory int64, extendedResource map[string]int64) *v1.Node { +func makeNode(node string, milliCPU, memory int64) *v1.Node { + return &v1.Node{ + ObjectMeta: metav1.ObjectMeta{Name: node}, + Status: v1.NodeStatus{ + Capacity: v1.ResourceList{ + v1.ResourceCPU: *resource.NewMilliQuantity(milliCPU, resource.DecimalSI), + v1.ResourceMemory: *resource.NewQuantity(memory, resource.BinarySI), + }, + Allocatable: v1.ResourceList{ + v1.ResourceCPU: *resource.NewMilliQuantity(milliCPU, resource.DecimalSI), + v1.ResourceMemory: *resource.NewQuantity(memory, resource.BinarySI), + }, + }, + } +} + +func makeNodeWithExtendedResource(node string, milliCPU, memory int64, extendedResource map[string]int64) *v1.Node { resourceList := make(map[v1.ResourceName]resource.Quantity) for res, quantity := range extendedResource { resourceList[v1.ResourceName(res)] = *resource.NewQuantity(quantity, resource.DecimalSI) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodevolumelimits/non_csi.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodevolumelimits/non_csi.go index 4a2535e5f26b..4297ddd1e41f 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodevolumelimits/non_csi.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodevolumelimits/non_csi.go @@ -416,8 +416,11 @@ var ebsVolumeFilter = VolumeFilter{ return "", false }, - MatchProvisioner: func(sc *storage.StorageClass) bool { - return sc.Provisioner == csilibplugins.AWSEBSInTreePluginName + MatchProvisioner: func(sc *storage.StorageClass) (relevant bool) { + if sc.Provisioner == csilibplugins.AWSEBSInTreePluginName { + return true + } + return false }, IsMigrated: func(csiNode *storage.CSINode) bool { @@ -441,8 +444,11 @@ var gcePDVolumeFilter = VolumeFilter{ return "", false }, - MatchProvisioner: func(sc *storage.StorageClass) bool { - return sc.Provisioner == csilibplugins.GCEPDInTreePluginName + MatchProvisioner: func(sc *storage.StorageClass) (relevant bool) { + if sc.Provisioner == csilibplugins.GCEPDInTreePluginName { + return true + } + return false }, IsMigrated: func(csiNode *storage.CSINode) bool { @@ -466,8 +472,11 @@ var azureDiskVolumeFilter = VolumeFilter{ return "", false }, - MatchProvisioner: func(sc *storage.StorageClass) bool { - return sc.Provisioner == csilibplugins.AzureDiskInTreePluginName + MatchProvisioner: func(sc *storage.StorageClass) (relevant bool) { + if sc.Provisioner == csilibplugins.AzureDiskInTreePluginName { + return true + } + return false }, IsMigrated: func(csiNode *storage.CSINode) bool { @@ -492,8 +501,11 @@ var cinderVolumeFilter = VolumeFilter{ return "", false }, - MatchProvisioner: func(sc *storage.StorageClass) bool { - return sc.Provisioner == csilibplugins.CinderInTreePluginName + MatchProvisioner: func(sc *storage.StorageClass) (relevant bool) { + if sc.Provisioner == csilibplugins.CinderInTreePluginName { + return true + } + return false }, IsMigrated: func(csiNode *storage.CSINode) bool { diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodevolumelimits/utils.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodevolumelimits/utils.go index 665f2cb2f7a9..6796c2129a9d 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodevolumelimits/utils.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodevolumelimits/utils.go @@ -60,7 +60,9 @@ func isCSIMigrationOn(csiNode *storagev1.CSINode, pluginName string) bool { return false } case csilibplugins.CinderInTreePluginName: - return true + if !utilfeature.DefaultFeatureGate.Enabled(features.CSIMigrationOpenStack) { + return false + } case csilibplugins.RBDVolumePluginName: if !utilfeature.DefaultFeatureGate.Enabled(features.CSIMigrationRBD) { return false diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/common.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/common.go index a6cefc89dccb..2c66b50d1f1e 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/common.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/common.go @@ -36,14 +36,13 @@ type topologySpreadConstraint struct { MaxSkew int32 TopologyKey string Selector labels.Selector - MinDomains int32 } // buildDefaultConstraints builds the constraints for a pod using // .DefaultConstraints and the selectors from the services, replication // controllers, replica sets and stateful sets that match the pod. func (pl *PodTopologySpread) buildDefaultConstraints(p *v1.Pod, action v1.UnsatisfiableConstraintAction) ([]topologySpreadConstraint, error) { - constraints, err := filterTopologySpreadConstraints(pl.defaultConstraints, action, pl.enableMinDomainsInPodTopologySpread) + constraints, err := filterTopologySpreadConstraints(pl.defaultConstraints, action) if err != nil || len(constraints) == 0 { return nil, err } @@ -67,7 +66,7 @@ func nodeLabelsMatchSpreadConstraints(nodeLabels map[string]string, constraints return true } -func filterTopologySpreadConstraints(constraints []v1.TopologySpreadConstraint, action v1.UnsatisfiableConstraintAction, enableMinDomainsInPodTopologySpread bool) ([]topologySpreadConstraint, error) { +func filterTopologySpreadConstraints(constraints []v1.TopologySpreadConstraint, action v1.UnsatisfiableConstraintAction) ([]topologySpreadConstraint, error) { var result []topologySpreadConstraint for _, c := range constraints { if c.WhenUnsatisfiable == action { @@ -75,16 +74,11 @@ func filterTopologySpreadConstraints(constraints []v1.TopologySpreadConstraint, if err != nil { return nil, err } - tsc := topologySpreadConstraint{ + result = append(result, topologySpreadConstraint{ MaxSkew: c.MaxSkew, TopologyKey: c.TopologyKey, Selector: selector, - MinDomains: 1, // if MinDomains is nil, we treat MinDomains as 1. - } - if enableMinDomainsInPodTopologySpread && c.MinDomains != nil { - tsc.MinDomains = *c.MinDomains - } - result = append(result, tsc) + }) } } return result, nil diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/filtering.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/filtering.go index 2b3580596e2a..e8a75b5e1863 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/filtering.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/filtering.go @@ -20,6 +20,7 @@ import ( "context" "fmt" "math" + "sync/atomic" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/labels" @@ -44,36 +45,8 @@ type preFilterState struct { // criticalPaths[1].MatchNum is always greater or equal to criticalPaths[0].MatchNum, but // it's not guaranteed to be the 2nd minimum match number. TpKeyToCriticalPaths map[string]*criticalPaths - // TpKeyToDomainsNum is keyed with topologyKey, and valued with the number of domains. - TpKeyToDomainsNum map[string]int // TpPairToMatchNum is keyed with topologyPair, and valued with the number of matching pods. - TpPairToMatchNum map[topologyPair]int -} - -// minMatchNum returns the global minimum for the calculation of skew while taking MinDomains into account. -func (s *preFilterState) minMatchNum(tpKey string, minDomains int32, enableMinDomainsInPodTopologySpread bool) (int, error) { - paths, ok := s.TpKeyToCriticalPaths[tpKey] - if !ok { - return 0, fmt.Errorf("failed to retrieve path by topology key") - } - - minMatchNum := paths[0].MatchNum - if !enableMinDomainsInPodTopologySpread { - return minMatchNum, nil - } - - domainsNum, ok := s.TpKeyToDomainsNum[tpKey] - if !ok { - return 0, fmt.Errorf("failed to retrieve the number of domains by topology key") - } - - if domainsNum < int(minDomains) { - // When the number of eligible domains with matching topology keys is less than `minDomains`, - // it treats "global minimum" as 0. - minMatchNum = 0 - } - - return minMatchNum, nil + TpPairToMatchNum map[topologyPair]*int32 } // Clone makes a copy of the given state. @@ -85,16 +58,15 @@ func (s *preFilterState) Clone() framework.StateData { // Constraints are shared because they don't change. Constraints: s.Constraints, TpKeyToCriticalPaths: make(map[string]*criticalPaths, len(s.TpKeyToCriticalPaths)), - // The number of domains does not change as a result of AddPod/RemovePod methods on PreFilter Extensions - TpKeyToDomainsNum: s.TpKeyToDomainsNum, - TpPairToMatchNum: make(map[topologyPair]int, len(s.TpPairToMatchNum)), + TpPairToMatchNum: make(map[topologyPair]*int32, len(s.TpPairToMatchNum)), } for tpKey, paths := range s.TpKeyToCriticalPaths { copy.TpKeyToCriticalPaths[tpKey] = &criticalPaths{paths[0], paths[1]} } for tpPair, matchNum := range s.TpPairToMatchNum { copyPair := topologyPair{key: tpPair.key, value: tpPair.value} - copy.TpPairToMatchNum[copyPair] = matchNum + copyCount := *matchNum + copy.TpPairToMatchNum[copyPair] = ©Count } return © } @@ -110,14 +82,14 @@ type criticalPaths [2]struct { // TopologyValue denotes the topology value mapping to topology key. TopologyValue string // MatchNum denotes the number of matching pods. - MatchNum int + MatchNum int32 } func newCriticalPaths() *criticalPaths { return &criticalPaths{{MatchNum: math.MaxInt32}, {MatchNum: math.MaxInt32}} } -func (p *criticalPaths) update(tpVal string, num int) { +func (p *criticalPaths) update(tpVal string, num int32) { // first verify if `tpVal` exists or not i := -1 if tpVal == p[0].TopologyValue { @@ -147,7 +119,7 @@ func (p *criticalPaths) update(tpVal string, num int) { } } -func (s *preFilterState) updateWithPod(updatedPod, preemptorPod *v1.Pod, node *v1.Node, delta int) { +func (s *preFilterState) updateWithPod(updatedPod, preemptorPod *v1.Pod, node *v1.Node, delta int32) { if s == nil || updatedPod.Namespace != preemptorPod.Namespace || node == nil { return } @@ -163,20 +135,20 @@ func (s *preFilterState) updateWithPod(updatedPod, preemptorPod *v1.Pod, node *v k, v := constraint.TopologyKey, node.Labels[constraint.TopologyKey] pair := topologyPair{key: k, value: v} - s.TpPairToMatchNum[pair] += delta + *s.TpPairToMatchNum[pair] += delta - s.TpKeyToCriticalPaths[k].update(v, s.TpPairToMatchNum[pair]) + s.TpKeyToCriticalPaths[k].update(v, *s.TpPairToMatchNum[pair]) } } // PreFilter invoked at the prefilter extension point. -func (pl *PodTopologySpread) PreFilter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod) (*framework.PreFilterResult, *framework.Status) { - s, err := pl.calPreFilterState(ctx, pod) +func (pl *PodTopologySpread) PreFilter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod) *framework.Status { + s, err := pl.calPreFilterState(pod) if err != nil { - return nil, framework.AsStatus(err) + return framework.AsStatus(err) } cycleState.Write(preFilterStateKey, s) - return nil, nil + return nil } // PreFilterExtensions returns prefilter extensions, pod add and remove. @@ -222,7 +194,7 @@ func getPreFilterState(cycleState *framework.CycleState) (*preFilterState, error } // calPreFilterState computes preFilterState describing how pods are spread on topologies. -func (pl *PodTopologySpread) calPreFilterState(ctx context.Context, pod *v1.Pod) (*preFilterState, error) { +func (pl *PodTopologySpread) calPreFilterState(pod *v1.Pod) (*preFilterState, error) { allNodes, err := pl.sharedLister.NodeInfos().List() if err != nil { return nil, fmt.Errorf("listing NodeInfos: %w", err) @@ -231,7 +203,7 @@ func (pl *PodTopologySpread) calPreFilterState(ctx context.Context, pod *v1.Pod) if len(pod.Spec.TopologySpreadConstraints) > 0 { // We have feature gating in APIServer to strip the spec // so don't need to re-check feature gate, just check length of Constraints. - constraints, err = filterTopologySpreadConstraints(pod.Spec.TopologySpreadConstraints, v1.DoNotSchedule, pl.enableMinDomainsInPodTopologySpread) + constraints, err = filterTopologySpreadConstraints(pod.Spec.TopologySpreadConstraints, v1.DoNotSchedule) if err != nil { return nil, fmt.Errorf("obtaining pod's hard topology spread constraints: %w", err) } @@ -248,51 +220,47 @@ func (pl *PodTopologySpread) calPreFilterState(ctx context.Context, pod *v1.Pod) s := preFilterState{ Constraints: constraints, TpKeyToCriticalPaths: make(map[string]*criticalPaths, len(constraints)), - TpPairToMatchNum: make(map[topologyPair]int, sizeHeuristic(len(allNodes), constraints)), + TpPairToMatchNum: make(map[topologyPair]*int32, sizeHeuristic(len(allNodes), constraints)), } - requiredSchedulingTerm := nodeaffinity.GetRequiredNodeAffinity(pod) - tpCountsByNode := make([]map[topologyPair]int, len(allNodes)) - processNode := func(i int) { - nodeInfo := allNodes[i] - node := nodeInfo.Node() + for _, n := range allNodes { + node := n.Node() if node == nil { klog.ErrorS(nil, "Node not found") - return + continue } // In accordance to design, if NodeAffinity or NodeSelector is defined, // spreading is applied to nodes that pass those filters. // Ignore parsing errors for backwards compatibility. match, _ := requiredSchedulingTerm.Match(node) if !match { - return + continue } // Ensure current node's labels contains all topologyKeys in 'Constraints'. if !nodeLabelsMatchSpreadConstraints(node.Labels, constraints) { - return + continue } - - tpCounts := make(map[topologyPair]int, len(constraints)) for _, c := range constraints { pair := topologyPair{key: c.TopologyKey, value: node.Labels[c.TopologyKey]} - count := countPodsMatchSelector(nodeInfo.Pods, c.Selector, pod.Namespace) - tpCounts[pair] = count + s.TpPairToMatchNum[pair] = new(int32) } - tpCountsByNode[i] = tpCounts } - pl.parallelizer.Until(ctx, len(allNodes), processNode) - for _, tpCounts := range tpCountsByNode { - for tp, count := range tpCounts { - s.TpPairToMatchNum[tp] += count - } - } - if pl.enableMinDomainsInPodTopologySpread { - s.TpKeyToDomainsNum = make(map[string]int, len(constraints)) - for tp := range s.TpPairToMatchNum { - s.TpKeyToDomainsNum[tp.key]++ + processNode := func(i int) { + nodeInfo := allNodes[i] + node := nodeInfo.Node() + + for _, constraint := range constraints { + pair := topologyPair{key: constraint.TopologyKey, value: node.Labels[constraint.TopologyKey]} + tpCount := s.TpPairToMatchNum[pair] + if tpCount == nil { + continue + } + count := countPodsMatchSelector(nodeInfo.Pods, constraint.Selector, pod.Namespace) + atomic.AddInt32(tpCount, int32(count)) } } + pl.parallelizer.Until(context.Background(), len(allNodes), processNode) // calculate min match for each topology pair for i := 0; i < len(constraints); i++ { @@ -300,7 +268,7 @@ func (pl *PodTopologySpread) calPreFilterState(ctx context.Context, pod *v1.Pod) s.TpKeyToCriticalPaths[key] = newCriticalPaths() } for pair, num := range s.TpPairToMatchNum { - s.TpKeyToCriticalPaths[pair.key].update(pair.value, num) + s.TpKeyToCriticalPaths[pair.key].update(pair.value, *num) } return &s, nil @@ -332,27 +300,27 @@ func (pl *PodTopologySpread) Filter(ctx context.Context, cycleState *framework.C return framework.NewStatus(framework.UnschedulableAndUnresolvable, ErrReasonNodeLabelNotMatch) } - selfMatchNum := 0 + selfMatchNum := int32(0) if c.Selector.Matches(podLabelSet) { selfMatchNum = 1 } pair := topologyPair{key: tpKey, value: tpVal} - - // judging criteria: - // 'existing matching num' + 'if self-match (1 or 0)' - 'global minimum' <= 'maxSkew' - minMatchNum, err := s.minMatchNum(tpKey, c.MinDomains, pl.enableMinDomainsInPodTopologySpread) - if err != nil { - klog.ErrorS(err, "Internal error occurred while retrieving value precalculated in PreFilter", "topologyKey", tpKey, "paths", s.TpKeyToCriticalPaths) + paths, ok := s.TpKeyToCriticalPaths[tpKey] + if !ok { + // error which should not happen + klog.ErrorS(nil, "Internal error occurred while retrieving paths from topology key", "topologyKey", tpKey, "paths", s.TpKeyToCriticalPaths) continue } - - matchNum := 0 - if tpCount, ok := s.TpPairToMatchNum[pair]; ok { - matchNum = tpCount + // judging criteria: + // 'existing matching num' + 'if self-match (1 or 0)' - 'global min matching num' <= 'maxSkew' + minMatchNum := paths[0].MatchNum + matchNum := int32(0) + if tpCount := s.TpPairToMatchNum[pair]; tpCount != nil { + matchNum = *tpCount } skew := matchNum + selfMatchNum - minMatchNum - if skew > int(c.MaxSkew) { + if skew > c.MaxSkew { klog.V(5).InfoS("Node failed spreadConstraint: matchNum + selfMatchNum - minMatchNum > maxSkew", "node", klog.KObj(node), "topologyKey", tpKey, "matchNum", matchNum, "selfMatchNum", selfMatchNum, "minMatchNum", minMatchNum, "maxSkew", c.MaxSkew) return framework.NewStatus(framework.Unschedulable, ErrReasonConstraintsNotMatch) } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/plugin.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/plugin.go index 2584bc89a2bf..568c1cc77ea5 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/plugin.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/plugin.go @@ -28,7 +28,6 @@ import ( "k8s.io/kubernetes/pkg/scheduler/apis/config/validation" "k8s.io/kubernetes/pkg/scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/framework/parallelize" - "k8s.io/kubernetes/pkg/scheduler/framework/plugins/feature" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/names" ) @@ -54,15 +53,14 @@ var systemDefaultConstraints = []v1.TopologySpreadConstraint{ // PodTopologySpread is a plugin that ensures pod's topologySpreadConstraints is satisfied. type PodTopologySpread struct { - systemDefaulted bool - parallelizer parallelize.Parallelizer - defaultConstraints []v1.TopologySpreadConstraint - sharedLister framework.SharedLister - services corelisters.ServiceLister - replicationCtrls corelisters.ReplicationControllerLister - replicaSets appslisters.ReplicaSetLister - statefulSets appslisters.StatefulSetLister - enableMinDomainsInPodTopologySpread bool + systemDefaulted bool + parallelizer parallelize.Parallelizer + defaultConstraints []v1.TopologySpreadConstraint + sharedLister framework.SharedLister + services corelisters.ServiceLister + replicationCtrls corelisters.ReplicationControllerLister + replicaSets appslisters.ReplicaSetLister + statefulSets appslisters.StatefulSetLister } var _ framework.PreFilterPlugin = &PodTopologySpread{} @@ -82,7 +80,7 @@ func (pl *PodTopologySpread) Name() string { } // New initializes a new plugin and returns it. -func New(plArgs runtime.Object, h framework.Handle, fts feature.Features) (framework.Plugin, error) { +func New(plArgs runtime.Object, h framework.Handle) (framework.Plugin, error) { if h.SnapshotSharedLister() == nil { return nil, fmt.Errorf("SnapshotSharedlister is nil") } @@ -94,10 +92,9 @@ func New(plArgs runtime.Object, h framework.Handle, fts feature.Features) (frame return nil, err } pl := &PodTopologySpread{ - parallelizer: h.Parallelizer(), - sharedLister: h.SnapshotSharedLister(), - defaultConstraints: args.DefaultConstraints, - enableMinDomainsInPodTopologySpread: fts.EnableMinDomainsInPodTopologySpread, + parallelizer: h.Parallelizer(), + sharedLister: h.SnapshotSharedLister(), + defaultConstraints: args.DefaultConstraints, } if args.DefaultingType == config.SystemDefaulting { pl.defaultConstraints = systemDefaultConstraints diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/scoring.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/scoring.go index 7b71f786b1d8..5bc938f028e5 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/scoring.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/podtopologyspread/scoring.go @@ -59,7 +59,7 @@ func (s *preScoreState) Clone() framework.StateData { func (pl *PodTopologySpread) initPreScoreState(s *preScoreState, pod *v1.Pod, filteredNodes []*v1.Node, requireAllTopologies bool) error { var err error if len(pod.Spec.TopologySpreadConstraints) > 0 { - s.Constraints, err = filterTopologySpreadConstraints(pod.Spec.TopologySpreadConstraints, v1.ScheduleAnyway, pl.enableMinDomainsInPodTopologySpread) + s.Constraints, err = filterTopologySpreadConstraints(pod.Spec.TopologySpreadConstraints, v1.ScheduleAnyway) if err != nil { return fmt.Errorf("obtaining pod's soft topology spread constraints: %w", err) } @@ -209,7 +209,7 @@ func (pl *PodTopologySpread) Score(ctx context.Context, cycleState *framework.Cy score += scoreForCount(cnt, c.MaxSkew, s.TopologyNormalizingWeight[i]) } } - return int64(math.Round(score)), nil + return int64(score), nil } // NormalizeScore invoked after scoring all nodes. diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/registry.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/registry.go index 330e0924d116..8f85ffb58a4b 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/registry.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/registry.go @@ -45,10 +45,12 @@ import ( // through the WithFrameworkOutOfTreeRegistry option. func NewInTreeRegistry() runtime.Registry { fts := plfeature.Features{ - EnablePodDisruptionBudget: feature.DefaultFeatureGate.Enabled(features.PodDisruptionBudget), - EnableReadWriteOncePod: feature.DefaultFeatureGate.Enabled(features.ReadWriteOncePod), - EnableVolumeCapacityPriority: feature.DefaultFeatureGate.Enabled(features.VolumeCapacityPriority), - EnableMinDomainsInPodTopologySpread: feature.DefaultFeatureGate.Enabled(features.MinDomainsInPodTopologySpread), + EnablePodAffinityNamespaceSelector: feature.DefaultFeatureGate.Enabled(features.PodAffinityNamespaceSelector), + EnablePodDisruptionBudget: feature.DefaultFeatureGate.Enabled(features.PodDisruptionBudget), + EnablePodOverhead: feature.DefaultFeatureGate.Enabled(features.PodOverhead), + EnableReadWriteOncePod: feature.DefaultFeatureGate.Enabled(features.ReadWriteOncePod), + EnableVolumeCapacityPriority: feature.DefaultFeatureGate.Enabled(features.VolumeCapacityPriority), + EnableCSIStorageCapacity: feature.DefaultFeatureGate.Enabled(features.CSIStorageCapacity), } return runtime.Registry{ @@ -58,9 +60,9 @@ func NewInTreeRegistry() runtime.Registry { nodename.Name: nodename.New, nodeports.Name: nodeports.New, nodeaffinity.Name: nodeaffinity.New, - podtopologyspread.Name: runtime.FactoryAdapter(fts, podtopologyspread.New), + podtopologyspread.Name: podtopologyspread.New, nodeunschedulable.Name: nodeunschedulable.New, - noderesources.Name: runtime.FactoryAdapter(fts, noderesources.NewFit), + noderesources.FitName: runtime.FactoryAdapter(fts, noderesources.NewFit), noderesources.BalancedAllocationName: runtime.FactoryAdapter(fts, noderesources.NewBalancedAllocation), volumebinding.Name: runtime.FactoryAdapter(fts, volumebinding.New), volumerestrictions.Name: runtime.FactoryAdapter(fts, volumerestrictions.New), @@ -70,7 +72,7 @@ func NewInTreeRegistry() runtime.Registry { nodevolumelimits.GCEPDName: runtime.FactoryAdapter(fts, nodevolumelimits.NewGCEPD), nodevolumelimits.AzureDiskName: runtime.FactoryAdapter(fts, nodevolumelimits.NewAzureDisk), nodevolumelimits.CinderName: runtime.FactoryAdapter(fts, nodevolumelimits.NewCinder), - interpodaffinity.Name: interpodaffinity.New, + interpodaffinity.Name: runtime.FactoryAdapter(fts, interpodaffinity.New), queuesort.Name: queuesort.New, defaultbinder.Name: defaultbinder.New, defaultpreemption.Name: runtime.FactoryAdapter(fts, defaultpreemption.New), diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/tainttoleration/taint_toleration.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/tainttoleration/taint_toleration.go index 9420c06c6ea0..6919b1bd2284 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/tainttoleration/taint_toleration.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/tainttoleration/taint_toleration.go @@ -56,7 +56,7 @@ func (pl *TaintToleration) Name() string { // failed by this plugin schedulable. func (pl *TaintToleration) EventsToRegister() []framework.ClusterEvent { return []framework.ClusterEvent{ - {Resource: framework.Node, ActionType: framework.Add | framework.Update}, + {Resource: framework.Node, ActionType: framework.Add | framework.UpdateNodeTaint}, } } @@ -76,7 +76,8 @@ func (pl *TaintToleration) Filter(ctx context.Context, state *framework.CycleSta return nil } - errReason := fmt.Sprintf("node(s) had untolerated taint {%s: %s}", taint.Key, taint.Value) + errReason := fmt.Sprintf("node(s) had taint {%s: %s}, that the pod didn't tolerate", + taint.Key, taint.Value) return framework.NewStatus(framework.UnschedulableAndUnresolvable, errReason) } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/OWNERS index be3245e85e1e..6c8519ca9ed4 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/OWNERS @@ -1,10 +1,11 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - sig-storage-approvers - - cofyc +- sig-storage-approvers +- cofyc reviewers: - - sig-storage-reviewers - - cofyc +- sig-storage-reviewers +- cofyc +- lichuqiang labels: - - sig/storage +- sig/storage diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/binder.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/binder.go index 14d6a85e8d37..ee4989be0b72 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/binder.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/binder.go @@ -25,6 +25,7 @@ import ( v1 "k8s.io/api/core/v1" storagev1 "k8s.io/api/storage/v1" + storagev1beta1 "k8s.io/api/storage/v1beta1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" @@ -34,17 +35,21 @@ import ( utilfeature "k8s.io/apiserver/pkg/util/feature" coreinformers "k8s.io/client-go/informers/core/v1" storageinformers "k8s.io/client-go/informers/storage/v1" + storageinformersv1beta1 "k8s.io/client-go/informers/storage/v1beta1" clientset "k8s.io/client-go/kubernetes" corelisters "k8s.io/client-go/listers/core/v1" storagelisters "k8s.io/client-go/listers/storage/v1" + storagelistersv1beta1 "k8s.io/client-go/listers/storage/v1beta1" "k8s.io/component-helpers/storage/ephemeral" - "k8s.io/component-helpers/storage/volume" + storagehelpers "k8s.io/component-helpers/storage/volume" csitrans "k8s.io/csi-translation-lib" csiplugins "k8s.io/csi-translation-lib/plugins" "k8s.io/klog/v2" v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" + pvutil "k8s.io/kubernetes/pkg/controller/volume/persistentvolume/util" "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/metrics" + volumeutil "k8s.io/kubernetes/pkg/volume/util" ) // ConflictReason is used for the special strings which explain why @@ -204,8 +209,9 @@ type volumeBinder struct { translator InTreeToCSITranslator + capacityCheckEnabled bool csiDriverLister storagelisters.CSIDriverLister - csiStorageCapacityLister storagelisters.CSIStorageCapacityLister + csiStorageCapacityLister storagelistersv1beta1.CSIStorageCapacityLister } // CapacityCheck contains additional parameters for NewVolumeBinder that @@ -213,12 +219,12 @@ type volumeBinder struct { // capacity is desired. type CapacityCheck struct { CSIDriverInformer storageinformers.CSIDriverInformer - CSIStorageCapacityInformer storageinformers.CSIStorageCapacityInformer + CSIStorageCapacityInformer storageinformersv1beta1.CSIStorageCapacityInformer } // NewVolumeBinder sets up all the caches needed for the scheduler to make volume binding decisions. // -// capacityCheck determines how storage capacity is checked (CSIStorageCapacity feature). +// capacityCheck determines whether storage capacity is checked (CSIStorageCapacity feature). func NewVolumeBinder( kubeClient clientset.Interface, podInformer coreinformers.PodInformer, @@ -227,7 +233,7 @@ func NewVolumeBinder( pvcInformer coreinformers.PersistentVolumeClaimInformer, pvInformer coreinformers.PersistentVolumeInformer, storageClassInformer storageinformers.StorageClassInformer, - capacityCheck CapacityCheck, + capacityCheck *CapacityCheck, bindTimeout time.Duration) SchedulerVolumeBinder { b := &volumeBinder{ kubeClient: kubeClient, @@ -241,8 +247,11 @@ func NewVolumeBinder( translator: csitrans.New(), } - b.csiDriverLister = capacityCheck.CSIDriverInformer.Lister() - b.csiStorageCapacityLister = capacityCheck.CSIStorageCapacityInformer.Lister() + if capacityCheck != nil { + b.capacityCheckEnabled = true + b.csiDriverLister = capacityCheck.CSIDriverInformer.Lister() + b.csiStorageCapacityLister = capacityCheck.CSIStorageCapacityInformer.Lister() + } return b } @@ -321,7 +330,7 @@ func (b *volumeBinder) FindPodVolumes(pod *v1.Pod, boundClaims, claimsToBind []* // Filter out claims to provision for _, claim := range claimsToBind { - if selectedNode, ok := claim.Annotations[volume.AnnSelectedNode]; ok { + if selectedNode, ok := claim.Annotations[pvutil.AnnSelectedNode]; ok { if selectedNode != node.Name { // Fast path, skip unmatched node. unboundVolumesSatisfied = false @@ -377,7 +386,7 @@ func (b *volumeBinder) AssumePodVolumes(assumedPod *v1.Pod, nodeName string, pod // Assume PV newBindings := []*BindingInfo{} for _, binding := range podVolumes.StaticBindings { - newPV, dirty, err := volume.GetBindVolumeToClaim(binding.pv, binding.pvc) + newPV, dirty, err := pvutil.GetBindVolumeToClaim(binding.pv, binding.pvc) klog.V(5).InfoS("AssumePodVolumes: GetBindVolumeToClaim", "pod", klog.KObj(assumedPod), "PV", klog.KObj(binding.pv), @@ -390,7 +399,7 @@ func (b *volumeBinder) AssumePodVolumes(assumedPod *v1.Pod, nodeName string, pod b.revertAssumedPVs(newBindings) return false, err } - // TODO: can we assume every time? + // TODO: can we assume everytime? if dirty { err = b.pvCache.Assume(newPV) if err != nil { @@ -407,7 +416,7 @@ func (b *volumeBinder) AssumePodVolumes(assumedPod *v1.Pod, nodeName string, pod // The claims from method args can be pointing to watcher cache. We must not // modify these, therefore create a copy. claimClone := claim.DeepCopy() - metav1.SetMetaDataAnnotation(&claimClone.ObjectMeta, volume.AnnSelectedNode, nodeName) + metav1.SetMetaDataAnnotation(&claimClone.ObjectMeta, pvutil.AnnSelectedNode, nodeName) err = b.pvcCache.Assume(claimClone) if err != nil { b.revertAssumedPVs(newBindings) @@ -599,7 +608,7 @@ func (b *volumeBinder) checkBindings(pod *v1.Pod, bindings []*BindingInfo, claim } // Check PV's node affinity (the node might not have the proper label) - if err := volume.CheckNodeAffinity(pv, node.Labels); err != nil { + if err := volumeutil.CheckNodeAffinity(pv, node.Labels); err != nil { return false, fmt.Errorf("pv %q node affinity doesn't match node %q: %w", pv.Name, node.Name, err) } @@ -630,7 +639,7 @@ func (b *volumeBinder) checkBindings(pod *v1.Pod, bindings []*BindingInfo, claim if pvc.Annotations == nil { return false, fmt.Errorf("selectedNode annotation reset for PVC %q", pvc.Name) } - selectedNode := pvc.Annotations[volume.AnnSelectedNode] + selectedNode := pvc.Annotations[pvutil.AnnSelectedNode] if selectedNode != pod.Spec.NodeName { // If provisioner fails to provision a volume, selectedNode // annotation will be removed to signal back to the scheduler to @@ -657,7 +666,7 @@ func (b *volumeBinder) checkBindings(pod *v1.Pod, bindings []*BindingInfo, claim return false, err } - if err := volume.CheckNodeAffinity(pv, node.Labels); err != nil { + if err := volumeutil.CheckNodeAffinity(pv, node.Labels); err != nil { return false, fmt.Errorf("pv %q node affinity doesn't match node %q: %w", pv.Name, node.Name, err) } } @@ -725,7 +734,7 @@ func (b *volumeBinder) isPVCBound(namespace, pvcName string) (bool, *v1.Persiste } func (b *volumeBinder) isPVCFullyBound(pvc *v1.PersistentVolumeClaim) bool { - return pvc.Spec.VolumeName != "" && metav1.HasAnnotation(pvc.ObjectMeta, volume.AnnBindCompleted) + return pvc.Spec.VolumeName != "" && metav1.HasAnnotation(pvc.ObjectMeta, pvutil.AnnBindCompleted) } // arePodVolumesBound returns true if all volumes are fully bound @@ -757,7 +766,7 @@ func (b *volumeBinder) GetPodVolumes(pod *v1.Pod) (boundClaims []*v1.PersistentV if volumeBound { boundClaims = append(boundClaims, pvc) } else { - delayBindingMode, err := volume.IsDelayBindingMode(pvc, b.classLister) + delayBindingMode, err := pvutil.IsDelayBindingMode(pvc, b.classLister) if err != nil { return nil, nil, nil, err } @@ -797,7 +806,7 @@ func (b *volumeBinder) checkBoundClaims(claims []*v1.PersistentVolumeClaim, node return false, true, err } - err = volume.CheckNodeAffinity(pv, node.Labels) + err = volumeutil.CheckNodeAffinity(pv, node.Labels) if err != nil { klog.V(4).InfoS("PersistentVolume and node mismatch for pod", "PV", klog.KRef("", pvName), "node", klog.KObj(node), "pod", klog.KObj(pod), "err", err) return false, true, nil @@ -821,11 +830,11 @@ func (b *volumeBinder) findMatchingVolumes(pod *v1.Pod, claimsToBind []*v1.Persi for _, pvc := range claimsToBind { // Get storage class name from each PVC - storageClassName := volume.GetPersistentVolumeClaimClass(pvc) + storageClassName := storagehelpers.GetPersistentVolumeClaimClass(pvc) allPVs := b.pvCache.ListPVs(storageClassName) // Find a matching PV - pv, err := volume.FindMatchingVolume(pvc, allPVs, node, chosenPVs, true) + pv, err := pvutil.FindMatchingVolume(pvc, allPVs, node, chosenPVs, true) if err != nil { return false, nil, nil, err } @@ -859,7 +868,7 @@ func (b *volumeBinder) checkVolumeProvisions(pod *v1.Pod, claimsToProvision []*v // fails or we encounter an error. for _, claim := range claimsToProvision { pvcName := getPVCName(claim) - className := volume.GetPersistentVolumeClaimClass(claim) + className := storagehelpers.GetPersistentVolumeClaimClass(claim) if className == "" { return false, false, nil, fmt.Errorf("no class for claim %q", pvcName) } @@ -869,7 +878,7 @@ func (b *volumeBinder) checkVolumeProvisions(pod *v1.Pod, claimsToProvision []*v return false, false, nil, fmt.Errorf("failed to find storage class %q", className) } provisioner := class.Provisioner - if provisioner == "" || provisioner == volume.NotSupportedProvisioner { + if provisioner == "" || provisioner == pvutil.NotSupportedProvisioner { klog.V(4).InfoS("Storage class of claim does not support dynamic provisioning", "storageClassName", className, "PVC", klog.KObj(claim)) return false, true, nil, nil } @@ -913,6 +922,12 @@ func (b *volumeBinder) revertAssumedPVCs(claims []*v1.PersistentVolumeClaim) { // hasEnoughCapacity checks whether the provisioner has enough capacity left for a new volume of the given size // that is available from the node. func (b *volumeBinder) hasEnoughCapacity(provisioner string, claim *v1.PersistentVolumeClaim, storageClass *storagev1.StorageClass, node *v1.Node) (bool, error) { + // This is an optional feature. If disabled, we assume that + // there is enough storage. + if !b.capacityCheckEnabled { + return true, nil + } + quantity, ok := claim.Spec.Resources.Requests[v1.ResourceStorage] if !ok { // No capacity to check for. @@ -958,7 +973,7 @@ func (b *volumeBinder) hasEnoughCapacity(provisioner string, claim *v1.Persisten return false, nil } -func capacitySufficient(capacity *storagev1.CSIStorageCapacity, sizeInBytes int64) bool { +func capacitySufficient(capacity *storagev1beta1.CSIStorageCapacity, sizeInBytes int64) bool { limit := capacity.Capacity if capacity.MaximumVolumeSize != nil { // Prefer MaximumVolumeSize if available, it is more precise. @@ -967,7 +982,7 @@ func capacitySufficient(capacity *storagev1.CSIStorageCapacity, sizeInBytes int6 return limit != nil && limit.Value() >= sizeInBytes } -func (b *volumeBinder) nodeHasAccess(node *v1.Node, capacity *storagev1.CSIStorageCapacity) bool { +func (b *volumeBinder) nodeHasAccess(node *v1.Node, capacity *storagev1beta1.CSIStorageCapacity) bool { if capacity.NodeTopology == nil { // Unavailable return false @@ -975,6 +990,7 @@ func (b *volumeBinder) nodeHasAccess(node *v1.Node, capacity *storagev1.CSIStora // Only matching by label is supported. selector, err := metav1.LabelSelectorAsSelector(capacity.NodeTopology) if err != nil { + // This should never happen because NodeTopology must be valid. klog.ErrorS(err, "Unexpected error converting to a label selector", "nodeTopology", capacity.NodeTopology) return false } @@ -1008,7 +1024,7 @@ func isCSIMigrationOnForPlugin(pluginName string) bool { case csiplugins.AzureDiskInTreePluginName: return utilfeature.DefaultFeatureGate.Enabled(features.CSIMigrationAzureDisk) case csiplugins.CinderInTreePluginName: - return true + return utilfeature.DefaultFeatureGate.Enabled(features.CSIMigrationOpenStack) case csiplugins.PortworxVolumePluginName: return utilfeature.DefaultFeatureGate.Enabled(features.CSIMigrationPortworx) case csiplugins.RBDVolumePluginName: diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/test_utils.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/test_utils.go index 448410944811..ff759d3d8c58 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/test_utils.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/test_utils.go @@ -22,7 +22,7 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/component-helpers/storage/volume" + pvutil "k8s.io/kubernetes/pkg/controller/volume/persistentvolume/util" "k8s.io/utils/pointer" ) @@ -122,7 +122,7 @@ func makePVC(name string, storageClassName string) pvcBuilder { func (pvcb pvcBuilder) withBoundPV(pvName string) pvcBuilder { pvcb.PersistentVolumeClaim.Spec.VolumeName = pvName - metav1.SetMetaDataAnnotation(&pvcb.PersistentVolumeClaim.ObjectMeta, volume.AnnBindCompleted, "true") + metav1.SetMetaDataAnnotation(&pvcb.PersistentVolumeClaim.ObjectMeta, pvutil.AnnBindCompleted, "true") return pvcb } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/volume_binding.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/volume_binding.go index 48ee01dea4eb..34bfb0773bc4 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/volume_binding.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/volume_binding.go @@ -107,10 +107,14 @@ func (pl *VolumeBinding) EventsToRegister() []framework.ClusterEvent { {Resource: framework.Node, ActionType: framework.Add | framework.UpdateNodeLabel}, // We rely on CSI node to translate in-tree PV to CSI. {Resource: framework.CSINode, ActionType: framework.Add | framework.Update}, + } + if pl.fts.EnableCSIStorageCapacity { // When CSIStorageCapacity is enabled, pods may become schedulable // on CSI driver & storage capacity changes. - {Resource: framework.CSIDriver, ActionType: framework.Add | framework.Update}, - {Resource: framework.CSIStorageCapacity, ActionType: framework.Add | framework.Update}, + events = append(events, []framework.ClusterEvent{ + {Resource: framework.CSIDriver, ActionType: framework.Add | framework.Update}, + {Resource: framework.CSIStorageCapacity, ActionType: framework.Add | framework.Update}, + }...) } return events } @@ -165,17 +169,17 @@ func (pl *VolumeBinding) podHasPVCs(pod *v1.Pod) (bool, error) { // PreFilter invoked at the prefilter extension point to check if pod has all // immediate PVCs bound. If not all immediate PVCs are bound, an // UnschedulableAndUnresolvable is returned. -func (pl *VolumeBinding) PreFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod) (*framework.PreFilterResult, *framework.Status) { +func (pl *VolumeBinding) PreFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod) *framework.Status { // If pod does not reference any PVC, we don't need to do anything. if hasPVC, err := pl.podHasPVCs(pod); err != nil { - return nil, framework.NewStatus(framework.UnschedulableAndUnresolvable, err.Error()) + return framework.NewStatus(framework.UnschedulableAndUnresolvable, err.Error()) } else if !hasPVC { state.Write(stateKey, &stateData{skip: true}) - return nil, nil + return nil } boundClaims, claimsToBind, unboundClaimsImmediate, err := pl.Binder.GetPodVolumes(pod) if err != nil { - return nil, framework.AsStatus(err) + return framework.AsStatus(err) } if len(unboundClaimsImmediate) > 0 { // Return UnschedulableAndUnresolvable error if immediate claims are @@ -183,10 +187,10 @@ func (pl *VolumeBinding) PreFilter(ctx context.Context, state *framework.CycleSt // claims are bound by PV controller. status := framework.NewStatus(framework.UnschedulableAndUnresolvable) status.AppendReason("pod has unbound immediate PersistentVolumeClaims") - return nil, status + return status } state.Write(stateKey, &stateData{boundClaims: boundClaims, claimsToBind: claimsToBind, podVolumesByNode: make(map[string]*PodVolumes)}) - return nil, nil + return nil } // PreFilterExtensions returns prefilter extensions, pod add and remove. @@ -375,9 +379,12 @@ func New(plArgs runtime.Object, fh framework.Handle, fts feature.Features) (fram pvInformer := fh.SharedInformerFactory().Core().V1().PersistentVolumes() storageClassInformer := fh.SharedInformerFactory().Storage().V1().StorageClasses() csiNodeInformer := fh.SharedInformerFactory().Storage().V1().CSINodes() - capacityCheck := CapacityCheck{ - CSIDriverInformer: fh.SharedInformerFactory().Storage().V1().CSIDrivers(), - CSIStorageCapacityInformer: fh.SharedInformerFactory().Storage().V1().CSIStorageCapacities(), + var capacityCheck *CapacityCheck + if fts.EnableCSIStorageCapacity { + capacityCheck = &CapacityCheck{ + CSIDriverInformer: fh.SharedInformerFactory().Storage().V1().CSIDrivers(), + CSIStorageCapacityInformer: fh.SharedInformerFactory().Storage().V1beta1().CSIStorageCapacities(), + } } binder := NewVolumeBinder(fh.ClientSet(), podInformer, nodeInformer, csiNodeInformer, pvcInformer, pvInformer, storageClassInformer, capacityCheck, time.Duration(args.BindTimeoutSeconds)*time.Second) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumerestrictions/volume_restrictions.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumerestrictions/volume_restrictions.go index 8b683b19d486..4bc94fcdd259 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumerestrictions/volume_restrictions.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumerestrictions/volume_restrictions.go @@ -120,18 +120,18 @@ func haveOverlap(a1, a2 []string) bool { return false } -func (pl *VolumeRestrictions) PreFilter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod) (*framework.PreFilterResult, *framework.Status) { +func (pl *VolumeRestrictions) PreFilter(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod) *framework.Status { if pl.enableReadWriteOncePod { - return nil, pl.isReadWriteOncePodAccessModeConflict(ctx, pod) + return pl.isReadWriteOncePodAccessModeConflict(pod) } - return nil, framework.NewStatus(framework.Success) + return framework.NewStatus(framework.Success) } // isReadWriteOncePodAccessModeConflict checks if a pod uses a PVC with the ReadWriteOncePod access mode. // This access mode restricts volume access to a single pod on a single node. Since only a single pod can // use a ReadWriteOncePod PVC, mark any other pods attempting to use this PVC as UnschedulableAndUnresolvable. // TODO(#103132): Mark pod as Unschedulable and add preemption logic. -func (pl *VolumeRestrictions) isReadWriteOncePodAccessModeConflict(ctx context.Context, pod *v1.Pod) *framework.Status { +func (pl *VolumeRestrictions) isReadWriteOncePodAccessModeConflict(pod *v1.Pod) *framework.Status { nodeInfos, err := pl.nodeInfoLister.NodeInfos().List() if err != nil { return framework.NewStatus(framework.Error, "error while getting node info") @@ -159,7 +159,7 @@ func (pl *VolumeRestrictions) isReadWriteOncePodAccessModeConflict(ctx context.C pvcKeys = append(pvcKeys, key) } - subCtx, cancel := context.WithCancel(ctx) + ctx, cancel := context.WithCancel(context.Background()) var conflicts uint32 processNode := func(i int) { @@ -172,7 +172,7 @@ func (pl *VolumeRestrictions) isReadWriteOncePodAccessModeConflict(ctx context.C } } } - pl.parallelizer.Until(subCtx, len(nodeInfos), processNode) + pl.parallelizer.Until(ctx, len(nodeInfos), processNode) // Enforce ReadWriteOncePod access mode. This is also enforced during volume mount in kubelet. if conflicts > 0 { diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/preemption/preemption.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/preemption/preemption.go index 9b9f4bebfa88..2a516bf21b56 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/preemption/preemption.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/preemption/preemption.go @@ -104,9 +104,9 @@ type Interface interface { GetOffsetAndNumCandidates(nodes int32) (int32, int32) // CandidatesToVictimsMap builds a map from the target node to a list of to-be-preempted Pods and the number of PDB violation. CandidatesToVictimsMap(candidates []Candidate) map[string]*extenderv1.Victims - // PodEligibleToPreemptOthers returns one bool and one string. The bool indicates whether this pod should be considered for - // preempting other pods or not. The string includes the reason if this pod isn't eligible. - PodEligibleToPreemptOthers(pod *v1.Pod, nominatedNodeStatus *framework.Status) (bool, string) + // PodEligibleToPreemptOthers determines whether this pod should be considered + // for preempting other pods or not. + PodEligibleToPreemptOthers(pod *v1.Pod, nominatedNodeStatus *framework.Status) bool // SelectVictimsOnNode finds minimum set of pods on the given node that should be preempted in order to make enough room // for "pod" to be scheduled. // Note that both `state` and `nodeInfo` are deep copied. @@ -123,19 +123,8 @@ type Evaluator struct { Interface } -// Preempt returns a PostFilterResult carrying suggested nominatedNodeName, along with a Status. -// The semantics of returned varies on different scenarios: -// - . This denotes it's a transient/rare error that may be self-healed in future cycles. -// - . This status is mostly as expected like the preemptor is waiting for the -// victims to be fully terminated. -// - In both cases above, a nil PostFilterResult is returned to keep the pod's nominatedNodeName unchanged. -// -// - . It indicates the pod cannot be scheduled even with preemption. -// In this case, a non-nil PostFilterResult is returned and result.NominatingMode instructs how to deal with -// the nominatedNodeName. -// - . It's the regular happy path -// and the non-empty nominatedNodeName will be applied to the preemptor pod. func (ev *Evaluator) Preempt(ctx context.Context, pod *v1.Pod, m framework.NodeToStatusMap) (*framework.PostFilterResult, *framework.Status) { + // 0) Fetch the latest version of . // It's safe to directly fetch pod here. Because the informer cache has already been // initialized when creating the Scheduler obj, i.e., factory.go#MakeDefaultErrorFunc(). @@ -148,9 +137,9 @@ func (ev *Evaluator) Preempt(ctx context.Context, pod *v1.Pod, m framework.NodeT } // 1) Ensure the preemptor is eligible to preempt other pods. - if ok, msg := ev.PodEligibleToPreemptOthers(pod, m[pod.Status.NominatedNodeName]); !ok { - klog.V(5).InfoS("Pod is not eligible for preemption", "pod", klog.KObj(pod), "reason", msg) - return nil, framework.NewStatus(framework.Unschedulable, msg) + if !ev.PodEligibleToPreemptOthers(pod, m[pod.Status.NominatedNodeName]) { + klog.V(5).InfoS("Pod is not eligible for more preemption", "pod", klog.KObj(pod)) + return nil, framework.NewStatus(framework.Unschedulable) } // 2) Find all preemption candidates. @@ -169,8 +158,7 @@ func (ev *Evaluator) Preempt(ctx context.Context, pod *v1.Pod, m framework.NodeT // Leave FailedPlugins as nil as it won't be used on moving Pods. }, } - // Specify nominatedNodeName to clear the pod's nominatedNodeName status, if applicable. - return framework.NewPostFilterResultWithNominatedNode(""), framework.NewStatus(framework.Unschedulable, fitError.Error()) + return nil, framework.NewStatus(framework.Unschedulable, fitError.Error()) } // 3) Interact with registered Extenders to filter out some candidates if needed. @@ -182,7 +170,7 @@ func (ev *Evaluator) Preempt(ctx context.Context, pod *v1.Pod, m framework.NodeT // 4) Find the best candidate. bestCandidate := ev.SelectCandidate(candidates) if bestCandidate == nil || len(bestCandidate.Name()) == 0 { - return nil, framework.NewStatus(framework.Unschedulable, "no candidate node for preemption") + return nil, framework.NewStatus(framework.Unschedulable) } // 5) Perform preparation work before nominating the selected candidate. @@ -190,7 +178,7 @@ func (ev *Evaluator) Preempt(ctx context.Context, pod *v1.Pod, m framework.NodeT return nil, status } - return framework.NewPostFilterResultWithNominatedNode(bestCandidate.Name()), framework.NewStatus(framework.Success) + return &framework.PostFilterResult{NominatedNodeName: bestCandidate.Name()}, framework.NewStatus(framework.Success) } // FindCandidates calculates a slice of preemption candidates. @@ -220,12 +208,12 @@ func (ev *Evaluator) findCandidates(ctx context.Context, pod *v1.Pod, m framewor } offset, numCandidates := ev.GetOffsetAndNumCandidates(int32(len(potentialNodes))) - if klogV := klog.V(5); klogV.Enabled() { + if klog.V(5).Enabled() { var sample []string for i := offset; i < offset+10 && i < int32(len(potentialNodes)); i++ { sample = append(sample, potentialNodes[i].Node().Name) } - klogV.InfoS("Selecting candidates from a pool of nodes", "potentialNodesCount", len(potentialNodes), "offset", offset, "sampleLength", len(sample), "sample", sample, "candidates", numCandidates) + klog.InfoS("Selecting candidates from a pool of nodes", "potentialNodesCount", len(potentialNodes), "offset", offset, "sampleLength", len(sample), "sample", sample, "candidates", numCandidates) } candidates, nodeStatuses, err := ev.DryRunPreemption(ctx, pod, potentialNodes, pdbs, offset, numCandidates) for node, nodeStatus := range unschedulableNodeStatus { diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/runtime/framework.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/runtime/framework.go index 1c4793dd28d6..477f7e9f70c5 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/runtime/framework.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/runtime/framework.go @@ -99,6 +99,10 @@ type frameworkImpl struct { framework.PodNominator parallelizer parallelize.Parallelizer + + // Indicates that RunFilterPlugins should accumulate all failed statuses and not return + // after the first failure. + runAllFilters bool } // extensionPoint encapsulates desired and applied set of plugins at a specific extension @@ -143,6 +147,7 @@ type frameworkOptions struct { metricsRecorder *metricsRecorder podNominator framework.PodNominator extenders []framework.Extender + runAllFilters bool captureProfile CaptureProfile clusterEventMap map[framework.ClusterEvent]sets.String parallelizer parallelize.Parallelizer @@ -196,6 +201,14 @@ func WithSnapshotSharedLister(snapshotSharedLister framework.SharedLister) Optio } } +// WithRunAllFilters sets the runAllFilters flag, which means RunFilterPlugins accumulates +// all failure Statuses. +func WithRunAllFilters(runAllFilters bool) Option { + return func(o *frameworkOptions) { + o.runAllFilters = runAllFilters + } +} + // WithPodNominator sets podNominator for the scheduling frameworkImpl. func WithPodNominator(nominator framework.PodNominator) Option { return func(o *frameworkOptions) { @@ -261,6 +274,7 @@ func NewFramework(r Registry, profile *config.KubeSchedulerProfile, opts ...Opti eventRecorder: options.eventRecorder, informerFactory: options.informerFactory, metricsRecorder: options.metricsRecorder, + runAllFilters: options.runAllFilters, extenders: options.extenders, PodNominator: options.podNominator, parallelizer: options.parallelizer, @@ -403,37 +417,6 @@ func getScoreWeights(f *frameworkImpl, pluginsMap map[string]framework.Plugin, p return nil } -type orderedSet struct { - set map[string]int - list []string - deletionCnt int -} - -func newOrderedSet() *orderedSet { - return &orderedSet{set: make(map[string]int)} -} - -func (os *orderedSet) insert(s string) { - if os.has(s) { - return - } - os.set[s] = len(os.list) - os.list = append(os.list, s) -} - -func (os *orderedSet) has(s string) bool { - _, found := os.set[s] - return found -} - -func (os *orderedSet) delete(s string) { - if i, found := os.set[s]; found { - delete(os.set, s) - os.list = append(os.list[:i-os.deletionCnt], os.list[i+1-os.deletionCnt:]...) - os.deletionCnt++ - } -} - func (f *frameworkImpl) expandMultiPointPlugins(profile *config.KubeSchedulerProfile, pluginsMap map[string]framework.Plugin) error { // initialize MultiPoint plugins for _, e := range f.getExtensionPoints(profile.Plugins) { @@ -441,9 +424,9 @@ func (f *frameworkImpl) expandMultiPointPlugins(profile *config.KubeSchedulerPro pluginType := plugins.Type().Elem() // build enabledSet of plugins already registered via normal extension points // to check double registration - enabledSet := newOrderedSet() + enabledSet := sets.NewString() for _, plugin := range e.plugins.Enabled { - enabledSet.insert(plugin.Name) + enabledSet.Insert(plugin.Name) } disabledSet := sets.NewString() @@ -457,8 +440,8 @@ func (f *frameworkImpl) expandMultiPointPlugins(profile *config.KubeSchedulerPro // track plugins enabled via multipoint separately from those enabled by specific extensions, // so that we can distinguish between double-registration and explicit overrides - multiPointEnabled := newOrderedSet() - overridePlugins := newOrderedSet() + multiPointEnabled := sets.NewString() + for _, ep := range profile.Plugins.MultiPoint.Enabled { pg, ok := pluginsMap[ep.Name] if !ok { @@ -480,43 +463,23 @@ func (f *frameworkImpl) expandMultiPointPlugins(profile *config.KubeSchedulerPro // the user intent is to override the default plugin or make some other explicit setting. // Either way, discard the MultiPoint value for this plugin. // This maintains expected behavior for overriding default plugins (see https://github.com/kubernetes/kubernetes/pull/99582) - if enabledSet.has(ep.Name) { - overridePlugins.insert(ep.Name) + if enabledSet.Has(ep.Name) { klog.InfoS("MultiPoint plugin is explicitly re-configured; overriding", "plugin", ep.Name) continue } // if this plugin is already registered via MultiPoint, then this is // a double registration and an error in the config. - if multiPointEnabled.has(ep.Name) { + if multiPointEnabled.Has(ep.Name) { return fmt.Errorf("plugin %q already registered as %q", ep.Name, pluginType.Name()) } // we only need to update the multipoint set, since we already have the specific extension set from above - multiPointEnabled.insert(ep.Name) - } + multiPointEnabled.Insert(ep.Name) - // Reorder plugins. Here is the expected order: - // - part 1: overridePlugins. Their order stay intact as how they're specified in regular extension point. - // - part 2: multiPointEnabled - i.e., plugin defined in multipoint but not in regular extension point. - // - part 3: other plugins (excluded by part 1 & 2) in regular extension point. - newPlugins := reflect.New(reflect.TypeOf(e.slicePtr).Elem()).Elem() - // part 1 - for _, name := range enabledSet.list { - if overridePlugins.has(name) { - newPlugins = reflect.Append(newPlugins, reflect.ValueOf(pluginsMap[name])) - enabledSet.delete(name) - } - } - // part 2 - for _, name := range multiPointEnabled.list { - newPlugins = reflect.Append(newPlugins, reflect.ValueOf(pluginsMap[name])) + newPlugins := reflect.Append(plugins, reflect.ValueOf(pg)) + plugins.Set(newPlugins) } - // part 3 - for _, name := range enabledSet.list { - newPlugins = reflect.Append(newPlugins, reflect.ValueOf(pluginsMap[name])) - } - plugins.Set(newPlugins) } return nil } @@ -598,46 +561,33 @@ func (f *frameworkImpl) QueueSortFunc() framework.LessFunc { // *Status and its code is set to non-success if any of the plugins returns // anything but Success. If a non-success status is returned, then the scheduling // cycle is aborted. -func (f *frameworkImpl) RunPreFilterPlugins(ctx context.Context, state *framework.CycleState, pod *v1.Pod) (_ *framework.PreFilterResult, status *framework.Status) { +func (f *frameworkImpl) RunPreFilterPlugins(ctx context.Context, state *framework.CycleState, pod *v1.Pod) (status *framework.Status) { startTime := time.Now() defer func() { metrics.FrameworkExtensionPointDuration.WithLabelValues(preFilter, status.Code().String(), f.profileName).Observe(metrics.SinceInSeconds(startTime)) }() - var result *framework.PreFilterResult - var pluginsWithNodes []string for _, pl := range f.preFilterPlugins { - r, s := f.runPreFilterPlugin(ctx, pl, state, pod) - if !s.IsSuccess() { - s.SetFailedPlugin(pl.Name()) - if s.IsUnschedulable() { - return nil, s - } - return nil, framework.AsStatus(fmt.Errorf("running PreFilter plugin %q: %w", pl.Name(), status.AsError())).WithFailedPlugin(pl.Name()) - } - if !r.AllNodes() { - pluginsWithNodes = append(pluginsWithNodes, pl.Name()) - } - result = result.Merge(r) - if !result.AllNodes() && len(result.NodeNames) == 0 { - msg := fmt.Sprintf("node(s) didn't satisfy plugin(s) %v simultaneously", pluginsWithNodes) - if len(pluginsWithNodes) == 1 { - msg = fmt.Sprintf("node(s) didn't satisfy plugin %v", pluginsWithNodes[0]) + status = f.runPreFilterPlugin(ctx, pl, state, pod) + if !status.IsSuccess() { + status.SetFailedPlugin(pl.Name()) + if status.IsUnschedulable() { + return status } - return nil, framework.NewStatus(framework.Unschedulable, msg) + return framework.AsStatus(fmt.Errorf("running PreFilter plugin %q: %w", pl.Name(), status.AsError())).WithFailedPlugin(pl.Name()) } - } - return result, nil + + return nil } -func (f *frameworkImpl) runPreFilterPlugin(ctx context.Context, pl framework.PreFilterPlugin, state *framework.CycleState, pod *v1.Pod) (*framework.PreFilterResult, *framework.Status) { +func (f *frameworkImpl) runPreFilterPlugin(ctx context.Context, pl framework.PreFilterPlugin, state *framework.CycleState, pod *v1.Pod) *framework.Status { if !state.ShouldRecordPluginMetrics() { return pl.PreFilter(ctx, state, pod) } startTime := time.Now() - result, status := pl.PreFilter(ctx, state, pod) + status := pl.PreFilter(ctx, state, pod) f.metricsRecorder.observePluginDurationAsync(preFilter, pl.Name(), status, metrics.SinceInSeconds(startTime)) - return result, status + return status } // RunPreFilterExtensionAddPod calls the AddPod interface for the set of configured @@ -732,6 +682,10 @@ func (f *frameworkImpl) RunFilterPlugins( } pluginStatus.SetFailedPlugin(pl.Name()) statuses[pl.Name()] = pluginStatus + if !f.runAllFilters { + // Exit early if we don't need to run all filters. + return statuses + } } } @@ -757,8 +711,6 @@ func (f *frameworkImpl) RunPostFilterPlugins(ctx context.Context, state *framewo }() statuses := make(framework.PluginToStatus) - // `result` records the last meaningful(non-noop) PostFilterResult. - var result *framework.PostFilterResult for _, pl := range f.postFilterPlugins { r, s := f.runPostFilterPlugin(ctx, pl, state, pod, filteredNodeStatusMap) if s.IsSuccess() { @@ -766,13 +718,11 @@ func (f *frameworkImpl) RunPostFilterPlugins(ctx context.Context, state *framewo } else if !s.IsUnschedulable() { // Any status other than Success or Unschedulable is Error. return nil, framework.AsStatus(s.AsError()) - } else if r != nil && r.Mode() != framework.ModeNoop { - result = r } statuses[pl.Name()] = s } - return result, statuses.Merge() + return nil, statuses.Merge() } func (f *frameworkImpl) runPostFilterPlugin(ctx context.Context, pl framework.PostFilterPlugin, state *framework.CycleState, pod *v1.Pod, filteredNodeStatusMap framework.NodeToStatusMap) (*framework.PostFilterResult, *framework.Status) { @@ -1309,26 +1259,25 @@ func (f *frameworkImpl) SharedInformerFactory() informers.SharedInformerFactory return f.informerFactory } -func (f *frameworkImpl) pluginsNeeded(plugins *config.Plugins) sets.String { - pgSet := sets.String{} +func (f *frameworkImpl) pluginsNeeded(plugins *config.Plugins) map[string]config.Plugin { + pgMap := make(map[string]config.Plugin) if plugins == nil { - return pgSet + return pgMap } find := func(pgs *config.PluginSet) { for _, pg := range pgs.Enabled { - pgSet.Insert(pg.Name) + pgMap[pg.Name] = pg } } - for _, e := range f.getExtensionPoints(plugins) { find(e.plugins) } + // Parse MultiPoint separately since they are not returned by f.getExtensionPoints() find(&plugins.MultiPoint) - - return pgSet + return pgMap } // ProfileName returns the profile name associated to this framework. diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/types.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/types.go index 0c9dd74c380e..b3d23ad85fb4 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/types.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/framework/types.go @@ -198,8 +198,8 @@ type AffinityTerm struct { } // Matches returns true if the pod matches the label selector and namespaces or namespace selector. -func (at *AffinityTerm) Matches(pod *v1.Pod, nsLabels labels.Set) bool { - if at.Namespaces.Has(pod.Namespace) || at.NamespaceSelector.Matches(nsLabels) { +func (at *AffinityTerm) Matches(pod *v1.Pod, nsLabels labels.Set, nsSelectorEnabled bool) bool { + if at.Namespaces.Has(pod.Namespace) || (nsSelectorEnabled && at.NamespaceSelector.Matches(nsLabels)) { return at.Selector.Matches(labels.Set(pod.Labels)) } return false @@ -215,8 +215,6 @@ type WeightedAffinityTerm struct { type Diagnosis struct { NodeToStatusMap NodeToStatusMap UnschedulablePlugins sets.String - // PostFilterMsg records the messages returned from PostFilterPlugins. - PostFilterMsg string } // FitError describes a fit error of a pod. @@ -249,10 +247,6 @@ func (f *FitError) Error() string { return reasonStrings } reasonMsg := fmt.Sprintf(NoNodeAvailableMsg+": %v.", f.NumAllNodes, strings.Join(sortReasonsHistogram(), ", ")) - postFilterMsg := f.Diagnosis.PostFilterMsg - if postFilterMsg != "" { - reasonMsg += " " + postFilterMsg - } return reasonMsg } @@ -736,7 +730,7 @@ func calculateResource(pod *v1.Pod) (res Resource, non0CPU int64, non0Mem int64) } // If Overhead is being utilized, add to the total requests for the pod - if pod.Spec.Overhead != nil { + if pod.Spec.Overhead != nil && utilfeature.DefaultFeatureGate.Enabled(features.PodOverhead) { resPtr.Add(pod.Spec.Overhead) if _, found := pod.Spec.Overhead[v1.ResourceCPU]; found { non0CPU += pod.Spec.Overhead.Cpu().MilliValue() diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/cache.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/cache.go deleted file mode 100644 index 73fb6c367b52..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/cache.go +++ /dev/null @@ -1,745 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cache - -import ( - "fmt" - "os" - "sync" - "time" - - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/klog/v2" - "k8s.io/kubernetes/pkg/scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/metrics" -) - -var ( - cleanAssumedPeriod = 1 * time.Second -) - -// New returns a Cache implementation. -// It automatically starts a go routine that manages expiration of assumed pods. -// "ttl" is how long the assumed pod will get expired. -// "stop" is the channel that would close the background goroutine. -func New(ttl time.Duration, stop <-chan struct{}) Cache { - cache := newCache(ttl, cleanAssumedPeriod, stop) - cache.run() - return cache -} - -// nodeInfoListItem holds a NodeInfo pointer and acts as an item in a doubly -// linked list. When a NodeInfo is updated, it goes to the head of the list. -// The items closer to the head are the most recently updated items. -type nodeInfoListItem struct { - info *framework.NodeInfo - next *nodeInfoListItem - prev *nodeInfoListItem -} - -type cacheImpl struct { - stop <-chan struct{} - ttl time.Duration - period time.Duration - - // This mutex guards all fields within this cache struct. - mu sync.RWMutex - // a set of assumed pod keys. - // The key could further be used to get an entry in podStates. - assumedPods sets.String - // a map from pod key to podState. - podStates map[string]*podState - nodes map[string]*nodeInfoListItem - // headNode points to the most recently updated NodeInfo in "nodes". It is the - // head of the linked list. - headNode *nodeInfoListItem - nodeTree *nodeTree - // A map from image name to its imageState. - imageStates map[string]*imageState -} - -type podState struct { - pod *v1.Pod - // Used by assumedPod to determinate expiration. - deadline *time.Time - // Used to block cache from expiring assumedPod if binding still runs - bindingFinished bool -} - -type imageState struct { - // Size of the image - size int64 - // A set of node names for nodes having this image present - nodes sets.String -} - -// createImageStateSummary returns a summarizing snapshot of the given image's state. -func (cache *cacheImpl) createImageStateSummary(state *imageState) *framework.ImageStateSummary { - return &framework.ImageStateSummary{ - Size: state.size, - NumNodes: len(state.nodes), - } -} - -func newCache(ttl, period time.Duration, stop <-chan struct{}) *cacheImpl { - return &cacheImpl{ - ttl: ttl, - period: period, - stop: stop, - - nodes: make(map[string]*nodeInfoListItem), - nodeTree: newNodeTree(nil), - assumedPods: make(sets.String), - podStates: make(map[string]*podState), - imageStates: make(map[string]*imageState), - } -} - -// newNodeInfoListItem initializes a new nodeInfoListItem. -func newNodeInfoListItem(ni *framework.NodeInfo) *nodeInfoListItem { - return &nodeInfoListItem{ - info: ni, - } -} - -// moveNodeInfoToHead moves a NodeInfo to the head of "cache.nodes" doubly -// linked list. The head is the most recently updated NodeInfo. -// We assume cache lock is already acquired. -func (cache *cacheImpl) moveNodeInfoToHead(name string) { - ni, ok := cache.nodes[name] - if !ok { - klog.ErrorS(nil, "No node info with given name found in the cache", "node", klog.KRef("", name)) - return - } - // if the node info list item is already at the head, we are done. - if ni == cache.headNode { - return - } - - if ni.prev != nil { - ni.prev.next = ni.next - } - if ni.next != nil { - ni.next.prev = ni.prev - } - if cache.headNode != nil { - cache.headNode.prev = ni - } - ni.next = cache.headNode - ni.prev = nil - cache.headNode = ni -} - -// removeNodeInfoFromList removes a NodeInfo from the "cache.nodes" doubly -// linked list. -// We assume cache lock is already acquired. -func (cache *cacheImpl) removeNodeInfoFromList(name string) { - ni, ok := cache.nodes[name] - if !ok { - klog.ErrorS(nil, "No node info with given name found in the cache", "node", klog.KRef("", name)) - return - } - - if ni.prev != nil { - ni.prev.next = ni.next - } - if ni.next != nil { - ni.next.prev = ni.prev - } - // if the removed item was at the head, we must update the head. - if ni == cache.headNode { - cache.headNode = ni.next - } - delete(cache.nodes, name) -} - -// Dump produces a dump of the current scheduler cache. This is used for -// debugging purposes only and shouldn't be confused with UpdateSnapshot -// function. -// This method is expensive, and should be only used in non-critical path. -func (cache *cacheImpl) Dump() *Dump { - cache.mu.RLock() - defer cache.mu.RUnlock() - - nodes := make(map[string]*framework.NodeInfo, len(cache.nodes)) - for k, v := range cache.nodes { - nodes[k] = v.info.Clone() - } - - return &Dump{ - Nodes: nodes, - AssumedPods: cache.assumedPods.Union(nil), - } -} - -// UpdateSnapshot takes a snapshot of cached NodeInfo map. This is called at -// beginning of every scheduling cycle. -// The snapshot only includes Nodes that are not deleted at the time this function is called. -// nodeinfo.Node() is guaranteed to be not nil for all the nodes in the snapshot. -// This function tracks generation number of NodeInfo and updates only the -// entries of an existing snapshot that have changed after the snapshot was taken. -func (cache *cacheImpl) UpdateSnapshot(nodeSnapshot *Snapshot) error { - cache.mu.Lock() - defer cache.mu.Unlock() - - // Get the last generation of the snapshot. - snapshotGeneration := nodeSnapshot.generation - - // NodeInfoList and HavePodsWithAffinityNodeInfoList must be re-created if a node was added - // or removed from the cache. - updateAllLists := false - // HavePodsWithAffinityNodeInfoList must be re-created if a node changed its - // status from having pods with affinity to NOT having pods with affinity or the other - // way around. - updateNodesHavePodsWithAffinity := false - // HavePodsWithRequiredAntiAffinityNodeInfoList must be re-created if a node changed its - // status from having pods with required anti-affinity to NOT having pods with required - // anti-affinity or the other way around. - updateNodesHavePodsWithRequiredAntiAffinity := false - - // Start from the head of the NodeInfo doubly linked list and update snapshot - // of NodeInfos updated after the last snapshot. - for node := cache.headNode; node != nil; node = node.next { - if node.info.Generation <= snapshotGeneration { - // all the nodes are updated before the existing snapshot. We are done. - break - } - if np := node.info.Node(); np != nil { - existing, ok := nodeSnapshot.nodeInfoMap[np.Name] - if !ok { - updateAllLists = true - existing = &framework.NodeInfo{} - nodeSnapshot.nodeInfoMap[np.Name] = existing - } - clone := node.info.Clone() - // We track nodes that have pods with affinity, here we check if this node changed its - // status from having pods with affinity to NOT having pods with affinity or the other - // way around. - if (len(existing.PodsWithAffinity) > 0) != (len(clone.PodsWithAffinity) > 0) { - updateNodesHavePodsWithAffinity = true - } - if (len(existing.PodsWithRequiredAntiAffinity) > 0) != (len(clone.PodsWithRequiredAntiAffinity) > 0) { - updateNodesHavePodsWithRequiredAntiAffinity = true - } - // We need to preserve the original pointer of the NodeInfo struct since it - // is used in the NodeInfoList, which we may not update. - *existing = *clone - } - } - // Update the snapshot generation with the latest NodeInfo generation. - if cache.headNode != nil { - nodeSnapshot.generation = cache.headNode.info.Generation - } - - // Comparing to pods in nodeTree. - // Deleted nodes get removed from the tree, but they might remain in the nodes map - // if they still have non-deleted Pods. - if len(nodeSnapshot.nodeInfoMap) > cache.nodeTree.numNodes { - cache.removeDeletedNodesFromSnapshot(nodeSnapshot) - updateAllLists = true - } - - if updateAllLists || updateNodesHavePodsWithAffinity || updateNodesHavePodsWithRequiredAntiAffinity { - cache.updateNodeInfoSnapshotList(nodeSnapshot, updateAllLists) - } - - if len(nodeSnapshot.nodeInfoList) != cache.nodeTree.numNodes { - errMsg := fmt.Sprintf("snapshot state is not consistent, length of NodeInfoList=%v not equal to length of nodes in tree=%v "+ - ", length of NodeInfoMap=%v, length of nodes in cache=%v"+ - ", trying to recover", - len(nodeSnapshot.nodeInfoList), cache.nodeTree.numNodes, - len(nodeSnapshot.nodeInfoMap), len(cache.nodes)) - klog.ErrorS(nil, errMsg) - // We will try to recover by re-creating the lists for the next scheduling cycle, but still return an - // error to surface the problem, the error will likely cause a failure to the current scheduling cycle. - cache.updateNodeInfoSnapshotList(nodeSnapshot, true) - return fmt.Errorf(errMsg) - } - - return nil -} - -func (cache *cacheImpl) updateNodeInfoSnapshotList(snapshot *Snapshot, updateAll bool) { - snapshot.havePodsWithAffinityNodeInfoList = make([]*framework.NodeInfo, 0, cache.nodeTree.numNodes) - snapshot.havePodsWithRequiredAntiAffinityNodeInfoList = make([]*framework.NodeInfo, 0, cache.nodeTree.numNodes) - if updateAll { - // Take a snapshot of the nodes order in the tree - snapshot.nodeInfoList = make([]*framework.NodeInfo, 0, cache.nodeTree.numNodes) - nodesList, err := cache.nodeTree.list() - if err != nil { - klog.ErrorS(err, "Error occurred while retrieving the list of names of the nodes from node tree") - } - for _, nodeName := range nodesList { - if nodeInfo := snapshot.nodeInfoMap[nodeName]; nodeInfo != nil { - snapshot.nodeInfoList = append(snapshot.nodeInfoList, nodeInfo) - if len(nodeInfo.PodsWithAffinity) > 0 { - snapshot.havePodsWithAffinityNodeInfoList = append(snapshot.havePodsWithAffinityNodeInfoList, nodeInfo) - } - if len(nodeInfo.PodsWithRequiredAntiAffinity) > 0 { - snapshot.havePodsWithRequiredAntiAffinityNodeInfoList = append(snapshot.havePodsWithRequiredAntiAffinityNodeInfoList, nodeInfo) - } - } else { - klog.ErrorS(nil, "Node exists in nodeTree but not in NodeInfoMap, this should not happen", "node", klog.KRef("", nodeName)) - } - } - } else { - for _, nodeInfo := range snapshot.nodeInfoList { - if len(nodeInfo.PodsWithAffinity) > 0 { - snapshot.havePodsWithAffinityNodeInfoList = append(snapshot.havePodsWithAffinityNodeInfoList, nodeInfo) - } - if len(nodeInfo.PodsWithRequiredAntiAffinity) > 0 { - snapshot.havePodsWithRequiredAntiAffinityNodeInfoList = append(snapshot.havePodsWithRequiredAntiAffinityNodeInfoList, nodeInfo) - } - } - } -} - -// If certain nodes were deleted after the last snapshot was taken, we should remove them from the snapshot. -func (cache *cacheImpl) removeDeletedNodesFromSnapshot(snapshot *Snapshot) { - toDelete := len(snapshot.nodeInfoMap) - cache.nodeTree.numNodes - for name := range snapshot.nodeInfoMap { - if toDelete <= 0 { - break - } - if n, ok := cache.nodes[name]; !ok || n.info.Node() == nil { - delete(snapshot.nodeInfoMap, name) - toDelete-- - } - } -} - -// NodeCount returns the number of nodes in the cache. -// DO NOT use outside of tests. -func (cache *cacheImpl) NodeCount() int { - cache.mu.RLock() - defer cache.mu.RUnlock() - return len(cache.nodes) -} - -// PodCount returns the number of pods in the cache (including those from deleted nodes). -// DO NOT use outside of tests. -func (cache *cacheImpl) PodCount() (int, error) { - cache.mu.RLock() - defer cache.mu.RUnlock() - // podFilter is expected to return true for most or all of the pods. We - // can avoid expensive array growth without wasting too much memory by - // pre-allocating capacity. - count := 0 - for _, n := range cache.nodes { - count += len(n.info.Pods) - } - return count, nil -} - -func (cache *cacheImpl) AssumePod(pod *v1.Pod) error { - key, err := framework.GetPodKey(pod) - if err != nil { - return err - } - - cache.mu.Lock() - defer cache.mu.Unlock() - if _, ok := cache.podStates[key]; ok { - return fmt.Errorf("pod %v is in the cache, so can't be assumed", key) - } - - return cache.addPod(pod, true) -} - -func (cache *cacheImpl) FinishBinding(pod *v1.Pod) error { - return cache.finishBinding(pod, time.Now()) -} - -// finishBinding exists to make tests determinitistic by injecting now as an argument -func (cache *cacheImpl) finishBinding(pod *v1.Pod, now time.Time) error { - key, err := framework.GetPodKey(pod) - if err != nil { - return err - } - - cache.mu.RLock() - defer cache.mu.RUnlock() - - klog.V(5).InfoS("Finished binding for pod, can be expired", "pod", klog.KObj(pod)) - currState, ok := cache.podStates[key] - if ok && cache.assumedPods.Has(key) { - dl := now.Add(cache.ttl) - currState.bindingFinished = true - currState.deadline = &dl - } - return nil -} - -func (cache *cacheImpl) ForgetPod(pod *v1.Pod) error { - key, err := framework.GetPodKey(pod) - if err != nil { - return err - } - - cache.mu.Lock() - defer cache.mu.Unlock() - - currState, ok := cache.podStates[key] - if ok && currState.pod.Spec.NodeName != pod.Spec.NodeName { - return fmt.Errorf("pod %v was assumed on %v but assigned to %v", key, pod.Spec.NodeName, currState.pod.Spec.NodeName) - } - - // Only assumed pod can be forgotten. - if ok && cache.assumedPods.Has(key) { - return cache.removePod(pod) - } - return fmt.Errorf("pod %v wasn't assumed so cannot be forgotten", key) -} - -// Assumes that lock is already acquired. -func (cache *cacheImpl) addPod(pod *v1.Pod, assumePod bool) error { - key, err := framework.GetPodKey(pod) - if err != nil { - return err - } - n, ok := cache.nodes[pod.Spec.NodeName] - if !ok { - n = newNodeInfoListItem(framework.NewNodeInfo()) - cache.nodes[pod.Spec.NodeName] = n - } - n.info.AddPod(pod) - cache.moveNodeInfoToHead(pod.Spec.NodeName) - ps := &podState{ - pod: pod, - } - cache.podStates[key] = ps - if assumePod { - cache.assumedPods.Insert(key) - } - return nil -} - -// Assumes that lock is already acquired. -func (cache *cacheImpl) updatePod(oldPod, newPod *v1.Pod) error { - if err := cache.removePod(oldPod); err != nil { - return err - } - return cache.addPod(newPod, false) -} - -// Assumes that lock is already acquired. -// Removes a pod from the cached node info. If the node information was already -// removed and there are no more pods left in the node, cleans up the node from -// the cache. -func (cache *cacheImpl) removePod(pod *v1.Pod) error { - key, err := framework.GetPodKey(pod) - if err != nil { - return err - } - - n, ok := cache.nodes[pod.Spec.NodeName] - if !ok { - klog.ErrorS(nil, "Node not found when trying to remove pod", "node", klog.KRef("", pod.Spec.NodeName), "pod", klog.KObj(pod)) - } else { - if err := n.info.RemovePod(pod); err != nil { - return err - } - if len(n.info.Pods) == 0 && n.info.Node() == nil { - cache.removeNodeInfoFromList(pod.Spec.NodeName) - } else { - cache.moveNodeInfoToHead(pod.Spec.NodeName) - } - } - - delete(cache.podStates, key) - delete(cache.assumedPods, key) - return nil -} - -func (cache *cacheImpl) AddPod(pod *v1.Pod) error { - key, err := framework.GetPodKey(pod) - if err != nil { - return err - } - - cache.mu.Lock() - defer cache.mu.Unlock() - - currState, ok := cache.podStates[key] - switch { - case ok && cache.assumedPods.Has(key): - if currState.pod.Spec.NodeName != pod.Spec.NodeName { - // The pod was added to a different node than it was assumed to. - klog.InfoS("Pod was added to a different node than it was assumed", "pod", klog.KObj(pod), "assumedNode", klog.KRef("", pod.Spec.NodeName), "currentNode", klog.KRef("", currState.pod.Spec.NodeName)) - if err = cache.updatePod(currState.pod, pod); err != nil { - klog.ErrorS(err, "Error occurred while updating pod") - } - } else { - delete(cache.assumedPods, key) - cache.podStates[key].deadline = nil - cache.podStates[key].pod = pod - } - case !ok: - // Pod was expired. We should add it back. - if err = cache.addPod(pod, false); err != nil { - klog.ErrorS(err, "Error occurred while adding pod") - } - default: - return fmt.Errorf("pod %v was already in added state", key) - } - return nil -} - -func (cache *cacheImpl) UpdatePod(oldPod, newPod *v1.Pod) error { - key, err := framework.GetPodKey(oldPod) - if err != nil { - return err - } - - cache.mu.Lock() - defer cache.mu.Unlock() - - currState, ok := cache.podStates[key] - // An assumed pod won't have Update/Remove event. It needs to have Add event - // before Update event, in which case the state would change from Assumed to Added. - if ok && !cache.assumedPods.Has(key) { - if currState.pod.Spec.NodeName != newPod.Spec.NodeName { - klog.ErrorS(nil, "Pod updated on a different node than previously added to", "pod", klog.KObj(oldPod)) - klog.ErrorS(nil, "scheduler cache is corrupted and can badly affect scheduling decisions") - os.Exit(1) - } - return cache.updatePod(oldPod, newPod) - } - return fmt.Errorf("pod %v is not added to scheduler cache, so cannot be updated", key) -} - -func (cache *cacheImpl) RemovePod(pod *v1.Pod) error { - key, err := framework.GetPodKey(pod) - if err != nil { - return err - } - - cache.mu.Lock() - defer cache.mu.Unlock() - - currState, ok := cache.podStates[key] - if !ok { - return fmt.Errorf("pod %v is not found in scheduler cache, so cannot be removed from it", key) - } - if currState.pod.Spec.NodeName != pod.Spec.NodeName { - klog.ErrorS(nil, "Pod was added to a different node than it was assumed", "pod", klog.KObj(pod), "assumedNode", klog.KRef("", pod.Spec.NodeName), "currentNode", klog.KRef("", currState.pod.Spec.NodeName)) - if pod.Spec.NodeName != "" { - // An empty NodeName is possible when the scheduler misses a Delete - // event and it gets the last known state from the informer cache. - klog.ErrorS(nil, "scheduler cache is corrupted and can badly affect scheduling decisions") - os.Exit(1) - } - } - return cache.removePod(currState.pod) -} - -func (cache *cacheImpl) IsAssumedPod(pod *v1.Pod) (bool, error) { - key, err := framework.GetPodKey(pod) - if err != nil { - return false, err - } - - cache.mu.RLock() - defer cache.mu.RUnlock() - - return cache.assumedPods.Has(key), nil -} - -// GetPod might return a pod for which its node has already been deleted from -// the main cache. This is useful to properly process pod update events. -func (cache *cacheImpl) GetPod(pod *v1.Pod) (*v1.Pod, error) { - key, err := framework.GetPodKey(pod) - if err != nil { - return nil, err - } - - cache.mu.RLock() - defer cache.mu.RUnlock() - - podState, ok := cache.podStates[key] - if !ok { - return nil, fmt.Errorf("pod %v does not exist in scheduler cache", key) - } - - return podState.pod, nil -} - -func (cache *cacheImpl) AddNode(node *v1.Node) *framework.NodeInfo { - cache.mu.Lock() - defer cache.mu.Unlock() - - n, ok := cache.nodes[node.Name] - if !ok { - n = newNodeInfoListItem(framework.NewNodeInfo()) - cache.nodes[node.Name] = n - } else { - cache.removeNodeImageStates(n.info.Node()) - } - cache.moveNodeInfoToHead(node.Name) - - cache.nodeTree.addNode(node) - cache.addNodeImageStates(node, n.info) - n.info.SetNode(node) - return n.info.Clone() -} - -func (cache *cacheImpl) UpdateNode(oldNode, newNode *v1.Node) *framework.NodeInfo { - cache.mu.Lock() - defer cache.mu.Unlock() - - n, ok := cache.nodes[newNode.Name] - if !ok { - n = newNodeInfoListItem(framework.NewNodeInfo()) - cache.nodes[newNode.Name] = n - cache.nodeTree.addNode(newNode) - } else { - cache.removeNodeImageStates(n.info.Node()) - } - cache.moveNodeInfoToHead(newNode.Name) - - cache.nodeTree.updateNode(oldNode, newNode) - cache.addNodeImageStates(newNode, n.info) - n.info.SetNode(newNode) - return n.info.Clone() -} - -// RemoveNode removes a node from the cache's tree. -// The node might still have pods because their deletion events didn't arrive -// yet. Those pods are considered removed from the cache, being the node tree -// the source of truth. -// However, we keep a ghost node with the list of pods until all pod deletion -// events have arrived. A ghost node is skipped from snapshots. -func (cache *cacheImpl) RemoveNode(node *v1.Node) error { - cache.mu.Lock() - defer cache.mu.Unlock() - - n, ok := cache.nodes[node.Name] - if !ok { - return fmt.Errorf("node %v is not found", node.Name) - } - n.info.RemoveNode() - // We remove NodeInfo for this node only if there aren't any pods on this node. - // We can't do it unconditionally, because notifications about pods are delivered - // in a different watch, and thus can potentially be observed later, even though - // they happened before node removal. - if len(n.info.Pods) == 0 { - cache.removeNodeInfoFromList(node.Name) - } else { - cache.moveNodeInfoToHead(node.Name) - } - if err := cache.nodeTree.removeNode(node); err != nil { - return err - } - cache.removeNodeImageStates(node) - return nil -} - -// addNodeImageStates adds states of the images on given node to the given nodeInfo and update the imageStates in -// scheduler cache. This function assumes the lock to scheduler cache has been acquired. -func (cache *cacheImpl) addNodeImageStates(node *v1.Node, nodeInfo *framework.NodeInfo) { - newSum := make(map[string]*framework.ImageStateSummary) - - for _, image := range node.Status.Images { - for _, name := range image.Names { - // update the entry in imageStates - state, ok := cache.imageStates[name] - if !ok { - state = &imageState{ - size: image.SizeBytes, - nodes: sets.NewString(node.Name), - } - cache.imageStates[name] = state - } else { - state.nodes.Insert(node.Name) - } - // create the imageStateSummary for this image - if _, ok := newSum[name]; !ok { - newSum[name] = cache.createImageStateSummary(state) - } - } - } - nodeInfo.ImageStates = newSum -} - -// removeNodeImageStates removes the given node record from image entries having the node -// in imageStates cache. After the removal, if any image becomes free, i.e., the image -// is no longer available on any node, the image entry will be removed from imageStates. -func (cache *cacheImpl) removeNodeImageStates(node *v1.Node) { - if node == nil { - return - } - - for _, image := range node.Status.Images { - for _, name := range image.Names { - state, ok := cache.imageStates[name] - if ok { - state.nodes.Delete(node.Name) - if len(state.nodes) == 0 { - // Remove the unused image to make sure the length of - // imageStates represents the total number of different - // images on all nodes - delete(cache.imageStates, name) - } - } - } - } -} - -func (cache *cacheImpl) run() { - go wait.Until(cache.cleanupExpiredAssumedPods, cache.period, cache.stop) -} - -func (cache *cacheImpl) cleanupExpiredAssumedPods() { - cache.cleanupAssumedPods(time.Now()) -} - -// cleanupAssumedPods exists for making test deterministic by taking time as input argument. -// It also reports metrics on the cache size for nodes, pods, and assumed pods. -func (cache *cacheImpl) cleanupAssumedPods(now time.Time) { - cache.mu.Lock() - defer cache.mu.Unlock() - defer cache.updateMetrics() - - // The size of assumedPods should be small - for key := range cache.assumedPods { - ps, ok := cache.podStates[key] - if !ok { - klog.ErrorS(nil, "Key found in assumed set but not in podStates, potentially a logical error") - os.Exit(1) - } - if !ps.bindingFinished { - klog.V(5).InfoS("Could not expire cache for pod as binding is still in progress", - "pod", klog.KObj(ps.pod)) - continue - } - if now.After(*ps.deadline) { - klog.InfoS("Pod expired", "pod", klog.KObj(ps.pod)) - if err := cache.removePod(ps.pod); err != nil { - klog.ErrorS(err, "ExpirePod failed", "pod", klog.KObj(ps.pod)) - } - } - } -} - -// updateMetrics updates cache size metric values for pods, assumed pods, and nodes -func (cache *cacheImpl) updateMetrics() { - metrics.CacheSize.WithLabelValues("assumed_pods").Set(float64(len(cache.assumedPods))) - metrics.CacheSize.WithLabelValues("pods").Set(float64(len(cache.podStates))) - metrics.CacheSize.WithLabelValues("nodes").Set(float64(len(cache.nodes))) -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger/comparer.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger/comparer.go deleted file mode 100644 index f348977b4f90..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger/comparer.go +++ /dev/null @@ -1,135 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package debugger - -import ( - "sort" - "strings" - - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/labels" - corelisters "k8s.io/client-go/listers/core/v1" - "k8s.io/klog/v2" - "k8s.io/kubernetes/pkg/scheduler/framework" - internalcache "k8s.io/kubernetes/pkg/scheduler/internal/cache" - internalqueue "k8s.io/kubernetes/pkg/scheduler/internal/queue" -) - -// CacheComparer is an implementation of the Scheduler's cache comparer. -type CacheComparer struct { - NodeLister corelisters.NodeLister - PodLister corelisters.PodLister - Cache internalcache.Cache - PodQueue internalqueue.SchedulingQueue -} - -// Compare compares the nodes and pods of NodeLister with Cache.Snapshot. -func (c *CacheComparer) Compare() error { - klog.V(3).InfoS("Cache comparer started") - defer klog.V(3).InfoS("Cache comparer finished") - - nodes, err := c.NodeLister.List(labels.Everything()) - if err != nil { - return err - } - - pods, err := c.PodLister.List(labels.Everything()) - if err != nil { - return err - } - - dump := c.Cache.Dump() - - pendingPods := c.PodQueue.PendingPods() - - if missed, redundant := c.CompareNodes(nodes, dump.Nodes); len(missed)+len(redundant) != 0 { - klog.InfoS("Cache mismatch", "missedNodes", missed, "redundantNodes", redundant) - } - - if missed, redundant := c.ComparePods(pods, pendingPods, dump.Nodes); len(missed)+len(redundant) != 0 { - klog.InfoS("Cache mismatch", "missedPods", missed, "redundantPods", redundant) - } - - return nil -} - -// CompareNodes compares actual nodes with cached nodes. -func (c *CacheComparer) CompareNodes(nodes []*v1.Node, nodeinfos map[string]*framework.NodeInfo) (missed, redundant []string) { - actual := []string{} - for _, node := range nodes { - actual = append(actual, node.Name) - } - - cached := []string{} - for nodeName := range nodeinfos { - cached = append(cached, nodeName) - } - - return compareStrings(actual, cached) -} - -// ComparePods compares actual pods with cached pods. -func (c *CacheComparer) ComparePods(pods, waitingPods []*v1.Pod, nodeinfos map[string]*framework.NodeInfo) (missed, redundant []string) { - actual := []string{} - for _, pod := range pods { - actual = append(actual, string(pod.UID)) - } - - cached := []string{} - for _, nodeinfo := range nodeinfos { - for _, p := range nodeinfo.Pods { - cached = append(cached, string(p.Pod.UID)) - } - } - for _, pod := range waitingPods { - cached = append(cached, string(pod.UID)) - } - - return compareStrings(actual, cached) -} - -func compareStrings(actual, cached []string) (missed, redundant []string) { - missed, redundant = []string{}, []string{} - - sort.Strings(actual) - sort.Strings(cached) - - compare := func(i, j int) int { - if i == len(actual) { - return 1 - } else if j == len(cached) { - return -1 - } - return strings.Compare(actual[i], cached[j]) - } - - for i, j := 0, 0; i < len(actual) || j < len(cached); { - switch compare(i, j) { - case 0: - i++ - j++ - case -1: - missed = append(missed, actual[i]) - i++ - case 1: - redundant = append(redundant, cached[j]) - j++ - } - } - - return -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger/debugger.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger/debugger.go deleted file mode 100644 index d8839ec67e83..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger/debugger.go +++ /dev/null @@ -1,72 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package debugger - -import ( - "os" - "os/signal" - - corelisters "k8s.io/client-go/listers/core/v1" - internalcache "k8s.io/kubernetes/pkg/scheduler/internal/cache" - internalqueue "k8s.io/kubernetes/pkg/scheduler/internal/queue" -) - -// CacheDebugger provides ways to check and write cache information for debugging. -type CacheDebugger struct { - Comparer CacheComparer - Dumper CacheDumper -} - -// New creates a CacheDebugger. -func New( - nodeLister corelisters.NodeLister, - podLister corelisters.PodLister, - cache internalcache.Cache, - podQueue internalqueue.SchedulingQueue, -) *CacheDebugger { - return &CacheDebugger{ - Comparer: CacheComparer{ - NodeLister: nodeLister, - PodLister: podLister, - Cache: cache, - PodQueue: podQueue, - }, - Dumper: CacheDumper{ - cache: cache, - podQueue: podQueue, - }, - } -} - -// ListenForSignal starts a goroutine that will trigger the CacheDebugger's -// behavior when the process receives SIGINT (Windows) or SIGUSER2 (non-Windows). -func (d *CacheDebugger) ListenForSignal(stopCh <-chan struct{}) { - ch := make(chan os.Signal, 1) - signal.Notify(ch, compareSignal) - - go func() { - for { - select { - case <-stopCh: - return - case <-ch: - d.Comparer.Compare() - d.Dumper.DumpAll() - } - } - }() -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger/dumper.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger/dumper.go deleted file mode 100644 index b2424b67888c..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger/dumper.go +++ /dev/null @@ -1,88 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package debugger - -import ( - "fmt" - "strings" - - "k8s.io/klog/v2" - - "k8s.io/api/core/v1" - "k8s.io/kubernetes/pkg/scheduler/framework" - internalcache "k8s.io/kubernetes/pkg/scheduler/internal/cache" - "k8s.io/kubernetes/pkg/scheduler/internal/queue" -) - -// CacheDumper writes some information from the scheduler cache and the scheduling queue to the -// scheduler logs for debugging purposes. -type CacheDumper struct { - cache internalcache.Cache - podQueue queue.SchedulingQueue -} - -// DumpAll writes cached nodes and scheduling queue information to the scheduler logs. -func (d *CacheDumper) DumpAll() { - d.dumpNodes() - d.dumpSchedulingQueue() -} - -// dumpNodes writes NodeInfo to the scheduler logs. -func (d *CacheDumper) dumpNodes() { - dump := d.cache.Dump() - nodeInfos := make([]string, 0, len(dump.Nodes)) - for name, nodeInfo := range dump.Nodes { - nodeInfos = append(nodeInfos, d.printNodeInfo(name, nodeInfo)) - } - // Extra blank line added between node entries for readability. - klog.InfoS("Dump of cached NodeInfo", "nodes", strings.Join(nodeInfos, "\n\n")) -} - -// dumpSchedulingQueue writes pods in the scheduling queue to the scheduler logs. -func (d *CacheDumper) dumpSchedulingQueue() { - pendingPods := d.podQueue.PendingPods() - var podData strings.Builder - for _, p := range pendingPods { - podData.WriteString(printPod(p)) - } - klog.InfoS("Dump of scheduling queue", "pods", podData.String()) -} - -// printNodeInfo writes parts of NodeInfo to a string. -func (d *CacheDumper) printNodeInfo(name string, n *framework.NodeInfo) string { - var nodeData strings.Builder - nodeData.WriteString(fmt.Sprintf("Node name: %s\nDeleted: %t\nRequested Resources: %+v\nAllocatable Resources:%+v\nScheduled Pods(number: %v):\n", - name, n.Node() == nil, n.Requested, n.Allocatable, len(n.Pods))) - // Dumping Pod Info - for _, p := range n.Pods { - nodeData.WriteString(printPod(p.Pod)) - } - // Dumping nominated pods info on the node - nominatedPodInfos := d.podQueue.NominatedPodsForNode(name) - if len(nominatedPodInfos) != 0 { - nodeData.WriteString(fmt.Sprintf("Nominated Pods(number: %v):\n", len(nominatedPodInfos))) - for _, pi := range nominatedPodInfos { - nodeData.WriteString(printPod(pi.Pod)) - } - } - return nodeData.String() -} - -// printPod writes parts of a Pod object to a string. -func printPod(p *v1.Pod) string { - return fmt.Sprintf("name: %v, namespace: %v, uid: %v, phase: %v, nominated node: %v\n", p.Name, p.Namespace, p.UID, p.Status.Phase, p.Status.NominatedNodeName) -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/interface.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/interface.go deleted file mode 100644 index 4cd6d8f88692..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/interface.go +++ /dev/null @@ -1,122 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cache - -import ( - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/kubernetes/pkg/scheduler/framework" -) - -// Cache collects pods' information and provides node-level aggregated information. -// It's intended for generic scheduler to do efficient lookup. -// Cache's operations are pod centric. It does incremental updates based on pod events. -// Pod events are sent via network. We don't have guaranteed delivery of all events: -// We use Reflector to list and watch from remote. -// Reflector might be slow and do a relist, which would lead to missing events. -// -// State Machine of a pod's events in scheduler's cache: -// -// -// +-------------------------------------------+ +----+ -// | Add | | | -// | | | | Update -// + Assume Add v v | -//Initial +--------> Assumed +------------+---> Added <--+ -// ^ + + | + -// | | | | | -// | | | Add | | Remove -// | | | | | -// | | | + | -// +----------------+ +-----------> Expired +----> Deleted -// Forget Expire -// -// -// Note that an assumed pod can expire, because if we haven't received Add event notifying us -// for a while, there might be some problems and we shouldn't keep the pod in cache anymore. -// -// Note that "Initial", "Expired", and "Deleted" pods do not actually exist in cache. -// Based on existing use cases, we are making the following assumptions: -// - No pod would be assumed twice -// - A pod could be added without going through scheduler. In this case, we will see Add but not Assume event. -// - If a pod wasn't added, it wouldn't be removed or updated. -// - Both "Expired" and "Deleted" are valid end states. In case of some problems, e.g. network issue, -// a pod might have changed its state (e.g. added and deleted) without delivering notification to the cache. -type Cache interface { - // NodeCount returns the number of nodes in the cache. - // DO NOT use outside of tests. - NodeCount() int - - // PodCount returns the number of pods in the cache (including those from deleted nodes). - // DO NOT use outside of tests. - PodCount() (int, error) - - // AssumePod assumes a pod scheduled and aggregates the pod's information into its node. - // The implementation also decides the policy to expire pod before being confirmed (receiving Add event). - // After expiration, its information would be subtracted. - AssumePod(pod *v1.Pod) error - - // FinishBinding signals that cache for assumed pod can be expired - FinishBinding(pod *v1.Pod) error - - // ForgetPod removes an assumed pod from cache. - ForgetPod(pod *v1.Pod) error - - // AddPod either confirms a pod if it's assumed, or adds it back if it's expired. - // If added back, the pod's information would be added again. - AddPod(pod *v1.Pod) error - - // UpdatePod removes oldPod's information and adds newPod's information. - UpdatePod(oldPod, newPod *v1.Pod) error - - // RemovePod removes a pod. The pod's information would be subtracted from assigned node. - RemovePod(pod *v1.Pod) error - - // GetPod returns the pod from the cache with the same namespace and the - // same name of the specified pod. - GetPod(pod *v1.Pod) (*v1.Pod, error) - - // IsAssumedPod returns true if the pod is assumed and not expired. - IsAssumedPod(pod *v1.Pod) (bool, error) - - // AddNode adds overall information about node. - // It returns a clone of added NodeInfo object. - AddNode(node *v1.Node) *framework.NodeInfo - - // UpdateNode updates overall information about node. - // It returns a clone of updated NodeInfo object. - UpdateNode(oldNode, newNode *v1.Node) *framework.NodeInfo - - // RemoveNode removes overall information about node. - RemoveNode(node *v1.Node) error - - // UpdateSnapshot updates the passed infoSnapshot to the current contents of Cache. - // The node info contains aggregated information of pods scheduled (including assumed to be) - // on this node. - // The snapshot only includes Nodes that are not deleted at the time this function is called. - // nodeinfo.Node() is guaranteed to be not nil for all the nodes in the snapshot. - UpdateSnapshot(nodeSnapshot *Snapshot) error - - // Dump produces a dump of the current cache. - Dump() *Dump -} - -// Dump is a dump of the cache state. -type Dump struct { - AssumedPods sets.String - Nodes map[string]*framework.NodeInfo -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/node_tree.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/node_tree.go deleted file mode 100644 index a0005ddeed50..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/node_tree.go +++ /dev/null @@ -1,143 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cache - -import ( - "errors" - "fmt" - - v1 "k8s.io/api/core/v1" - utilnode "k8s.io/component-helpers/node/topology" - "k8s.io/klog/v2" -) - -// nodeTree is a tree-like data structure that holds node names in each zone. Zone names are -// keys to "NodeTree.tree" and values of "NodeTree.tree" are arrays of node names. -// NodeTree is NOT thread-safe, any concurrent updates/reads from it must be synchronized by the caller. -// It is used only by schedulerCache, and should stay as such. -type nodeTree struct { - tree map[string][]string // a map from zone (region-zone) to an array of nodes in the zone. - zones []string // a list of all the zones in the tree (keys) - numNodes int -} - -// newNodeTree creates a NodeTree from nodes. -func newNodeTree(nodes []*v1.Node) *nodeTree { - nt := &nodeTree{ - tree: make(map[string][]string), - } - for _, n := range nodes { - nt.addNode(n) - } - return nt -} - -// addNode adds a node and its corresponding zone to the tree. If the zone already exists, the node -// is added to the array of nodes in that zone. -func (nt *nodeTree) addNode(n *v1.Node) { - zone := utilnode.GetZoneKey(n) - if na, ok := nt.tree[zone]; ok { - for _, nodeName := range na { - if nodeName == n.Name { - klog.InfoS("Node already exists in the NodeTree", "node", klog.KObj(n)) - return - } - } - nt.tree[zone] = append(na, n.Name) - } else { - nt.zones = append(nt.zones, zone) - nt.tree[zone] = []string{n.Name} - } - klog.V(2).InfoS("Added node in listed group to NodeTree", "node", klog.KObj(n), "zone", zone) - nt.numNodes++ -} - -// removeNode removes a node from the NodeTree. -func (nt *nodeTree) removeNode(n *v1.Node) error { - zone := utilnode.GetZoneKey(n) - if na, ok := nt.tree[zone]; ok { - for i, nodeName := range na { - if nodeName == n.Name { - nt.tree[zone] = append(na[:i], na[i+1:]...) - if len(nt.tree[zone]) == 0 { - nt.removeZone(zone) - } - klog.V(2).InfoS("Removed node in listed group from NodeTree", "node", klog.KObj(n), "zone", zone) - nt.numNodes-- - return nil - } - } - } - klog.ErrorS(nil, "Node in listed group was not found", "node", klog.KObj(n), "zone", zone) - return fmt.Errorf("node %q in group %q was not found", n.Name, zone) -} - -// removeZone removes a zone from tree. -// This function must be called while writer locks are hold. -func (nt *nodeTree) removeZone(zone string) { - delete(nt.tree, zone) - for i, z := range nt.zones { - if z == zone { - nt.zones = append(nt.zones[:i], nt.zones[i+1:]...) - return - } - } -} - -// updateNode updates a node in the NodeTree. -func (nt *nodeTree) updateNode(old, new *v1.Node) { - var oldZone string - if old != nil { - oldZone = utilnode.GetZoneKey(old) - } - newZone := utilnode.GetZoneKey(new) - // If the zone ID of the node has not changed, we don't need to do anything. Name of the node - // cannot be changed in an update. - if oldZone == newZone { - return - } - nt.removeNode(old) // No error checking. We ignore whether the old node exists or not. - nt.addNode(new) -} - -// list returns the list of names of the node. NodeTree iterates over zones and in each zone iterates -// over nodes in a round robin fashion. -func (nt *nodeTree) list() ([]string, error) { - if len(nt.zones) == 0 { - return nil, nil - } - nodesList := make([]string, 0, nt.numNodes) - numExhaustedZones := 0 - nodeIndex := 0 - for len(nodesList) < nt.numNodes { - if numExhaustedZones >= len(nt.zones) { // all zones are exhausted. - return nodesList, errors.New("all zones exhausted before reaching count of nodes expected") - } - for zoneIndex := 0; zoneIndex < len(nt.zones); zoneIndex++ { - na := nt.tree[nt.zones[zoneIndex]] - if nodeIndex >= len(na) { // If the zone is exhausted, continue - if nodeIndex == len(na) { // If it is the first time the zone is exhausted - numExhaustedZones++ - } - continue - } - nodesList = append(nodesList, na[nodeIndex]) - } - nodeIndex++ - } - return nodesList, nil -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/snapshot.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/snapshot.go deleted file mode 100644 index bf312fcdf9ce..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/cache/snapshot.go +++ /dev/null @@ -1,165 +0,0 @@ -/* -Copyright 2019 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cache - -import ( - "fmt" - - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/kubernetes/pkg/scheduler/framework" -) - -// Snapshot is a snapshot of cache NodeInfo and NodeTree order. The scheduler takes a -// snapshot at the beginning of each scheduling cycle and uses it for its operations in that cycle. -type Snapshot struct { - // nodeInfoMap a map of node name to a snapshot of its NodeInfo. - nodeInfoMap map[string]*framework.NodeInfo - // nodeInfoList is the list of nodes as ordered in the cache's nodeTree. - nodeInfoList []*framework.NodeInfo - // havePodsWithAffinityNodeInfoList is the list of nodes with at least one pod declaring affinity terms. - havePodsWithAffinityNodeInfoList []*framework.NodeInfo - // havePodsWithRequiredAntiAffinityNodeInfoList is the list of nodes with at least one pod declaring - // required anti-affinity terms. - havePodsWithRequiredAntiAffinityNodeInfoList []*framework.NodeInfo - generation int64 -} - -var _ framework.SharedLister = &Snapshot{} - -// NewEmptySnapshot initializes a Snapshot struct and returns it. -func NewEmptySnapshot() *Snapshot { - return &Snapshot{ - nodeInfoMap: make(map[string]*framework.NodeInfo), - } -} - -// NewSnapshot initializes a Snapshot struct and returns it. -func NewSnapshot(pods []*v1.Pod, nodes []*v1.Node) *Snapshot { - nodeInfoMap := createNodeInfoMap(pods, nodes) - nodeInfoList := make([]*framework.NodeInfo, 0, len(nodeInfoMap)) - havePodsWithAffinityNodeInfoList := make([]*framework.NodeInfo, 0, len(nodeInfoMap)) - havePodsWithRequiredAntiAffinityNodeInfoList := make([]*framework.NodeInfo, 0, len(nodeInfoMap)) - for _, v := range nodeInfoMap { - nodeInfoList = append(nodeInfoList, v) - if len(v.PodsWithAffinity) > 0 { - havePodsWithAffinityNodeInfoList = append(havePodsWithAffinityNodeInfoList, v) - } - if len(v.PodsWithRequiredAntiAffinity) > 0 { - havePodsWithRequiredAntiAffinityNodeInfoList = append(havePodsWithRequiredAntiAffinityNodeInfoList, v) - } - } - - s := NewEmptySnapshot() - s.nodeInfoMap = nodeInfoMap - s.nodeInfoList = nodeInfoList - s.havePodsWithAffinityNodeInfoList = havePodsWithAffinityNodeInfoList - s.havePodsWithRequiredAntiAffinityNodeInfoList = havePodsWithRequiredAntiAffinityNodeInfoList - - return s -} - -// createNodeInfoMap obtains a list of pods and pivots that list into a map -// where the keys are node names and the values are the aggregated information -// for that node. -func createNodeInfoMap(pods []*v1.Pod, nodes []*v1.Node) map[string]*framework.NodeInfo { - nodeNameToInfo := make(map[string]*framework.NodeInfo) - for _, pod := range pods { - nodeName := pod.Spec.NodeName - if _, ok := nodeNameToInfo[nodeName]; !ok { - nodeNameToInfo[nodeName] = framework.NewNodeInfo() - } - nodeNameToInfo[nodeName].AddPod(pod) - } - imageExistenceMap := createImageExistenceMap(nodes) - - for _, node := range nodes { - if _, ok := nodeNameToInfo[node.Name]; !ok { - nodeNameToInfo[node.Name] = framework.NewNodeInfo() - } - nodeInfo := nodeNameToInfo[node.Name] - nodeInfo.SetNode(node) - nodeInfo.ImageStates = getNodeImageStates(node, imageExistenceMap) - } - return nodeNameToInfo -} - -// getNodeImageStates returns the given node's image states based on the given imageExistence map. -func getNodeImageStates(node *v1.Node, imageExistenceMap map[string]sets.String) map[string]*framework.ImageStateSummary { - imageStates := make(map[string]*framework.ImageStateSummary) - - for _, image := range node.Status.Images { - for _, name := range image.Names { - imageStates[name] = &framework.ImageStateSummary{ - Size: image.SizeBytes, - NumNodes: len(imageExistenceMap[name]), - } - } - } - return imageStates -} - -// createImageExistenceMap returns a map recording on which nodes the images exist, keyed by the images' names. -func createImageExistenceMap(nodes []*v1.Node) map[string]sets.String { - imageExistenceMap := make(map[string]sets.String) - for _, node := range nodes { - for _, image := range node.Status.Images { - for _, name := range image.Names { - if _, ok := imageExistenceMap[name]; !ok { - imageExistenceMap[name] = sets.NewString(node.Name) - } else { - imageExistenceMap[name].Insert(node.Name) - } - } - } - } - return imageExistenceMap -} - -// NodeInfos returns a NodeInfoLister. -func (s *Snapshot) NodeInfos() framework.NodeInfoLister { - return s -} - -// NumNodes returns the number of nodes in the snapshot. -func (s *Snapshot) NumNodes() int { - return len(s.nodeInfoList) -} - -// List returns the list of nodes in the snapshot. -func (s *Snapshot) List() ([]*framework.NodeInfo, error) { - return s.nodeInfoList, nil -} - -// HavePodsWithAffinityList returns the list of nodes with at least one pod with inter-pod affinity -func (s *Snapshot) HavePodsWithAffinityList() ([]*framework.NodeInfo, error) { - return s.havePodsWithAffinityNodeInfoList, nil -} - -// HavePodsWithRequiredAntiAffinityList returns the list of nodes with at least one pod with -// required inter-pod anti-affinity -func (s *Snapshot) HavePodsWithRequiredAntiAffinityList() ([]*framework.NodeInfo, error) { - return s.havePodsWithRequiredAntiAffinityNodeInfoList, nil -} - -// Get returns the NodeInfo of the given node name. -func (s *Snapshot) Get(nodeName string) (*framework.NodeInfo, error) { - if v, ok := s.nodeInfoMap[nodeName]; ok && v.Node() != nil { - return v, nil - } - return nil, fmt.Errorf("nodeinfo not found for node name %q", nodeName) -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/heap/heap.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/heap/heap.go deleted file mode 100644 index 49bf9d12388e..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/heap/heap.go +++ /dev/null @@ -1,262 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Below is the implementation of the a heap. The logic is pretty much the same -// as cache.heap, however, this heap does not perform synchronization. It leaves -// synchronization to the SchedulingQueue. - -package heap - -import ( - "container/heap" - "fmt" - - "k8s.io/client-go/tools/cache" - "k8s.io/kubernetes/pkg/scheduler/metrics" -) - -// KeyFunc is a function type to get the key from an object. -type KeyFunc func(obj interface{}) (string, error) - -type heapItem struct { - obj interface{} // The object which is stored in the heap. - index int // The index of the object's key in the Heap.queue. -} - -type itemKeyValue struct { - key string - obj interface{} -} - -// data is an internal struct that implements the standard heap interface -// and keeps the data stored in the heap. -type data struct { - // items is a map from key of the objects to the objects and their index. - // We depend on the property that items in the map are in the queue and vice versa. - items map[string]*heapItem - // queue implements a heap data structure and keeps the order of elements - // according to the heap invariant. The queue keeps the keys of objects stored - // in "items". - queue []string - - // keyFunc is used to make the key used for queued item insertion and retrieval, and - // should be deterministic. - keyFunc KeyFunc - // lessFunc is used to compare two objects in the heap. - lessFunc lessFunc -} - -var ( - _ = heap.Interface(&data{}) // heapData is a standard heap -) - -// Less compares two objects and returns true if the first one should go -// in front of the second one in the heap. -func (h *data) Less(i, j int) bool { - if i > len(h.queue) || j > len(h.queue) { - return false - } - itemi, ok := h.items[h.queue[i]] - if !ok { - return false - } - itemj, ok := h.items[h.queue[j]] - if !ok { - return false - } - return h.lessFunc(itemi.obj, itemj.obj) -} - -// Len returns the number of items in the Heap. -func (h *data) Len() int { return len(h.queue) } - -// Swap implements swapping of two elements in the heap. This is a part of standard -// heap interface and should never be called directly. -func (h *data) Swap(i, j int) { - h.queue[i], h.queue[j] = h.queue[j], h.queue[i] - item := h.items[h.queue[i]] - item.index = i - item = h.items[h.queue[j]] - item.index = j -} - -// Push is supposed to be called by heap.Push only. -func (h *data) Push(kv interface{}) { - keyValue := kv.(*itemKeyValue) - n := len(h.queue) - h.items[keyValue.key] = &heapItem{keyValue.obj, n} - h.queue = append(h.queue, keyValue.key) -} - -// Pop is supposed to be called by heap.Pop only. -func (h *data) Pop() interface{} { - key := h.queue[len(h.queue)-1] - h.queue = h.queue[0 : len(h.queue)-1] - item, ok := h.items[key] - if !ok { - // This is an error - return nil - } - delete(h.items, key) - return item.obj -} - -// Peek is supposed to be called by heap.Peek only. -func (h *data) Peek() interface{} { - if len(h.queue) > 0 { - return h.items[h.queue[0]].obj - } - return nil -} - -// Heap is a producer/consumer queue that implements a heap data structure. -// It can be used to implement priority queues and similar data structures. -type Heap struct { - // data stores objects and has a queue that keeps their ordering according - // to the heap invariant. - data *data - // metricRecorder updates the counter when elements of a heap get added or - // removed, and it does nothing if it's nil - metricRecorder metrics.MetricRecorder -} - -// Add inserts an item, and puts it in the queue. The item is updated if it -// already exists. -func (h *Heap) Add(obj interface{}) error { - key, err := h.data.keyFunc(obj) - if err != nil { - return cache.KeyError{Obj: obj, Err: err} - } - if _, exists := h.data.items[key]; exists { - h.data.items[key].obj = obj - heap.Fix(h.data, h.data.items[key].index) - } else { - heap.Push(h.data, &itemKeyValue{key, obj}) - if h.metricRecorder != nil { - h.metricRecorder.Inc() - } - } - return nil -} - -// AddIfNotPresent inserts an item, and puts it in the queue. If an item with -// the key is present in the map, no changes is made to the item. -func (h *Heap) AddIfNotPresent(obj interface{}) error { - key, err := h.data.keyFunc(obj) - if err != nil { - return cache.KeyError{Obj: obj, Err: err} - } - if _, exists := h.data.items[key]; !exists { - heap.Push(h.data, &itemKeyValue{key, obj}) - if h.metricRecorder != nil { - h.metricRecorder.Inc() - } - } - return nil -} - -// Update is the same as Add in this implementation. When the item does not -// exist, it is added. -func (h *Heap) Update(obj interface{}) error { - return h.Add(obj) -} - -// Delete removes an item. -func (h *Heap) Delete(obj interface{}) error { - key, err := h.data.keyFunc(obj) - if err != nil { - return cache.KeyError{Obj: obj, Err: err} - } - if item, ok := h.data.items[key]; ok { - heap.Remove(h.data, item.index) - if h.metricRecorder != nil { - h.metricRecorder.Dec() - } - return nil - } - return fmt.Errorf("object not found") -} - -// Peek returns the head of the heap without removing it. -func (h *Heap) Peek() interface{} { - return h.data.Peek() -} - -// Pop returns the head of the heap and removes it. -func (h *Heap) Pop() (interface{}, error) { - obj := heap.Pop(h.data) - if obj != nil { - if h.metricRecorder != nil { - h.metricRecorder.Dec() - } - return obj, nil - } - return nil, fmt.Errorf("object was removed from heap data") -} - -// Get returns the requested item, or sets exists=false. -func (h *Heap) Get(obj interface{}) (interface{}, bool, error) { - key, err := h.data.keyFunc(obj) - if err != nil { - return nil, false, cache.KeyError{Obj: obj, Err: err} - } - return h.GetByKey(key) -} - -// GetByKey returns the requested item, or sets exists=false. -func (h *Heap) GetByKey(key string) (interface{}, bool, error) { - item, exists := h.data.items[key] - if !exists { - return nil, false, nil - } - return item.obj, true, nil -} - -// List returns a list of all the items. -func (h *Heap) List() []interface{} { - list := make([]interface{}, 0, len(h.data.items)) - for _, item := range h.data.items { - list = append(list, item.obj) - } - return list -} - -// Len returns the number of items in the heap. -func (h *Heap) Len() int { - return len(h.data.queue) -} - -// New returns a Heap which can be used to queue up items to process. -func New(keyFn KeyFunc, lessFn lessFunc) *Heap { - return NewWithRecorder(keyFn, lessFn, nil) -} - -// NewWithRecorder wraps an optional metricRecorder to compose a Heap object. -func NewWithRecorder(keyFn KeyFunc, lessFn lessFunc, metricRecorder metrics.MetricRecorder) *Heap { - return &Heap{ - data: &data{ - items: map[string]*heapItem{}, - queue: []string{}, - keyFunc: keyFn, - lessFunc: lessFn, - }, - metricRecorder: metricRecorder, - } -} - -// lessFunc is a function that receives two items and returns true if the first -// item should be placed before the second one when the list is sorted. -type lessFunc = func(item1, item2 interface{}) bool diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/queue/events.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/queue/events.go deleted file mode 100644 index f8b8cb29c970..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/queue/events.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -Copyright 2019 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package queue - -import ( - "k8s.io/kubernetes/pkg/scheduler/framework" -) - -const ( - // PodAdd is the event when a new pod is added to API server. - PodAdd = "PodAdd" - // ScheduleAttemptFailure is the event when a schedule attempt fails. - ScheduleAttemptFailure = "ScheduleAttemptFailure" - // BackoffComplete is the event when a pod finishes backoff. - BackoffComplete = "BackoffComplete" - // ForceActivate is the event when a pod is moved from unschedulablePods/backoffQ - // to activeQ. Usually it's triggered by plugin implementations. - ForceActivate = "ForceActivate" -) - -var ( - // AssignedPodAdd is the event when a pod is added that causes pods with matching affinity terms - // to be more schedulable. - AssignedPodAdd = framework.ClusterEvent{Resource: framework.Pod, ActionType: framework.Add, Label: "AssignedPodAdd"} - // NodeAdd is the event when a new node is added to the cluster. - NodeAdd = framework.ClusterEvent{Resource: framework.Node, ActionType: framework.Add, Label: "NodeAdd"} - // AssignedPodUpdate is the event when a pod is updated that causes pods with matching affinity - // terms to be more schedulable. - AssignedPodUpdate = framework.ClusterEvent{Resource: framework.Pod, ActionType: framework.Update, Label: "AssignedPodUpdate"} - // AssignedPodDelete is the event when a pod is deleted that causes pods with matching affinity - // terms to be more schedulable. - AssignedPodDelete = framework.ClusterEvent{Resource: framework.Pod, ActionType: framework.Delete, Label: "AssignedPodDelete"} - // NodeSpecUnschedulableChange is the event when unschedulable node spec is changed. - NodeSpecUnschedulableChange = framework.ClusterEvent{Resource: framework.Node, ActionType: framework.UpdateNodeTaint, Label: "NodeSpecUnschedulableChange"} - // NodeAllocatableChange is the event when node allocatable is changed. - NodeAllocatableChange = framework.ClusterEvent{Resource: framework.Node, ActionType: framework.UpdateNodeAllocatable, Label: "NodeAllocatableChange"} - // NodeLabelChange is the event when node label is changed. - NodeLabelChange = framework.ClusterEvent{Resource: framework.Node, ActionType: framework.UpdateNodeLabel, Label: "NodeLabelChange"} - // NodeTaintChange is the event when node taint is changed. - NodeTaintChange = framework.ClusterEvent{Resource: framework.Node, ActionType: framework.UpdateNodeTaint, Label: "NodeTaintChange"} - // NodeConditionChange is the event when node condition is changed. - NodeConditionChange = framework.ClusterEvent{Resource: framework.Node, ActionType: framework.UpdateNodeCondition, Label: "NodeConditionChange"} - // PvAdd is the event when a persistent volume is added in the cluster. - PvAdd = framework.ClusterEvent{Resource: framework.PersistentVolume, ActionType: framework.Add, Label: "PvAdd"} - // PvUpdate is the event when a persistent volume is updated in the cluster. - PvUpdate = framework.ClusterEvent{Resource: framework.PersistentVolume, ActionType: framework.Update, Label: "PvUpdate"} - // PvcAdd is the event when a persistent volume claim is added in the cluster. - PvcAdd = framework.ClusterEvent{Resource: framework.PersistentVolumeClaim, ActionType: framework.Add, Label: "PvcAdd"} - // PvcUpdate is the event when a persistent volume claim is updated in the cluster. - PvcUpdate = framework.ClusterEvent{Resource: framework.PersistentVolumeClaim, ActionType: framework.Update, Label: "PvcUpdate"} - // StorageClassAdd is the event when a StorageClass is added in the cluster. - StorageClassAdd = framework.ClusterEvent{Resource: framework.StorageClass, ActionType: framework.Add, Label: "StorageClassAdd"} - // StorageClassUpdate is the event when a StorageClass is updated in the cluster. - StorageClassUpdate = framework.ClusterEvent{Resource: framework.StorageClass, ActionType: framework.Update, Label: "StorageClassUpdate"} - // CSINodeAdd is the event when a CSI node is added in the cluster. - CSINodeAdd = framework.ClusterEvent{Resource: framework.CSINode, ActionType: framework.Add, Label: "CSINodeAdd"} - // CSINodeUpdate is the event when a CSI node is updated in the cluster. - CSINodeUpdate = framework.ClusterEvent{Resource: framework.CSINode, ActionType: framework.Update, Label: "CSINodeUpdate"} - // CSIDriverAdd is the event when a CSI driver is added in the cluster. - CSIDriverAdd = framework.ClusterEvent{Resource: framework.CSIDriver, ActionType: framework.Add, Label: "CSIDriverAdd"} - // CSIDriverUpdate is the event when a CSI driver is updated in the cluster. - CSIDriverUpdate = framework.ClusterEvent{Resource: framework.CSIDriver, ActionType: framework.Update, Label: "CSIDriverUpdate"} - // CSIStorageCapacityAdd is the event when a CSI storage capacity is added in the cluster. - CSIStorageCapacityAdd = framework.ClusterEvent{Resource: framework.CSIStorageCapacity, ActionType: framework.Add, Label: "CSIStorageCapacityAdd"} - // CSIStorageCapacityUpdate is the event when a CSI storage capacity is updated in the cluster. - CSIStorageCapacityUpdate = framework.ClusterEvent{Resource: framework.CSIStorageCapacity, ActionType: framework.Update, Label: "CSIStorageCapacityUpdate"} - // ServiceAdd is the event when a service is added in the cluster. - ServiceAdd = framework.ClusterEvent{Resource: framework.Service, ActionType: framework.Add, Label: "ServiceAdd"} - // ServiceUpdate is the event when a service is updated in the cluster. - ServiceUpdate = framework.ClusterEvent{Resource: framework.Service, ActionType: framework.Update, Label: "ServiceUpdate"} - // ServiceDelete is the event when a service is deleted in the cluster. - ServiceDelete = framework.ClusterEvent{Resource: framework.Service, ActionType: framework.Delete, Label: "ServiceDelete"} - // WildCardEvent semantically matches all resources on all actions. - WildCardEvent = framework.ClusterEvent{Resource: framework.WildCard, ActionType: framework.All, Label: "WildCardEvent"} - // UnschedulableTimeout is the event when a pod stays in unschedulable for longer than timeout. - UnschedulableTimeout = framework.ClusterEvent{Resource: framework.WildCard, ActionType: framework.All, Label: "UnschedulableTimeout"} -) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/queue/scheduling_queue.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/queue/scheduling_queue.go deleted file mode 100644 index 957b27b93c36..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/queue/scheduling_queue.go +++ /dev/null @@ -1,1008 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file contains structures that implement scheduling queue types. -// Scheduling queues hold pods waiting to be scheduled. This file implements a -// priority queue which has two sub queues and a additional data structure, -// namely: activeQ, backoffQ and unschedulablePods. -// - activeQ holds pods that are being considered for scheduling. -// - backoffQ holds pods that moved from unschedulablePods and will move to -// activeQ when their backoff periods complete. -// - unschedulablePods holds pods that were already attempted for scheduling and -// are currently determined to be unschedulable. - -package queue - -import ( - "fmt" - "reflect" - "sync" - "time" - - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/client-go/informers" - listersv1 "k8s.io/client-go/listers/core/v1" - "k8s.io/client-go/tools/cache" - "k8s.io/klog/v2" - "k8s.io/kubernetes/pkg/scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework/plugins/interpodaffinity" - "k8s.io/kubernetes/pkg/scheduler/internal/heap" - "k8s.io/kubernetes/pkg/scheduler/metrics" - "k8s.io/kubernetes/pkg/scheduler/util" -) - -const ( - // DefaultPodMaxInUnschedulablePodsDuration is the default value for the maximum - // time a pod can stay in unschedulablePods. If a pod stays in unschedulablePods - // for longer than this value, the pod will be moved from unschedulablePods to - // backoffQ or activeQ. If this value is empty, the default value (5min) - // will be used. - DefaultPodMaxInUnschedulablePodsDuration time.Duration = 5 * time.Minute - - queueClosed = "scheduling queue is closed" -) - -const ( - // DefaultPodInitialBackoffDuration is the default value for the initial backoff duration - // for unschedulable pods. To change the default podInitialBackoffDurationSeconds used by the - // scheduler, update the ComponentConfig value in defaults.go - DefaultPodInitialBackoffDuration time.Duration = 1 * time.Second - // DefaultPodMaxBackoffDuration is the default value for the max backoff duration - // for unschedulable pods. To change the default podMaxBackoffDurationSeconds used by the - // scheduler, update the ComponentConfig value in defaults.go - DefaultPodMaxBackoffDuration time.Duration = 10 * time.Second -) - -// PreEnqueueCheck is a function type. It's used to build functions that -// run against a Pod and the caller can choose to enqueue or skip the Pod -// by the checking result. -type PreEnqueueCheck func(pod *v1.Pod) bool - -// SchedulingQueue is an interface for a queue to store pods waiting to be scheduled. -// The interface follows a pattern similar to cache.FIFO and cache.Heap and -// makes it easy to use those data structures as a SchedulingQueue. -type SchedulingQueue interface { - framework.PodNominator - Add(pod *v1.Pod) error - // Activate moves the given pods to activeQ iff they're in unschedulablePods or backoffQ. - // The passed-in pods are originally compiled from plugins that want to activate Pods, - // by injecting the pods through a reserved CycleState struct (PodsToActivate). - Activate(pods map[string]*v1.Pod) - // AddUnschedulableIfNotPresent adds an unschedulable pod back to scheduling queue. - // The podSchedulingCycle represents the current scheduling cycle number which can be - // returned by calling SchedulingCycle(). - AddUnschedulableIfNotPresent(pod *framework.QueuedPodInfo, podSchedulingCycle int64) error - // SchedulingCycle returns the current number of scheduling cycle which is - // cached by scheduling queue. Normally, incrementing this number whenever - // a pod is popped (e.g. called Pop()) is enough. - SchedulingCycle() int64 - // Pop removes the head of the queue and returns it. It blocks if the - // queue is empty and waits until a new item is added to the queue. - Pop() (*framework.QueuedPodInfo, error) - Update(oldPod, newPod *v1.Pod) error - Delete(pod *v1.Pod) error - MoveAllToActiveOrBackoffQueue(event framework.ClusterEvent, preCheck PreEnqueueCheck) - AssignedPodAdded(pod *v1.Pod) - AssignedPodUpdated(pod *v1.Pod) - PendingPods() []*v1.Pod - // Close closes the SchedulingQueue so that the goroutine which is - // waiting to pop items can exit gracefully. - Close() - // Run starts the goroutines managing the queue. - Run() -} - -// NewSchedulingQueue initializes a priority queue as a new scheduling queue. -func NewSchedulingQueue( - lessFn framework.LessFunc, - informerFactory informers.SharedInformerFactory, - opts ...Option) SchedulingQueue { - return NewPriorityQueue(lessFn, informerFactory, opts...) -} - -// NominatedNodeName returns nominated node name of a Pod. -func NominatedNodeName(pod *v1.Pod) string { - return pod.Status.NominatedNodeName -} - -// PriorityQueue implements a scheduling queue. -// The head of PriorityQueue is the highest priority pending pod. This structure -// has two sub queues and a additional data structure, namely: activeQ, -// backoffQ and unschedulablePods. -// - activeQ holds pods that are being considered for scheduling. -// - backoffQ holds pods that moved from unschedulablePods and will move to -// activeQ when their backoff periods complete. -// - unschedulablePods holds pods that were already attempted for scheduling and -// are currently determined to be unschedulable. -type PriorityQueue struct { - // PodNominator abstracts the operations to maintain nominated Pods. - framework.PodNominator - - stop chan struct{} - clock util.Clock - - // pod initial backoff duration. - podInitialBackoffDuration time.Duration - // pod maximum backoff duration. - podMaxBackoffDuration time.Duration - // the maximum time a pod can stay in the unschedulablePods. - podMaxInUnschedulablePodsDuration time.Duration - - lock sync.RWMutex - cond sync.Cond - - // activeQ is heap structure that scheduler actively looks at to find pods to - // schedule. Head of heap is the highest priority pod. - activeQ *heap.Heap - // podBackoffQ is a heap ordered by backoff expiry. Pods which have completed backoff - // are popped from this heap before the scheduler looks at activeQ - podBackoffQ *heap.Heap - // unschedulablePods holds pods that have been tried and determined unschedulable. - unschedulablePods *UnschedulablePods - // schedulingCycle represents sequence number of scheduling cycle and is incremented - // when a pod is popped. - schedulingCycle int64 - // moveRequestCycle caches the sequence number of scheduling cycle when we - // received a move request. Unschedulable pods in and before this scheduling - // cycle will be put back to activeQueue if we were trying to schedule them - // when we received move request. - moveRequestCycle int64 - - clusterEventMap map[framework.ClusterEvent]sets.String - - // closed indicates that the queue is closed. - // It is mainly used to let Pop() exit its control loop while waiting for an item. - closed bool - - nsLister listersv1.NamespaceLister -} - -type priorityQueueOptions struct { - clock util.Clock - podInitialBackoffDuration time.Duration - podMaxBackoffDuration time.Duration - podMaxInUnschedulablePodsDuration time.Duration - podNominator framework.PodNominator - clusterEventMap map[framework.ClusterEvent]sets.String -} - -// Option configures a PriorityQueue -type Option func(*priorityQueueOptions) - -// WithClock sets clock for PriorityQueue, the default clock is util.RealClock. -func WithClock(clock util.Clock) Option { - return func(o *priorityQueueOptions) { - o.clock = clock - } -} - -// WithPodInitialBackoffDuration sets pod initial backoff duration for PriorityQueue. -func WithPodInitialBackoffDuration(duration time.Duration) Option { - return func(o *priorityQueueOptions) { - o.podInitialBackoffDuration = duration - } -} - -// WithPodMaxBackoffDuration sets pod max backoff duration for PriorityQueue. -func WithPodMaxBackoffDuration(duration time.Duration) Option { - return func(o *priorityQueueOptions) { - o.podMaxBackoffDuration = duration - } -} - -// WithPodNominator sets pod nominator for PriorityQueue. -func WithPodNominator(pn framework.PodNominator) Option { - return func(o *priorityQueueOptions) { - o.podNominator = pn - } -} - -// WithClusterEventMap sets clusterEventMap for PriorityQueue. -func WithClusterEventMap(m map[framework.ClusterEvent]sets.String) Option { - return func(o *priorityQueueOptions) { - o.clusterEventMap = m - } -} - -// WithPodMaxInUnschedulablePodsDuration sets podMaxInUnschedulablePodsDuration for PriorityQueue. -func WithPodMaxInUnschedulablePodsDuration(duration time.Duration) Option { - return func(o *priorityQueueOptions) { - o.podMaxInUnschedulablePodsDuration = duration - } -} - -var defaultPriorityQueueOptions = priorityQueueOptions{ - clock: util.RealClock{}, - podInitialBackoffDuration: DefaultPodInitialBackoffDuration, - podMaxBackoffDuration: DefaultPodMaxBackoffDuration, - podMaxInUnschedulablePodsDuration: DefaultPodMaxInUnschedulablePodsDuration, -} - -// Making sure that PriorityQueue implements SchedulingQueue. -var _ SchedulingQueue = &PriorityQueue{} - -// newQueuedPodInfoForLookup builds a QueuedPodInfo object for a lookup in the queue. -func newQueuedPodInfoForLookup(pod *v1.Pod, plugins ...string) *framework.QueuedPodInfo { - // Since this is only used for a lookup in the queue, we only need to set the Pod, - // and so we avoid creating a full PodInfo, which is expensive to instantiate frequently. - return &framework.QueuedPodInfo{ - PodInfo: &framework.PodInfo{Pod: pod}, - UnschedulablePlugins: sets.NewString(plugins...), - } -} - -// NewPriorityQueue creates a PriorityQueue object. -func NewPriorityQueue( - lessFn framework.LessFunc, - informerFactory informers.SharedInformerFactory, - opts ...Option, -) *PriorityQueue { - options := defaultPriorityQueueOptions - for _, opt := range opts { - opt(&options) - } - - comp := func(podInfo1, podInfo2 interface{}) bool { - pInfo1 := podInfo1.(*framework.QueuedPodInfo) - pInfo2 := podInfo2.(*framework.QueuedPodInfo) - return lessFn(pInfo1, pInfo2) - } - - if options.podNominator == nil { - options.podNominator = NewPodNominator(informerFactory.Core().V1().Pods().Lister()) - } - - pq := &PriorityQueue{ - PodNominator: options.podNominator, - clock: options.clock, - stop: make(chan struct{}), - podInitialBackoffDuration: options.podInitialBackoffDuration, - podMaxBackoffDuration: options.podMaxBackoffDuration, - podMaxInUnschedulablePodsDuration: options.podMaxInUnschedulablePodsDuration, - activeQ: heap.NewWithRecorder(podInfoKeyFunc, comp, metrics.NewActivePodsRecorder()), - unschedulablePods: newUnschedulablePods(metrics.NewUnschedulablePodsRecorder()), - moveRequestCycle: -1, - clusterEventMap: options.clusterEventMap, - } - pq.cond.L = &pq.lock - pq.podBackoffQ = heap.NewWithRecorder(podInfoKeyFunc, pq.podsCompareBackoffCompleted, metrics.NewBackoffPodsRecorder()) - pq.nsLister = informerFactory.Core().V1().Namespaces().Lister() - - return pq -} - -// Run starts the goroutine to pump from podBackoffQ to activeQ -func (p *PriorityQueue) Run() { - go wait.Until(p.flushBackoffQCompleted, 1.0*time.Second, p.stop) - go wait.Until(p.flushUnschedulablePodsLeftover, 30*time.Second, p.stop) -} - -// Add adds a pod to the active queue. It should be called only when a new pod -// is added so there is no chance the pod is already in active/unschedulable/backoff queues -func (p *PriorityQueue) Add(pod *v1.Pod) error { - p.lock.Lock() - defer p.lock.Unlock() - pInfo := p.newQueuedPodInfo(pod) - if err := p.activeQ.Add(pInfo); err != nil { - klog.ErrorS(err, "Error adding pod to the active queue", "pod", klog.KObj(pod)) - return err - } - if p.unschedulablePods.get(pod) != nil { - klog.ErrorS(nil, "Error: pod is already in the unschedulable queue", "pod", klog.KObj(pod)) - p.unschedulablePods.delete(pod) - } - // Delete pod from backoffQ if it is backing off - if err := p.podBackoffQ.Delete(pInfo); err == nil { - klog.ErrorS(nil, "Error: pod is already in the podBackoff queue", "pod", klog.KObj(pod)) - } - metrics.SchedulerQueueIncomingPods.WithLabelValues("active", PodAdd).Inc() - p.PodNominator.AddNominatedPod(pInfo.PodInfo, nil) - p.cond.Broadcast() - - return nil -} - -// Activate moves the given pods to activeQ iff they're in unschedulablePods or backoffQ. -func (p *PriorityQueue) Activate(pods map[string]*v1.Pod) { - p.lock.Lock() - defer p.lock.Unlock() - - activated := false - for _, pod := range pods { - if p.activate(pod) { - activated = true - } - } - - if activated { - p.cond.Broadcast() - } -} - -func (p *PriorityQueue) activate(pod *v1.Pod) bool { - // Verify if the pod is present in activeQ. - if _, exists, _ := p.activeQ.Get(newQueuedPodInfoForLookup(pod)); exists { - // No need to activate if it's already present in activeQ. - return false - } - var pInfo *framework.QueuedPodInfo - // Verify if the pod is present in unschedulablePods or backoffQ. - if pInfo = p.unschedulablePods.get(pod); pInfo == nil { - // If the pod doesn't belong to unschedulablePods or backoffQ, don't activate it. - if obj, exists, _ := p.podBackoffQ.Get(newQueuedPodInfoForLookup(pod)); !exists { - klog.ErrorS(nil, "To-activate pod does not exist in unschedulablePods or backoffQ", "pod", klog.KObj(pod)) - return false - } else { - pInfo = obj.(*framework.QueuedPodInfo) - } - } - - if pInfo == nil { - // Redundant safe check. We shouldn't reach here. - klog.ErrorS(nil, "Internal error: cannot obtain pInfo") - return false - } - - if err := p.activeQ.Add(pInfo); err != nil { - klog.ErrorS(err, "Error adding pod to the scheduling queue", "pod", klog.KObj(pod)) - return false - } - p.unschedulablePods.delete(pod) - p.podBackoffQ.Delete(pInfo) - metrics.SchedulerQueueIncomingPods.WithLabelValues("active", ForceActivate).Inc() - p.PodNominator.AddNominatedPod(pInfo.PodInfo, nil) - return true -} - -// isPodBackingoff returns true if a pod is still waiting for its backoff timer. -// If this returns true, the pod should not be re-tried. -func (p *PriorityQueue) isPodBackingoff(podInfo *framework.QueuedPodInfo) bool { - boTime := p.getBackoffTime(podInfo) - return boTime.After(p.clock.Now()) -} - -// SchedulingCycle returns current scheduling cycle. -func (p *PriorityQueue) SchedulingCycle() int64 { - p.lock.RLock() - defer p.lock.RUnlock() - return p.schedulingCycle -} - -// AddUnschedulableIfNotPresent inserts a pod that cannot be scheduled into -// the queue, unless it is already in the queue. Normally, PriorityQueue puts -// unschedulable pods in `unschedulablePods`. But if there has been a recent move -// request, then the pod is put in `podBackoffQ`. -func (p *PriorityQueue) AddUnschedulableIfNotPresent(pInfo *framework.QueuedPodInfo, podSchedulingCycle int64) error { - p.lock.Lock() - defer p.lock.Unlock() - pod := pInfo.Pod - if p.unschedulablePods.get(pod) != nil { - return fmt.Errorf("Pod %v is already present in unschedulable queue", klog.KObj(pod)) - } - - if _, exists, _ := p.activeQ.Get(pInfo); exists { - return fmt.Errorf("Pod %v is already present in the active queue", klog.KObj(pod)) - } - if _, exists, _ := p.podBackoffQ.Get(pInfo); exists { - return fmt.Errorf("Pod %v is already present in the backoff queue", klog.KObj(pod)) - } - - // Refresh the timestamp since the pod is re-added. - pInfo.Timestamp = p.clock.Now() - - // If a move request has been received, move it to the BackoffQ, otherwise move - // it to unschedulablePods. - for plugin := range pInfo.UnschedulablePlugins { - metrics.UnschedulableReason(plugin, pInfo.Pod.Spec.SchedulerName).Inc() - } - if p.moveRequestCycle >= podSchedulingCycle { - if err := p.podBackoffQ.Add(pInfo); err != nil { - return fmt.Errorf("error adding pod %v to the backoff queue: %v", pod.Name, err) - } - metrics.SchedulerQueueIncomingPods.WithLabelValues("backoff", ScheduleAttemptFailure).Inc() - } else { - p.unschedulablePods.addOrUpdate(pInfo) - metrics.SchedulerQueueIncomingPods.WithLabelValues("unschedulable", ScheduleAttemptFailure).Inc() - - } - - p.PodNominator.AddNominatedPod(pInfo.PodInfo, nil) - return nil -} - -// flushBackoffQCompleted Moves all pods from backoffQ which have completed backoff in to activeQ -func (p *PriorityQueue) flushBackoffQCompleted() { - p.lock.Lock() - defer p.lock.Unlock() - broadcast := false - for { - rawPodInfo := p.podBackoffQ.Peek() - if rawPodInfo == nil { - break - } - pod := rawPodInfo.(*framework.QueuedPodInfo).Pod - boTime := p.getBackoffTime(rawPodInfo.(*framework.QueuedPodInfo)) - if boTime.After(p.clock.Now()) { - break - } - _, err := p.podBackoffQ.Pop() - if err != nil { - klog.ErrorS(err, "Unable to pop pod from backoff queue despite backoff completion", "pod", klog.KObj(pod)) - break - } - p.activeQ.Add(rawPodInfo) - metrics.SchedulerQueueIncomingPods.WithLabelValues("active", BackoffComplete).Inc() - broadcast = true - } - - if broadcast { - p.cond.Broadcast() - } -} - -// flushUnschedulablePodsLeftover moves pods which stay in unschedulablePods -// longer than podMaxInUnschedulablePodsDuration to backoffQ or activeQ. -func (p *PriorityQueue) flushUnschedulablePodsLeftover() { - p.lock.Lock() - defer p.lock.Unlock() - - var podsToMove []*framework.QueuedPodInfo - currentTime := p.clock.Now() - for _, pInfo := range p.unschedulablePods.podInfoMap { - lastScheduleTime := pInfo.Timestamp - if currentTime.Sub(lastScheduleTime) > p.podMaxInUnschedulablePodsDuration { - podsToMove = append(podsToMove, pInfo) - } - } - - if len(podsToMove) > 0 { - p.movePodsToActiveOrBackoffQueue(podsToMove, UnschedulableTimeout) - } -} - -// Pop removes the head of the active queue and returns it. It blocks if the -// activeQ is empty and waits until a new item is added to the queue. It -// increments scheduling cycle when a pod is popped. -func (p *PriorityQueue) Pop() (*framework.QueuedPodInfo, error) { - p.lock.Lock() - defer p.lock.Unlock() - for p.activeQ.Len() == 0 { - // When the queue is empty, invocation of Pop() is blocked until new item is enqueued. - // When Close() is called, the p.closed is set and the condition is broadcast, - // which causes this loop to continue and return from the Pop(). - if p.closed { - return nil, fmt.Errorf(queueClosed) - } - p.cond.Wait() - } - obj, err := p.activeQ.Pop() - if err != nil { - return nil, err - } - pInfo := obj.(*framework.QueuedPodInfo) - pInfo.Attempts++ - p.schedulingCycle++ - return pInfo, nil -} - -// isPodUpdated checks if the pod is updated in a way that it may have become -// schedulable. It drops status of the pod and compares it with old version. -func isPodUpdated(oldPod, newPod *v1.Pod) bool { - strip := func(pod *v1.Pod) *v1.Pod { - p := pod.DeepCopy() - p.ResourceVersion = "" - p.Generation = 0 - p.Status = v1.PodStatus{} - p.ManagedFields = nil - p.Finalizers = nil - return p - } - return !reflect.DeepEqual(strip(oldPod), strip(newPod)) -} - -// Update updates a pod in the active or backoff queue if present. Otherwise, it removes -// the item from the unschedulable queue if pod is updated in a way that it may -// become schedulable and adds the updated one to the active queue. -// If pod is not present in any of the queues, it is added to the active queue. -func (p *PriorityQueue) Update(oldPod, newPod *v1.Pod) error { - p.lock.Lock() - defer p.lock.Unlock() - - if oldPod != nil { - oldPodInfo := newQueuedPodInfoForLookup(oldPod) - // If the pod is already in the active queue, just update it there. - if oldPodInfo, exists, _ := p.activeQ.Get(oldPodInfo); exists { - pInfo := updatePod(oldPodInfo, newPod) - p.PodNominator.UpdateNominatedPod(oldPod, pInfo.PodInfo) - return p.activeQ.Update(pInfo) - } - - // If the pod is in the backoff queue, update it there. - if oldPodInfo, exists, _ := p.podBackoffQ.Get(oldPodInfo); exists { - pInfo := updatePod(oldPodInfo, newPod) - p.PodNominator.UpdateNominatedPod(oldPod, pInfo.PodInfo) - return p.podBackoffQ.Update(pInfo) - } - } - - // If the pod is in the unschedulable queue, updating it may make it schedulable. - if usPodInfo := p.unschedulablePods.get(newPod); usPodInfo != nil { - pInfo := updatePod(usPodInfo, newPod) - p.PodNominator.UpdateNominatedPod(oldPod, pInfo.PodInfo) - if isPodUpdated(oldPod, newPod) { - if p.isPodBackingoff(usPodInfo) { - if err := p.podBackoffQ.Add(pInfo); err != nil { - return err - } - p.unschedulablePods.delete(usPodInfo.Pod) - } else { - if err := p.activeQ.Add(pInfo); err != nil { - return err - } - p.unschedulablePods.delete(usPodInfo.Pod) - p.cond.Broadcast() - } - } else { - // Pod update didn't make it schedulable, keep it in the unschedulable queue. - p.unschedulablePods.addOrUpdate(pInfo) - } - - return nil - } - // If pod is not in any of the queues, we put it in the active queue. - pInfo := p.newQueuedPodInfo(newPod) - if err := p.activeQ.Add(pInfo); err != nil { - return err - } - p.PodNominator.AddNominatedPod(pInfo.PodInfo, nil) - p.cond.Broadcast() - return nil -} - -// Delete deletes the item from either of the two queues. It assumes the pod is -// only in one queue. -func (p *PriorityQueue) Delete(pod *v1.Pod) error { - p.lock.Lock() - defer p.lock.Unlock() - p.PodNominator.DeleteNominatedPodIfExists(pod) - if err := p.activeQ.Delete(newQueuedPodInfoForLookup(pod)); err != nil { - // The item was probably not found in the activeQ. - p.podBackoffQ.Delete(newQueuedPodInfoForLookup(pod)) - p.unschedulablePods.delete(pod) - } - return nil -} - -// AssignedPodAdded is called when a bound pod is added. Creation of this pod -// may make pending pods with matching affinity terms schedulable. -func (p *PriorityQueue) AssignedPodAdded(pod *v1.Pod) { - p.lock.Lock() - p.movePodsToActiveOrBackoffQueue(p.getUnschedulablePodsWithMatchingAffinityTerm(pod), AssignedPodAdd) - p.lock.Unlock() -} - -// AssignedPodUpdated is called when a bound pod is updated. Change of labels -// may make pending pods with matching affinity terms schedulable. -func (p *PriorityQueue) AssignedPodUpdated(pod *v1.Pod) { - p.lock.Lock() - p.movePodsToActiveOrBackoffQueue(p.getUnschedulablePodsWithMatchingAffinityTerm(pod), AssignedPodUpdate) - p.lock.Unlock() -} - -// MoveAllToActiveOrBackoffQueue moves all pods from unschedulablePods to activeQ or backoffQ. -// This function adds all pods and then signals the condition variable to ensure that -// if Pop() is waiting for an item, it receives the signal after all the pods are in the -// queue and the head is the highest priority pod. -func (p *PriorityQueue) MoveAllToActiveOrBackoffQueue(event framework.ClusterEvent, preCheck PreEnqueueCheck) { - p.lock.Lock() - defer p.lock.Unlock() - unschedulablePods := make([]*framework.QueuedPodInfo, 0, len(p.unschedulablePods.podInfoMap)) - for _, pInfo := range p.unschedulablePods.podInfoMap { - if preCheck == nil || preCheck(pInfo.Pod) { - unschedulablePods = append(unschedulablePods, pInfo) - } - } - p.movePodsToActiveOrBackoffQueue(unschedulablePods, event) -} - -// NOTE: this function assumes lock has been acquired in caller -func (p *PriorityQueue) movePodsToActiveOrBackoffQueue(podInfoList []*framework.QueuedPodInfo, event framework.ClusterEvent) { - moved := false - for _, pInfo := range podInfoList { - // If the event doesn't help making the Pod schedulable, continue. - // Note: we don't run the check if pInfo.UnschedulablePlugins is nil, which denotes - // either there is some abnormal error, or scheduling the pod failed by plugins other than PreFilter, Filter and Permit. - // In that case, it's desired to move it anyways. - if len(pInfo.UnschedulablePlugins) != 0 && !p.podMatchesEvent(pInfo, event) { - continue - } - moved = true - pod := pInfo.Pod - if p.isPodBackingoff(pInfo) { - if err := p.podBackoffQ.Add(pInfo); err != nil { - klog.ErrorS(err, "Error adding pod to the backoff queue", "pod", klog.KObj(pod)) - } else { - metrics.SchedulerQueueIncomingPods.WithLabelValues("backoff", event.Label).Inc() - p.unschedulablePods.delete(pod) - } - } else { - if err := p.activeQ.Add(pInfo); err != nil { - klog.ErrorS(err, "Error adding pod to the scheduling queue", "pod", klog.KObj(pod)) - } else { - metrics.SchedulerQueueIncomingPods.WithLabelValues("active", event.Label).Inc() - p.unschedulablePods.delete(pod) - } - } - } - p.moveRequestCycle = p.schedulingCycle - if moved { - p.cond.Broadcast() - } -} - -// getUnschedulablePodsWithMatchingAffinityTerm returns unschedulable pods which have -// any affinity term that matches "pod". -// NOTE: this function assumes lock has been acquired in caller. -func (p *PriorityQueue) getUnschedulablePodsWithMatchingAffinityTerm(pod *v1.Pod) []*framework.QueuedPodInfo { - var nsLabels labels.Set - nsLabels = interpodaffinity.GetNamespaceLabelsSnapshot(pod.Namespace, p.nsLister) - - var podsToMove []*framework.QueuedPodInfo - for _, pInfo := range p.unschedulablePods.podInfoMap { - for _, term := range pInfo.RequiredAffinityTerms { - if term.Matches(pod, nsLabels) { - podsToMove = append(podsToMove, pInfo) - break - } - } - - } - return podsToMove -} - -// PendingPods returns all the pending pods in the queue. This function is -// used for debugging purposes in the scheduler cache dumper and comparer. -func (p *PriorityQueue) PendingPods() []*v1.Pod { - p.lock.RLock() - defer p.lock.RUnlock() - var result []*v1.Pod - for _, pInfo := range p.activeQ.List() { - result = append(result, pInfo.(*framework.QueuedPodInfo).Pod) - } - for _, pInfo := range p.podBackoffQ.List() { - result = append(result, pInfo.(*framework.QueuedPodInfo).Pod) - } - for _, pInfo := range p.unschedulablePods.podInfoMap { - result = append(result, pInfo.Pod) - } - return result -} - -// Close closes the priority queue. -func (p *PriorityQueue) Close() { - p.lock.Lock() - defer p.lock.Unlock() - close(p.stop) - p.closed = true - p.cond.Broadcast() -} - -// DeleteNominatedPodIfExists deletes from nominatedPods. -func (npm *nominator) DeleteNominatedPodIfExists(pod *v1.Pod) { - npm.Lock() - npm.delete(pod) - npm.Unlock() -} - -// AddNominatedPod adds a pod to the nominated pods of the given node. -// This is called during the preemption process after a node is nominated to run -// the pod. We update the structure before sending a request to update the pod -// object to avoid races with the following scheduling cycles. -func (npm *nominator) AddNominatedPod(pi *framework.PodInfo, nominatingInfo *framework.NominatingInfo) { - npm.Lock() - npm.add(pi, nominatingInfo) - npm.Unlock() -} - -// NominatedPodsForNode returns a copy of pods that are nominated to run on the given node, -// but they are waiting for other pods to be removed from the node. -func (npm *nominator) NominatedPodsForNode(nodeName string) []*framework.PodInfo { - npm.RLock() - defer npm.RUnlock() - // Make a copy of the nominated Pods so the caller can mutate safely. - pods := make([]*framework.PodInfo, len(npm.nominatedPods[nodeName])) - for i := 0; i < len(pods); i++ { - pods[i] = npm.nominatedPods[nodeName][i].DeepCopy() - } - return pods -} - -func (p *PriorityQueue) podsCompareBackoffCompleted(podInfo1, podInfo2 interface{}) bool { - pInfo1 := podInfo1.(*framework.QueuedPodInfo) - pInfo2 := podInfo2.(*framework.QueuedPodInfo) - bo1 := p.getBackoffTime(pInfo1) - bo2 := p.getBackoffTime(pInfo2) - return bo1.Before(bo2) -} - -// newQueuedPodInfo builds a QueuedPodInfo object. -func (p *PriorityQueue) newQueuedPodInfo(pod *v1.Pod, plugins ...string) *framework.QueuedPodInfo { - now := p.clock.Now() - return &framework.QueuedPodInfo{ - PodInfo: framework.NewPodInfo(pod), - Timestamp: now, - InitialAttemptTimestamp: now, - UnschedulablePlugins: sets.NewString(plugins...), - } -} - -// getBackoffTime returns the time that podInfo completes backoff -func (p *PriorityQueue) getBackoffTime(podInfo *framework.QueuedPodInfo) time.Time { - duration := p.calculateBackoffDuration(podInfo) - backoffTime := podInfo.Timestamp.Add(duration) - return backoffTime -} - -// calculateBackoffDuration is a helper function for calculating the backoffDuration -// based on the number of attempts the pod has made. -func (p *PriorityQueue) calculateBackoffDuration(podInfo *framework.QueuedPodInfo) time.Duration { - duration := p.podInitialBackoffDuration - for i := 1; i < podInfo.Attempts; i++ { - // Use subtraction instead of addition or multiplication to avoid overflow. - if duration > p.podMaxBackoffDuration-duration { - return p.podMaxBackoffDuration - } - duration += duration - } - return duration -} - -func updatePod(oldPodInfo interface{}, newPod *v1.Pod) *framework.QueuedPodInfo { - pInfo := oldPodInfo.(*framework.QueuedPodInfo) - pInfo.Update(newPod) - return pInfo -} - -// UnschedulablePods holds pods that cannot be scheduled. This data structure -// is used to implement unschedulablePods. -type UnschedulablePods struct { - // podInfoMap is a map key by a pod's full-name and the value is a pointer to the QueuedPodInfo. - podInfoMap map[string]*framework.QueuedPodInfo - keyFunc func(*v1.Pod) string - // metricRecorder updates the counter when elements of an unschedulablePodsMap - // get added or removed, and it does nothing if it's nil - metricRecorder metrics.MetricRecorder -} - -// Add adds a pod to the unschedulable podInfoMap. -func (u *UnschedulablePods) addOrUpdate(pInfo *framework.QueuedPodInfo) { - podID := u.keyFunc(pInfo.Pod) - if _, exists := u.podInfoMap[podID]; !exists && u.metricRecorder != nil { - u.metricRecorder.Inc() - } - u.podInfoMap[podID] = pInfo -} - -// Delete deletes a pod from the unschedulable podInfoMap. -func (u *UnschedulablePods) delete(pod *v1.Pod) { - podID := u.keyFunc(pod) - if _, exists := u.podInfoMap[podID]; exists && u.metricRecorder != nil { - u.metricRecorder.Dec() - } - delete(u.podInfoMap, podID) -} - -// Get returns the QueuedPodInfo if a pod with the same key as the key of the given "pod" -// is found in the map. It returns nil otherwise. -func (u *UnschedulablePods) get(pod *v1.Pod) *framework.QueuedPodInfo { - podKey := u.keyFunc(pod) - if pInfo, exists := u.podInfoMap[podKey]; exists { - return pInfo - } - return nil -} - -// Clear removes all the entries from the unschedulable podInfoMap. -func (u *UnschedulablePods) clear() { - u.podInfoMap = make(map[string]*framework.QueuedPodInfo) - if u.metricRecorder != nil { - u.metricRecorder.Clear() - } -} - -// newUnschedulablePods initializes a new object of UnschedulablePods. -func newUnschedulablePods(metricRecorder metrics.MetricRecorder) *UnschedulablePods { - return &UnschedulablePods{ - podInfoMap: make(map[string]*framework.QueuedPodInfo), - keyFunc: util.GetPodFullName, - metricRecorder: metricRecorder, - } -} - -// nominator is a structure that stores pods nominated to run on nodes. -// It exists because nominatedNodeName of pod objects stored in the structure -// may be different than what scheduler has here. We should be able to find pods -// by their UID and update/delete them. -type nominator struct { - // podLister is used to verify if the given pod is alive. - podLister listersv1.PodLister - // nominatedPods is a map keyed by a node name and the value is a list of - // pods which are nominated to run on the node. These are pods which can be in - // the activeQ or unschedulablePods. - nominatedPods map[string][]*framework.PodInfo - // nominatedPodToNode is map keyed by a Pod UID to the node name where it is - // nominated. - nominatedPodToNode map[types.UID]string - - sync.RWMutex -} - -func (npm *nominator) add(pi *framework.PodInfo, nominatingInfo *framework.NominatingInfo) { - // Always delete the pod if it already exists, to ensure we never store more than - // one instance of the pod. - npm.delete(pi.Pod) - - var nodeName string - if nominatingInfo.Mode() == framework.ModeOverride { - nodeName = nominatingInfo.NominatedNodeName - } else if nominatingInfo.Mode() == framework.ModeNoop { - if pi.Pod.Status.NominatedNodeName == "" { - return - } - nodeName = pi.Pod.Status.NominatedNodeName - } - - if npm.podLister != nil { - // If the pod was removed or if it was already scheduled, don't nominate it. - updatedPod, err := npm.podLister.Pods(pi.Pod.Namespace).Get(pi.Pod.Name) - if err != nil { - klog.V(4).InfoS("Pod doesn't exist in podLister, aborted adding it to the nominator", "pod", klog.KObj(pi.Pod)) - return - } - if updatedPod.Spec.NodeName != "" { - klog.V(4).InfoS("Pod is already scheduled to a node, aborted adding it to the nominator", "pod", klog.KObj(pi.Pod), "node", updatedPod.Spec.NodeName) - return - } - } - - npm.nominatedPodToNode[pi.Pod.UID] = nodeName - for _, npi := range npm.nominatedPods[nodeName] { - if npi.Pod.UID == pi.Pod.UID { - klog.V(4).InfoS("Pod already exists in the nominator", "pod", klog.KObj(npi.Pod)) - return - } - } - npm.nominatedPods[nodeName] = append(npm.nominatedPods[nodeName], pi) -} - -func (npm *nominator) delete(p *v1.Pod) { - nnn, ok := npm.nominatedPodToNode[p.UID] - if !ok { - return - } - for i, np := range npm.nominatedPods[nnn] { - if np.Pod.UID == p.UID { - npm.nominatedPods[nnn] = append(npm.nominatedPods[nnn][:i], npm.nominatedPods[nnn][i+1:]...) - if len(npm.nominatedPods[nnn]) == 0 { - delete(npm.nominatedPods, nnn) - } - break - } - } - delete(npm.nominatedPodToNode, p.UID) -} - -// UpdateNominatedPod updates the with . -func (npm *nominator) UpdateNominatedPod(oldPod *v1.Pod, newPodInfo *framework.PodInfo) { - npm.Lock() - defer npm.Unlock() - // In some cases, an Update event with no "NominatedNode" present is received right - // after a node("NominatedNode") is reserved for this pod in memory. - // In this case, we need to keep reserving the NominatedNode when updating the pod pointer. - var nominatingInfo *framework.NominatingInfo - // We won't fall into below `if` block if the Update event represents: - // (1) NominatedNode info is added - // (2) NominatedNode info is updated - // (3) NominatedNode info is removed - if NominatedNodeName(oldPod) == "" && NominatedNodeName(newPodInfo.Pod) == "" { - if nnn, ok := npm.nominatedPodToNode[oldPod.UID]; ok { - // This is the only case we should continue reserving the NominatedNode - nominatingInfo = &framework.NominatingInfo{ - NominatingMode: framework.ModeOverride, - NominatedNodeName: nnn, - } - } - } - // We update irrespective of the nominatedNodeName changed or not, to ensure - // that pod pointer is updated. - npm.delete(oldPod) - npm.add(newPodInfo, nominatingInfo) -} - -// NewPodNominator creates a nominator as a backing of framework.PodNominator. -// A podLister is passed in so as to check if the pod exists -// before adding its nominatedNode info. -func NewPodNominator(podLister listersv1.PodLister) framework.PodNominator { - return &nominator{ - podLister: podLister, - nominatedPods: make(map[string][]*framework.PodInfo), - nominatedPodToNode: make(map[types.UID]string), - } -} - -// MakeNextPodFunc returns a function to retrieve the next pod from a given -// scheduling queue -func MakeNextPodFunc(queue SchedulingQueue) func() *framework.QueuedPodInfo { - return func() *framework.QueuedPodInfo { - podInfo, err := queue.Pop() - if err == nil { - klog.V(4).InfoS("About to try and schedule pod", "pod", klog.KObj(podInfo.Pod)) - for plugin := range podInfo.UnschedulablePlugins { - metrics.UnschedulableReason(plugin, podInfo.Pod.Spec.SchedulerName).Dec() - } - return podInfo - } - klog.ErrorS(err, "Error while retrieving next pod from scheduling queue") - return nil - } -} - -func podInfoKeyFunc(obj interface{}) (string, error) { - return cache.MetaNamespaceKeyFunc(obj.(*framework.QueuedPodInfo).Pod) -} - -// Checks if the Pod may become schedulable upon the event. -// This is achieved by looking up the global clusterEventMap registry. -func (p *PriorityQueue) podMatchesEvent(podInfo *framework.QueuedPodInfo, clusterEvent framework.ClusterEvent) bool { - if clusterEvent.IsWildCard() { - return true - } - - for evt, nameSet := range p.clusterEventMap { - // Firstly verify if the two ClusterEvents match: - // - either the registered event from plugin side is a WildCardEvent, - // - or the two events have identical Resource fields and *compatible* ActionType. - // Note the ActionTypes don't need to be *identical*. We check if the ANDed value - // is zero or not. In this way, it's easy to tell Update&Delete is not compatible, - // but Update&All is. - evtMatch := evt.IsWildCard() || - (evt.Resource == clusterEvent.Resource && evt.ActionType&clusterEvent.ActionType != 0) - - // Secondly verify the plugin name matches. - // Note that if it doesn't match, we shouldn't continue to search. - if evtMatch && intersect(nameSet, podInfo.UnschedulablePlugins) { - return true - } - } - - return false -} - -func intersect(x, y sets.String) bool { - if len(x) > len(y) { - x, y = y, x - } - for v := range x { - if y.Has(v) { - return true - } - } - return false -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/queue/testing.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/queue/testing.go deleted file mode 100644 index e0ee28312e2b..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/internal/queue/testing.go +++ /dev/null @@ -1,55 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package queue - -import ( - "context" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/client-go/informers" - "k8s.io/client-go/kubernetes/fake" - "k8s.io/kubernetes/pkg/scheduler/framework" -) - -// NewTestQueue creates a priority queue with an empty informer factory. -func NewTestQueue(ctx context.Context, lessFn framework.LessFunc, opts ...Option) *PriorityQueue { - return NewTestQueueWithObjects(ctx, lessFn, nil, opts...) -} - -// NewTestQueueWithObjects creates a priority queue with an informer factory -// populated with the provided objects. -func NewTestQueueWithObjects( - ctx context.Context, - lessFn framework.LessFunc, - objs []runtime.Object, - opts ...Option, -) *PriorityQueue { - informerFactory := informers.NewSharedInformerFactory(fake.NewSimpleClientset(objs...), 0) - return NewTestQueueWithInformerFactory(ctx, lessFn, informerFactory, opts...) -} - -func NewTestQueueWithInformerFactory( - ctx context.Context, - lessFn framework.LessFunc, - informerFactory informers.SharedInformerFactory, - opts ...Option, -) *PriorityQueue { - pq := NewPriorityQueue(lessFn, informerFactory, opts...) - informerFactory.Start(ctx.Done()) - informerFactory.WaitForCacheSync(ctx.Done()) - return pq -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/metrics/metrics.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/metrics/metrics.go index 8a1f5912b3a0..e926269af679 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/metrics/metrics.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/metrics/metrics.go @@ -93,7 +93,7 @@ var ( &metrics.GaugeOpts{ Subsystem: SchedulerSubsystem, Name: "pending_pods", - Help: "Number of pending pods, by the queue type. 'active' means number of pods in activeQ; 'backoff' means number of pods in backoffQ; 'unschedulable' means number of pods in unschedulablePods.", + Help: "Number of pending pods, by the queue type. 'active' means number of pods in activeQ; 'backoff' means number of pods in backoffQ; 'unschedulable' means number of pods in unschedulableQ.", StabilityLevel: metrics.STABLE, }, []string{"queue"}) SchedulerGoroutines = metrics.NewGaugeVec( @@ -173,14 +173,6 @@ var ( StabilityLevel: metrics.ALPHA, }, []string{"type"}) - unschedulableReasons = metrics.NewGaugeVec( - &metrics.GaugeOpts{ - Subsystem: SchedulerSubsystem, - Name: "unschedulable_pods", - Help: "The number of unschedulable pods broken down by plugin name. A pod will increment the gauge for all plugins that caused it to not schedule and so this metric have meaning only when broken down by plugin.", - StabilityLevel: metrics.ALPHA, - }, []string{"plugin", "profile"}) - metricsList = []metrics.Registerable{ scheduleAttempts, e2eSchedulingLatency, @@ -197,7 +189,6 @@ var ( SchedulerGoroutines, PermitWaitDuration, CacheSize, - unschedulableReasons, } ) @@ -244,7 +235,3 @@ func UnschedulablePods() metrics.GaugeMetric { func SinceInSeconds(start time.Time) float64 { return time.Since(start).Seconds() } - -func UnschedulableReason(plugin string, profile string) metrics.GaugeMetric { - return unschedulableReasons.With(metrics.Labels{"plugin": plugin, "profile": profile}) -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/profile/profile.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/profile/profile.go deleted file mode 100644 index 1457e6b0bf4d..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/profile/profile.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package profile holds the definition of a scheduling Profile. -package profile - -import ( - "errors" - "fmt" - - "github.com/google/go-cmp/cmp" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/client-go/kubernetes/scheme" - "k8s.io/client-go/tools/events" - "k8s.io/kubernetes/pkg/scheduler/apis/config" - "k8s.io/kubernetes/pkg/scheduler/framework" - frameworkruntime "k8s.io/kubernetes/pkg/scheduler/framework/runtime" -) - -// RecorderFactory builds an EventRecorder for a given scheduler name. -type RecorderFactory func(string) events.EventRecorder - -// newProfile builds a Profile for the given configuration. -func newProfile(cfg config.KubeSchedulerProfile, r frameworkruntime.Registry, recorderFact RecorderFactory, - opts ...frameworkruntime.Option) (framework.Framework, error) { - recorder := recorderFact(cfg.SchedulerName) - opts = append(opts, frameworkruntime.WithEventRecorder(recorder)) - return frameworkruntime.NewFramework(r, &cfg, opts...) -} - -// Map holds frameworks indexed by scheduler name. -type Map map[string]framework.Framework - -// NewMap builds the frameworks given by the configuration, indexed by name. -func NewMap(cfgs []config.KubeSchedulerProfile, r frameworkruntime.Registry, recorderFact RecorderFactory, - opts ...frameworkruntime.Option) (Map, error) { - m := make(Map) - v := cfgValidator{m: m} - - for _, cfg := range cfgs { - p, err := newProfile(cfg, r, recorderFact, opts...) - if err != nil { - return nil, fmt.Errorf("creating profile for scheduler name %s: %v", cfg.SchedulerName, err) - } - if err := v.validate(cfg, p); err != nil { - return nil, err - } - m[cfg.SchedulerName] = p - } - return m, nil -} - -// HandlesSchedulerName returns whether a profile handles the given scheduler name. -func (m Map) HandlesSchedulerName(name string) bool { - _, ok := m[name] - return ok -} - -// NewRecorderFactory returns a RecorderFactory for the broadcaster. -func NewRecorderFactory(b events.EventBroadcaster) RecorderFactory { - return func(name string) events.EventRecorder { - return b.NewRecorder(scheme.Scheme, name) - } -} - -type cfgValidator struct { - m Map - queueSort string - queueSortArgs runtime.Object -} - -func (v *cfgValidator) validate(cfg config.KubeSchedulerProfile, f framework.Framework) error { - if len(f.ProfileName()) == 0 { - return errors.New("scheduler name is needed") - } - if cfg.Plugins == nil { - return fmt.Errorf("plugins required for profile with scheduler name %q", f.ProfileName()) - } - if v.m[f.ProfileName()] != nil { - return fmt.Errorf("duplicate profile with scheduler name %q", f.ProfileName()) - } - - queueSort := f.ListPlugins().QueueSort.Enabled[0].Name - var queueSortArgs runtime.Object - for _, plCfg := range cfg.PluginConfig { - if plCfg.Name == queueSort { - queueSortArgs = plCfg.Args - } - } - if len(v.queueSort) == 0 { - v.queueSort = queueSort - v.queueSortArgs = queueSortArgs - return nil - } - if v.queueSort != queueSort { - return fmt.Errorf("different queue sort plugins for profile %q: %q, first: %q", cfg.SchedulerName, queueSort, v.queueSort) - } - if !cmp.Equal(v.queueSortArgs, queueSortArgs) { - return fmt.Errorf("different queue sort plugin args for profile %q", cfg.SchedulerName) - } - return nil -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/schedule_one.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/schedule_one.go deleted file mode 100644 index cdbdff3ffb0d..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/schedule_one.go +++ /dev/null @@ -1,859 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package scheduler - -import ( - "context" - "fmt" - "math/rand" - "strconv" - "sync" - "sync/atomic" - "time" - - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/apimachinery/pkg/util/sets" - clientset "k8s.io/client-go/kubernetes" - "k8s.io/klog/v2" - extenderv1 "k8s.io/kube-scheduler/extender/v1" - podutil "k8s.io/kubernetes/pkg/api/v1/pod" - "k8s.io/kubernetes/pkg/apis/core/validation" - "k8s.io/kubernetes/pkg/scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework/parallelize" - frameworkruntime "k8s.io/kubernetes/pkg/scheduler/framework/runtime" - internalqueue "k8s.io/kubernetes/pkg/scheduler/internal/queue" - "k8s.io/kubernetes/pkg/scheduler/metrics" - "k8s.io/kubernetes/pkg/scheduler/util" - utiltrace "k8s.io/utils/trace" -) - -const ( - // SchedulerError is the reason recorded for events when an error occurs during scheduling a pod. - SchedulerError = "SchedulerError" - // Percentage of plugin metrics to be sampled. - pluginMetricsSamplePercent = 10 - // minFeasibleNodesToFind is the minimum number of nodes that would be scored - // in each scheduling cycle. This is a semi-arbitrary value to ensure that a - // certain minimum of nodes are checked for feasibility. This in turn helps - // ensure a minimum level of spreading. - minFeasibleNodesToFind = 100 - // minFeasibleNodesPercentageToFind is the minimum percentage of nodes that - // would be scored in each scheduling cycle. This is a semi-arbitrary value - // to ensure that a certain minimum of nodes are checked for feasibility. - // This in turn helps ensure a minimum level of spreading. - minFeasibleNodesPercentageToFind = 5 -) - -var clearNominatedNode = &framework.NominatingInfo{NominatingMode: framework.ModeOverride, NominatedNodeName: ""} - -// scheduleOne does the entire scheduling workflow for a single pod. It is serialized on the scheduling algorithm's host fitting. -func (sched *Scheduler) scheduleOne(ctx context.Context) { - podInfo := sched.NextPod() - // pod could be nil when schedulerQueue is closed - if podInfo == nil || podInfo.Pod == nil { - return - } - pod := podInfo.Pod - fwk, err := sched.frameworkForPod(pod) - if err != nil { - // This shouldn't happen, because we only accept for scheduling the pods - // which specify a scheduler name that matches one of the profiles. - klog.ErrorS(err, "Error occurred") - return - } - if sched.skipPodSchedule(fwk, pod) { - return - } - - klog.V(3).InfoS("Attempting to schedule pod", "pod", klog.KObj(pod)) - - // Synchronously attempt to find a fit for the pod. - start := time.Now() - state := framework.NewCycleState() - state.SetRecordPluginMetrics(rand.Intn(100) < pluginMetricsSamplePercent) - // Initialize an empty podsToActivate struct, which will be filled up by plugins or stay empty. - podsToActivate := framework.NewPodsToActivate() - state.Write(framework.PodsToActivateKey, podsToActivate) - - schedulingCycleCtx, cancel := context.WithCancel(ctx) - defer cancel() - scheduleResult, err := sched.SchedulePod(schedulingCycleCtx, fwk, state, pod) - if err != nil { - // SchedulePod() may have failed because the pod would not fit on any host, so we try to - // preempt, with the expectation that the next time the pod is tried for scheduling it - // will fit due to the preemption. It is also possible that a different pod will schedule - // into the resources that were preempted, but this is harmless. - var nominatingInfo *framework.NominatingInfo - if fitError, ok := err.(*framework.FitError); ok { - if !fwk.HasPostFilterPlugins() { - klog.V(3).InfoS("No PostFilter plugins are registered, so no preemption will be performed") - } else { - // Run PostFilter plugins to try to make the pod schedulable in a future scheduling cycle. - result, status := fwk.RunPostFilterPlugins(ctx, state, pod, fitError.Diagnosis.NodeToStatusMap) - if status.Code() == framework.Error { - klog.ErrorS(nil, "Status after running PostFilter plugins for pod", "pod", klog.KObj(pod), "status", status) - } else { - fitError.Diagnosis.PostFilterMsg = status.Message() - klog.V(5).InfoS("Status after running PostFilter plugins for pod", "pod", klog.KObj(pod), "status", status) - } - if result != nil { - nominatingInfo = result.NominatingInfo - } - } - // Pod did not fit anywhere, so it is counted as a failure. If preemption - // succeeds, the pod should get counted as a success the next time we try to - // schedule it. (hopefully) - metrics.PodUnschedulable(fwk.ProfileName(), metrics.SinceInSeconds(start)) - } else if err == ErrNoNodesAvailable { - nominatingInfo = clearNominatedNode - // No nodes available is counted as unschedulable rather than an error. - metrics.PodUnschedulable(fwk.ProfileName(), metrics.SinceInSeconds(start)) - } else { - nominatingInfo = clearNominatedNode - klog.ErrorS(err, "Error selecting node for pod", "pod", klog.KObj(pod)) - metrics.PodScheduleError(fwk.ProfileName(), metrics.SinceInSeconds(start)) - } - sched.handleSchedulingFailure(fwk, podInfo, err, v1.PodReasonUnschedulable, nominatingInfo) - return - } - metrics.SchedulingAlgorithmLatency.Observe(metrics.SinceInSeconds(start)) - // Tell the cache to assume that a pod now is running on a given node, even though it hasn't been bound yet. - // This allows us to keep scheduling without waiting on binding to occur. - assumedPodInfo := podInfo.DeepCopy() - assumedPod := assumedPodInfo.Pod - // assume modifies `assumedPod` by setting NodeName=scheduleResult.SuggestedHost - err = sched.assume(assumedPod, scheduleResult.SuggestedHost) - if err != nil { - metrics.PodScheduleError(fwk.ProfileName(), metrics.SinceInSeconds(start)) - // This is most probably result of a BUG in retrying logic. - // We report an error here so that pod scheduling can be retried. - // This relies on the fact that Error will check if the pod has been bound - // to a node and if so will not add it back to the unscheduled pods queue - // (otherwise this would cause an infinite loop). - sched.handleSchedulingFailure(fwk, assumedPodInfo, err, SchedulerError, clearNominatedNode) - return - } - - // Run the Reserve method of reserve plugins. - if sts := fwk.RunReservePluginsReserve(schedulingCycleCtx, state, assumedPod, scheduleResult.SuggestedHost); !sts.IsSuccess() { - metrics.PodScheduleError(fwk.ProfileName(), metrics.SinceInSeconds(start)) - // trigger un-reserve to clean up state associated with the reserved Pod - fwk.RunReservePluginsUnreserve(schedulingCycleCtx, state, assumedPod, scheduleResult.SuggestedHost) - if forgetErr := sched.Cache.ForgetPod(assumedPod); forgetErr != nil { - klog.ErrorS(forgetErr, "Scheduler cache ForgetPod failed") - } - sched.handleSchedulingFailure(fwk, assumedPodInfo, sts.AsError(), SchedulerError, clearNominatedNode) - return - } - - // Run "permit" plugins. - runPermitStatus := fwk.RunPermitPlugins(schedulingCycleCtx, state, assumedPod, scheduleResult.SuggestedHost) - if runPermitStatus.Code() != framework.Wait && !runPermitStatus.IsSuccess() { - var reason string - if runPermitStatus.IsUnschedulable() { - metrics.PodUnschedulable(fwk.ProfileName(), metrics.SinceInSeconds(start)) - reason = v1.PodReasonUnschedulable - } else { - metrics.PodScheduleError(fwk.ProfileName(), metrics.SinceInSeconds(start)) - reason = SchedulerError - } - // One of the plugins returned status different than success or wait. - fwk.RunReservePluginsUnreserve(schedulingCycleCtx, state, assumedPod, scheduleResult.SuggestedHost) - if forgetErr := sched.Cache.ForgetPod(assumedPod); forgetErr != nil { - klog.ErrorS(forgetErr, "Scheduler cache ForgetPod failed") - } - sched.handleSchedulingFailure(fwk, assumedPodInfo, runPermitStatus.AsError(), reason, clearNominatedNode) - return - } - - // At the end of a successful scheduling cycle, pop and move up Pods if needed. - if len(podsToActivate.Map) != 0 { - sched.SchedulingQueue.Activate(podsToActivate.Map) - // Clear the entries after activation. - podsToActivate.Map = make(map[string]*v1.Pod) - } - - // bind the pod to its host asynchronously (we can do this b/c of the assumption step above). - go func() { - bindingCycleCtx, cancel := context.WithCancel(ctx) - defer cancel() - metrics.SchedulerGoroutines.WithLabelValues(metrics.Binding).Inc() - defer metrics.SchedulerGoroutines.WithLabelValues(metrics.Binding).Dec() - - waitOnPermitStatus := fwk.WaitOnPermit(bindingCycleCtx, assumedPod) - if !waitOnPermitStatus.IsSuccess() { - var reason string - if waitOnPermitStatus.IsUnschedulable() { - metrics.PodUnschedulable(fwk.ProfileName(), metrics.SinceInSeconds(start)) - reason = v1.PodReasonUnschedulable - } else { - metrics.PodScheduleError(fwk.ProfileName(), metrics.SinceInSeconds(start)) - reason = SchedulerError - } - // trigger un-reserve plugins to clean up state associated with the reserved Pod - fwk.RunReservePluginsUnreserve(bindingCycleCtx, state, assumedPod, scheduleResult.SuggestedHost) - if forgetErr := sched.Cache.ForgetPod(assumedPod); forgetErr != nil { - klog.ErrorS(forgetErr, "scheduler cache ForgetPod failed") - } else { - // "Forget"ing an assumed Pod in binding cycle should be treated as a PodDelete event, - // as the assumed Pod had occupied a certain amount of resources in scheduler cache. - // TODO(#103853): de-duplicate the logic. - // Avoid moving the assumed Pod itself as it's always Unschedulable. - // It's intentional to "defer" this operation; otherwise MoveAllToActiveOrBackoffQueue() would - // update `q.moveRequest` and thus move the assumed pod to backoffQ anyways. - defer sched.SchedulingQueue.MoveAllToActiveOrBackoffQueue(internalqueue.AssignedPodDelete, func(pod *v1.Pod) bool { - return assumedPod.UID != pod.UID - }) - } - sched.handleSchedulingFailure(fwk, assumedPodInfo, waitOnPermitStatus.AsError(), reason, clearNominatedNode) - return - } - - // Run "prebind" plugins. - preBindStatus := fwk.RunPreBindPlugins(bindingCycleCtx, state, assumedPod, scheduleResult.SuggestedHost) - if !preBindStatus.IsSuccess() { - metrics.PodScheduleError(fwk.ProfileName(), metrics.SinceInSeconds(start)) - // trigger un-reserve plugins to clean up state associated with the reserved Pod - fwk.RunReservePluginsUnreserve(bindingCycleCtx, state, assumedPod, scheduleResult.SuggestedHost) - if forgetErr := sched.Cache.ForgetPod(assumedPod); forgetErr != nil { - klog.ErrorS(forgetErr, "scheduler cache ForgetPod failed") - } else { - // "Forget"ing an assumed Pod in binding cycle should be treated as a PodDelete event, - // as the assumed Pod had occupied a certain amount of resources in scheduler cache. - // TODO(#103853): de-duplicate the logic. - sched.SchedulingQueue.MoveAllToActiveOrBackoffQueue(internalqueue.AssignedPodDelete, nil) - } - sched.handleSchedulingFailure(fwk, assumedPodInfo, preBindStatus.AsError(), SchedulerError, clearNominatedNode) - return - } - - err := sched.bind(bindingCycleCtx, fwk, assumedPod, scheduleResult.SuggestedHost, state) - if err != nil { - metrics.PodScheduleError(fwk.ProfileName(), metrics.SinceInSeconds(start)) - // trigger un-reserve plugins to clean up state associated with the reserved Pod - fwk.RunReservePluginsUnreserve(bindingCycleCtx, state, assumedPod, scheduleResult.SuggestedHost) - if err := sched.Cache.ForgetPod(assumedPod); err != nil { - klog.ErrorS(err, "scheduler cache ForgetPod failed") - } else { - // "Forget"ing an assumed Pod in binding cycle should be treated as a PodDelete event, - // as the assumed Pod had occupied a certain amount of resources in scheduler cache. - // TODO(#103853): de-duplicate the logic. - sched.SchedulingQueue.MoveAllToActiveOrBackoffQueue(internalqueue.AssignedPodDelete, nil) - } - sched.handleSchedulingFailure(fwk, assumedPodInfo, fmt.Errorf("binding rejected: %w", err), SchedulerError, clearNominatedNode) - return - } - // Calculating nodeResourceString can be heavy. Avoid it if klog verbosity is below 2. - klog.V(2).InfoS("Successfully bound pod to node", "pod", klog.KObj(pod), "node", scheduleResult.SuggestedHost, "evaluatedNodes", scheduleResult.EvaluatedNodes, "feasibleNodes", scheduleResult.FeasibleNodes) - metrics.PodScheduled(fwk.ProfileName(), metrics.SinceInSeconds(start)) - metrics.PodSchedulingAttempts.Observe(float64(podInfo.Attempts)) - metrics.PodSchedulingDuration.WithLabelValues(getAttemptsLabel(podInfo)).Observe(metrics.SinceInSeconds(podInfo.InitialAttemptTimestamp)) - - // Run "postbind" plugins. - fwk.RunPostBindPlugins(bindingCycleCtx, state, assumedPod, scheduleResult.SuggestedHost) - - // At the end of a successful binding cycle, move up Pods if needed. - if len(podsToActivate.Map) != 0 { - sched.SchedulingQueue.Activate(podsToActivate.Map) - // Unlike the logic in scheduling cycle, we don't bother deleting the entries - // as `podsToActivate.Map` is no longer consumed. - } - }() -} - -func (sched *Scheduler) frameworkForPod(pod *v1.Pod) (framework.Framework, error) { - fwk, ok := sched.Profiles[pod.Spec.SchedulerName] - if !ok { - return nil, fmt.Errorf("profile not found for scheduler name %q", pod.Spec.SchedulerName) - } - return fwk, nil -} - -// skipPodSchedule returns true if we could skip scheduling the pod for specified cases. -func (sched *Scheduler) skipPodSchedule(fwk framework.Framework, pod *v1.Pod) bool { - // Case 1: pod is being deleted. - if pod.DeletionTimestamp != nil { - fwk.EventRecorder().Eventf(pod, nil, v1.EventTypeWarning, "FailedScheduling", "Scheduling", "skip schedule deleting pod: %v/%v", pod.Namespace, pod.Name) - klog.V(3).InfoS("Skip schedule deleting pod", "pod", klog.KObj(pod)) - return true - } - - // Case 2: pod that has been assumed could be skipped. - // An assumed pod can be added again to the scheduling queue if it got an update event - // during its previous scheduling cycle but before getting assumed. - isAssumed, err := sched.Cache.IsAssumedPod(pod) - if err != nil { - utilruntime.HandleError(fmt.Errorf("failed to check whether pod %s/%s is assumed: %v", pod.Namespace, pod.Name, err)) - return false - } - return isAssumed -} - -// schedulePod tries to schedule the given pod to one of the nodes in the node list. -// If it succeeds, it will return the name of the node. -// If it fails, it will return a FitError with reasons. -func (sched *Scheduler) schedulePod(ctx context.Context, fwk framework.Framework, state *framework.CycleState, pod *v1.Pod) (result ScheduleResult, err error) { - trace := utiltrace.New("Scheduling", utiltrace.Field{Key: "namespace", Value: pod.Namespace}, utiltrace.Field{Key: "name", Value: pod.Name}) - defer trace.LogIfLong(100 * time.Millisecond) - - if err := sched.Cache.UpdateSnapshot(sched.nodeInfoSnapshot); err != nil { - return result, err - } - trace.Step("Snapshotting scheduler cache and node infos done") - - if sched.nodeInfoSnapshot.NumNodes() == 0 { - return result, ErrNoNodesAvailable - } - - feasibleNodes, diagnosis, err := sched.findNodesThatFitPod(ctx, fwk, state, pod) - if err != nil { - return result, err - } - trace.Step("Computing predicates done") - - if len(feasibleNodes) == 0 { - return result, &framework.FitError{ - Pod: pod, - NumAllNodes: sched.nodeInfoSnapshot.NumNodes(), - Diagnosis: diagnosis, - } - } - - // When only one node after predicate, just use it. - if len(feasibleNodes) == 1 { - return ScheduleResult{ - SuggestedHost: feasibleNodes[0].Name, - EvaluatedNodes: 1 + len(diagnosis.NodeToStatusMap), - FeasibleNodes: 1, - }, nil - } - - priorityList, err := prioritizeNodes(ctx, sched.Extenders, fwk, state, pod, feasibleNodes) - if err != nil { - return result, err - } - - host, err := selectHost(priorityList) - trace.Step("Prioritizing done") - - return ScheduleResult{ - SuggestedHost: host, - EvaluatedNodes: len(feasibleNodes) + len(diagnosis.NodeToStatusMap), - FeasibleNodes: len(feasibleNodes), - }, err -} - -// Filters the nodes to find the ones that fit the pod based on the framework -// filter plugins and filter extenders. -func (sched *Scheduler) findNodesThatFitPod(ctx context.Context, fwk framework.Framework, state *framework.CycleState, pod *v1.Pod) ([]*v1.Node, framework.Diagnosis, error) { - diagnosis := framework.Diagnosis{ - NodeToStatusMap: make(framework.NodeToStatusMap), - UnschedulablePlugins: sets.NewString(), - } - - // Run "prefilter" plugins. - preRes, s := fwk.RunPreFilterPlugins(ctx, state, pod) - allNodes, err := sched.nodeInfoSnapshot.NodeInfos().List() - if err != nil { - return nil, diagnosis, err - } - if !s.IsSuccess() { - if !s.IsUnschedulable() { - return nil, diagnosis, s.AsError() - } - // All nodes will have the same status. Some non trivial refactoring is - // needed to avoid this copy. - for _, n := range allNodes { - diagnosis.NodeToStatusMap[n.Node().Name] = s - } - // Status satisfying IsUnschedulable() gets injected into diagnosis.UnschedulablePlugins. - if s.FailedPlugin() != "" { - diagnosis.UnschedulablePlugins.Insert(s.FailedPlugin()) - } - return nil, diagnosis, nil - } - - // "NominatedNodeName" can potentially be set in a previous scheduling cycle as a result of preemption. - // This node is likely the only candidate that will fit the pod, and hence we try it first before iterating over all nodes. - if len(pod.Status.NominatedNodeName) > 0 { - feasibleNodes, err := sched.evaluateNominatedNode(ctx, pod, fwk, state, diagnosis) - if err != nil { - klog.ErrorS(err, "Evaluation failed on nominated node", "pod", klog.KObj(pod), "node", pod.Status.NominatedNodeName) - } - // Nominated node passes all the filters, scheduler is good to assign this node to the pod. - if len(feasibleNodes) != 0 { - return feasibleNodes, diagnosis, nil - } - } - - nodes := allNodes - if !preRes.AllNodes() { - nodes = make([]*framework.NodeInfo, 0, len(preRes.NodeNames)) - for n := range preRes.NodeNames { - nInfo, err := sched.nodeInfoSnapshot.NodeInfos().Get(n) - if err != nil { - return nil, diagnosis, err - } - nodes = append(nodes, nInfo) - } - } - feasibleNodes, err := sched.findNodesThatPassFilters(ctx, fwk, state, pod, diagnosis, nodes) - if err != nil { - return nil, diagnosis, err - } - - feasibleNodes, err = findNodesThatPassExtenders(sched.Extenders, pod, feasibleNodes, diagnosis.NodeToStatusMap) - if err != nil { - return nil, diagnosis, err - } - return feasibleNodes, diagnosis, nil -} - -func (sched *Scheduler) evaluateNominatedNode(ctx context.Context, pod *v1.Pod, fwk framework.Framework, state *framework.CycleState, diagnosis framework.Diagnosis) ([]*v1.Node, error) { - nnn := pod.Status.NominatedNodeName - nodeInfo, err := sched.nodeInfoSnapshot.Get(nnn) - if err != nil { - return nil, err - } - node := []*framework.NodeInfo{nodeInfo} - feasibleNodes, err := sched.findNodesThatPassFilters(ctx, fwk, state, pod, diagnosis, node) - if err != nil { - return nil, err - } - - feasibleNodes, err = findNodesThatPassExtenders(sched.Extenders, pod, feasibleNodes, diagnosis.NodeToStatusMap) - if err != nil { - return nil, err - } - - return feasibleNodes, nil -} - -// findNodesThatPassFilters finds the nodes that fit the filter plugins. -func (sched *Scheduler) findNodesThatPassFilters( - ctx context.Context, - fwk framework.Framework, - state *framework.CycleState, - pod *v1.Pod, - diagnosis framework.Diagnosis, - nodes []*framework.NodeInfo) ([]*v1.Node, error) { - numNodesToFind := sched.numFeasibleNodesToFind(int32(len(nodes))) - - // Create feasible list with enough space to avoid growing it - // and allow assigning. - feasibleNodes := make([]*v1.Node, numNodesToFind) - - if !fwk.HasFilterPlugins() { - length := len(nodes) - for i := range feasibleNodes { - feasibleNodes[i] = nodes[(sched.nextStartNodeIndex+i)%length].Node() - } - sched.nextStartNodeIndex = (sched.nextStartNodeIndex + len(feasibleNodes)) % length - return feasibleNodes, nil - } - - errCh := parallelize.NewErrorChannel() - var statusesLock sync.Mutex - var feasibleNodesLen int32 - ctx, cancel := context.WithCancel(ctx) - checkNode := func(i int) { - // We check the nodes starting from where we left off in the previous scheduling cycle, - // this is to make sure all nodes have the same chance of being examined across pods. - nodeInfo := nodes[(sched.nextStartNodeIndex+i)%len(nodes)] - status := fwk.RunFilterPluginsWithNominatedPods(ctx, state, pod, nodeInfo) - if status.Code() == framework.Error { - errCh.SendErrorWithCancel(status.AsError(), cancel) - return - } - if status.IsSuccess() { - length := atomic.AddInt32(&feasibleNodesLen, 1) - if length > numNodesToFind { - cancel() - atomic.AddInt32(&feasibleNodesLen, -1) - } else { - feasibleNodes[length-1] = nodeInfo.Node() - } - } else { - statusesLock.Lock() - diagnosis.NodeToStatusMap[nodeInfo.Node().Name] = status - diagnosis.UnschedulablePlugins.Insert(status.FailedPlugin()) - statusesLock.Unlock() - } - } - - beginCheckNode := time.Now() - statusCode := framework.Success - defer func() { - // We record Filter extension point latency here instead of in framework.go because framework.RunFilterPlugins - // function is called for each node, whereas we want to have an overall latency for all nodes per scheduling cycle. - // Note that this latency also includes latency for `addNominatedPods`, which calls framework.RunPreFilterAddPod. - metrics.FrameworkExtensionPointDuration.WithLabelValues(frameworkruntime.Filter, statusCode.String(), fwk.ProfileName()).Observe(metrics.SinceInSeconds(beginCheckNode)) - }() - - // Stops searching for more nodes once the configured number of feasible nodes - // are found. - fwk.Parallelizer().Until(ctx, len(nodes), checkNode) - processedNodes := int(feasibleNodesLen) + len(diagnosis.NodeToStatusMap) - sched.nextStartNodeIndex = (sched.nextStartNodeIndex + processedNodes) % len(nodes) - - feasibleNodes = feasibleNodes[:feasibleNodesLen] - if err := errCh.ReceiveError(); err != nil { - statusCode = framework.Error - return nil, err - } - return feasibleNodes, nil -} - -// numFeasibleNodesToFind returns the number of feasible nodes that once found, the scheduler stops -// its search for more feasible nodes. -func (sched *Scheduler) numFeasibleNodesToFind(numAllNodes int32) (numNodes int32) { - if numAllNodes < minFeasibleNodesToFind || sched.percentageOfNodesToScore >= 100 { - return numAllNodes - } - - adaptivePercentage := sched.percentageOfNodesToScore - if adaptivePercentage <= 0 { - basePercentageOfNodesToScore := int32(50) - adaptivePercentage = basePercentageOfNodesToScore - numAllNodes/125 - if adaptivePercentage < minFeasibleNodesPercentageToFind { - adaptivePercentage = minFeasibleNodesPercentageToFind - } - } - - numNodes = numAllNodes * adaptivePercentage / 100 - if numNodes < minFeasibleNodesToFind { - return minFeasibleNodesToFind - } - - return numNodes -} - -func findNodesThatPassExtenders(extenders []framework.Extender, pod *v1.Pod, feasibleNodes []*v1.Node, statuses framework.NodeToStatusMap) ([]*v1.Node, error) { - // Extenders are called sequentially. - // Nodes in original feasibleNodes can be excluded in one extender, and pass on to the next - // extender in a decreasing manner. - for _, extender := range extenders { - if len(feasibleNodes) == 0 { - break - } - if !extender.IsInterested(pod) { - continue - } - - // Status of failed nodes in failedAndUnresolvableMap will be added or overwritten in , - // so that the scheduler framework can respect the UnschedulableAndUnresolvable status for - // particular nodes, and this may eventually improve preemption efficiency. - // Note: users are recommended to configure the extenders that may return UnschedulableAndUnresolvable - // status ahead of others. - feasibleList, failedMap, failedAndUnresolvableMap, err := extender.Filter(pod, feasibleNodes) - if err != nil { - if extender.IsIgnorable() { - klog.InfoS("Skipping extender as it returned error and has ignorable flag set", "extender", extender, "err", err) - continue - } - return nil, err - } - - for failedNodeName, failedMsg := range failedAndUnresolvableMap { - var aggregatedReasons []string - if _, found := statuses[failedNodeName]; found { - aggregatedReasons = statuses[failedNodeName].Reasons() - } - aggregatedReasons = append(aggregatedReasons, failedMsg) - statuses[failedNodeName] = framework.NewStatus(framework.UnschedulableAndUnresolvable, aggregatedReasons...) - } - - for failedNodeName, failedMsg := range failedMap { - if _, found := failedAndUnresolvableMap[failedNodeName]; found { - // failedAndUnresolvableMap takes precedence over failedMap - // note that this only happens if the extender returns the node in both maps - continue - } - if _, found := statuses[failedNodeName]; !found { - statuses[failedNodeName] = framework.NewStatus(framework.Unschedulable, failedMsg) - } else { - statuses[failedNodeName].AppendReason(failedMsg) - } - } - - feasibleNodes = feasibleList - } - return feasibleNodes, nil -} - -// prioritizeNodes prioritizes the nodes by running the score plugins, -// which return a score for each node from the call to RunScorePlugins(). -// The scores from each plugin are added together to make the score for that node, then -// any extenders are run as well. -// All scores are finally combined (added) to get the total weighted scores of all nodes -func prioritizeNodes( - ctx context.Context, - extenders []framework.Extender, - fwk framework.Framework, - state *framework.CycleState, - pod *v1.Pod, - nodes []*v1.Node, -) (framework.NodeScoreList, error) { - // If no priority configs are provided, then all nodes will have a score of one. - // This is required to generate the priority list in the required format - if len(extenders) == 0 && !fwk.HasScorePlugins() { - result := make(framework.NodeScoreList, 0, len(nodes)) - for i := range nodes { - result = append(result, framework.NodeScore{ - Name: nodes[i].Name, - Score: 1, - }) - } - return result, nil - } - - // Run PreScore plugins. - preScoreStatus := fwk.RunPreScorePlugins(ctx, state, pod, nodes) - if !preScoreStatus.IsSuccess() { - return nil, preScoreStatus.AsError() - } - - // Run the Score plugins. - scoresMap, scoreStatus := fwk.RunScorePlugins(ctx, state, pod, nodes) - if !scoreStatus.IsSuccess() { - return nil, scoreStatus.AsError() - } - - // Additional details logged at level 10 if enabled. - klogV := klog.V(10) - if klogV.Enabled() { - for plugin, nodeScoreList := range scoresMap { - for _, nodeScore := range nodeScoreList { - klogV.InfoS("Plugin scored node for pod", "pod", klog.KObj(pod), "plugin", plugin, "node", nodeScore.Name, "score", nodeScore.Score) - } - } - } - - // Summarize all scores. - result := make(framework.NodeScoreList, 0, len(nodes)) - - for i := range nodes { - result = append(result, framework.NodeScore{Name: nodes[i].Name, Score: 0}) - for j := range scoresMap { - result[i].Score += scoresMap[j][i].Score - } - } - - if len(extenders) != 0 && nodes != nil { - var mu sync.Mutex - var wg sync.WaitGroup - combinedScores := make(map[string]int64, len(nodes)) - for i := range extenders { - if !extenders[i].IsInterested(pod) { - continue - } - wg.Add(1) - go func(extIndex int) { - metrics.SchedulerGoroutines.WithLabelValues(metrics.PrioritizingExtender).Inc() - defer func() { - metrics.SchedulerGoroutines.WithLabelValues(metrics.PrioritizingExtender).Dec() - wg.Done() - }() - prioritizedList, weight, err := extenders[extIndex].Prioritize(pod, nodes) - if err != nil { - // Prioritization errors from extender can be ignored, let k8s/other extenders determine the priorities - klog.V(5).InfoS("Failed to run extender's priority function. No score given by this extender.", "error", err, "pod", klog.KObj(pod), "extender", extenders[extIndex].Name()) - return - } - mu.Lock() - for i := range *prioritizedList { - host, score := (*prioritizedList)[i].Host, (*prioritizedList)[i].Score - if klogV.Enabled() { - klogV.InfoS("Extender scored node for pod", "pod", klog.KObj(pod), "extender", extenders[extIndex].Name(), "node", host, "score", score) - } - combinedScores[host] += score * weight - } - mu.Unlock() - }(i) - } - // wait for all go routines to finish - wg.Wait() - for i := range result { - // MaxExtenderPriority may diverge from the max priority used in the scheduler and defined by MaxNodeScore, - // therefore we need to scale the score returned by extenders to the score range used by the scheduler. - result[i].Score += combinedScores[result[i].Name] * (framework.MaxNodeScore / extenderv1.MaxExtenderPriority) - } - } - - if klogV.Enabled() { - for i := range result { - klogV.InfoS("Calculated node's final score for pod", "pod", klog.KObj(pod), "node", result[i].Name, "score", result[i].Score) - } - } - return result, nil -} - -// selectHost takes a prioritized list of nodes and then picks one -// in a reservoir sampling manner from the nodes that had the highest score. -func selectHost(nodeScoreList framework.NodeScoreList) (string, error) { - if len(nodeScoreList) == 0 { - return "", fmt.Errorf("empty priorityList") - } - maxScore := nodeScoreList[0].Score - selected := nodeScoreList[0].Name - cntOfMaxScore := 1 - for _, ns := range nodeScoreList[1:] { - if ns.Score > maxScore { - maxScore = ns.Score - selected = ns.Name - cntOfMaxScore = 1 - } else if ns.Score == maxScore { - cntOfMaxScore++ - if rand.Intn(cntOfMaxScore) == 0 { - // Replace the candidate with probability of 1/cntOfMaxScore - selected = ns.Name - } - } - } - return selected, nil -} - -// assume signals to the cache that a pod is already in the cache, so that binding can be asynchronous. -// assume modifies `assumed`. -func (sched *Scheduler) assume(assumed *v1.Pod, host string) error { - // Optimistically assume that the binding will succeed and send it to apiserver - // in the background. - // If the binding fails, scheduler will release resources allocated to assumed pod - // immediately. - assumed.Spec.NodeName = host - - if err := sched.Cache.AssumePod(assumed); err != nil { - klog.ErrorS(err, "Scheduler cache AssumePod failed") - return err - } - // if "assumed" is a nominated pod, we should remove it from internal cache - if sched.SchedulingQueue != nil { - sched.SchedulingQueue.DeleteNominatedPodIfExists(assumed) - } - - return nil -} - -// bind binds a pod to a given node defined in a binding object. -// The precedence for binding is: (1) extenders and (2) framework plugins. -// We expect this to run asynchronously, so we handle binding metrics internally. -func (sched *Scheduler) bind(ctx context.Context, fwk framework.Framework, assumed *v1.Pod, targetNode string, state *framework.CycleState) (err error) { - defer func() { - sched.finishBinding(fwk, assumed, targetNode, err) - }() - - bound, err := sched.extendersBinding(assumed, targetNode) - if bound { - return err - } - bindStatus := fwk.RunBindPlugins(ctx, state, assumed, targetNode) - if bindStatus.IsSuccess() { - return nil - } - if bindStatus.Code() == framework.Error { - return bindStatus.AsError() - } - return fmt.Errorf("bind status: %s, %v", bindStatus.Code().String(), bindStatus.Message()) -} - -// TODO(#87159): Move this to a Plugin. -func (sched *Scheduler) extendersBinding(pod *v1.Pod, node string) (bool, error) { - for _, extender := range sched.Extenders { - if !extender.IsBinder() || !extender.IsInterested(pod) { - continue - } - return true, extender.Bind(&v1.Binding{ - ObjectMeta: metav1.ObjectMeta{Namespace: pod.Namespace, Name: pod.Name, UID: pod.UID}, - Target: v1.ObjectReference{Kind: "Node", Name: node}, - }) - } - return false, nil -} - -func (sched *Scheduler) finishBinding(fwk framework.Framework, assumed *v1.Pod, targetNode string, err error) { - if finErr := sched.Cache.FinishBinding(assumed); finErr != nil { - klog.ErrorS(finErr, "Scheduler cache FinishBinding failed") - } - if err != nil { - klog.V(1).InfoS("Failed to bind pod", "pod", klog.KObj(assumed)) - return - } - - fwk.EventRecorder().Eventf(assumed, nil, v1.EventTypeNormal, "Scheduled", "Binding", "Successfully assigned %v/%v to %v", assumed.Namespace, assumed.Name, targetNode) -} - -func getAttemptsLabel(p *framework.QueuedPodInfo) string { - // We breakdown the pod scheduling duration by attempts capped to a limit - // to avoid ending up with a high cardinality metric. - if p.Attempts >= 15 { - return "15+" - } - return strconv.Itoa(p.Attempts) -} - -// handleSchedulingFailure records an event for the pod that indicates the -// pod has failed to schedule. Also, update the pod condition and nominated node name if set. -func (sched *Scheduler) handleSchedulingFailure(fwk framework.Framework, podInfo *framework.QueuedPodInfo, err error, reason string, nominatingInfo *framework.NominatingInfo) { - sched.Error(podInfo, err) - - // Update the scheduling queue with the nominated pod information. Without - // this, there would be a race condition between the next scheduling cycle - // and the time the scheduler receives a Pod Update for the nominated pod. - // Here we check for nil only for tests. - if sched.SchedulingQueue != nil { - sched.SchedulingQueue.AddNominatedPod(podInfo.PodInfo, nominatingInfo) - } - - pod := podInfo.Pod - msg := truncateMessage(err.Error()) - fwk.EventRecorder().Eventf(pod, nil, v1.EventTypeWarning, "FailedScheduling", "Scheduling", msg) - if err := updatePod(sched.client, pod, &v1.PodCondition{ - Type: v1.PodScheduled, - Status: v1.ConditionFalse, - Reason: reason, - Message: err.Error(), - }, nominatingInfo); err != nil { - klog.ErrorS(err, "Error updating pod", "pod", klog.KObj(pod)) - } -} - -// truncateMessage truncates a message if it hits the NoteLengthLimit. -func truncateMessage(message string) string { - max := validation.NoteLengthLimit - if len(message) <= max { - return message - } - suffix := " ..." - return message[:max-len(suffix)] + suffix -} - -func updatePod(client clientset.Interface, pod *v1.Pod, condition *v1.PodCondition, nominatingInfo *framework.NominatingInfo) error { - klog.V(3).InfoS("Updating pod condition", "pod", klog.KObj(pod), "conditionType", condition.Type, "conditionStatus", condition.Status, "conditionReason", condition.Reason) - podStatusCopy := pod.Status.DeepCopy() - // NominatedNodeName is updated only if we are trying to set it, and the value is - // different from the existing one. - nnnNeedsUpdate := nominatingInfo.Mode() == framework.ModeOverride && pod.Status.NominatedNodeName != nominatingInfo.NominatedNodeName - if !podutil.UpdatePodCondition(podStatusCopy, condition) && !nnnNeedsUpdate { - return nil - } - if nnnNeedsUpdate { - podStatusCopy.NominatedNodeName = nominatingInfo.NominatedNodeName - } - return util.PatchPodStatus(client, pod, podStatusCopy) -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/scheduler.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/scheduler.go deleted file mode 100644 index 0559f393bdc8..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/scheduler.go +++ /dev/null @@ -1,505 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package scheduler - -import ( - "context" - "errors" - "fmt" - "time" - - v1 "k8s.io/api/core/v1" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/client-go/dynamic/dynamicinformer" - "k8s.io/client-go/informers" - coreinformers "k8s.io/client-go/informers/core/v1" - clientset "k8s.io/client-go/kubernetes" - corelisters "k8s.io/client-go/listers/core/v1" - restclient "k8s.io/client-go/rest" - "k8s.io/client-go/tools/cache" - "k8s.io/klog/v2" - "k8s.io/kube-scheduler/config/v1beta3" - schedulerapi "k8s.io/kubernetes/pkg/scheduler/apis/config" - "k8s.io/kubernetes/pkg/scheduler/apis/config/scheme" - "k8s.io/kubernetes/pkg/scheduler/framework" - "k8s.io/kubernetes/pkg/scheduler/framework/parallelize" - frameworkplugins "k8s.io/kubernetes/pkg/scheduler/framework/plugins" - "k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources" - frameworkruntime "k8s.io/kubernetes/pkg/scheduler/framework/runtime" - internalcache "k8s.io/kubernetes/pkg/scheduler/internal/cache" - cachedebugger "k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger" - internalqueue "k8s.io/kubernetes/pkg/scheduler/internal/queue" - "k8s.io/kubernetes/pkg/scheduler/metrics" - "k8s.io/kubernetes/pkg/scheduler/profile" -) - -const ( - // Duration the scheduler will wait before expiring an assumed pod. - // See issue #106361 for more details about this parameter and its value. - durationToExpireAssumedPod = 15 * time.Minute -) - -// ErrNoNodesAvailable is used to describe the error that no nodes available to schedule pods. -var ErrNoNodesAvailable = fmt.Errorf("no nodes available to schedule pods") - -// Scheduler watches for new unscheduled pods. It attempts to find -// nodes that they fit on and writes bindings back to the api server. -type Scheduler struct { - // It is expected that changes made via Cache will be observed - // by NodeLister and Algorithm. - Cache internalcache.Cache - - Extenders []framework.Extender - - // NextPod should be a function that blocks until the next pod - // is available. We don't use a channel for this, because scheduling - // a pod may take some amount of time and we don't want pods to get - // stale while they sit in a channel. - NextPod func() *framework.QueuedPodInfo - - // Error is called if there is an error. It is passed the pod in - // question, and the error - Error func(*framework.QueuedPodInfo, error) - - // SchedulePod tries to schedule the given pod to one of the nodes in the node list. - // Return a struct of ScheduleResult with the name of suggested host on success, - // otherwise will return a FitError with reasons. - SchedulePod func(ctx context.Context, fwk framework.Framework, state *framework.CycleState, pod *v1.Pod) (ScheduleResult, error) - - // Close this to shut down the scheduler. - StopEverything <-chan struct{} - - // SchedulingQueue holds pods to be scheduled - SchedulingQueue internalqueue.SchedulingQueue - - // Profiles are the scheduling profiles. - Profiles profile.Map - - client clientset.Interface - - nodeInfoSnapshot *internalcache.Snapshot - - percentageOfNodesToScore int32 - - nextStartNodeIndex int -} - -type schedulerOptions struct { - componentConfigVersion string - kubeConfig *restclient.Config - percentageOfNodesToScore int32 - podInitialBackoffSeconds int64 - podMaxBackoffSeconds int64 - podMaxInUnschedulablePodsDuration time.Duration - // Contains out-of-tree plugins to be merged with the in-tree registry. - frameworkOutOfTreeRegistry frameworkruntime.Registry - profiles []schedulerapi.KubeSchedulerProfile - extenders []schedulerapi.Extender - frameworkCapturer FrameworkCapturer - parallelism int32 - applyDefaultProfile bool -} - -// Option configures a Scheduler -type Option func(*schedulerOptions) - -// ScheduleResult represents the result of scheduling a pod. -type ScheduleResult struct { - // Name of the selected node. - SuggestedHost string - // The number of nodes the scheduler evaluated the pod against in the filtering - // phase and beyond. - EvaluatedNodes int - // The number of nodes out of the evaluated ones that fit the pod. - FeasibleNodes int -} - -// WithComponentConfigVersion sets the component config version to the -// KubeSchedulerConfiguration version used. The string should be the full -// scheme group/version of the external type we converted from (for example -// "kubescheduler.config.k8s.io/v1beta2") -func WithComponentConfigVersion(apiVersion string) Option { - return func(o *schedulerOptions) { - o.componentConfigVersion = apiVersion - } -} - -// WithKubeConfig sets the kube config for Scheduler. -func WithKubeConfig(cfg *restclient.Config) Option { - return func(o *schedulerOptions) { - o.kubeConfig = cfg - } -} - -// WithProfiles sets profiles for Scheduler. By default, there is one profile -// with the name "default-scheduler". -func WithProfiles(p ...schedulerapi.KubeSchedulerProfile) Option { - return func(o *schedulerOptions) { - o.profiles = p - o.applyDefaultProfile = false - } -} - -// WithParallelism sets the parallelism for all scheduler algorithms. Default is 16. -func WithParallelism(threads int32) Option { - return func(o *schedulerOptions) { - o.parallelism = threads - } -} - -// WithPercentageOfNodesToScore sets percentageOfNodesToScore for Scheduler, the default value is 50 -func WithPercentageOfNodesToScore(percentageOfNodesToScore int32) Option { - return func(o *schedulerOptions) { - o.percentageOfNodesToScore = percentageOfNodesToScore - } -} - -// WithFrameworkOutOfTreeRegistry sets the registry for out-of-tree plugins. Those plugins -// will be appended to the default registry. -func WithFrameworkOutOfTreeRegistry(registry frameworkruntime.Registry) Option { - return func(o *schedulerOptions) { - o.frameworkOutOfTreeRegistry = registry - } -} - -// WithPodInitialBackoffSeconds sets podInitialBackoffSeconds for Scheduler, the default value is 1 -func WithPodInitialBackoffSeconds(podInitialBackoffSeconds int64) Option { - return func(o *schedulerOptions) { - o.podInitialBackoffSeconds = podInitialBackoffSeconds - } -} - -// WithPodMaxBackoffSeconds sets podMaxBackoffSeconds for Scheduler, the default value is 10 -func WithPodMaxBackoffSeconds(podMaxBackoffSeconds int64) Option { - return func(o *schedulerOptions) { - o.podMaxBackoffSeconds = podMaxBackoffSeconds - } -} - -// WithPodMaxInUnschedulablePodsDuration sets podMaxInUnschedulablePodsDuration for PriorityQueue. -func WithPodMaxInUnschedulablePodsDuration(duration time.Duration) Option { - return func(o *schedulerOptions) { - o.podMaxInUnschedulablePodsDuration = duration - } -} - -// WithExtenders sets extenders for the Scheduler -func WithExtenders(e ...schedulerapi.Extender) Option { - return func(o *schedulerOptions) { - o.extenders = e - } -} - -// FrameworkCapturer is used for registering a notify function in building framework. -type FrameworkCapturer func(schedulerapi.KubeSchedulerProfile) - -// WithBuildFrameworkCapturer sets a notify function for getting buildFramework details. -func WithBuildFrameworkCapturer(fc FrameworkCapturer) Option { - return func(o *schedulerOptions) { - o.frameworkCapturer = fc - } -} - -var defaultSchedulerOptions = schedulerOptions{ - percentageOfNodesToScore: schedulerapi.DefaultPercentageOfNodesToScore, - podInitialBackoffSeconds: int64(internalqueue.DefaultPodInitialBackoffDuration.Seconds()), - podMaxBackoffSeconds: int64(internalqueue.DefaultPodMaxBackoffDuration.Seconds()), - podMaxInUnschedulablePodsDuration: internalqueue.DefaultPodMaxInUnschedulablePodsDuration, - parallelism: int32(parallelize.DefaultParallelism), - // Ideally we would statically set the default profile here, but we can't because - // creating the default profile may require testing feature gates, which may get - // set dynamically in tests. Therefore, we delay creating it until New is actually - // invoked. - applyDefaultProfile: true, -} - -// New returns a Scheduler -func New(client clientset.Interface, - informerFactory informers.SharedInformerFactory, - dynInformerFactory dynamicinformer.DynamicSharedInformerFactory, - recorderFactory profile.RecorderFactory, - stopCh <-chan struct{}, - opts ...Option) (*Scheduler, error) { - - stopEverything := stopCh - if stopEverything == nil { - stopEverything = wait.NeverStop - } - - options := defaultSchedulerOptions - for _, opt := range opts { - opt(&options) - } - - if options.applyDefaultProfile { - var versionedCfg v1beta3.KubeSchedulerConfiguration - scheme.Scheme.Default(&versionedCfg) - cfg := schedulerapi.KubeSchedulerConfiguration{} - if err := scheme.Scheme.Convert(&versionedCfg, &cfg, nil); err != nil { - return nil, err - } - options.profiles = cfg.Profiles - } - - registry := frameworkplugins.NewInTreeRegistry() - if err := registry.Merge(options.frameworkOutOfTreeRegistry); err != nil { - return nil, err - } - - metrics.Register() - - extenders, err := buildExtenders(options.extenders, options.profiles) - if err != nil { - return nil, fmt.Errorf("couldn't build extenders: %w", err) - } - - podLister := informerFactory.Core().V1().Pods().Lister() - nodeLister := informerFactory.Core().V1().Nodes().Lister() - - // The nominator will be passed all the way to framework instantiation. - nominator := internalqueue.NewPodNominator(podLister) - snapshot := internalcache.NewEmptySnapshot() - clusterEventMap := make(map[framework.ClusterEvent]sets.String) - - profiles, err := profile.NewMap(options.profiles, registry, recorderFactory, - frameworkruntime.WithComponentConfigVersion(options.componentConfigVersion), - frameworkruntime.WithClientSet(client), - frameworkruntime.WithKubeConfig(options.kubeConfig), - frameworkruntime.WithInformerFactory(informerFactory), - frameworkruntime.WithSnapshotSharedLister(snapshot), - frameworkruntime.WithPodNominator(nominator), - frameworkruntime.WithCaptureProfile(frameworkruntime.CaptureProfile(options.frameworkCapturer)), - frameworkruntime.WithClusterEventMap(clusterEventMap), - frameworkruntime.WithParallelism(int(options.parallelism)), - frameworkruntime.WithExtenders(extenders), - ) - if err != nil { - return nil, fmt.Errorf("initializing profiles: %v", err) - } - - if len(profiles) == 0 { - return nil, errors.New("at least one profile is required") - } - - podQueue := internalqueue.NewSchedulingQueue( - profiles[options.profiles[0].SchedulerName].QueueSortFunc(), - informerFactory, - internalqueue.WithPodInitialBackoffDuration(time.Duration(options.podInitialBackoffSeconds)*time.Second), - internalqueue.WithPodMaxBackoffDuration(time.Duration(options.podMaxBackoffSeconds)*time.Second), - internalqueue.WithPodNominator(nominator), - internalqueue.WithClusterEventMap(clusterEventMap), - internalqueue.WithPodMaxInUnschedulablePodsDuration(options.podMaxInUnschedulablePodsDuration), - ) - - schedulerCache := internalcache.New(durationToExpireAssumedPod, stopEverything) - - // Setup cache debugger. - debugger := cachedebugger.New(nodeLister, podLister, schedulerCache, podQueue) - debugger.ListenForSignal(stopEverything) - - sched := newScheduler( - schedulerCache, - extenders, - internalqueue.MakeNextPodFunc(podQueue), - MakeDefaultErrorFunc(client, podLister, podQueue, schedulerCache), - stopEverything, - podQueue, - profiles, - client, - snapshot, - options.percentageOfNodesToScore, - ) - - addAllEventHandlers(sched, informerFactory, dynInformerFactory, unionedGVKs(clusterEventMap)) - - return sched, nil -} - -// Run begins watching and scheduling. It starts scheduling and blocked until the context is done. -func (sched *Scheduler) Run(ctx context.Context) { - sched.SchedulingQueue.Run() - wait.UntilWithContext(ctx, sched.scheduleOne, 0) - sched.SchedulingQueue.Close() -} - -// MakeDefaultErrorFunc construct a function to handle pod scheduler error -func MakeDefaultErrorFunc(client clientset.Interface, podLister corelisters.PodLister, podQueue internalqueue.SchedulingQueue, schedulerCache internalcache.Cache) func(*framework.QueuedPodInfo, error) { - return func(podInfo *framework.QueuedPodInfo, err error) { - pod := podInfo.Pod - if err == ErrNoNodesAvailable { - klog.V(2).InfoS("Unable to schedule pod; no nodes are registered to the cluster; waiting", "pod", klog.KObj(pod)) - } else if fitError, ok := err.(*framework.FitError); ok { - // Inject UnschedulablePlugins to PodInfo, which will be used later for moving Pods between queues efficiently. - podInfo.UnschedulablePlugins = fitError.Diagnosis.UnschedulablePlugins - klog.V(2).InfoS("Unable to schedule pod; no fit; waiting", "pod", klog.KObj(pod), "err", err) - } else if apierrors.IsNotFound(err) { - klog.V(2).InfoS("Unable to schedule pod, possibly due to node not found; waiting", "pod", klog.KObj(pod), "err", err) - if errStatus, ok := err.(apierrors.APIStatus); ok && errStatus.Status().Details.Kind == "node" { - nodeName := errStatus.Status().Details.Name - // when node is not found, We do not remove the node right away. Trying again to get - // the node and if the node is still not found, then remove it from the scheduler cache. - _, err := client.CoreV1().Nodes().Get(context.TODO(), nodeName, metav1.GetOptions{}) - if err != nil && apierrors.IsNotFound(err) { - node := v1.Node{ObjectMeta: metav1.ObjectMeta{Name: nodeName}} - if err := schedulerCache.RemoveNode(&node); err != nil { - klog.V(4).InfoS("Node is not found; failed to remove it from the cache", "node", node.Name) - } - } - } - } else { - klog.ErrorS(err, "Error scheduling pod; retrying", "pod", klog.KObj(pod)) - } - - // Check if the Pod exists in informer cache. - cachedPod, err := podLister.Pods(pod.Namespace).Get(pod.Name) - if err != nil { - klog.InfoS("Pod doesn't exist in informer cache", "pod", klog.KObj(pod), "err", err) - return - } - - // In the case of extender, the pod may have been bound successfully, but timed out returning its response to the scheduler. - // It could result in the live version to carry .spec.nodeName, and that's inconsistent with the internal-queued version. - if len(cachedPod.Spec.NodeName) != 0 { - klog.InfoS("Pod has been assigned to node. Abort adding it back to queue.", "pod", klog.KObj(pod), "node", cachedPod.Spec.NodeName) - return - } - - // As is from SharedInformer, we need to do a DeepCopy() here. - podInfo.PodInfo = framework.NewPodInfo(cachedPod.DeepCopy()) - if err := podQueue.AddUnschedulableIfNotPresent(podInfo, podQueue.SchedulingCycle()); err != nil { - klog.ErrorS(err, "Error occurred") - } - } -} - -// NewInformerFactory creates a SharedInformerFactory and initializes a scheduler specific -// in-place podInformer. -func NewInformerFactory(cs clientset.Interface, resyncPeriod time.Duration) informers.SharedInformerFactory { - informerFactory := informers.NewSharedInformerFactory(cs, resyncPeriod) - informerFactory.InformerFor(&v1.Pod{}, newPodInformer) - return informerFactory -} - -func buildExtenders(extenders []schedulerapi.Extender, profiles []schedulerapi.KubeSchedulerProfile) ([]framework.Extender, error) { - var fExtenders []framework.Extender - if len(extenders) == 0 { - return nil, nil - } - - var ignoredExtendedResources []string - var ignorableExtenders []framework.Extender - for i := range extenders { - klog.V(2).InfoS("Creating extender", "extender", extenders[i]) - extender, err := NewHTTPExtender(&extenders[i]) - if err != nil { - return nil, err - } - if !extender.IsIgnorable() { - fExtenders = append(fExtenders, extender) - } else { - ignorableExtenders = append(ignorableExtenders, extender) - } - for _, r := range extenders[i].ManagedResources { - if r.IgnoredByScheduler { - ignoredExtendedResources = append(ignoredExtendedResources, r.Name) - } - } - } - // place ignorable extenders to the tail of extenders - fExtenders = append(fExtenders, ignorableExtenders...) - - // If there are any extended resources found from the Extenders, append them to the pluginConfig for each profile. - // This should only have an effect on ComponentConfig, where it is possible to configure Extenders and - // plugin args (and in which case the extender ignored resources take precedence). - if len(ignoredExtendedResources) == 0 { - return fExtenders, nil - } - - for i := range profiles { - prof := &profiles[i] - var found = false - for k := range prof.PluginConfig { - if prof.PluginConfig[k].Name == noderesources.Name { - // Update the existing args - pc := &prof.PluginConfig[k] - args, ok := pc.Args.(*schedulerapi.NodeResourcesFitArgs) - if !ok { - return nil, fmt.Errorf("want args to be of type NodeResourcesFitArgs, got %T", pc.Args) - } - args.IgnoredResources = ignoredExtendedResources - found = true - break - } - } - if !found { - return nil, fmt.Errorf("can't find NodeResourcesFitArgs in plugin config") - } - } - return fExtenders, nil -} - -// newScheduler creates a Scheduler object. -func newScheduler( - cache internalcache.Cache, - extenders []framework.Extender, - nextPod func() *framework.QueuedPodInfo, - Error func(*framework.QueuedPodInfo, error), - stopEverything <-chan struct{}, - schedulingQueue internalqueue.SchedulingQueue, - profiles profile.Map, - client clientset.Interface, - nodeInfoSnapshot *internalcache.Snapshot, - percentageOfNodesToScore int32) *Scheduler { - sched := Scheduler{ - Cache: cache, - Extenders: extenders, - NextPod: nextPod, - Error: Error, - StopEverything: stopEverything, - SchedulingQueue: schedulingQueue, - Profiles: profiles, - client: client, - nodeInfoSnapshot: nodeInfoSnapshot, - percentageOfNodesToScore: percentageOfNodesToScore, - } - sched.SchedulePod = sched.schedulePod - return &sched -} - -func unionedGVKs(m map[framework.ClusterEvent]sets.String) map[framework.GVK]framework.ActionType { - gvkMap := make(map[framework.GVK]framework.ActionType) - for evt := range m { - if _, ok := gvkMap[evt.Resource]; ok { - gvkMap[evt.Resource] |= evt.ActionType - } else { - gvkMap[evt.Resource] = evt.ActionType - } - } - return gvkMap -} - -// newPodInformer creates a shared index informer that returns only non-terminal pods. -func newPodInformer(cs clientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - selector := fmt.Sprintf("status.phase!=%v,status.phase!=%v", v1.PodSucceeded, v1.PodFailed) - tweakListOptions := func(options *metav1.ListOptions) { - options.FieldSelector = selector - } - return coreinformers.NewFilteredPodInformer(cs, metav1.NamespaceAll, resyncPeriod, nil, tweakListOptions) -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/security/apparmor/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/security/apparmor/OWNERS deleted file mode 100644 index 123e203f90e9..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/security/apparmor/OWNERS +++ /dev/null @@ -1,10 +0,0 @@ -# See the OWNERS docs at https://go.k8s.io/owners - -approvers: - - sig-node-approvers - - tallclair -reviewers: - - sig-node-reviewers - - tallclair -labels: - - sig/node diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/security/apparmor/validate.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/security/apparmor/validate.go index cbcd9c49f2cc..eb0b96f6f702 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/security/apparmor/validate.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/security/apparmor/validate.go @@ -28,8 +28,8 @@ import ( v1 "k8s.io/api/core/v1" utilfeature "k8s.io/apiserver/pkg/util/feature" podutil "k8s.io/kubernetes/pkg/api/v1/pod" - "k8s.io/kubernetes/pkg/apis/core/validation" "k8s.io/kubernetes/pkg/features" + kubetypes "k8s.io/kubernetes/pkg/kubelet/types" utilpath "k8s.io/utils/path" ) @@ -44,8 +44,8 @@ type Validator interface { } // NewValidator is in order to find AppArmor FS -func NewValidator() Validator { - if err := validateHost(); err != nil { +func NewValidator(runtime string) Validator { + if err := validateHost(runtime); err != nil { return &validator{validateHostErr: err} } appArmorFS, err := getAppArmorFS() @@ -73,21 +73,17 @@ func (v *validator) Validate(pod *v1.Pod) error { return v.validateHostErr } + loadedProfiles, err := v.getLoadedProfiles() + if err != nil { + return fmt.Errorf("could not read loaded profiles: %v", err) + } + var retErr error podutil.VisitContainers(&pod.Spec, podutil.AllContainers, func(container *v1.Container, containerType podutil.ContainerType) bool { - profile := GetProfileName(pod, container.Name) - retErr = validation.ValidateAppArmorProfileFormat(profile) + retErr = validateProfile(GetProfileName(pod, container.Name), loadedProfiles) if retErr != nil { return false } - // TODO(#64841): This would ideally be part of validation.ValidateAppArmorProfileFormat, but - // that is called for API validation, and this is tightening validation. - if strings.HasPrefix(profile, v1.AppArmorBetaProfileNamePrefix) { - if strings.TrimSpace(strings.TrimPrefix(profile, v1.AppArmorBetaProfileNamePrefix)) == "" { - retErr = fmt.Errorf("invalid empty AppArmor profile name: %q", profile) - return false - } - } return true }) @@ -99,7 +95,7 @@ func (v *validator) ValidateHost() error { } // Verify that the host and runtime is capable of enforcing AppArmor profiles. -func validateHost() error { +func validateHost(runtime string) error { // Check feature-gates if !utilfeature.DefaultFeatureGate.Enabled(features.AppArmor) { return errors.New("AppArmor disabled by feature-gate") @@ -115,9 +111,75 @@ func validateHost() error { return errors.New("AppArmor is not enabled on the host") } + // Check runtime support. Currently only Docker is supported. + if runtime != kubetypes.DockerContainerRuntime && runtime != kubetypes.RemoteContainerRuntime { + return fmt.Errorf("AppArmor is only enabled for 'docker' and 'remote' runtimes. Found: %q", runtime) + } + + return nil +} + +// Verify that the profile is valid and loaded. +func validateProfile(profile string, loadedProfiles map[string]bool) error { + if err := ValidateProfileFormat(profile); err != nil { + return err + } + + if strings.HasPrefix(profile, v1.AppArmorBetaProfileNamePrefix) { + profileName := strings.TrimPrefix(profile, v1.AppArmorBetaProfileNamePrefix) + if !loadedProfiles[profileName] { + return fmt.Errorf("profile %q is not loaded", profileName) + } + } + + return nil +} + +// ValidateProfileFormat checks the format of the profile. +func ValidateProfileFormat(profile string) error { + if profile == "" || profile == v1.AppArmorBetaProfileRuntimeDefault || profile == v1.AppArmorBetaProfileNameUnconfined { + return nil + } + if !strings.HasPrefix(profile, v1.AppArmorBetaProfileNamePrefix) { + return fmt.Errorf("invalid AppArmor profile name: %q", profile) + } return nil } +func (v *validator) getLoadedProfiles() (map[string]bool, error) { + profilesPath := path.Join(v.appArmorFS, "profiles") + profilesFile, err := os.Open(profilesPath) + if err != nil { + return nil, fmt.Errorf("failed to open %s: %v", profilesPath, err) + } + defer profilesFile.Close() + + profiles := map[string]bool{} + scanner := bufio.NewScanner(profilesFile) + for scanner.Scan() { + profileName := parseProfileName(scanner.Text()) + if profileName == "" { + // Unknown line format; skip it. + continue + } + profiles[profileName] = true + } + return profiles, nil +} + +// The profiles file is formatted with one profile per line, matching a form: +// namespace://profile-name (mode) +// profile-name (mode) +// Where mode is {enforce, complain, kill}. The "namespace://" is only included for namespaced +// profiles. For the purposes of Kubernetes, we consider the namespace part of the profile name. +func parseProfileName(profileLine string) string { + modeIndex := strings.IndexRune(profileLine, '(') + if modeIndex < 0 { + return "" + } + return strings.TrimSpace(profileLine[:modeIndex]) +} + func getAppArmorFS() (string, error) { mountsFile, err := os.Open("/proc/mounts") if err != nil { diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/bandwidth/OWNERS similarity index 54% rename from cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/OWNERS rename to cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/bandwidth/OWNERS index 19c02ee0b106..37bfd526680a 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/scheduler/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/bandwidth/OWNERS @@ -1,8 +1,8 @@ # See the OWNERS docs at https://go.k8s.io/owners -approvers: - - sig-scheduling-maintainers reviewers: - - sig-scheduling +- sig-network-reviewers +approvers: +- sig-network-approvers labels: - - sig/scheduling +- sig/network diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/bandwidth/doc.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/bandwidth/doc.go new file mode 100644 index 000000000000..3c26aebbf98e --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/bandwidth/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package bandwidth provides utilities for bandwidth shaping +package bandwidth // import "k8s.io/kubernetes/pkg/util/bandwidth" diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/bandwidth/fake_shaper.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/bandwidth/fake_shaper.go new file mode 100644 index 000000000000..591f3e839307 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/bandwidth/fake_shaper.go @@ -0,0 +1,56 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package bandwidth + +import ( + "errors" + + "k8s.io/apimachinery/pkg/api/resource" +) + +// FakeShaper provides an implementation of the bandwidth.Shaper. +// Beware this is implementation has no features besides Reset and GetCIDRs. +type FakeShaper struct { + CIDRs []string + ResetCIDRs []string +} + +// Limit is not implemented +func (f *FakeShaper) Limit(cidr string, egress, ingress *resource.Quantity) error { + return errors.New("unimplemented") +} + +// Reset appends a particular CIDR to the set of ResetCIDRs being managed by this shaper +func (f *FakeShaper) Reset(cidr string) error { + f.ResetCIDRs = append(f.ResetCIDRs, cidr) + return nil +} + +// ReconcileInterface is not implemented +func (f *FakeShaper) ReconcileInterface() error { + return errors.New("unimplemented") +} + +// ReconcileCIDR is not implemented +func (f *FakeShaper) ReconcileCIDR(cidr string, egress, ingress *resource.Quantity) error { + return errors.New("unimplemented") +} + +// GetCIDRs returns the set of CIDRs that are being managed by this shaper +func (f *FakeShaper) GetCIDRs() ([]string, error) { + return f.CIDRs, nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/bandwidth/interfaces.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/bandwidth/interfaces.go new file mode 100644 index 000000000000..ec29d5d10471 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/bandwidth/interfaces.go @@ -0,0 +1,40 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package bandwidth + +import "k8s.io/apimachinery/pkg/api/resource" + +// Shaper is designed so that the shaper structs created +// satisfy the Shaper interface. +type Shaper interface { + // Limit the bandwidth for a particular CIDR on a particular interface + // * ingress and egress are in bits/second + // * cidr is expected to be a valid network CIDR (e.g. '1.2.3.4/32' or '10.20.0.1/16') + // 'egress' bandwidth limit applies to all packets on the interface whose source matches 'cidr' + // 'ingress' bandwidth limit applies to all packets on the interface whose destination matches 'cidr' + // Limits are aggregate limits for the CIDR, not per IP address. CIDRs must be unique, but can be overlapping, traffic + // that matches multiple CIDRs counts against all limits. + Limit(cidr string, egress, ingress *resource.Quantity) error + // Remove a bandwidth limit for a particular CIDR on a particular network interface + Reset(cidr string) error + // Reconcile the interface managed by this shaper with the state on the ground. + ReconcileInterface() error + // Reconcile a CIDR managed by this shaper with the state on the ground + ReconcileCIDR(cidr string, egress, ingress *resource.Quantity) error + // GetCIDRs returns the set of CIDRs that are being managed by this shaper + GetCIDRs() ([]string, error) +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/bandwidth/linux.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/bandwidth/linux.go new file mode 100644 index 000000000000..4f0805aa6910 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/bandwidth/linux.go @@ -0,0 +1,347 @@ +//go:build linux +// +build linux + +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package bandwidth + +import ( + "bufio" + "bytes" + "encoding/hex" + "fmt" + "net" + "regexp" + "strings" + + "k8s.io/apimachinery/pkg/api/resource" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/utils/exec" + netutils "k8s.io/utils/net" + + "k8s.io/klog/v2" +) + +var ( + classShowMatcher = regexp.MustCompile(`class htb (1:\d+)`) + classAndHandleMatcher = regexp.MustCompile(`filter parent 1:.*fh (\d+::\d+).*flowid (\d+:\d+)`) +) + +// tcShaper provides an implementation of the Shaper interface on Linux using the 'tc' tool. +// In general, using this requires that the caller posses the NET_CAP_ADMIN capability, though if you +// do this within an container, it only requires the NS_CAPABLE capability for manipulations to that +// container's network namespace. +// Uses the hierarchical token bucket queuing discipline (htb), this requires Linux 2.4.20 or newer +// or a custom kernel with that queuing discipline backported. +type tcShaper struct { + e exec.Interface + iface string +} + +// NewTCShaper makes a new tcShaper for the given interface +func NewTCShaper(iface string) Shaper { + shaper := &tcShaper{ + e: exec.New(), + iface: iface, + } + return shaper +} + +func (t *tcShaper) execAndLog(cmdStr string, args ...string) error { + klog.V(6).Infof("Running: %s %s", cmdStr, strings.Join(args, " ")) + cmd := t.e.Command(cmdStr, args...) + out, err := cmd.CombinedOutput() + klog.V(6).Infof("Output from tc: %s", string(out)) + return err +} + +func (t *tcShaper) nextClassID() (int, error) { + data, err := t.e.Command("tc", "class", "show", "dev", t.iface).CombinedOutput() + if err != nil { + return -1, err + } + + scanner := bufio.NewScanner(bytes.NewBuffer(data)) + classes := sets.String{} + for scanner.Scan() { + line := strings.TrimSpace(scanner.Text()) + // skip empty lines + if len(line) == 0 { + continue + } + // expected tc line: + // class htb 1:1 root prio 0 rate 1000Kbit ceil 1000Kbit burst 1600b cburst 1600b + matches := classShowMatcher.FindStringSubmatch(line) + if len(matches) != 2 { + return -1, fmt.Errorf("unexpected output from tc: %s (%v)", scanner.Text(), matches) + } + classes.Insert(matches[1]) + } + + // Make sure it doesn't go forever + for nextClass := 1; nextClass < 10000; nextClass++ { + if !classes.Has(fmt.Sprintf("1:%d", nextClass)) { + return nextClass, nil + } + } + // This should really never happen + return -1, fmt.Errorf("exhausted class space, please try again") +} + +// Convert a CIDR from text to a hex representation +// Strips any masked parts of the IP, so 1.2.3.4/16 becomes hex(1.2.0.0)/ffffffff +func hexCIDR(cidr string) (string, error) { + ip, ipnet, err := netutils.ParseCIDRSloppy(cidr) + if err != nil { + return "", err + } + ip = ip.Mask(ipnet.Mask) + hexIP := hex.EncodeToString([]byte(ip)) + hexMask := ipnet.Mask.String() + return hexIP + "/" + hexMask, nil +} + +// Convert a CIDR from hex representation to text, opposite of the above. +func asciiCIDR(cidr string) (string, error) { + parts := strings.Split(cidr, "/") + if len(parts) != 2 { + return "", fmt.Errorf("unexpected CIDR format: %s", cidr) + } + ipData, err := hex.DecodeString(parts[0]) + if err != nil { + return "", err + } + ip := net.IP(ipData) + + maskData, err := hex.DecodeString(parts[1]) + if err != nil { + return "", err + } + mask := net.IPMask(maskData) + size, _ := mask.Size() + + return fmt.Sprintf("%s/%d", ip.String(), size), nil +} + +func (t *tcShaper) findCIDRClass(cidr string) (classAndHandleList [][]string, found bool, err error) { + data, err := t.e.Command("tc", "filter", "show", "dev", t.iface).CombinedOutput() + if err != nil { + return classAndHandleList, false, err + } + + hex, err := hexCIDR(cidr) + if err != nil { + return classAndHandleList, false, err + } + spec := fmt.Sprintf("match %s", hex) + + scanner := bufio.NewScanner(bytes.NewBuffer(data)) + filter := "" + for scanner.Scan() { + line := strings.TrimSpace(scanner.Text()) + if len(line) == 0 { + continue + } + if strings.HasPrefix(line, "filter") { + filter = line + continue + } + if strings.Contains(line, spec) { + // expected tc line: + // `filter parent 1: protocol ip pref 1 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1` (old version) or + // `filter parent 1: protocol ip pref 1 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1 not_in_hw` (new version) + matches := classAndHandleMatcher.FindStringSubmatch(filter) + if len(matches) != 3 { + return classAndHandleList, false, fmt.Errorf("unexpected output from tc: %s %d (%v)", filter, len(matches), matches) + } + resultTmp := []string{matches[2], matches[1]} + classAndHandleList = append(classAndHandleList, resultTmp) + } + } + if len(classAndHandleList) > 0 { + return classAndHandleList, true, nil + } + return classAndHandleList, false, nil +} + +func makeKBitString(rsrc *resource.Quantity) string { + return fmt.Sprintf("%dkbit", (rsrc.Value() / 1000)) +} + +func (t *tcShaper) makeNewClass(rate string) (int, error) { + class, err := t.nextClassID() + if err != nil { + return -1, err + } + if err := t.execAndLog("tc", "class", "add", + "dev", t.iface, + "parent", "1:", + "classid", fmt.Sprintf("1:%d", class), + "htb", "rate", rate); err != nil { + return -1, err + } + return class, nil +} + +func (t *tcShaper) Limit(cidr string, upload, download *resource.Quantity) (err error) { + var downloadClass, uploadClass int + if download != nil { + if downloadClass, err = t.makeNewClass(makeKBitString(download)); err != nil { + return err + } + if err := t.execAndLog("tc", "filter", "add", + "dev", t.iface, + "protocol", "ip", + "parent", "1:0", + "prio", "1", "u32", + "match", "ip", "dst", cidr, + "flowid", fmt.Sprintf("1:%d", downloadClass)); err != nil { + return err + } + } + if upload != nil { + if uploadClass, err = t.makeNewClass(makeKBitString(upload)); err != nil { + return err + } + if err := t.execAndLog("tc", "filter", "add", + "dev", t.iface, + "protocol", "ip", + "parent", "1:0", + "prio", "1", "u32", + "match", "ip", "src", cidr, + "flowid", fmt.Sprintf("1:%d", uploadClass)); err != nil { + return err + } + } + return nil +} + +// tests to see if an interface exists, if it does, return true and the status line for the interface +// returns false, "", if an error occurs. +func (t *tcShaper) interfaceExists() (bool, string, error) { + data, err := t.e.Command("tc", "qdisc", "show", "dev", t.iface).CombinedOutput() + if err != nil { + return false, "", err + } + value := strings.TrimSpace(string(data)) + if len(value) == 0 { + return false, "", nil + } + // Newer versions of tc and/or the kernel return the following instead of nothing: + // qdisc noqueue 0: root refcnt 2 + fields := strings.Fields(value) + if len(fields) > 1 && fields[1] == "noqueue" { + return false, "", nil + } + return true, value, nil +} + +func (t *tcShaper) ReconcileCIDR(cidr string, upload, download *resource.Quantity) error { + _, found, err := t.findCIDRClass(cidr) + if err != nil { + return err + } + if !found { + return t.Limit(cidr, upload, download) + } + // TODO: actually check bandwidth limits here + return nil +} + +func (t *tcShaper) ReconcileInterface() error { + exists, output, err := t.interfaceExists() + if err != nil { + return err + } + if !exists { + klog.V(4).Info("Didn't find bandwidth interface, creating") + return t.initializeInterface() + } + fields := strings.Split(output, " ") + if len(fields) < 12 || fields[1] != "htb" || fields[2] != "1:" { + if err := t.deleteInterface(fields[2]); err != nil { + return err + } + return t.initializeInterface() + } + return nil +} + +func (t *tcShaper) initializeInterface() error { + return t.execAndLog("tc", "qdisc", "add", "dev", t.iface, "root", "handle", "1:", "htb", "default", "30") +} + +func (t *tcShaper) Reset(cidr string) error { + classAndHandle, found, err := t.findCIDRClass(cidr) + if err != nil { + return err + } + if !found { + return fmt.Errorf("Failed to find cidr: %s on interface: %s", cidr, t.iface) + } + for i := 0; i < len(classAndHandle); i++ { + if err := t.execAndLog("tc", "filter", "del", + "dev", t.iface, + "parent", "1:", + "proto", "ip", + "prio", "1", + "handle", classAndHandle[i][1], "u32"); err != nil { + return err + } + if err := t.execAndLog("tc", "class", "del", + "dev", t.iface, + "parent", "1:", + "classid", classAndHandle[i][0]); err != nil { + return err + } + } + return nil +} + +func (t *tcShaper) deleteInterface(class string) error { + return t.execAndLog("tc", "qdisc", "delete", "dev", t.iface, "root", "handle", class) +} + +func (t *tcShaper) GetCIDRs() ([]string, error) { + data, err := t.e.Command("tc", "filter", "show", "dev", t.iface).CombinedOutput() + if err != nil { + return nil, err + } + + result := []string{} + scanner := bufio.NewScanner(bytes.NewBuffer(data)) + for scanner.Scan() { + line := strings.TrimSpace(scanner.Text()) + if len(line) == 0 { + continue + } + if strings.Contains(line, "match") { + parts := strings.Split(line, " ") + // expected tc line: + // match at + if len(parts) != 4 { + return nil, fmt.Errorf("unexpected output: %v", parts) + } + cidr, err := asciiCIDR(parts[1]) + if err != nil { + return nil, err + } + result = append(result, cidr) + } + } + return result, nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/bandwidth/unsupported.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/bandwidth/unsupported.go new file mode 100644 index 000000000000..e3c288015fcf --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/bandwidth/unsupported.go @@ -0,0 +1,54 @@ +//go:build !linux +// +build !linux + +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package bandwidth + +import ( + "errors" + + "k8s.io/apimachinery/pkg/api/resource" +) + +type unsupportedShaper struct { +} + +// NewTCShaper makes a new unsupportedShaper for the given interface +func NewTCShaper(iface string) Shaper { + return &unsupportedShaper{} +} + +func (f *unsupportedShaper) Limit(cidr string, egress, ingress *resource.Quantity) error { + return errors.New("unimplemented") +} + +func (f *unsupportedShaper) Reset(cidr string) error { + return nil +} + +func (f *unsupportedShaper) ReconcileInterface() error { + return errors.New("unimplemented") +} + +func (f *unsupportedShaper) ReconcileCIDR(cidr string, egress, ingress *resource.Quantity) error { + return errors.New("unimplemented") +} + +func (f *unsupportedShaper) GetCIDRs() ([]string, error) { + return []string{}, nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/bandwidth/utils.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/bandwidth/utils.go new file mode 100644 index 000000000000..05eeb7cdabc2 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/bandwidth/utils.go @@ -0,0 +1,66 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package bandwidth + +import ( + "fmt" + + "k8s.io/apimachinery/pkg/api/resource" +) + +var minRsrc = resource.MustParse("1k") +var maxRsrc = resource.MustParse("1P") + +func validateBandwidthIsReasonable(rsrc *resource.Quantity) error { + if rsrc.Value() < minRsrc.Value() { + return fmt.Errorf("resource is unreasonably small (< 1kbit)") + } + if rsrc.Value() > maxRsrc.Value() { + return fmt.Errorf("resource is unreasonably large (> 1Pbit)") + } + return nil +} + +// ExtractPodBandwidthResources extracts the ingress and egress from the given pod annotations +func ExtractPodBandwidthResources(podAnnotations map[string]string) (ingress, egress *resource.Quantity, err error) { + if podAnnotations == nil { + return nil, nil, nil + } + str, found := podAnnotations["kubernetes.io/ingress-bandwidth"] + if found { + ingressValue, err := resource.ParseQuantity(str) + if err != nil { + return nil, nil, err + } + ingress = &ingressValue + if err := validateBandwidthIsReasonable(ingress); err != nil { + return nil, nil, err + } + } + str, found = podAnnotations["kubernetes.io/egress-bandwidth"] + if found { + egressValue, err := resource.ParseQuantity(str) + if err != nil { + return nil, nil, err + } + egress = &egressValue + if err := validateBandwidthIsReasonable(egress); err != nil { + return nil, nil, err + } + } + return ingress, egress, nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/config/config.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/config/config.go index 66fce13866d9..c789daa22833 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/config/config.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/config/config.go @@ -17,7 +17,6 @@ limitations under the License. package config import ( - "context" "sync" "k8s.io/apimachinery/pkg/util/wait" @@ -58,12 +57,12 @@ func NewMux(merger Merger) *Mux { return mux } -// ChannelWithContext returns a channel where a configuration source +// Channel returns a channel where a configuration source // can send updates of new configurations. Multiple calls with the same // source will return the same channel. This allows change and state based sources // to use the same channel. Different source names however will be treated as a // union. -func (m *Mux) ChannelWithContext(ctx context.Context, source string) chan interface{} { +func (m *Mux) Channel(source string) chan interface{} { if len(source) == 0 { panic("Channel given an empty name") } @@ -75,8 +74,7 @@ func (m *Mux) ChannelWithContext(ctx context.Context, source string) chan interf } newChannel := make(chan interface{}) m.sources[source] = newChannel - - go wait.Until(func() { m.listen(source, newChannel) }, 0, ctx.Done()) + go wait.Until(func() { m.listen(source, newChannel) }, 0, wait.NeverStop) return newChannel } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/flag/flags.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/flag/flags.go index ff8e40db8e83..63c48e413d6d 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/flag/flags.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/flag/flags.go @@ -188,46 +188,47 @@ func (v *ReservedMemoryVar) Set(s string) error { return nil } - numaNodeReservations := strings.Split(s, ";") - for _, reservation := range numaNodeReservations { - numaNodeReservation := strings.Split(reservation, ":") - if len(numaNodeReservation) != 2 { - return fmt.Errorf("the reserved memory has incorrect format, expected numaNodeID:type=quantity[,type=quantity...], got %s", reservation) - } - memoryTypeReservations := strings.Split(numaNodeReservation[1], ",") - if len(memoryTypeReservations) < 1 { - return fmt.Errorf("the reserved memory has incorrect format, expected numaNodeID:type=quantity[,type=quantity...], got %s", reservation) - } - numaNodeID, err := strconv.Atoi(numaNodeReservation[0]) - if err != nil { - return fmt.Errorf("failed to convert the NUMA node ID, exptected integer, got %s", numaNodeReservation[0]) - } + numaNodeReservation := strings.Split(s, ":") + if len(numaNodeReservation) != 2 { + return fmt.Errorf("the reserved memory has incorrect format, expected numaNodeID:type=quantity[,type=quantity...], got %s", s) + } - memoryReservation := kubeletconfig.MemoryReservation{ - NumaNode: int32(numaNodeID), - Limits: map[v1.ResourceName]resource.Quantity{}, - } + memoryTypeReservations := strings.Split(numaNodeReservation[1], ",") + if len(memoryTypeReservations) < 1 { + return fmt.Errorf("the reserved memory has incorrect format, expected numaNodeID:type=quantity[,type=quantity...], got %s", s) + } - for _, memoryTypeReservation := range memoryTypeReservations { - limit := strings.Split(memoryTypeReservation, "=") - if len(limit) != 2 { - return fmt.Errorf("the reserved limit has incorrect value, expected type=quantatity, got %s", memoryTypeReservation) - } + numaNodeID, err := strconv.Atoi(numaNodeReservation[0]) + if err != nil { + return fmt.Errorf("failed to convert the NUMA node ID, exptected integer, got %s", numaNodeReservation[0]) + } - resourceName := v1.ResourceName(limit[0]) - if resourceName != v1.ResourceMemory && !corev1helper.IsHugePageResourceName(resourceName) { - return fmt.Errorf("memory type conversion error, unknown type: %q", resourceName) - } + memoryReservation := kubeletconfig.MemoryReservation{ + NumaNode: int32(numaNodeID), + Limits: map[v1.ResourceName]resource.Quantity{}, + } + + for _, reservation := range memoryTypeReservations { + limit := strings.Split(reservation, "=") + if len(limit) != 2 { + return fmt.Errorf("the reserved limit has incorrect value, expected type=quantatity, got %s", reservation) + } - q, err := resource.ParseQuantity(limit[1]) - if err != nil { - return fmt.Errorf("failed to parse the quantatity, expected quantatity, got %s", limit[1]) - } + resourceName := v1.ResourceName(limit[0]) + if resourceName != v1.ResourceMemory && !corev1helper.IsHugePageResourceName(resourceName) { + return fmt.Errorf("memory type conversion error, unknown type: %q", resourceName) + } - memoryReservation.Limits[v1.ResourceName(limit[0])] = q + q, err := resource.ParseQuantity(limit[1]) + if err != nil { + return fmt.Errorf("failed to parse the quantatity, expected quantatity, got %s", limit[1]) } - *v.Value = append(*v.Value, memoryReservation) + + memoryReservation.Limits[v1.ResourceName(limit[0])] = q } + + *v.Value = append(*v.Value, memoryReservation) + return nil } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/goroutinemap/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/goroutinemap/OWNERS index 22ef334c5c4d..1bbf5cf2efa7 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/goroutinemap/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/goroutinemap/OWNERS @@ -1,6 +1,6 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - saad-ali +- saad-ali reviewers: - - saad-ali +- saad-ali diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/ipset/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/ipset/OWNERS index 903c7d97ddb2..bda6c6ad919d 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/ipset/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/ipset/OWNERS @@ -2,10 +2,12 @@ reviewers: - thockin + - brendandburns + - m1093782566 + - islinwb approvers: - thockin -labels: - - sig/network -emeritus_approvers: - brendandburns - m1093782566 +labels: +- sig/network diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/ipset/ipset.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/ipset/ipset.go index 2b145f08f8bc..3481480dedd6 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/ipset/ipset.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/ipset/ipset.go @@ -92,33 +92,35 @@ type IPSet struct { } // Validate checks if a given ipset is valid or not. -func (set *IPSet) Validate() error { +func (set *IPSet) Validate() bool { // Check if protocol is valid for `HashIPPort`, `HashIPPortIP` and `HashIPPortNet` type set. if set.SetType == HashIPPort || set.SetType == HashIPPortIP || set.SetType == HashIPPortNet { - if err := validateHashFamily(set.HashFamily); err != nil { - return err + if valid := validateHashFamily(set.HashFamily); !valid { + return false } } // check set type - if err := validateIPSetType(set.SetType); err != nil { - return err + if valid := validateIPSetType(set.SetType); !valid { + return false } // check port range for bitmap type set if set.SetType == BitmapPort { - if err := validatePortRange(set.PortRange); err != nil { - return err + if valid := validatePortRange(set.PortRange); !valid { + return false } } // check hash size value of ipset if set.HashSize <= 0 { - return fmt.Errorf("invalid HashSize: %d", set.HashSize) + klog.Errorf("Invalid hashsize value %d, should be >0", set.HashSize) + return false } // check max elem value of ipset if set.MaxElem <= 0 { - return fmt.Errorf("invalid MaxElem %d", set.MaxElem) + klog.Errorf("Invalid maxelem value %d, should be >0", set.MaxElem) + return false } - return nil + return true } //setIPSetDefaults sets some IPSet fields if not present to their default values. @@ -273,8 +275,9 @@ func (runner *runner) CreateSet(set *IPSet, ignoreExistErr bool) error { set.setIPSetDefaults() // Validate ipset before creating - if err := set.Validate(); err != nil { - return err + valid := set.Validate() + if !valid { + return fmt.Errorf("error creating ipset since it's invalid") } return runner.createSet(set, ignoreExistErr) } @@ -310,16 +313,16 @@ func (runner *runner) AddEntry(entry string, set *IPSet, ignoreExistErr bool) er if ignoreExistErr { args = append(args, "-exist") } - if out, err := runner.exec.Command(IPSetCmd, args...).CombinedOutput(); err != nil { - return fmt.Errorf("error adding entry %s, error: %v (%s)", entry, err, out) + if _, err := runner.exec.Command(IPSetCmd, args...).CombinedOutput(); err != nil { + return fmt.Errorf("error adding entry %s, error: %v", entry, err) } return nil } // DelEntry is used to delete the specified entry from the set. func (runner *runner) DelEntry(entry string, set string) error { - if out, err := runner.exec.Command(IPSetCmd, "del", set, entry).CombinedOutput(); err != nil { - return fmt.Errorf("error deleting entry %s: from set: %s, error: %v (%s)", entry, set, err, out) + if _, err := runner.exec.Command(IPSetCmd, "del", set, entry).CombinedOutput(); err != nil { + return fmt.Errorf("error deleting entry %s: from set: %s, error: %v", entry, set, err) } return nil } @@ -418,39 +421,44 @@ func getIPSetVersionString(exec utilexec.Interface) (string, error) { // checks if port range is valid. The begin port number is not necessarily less than // end port number - ipset util can accept it. It means both 1-100 and 100-1 are valid. -func validatePortRange(portRange string) error { +func validatePortRange(portRange string) bool { strs := strings.Split(portRange, "-") if len(strs) != 2 { - return fmt.Errorf("invalid PortRange: %q", portRange) + klog.Errorf("port range should be in the format of `a-b`") + return false } for i := range strs { num, err := strconv.Atoi(strs[i]) if err != nil { - return fmt.Errorf("invalid PortRange: %q", portRange) + klog.Errorf("Failed to parse %s, error: %v", strs[i], err) + return false } if num < 0 { - return fmt.Errorf("invalid PortRange: %q", portRange) + klog.Errorf("port number %d should be >=0", num) + return false } } - return nil + return true } // checks if the given ipset type is valid. -func validateIPSetType(set Type) error { +func validateIPSetType(set Type) bool { for _, valid := range ValidIPSetTypes { if set == valid { - return nil + return true } } - return fmt.Errorf("unsupported SetType: %q", set) + klog.Errorf("Currently supported ipset types are: %v, %s is not supported", ValidIPSetTypes, set) + return false } // checks if given hash family is supported in ipset -func validateHashFamily(family string) error { +func validateHashFamily(family string) bool { if family == ProtocolFamilyIPV4 || family == ProtocolFamilyIPV6 { - return nil + return true } - return fmt.Errorf("unsupported HashFamily %q", family) + klog.Errorf("Currently supported ip set hash families are: [%s, %s], %s is not supported", ProtocolFamilyIPV4, ProtocolFamilyIPV6, family) + return false } // IsNotFoundError returns true if the error indicates "not found". It parses diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/iptables/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/iptables/OWNERS index 80a5e13e3085..cc5f832961ad 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/iptables/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/iptables/OWNERS @@ -11,4 +11,4 @@ approvers: emeritus_approvers: - eparis labels: - - sig/network +- sig/network diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/iptables/iptables.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/iptables/iptables.go index 5df8c354da80..0c1a521811e7 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/iptables/iptables.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/iptables/iptables.go @@ -17,12 +17,10 @@ limitations under the License. package iptables import ( - "bufio" "bytes" "context" "fmt" "regexp" - "strconv" "strings" "sync" "time" @@ -287,6 +285,7 @@ func (runner *runner) DeleteChain(table Table, chain Chain) error { runner.mu.Lock() defer runner.mu.Unlock() + // TODO: we could call iptables -S first, ignore the output and check for non-zero return (more like DeleteRule) out, err := runner.run(opDeleteChain, fullArgs) if err != nil { return fmt.Errorf("error deleting chain %q: %v: %s", chain, err, out) @@ -425,11 +424,7 @@ func (runner *runner) restoreInternal(args []string, data []byte, flush FlushFla cmd.SetStdin(bytes.NewBuffer(data)) b, err := cmd.CombinedOutput() if err != nil { - pErr, ok := parseRestoreError(string(b)) - if ok { - return pErr - } - return fmt.Errorf("%w: %s", err, b) + return fmt.Errorf("%v (%s)", err, b) } return nil } @@ -789,89 +784,3 @@ func isResourceError(err error) bool { } return false } - -// ParseError records the payload when iptables reports an error parsing its input. -type ParseError interface { - // Line returns the line number on which the parse error was reported. - // NOTE: First line is 1. - Line() int - // Error returns the error message of the parse error, including line number. - Error() string -} - -type parseError struct { - cmd string - line int -} - -func (e parseError) Line() int { - return e.line -} - -func (e parseError) Error() string { - return fmt.Sprintf("%s: input error on line %d: ", e.cmd, e.line) -} - -// LineData represents a single numbered line of data. -type LineData struct { - // Line holds the line number (the first line is 1). - Line int - // The data of the line. - Data string -} - -var regexpParseError = regexp.MustCompile("line ([1-9][0-9]*) failed$") - -// parseRestoreError extracts the line from the error, if it matches returns parseError -// for example: -// input: iptables-restore: line 51 failed -// output: parseError: cmd = iptables-restore, line = 51 -// NOTE: parseRestoreError depends on the error format of iptables, if it ever changes -// we need to update this function -func parseRestoreError(str string) (ParseError, bool) { - errors := strings.Split(str, ":") - if len(errors) != 2 { - return nil, false - } - cmd := errors[0] - matches := regexpParseError.FindStringSubmatch(errors[1]) - if len(matches) != 2 { - return nil, false - } - line, errMsg := strconv.Atoi(matches[1]) - if errMsg != nil { - return nil, false - } - return parseError{cmd: cmd, line: line}, true -} - -// ExtractLines extracts the -count and +count data from the lineNum row of lines and return -// NOTE: lines start from line 1 -func ExtractLines(lines []byte, line, count int) []LineData { - // first line is line 1, so line can't be smaller than 1 - if line < 1 { - return nil - } - start := line - count - if start <= 0 { - start = 1 - } - end := line + count + 1 - - offset := 1 - scanner := bufio.NewScanner(bytes.NewBuffer(lines)) - extractLines := make([]LineData, 0, count*2) - for scanner.Scan() { - if offset >= start && offset < end { - extractLines = append(extractLines, LineData{ - Line: offset, - Data: scanner.Text(), - }) - } - if offset == end { - break - } - offset++ - } - return extractLines -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/ipvs/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/ipvs/OWNERS index 5cda12c179fd..578fb06dba09 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/ipvs/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/ipvs/OWNERS @@ -2,13 +2,14 @@ reviewers: - thockin + - m1093782566 - andrewsykim + - lbernail approvers: - thockin + - m1093782566 - andrewsykim -labels: - - sig/network - - area/ipvs -emeritus_approvers: - lbernail - - m1093782566 +labels: +- sig/network +- area/ipvs diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/ipvs/ipvs_linux.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/ipvs/ipvs_linux.go index 707cbfa7b413..14a7184f09c7 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/ipvs/ipvs_linux.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/ipvs/ipvs_linux.go @@ -24,12 +24,12 @@ import ( "net" "strings" "sync" + "syscall" "time" "errors" libipvs "github.com/moby/ipvs" - "golang.org/x/sys/unix" "k8s.io/klog/v2" ) @@ -234,7 +234,7 @@ func toVirtualServer(svc *libipvs.Service) (*VirtualServer, error) { vs.Flags = ServiceFlags(svc.Flags &^ uint32(FlagHashed)) if vs.Address == nil { - if svc.AddressFamily == unix.AF_INET { + if svc.AddressFamily == syscall.AF_INET { vs.Address = net.IPv4zero } else { vs.Address = net.IPv6zero @@ -272,10 +272,10 @@ func toIPVSService(vs *VirtualServer) (*libipvs.Service, error) { } if ip4 := vs.Address.To4(); ip4 != nil { - ipvsSvc.AddressFamily = unix.AF_INET + ipvsSvc.AddressFamily = syscall.AF_INET ipvsSvc.Netmask = 0xffffffff } else { - ipvsSvc.AddressFamily = unix.AF_INET6 + ipvsSvc.AddressFamily = syscall.AF_INET6 ipvsSvc.Netmask = 128 } return ipvsSvc, nil @@ -297,11 +297,11 @@ func toIPVSDestination(rs *RealServer) (*libipvs.Destination, error) { func stringToProtocol(protocol string) uint16 { switch strings.ToLower(protocol) { case "tcp": - return uint16(unix.IPPROTO_TCP) + return uint16(syscall.IPPROTO_TCP) case "udp": - return uint16(unix.IPPROTO_UDP) + return uint16(syscall.IPPROTO_UDP) case "sctp": - return uint16(unix.IPPROTO_SCTP) + return uint16(syscall.IPPROTO_SCTP) } return uint16(0) } @@ -309,11 +309,11 @@ func stringToProtocol(protocol string) uint16 { // protocolTypeToString returns the name for the given protocol. func protocolToString(proto Protocol) string { switch proto { - case unix.IPPROTO_TCP: + case syscall.IPPROTO_TCP: return "TCP" - case unix.IPPROTO_UDP: + case syscall.IPPROTO_UDP: return "UDP" - case unix.IPPROTO_SCTP: + case syscall.IPPROTO_SCTP: return "SCTP" } return "" diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/netsh/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/netsh/OWNERS index 548730fa9528..37bfd526680a 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/netsh/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/netsh/OWNERS @@ -1,8 +1,8 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - - sig-network-reviewers +- sig-network-reviewers approvers: - - sig-network-approvers +- sig-network-approvers labels: - - sig/network +- sig/network diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/node/node.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/node/node.go index 5646207cbbc1..aac738c200c9 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/node/node.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/node/node.go @@ -164,13 +164,3 @@ func GetNodeIP(client clientset.Interface, name string) net.IP { } return nodeIP } - -// IsNodeReady returns true if a node is ready; false otherwise. -func IsNodeReady(node *v1.Node) bool { - for _, c := range node.Status.Conditions { - if c.Type == v1.NodeReady { - return c.Status == v1.ConditionTrue - } - } - return false -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/procfs/doc.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/procfs/doc.go new file mode 100644 index 000000000000..bf4a78d03d78 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/procfs/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package procfs implements utility functions relating to the /proc mount. +package procfs // import "k8s.io/kubernetes/pkg/util/procfs" diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/procfs/example_proc_cgroup b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/procfs/example_proc_cgroup new file mode 100644 index 000000000000..3e42ce92751c --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/procfs/example_proc_cgroup @@ -0,0 +1,10 @@ +11:name=systemd:/user/1000.user/c1.session +10:hugetlb:/user/1000.user/c1.session +9:perf_event:/user/1000.user/c1.session +8:blkio:/user/1000.user/c1.session +7:freezer:/user/1000.user/c1.session +6:devices:/user/1000.user/c1.session +5:memory:/user/1000.user/c1.session +4:cpuacct:/user/1000.user/c1.session +3:cpu:/user/1000.user/c1.session +2:cpuset:/ \ No newline at end of file diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/procfs/procfs.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/procfs/procfs.go new file mode 100644 index 000000000000..f75a839983e8 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/procfs/procfs.go @@ -0,0 +1,22 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package procfs + +type ProcFSInterface interface { + // GetFullContainerName gets the container name given the root process id of the container. + GetFullContainerName(pid int) (string, error) +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/procfs/procfs_fake.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/procfs/procfs_fake.go new file mode 100644 index 000000000000..841056a466a5 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/procfs/procfs_fake.go @@ -0,0 +1,30 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package procfs + +type FakeProcFS struct{} + +func NewFakeProcFS() ProcFSInterface { + return &FakeProcFS{} +} + +// GetFullContainerName gets the container name given the root process id of the container. +// E.g. if the devices cgroup for the container is stored in /sys/fs/cgroup/devices/docker/nginx, +// return docker/nginx. Assumes that the process is part of exactly one cgroup hierarchy. +func (fakePfs *FakeProcFS) GetFullContainerName(pid int) (string, error) { + return "", nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/procfs/procfs_linux.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/procfs/procfs_linux.go new file mode 100644 index 000000000000..371a1d1285ab --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/procfs/procfs_linux.go @@ -0,0 +1,168 @@ +//go:build linux +// +build linux + +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package procfs + +import ( + "bytes" + "fmt" + "io" + "io/ioutil" + "os" + "path" + "path/filepath" + "regexp" + "strconv" + "strings" + "syscall" + "unicode" + + utilerrors "k8s.io/apimachinery/pkg/util/errors" + "k8s.io/klog/v2" +) + +// ProcFS provides a helper for getting container name via pid. +type ProcFS struct{} + +// NewProcFS returns a ProcFS object. +func NewProcFS() ProcFSInterface { + return &ProcFS{} +} + +func containerNameFromProcCgroup(content string) (string, error) { + lines := strings.Split(content, "\n") + for _, line := range lines { + entries := strings.SplitN(line, ":", 3) + if len(entries) == 3 && entries[1] == "devices" { + return strings.TrimSpace(entries[2]), nil + } + } + return "", fmt.Errorf("could not find devices cgroup location") +} + +// GetFullContainerName gets the container name given the root process id of the container. +// E.g. if the devices cgroup for the container is stored in /sys/fs/cgroup/devices/docker/nginx, +// return docker/nginx. Assumes that the process is part of exactly one cgroup hierarchy. +func (pfs *ProcFS) GetFullContainerName(pid int) (string, error) { + filePath := path.Join("/proc", strconv.Itoa(pid), "cgroup") + content, err := ioutil.ReadFile(filePath) + if err != nil { + if os.IsNotExist(err) { + return "", os.ErrNotExist + } + return "", err + } + return containerNameFromProcCgroup(string(content)) +} + +// PKill finds process(es) using a regular expression and send a specified +// signal to each process. +func PKill(name string, sig syscall.Signal) error { + if len(name) == 0 { + return fmt.Errorf("name should not be empty") + } + re, err := regexp.Compile(name) + if err != nil { + return err + } + pids := getPids(re) + if len(pids) == 0 { + return fmt.Errorf("unable to fetch pids for process name : %q", name) + } + errList := []error{} + for _, pid := range pids { + if err = syscall.Kill(pid, sig); err != nil { + errList = append(errList, err) + } + } + return utilerrors.NewAggregate(errList) +} + +// PidOf finds process(es) with a specified name (regexp match) +// and return their pid(s). +func PidOf(name string) ([]int, error) { + if len(name) == 0 { + return []int{}, fmt.Errorf("name should not be empty") + } + re, err := regexp.Compile("(^|/)" + name + "$") + if err != nil { + return []int{}, err + } + return getPids(re), nil +} + +func getPids(re *regexp.Regexp) []int { + pids := []int{} + + dirFD, err := os.Open("/proc") + if err != nil { + return nil + } + defer dirFD.Close() + + for { + // Read a small number at a time in case there are many entries, we don't want to + // allocate a lot here. + ls, err := dirFD.Readdir(10) + if err == io.EOF { + break + } + if err != nil { + return nil + } + + for _, entry := range ls { + if !entry.IsDir() { + continue + } + + // If the directory is not a number (i.e. not a PID), skip it + pid, err := strconv.Atoi(entry.Name()) + if err != nil { + continue + } + + cmdline, err := ioutil.ReadFile(filepath.Join("/proc", entry.Name(), "cmdline")) + if err != nil { + klog.V(4).Infof("Error reading file %s: %+v", filepath.Join("/proc", entry.Name(), "cmdline"), err) + continue + } + + // The bytes we read have '\0' as a separator for the command line + parts := bytes.SplitN(cmdline, []byte{0}, 2) + if len(parts) == 0 { + continue + } + // Split the command line itself we are interested in just the first part + exe := strings.FieldsFunc(string(parts[0]), func(c rune) bool { + return unicode.IsSpace(c) || c == ':' + }) + if len(exe) == 0 { + continue + } + // Check if the name of the executable is what we are looking for + if re.MatchString(exe[0]) { + // Grab the PID from the directory path + pids = append(pids, pid) + } + } + } + + return pids +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/procfs/procfs_unsupported.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/procfs/procfs_unsupported.go new file mode 100644 index 000000000000..7ff7a49fa0b0 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/procfs/procfs_unsupported.go @@ -0,0 +1,48 @@ +//go:build !linux +// +build !linux + +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package procfs + +import ( + "fmt" + "syscall" +) + +type ProcFS struct{} + +func NewProcFS() ProcFSInterface { + return &ProcFS{} +} + +// GetFullContainerName gets the container name given the root process id of the container. +func (pfs *ProcFS) GetFullContainerName(pid int) (string, error) { + return "", fmt.Errorf("GetFullContainerName is unsupported in this build") +} + +// Find process(es) using a regular expression and send a specified +// signal to each process +func PKill(name string, sig syscall.Signal) error { + return fmt.Errorf("PKill is unsupported in this build") +} + +// Find process(es) with a specified name (exact match) +// and return their pid(s) +func PidOf(name string) ([]int, error) { + return []int{}, fmt.Errorf("PidOf is unsupported in this build") +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/removeall/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/removeall/OWNERS index 451008a3e992..6b5f6ba5041c 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/removeall/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/removeall/OWNERS @@ -1,8 +1,8 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - sig-storage-approvers +- sig-storage-approvers reviewers: - - sig-storage-reviewers +- sig-storage-reviewers labels: - - sig/storage +- sig/storage diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/selinux/doc.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/selinux/doc.go new file mode 100644 index 000000000000..2757203f93cf --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/selinux/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package selinux contains wrapper functions for the libcontainer SELinux +// package. A NOP implementation is provided for non-linux platforms. +package selinux // import "k8s.io/kubernetes/pkg/util/selinux" diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/selinux/selinux.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/selinux/selinux.go new file mode 100644 index 000000000000..c367f7bbe7c8 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/selinux/selinux.go @@ -0,0 +1,39 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package selinux + +// Note: the libcontainer SELinux package is only built for Linux, so it is +// necessary to have a NOP wrapper which is built for non-Linux platforms to +// allow code that links to this package not to differentiate its own methods +// for Linux and non-Linux platforms. +// +// SELinuxRunner wraps certain libcontainer SELinux calls. For more +// information, see: +// +// https://github.com/opencontainers/runc/blob/master/libcontainer/selinux/selinux.go +type SELinuxRunner interface { + // Getfilecon returns the SELinux context for the given path or returns an + // error. + Getfilecon(path string) (string, error) +} + +// NewSELinuxRunner returns a new SELinuxRunner appropriate for the platform. +// On Linux, all methods short-circuit and return NOP values if SELinux is +// disabled. On non-Linux platforms, a NOP implementation is returned. +func NewSELinuxRunner() SELinuxRunner { + return &realSELinuxRunner{} +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/selinux/selinux_linux.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/selinux/selinux_linux.go new file mode 100644 index 000000000000..96525ed2ee53 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/selinux/selinux_linux.go @@ -0,0 +1,58 @@ +//go:build linux +// +build linux + +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package selinux + +import ( + selinux "github.com/opencontainers/selinux/go-selinux" +) + +// SELinuxEnabled returns whether SELinux is enabled on the system. SELinux +// has a tri-state: +// +// 1. disabled: SELinux Kernel modules not loaded, SELinux policy is not +// checked during Kernel MAC checks +// 2. enforcing: Enabled; SELinux policy violations are denied and logged +// in the audit log +// 3. permissive: Enabled, but SELinux policy violations are permitted and +// logged in the audit log +// +// SELinuxEnabled returns true if SELinux is enforcing or permissive, and +// false if it is disabled. +func SELinuxEnabled() bool { + return selinux.GetEnabled() +} + +// realSELinuxRunner is the real implementation of SELinuxRunner interface for +// Linux. +type realSELinuxRunner struct{} + +var _ SELinuxRunner = &realSELinuxRunner{} + +func (_ *realSELinuxRunner) Getfilecon(path string) (string, error) { + if !SELinuxEnabled() { + return "", nil + } + return selinux.FileLabel(path) +} + +// SetFileLabel applies the SELinux label on the path or returns an error. +func SetFileLabel(path string, label string) error { + return selinux.SetFileLabel(path, label) +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/selinux/selinux_unsupported.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/selinux/selinux_unsupported.go new file mode 100644 index 000000000000..fb54d5a7b37f --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/selinux/selinux_unsupported.go @@ -0,0 +1,39 @@ +//go:build !linux +// +build !linux + +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package selinux + +// SELinuxEnabled always returns false on non-linux platforms. +func SELinuxEnabled() bool { + return false +} + +// realSELinuxRunner is the NOP implementation of the SELinuxRunner interface. +type realSELinuxRunner struct{} + +var _ SELinuxRunner = &realSELinuxRunner{} + +func (_ *realSELinuxRunner) Getfilecon(path string) (string, error) { + return "", nil +} + +// FileLabel returns the SELinux label for this path or returns an error. +func SetFileLabel(path string, label string) error { + return nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/slice/slice.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/slice/slice.go new file mode 100644 index 000000000000..872fbdcad650 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/slice/slice.go @@ -0,0 +1,75 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package slice provides utility methods for common operations on slices. +package slice + +import ( + "sort" +) + +// CopyStrings copies the contents of the specified string slice +// into a new slice. +func CopyStrings(s []string) []string { + if s == nil { + return nil + } + c := make([]string, len(s)) + copy(c, s) + return c +} + +// SortStrings sorts the specified string slice in place. It returns the same +// slice that was provided in order to facilitate method chaining. +func SortStrings(s []string) []string { + sort.Strings(s) + return s +} + +// ContainsString checks if a given slice of strings contains the provided string. +// If a modifier func is provided, it is called with the slice item before the comparation. +func ContainsString(slice []string, s string, modifier func(s string) string) bool { + for _, item := range slice { + if item == s { + return true + } + if modifier != nil && modifier(item) == s { + return true + } + } + return false +} + +// RemoveString returns a newly created []string that contains all items from slice that +// are not equal to s and modifier(s) in case modifier func is provided. +func RemoveString(slice []string, s string, modifier func(s string) string) []string { + newSlice := make([]string, 0) + for _, item := range slice { + if item == s { + continue + } + if modifier != nil && modifier(item) == s { + continue + } + newSlice = append(newSlice, item) + } + if len(newSlice) == 0 { + // Sanitize for unit tests so we don't need to distinguish empty array + // and nil. + newSlice = nil + } + return newSlice +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/taints/taints.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/taints/taints.go index abc3bcf50d14..4cfe227f8b82 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/taints/taints.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/util/taints/taints.go @@ -275,16 +275,6 @@ func TaintExists(taints []v1.Taint, taintToFind *v1.Taint) bool { return false } -// TaintKeyExists checks if the given taint key exists in list of taints. Returns true if exists false otherwise. -func TaintKeyExists(taints []v1.Taint, taintKeyToMatch string) bool { - for _, taint := range taints { - if taint.Key == taintKeyToMatch { - return true - } - } - return false -} - func TaintSetDiff(t1, t2 []v1.Taint) (taintsToAdd []*v1.Taint, taintsToRemove []*v1.Taint) { for _, taint := range t1 { if !TaintExists(t2, &taint) { diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/OWNERS index 451008a3e992..6b5f6ba5041c 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/OWNERS @@ -1,8 +1,8 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - sig-storage-approvers +- sig-storage-approvers reviewers: - - sig-storage-reviewers +- sig-storage-reviewers labels: - - sig/storage +- sig/storage diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/awsebs/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/awsebs/OWNERS index 746c74a7a6a7..002a3cb5c1cb 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/awsebs/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/awsebs/OWNERS @@ -1,13 +1,15 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - gnufied - - jingxu97 - - jsafrane - - justinsb +- gnufied +- jingxu97 +- jsafrane +- justinsb reviewers: - - gnufied - - jingxu97 - - justinsb - - jsafrane - - saad-ali +- chrislovecnm +- gnufied +- jingxu97 +- justinsb +- jsafrane +- rootfs +- saad-ali diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/awsebs/aws_ebs.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/awsebs/aws_ebs.go index 6d4752d17a70..5d5745e38831 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/awsebs/aws_ebs.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/awsebs/aws_ebs.go @@ -350,12 +350,19 @@ var _ volume.Mounter = &awsElasticBlockStoreMounter{} func (b *awsElasticBlockStoreMounter) GetAttributes() volume.Attributes { return volume.Attributes{ - ReadOnly: b.readOnly, - Managed: !b.readOnly, - SELinuxRelabel: true, + ReadOnly: b.readOnly, + Managed: !b.readOnly, + SupportsSELinux: true, } } +// Checks prior to mount operations to verify that the required components (binaries, etc.) +// to mount the volume are available on the underlying node. +// If not, it returns an error +func (b *awsElasticBlockStoreMounter) CanMount() error { + return nil +} + // SetUp attaches the disk and bind mounts to the volume path. func (b *awsElasticBlockStoreMounter) SetUp(mounterArgs volume.MounterArgs) error { return b.SetUpAt(b.GetPath(), mounterArgs) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/azure_file/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/azure_file/OWNERS index 71675e1ce81e..f31baacd7f27 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/azure_file/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/azure_file/OWNERS @@ -1,18 +1,20 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - andyzhangx - - feiskyer - - khenidak +- andyzhangx +- brendandburns +- feiskyer +- karataliu +- khenidak +- rootfs reviewers: - - andyzhangx - - feiskyer - - jsafrane - - jingxu97 - - khenidak - - msau42 - - saad-ali -emeritus_approvers: - - karataliu - - rootfs - - brendandburns +- andyzhangx +- brendandburns +- feiskyer +- jsafrane +- jingxu97 +- karataliu +- khenidak +- msau42 +- rootfs +- saad-ali diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/azure_file/azure_file.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/azure_file/azure_file.go index 61953cf3d48b..bcf4e273f2c3 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/azure_file/azure_file.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/azure_file/azure_file.go @@ -239,12 +239,19 @@ var _ volume.Mounter = &azureFileMounter{} func (b *azureFileMounter) GetAttributes() volume.Attributes { return volume.Attributes{ - ReadOnly: b.readOnly, - Managed: !b.readOnly, - SELinuxRelabel: false, + ReadOnly: b.readOnly, + Managed: !b.readOnly, + SupportsSELinux: false, } } +// Checks prior to mount operations to verify that the required components (binaries, etc.) +// to mount the volume are available on the underlying node. +// If not, it returns an error +func (b *azureFileMounter) CanMount() error { + return nil +} + // SetUp attaches the disk and bind mounts to the volume path. func (b *azureFileMounter) SetUp(mounterArgs volume.MounterArgs) error { return b.SetUpAt(b.GetPath(), mounterArgs) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/azuredd/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/azuredd/OWNERS index aebe808043ef..c19d21c8842b 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/azuredd/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/azuredd/OWNERS @@ -1,20 +1,22 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - andyzhangx - - feiskyer - - khenidak +- andyzhangx +- brendandburns +- feiskyer +- karataliu +- khenidak +- rootfs reviewers: - - andyzhangx - - aramase - - feiskyer - - jingxu97 - - jsafrane - - msau42 - - khenidak - - ritazh - - saad-ali -emeritus_approvers: - - karataliu - - rootfs - - brendandburns +- andyzhangx +- aramase +- brendandburns +- feiskyer +- jingxu97 +- jsafrane +- msau42 +- karataliu +- khenidak +- ritazh +- rootfs +- saad-ali diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/azuredd/azure_mounter.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/azuredd/azure_mounter.go index 0fe6eec52372..647533510fff 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/azuredd/azure_mounter.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/azuredd/azure_mounter.go @@ -56,12 +56,16 @@ func (m *azureDiskMounter) GetAttributes() volume.Attributes { readOnly = *volumeSource.ReadOnly } return volume.Attributes{ - ReadOnly: readOnly, - Managed: !readOnly, - SELinuxRelabel: true, + ReadOnly: readOnly, + Managed: !readOnly, + SupportsSELinux: true, } } +func (m *azureDiskMounter) CanMount() error { + return nil +} + func (m *azureDiskMounter) SetUp(mounterArgs volume.MounterArgs) error { return m.SetUpAt(m.GetPath(), mounterArgs) } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/cephfs/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/cephfs/OWNERS index 6c65f0069ed7..7f2065bec2e0 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/cephfs/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/cephfs/OWNERS @@ -1,13 +1,13 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - jsafrane - - saad-ali +- rootfs +- jsafrane +- saad-ali reviewers: - - saad-ali - - jsafrane - - jingxu97 - - msau42 - - cofyc -emeritus_approvers: - - rootfs +- rootfs +- saad-ali +- jsafrane +- jingxu97 +- msau42 +- cofyc diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/cephfs/cephfs.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/cephfs/cephfs.go index 6aaec9963f7b..9e997e35f554 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/cephfs/cephfs.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/cephfs/cephfs.go @@ -206,12 +206,19 @@ var _ volume.Mounter = &cephfsMounter{} func (cephfsVolume *cephfsMounter) GetAttributes() volume.Attributes { return volume.Attributes{ - ReadOnly: cephfsVolume.readonly, - Managed: false, - SELinuxRelabel: false, + ReadOnly: cephfsVolume.readonly, + Managed: false, + SupportsSELinux: false, } } +// Checks prior to mount operations to verify that the required components (binaries, etc.) +// to mount the volume are available on the underlying node. +// If not, it returns an error +func (cephfsVolume *cephfsMounter) CanMount() error { + return nil +} + // SetUp attaches the disk and bind mounts to the volume path. func (cephfsVolume *cephfsMounter) SetUp(mounterArgs volume.MounterArgs) error { return cephfsVolume.SetUpAt(cephfsVolume.GetPath(), mounterArgs) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/cinder/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/cinder/OWNERS index 798d555dfae1..0e41158224ce 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/cinder/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/cinder/OWNERS @@ -1,14 +1,15 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - jsafrane - - anguslees - - dims +- jsafrane +- anguslees +- dims +- FengyunPan2 reviewers: - - anguslees - - saad-ali - - jsafrane - - jingxu97 - - msau42 -emeritus_approvers: - - FengyunPan2 +- anguslees +- rootfs +- saad-ali +- jsafrane +- jingxu97 +- msau42 +- FengyunPan2 diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/cinder/cinder.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/cinder/cinder.go index 88f89489aec5..f917d2bc9d9b 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/cinder/cinder.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/cinder/cinder.go @@ -371,12 +371,19 @@ type cinderVolume struct { func (b *cinderVolumeMounter) GetAttributes() volume.Attributes { return volume.Attributes{ - ReadOnly: b.readOnly, - Managed: !b.readOnly, - SELinuxRelabel: true, + ReadOnly: b.readOnly, + Managed: !b.readOnly, + SupportsSELinux: true, } } +// Checks prior to mount operations to verify that the required components (binaries, etc.) +// to mount the volume are available on the underlying node. +// If not, it returns an error +func (b *cinderVolumeMounter) CanMount() error { + return nil +} + func (b *cinderVolumeMounter) SetUp(mounterArgs volume.MounterArgs) error { return b.SetUpAt(b.GetPath(), mounterArgs) } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/configmap/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/configmap/OWNERS index 463078e35830..8ef14a0c2a02 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/configmap/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/configmap/OWNERS @@ -1,15 +1,17 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - saad-ali - - thockin +- pmorie +- saad-ali +- thockin emeritus_approvers: - - matchstick - - pmorie +- matchstick reviewers: - - rata - - sjenning - - saad-ali - - jsafrane - - jingxu97 - - msau42 +- ivan4th +- rata +- sjenning +- saad-ali +- jsafrane +- rootfs +- jingxu97 +- msau42 diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/configmap/configmap.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/configmap/configmap.go index e72f5bccb707..607587938f1c 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/configmap/configmap.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/configmap/configmap.go @@ -157,9 +157,9 @@ var _ volume.Mounter = &configMapVolumeMounter{} func (sv *configMapVolume) GetAttributes() volume.Attributes { return volume.Attributes{ - ReadOnly: true, - Managed: true, - SELinuxRelabel: true, + ReadOnly: true, + Managed: true, + SupportsSELinux: true, } } @@ -173,6 +173,13 @@ func wrappedVolumeSpec() volume.Spec { } } +// Checks prior to mount operations to verify that the required components (binaries, etc.) +// to mount the volume are available on the underlying node. +// If not, it returns an error +func (b *configMapVolumeMounter) CanMount() error { + return nil +} + func (b *configMapVolumeMounter) SetUp(mounterArgs volume.MounterArgs) error { return b.SetUpAt(b.GetPath(), mounterArgs) } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_attacher.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_attacher.go index 11de3c558bc8..494e46d8eb0d 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_attacher.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_attacher.go @@ -32,6 +32,7 @@ import ( v1 "k8s.io/api/core/v1" storage "k8s.io/api/storage/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" + meta "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/wait" @@ -66,11 +67,6 @@ var _ volume.Detacher = &csiAttacher{} var _ volume.DeviceMounter = &csiAttacher{} func (c *csiAttacher) Attach(spec *volume.Spec, nodeName types.NodeName) (string, error) { - _, ok := c.plugin.host.(volume.KubeletVolumeHost) - if ok { - return "", errors.New("attaching volumes from the kubelet is not supported") - } - if spec == nil { klog.Error(log("attacher.Attach missing volume.Spec")) return "", errors.New("missing spec") @@ -110,7 +106,7 @@ func (c *csiAttacher) Attach(spec *volume.Spec, nodeName types.NodeName) (string } attachment := &storage.VolumeAttachment{ - ObjectMeta: metav1.ObjectMeta{ + ObjectMeta: meta.ObjectMeta{ Name: attachID, }, Spec: storage.VolumeAttachmentSpec{ @@ -133,7 +129,7 @@ func (c *csiAttacher) Attach(spec *volume.Spec, nodeName types.NodeName) (string // Attach and detach functionality is exclusive to the CSI plugin that runs in the AttachDetachController, // and has access to a VolumeAttachment lister that can be polled for the current status. - if err := c.waitForVolumeAttachmentWithLister(spec, pvSrc.VolumeHandle, attachID, c.watchTimeout); err != nil { + if err := c.waitForVolumeAttachmentWithLister(pvSrc.VolumeHandle, attachID, c.watchTimeout); err != nil { return "", err } @@ -166,7 +162,7 @@ func (c *csiAttacher) waitForVolumeAttachment(volumeHandle, attachID string, tim func (c *csiAttacher) waitForVolumeAttachmentInternal(volumeHandle, attachID string, timer *time.Timer, timeout time.Duration) (string, error) { klog.V(4).Info(log("probing VolumeAttachment [id=%v]", attachID)) - attach, err := c.k8s.StorageV1().VolumeAttachments().Get(context.TODO(), attachID, metav1.GetOptions{}) + attach, err := c.k8s.StorageV1().VolumeAttachments().Get(context.TODO(), attachID, meta.GetOptions{}) if err != nil { klog.Error(log("attacher.WaitForAttach failed for volume [%s] (will continue to try): %v", volumeHandle, err)) return "", fmt.Errorf("volume %v has GET error for volume attachment %v: %v", volumeHandle, attachID, err) @@ -178,7 +174,7 @@ func (c *csiAttacher) waitForVolumeAttachmentInternal(volumeHandle, attachID str return attach.Name, nil } -func (c *csiAttacher) waitForVolumeAttachmentWithLister(spec *volume.Spec, volumeHandle, attachID string, timeout time.Duration) error { +func (c *csiAttacher) waitForVolumeAttachmentWithLister(volumeHandle, attachID string, timeout time.Duration) error { klog.V(4).Info(log("probing VolumeAttachment [id=%v]", attachID)) verifyStatus := func() (bool, error) { @@ -201,7 +197,7 @@ func (c *csiAttacher) waitForVolumeAttachmentWithLister(spec *volume.Spec, volum return successful, nil } - return c.waitForVolumeAttachDetachStatusWithLister(spec, volumeHandle, attachID, timeout, verifyStatus, "Attach") + return c.waitForVolumeAttachDetachStatusWithLister(volumeHandle, attachID, timeout, verifyStatus, "Attach") } func (c *csiAttacher) VolumesAreAttached(specs []*volume.Spec, nodeName types.NodeName) (map[*volume.Spec]bool, error) { @@ -247,7 +243,7 @@ func (c *csiAttacher) VolumesAreAttached(specs []*volume.Spec, nodeName types.No // The cache lookup is not setup or the object is not found in the cache. // Get the object from the API server. klog.V(4).Info(log("probing attachment status for VolumeAttachment %v", attachID)) - attach, err = c.k8s.StorageV1().VolumeAttachments().Get(context.TODO(), attachID, metav1.GetOptions{}) + attach, err = c.k8s.StorageV1().VolumeAttachments().Get(context.TODO(), attachID, meta.GetOptions{}) if err != nil { attached[spec] = false klog.Error(log("attacher.VolumesAreAttached failed for attach.ID=%v: %v", attachID, err)) @@ -409,11 +405,6 @@ var _ volume.Detacher = &csiAttacher{} var _ volume.DeviceUnmounter = &csiAttacher{} func (c *csiAttacher) Detach(volumeName string, nodeName types.NodeName) error { - _, ok := c.plugin.host.(volume.KubeletVolumeHost) - if ok { - return errors.New("detaching volumes from the kubelet is not supported") - } - var attachID string var volID string @@ -422,16 +413,29 @@ func (c *csiAttacher) Detach(volumeName string, nodeName types.NodeName) error { return errors.New("missing expected parameter volumeName") } - // volumeName in format driverNamevolumeHandle generated by plugin.GetVolumeName() - parts := strings.Split(volumeName, volNameSep) - if len(parts) != 2 { - klog.Error(log("detacher.Detach insufficient info encoded in volumeName")) - return errors.New("volumeName missing expected data") - } + if isAttachmentName(volumeName) { + // Detach can also be called with the attach ID as the `volumeName`. This codepath is + // hit only when we have migrated an in-tree volume to CSI and the A/D Controller is shut + // down, the pod with the volume is deleted, and the A/D Controller starts back up in that + // order. + attachID = volumeName + + // Vol ID should be the volume handle, except that is not available here. + // It is only used in log messages so in the event that this happens log messages will be + // printing out the attachID instead of the volume handle. + volID = volumeName + } else { + // volumeName in format driverNamevolumeHandle generated by plugin.GetVolumeName() + parts := strings.Split(volumeName, volNameSep) + if len(parts) != 2 { + klog.Error(log("detacher.Detach insufficient info encoded in volumeName")) + return errors.New("volumeName missing expected data") + } - driverName := parts[0] - volID = parts[1] - attachID = getAttachmentName(volID, driverName, string(nodeName)) + driverName := parts[0] + volID = parts[1] + attachID = getAttachmentName(volID, driverName, string(nodeName)) + } if err := c.k8s.StorageV1().VolumeAttachments().Delete(context.TODO(), attachID, metav1.DeleteOptions{}); err != nil { if apierrors.IsNotFound(err) { @@ -473,10 +477,10 @@ func (c *csiAttacher) waitForVolumeDetachmentWithLister(volumeHandle, attachID s return successful, nil } - return c.waitForVolumeAttachDetachStatusWithLister(nil, volumeHandle, attachID, timeout, verifyStatus, "Detach") + return c.waitForVolumeAttachDetachStatusWithLister(volumeHandle, attachID, timeout, verifyStatus, "Detach") } -func (c *csiAttacher) waitForVolumeAttachDetachStatusWithLister(spec *volume.Spec, volumeHandle, attachID string, timeout time.Duration, verifyStatus func() (bool, error), operation string) error { +func (c *csiAttacher) waitForVolumeAttachDetachStatusWithLister(volumeHandle, attachID string, timeout time.Duration, verifyStatus func() (bool, error), operation string) error { var ( initBackoff = 500 * time.Millisecond // This is approximately the duration between consecutive ticks after two minutes (CSI timeout). @@ -491,13 +495,6 @@ func (c *csiAttacher) waitForVolumeAttachDetachStatusWithLister(spec *volume.Spe ctx, cancel := context.WithTimeout(context.Background(), timeout) defer cancel() - // Get driver name from spec for better log messages. During detach spec can be nil, and it's ok for driver to be unknown. - csiDriverName, err := GetCSIDriverName(spec) - if err != nil { - csiDriverName = "unknown" - klog.V(4).Info(log("Could not find CSI driver name in spec for volume [%v]", volumeHandle)) - } - for { t := backoffMgr.Backoff() select { @@ -512,7 +509,7 @@ func (c *csiAttacher) waitForVolumeAttachDetachStatusWithLister(spec *volume.Spe case <-ctx.Done(): t.Stop() klog.Error(log("%s timeout after %v [volume=%v; attachment.ID=%v]", operation, timeout, volumeHandle, attachID)) - return fmt.Errorf("timed out waiting for external-attacher of %v CSI driver to %v volume %v", csiDriverName, strings.ToLower(operation), volumeHandle) + return fmt.Errorf("%s timeout for volume %v", operation, volumeHandle) } } } @@ -527,7 +524,7 @@ func (c *csiAttacher) waitForVolumeAttachDetachStatus(attach *storage.VolumeAtta return nil } - watcher, err := c.k8s.StorageV1().VolumeAttachments().Watch(context.TODO(), metav1.SingleObject(metav1.ObjectMeta{Name: attachID, ResourceVersion: attach.ResourceVersion})) + watcher, err := c.k8s.StorageV1().VolumeAttachments().Watch(context.TODO(), meta.SingleObject(meta.ObjectMeta{Name: attachID, ResourceVersion: attach.ResourceVersion})) if err != nil { return fmt.Errorf("watch error:%v for volume %v", err, volumeHandle) } @@ -644,31 +641,24 @@ func getAttachmentName(volName, csiDriverName, nodeName string) string { return fmt.Sprintf("csi-%x", result) } +// isAttachmentName returns true if the string given is of the form of an Attach ID +// and false otherwise +func isAttachmentName(unknownString string) bool { + // 68 == "csi-" + len(sha256hash) + return strings.HasPrefix(unknownString, "csi-") && len(unknownString) == 68 +} + func makeDeviceMountPath(plugin *csiPlugin, spec *volume.Spec) (string, error) { if spec == nil { - return "", errors.New("makeDeviceMountPath failed, spec is nil") - } - - driver, err := GetCSIDriverName(spec) - if err != nil { - return "", err - } - if driver == "" { - return "", errors.New("makeDeviceMountPath failed, csi source driver name is empty") - } - - csiSource, err := getPVSourceFromSpec(spec) - if err != nil { - return "", errors.New(log("makeDeviceMountPath failed to get CSIPersistentVolumeSource: %v", err)) + return "", errors.New(log("makeDeviceMountPath failed, spec is nil")) } - if csiSource.VolumeHandle == "" { - return "", errors.New("makeDeviceMountPath failed, CSIPersistentVolumeSource volume handle is empty") + pvName := spec.PersistentVolume.Name + if pvName == "" { + return "", errors.New(log("makeDeviceMountPath failed, pv name empty")) } - result := sha256.Sum256([]byte(fmt.Sprintf("%s", csiSource.VolumeHandle))) - volSha := fmt.Sprintf("%x", result) - return filepath.Join(plugin.host.GetPluginDir(plugin.GetPluginName()), driver, volSha, globalMountInGlobalPath), nil + return filepath.Join(plugin.host.GetPluginDir(plugin.GetPluginName()), persistentVolumeInGlobalPath, pvName, globalMountInGlobalPath), nil } func getDriverAndVolNameFromDeviceMountPath(k8s kubernetes.Interface, deviceMountPath string) (string, string, error) { @@ -681,7 +671,7 @@ func getDriverAndVolNameFromDeviceMountPath(k8s kubernetes.Interface, deviceMoun pvName := filepath.Base(dir) // Get PV and check for errors - pv, err := k8s.CoreV1().PersistentVolumes().Get(context.TODO(), pvName, metav1.GetOptions{}) + pv, err := k8s.CoreV1().PersistentVolumes().Get(context.TODO(), pvName, meta.GetOptions{}) if err != nil { return "", "", err } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_client.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_client.go index d3d474f2942d..b5e0ff718d4a 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_client.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_client.go @@ -113,7 +113,11 @@ type csiDriverClient struct { } type csiResizeOptions struct { - volumeID string + volumeID string + // volumePath is path where volume is available. It could be: + // - path where node is staged if NodeExpandVolume is called after NodeStageVolume + // - path where volume is published if NodeExpandVolume is called after NodePublishVolume + // DEPRECATION NOTICE: in future NodeExpandVolume will be always called after NodePublish volumePath string stagingTargetPath string fsType string @@ -133,7 +137,7 @@ type nodeV1ClientCreator func(addr csiAddr, metricsManager *MetricsManager) ( type nodeV1AccessModeMapper func(am api.PersistentVolumeAccessMode) csipbv1.VolumeCapability_AccessMode_Mode // newV1NodeClient creates a new NodeClient with the internally used gRPC -// connection set up. It also returns a closer which must be called to close +// connection set up. It also returns a closer which must to be called to close // the gRPC connection when the NodeClient is not used anymore. // This is the default implementation for the nodeV1ClientCreator, used in // newCsiDriverClient. @@ -172,12 +176,12 @@ func (c *csiDriverClient) NodeGetInfo(ctx context.Context) ( maxVolumePerNode int64, accessibleTopology map[string]string, err error) { - klog.V(4).InfoS(log("calling NodeGetInfo rpc")) + klog.V(4).Info(log("calling NodeGetInfo rpc")) var getNodeInfoError error nodeID, maxVolumePerNode, accessibleTopology, getNodeInfoError = c.nodeGetInfoV1(ctx) if getNodeInfoError != nil { - klog.InfoS("Error calling CSI NodeGetInfo()", "err", getNodeInfoError.Error()) + klog.Warningf("Error calling CSI NodeGetInfo(): %v", getNodeInfoError.Error()) } return nodeID, maxVolumePerNode, accessibleTopology, getNodeInfoError } @@ -220,7 +224,7 @@ func (c *csiDriverClient) NodePublishVolume( mountOptions []string, fsGroup *int64, ) error { - klog.V(4).InfoS(log("calling NodePublishVolume rpc"), "volID", volID, "targetPath", targetPath) + klog.V(4).Info(log("calling NodePublishVolume rpc [volid=%s,target_path=%s]", volID, targetPath)) if volID == "" { return errors.New("missing volume id") } @@ -354,7 +358,7 @@ func (c *csiDriverClient) NodeExpandVolume(ctx context.Context, opts csiResizeOp } func (c *csiDriverClient) NodeUnpublishVolume(ctx context.Context, volID string, targetPath string) error { - klog.V(4).InfoS(log("calling NodeUnpublishVolume rpc"), "volID", volID, "targetPath", targetPath) + klog.V(4).Info(log("calling NodeUnpublishVolume rpc: [volid=%s, target_path=%s", volID, targetPath)) if volID == "" { return errors.New("missing volume id") } @@ -391,7 +395,7 @@ func (c *csiDriverClient) NodeStageVolume(ctx context.Context, mountOptions []string, fsGroup *int64, ) error { - klog.V(4).InfoS(log("calling NodeStageVolume rpc"), "volID", volID, "stagingTargetPath", stagingTargetPath) + klog.V(4).Info(log("calling NodeStageVolume rpc [volid=%s,staging_target_path=%s]", volID, stagingTargetPath)) if volID == "" { return errors.New("missing volume id") } @@ -451,7 +455,7 @@ func (c *csiDriverClient) NodeStageVolume(ctx context.Context, } func (c *csiDriverClient) NodeUnstageVolume(ctx context.Context, volID, stagingTargetPath string) error { - klog.V(4).InfoS(log("calling NodeUnstageVolume rpc"), "volID", volID, "stagingTargetPath", stagingTargetPath) + klog.V(4).Info(log("calling NodeUnstageVolume rpc [volid=%s,staging_target_path=%s]", volID, stagingTargetPath)) if volID == "" { return errors.New("missing volume id") } @@ -528,7 +532,7 @@ func asSingleNodeMultiWriterCapableCSIAccessModeV1(am api.PersistentVolumeAccess func newGrpcConn(addr csiAddr, metricsManager *MetricsManager) (*grpc.ClientConn, error) { network := "unix" - klog.V(4).InfoS(log("creating new gRPC connection"), "protocol", network, "endpoint", addr) + klog.V(4).Infof(log("creating new gRPC connection for [%s://%s]", network, addr)) return grpc.Dial( string(addr), @@ -582,7 +586,7 @@ func (c *csiDriverClient) NodeSupportsSingleNodeMultiWriterAccessMode(ctx contex } func (c *csiDriverClient) NodeGetVolumeStats(ctx context.Context, volID string, targetPath string) (*volume.Metrics, error) { - klog.V(4).InfoS(log("calling NodeGetVolumeStats rpc"), "volID", volID, "targetPath", targetPath) + klog.V(4).Info(log("calling NodeGetVolumeStats rpc: [volid=%s, target_path=%s", volID, targetPath)) if volID == "" { return nil, errors.New("missing volume id") } @@ -648,7 +652,7 @@ func (c *csiDriverClient) NodeGetVolumeStats(ctx context.Context, volID string, metrics.Inodes = resource.NewQuantity(usage.GetTotal(), resource.BinarySI) metrics.InodesUsed = resource.NewQuantity(usage.GetUsed(), resource.BinarySI) default: - klog.ErrorS(nil, "unknown unit in VolumeUsage", "unit", unit.String()) + klog.Errorf("unknown key %s in usage", unit.String()) } } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_metrics.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_metrics.go index 7315222e6133..96fcff66a875 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_metrics.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_metrics.go @@ -23,7 +23,6 @@ import ( "google.golang.org/grpc" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - servermetrics "k8s.io/kubernetes/pkg/kubelet/server/metrics" "k8s.io/kubernetes/pkg/volume" volumeutil "k8s.io/kubernetes/pkg/volume/util" ) @@ -52,8 +51,6 @@ func NewMetricsCsi(volumeID string, targetPath string, driverName csiDriverName) } func (mc *metricsCsi) GetMetrics() (*volume.Metrics, error) { - startTime := time.Now() - defer servermetrics.CollectVolumeStatCalDuration(string(mc.csiClientGetter.driverName), startTime) currentTime := metav1.Now() ctx, cancel := context.WithTimeout(context.Background(), csiTimeout) defer cancel() diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_mounter.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_mounter.go index 5621318a2e47..95eb198b1485 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_mounter.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_mounter.go @@ -96,6 +96,10 @@ func getTargetPath(uid types.UID, specVolumeID string, host volume.VolumeHost) s // volume.Mounter methods var _ volume.Mounter = &csiMountMgr{} +func (c *csiMountMgr) CanMount() error { + return nil +} + func (c *csiMountMgr) SetUp(mounterArgs volume.MounterArgs) error { return c.SetUpAt(c.GetPath(), mounterArgs) } @@ -348,9 +352,9 @@ func (c *csiMountMgr) podServiceAccountTokenAttrs() (map[string]string, error) { func (c *csiMountMgr) GetAttributes() volume.Attributes { return volume.Attributes{ - ReadOnly: c.readOnly, - Managed: !c.readOnly, - SELinuxRelabel: c.supportsSELinux, + ReadOnly: c.readOnly, + Managed: !c.readOnly, + SupportsSELinux: c.supportsSELinux, } } @@ -404,27 +408,19 @@ func (c *csiMountMgr) supportsFSGroup(fsType string, fsGroup *int64, driverPolic return false } - if c.spec.PersistentVolume != nil { - if c.spec.PersistentVolume.Spec.AccessModes == nil { - klog.V(4).Info(log("mounter.SetupAt WARNING: skipping fsGroup, access modes not provided")) - return false - } - if !hasReadWriteOnce(c.spec.PersistentVolume.Spec.AccessModes) { - klog.V(4).Info(log("mounter.SetupAt WARNING: skipping fsGroup, only support ReadWriteOnce access mode")) - return false - } - return true - } else if c.spec.Volume != nil && c.spec.Volume.CSI != nil { - if !utilfeature.DefaultFeatureGate.Enabled(features.CSIInlineVolume) { - klog.V(4).Info(log("mounter.SetupAt WARNING: skipping fsGroup, CSIInlineVolume feature required")) - return false - } - // Inline CSI volumes are always mounted with RWO AccessMode by SetUpAt - return true + if c.spec.PersistentVolume == nil { + klog.V(4).Info(log("mounter.SetupAt Warning: skipping fsGroup permission change, no access mode available. The volume may only be accessible to root users.")) + return false } - - klog.V(4).Info(log("mounter.SetupAt WARNING: skipping fsGroup, unsupported volume type")) - return false + if c.spec.PersistentVolume.Spec.AccessModes == nil { + klog.V(4).Info(log("mounter.SetupAt WARNING: skipping fsGroup, access modes not provided")) + return false + } + if !hasReadWriteOnce(c.spec.PersistentVolume.Spec.AccessModes) { + klog.V(4).Info(log("mounter.SetupAt WARNING: skipping fsGroup, only support ReadWriteOnce access mode")) + return false + } + return true } // isDirMounted returns the !notMounted result from IsLikelyNotMountPoint check diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_plugin.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_plugin.go index 3b0a5773e580..0ae6d084f0e6 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_plugin.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csi/csi_plugin.go @@ -223,7 +223,7 @@ func (p *csiPlugin) Init(host volume.VolumeHost) error { return utilfeature.DefaultFeatureGate.Enabled(features.CSIMigration) && utilfeature.DefaultFeatureGate.Enabled(features.CSIMigrationAWS) }, csitranslationplugins.CinderInTreePluginName: func() bool { - return utilfeature.DefaultFeatureGate.Enabled(features.CSIMigration) + return utilfeature.DefaultFeatureGate.Enabled(features.CSIMigration) && utilfeature.DefaultFeatureGate.Enabled(features.CSIMigrationOpenStack) }, csitranslationplugins.AzureDiskInTreePluginName: func() bool { return utilfeature.DefaultFeatureGate.Enabled(features.CSIMigration) && utilfeature.DefaultFeatureGate.Enabled(features.CSIMigrationAzureDisk) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csi/expander.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csi/expander.go index 22692f8e688a..0d4e9b26d262 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csi/expander.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csi/expander.go @@ -23,7 +23,9 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" api "k8s.io/api/core/v1" + utilfeature "k8s.io/apiserver/pkg/util/feature" "k8s.io/klog/v2" + "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/volume" "k8s.io/kubernetes/pkg/volume/util" volumetypes "k8s.io/kubernetes/pkg/volume/util/types" @@ -32,6 +34,13 @@ import ( var _ volume.NodeExpandableVolumePlugin = &csiPlugin{} func (c *csiPlugin) RequiresFSResize() bool { + // We could check plugin's node capability but we instead are going to rely on + // NodeExpand to do the right thing and return early if plugin does not have + // node expansion capability. + if !utilfeature.DefaultFeatureGate.Enabled(features.ExpandCSIVolumes) { + klog.V(4).Infof("Resizing is not enabled for CSI volume") + return false + } return true } @@ -73,6 +82,20 @@ func (c *csiPlugin) nodeExpandWithClient( return false, fmt.Errorf("Expander.NodeExpand found CSI plugin %s/%s to not support node expansion", c.GetPluginName(), driverName) } + // Check whether "STAGE_UNSTAGE_VOLUME" is set + stageUnstageSet, err := csClient.NodeSupportsStageUnstage(ctx) + if err != nil { + return false, fmt.Errorf("Expander.NodeExpand failed to check if plugins supports stage_unstage %v", err) + } + + // if plugin does not support STAGE_UNSTAGE but CSI volume path is staged + // it must mean this was placeholder staging performed by k8s and not CSI staging + // in which case we should return from here so as volume can be node published + // before we can resize + if !stageUnstageSet && resizeOptions.CSIVolumePhase == volume.CSIVolumeStaged { + return false, nil + } + pv := resizeOptions.VolumeSpec.PersistentVolume if pv == nil { return false, fmt.Errorf("Expander.NodeExpand failed to find associated PersistentVolume for plugin %s", c.GetPluginName()) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csi/nodeinfomanager/nodeinfomanager.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csi/nodeinfomanager/nodeinfomanager.go index be27ca9e83f2..14f13e5d1eff 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csi/nodeinfomanager/nodeinfomanager.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csi/nodeinfomanager/nodeinfomanager.go @@ -432,12 +432,17 @@ func (nim *nodeInfoManager) tryInitializeCSINodeWithAnnotation(csiKubeClient cli func (nim *nodeInfoManager) CreateCSINode() (*storagev1.CSINode, error) { + kubeClient := nim.volumeHost.GetKubeClient() + if kubeClient == nil { + return nil, fmt.Errorf("error getting kube client") + } + csiKubeClient := nim.volumeHost.GetKubeClient() if csiKubeClient == nil { return nil, fmt.Errorf("error getting CSI client") } - node, err := csiKubeClient.CoreV1().Nodes().Get(context.TODO(), string(nim.nodeName), metav1.GetOptions{}) + node, err := kubeClient.CoreV1().Nodes().Get(context.TODO(), string(nim.nodeName), metav1.GetOptions{}) if err != nil { return nil, err } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csimigration/plugin_manager.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csimigration/plugin_manager.go index 45acd1997e37..ef83fbbb97c0 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csimigration/plugin_manager.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/csimigration/plugin_manager.go @@ -99,7 +99,7 @@ func (pm PluginManager) IsMigrationEnabledForPlugin(pluginName string) bool { case csilibplugins.AzureDiskInTreePluginName: return pm.featureGate.Enabled(features.CSIMigrationAzureDisk) case csilibplugins.CinderInTreePluginName: - return true + return pm.featureGate.Enabled(features.CSIMigrationOpenStack) case csilibplugins.VSphereInTreePluginName: return pm.featureGate.Enabled(features.CSIMigrationvSphere) case csilibplugins.PortworxVolumePluginName: diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/downwardapi/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/downwardapi/OWNERS index 463078e35830..8ef14a0c2a02 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/downwardapi/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/downwardapi/OWNERS @@ -1,15 +1,17 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - saad-ali - - thockin +- pmorie +- saad-ali +- thockin emeritus_approvers: - - matchstick - - pmorie +- matchstick reviewers: - - rata - - sjenning - - saad-ali - - jsafrane - - jingxu97 - - msau42 +- ivan4th +- rata +- sjenning +- saad-ali +- jsafrane +- rootfs +- jingxu97 +- msau42 diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/downwardapi/downwardapi.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/downwardapi/downwardapi.go index 08899bfb3598..9e3dedba4726 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/downwardapi/downwardapi.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/downwardapi/downwardapi.go @@ -153,12 +153,19 @@ var _ volume.Mounter = &downwardAPIVolumeMounter{} // downward API volumes are always ReadOnlyManaged func (d *downwardAPIVolume) GetAttributes() volume.Attributes { return volume.Attributes{ - ReadOnly: true, - Managed: true, - SELinuxRelabel: true, + ReadOnly: true, + Managed: true, + SupportsSELinux: true, } } +// Checks prior to mount operations to verify that the required components (binaries, etc.) +// to mount the volume are available on the underlying node. +// If not, it returns an error +func (b *downwardAPIVolumeMounter) CanMount() error { + return nil +} + // SetUp puts in place the volume plugin. // This function is not idempotent by design. We want the data to be refreshed periodically. // The internal sync interval of kubelet will drive the refresh of data. diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/emptydir/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/emptydir/OWNERS index 463078e35830..8ef14a0c2a02 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/emptydir/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/emptydir/OWNERS @@ -1,15 +1,17 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - saad-ali - - thockin +- pmorie +- saad-ali +- thockin emeritus_approvers: - - matchstick - - pmorie +- matchstick reviewers: - - rata - - sjenning - - saad-ali - - jsafrane - - jingxu97 - - msau42 +- ivan4th +- rata +- sjenning +- saad-ali +- jsafrane +- rootfs +- jingxu97 +- msau42 diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/emptydir/empty_dir.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/emptydir/empty_dir.go index 19cd6aea2823..9ac2d80683b5 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/emptydir/empty_dir.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/emptydir/empty_dir.go @@ -219,12 +219,19 @@ type emptyDir struct { func (ed *emptyDir) GetAttributes() volume.Attributes { return volume.Attributes{ - ReadOnly: false, - Managed: true, - SELinuxRelabel: true, + ReadOnly: false, + Managed: true, + SupportsSELinux: true, } } +// Checks prior to mount operations to verify that the required components (binaries, etc.) +// to mount the volume are available on the underlying node. +// If not, it returns an error +func (ed *emptyDir) CanMount() error { + return nil +} + // SetUp creates new directory. func (ed *emptyDir) SetUp(mounterArgs volume.MounterArgs) error { return ed.SetUpAt(ed.GetPath(), mounterArgs) @@ -250,9 +257,7 @@ func (ed *emptyDir) SetUpAt(dir string, mounterArgs volume.MounterArgs) error { } else if ed.medium == v1.StorageMediumDefault { // Further check dir exists if _, err := os.Stat(dir); err == nil { - klog.V(6).InfoS("Dir exists, so check and assign quota if the underlying medium supports quotas", "dir", dir) - err = ed.assignQuota(dir, mounterArgs.DesiredSize) - return err + return nil } // This situation should not happen unless user manually delete volume dir. // In this case, delete ready file and print a warning for it. @@ -281,29 +286,22 @@ func (ed *emptyDir) SetUpAt(dir string, mounterArgs volume.MounterArgs) error { // enforcement. if err == nil { volumeutil.SetReady(ed.getMetaDir()) - err = ed.assignQuota(dir, mounterArgs.DesiredSize) - } - return err -} - -// assignQuota checks if the underlying medium supports quotas and if so, sets -func (ed *emptyDir) assignQuota(dir string, mounterSize *resource.Quantity) error { - if mounterSize != nil { - // Deliberately shadow the outer use of err as noted - // above. - hasQuotas, err := fsquota.SupportsQuotas(ed.mounter, dir) - if err != nil { - klog.V(3).Infof("Unable to check for quota support on %s: %s", dir, err.Error()) - } else if hasQuotas { - klog.V(4).Infof("emptydir trying to assign quota %v on %s", mounterSize, dir) - err := fsquota.AssignQuota(ed.mounter, dir, ed.pod.UID, mounterSize) + if mounterArgs.DesiredSize != nil { + // Deliberately shadow the outer use of err as noted + // above. + hasQuotas, err := fsquota.SupportsQuotas(ed.mounter, dir) if err != nil { - klog.V(3).Infof("Set quota on %s failed %s", dir, err.Error()) + klog.V(3).Infof("Unable to check for quota support on %s: %s", dir, err.Error()) + } else if hasQuotas { + klog.V(4).Infof("emptydir trying to assign quota %v on %s", mounterArgs.DesiredSize, dir) + err := fsquota.AssignQuota(ed.mounter, dir, ed.pod.UID, mounterArgs.DesiredSize) + if err != nil { + klog.V(3).Infof("Set quota on %s failed %s", dir, err.Error()) + } } - return err } } - return nil + return err } // setupTmpfs creates a tmpfs mount at the specified directory. diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/fc/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/fc/OWNERS index 4e2f2d2a690f..3dc7358f01c9 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/fc/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/fc/OWNERS @@ -1,11 +1,12 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - saad-ali +- rootfs +- saad-ali reviewers: - - saad-ali - - jsafrane - - jingxu97 - - msau42 -emeritus_approvers: - - rootfs +- saad-ali +- jsafrane +- rootfs +- jingxu97 +- msau42 +- mtanino diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/fc/fc.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/fc/fc.go index 622624829ee3..6cdfa9253299 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/fc/fc.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/fc/fc.go @@ -364,12 +364,19 @@ var _ volume.Mounter = &fcDiskMounter{} func (b *fcDiskMounter) GetAttributes() volume.Attributes { return volume.Attributes{ - ReadOnly: b.readOnly, - Managed: !b.readOnly, - SELinuxRelabel: true, + ReadOnly: b.readOnly, + Managed: !b.readOnly, + SupportsSELinux: true, } } +// Checks prior to mount operations to verify that the required components (binaries, etc.) +// to mount the volume are available on the underlying node. +// If not, it returns an error +func (b *fcDiskMounter) CanMount() error { + return nil +} + func (b *fcDiskMounter) SetUp(mounterArgs volume.MounterArgs) error { return b.SetUpAt(b.GetPath(), mounterArgs) } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/fc/fc_util.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/fc/fc_util.go index a8a99a45e900..94f5c7a9452f 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/fc/fc_util.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/fc/fc_util.go @@ -254,15 +254,7 @@ func (util *fcUtil) AttachDisk(b fcDiskMounter) (string, error) { return "", err } - exists, err := mount.PathExists(devicePath) - if exists && err == nil { - return devicePath, nil - } - if exists == false { - return "", fmt.Errorf("device %s does not exist", devicePath) - } else { - return "", err - } + return devicePath, nil } // DetachDisk removes scsi device file such as /dev/sdX from the node. diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/OWNERS index fe3de0ecdfa6..549173db0760 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/OWNERS @@ -1,14 +1,17 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - saad-ali +- chakri-nelluri +- saad-ali emeritus_approvers: - - MikaelCluseau - - chakri-nelluri +- MikaelCluseau reviewers: - - rata - - sjenning - - saad-ali - - jsafrane - - jingxu97 - - msau42 +- ivan4th +- rata +- sjenning +- saad-ali +- jsafrane +- rootfs +- jingxu97 +- msau42 +- chakri-nelluri diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/mounter-defaults.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/mounter-defaults.go index 91cde7f7e809..a1c89ab19116 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/mounter-defaults.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/mounter-defaults.go @@ -45,8 +45,12 @@ func (f *mounterDefaults) SetUpAt(dir string, mounterArgs volume.MounterArgs) er func (f *mounterDefaults) GetAttributes() volume.Attributes { klog.V(5).Info(logPrefix(f.plugin), "using default GetAttributes") return volume.Attributes{ - ReadOnly: f.readOnly, - Managed: !f.readOnly, - SELinuxRelabel: f.flexVolume.plugin.capabilities.SELinuxRelabel, + ReadOnly: f.readOnly, + Managed: !f.readOnly, + SupportsSELinux: f.flexVolume.plugin.capabilities.SELinuxRelabel, } } + +func (f *mounterDefaults) CanMount() error { + return nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/mounter.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/mounter.go index 8098cfdb66ee..172e3fdb2666 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/mounter.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/flexvolume/mounter.go @@ -107,3 +107,7 @@ func (f *flexVolumeMounter) SetUpAt(dir string, mounterArgs volume.MounterArgs) func (f *flexVolumeMounter) GetAttributes() volume.Attributes { return (*mounterDefaults)(f).GetAttributes() } + +func (f *flexVolumeMounter) CanMount() error { + return nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/flocker/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/flocker/OWNERS index 4e2f2d2a690f..e5d361af51a2 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/flocker/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/flocker/OWNERS @@ -1,11 +1,12 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - saad-ali +- rootfs +- saad-ali reviewers: - - saad-ali - - jsafrane - - jingxu97 - - msau42 -emeritus_approvers: - - rootfs +- simonswine +- saad-ali +- jsafrane +- rootfs +- jingxu97 +- msau42 diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/flocker/flocker.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/flocker/flocker.go index 85442526fa1b..74eedc7220e6 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/flocker/flocker.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/flocker/flocker.go @@ -214,12 +214,19 @@ type flockerVolumeMounter struct { func (b *flockerVolumeMounter) GetAttributes() volume.Attributes { return volume.Attributes{ - ReadOnly: b.readOnly, - Managed: false, - SELinuxRelabel: false, + ReadOnly: b.readOnly, + Managed: false, + SupportsSELinux: false, } } +// Checks prior to mount operations to verify that the required components (binaries, etc.) +// to mount the volume are available on the underlying node. +// If not, it returns an error +func (b *flockerVolumeMounter) CanMount() error { + return nil +} + func (b *flockerVolumeMounter) GetPath() string { return getPath(b.podUID, b.volName, b.plugin.host) } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/gcepd/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/gcepd/OWNERS index a966206b2997..3076f706348e 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/gcepd/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/gcepd/OWNERS @@ -1,13 +1,14 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - saad-ali - - thockin +- saad-ali +- thockin +- davidz627 reviewers: - - saad-ali - - jsafrane - - jingxu97 - - gnufied - - msau42 -emeritus_approvers: - - davidz627 +- saad-ali +- jsafrane +- jingxu97 +- gnufied +- msau42 +- verult +- davidz627 diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/gcepd/attacher.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/gcepd/attacher.go index c97be9edcde0..2a6349a51126 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/gcepd/attacher.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/gcepd/attacher.go @@ -242,9 +242,8 @@ func (attacher *gcePersistentDiskAttacher) WaitForAttach(spec *volume.Spec, devi id, err := getDiskID(pdName, exec) if err != nil { klog.Errorf("WaitForAttach (windows) failed with error %s", err) - return "", err } - return id, nil + return id, err } partition := "" diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/gcepd/gce_pd.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/gcepd/gce_pd.go index 302d6be96138..dfc7a30f5601 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/gcepd/gce_pd.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/gcepd/gce_pd.go @@ -354,12 +354,19 @@ var _ volume.Mounter = &gcePersistentDiskMounter{} func (b *gcePersistentDiskMounter) GetAttributes() volume.Attributes { return volume.Attributes{ - ReadOnly: b.readOnly, - Managed: !b.readOnly, - SELinuxRelabel: true, + ReadOnly: b.readOnly, + Managed: !b.readOnly, + SupportsSELinux: true, } } +// Checks prior to mount operations to verify that the required components (binaries, etc.) +// to mount the volume are available on the underlying node. +// If not, it returns an error +func (b *gcePersistentDiskMounter) CanMount() error { + return nil +} + // SetUp bind mounts the disk global mount to the volume path. func (b *gcePersistentDiskMounter) SetUp(mounterArgs volume.MounterArgs) error { return b.SetUpAt(b.GetPath(), mounterArgs) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/git_repo/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/git_repo/OWNERS index 42283a4e3704..5604dadfc908 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/git_repo/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/git_repo/OWNERS @@ -1,10 +1,11 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - thockin - - saad-ali +- thockin +- saad-ali reviewers: - - saad-ali - - jsafrane - - jingxu97 - - msau42 +- saad-ali +- jsafrane +- rootfs +- jingxu97 +- msau42 diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/git_repo/git_repo.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/git_repo/git_repo.go index 5f0e7075eb7e..ba23ceaf0b73 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/git_repo/git_repo.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/git_repo/git_repo.go @@ -161,12 +161,19 @@ var _ volume.Mounter = &gitRepoVolumeMounter{} func (b *gitRepoVolumeMounter) GetAttributes() volume.Attributes { return volume.Attributes{ - ReadOnly: false, - Managed: true, - SELinuxRelabel: true, // xattr change should be okay, TODO: double check + ReadOnly: false, + Managed: true, + SupportsSELinux: true, // xattr change should be okay, TODO: double check } } +// Checks prior to mount operations to verify that the required components (binaries, etc.) +// to mount the volume are available on the underlying node. +// If not, it returns an error +func (b *gitRepoVolumeMounter) CanMount() error { + return nil +} + // SetUp creates new directory and clones a git repo. func (b *gitRepoVolumeMounter) SetUp(mounterArgs volume.MounterArgs) error { return b.SetUpAt(b.GetPath(), mounterArgs) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/glusterfs/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/glusterfs/OWNERS index da9a2119bd2f..d4b7ff4f26cd 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/glusterfs/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/glusterfs/OWNERS @@ -1,14 +1,14 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - saad-ali - - jingxu97 - - humblec +- rootfs +- saad-ali +- jingxu97 +- humblec reviewers: - - saad-ali - - jsafrane - - humblec - - jingxu97 - - msau42 -emeritus_approvers: - - rootfs +- saad-ali +- jsafrane +- rootfs +- humblec +- jingxu97 +- msau42 diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/glusterfs/glusterfs.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/glusterfs/glusterfs.go index e915db930cfe..2a91164836d2 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/glusterfs/glusterfs.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/glusterfs/glusterfs.go @@ -25,6 +25,7 @@ import ( "net/http" "os" "path/filepath" + "runtime" "strconv" dstrings "strings" "sync" @@ -72,13 +73,14 @@ var _ volume.Provisioner = &glusterfsVolumeProvisioner{} var _ volume.Deleter = &glusterfsVolumeDeleter{} const ( - glusterfsPluginName = "kubernetes.io/glusterfs" - volPrefix = "vol_" - dynamicEpSvcPrefix = "glusterfs-dynamic" - replicaCount = 3 - secretKeyName = "key" // key name used in secret - defaultGidMin = 2000 - defaultGidMax = math.MaxInt32 + glusterfsPluginName = "kubernetes.io/glusterfs" + volPrefix = "vol_" + dynamicEpSvcPrefix = "glusterfs-dynamic" + replicaCount = 3 + secretKeyName = "key" // key name used in secret + gciLinuxGlusterMountBinaryPath = "/sbin/mount.glusterfs" + defaultGidMin = 2000 + defaultGidMax = math.MaxInt32 // maxCustomEpNamePrefix is the maximum number of chars. // which can be used as ep/svc name prefix. This number is carved @@ -249,12 +251,26 @@ var _ volume.Mounter = &glusterfsMounter{} func (b *glusterfsMounter) GetAttributes() volume.Attributes { return volume.Attributes{ - ReadOnly: b.readOnly, - Managed: false, - SELinuxRelabel: false, + ReadOnly: b.readOnly, + Managed: false, + SupportsSELinux: false, } } +// Checks prior to mount operations to verify that the required components (binaries, etc.) +// to mount the volume are available on the underlying node. +// If not, it returns an error +func (b *glusterfsMounter) CanMount() error { + exe := b.plugin.host.GetExec(b.plugin.GetPluginName()) + switch runtime.GOOS { + case "linux": + if _, err := exe.Command("test", "-x", gciLinuxGlusterMountBinaryPath).CombinedOutput(); err != nil { + return fmt.Errorf("required binary %s is missing", gciLinuxGlusterMountBinaryPath) + } + } + return nil +} + // SetUp attaches the disk and bind mounts to the volume path. func (b *glusterfsMounter) SetUp(mounterArgs volume.MounterArgs) error { return b.SetUpAt(b.GetPath(), mounterArgs) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/hostpath/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/hostpath/OWNERS index 9ab18553d1d6..5ffca544da91 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/hostpath/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/hostpath/OWNERS @@ -1,12 +1,13 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - saad-ali - - thockin +- pmorie +- saad-ali +- thockin reviewers: - - saad-ali - - jsafrane - - jingxu97 - - msau42 -emeritus_approvers: - - pmorie +- saad-ali +- jsafrane +- rootfs +- jingxu97 +- msau42 +- dixudx diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/hostpath/host_path.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/hostpath/host_path.go index 8900023c51f6..ece27cf21e31 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/hostpath/host_path.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/hostpath/host_path.go @@ -47,20 +47,9 @@ func ProbeVolumePlugins(volumeConfig volume.VolumeConfig) []volume.VolumePlugin } } -func FakeProbeVolumePlugins(volumeConfig volume.VolumeConfig) []volume.VolumePlugin { - return []volume.VolumePlugin{ - &hostPathPlugin{ - host: nil, - config: volumeConfig, - noTypeChecker: true, - }, - } -} - type hostPathPlugin struct { - host volume.VolumeHost - config volume.VolumeConfig - noTypeChecker bool + host volume.VolumeHost + config volume.VolumeConfig } var _ volume.VolumePlugin = &hostPathPlugin{} @@ -132,11 +121,10 @@ func (plugin *hostPathPlugin) NewMounter(spec *volume.Spec, pod *v1.Pod, opts vo return nil, fmt.Errorf("plugin volume host does not implement KubeletVolumeHost interface") } return &hostPathMounter{ - hostPath: &hostPath{path: path, pathType: pathType}, - readOnly: readOnly, - mounter: plugin.host.GetMounter(plugin.GetPluginName()), - hu: kvh.GetHostUtil(), - noTypeChecker: plugin.noTypeChecker, + hostPath: &hostPath{path: path, pathType: pathType}, + readOnly: readOnly, + mounter: plugin.host.GetMounter(plugin.GetPluginName()), + hu: kvh.GetHostUtil(), }, nil } @@ -215,22 +203,28 @@ func (hp *hostPath) GetPath() string { type hostPathMounter struct { *hostPath - readOnly bool - mounter mount.Interface - hu hostutil.HostUtils - noTypeChecker bool + readOnly bool + mounter mount.Interface + hu hostutil.HostUtils } var _ volume.Mounter = &hostPathMounter{} func (b *hostPathMounter) GetAttributes() volume.Attributes { return volume.Attributes{ - ReadOnly: b.readOnly, - Managed: false, - SELinuxRelabel: false, + ReadOnly: b.readOnly, + Managed: false, + SupportsSELinux: false, } } +// Checks prior to mount operations to verify that the required components (binaries, etc.) +// to mount the volume are available on the underlying node. +// If not, it returns an error +func (b *hostPathMounter) CanMount() error { + return nil +} + // SetUp does nothing. func (b *hostPathMounter) SetUp(mounterArgs volume.MounterArgs) error { err := validation.ValidatePathNoBacksteps(b.GetPath()) @@ -241,11 +235,7 @@ func (b *hostPathMounter) SetUp(mounterArgs volume.MounterArgs) error { if *b.pathType == v1.HostPathUnset { return nil } - if b.noTypeChecker { - return nil - } else { - return checkType(b.GetPath(), b.pathType, b.hu) - } + return checkType(b.GetPath(), b.pathType, b.hu) } // SetUpAt does not make sense for host paths - probably programmer error. diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/iscsi/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/iscsi/OWNERS index dae23dabbab5..8ad6701be3c9 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/iscsi/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/iscsi/OWNERS @@ -1,14 +1,15 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - saad-ali - - humblec +- pmorie +- saad-ali +- rootfs +- humblec reviewers: - - saad-ali - - jsafrane - - humblec - - jingxu97 - - msau42 -emeritus_approvers: - - rootfs - - pmorie +- saad-ali +- jsafrane +- rootfs +- humblec +- jingxu97 +- msau42 +- mtanino diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/iscsi/iscsi.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/iscsi/iscsi.go index 3d6cb58dbeca..2e4c8873af59 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/iscsi/iscsi.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/iscsi/iscsi.go @@ -346,12 +346,19 @@ var _ volume.Mounter = &iscsiDiskMounter{} func (b *iscsiDiskMounter) GetAttributes() volume.Attributes { return volume.Attributes{ - ReadOnly: b.readOnly, - Managed: !b.readOnly, - SELinuxRelabel: true, + ReadOnly: b.readOnly, + Managed: !b.readOnly, + SupportsSELinux: true, } } +// Checks prior to mount operations to verify that the required components (binaries, etc.) +// to mount the volume are available on the underlying node. +// If not, it returns an error +func (b *iscsiDiskMounter) CanMount() error { + return nil +} + func (b *iscsiDiskMounter) SetUp(mounterArgs volume.MounterArgs) error { return b.SetUpAt(b.GetPath(), mounterArgs) } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/iscsi/iscsi_util.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/iscsi/iscsi_util.go index e2f62f72061e..25a7b30bfe0d 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/iscsi/iscsi_util.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/iscsi/iscsi_util.go @@ -971,10 +971,10 @@ func ignoreExitCodes(err error, ignoredExitCodes ...int) error { func execWithLog(b iscsiDiskMounter, cmd string, args ...string) (string, error) { start := time.Now() out, err := b.exec.Command(cmd, args...).CombinedOutput() - if klogV := klog.V(5); klogV.Enabled() { + if klog.V(5).Enabled() { d := time.Since(start) - klogV.Infof("Executed %s %v in %v, err: %v", cmd, args, d, err) - klogV.Infof("Output: %s", string(out)) + klog.V(5).Infof("Executed %s %v in %v, err: %v", cmd, args, d, err) + klog.V(5).Infof("Output: %s", string(out)) } return string(out), err } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/local/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/local/OWNERS index 25dcd9cae14b..f99cf7657a30 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/local/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/local/OWNERS @@ -1,17 +1,18 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - saad-ali - - thockin - - msau42 - - jingxu97 - - jsafrane - - cofyc +- saad-ali +- thockin +- vishh +- msau42 +- jingxu97 +- jsafrane +- cofyc reviewers: - - saad-ali - - jsafrane - - jingxu97 - - msau42 - - cofyc -emeritus_approvers: - - vishh +- saad-ali +- jsafrane +- rootfs +- jingxu97 +- msau42 +- vishh +- cofyc diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/local/local.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/local/local.go index d6a5ec85cb1a..6f1387db4b8d 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/local/local.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/local/local.go @@ -504,12 +504,19 @@ var _ volume.Mounter = &localVolumeMounter{} func (m *localVolumeMounter) GetAttributes() volume.Attributes { return volume.Attributes{ - ReadOnly: m.readOnly, - Managed: !m.readOnly, - SELinuxRelabel: true, + ReadOnly: m.readOnly, + Managed: !m.readOnly, + SupportsSELinux: true, } } +// CanMount checks prior to mount operations to verify that the required components (binaries, etc.) +// to mount the volume are available on the underlying node. +// If not, it returns an error +func (m *localVolumeMounter) CanMount() error { + return nil +} + // SetUp bind mounts the directory to the volume path func (m *localVolumeMounter) SetUp(mounterArgs volume.MounterArgs) error { return m.SetUpAt(m.GetPath(), mounterArgs) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/metrics_block.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/metrics_block.go index e370afca24d0..e0145ae91af1 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/metrics_block.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/metrics_block.go @@ -21,11 +21,9 @@ import ( "io" "os" "runtime" - "time" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - servermetrics "k8s.io/kubernetes/pkg/kubelet/server/metrics" ) var _ MetricsProvider = &metricsBlock{} @@ -51,9 +49,6 @@ func NewMetricsBlock(device string) MetricsProvider { // tools. Storage systems may have more information that they can provide by // going through specialized APIs. func (mb *metricsBlock) GetMetrics() (*Metrics, error) { - startTime := time.Now() - defer servermetrics.CollectVolumeStatCalDuration("block", startTime) - // TODO: Windows does not yet support VolumeMode=Block if runtime.GOOS == "windows" { return nil, NewNotImplementedError("Windows does not support Block volumes") diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/metrics_statfs.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/metrics_statfs.go index 81a6748b19ab..29151457e076 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/metrics_statfs.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/metrics_statfs.go @@ -17,11 +17,8 @@ limitations under the License. package volume import ( - "time" - "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - servermetrics "k8s.io/kubernetes/pkg/kubelet/server/metrics" "k8s.io/kubernetes/pkg/volume/util/fs" ) @@ -43,9 +40,6 @@ func NewMetricsStatFS(path string) MetricsProvider { // GetMetrics calculates the volume usage and device free space by executing "du" // and gathering filesystem info for the Volume path. func (md *metricsStatFS) GetMetrics() (*Metrics, error) { - startTime := time.Now() - defer servermetrics.CollectVolumeStatCalDuration("statfs", startTime) - metrics := &Metrics{Time: metav1.Now()} if md.path == "" { return metrics, NewNoPathDefinedError() diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/nfs/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/nfs/OWNERS index 8cad5f67c597..c5f0087b7606 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/nfs/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/nfs/OWNERS @@ -1,13 +1,13 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - saad-ali - - jingxu97 +- rootfs +- saad-ali +- jingxu97 reviewers: - - sjenning - - saad-ali - - jsafrane - - jingxu97 - - msau42 -emeritus_approvers: - - rootfs +- sjenning +- saad-ali +- jsafrane +- rootfs +- jingxu97 +- msau42 diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/nfs/nfs.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/nfs/nfs.go index 4a557e884bd5..5ad1d9c7372e 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/nfs/nfs.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/nfs/nfs.go @@ -18,11 +18,11 @@ package nfs import ( "fmt" + netutil "k8s.io/utils/net" "os" + "runtime" "time" - netutil "k8s.io/utils/net" - "k8s.io/klog/v2" "k8s.io/mount-utils" utilstrings "k8s.io/utils/strings" @@ -198,6 +198,28 @@ func (nfsVolume *nfs) GetPath() string { return nfsVolume.plugin.host.GetPodVolumeDir(nfsVolume.pod.UID, utilstrings.EscapeQualifiedName(name), nfsVolume.volName) } +// Checks prior to mount operations to verify that the required components (binaries, etc.) +// to mount the volume are available on the underlying node. +// If not, it returns an error +func (nfsMounter *nfsMounter) CanMount() error { + exec := nfsMounter.plugin.host.GetExec(nfsMounter.plugin.GetPluginName()) + switch runtime.GOOS { + case "linux": + if _, err := exec.Command("test", "-x", "/sbin/mount.nfs").CombinedOutput(); err != nil { + return fmt.Errorf("required binary /sbin/mount.nfs is missing") + } + if _, err := exec.Command("test", "-x", "/sbin/mount.nfs4").CombinedOutput(); err != nil { + return fmt.Errorf("required binary /sbin/mount.nfs4 is missing") + } + return nil + case "darwin": + if _, err := exec.Command("test", "-x", "/sbin/mount_nfs").CombinedOutput(); err != nil { + return fmt.Errorf("required binary /sbin/mount_nfs is missing") + } + } + return nil +} + type nfsMounter struct { *nfs server string @@ -210,9 +232,9 @@ var _ volume.Mounter = &nfsMounter{} func (nfsMounter *nfsMounter) GetAttributes() volume.Attributes { return volume.Attributes{ - ReadOnly: nfsMounter.readOnly, - Managed: false, - SELinuxRelabel: false, + ReadOnly: nfsMounter.readOnly, + Managed: false, + SupportsSELinux: false, } } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/plugins.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/plugins.go index 85d5767858d5..58ef46940d1d 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/plugins.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/plugins.go @@ -53,6 +53,9 @@ type ProbeEvent struct { Op ProbeOperation // The operation to the plugin } +// CSIVolumePhaseType stores information about CSI volume path. +type CSIVolumePhaseType string + const ( // Common parameter which can be specified in StorageClass to specify the desired FSType // Provisioners SHOULD implement support for this if they are block device based @@ -62,6 +65,8 @@ const ( ProbeAddOrUpdate ProbeOperation = 1 << iota ProbeRemove + CSIVolumeStaged CSIVolumePhaseType = "staged" + CSIVolumePublished CSIVolumePhaseType = "published" ) var ( @@ -119,12 +124,15 @@ type NodeResizeOptions struct { NewSize resource.Quantity OldSize resource.Quantity + + // CSIVolumePhase contains volume phase on the node + CSIVolumePhase CSIVolumePhaseType } type DynamicPluginProber interface { Init() error - // aggregates events for successful drivers and errors for failed drivers + // If an error occurs, events are undefined. Probe() (events []ProbeEvent, err error) } @@ -441,8 +449,6 @@ type VolumeHost interface { // Returns the name of the node GetNodeName() types.NodeName - GetAttachedVolumesFromNodeStatus() (map[v1.UniqueVolumeName]string, error) - // Returns the event recorder of kubelet. GetEventRecorder() record.EventRecorder @@ -495,6 +501,7 @@ func (spec *Spec) IsKubeletExpandable() bool { return spec.PersistentVolume.Spec.FlexVolume != nil default: return false + } } @@ -699,26 +706,30 @@ func (pm *VolumePluginMgr) FindPluginByName(name string) (VolumePlugin, error) { defer pm.mutex.RUnlock() // Once we can get rid of legacy names we can reduce this to a map lookup. - var match VolumePlugin + matches := []VolumePlugin{} if v, found := pm.plugins[name]; found { - match = v + matches = append(matches, v) } pm.refreshProbedPlugins() if plugin, found := pm.probedPlugins[name]; found { - if match != nil { - return nil, fmt.Errorf("multiple volume plugins matched: %s and %s", match.GetPluginName(), plugin.GetPluginName()) - } - match = plugin + matches = append(matches, plugin) } - if match == nil { + if len(matches) == 0 { return nil, fmt.Errorf("no volume plugin matched name: %s", name) } + if len(matches) > 1 { + matchedPluginNames := []string{} + for _, plugin := range matches { + matchedPluginNames = append(matchedPluginNames, plugin.GetPluginName()) + } + return nil, fmt.Errorf("multiple volume plugins matched: %s", strings.Join(matchedPluginNames, ",")) + } // Issue warning if the matched provider is deprecated - pm.logDeprecation(match.GetPluginName()) - return match, nil + pm.logDeprecation(matches[0].GetPluginName()) + return matches[0], nil } // logDeprecation logs warning when a deprecated plugin is used. @@ -735,14 +746,11 @@ func (pm *VolumePluginMgr) logDeprecation(plugin string) { // If it is, initialize all probed plugins and replace the cache with them. func (pm *VolumePluginMgr) refreshProbedPlugins() { events, err := pm.prober.Probe() - if err != nil { klog.ErrorS(err, "Error dynamically probing plugins") + return // Use cached plugins upon failure. } - // because the probe function can return a list of valid plugins - // even when an error is present we still must add the plugins - // or they will be skipped because each event only fires once for _, event := range events { if event.Op == ProbeAddOrUpdate { if err := pm.initProbedPlugin(event.Plugin); err != nil { @@ -1074,7 +1082,7 @@ func NewPersistentVolumeRecyclerPodTemplate() *v1.Pod { Containers: []v1.Container{ { Name: "pv-recycler", - Image: "k8s.gcr.io/debian-base:v2.0.0", + Image: "busybox:1.27", Command: []string{"/bin/sh"}, Args: []string{"-c", "test -e /scrub && rm -rf /scrub/..?* /scrub/.[!.]* /scrub/* && test -z \"$(ls -A /scrub)\" || exit 1"}, VolumeMounts: []v1.VolumeMount{ diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/portworx/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/portworx/OWNERS index a38b2de0f8b6..de6991b111f2 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/portworx/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/portworx/OWNERS @@ -1,9 +1,10 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - saad-ali +- lpabon +- saad-ali +- rootfs reviewers: - - saad-ali -emeritus_approvers: - - lpabon - - rootfs +- lpabon +- saad-ali +- rootfs diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/portworx/portworx.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/portworx/portworx.go index 927c2e471c39..103e244e1fdf 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/portworx/portworx.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/portworx/portworx.go @@ -18,11 +18,10 @@ package portworx import ( "fmt" - "os" - "k8s.io/klog/v2" "k8s.io/mount-utils" utilstrings "k8s.io/utils/strings" + "os" volumeclient "github.com/libopenstorage/openstorage/api/client/volume" v1 "k8s.io/api/core/v1" @@ -288,12 +287,19 @@ var _ volume.Mounter = &portworxVolumeMounter{} func (b *portworxVolumeMounter) GetAttributes() volume.Attributes { return volume.Attributes{ - ReadOnly: b.readOnly, - Managed: !b.readOnly, - SELinuxRelabel: false, + ReadOnly: b.readOnly, + Managed: !b.readOnly, + SupportsSELinux: false, } } +// Checks prior to mount operations to verify that the required components (binaries, etc.) +// to mount the volume are available on the underlying node. +// If not, it returns an error +func (b *portworxVolumeMounter) CanMount() error { + return nil +} + // SetUp attaches the disk and bind mounts to the volume path. func (b *portworxVolumeMounter) SetUp(mounterArgs volume.MounterArgs) error { return b.SetUpAt(b.GetPath(), mounterArgs) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/projected/projected.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/projected/projected.go index e30cb8022435..f6fca6d57901 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/projected/projected.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/projected/projected.go @@ -168,13 +168,20 @@ var _ volume.Mounter = &projectedVolumeMounter{} func (sv *projectedVolume) GetAttributes() volume.Attributes { return volume.Attributes{ - ReadOnly: true, - Managed: true, - SELinuxRelabel: true, + ReadOnly: true, + Managed: true, + SupportsSELinux: true, } } +// Checks prior to mount operations to verify that the required components (binaries, etc.) +// to mount the volume are available on the underlying node. +// If not, it returns an error +func (s *projectedVolumeMounter) CanMount() error { + return nil +} + func (s *projectedVolumeMounter) SetUp(mounterArgs volume.MounterArgs) error { return s.SetUpAt(s.GetPath(), mounterArgs) } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/quobyte/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/quobyte/OWNERS index 4e2f2d2a690f..5f264f221050 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/quobyte/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/quobyte/OWNERS @@ -1,11 +1,12 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - saad-ali +- rootfs +- saad-ali reviewers: - - saad-ali - - jsafrane - - jingxu97 - - msau42 -emeritus_approvers: - - rootfs +- johscheuer +- saad-ali +- jsafrane +- rootfs +- jingxu97 +- msau42 diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/quobyte/quobyte.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/quobyte/quobyte.go index 90d4f8cc32d1..bb71e22e79c2 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/quobyte/quobyte.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/quobyte/quobyte.go @@ -225,12 +225,19 @@ var _ volume.Mounter = &quobyteMounter{} func (mounter *quobyteMounter) GetAttributes() volume.Attributes { return volume.Attributes{ - ReadOnly: mounter.readOnly, - Managed: false, - SELinuxRelabel: false, + ReadOnly: mounter.readOnly, + Managed: false, + SupportsSELinux: false, } } +// Checks prior to mount operations to verify that the required components (binaries, etc.) +// to mount the volume are available on the underlying node. +// If not, it returns an error +func (mounter *quobyteMounter) CanMount() error { + return nil +} + // SetUp attaches the disk and bind mounts to the volume path. func (mounter *quobyteMounter) SetUp(mounterArgs volume.MounterArgs) error { pluginDir := mounter.plugin.host.GetPluginDir(utilstrings.EscapeQualifiedName(quobytePluginName)) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/rbd/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/rbd/OWNERS index e40d3a1b5c8f..659b0638de7f 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/rbd/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/rbd/OWNERS @@ -1,13 +1,13 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - jsafrane +- rootfs +- jsafrane reviewers: - - sjenning - - saad-ali - - jsafrane - - jingxu97 - - msau42 - - cofyc -emeritus_approvers: - - rootfs +- sjenning +- saad-ali +- jsafrane +- rootfs +- jingxu97 +- msau42 +- cofyc diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/rbd/rbd.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/rbd/rbd.go index 18c2bdf09209..25fc78561d3c 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/rbd/rbd.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/rbd/rbd.go @@ -19,27 +19,28 @@ package rbd import ( "context" "fmt" + utilfeature "k8s.io/apiserver/pkg/util/feature" + "k8s.io/kubernetes/pkg/features" "os" "path/filepath" "regexp" dstrings "strings" + "k8s.io/klog/v2" + "k8s.io/mount-utils" + utilexec "k8s.io/utils/exec" + utilstrings "k8s.io/utils/strings" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/uuid" - utilfeature "k8s.io/apiserver/pkg/util/feature" clientset "k8s.io/client-go/kubernetes" - "k8s.io/klog/v2" - "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/volume" volutil "k8s.io/kubernetes/pkg/volume/util" "k8s.io/kubernetes/pkg/volume/util/volumepathhandler" - "k8s.io/mount-utils" - utilexec "k8s.io/utils/exec" - utilstrings "k8s.io/utils/strings" ) var ( @@ -831,12 +832,19 @@ var _ volume.Mounter = &rbdMounter{} func (rbd *rbd) GetAttributes() volume.Attributes { return volume.Attributes{ - ReadOnly: rbd.ReadOnly, - Managed: !rbd.ReadOnly, - SELinuxRelabel: true, + ReadOnly: rbd.ReadOnly, + Managed: !rbd.ReadOnly, + SupportsSELinux: true, } } +// Checks prior to mount operations to verify that the required components (binaries, etc.) +// to mount the volume are available on the underlying node. +// If not, it returns an error +func (b *rbdMounter) CanMount() error { + return nil +} + func (b *rbdMounter) SetUp(mounterArgs volume.MounterArgs) error { return b.SetUpAt(b.GetPath(), mounterArgs) } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/secret/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/secret/OWNERS index 463078e35830..8ef14a0c2a02 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/secret/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/secret/OWNERS @@ -1,15 +1,17 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - saad-ali - - thockin +- pmorie +- saad-ali +- thockin emeritus_approvers: - - matchstick - - pmorie +- matchstick reviewers: - - rata - - sjenning - - saad-ali - - jsafrane - - jingxu97 - - msau42 +- ivan4th +- rata +- sjenning +- saad-ali +- jsafrane +- rootfs +- jingxu97 +- msau42 diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/secret/secret.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/secret/secret.go index 0899f512667c..8226b2209ee4 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/secret/secret.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/secret/secret.go @@ -162,12 +162,19 @@ var _ volume.Mounter = &secretVolumeMounter{} func (sv *secretVolume) GetAttributes() volume.Attributes { return volume.Attributes{ - ReadOnly: true, - Managed: true, - SELinuxRelabel: true, + ReadOnly: true, + Managed: true, + SupportsSELinux: true, } } +// Checks prior to mount operations to verify that the required components (binaries, etc.) +// to mount the volume are available on the underlying node. +// If not, it returns an error +func (b *secretVolumeMounter) CanMount() error { + return nil +} + func (b *secretVolumeMounter) SetUp(mounterArgs volume.MounterArgs) error { return b.SetUpAt(b.GetPath(), mounterArgs) } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/storageos/storageos.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/storageos/storageos.go index d3d938d3b290..591b7e45592b 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/storageos/storageos.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/storageos/storageos.go @@ -328,12 +328,19 @@ var _ volume.Mounter = &storageosMounter{} func (b *storageosMounter) GetAttributes() volume.Attributes { return volume.Attributes{ - ReadOnly: b.readOnly, - Managed: !b.readOnly, - SELinuxRelabel: true, + ReadOnly: b.readOnly, + Managed: !b.readOnly, + SupportsSELinux: true, } } +// Checks prior to mount operations to verify that the required components (binaries, etc.) +// to mount the volume are available on the underlying node. +// If not, it returns an error +func (b *storageosMounter) CanMount() error { + return nil +} + // SetUp attaches the disk and bind mounts to the volume path. func (b *storageosMounter) SetUp(mounterArgs volume.MounterArgs) error { // Need a namespace to find the volume, try pod's namespace if not set. diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/fs/fs.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/fs/fs.go index 64301fd5de16..acfc42785361 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/fs/fs.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/fs/fs.go @@ -24,11 +24,9 @@ import ( "os" "path/filepath" "syscall" - "time" "golang.org/x/sys/unix" - servermetrics "k8s.io/kubernetes/pkg/kubelet/server/metrics" "k8s.io/kubernetes/pkg/volume/util/fsquota" ) @@ -73,13 +71,9 @@ func DiskUsage(path string) (UsageInfo, error) { // First check whether the quota system knows about this directory // A nil quantity or error means that the path does not support quotas // or xfs_quota tool is missing and we should use other mechanisms. - startTime := time.Now() consumption, _ := fsquota.GetConsumption(path) if consumption != nil { usage.Bytes = consumption.Value() - defer servermetrics.CollectVolumeStatCalDuration("fsquota", startTime) - } else { - defer servermetrics.CollectVolumeStatCalDuration("du", startTime) } inodes, _ := fsquota.GetInodes(path) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/hostutil/hostutil_linux.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/hostutil/hostutil_linux.go index 60e76e0e7d5f..03748508ba65 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/hostutil/hostutil_linux.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/hostutil/hostutil_linux.go @@ -27,9 +27,9 @@ import ( "strings" "syscall" - "github.com/opencontainers/selinux/go-selinux" "golang.org/x/sys/unix" "k8s.io/klog/v2" + "k8s.io/kubernetes/pkg/util/selinux" "k8s.io/mount-utils" utilpath "k8s.io/utils/path" ) @@ -263,7 +263,7 @@ func GetSELinux(path string, mountInfoFilename string, selinuxEnabled seLinuxEna // GetSELinuxSupport returns true if given path is on a mount that supports // SELinux. func (hu *HostUtil) GetSELinuxSupport(pathname string) (bool, error) { - return GetSELinux(pathname, procMountInfoPath, selinux.GetEnabled) + return GetSELinux(pathname, procMountInfoPath, selinux.SELinuxEnabled) } // GetOwner returns the integer ID for the user and group of the given path diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/nestedpendingoperations/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/nestedpendingoperations/OWNERS index e3bfbc909cf1..8bfe4a88f49d 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/nestedpendingoperations/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/nestedpendingoperations/OWNERS @@ -1,4 +1,4 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - saad-ali +- saad-ali diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/OWNERS index 18bd4c9e9499..415b19e5e288 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/OWNERS @@ -1,5 +1,5 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - saad-ali - - jingxu97 +- saad-ali +- jingxu97 diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/fakegenerator.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/fakegenerator.go index 88d980e711d4..6d8e5a1b3d19 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/fakegenerator.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/fakegenerator.go @@ -17,7 +17,6 @@ limitations under the License. package operationexecutor import ( - "k8s.io/apimachinery/pkg/api/resource" "time" v1 "k8s.io/api/core/v1" @@ -109,7 +108,7 @@ func (f *fakeOGCounter) GenerateExpandAndRecoverVolumeFunc(*v1.PersistentVolumeC return f.recordFuncCall("GenerateExpandVolumeFunc"), nil } -func (f *fakeOGCounter) GenerateExpandInUseVolumeFunc(volumeToMount VolumeToMount, actualStateOfWorld ActualStateOfWorldMounterUpdater, currentSize resource.Quantity) (volumetypes.GeneratedOperations, error) { +func (f *fakeOGCounter) GenerateExpandInUseVolumeFunc(volumeToMount VolumeToMount, actualStateOfWorld ActualStateOfWorldMounterUpdater) (volumetypes.GeneratedOperations, error) { return f.recordFuncCall("GenerateExpandInUseVolumeFunc"), nil } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/node_expander.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/node_expander.go deleted file mode 100644 index a1beedec65e1..000000000000 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/node_expander.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package operationexecutor - -import ( - "fmt" - - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" - clientset "k8s.io/client-go/kubernetes" - "k8s.io/client-go/tools/record" - "k8s.io/klog/v2" - kevents "k8s.io/kubernetes/pkg/kubelet/events" - "k8s.io/kubernetes/pkg/volume/util" - volumetypes "k8s.io/kubernetes/pkg/volume/util/types" -) - -type NodeExpander struct { - nodeResizeOperationOpts - kubeClient clientset.Interface - recorder record.EventRecorder - - // computed via precheck - pvcStatusCap resource.Quantity - pvCap resource.Quantity - resizeStatus *v1.PersistentVolumeClaimResizeStatus - - // pvcAlreadyUpdated if true indicates that although we are calling NodeExpandVolume on the kubelet - // PVC has already been updated - possibly because expansion already succeeded on different node. - // This can happen when a RWX PVC is expanded. - pvcAlreadyUpdated bool -} - -func newNodeExpander(resizeOp nodeResizeOperationOpts, client clientset.Interface, recorder record.EventRecorder) *NodeExpander { - return &NodeExpander{ - kubeClient: client, - nodeResizeOperationOpts: resizeOp, - recorder: recorder, - } -} - -// testResponseData is merely used for doing sanity checks in unit tests -type testResponseData struct { - // indicates that resize operation was called on underlying volume driver - // mainly useful for testing. - resizeCalledOnPlugin bool - - // Indicates whether kubelet should assume resize operation as finished. - // For kubelet - resize operation could be assumed as finished even if - // actual resizing is *not* finished. This can happen, because certain prechecks - // are failing and kubelet should not retry expansion, or it could happen - // because resize operation is genuinely finished. - assumeResizeFinished bool -} - -// runPreCheck performs some sanity checks before expansion can be performed on the PVC. -func (ne *NodeExpander) runPreCheck() bool { - ne.pvcStatusCap = ne.pvc.Status.Capacity[v1.ResourceStorage] - ne.pvCap = ne.pv.Spec.Capacity[v1.ResourceStorage] - - ne.resizeStatus = ne.pvc.Status.ResizeStatus - - // PVC is already expanded but we are still trying to expand the volume because - // last recorded size in ASOW is older. This can happen for RWX volume types. - if ne.pvcStatusCap.Cmp(ne.pluginResizeOpts.NewSize) >= 0 && (ne.resizeStatus == nil || *ne.resizeStatus == v1.PersistentVolumeClaimNoExpansionInProgress) { - ne.pvcAlreadyUpdated = true - } - - // if resizestatus is nil or NodeExpansionInProgress or NodeExpansionPending then we - // should allow volume expansion on the node to proceed. We are making an exception for - // resizeStatus being nil because it will support use cases where - // resizeStatus may not be set (old control-plane expansion controller etc). - if ne.resizeStatus == nil || - ne.pvcAlreadyUpdated || - *ne.resizeStatus == v1.PersistentVolumeClaimNodeExpansionPending || - *ne.resizeStatus == v1.PersistentVolumeClaimNodeExpansionInProgress { - return true - } - - return false -} - -func (ne *NodeExpander) expandOnPlugin() (bool, error, testResponseData) { - allowExpansion := ne.runPreCheck() - if !allowExpansion { - return false, nil, testResponseData{false, true} - } - - var err error - nodeName := ne.vmt.Pod.Spec.NodeName - - if !ne.pvcAlreadyUpdated { - ne.pvc, err = util.MarkNodeExpansionInProgress(ne.pvc, ne.kubeClient) - - if err != nil { - msg := ne.vmt.GenerateErrorDetailed("MountVolume.NodeExpandVolume failed to mark node expansion in progress: %v", err) - klog.Errorf(msg.Error()) - return false, err, testResponseData{} - } - } - _, resizeErr := ne.volumePlugin.NodeExpand(ne.pluginResizeOpts) - if resizeErr != nil { - if volumetypes.IsOperationFinishedError(resizeErr) { - var markFailedError error - ne.pvc, markFailedError = util.MarkNodeExpansionFailed(ne.pvc, ne.kubeClient) - if markFailedError != nil { - klog.Errorf(ne.vmt.GenerateErrorDetailed("MountMount.NodeExpandVolume failed to mark node expansion as failed: %v", err).Error()) - } - } - - // if driver returned FailedPrecondition error that means - // volume expansion should not be retried on this node but - // expansion operation should not block mounting - if volumetypes.IsFailedPreconditionError(resizeErr) { - ne.actualStateOfWorld.MarkForInUseExpansionError(ne.vmt.VolumeName) - klog.Errorf(ne.vmt.GenerateErrorDetailed("MountVolume.NodeExapndVolume failed with %v", resizeErr).Error()) - return false, nil, testResponseData{assumeResizeFinished: true, resizeCalledOnPlugin: true} - } - return false, resizeErr, testResponseData{assumeResizeFinished: true, resizeCalledOnPlugin: true} - } - simpleMsg, detailedMsg := ne.vmt.GenerateMsg("MountVolume.NodeExpandVolume succeeded", nodeName) - ne.recorder.Eventf(ne.vmt.Pod, v1.EventTypeNormal, kevents.FileSystemResizeSuccess, simpleMsg) - ne.recorder.Eventf(ne.pvc, v1.EventTypeNormal, kevents.FileSystemResizeSuccess, simpleMsg) - klog.InfoS(detailedMsg, "pod", klog.KObj(ne.vmt.Pod)) - - // no need to update PVC object if we already updated it - if ne.pvcAlreadyUpdated { - return true, nil, testResponseData{true, true} - } - - // File system resize succeeded, now update the PVC's Capacity to match the PV's - ne.pvc, err = util.MarkFSResizeFinished(ne.pvc, ne.pluginResizeOpts.NewSize, ne.kubeClient) - if err != nil { - return true, fmt.Errorf("mountVolume.NodeExpandVolume update pvc status failed: %v", err), testResponseData{true, true} - } - return true, nil, testResponseData{true, true} -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/operation_executor.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/operation_executor.go index 3a88fe052b63..ca4f6ca0cf91 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/operation_executor.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/operation_executor.go @@ -21,12 +21,9 @@ limitations under the License. package operationexecutor import ( - "errors" "fmt" "time" - "github.com/go-logr/logr" - "k8s.io/klog/v2" "k8s.io/mount-utils" @@ -148,7 +145,7 @@ type OperationExecutor interface { // and one of podName or nodeName is pending or in exponential backoff, otherwise it returns true IsOperationSafeToRetry(volumeName v1.UniqueVolumeName, podName volumetypes.UniquePodName, nodeName types.NodeName, operationName string) bool // ExpandInUseVolume will resize volume's file system to expected size without unmounting the volume. - ExpandInUseVolume(volumeToMount VolumeToMount, actualStateOfWorld ActualStateOfWorldMounterUpdater, currentSize resource.Quantity) error + ExpandInUseVolume(volumeToMount VolumeToMount, actualStateOfWorld ActualStateOfWorldMounterUpdater) error // ReconstructVolumeOperation construct a new volumeSpec and returns it created by plugin ReconstructVolumeOperation(volumeMode v1.PersistentVolumeMode, plugin volume.VolumePlugin, mapperPlugin volume.BlockVolumePlugin, uid types.UID, podName volumetypes.UniquePodName, volumeSpecName string, volumePath string, pluginName string) (*volume.Spec, error) // CheckVolumeExistenceOperation checks volume existence @@ -201,7 +198,7 @@ type ActualStateOfWorldMounterUpdater interface { MarkDeviceAsUnmounted(volumeName v1.UniqueVolumeName) error // Marks the specified volume's file system resize request is finished. - MarkVolumeAsResized(volumeName v1.UniqueVolumeName, claimSize *resource.Quantity) bool + MarkVolumeAsResized(podName volumetypes.UniquePodName, volumeName v1.UniqueVolumeName) error // GetDeviceMountState returns mount state of the device in global path GetDeviceMountState(volumeName v1.UniqueVolumeName) DeviceMountState @@ -245,11 +242,6 @@ type ActualStateOfWorldAttacherUpdater interface { // Unmarks the desire to detach for the specified volume (add the volume back to // the node's volumesToReportAsAttached list) AddVolumeToReportAsAttached(volumeName v1.UniqueVolumeName, nodeName types.NodeName) - - // InitializeClaimSize sets pvc claim size by reading pvc.Status.Capacity - InitializeClaimSize(volumeName v1.UniqueVolumeName, claimSize *resource.Quantity) - - GetClaimSize(volumeName v1.UniqueVolumeName) *resource.Quantity } // VolumeLogger defines a set of operations for generating volume-related logging and error msgs @@ -349,33 +341,6 @@ func (volume *VolumeToAttach) GenerateError(prefixMsg string, err error) (simple return fmt.Errorf(simpleMsg), fmt.Errorf(detailedMsg) } -// String combines key fields of the volume for logging in text format. -func (volume *VolumeToAttach) String() string { - volumeSpecName := "nil" - if volume.VolumeSpec != nil { - volumeSpecName = volume.VolumeSpec.Name() - } - return fmt.Sprintf("%s (UniqueName: %s) from node %s", volumeSpecName, volume.VolumeName, volume.NodeName) -} - -// MarshalLog combines key fields of the volume for logging in a structured format. -func (volume *VolumeToAttach) MarshalLog() interface{} { - volumeSpecName := "nil" - if volume.VolumeSpec != nil { - volumeSpecName = volume.VolumeSpec.Name() - } - return struct { - VolumeName, UniqueName, NodeName string - }{ - VolumeName: volumeSpecName, - UniqueName: string(volume.VolumeName), - NodeName: string(volume.NodeName), - } -} - -var _ fmt.Stringer = &VolumeToAttach{} -var _ logr.Marshaler = &VolumeToAttach{} - // VolumeToMount represents a volume that should be attached to this node and // mounted to the PodName. type VolumeToMount struct { @@ -422,13 +387,6 @@ type VolumeToMount struct { // DesiredSizeLimit indicates the desired upper bound on the size of the volume // (if so implemented) DesiredSizeLimit *resource.Quantity - - // time at which volume was requested to be mounted - MountRequestTime time.Time - - // PersistentVolumeSize stores desired size of the volume. - // usually this is the size if pv.Spec.Capacity - PersistentVolumeSize resource.Quantity } // DeviceMountState represents device mount state in a global path. @@ -460,23 +418,6 @@ const ( VolumeNotMounted VolumeMountState = "VolumeNotMounted" ) -type MountPreConditionFailed struct { - msg string -} - -func (err *MountPreConditionFailed) Error() string { - return err.msg -} - -func NewMountPreConditionFailedError(msg string) *MountPreConditionFailed { - return &MountPreConditionFailed{msg: msg} -} - -func IsMountFailedPreconditionError(err error) bool { - var failedPreconditionError *MountPreConditionFailed - return errors.As(err, &failedPreconditionError) -} - // GenerateMsgDetailed returns detailed msgs for volumes to mount func (volume *VolumeToMount) GenerateMsgDetailed(prefixMsg, suffixMsg string) (detailedMsg string) { detailedStr := fmt.Sprintf("(UniqueName: %q) pod %q (UID: %q)", volume.VolumeName, volume.Pod.Name, volume.Pod.UID) @@ -568,33 +509,6 @@ func (volume *AttachedVolume) GenerateError(prefixMsg string, err error) (simple return fmt.Errorf(simpleMsg), fmt.Errorf(detailedMsg) } -// String combines key fields of the volume for logging in text format. -func (volume *AttachedVolume) String() string { - volumeSpecName := "nil" - if volume.VolumeSpec != nil { - volumeSpecName = volume.VolumeSpec.Name() - } - return fmt.Sprintf("%s (UniqueName: %s) from node %s", volumeSpecName, volume.VolumeName, volume.NodeName) -} - -// MarshalLog combines key fields of the volume for logging in a structured format. -func (volume *AttachedVolume) MarshalLog() interface{} { - volumeSpecName := "nil" - if volume.VolumeSpec != nil { - volumeSpecName = volume.VolumeSpec.Name() - } - return struct { - VolumeName, UniqueName, NodeName string - }{ - VolumeName: volumeSpecName, - UniqueName: string(volume.VolumeName), - NodeName: string(volume.NodeName), - } -} - -var _ fmt.Stringer = &AttachedVolume{} -var _ logr.Marshaler = &AttachedVolume{} - // MountedVolume represents a volume that has successfully been mounted to a pod. type MountedVolume struct { // PodName is the unique identifier of the pod mounted to. @@ -1003,8 +917,8 @@ func (oe *operationExecutor) UnmountDevice( deviceToDetach.VolumeName, podName, "" /* nodeName */, generatedOperations) } -func (oe *operationExecutor) ExpandInUseVolume(volumeToMount VolumeToMount, actualStateOfWorld ActualStateOfWorldMounterUpdater, currentSize resource.Quantity) error { - generatedOperations, err := oe.operationGenerator.GenerateExpandInUseVolumeFunc(volumeToMount, actualStateOfWorld, currentSize) +func (oe *operationExecutor) ExpandInUseVolume(volumeToMount VolumeToMount, actualStateOfWorld ActualStateOfWorldMounterUpdater) error { + generatedOperations, err := oe.operationGenerator.GenerateExpandInUseVolumeFunc(volumeToMount, actualStateOfWorld) if err != nil { return err } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/operation_generator.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/operation_generator.go index 7239cbc912db..d7cb5121a6c7 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/operation_generator.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/operation_generator.go @@ -35,7 +35,6 @@ import ( clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/record" volerr "k8s.io/cloud-provider/volume/errors" - storagehelpers "k8s.io/component-helpers/storage/volume" csitrans "k8s.io/csi-translation-lib" "k8s.io/klog/v2" v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" @@ -49,10 +48,9 @@ import ( ) const ( - unknownVolumePlugin string = "UnknownVolumePlugin" - unknownAttachableVolumePlugin string = "UnknownAttachableVolumePlugin" - DetachOperationName string = "volume_detach" - VerifyControllerAttachedVolumeOpName string = "verify_controller_attached_volume" + unknownVolumePlugin string = "UnknownVolumePlugin" + unknownAttachableVolumePlugin string = "UnknownAttachableVolumePlugin" + DetachOperationName string = "volume_detach" ) // InTreeToCSITranslator contains methods required to check migratable status @@ -81,34 +79,31 @@ type operationGenerator struct { // recorder is used to record events in the API server recorder record.EventRecorder + // checkNodeCapabilitiesBeforeMount, if set, enables the CanMount check, + // which verifies that the components (binaries, etc.) required to mount + // the volume are available on the underlying node before attempting mount. + checkNodeCapabilitiesBeforeMount bool + // blkUtil provides volume path related operations for block volume blkUtil volumepathhandler.BlockVolumePathHandler translator InTreeToCSITranslator } -type inTreeResizeResponse struct { - pvc *v1.PersistentVolumeClaim - pv *v1.PersistentVolume - - err error - // indicates that resize operation was called on underlying volume driver - // mainly useful for testing. - resizeCalled bool -} - // NewOperationGenerator is returns instance of operationGenerator func NewOperationGenerator(kubeClient clientset.Interface, volumePluginMgr *volume.VolumePluginMgr, recorder record.EventRecorder, + checkNodeCapabilitiesBeforeMount bool, blkUtil volumepathhandler.BlockVolumePathHandler) OperationGenerator { return &operationGenerator{ - kubeClient: kubeClient, - volumePluginMgr: volumePluginMgr, - recorder: recorder, - blkUtil: blkUtil, - translator: csitrans.New(), + kubeClient: kubeClient, + volumePluginMgr: volumePluginMgr, + recorder: recorder, + checkNodeCapabilitiesBeforeMount: checkNodeCapabilitiesBeforeMount, + blkUtil: blkUtil, + translator: csitrans.New(), } } @@ -160,9 +155,7 @@ type OperationGenerator interface { GenerateExpandAndRecoverVolumeFunc(*v1.PersistentVolumeClaim, *v1.PersistentVolume, string) (volumetypes.GeneratedOperations, error) // Generates the volume file system resize function, which can resize volume's file system to expected size without unmounting the volume. - // Along with volumeToMount and actualStateOfWorld, the function expects current size of volume on the node as an argument. The current - // size here always refers to capacity last recorded in actualStateOfWorld from pvc.Status.Capacity - GenerateExpandInUseVolumeFunc(volumeToMount VolumeToMount, actualStateOfWorld ActualStateOfWorldMounterUpdater, currentSize resource.Quantity) (volumetypes.GeneratedOperations, error) + GenerateExpandInUseVolumeFunc(volumeToMount VolumeToMount, actualStateOfWorld ActualStateOfWorldMounterUpdater) (volumetypes.GeneratedOperations, error) } type inTreeResizeOpts struct { @@ -173,6 +166,27 @@ type inTreeResizeOpts struct { volumePlugin volume.ExpandableVolumePlugin } +type inTreeResizeResponse struct { + pvc *v1.PersistentVolumeClaim + pv *v1.PersistentVolume + err error + + // Indicates whether kubelet should assume resize operation as finished. + // For kubelet - resize operation could be assumed as finished even if + // actual resizing is *not* finished. This can happen, because certain prechecks + // are failing and kubelet should not retry expansion, or it could happen + // because resize operation is genuinely finished. + assumeResizeOpAsFinished bool + + // indicates that resize operation was called on underlying volume driver + // mainly useful for testing. + resizeCalled bool + + // indicates whether entire volume expansion is finished or not + // only used from nodeExpansion calls. Mainly used for testing. + resizeFinished bool +} + type nodeResizeOperationOpts struct { vmt VolumeToMount pvc *v1.PersistentVolumeClaim @@ -626,6 +640,7 @@ func (og *operationGenerator) GenerateMountVolumeFunc( klog.InfoS(volumeToMount.GenerateMsgDetailed("MountVolume.WaitForAttach succeeded", fmt.Sprintf("DevicePath %q", devicePath)), "pod", klog.KObj(volumeToMount.Pod)) } + var resizeDone bool var resizeError error resizeOptions := volume.NodeResizeOptions{ DevicePath: devicePath, @@ -665,8 +680,45 @@ func (og *operationGenerator) GenerateMountVolumeFunc( eventErr, detailedErr := volumeToMount.GenerateError("MountVolume.MarkDeviceAsMounted failed", markDeviceMountedErr) return volumetypes.NewOperationContext(eventErr, detailedErr, migrated) } - // set staging path for volume expansion + + // If volume expansion is performed after MountDevice but before SetUp then + // deviceMountPath and deviceStagePath is going to be the same. + // Deprecation: Calling NodeExpandVolume after NodeStage/MountDevice will be deprecated + // in a future version of k8s. + resizeOptions.DeviceMountPath = deviceMountPath resizeOptions.DeviceStagePath = deviceMountPath + resizeOptions.CSIVolumePhase = volume.CSIVolumeStaged + + // NodeExpandVolume will resize the file system if user has requested a resize of + // underlying persistent volume and is allowed to do so. + resizeDone, resizeError = og.nodeExpandVolume(volumeToMount, actualStateOfWorld, resizeOptions) + + if resizeError != nil { + klog.Errorf("MountVolume.NodeExpandVolume failed with %v", resizeError) + + // Resize failed. To make sure NodeExpand is re-tried again on the next attempt + // *before* SetUp(), mark the mounted device as uncertain. + markDeviceUncertainErr := actualStateOfWorld.MarkDeviceAsUncertain( + volumeToMount.VolumeName, devicePath, deviceMountPath) + if markDeviceUncertainErr != nil { + // just log, return the resizeError error instead + klog.InfoS(volumeToMount.GenerateMsgDetailed( + "MountVolume.MountDevice failed to mark volume as uncertain", + markDeviceUncertainErr.Error()), "pod", klog.KObj(volumeToMount.Pod)) + } + eventErr, detailedErr := volumeToMount.GenerateError("MountVolume.MountDevice failed while expanding volume", resizeError) + return volumetypes.NewOperationContext(eventErr, detailedErr, migrated) + } + } + + if og.checkNodeCapabilitiesBeforeMount { + if canMountErr := volumeMounter.CanMount(); canMountErr != nil { + err = fmt.Errorf( + "verify that your node machine has the required components before attempting to mount this volume type. %s", + canMountErr) + eventErr, detailedErr := volumeToMount.GenerateError("MountVolume.CanMount failed", err) + return volumetypes.NewOperationContext(eventErr, detailedErr, migrated) + } } // Execute mount @@ -702,28 +754,29 @@ func (og *operationGenerator) GenerateMountVolumeFunc( } klog.V(verbosity).InfoS(detailedMsg, "pod", klog.KObj(volumeToMount.Pod)) resizeOptions.DeviceMountPath = volumeMounter.GetPath() - - _, resizeError = og.expandVolumeDuringMount(volumeToMount, actualStateOfWorld, resizeOptions) - if resizeError != nil { - klog.Errorf("MountVolume.NodeExpandVolume failed with %v", resizeError) - eventErr, detailedErr := volumeToMount.GenerateError("MountVolume.Setup failed while expanding volume", resizeError) - // At this point, MountVolume.Setup already succeeded, we should add volume into actual state - // so that reconciler can clean up volume when needed. However, volume resize failed, - // we should not mark the volume as mounted to avoid pod starts using it. - // Considering the above situations, we mark volume as uncertain here so that reconciler will tigger - // volume tear down when pod is deleted, and also makes sure pod will not start using it. - if err := actualStateOfWorld.MarkVolumeMountAsUncertain(markOpts); err != nil { - klog.Errorf(volumeToMount.GenerateErrorDetailed("MountVolume.MarkVolumeMountAsUncertain failed", err).Error()) + resizeOptions.CSIVolumePhase = volume.CSIVolumePublished + + // We need to call resizing here again in case resizing was not done during device mount. There could be + // two reasons of that: + // - Volume does not support DeviceMounter interface. + // - In case of CSI the volume does not have node stage_unstage capability. + if !resizeDone { + _, resizeError = og.nodeExpandVolume(volumeToMount, actualStateOfWorld, resizeOptions) + if resizeError != nil { + klog.Errorf("MountVolume.NodeExpandVolume failed with %v", resizeError) + eventErr, detailedErr := volumeToMount.GenerateError("MountVolume.Setup failed while expanding volume", resizeError) + // At this point, MountVolume.Setup already succeeded, we should add volume into actual state + // so that reconciler can clean up volume when needed. However, volume resize failed, + // we should not mark the volume as mounted to avoid pod starts using it. + // Considering the above situations, we mark volume as uncertain here so that reconciler will tigger + // volume tear down when pod is deleted, and also makes sure pod will not start using it. + if err := actualStateOfWorld.MarkVolumeMountAsUncertain(markOpts); err != nil { + klog.Errorf(volumeToMount.GenerateErrorDetailed("MountVolume.MarkVolumeMountAsUncertain failed", err).Error()) + } + return volumetypes.NewOperationContext(eventErr, detailedErr, migrated) } - return volumetypes.NewOperationContext(eventErr, detailedErr, migrated) } - // record total time it takes to mount a volume. This is end to end time that includes waiting for volume to attach, node to be update - // plugin call to succeed - mountRequestTime := volumeToMount.MountRequestTime - totalTimeTaken := time.Since(mountRequestTime).Seconds() - util.RecordOperationLatencyMetric(util.GetFullQualifiedPluginNameForVolume(volumePluginName, volumeToMount.VolumeSpec), "overall_volume_mount", totalTimeTaken) - markVolMountedErr := actualStateOfWorld.MarkVolumeAsMounted(markOpts) if markVolMountedErr != nil { // On failure, return error. Caller will log and retry. @@ -955,12 +1008,6 @@ func (og *operationGenerator) GenerateUnmountDeviceFunc( } // The device is still in use elsewhere. Caller will log and retry. if deviceOpened { - // Mark the device as uncertain, so MountDevice is called for new pods. - markDeviceUncertainErr := actualStateOfWorld.MarkDeviceAsUncertain(deviceToDetach.VolumeName, deviceToDetach.DevicePath, deviceMountPath) - if markDeviceUncertainErr != nil { - // There is nothing else we can do. Hope that UnmountDevice will be re-tried shortly. - klog.Errorf(deviceToDetach.GenerateErrorDetailed("UnmountDevice.MarkDeviceAsUncertain failed", markDeviceUncertainErr).Error()) - } eventErr, detailedErr := deviceToDetach.GenerateError( "UnmountDevice failed", goerrors.New("the device is in use when it was no longer expected to be in use")) @@ -1195,8 +1242,9 @@ func (og *operationGenerator) GenerateMapVolumeFunc( resizeOptions := volume.NodeResizeOptions{ DevicePath: devicePath, DeviceStagePath: stagingPath, + CSIVolumePhase: volume.CSIVolumePublished, } - _, resizeError := og.expandVolumeDuringMount(volumeToMount, actualStateOfWorld, resizeOptions) + _, resizeError := og.nodeExpandVolume(volumeToMount, actualStateOfWorld, resizeOptions) if resizeError != nil { klog.Errorf("MapVolume.NodeExpandVolume failed with %v", resizeError) eventErr, detailedErr := volumeToMount.GenerateError("MapVolume.MarkVolumeAsMounted failed while expanding volume", resizeError) @@ -1466,38 +1514,8 @@ func (og *operationGenerator) GenerateVerifyControllerAttachedVolumeFunc( return volumetypes.GeneratedOperations{}, volumeToMount.GenerateErrorDetailed("VerifyControllerAttachedVolume.FindPluginBySpec failed", err) } - // For attachable volume types, lets check if volume is attached by reading from node lister. - // This would avoid exponential back-off and creation of goroutine unnecessarily. We still - // verify status of attached volume by directly reading from API server later on.This is necessarily - // to ensure any race conditions because of cached state in the informer. - if volumeToMount.PluginIsAttachable { - cachedAttachedVolumes, _ := og.volumePluginMgr.Host.GetAttachedVolumesFromNodeStatus() - if cachedAttachedVolumes != nil { - _, volumeFound := cachedAttachedVolumes[volumeToMount.VolumeName] - if !volumeFound { - return volumetypes.GeneratedOperations{}, NewMountPreConditionFailedError(fmt.Sprintf("volume %s is not yet in node's status", volumeToMount.VolumeName)) - } - } - } - verifyControllerAttachedVolumeFunc := func() volumetypes.OperationContext { migrated := getMigratedStatusBySpec(volumeToMount.VolumeSpec) - claimSize := actualStateOfWorld.GetClaimSize(volumeToMount.VolumeName) - - // only fetch claimSize if it was not set previously - if volumeToMount.VolumeSpec.PersistentVolume != nil && claimSize == nil && !volumeToMount.VolumeSpec.InlineVolumeSpecForCSIMigration { - pv := volumeToMount.VolumeSpec.PersistentVolume - pvc, err := og.kubeClient.CoreV1().PersistentVolumeClaims(pv.Spec.ClaimRef.Namespace).Get(context.TODO(), pv.Spec.ClaimRef.Name, metav1.GetOptions{}) - if err != nil { - eventErr, detailedErr := volumeToMount.GenerateError("VerifyControllerAttachedVolume fetching pvc failed", err) - return volumetypes.NewOperationContext(eventErr, detailedErr, migrated) - } - pvcStatusSize := pvc.Status.Capacity.Storage() - if pvcStatusSize != nil { - claimSize = pvcStatusSize - } - } - if !volumeToMount.PluginIsAttachable { // If the volume does not implement the attacher interface, it is // assumed to be attached and the actual state of the world is @@ -1510,7 +1528,7 @@ func (og *operationGenerator) GenerateVerifyControllerAttachedVolumeFunc( eventErr, detailedErr := volumeToMount.GenerateError("VerifyControllerAttachedVolume.MarkVolumeAsAttachedByUniqueVolumeName failed", addVolumeNodeErr) return volumetypes.NewOperationContext(eventErr, detailedErr, migrated) } - actualStateOfWorld.InitializeClaimSize(volumeToMount.VolumeName, claimSize) + return volumetypes.NewOperationContext(nil, nil, migrated) } @@ -1551,7 +1569,6 @@ func (og *operationGenerator) GenerateVerifyControllerAttachedVolumeFunc( eventErr, detailedErr := volumeToMount.GenerateError("VerifyControllerAttachedVolume.MarkVolumeAsAttached failed", addVolumeNodeErr) return volumetypes.NewOperationContext(eventErr, detailedErr, migrated) } - actualStateOfWorld.InitializeClaimSize(volumeToMount.VolumeName, claimSize) return volumetypes.NewOperationContext(nil, nil, migrated) } } @@ -1562,7 +1579,7 @@ func (og *operationGenerator) GenerateVerifyControllerAttachedVolumeFunc( } return volumetypes.GeneratedOperations{ - OperationName: VerifyControllerAttachedVolumeOpName, + OperationName: "verify_controller_attached_volume", OperationFunc: verifyControllerAttachedVolumeFunc, CompleteFunc: util.OperationCompleteHook(util.GetFullQualifiedPluginNameForVolume(volumePlugin.GetPluginName(), volumeToMount.VolumeSpec), "verify_controller_attached_volume"), EventRecorderFunc: nil, // nil because we do not want to generate event on error @@ -1902,7 +1919,7 @@ func (og *operationGenerator) markForPendingNodeExpansion(pvc *v1.PersistentVolu func (og *operationGenerator) GenerateExpandInUseVolumeFunc( volumeToMount VolumeToMount, - actualStateOfWorld ActualStateOfWorldMounterUpdater, currentSize resource.Quantity) (volumetypes.GeneratedOperations, error) { + actualStateOfWorld ActualStateOfWorldMounterUpdater) (volumetypes.GeneratedOperations, error) { volumePlugin, err := og.volumePluginMgr.FindPluginBySpec(volumeToMount.VolumeSpec) @@ -1915,17 +1932,9 @@ func (og *operationGenerator) GenerateExpandInUseVolumeFunc( var eventErr, detailedErr error migrated := false - if currentSize.IsZero() || volumeToMount.PersistentVolumeSize.IsZero() { - err := fmt.Errorf("current or new size of the volume is not set") - eventErr, detailedErr = volumeToMount.GenerateError("NodeExpandvolume.expansion failed", err) - return volumetypes.NewOperationContext(eventErr, detailedErr, migrated) - } - resizeOptions := volume.NodeResizeOptions{ VolumeSpec: volumeToMount.VolumeSpec, DevicePath: volumeToMount.DevicePath, - OldSize: currentSize, - NewSize: volumeToMount.PersistentVolumeSize, } fsVolume, err := util.CheckVolumeModeFilesystem(volumeToMount.VolumeSpec) if err != nil { @@ -1989,6 +1998,7 @@ func (og *operationGenerator) GenerateExpandInUseVolumeFunc( } // if we are doing online expansion then volume is already published + resizeOptions.CSIVolumePhase = volume.CSIVolumePublished resizeDone, eventErr, detailedErr = og.doOnlineExpansion(volumeToMount, actualStateOfWorld, resizeOptions) if eventErr != nil || detailedErr != nil { return volumetypes.NewOperationContext(eventErr, detailedErr, migrated) @@ -2027,11 +2037,10 @@ func (og *operationGenerator) doOnlineExpansion(volumeToMount VolumeToMount, return false, e1, e2 } if resizeDone { - markingDone := actualStateOfWorld.MarkVolumeAsResized(volumeToMount.VolumeName, &resizeOptions.NewSize) - if !markingDone { + markFSResizedErr := actualStateOfWorld.MarkVolumeAsResized(volumeToMount.PodName, volumeToMount.VolumeName) + if markFSResizedErr != nil { // On failure, return error. Caller will log and retry. - genericFailureError := fmt.Errorf("unable to mark volume as resized") - e1, e2 := volumeToMount.GenerateError("NodeExpandVolume.MarkVolumeAsResized failed", genericFailureError) + e1, e2 := volumeToMount.GenerateError("NodeExpandVolume.MarkVolumeAsResized failed", markFSResizedErr) return false, e1, e2 } return true, nil, nil @@ -2039,9 +2048,29 @@ func (og *operationGenerator) doOnlineExpansion(volumeToMount VolumeToMount, return false, nil, nil } -func (og *operationGenerator) expandVolumeDuringMount(volumeToMount VolumeToMount, actualStateOfWorld ActualStateOfWorldMounterUpdater, rsOpts volume.NodeResizeOptions) (bool, error) { - supportsExpansion, expandablePlugin := og.checkIfSupportsNodeExpansion(volumeToMount) - if supportsExpansion { +func (og *operationGenerator) nodeExpandVolume( + volumeToMount VolumeToMount, + actualStateOfWorld ActualStateOfWorldMounterUpdater, + rsOpts volume.NodeResizeOptions) (bool, error) { + if !utilfeature.DefaultFeatureGate.Enabled(features.ExpandPersistentVolumes) { + klog.V(4).Infof("Resizing is not enabled for this volume %s", volumeToMount.VolumeName) + return true, nil + } + + if volumeToMount.VolumeSpec != nil && + volumeToMount.VolumeSpec.InlineVolumeSpecForCSIMigration { + klog.V(4).Infof("This volume %s is a migrated inline volume and is not resizable", volumeToMount.VolumeName) + return true, nil + } + + // Get expander, if possible + expandableVolumePlugin, _ := + og.volumePluginMgr.FindNodeExpandablePluginBySpec(volumeToMount.VolumeSpec) + + if expandableVolumePlugin != nil && + expandableVolumePlugin.RequiresFSResize() && + volumeToMount.VolumeSpec.PersistentVolume != nil { + pv := volumeToMount.VolumeSpec.PersistentVolume pvc, err := og.kubeClient.CoreV1().PersistentVolumeClaims(pv.Spec.ClaimRef.Namespace).Get(context.TODO(), pv.Spec.ClaimRef.Name, metav1.GetOptions{}) if err != nil { @@ -2056,144 +2085,191 @@ func (og *operationGenerator) expandVolumeDuringMount(volumeToMount VolumeToMoun og.recorder.Eventf(pvc, v1.EventTypeWarning, kevents.FileSystemResizeFailed, simpleMsg) return true, nil } - pvcStatusCap := pvc.Status.Capacity[v1.ResourceStorage] - pvSpecCap := pv.Spec.Capacity[v1.ResourceStorage] - if pvcStatusCap.Cmp(pvSpecCap) < 0 { - rsOpts.NewSize = pvSpecCap - rsOpts.OldSize = pvcStatusCap - resizeOp := nodeResizeOperationOpts{ - vmt: volumeToMount, - pvc: pvc, - pv: pv, - pluginResizeOpts: rsOpts, - volumePlugin: expandablePlugin, - actualStateOfWorld: actualStateOfWorld, - } - if utilfeature.DefaultFeatureGate.Enabled(features.RecoverVolumeExpansionFailure) { - nodeExpander := newNodeExpander(resizeOp, og.kubeClient, og.recorder) - resizeFinished, err, _ := nodeExpander.expandOnPlugin() - return resizeFinished, err - } else { - return og.legacyCallNodeExpandOnPlugin(resizeOp) - } + resizeOp := nodeResizeOperationOpts{ + vmt: volumeToMount, + pvc: pvc, + pv: pv, + pluginResizeOpts: rsOpts, + volumePlugin: expandableVolumePlugin, + actualStateOfWorld: actualStateOfWorld, + } + if utilfeature.DefaultFeatureGate.Enabled(features.RecoverVolumeExpansionFailure) { + resizeResponse := og.callNodeExpandOnPlugin(resizeOp) + return resizeResponse.assumeResizeOpAsFinished, resizeResponse.err + } else { + return og.legacyCallNodeExpandOnPlugin(resizeOp) } } return true, nil } -func (og *operationGenerator) checkIfSupportsNodeExpansion(volumeToMount VolumeToMount) (bool, volume.NodeExpandableVolumePlugin) { - if volumeToMount.VolumeSpec != nil && - volumeToMount.VolumeSpec.InlineVolumeSpecForCSIMigration { - klog.V(4).Infof("This volume %s is a migrated inline volume and is not resizable", volumeToMount.VolumeName) - return false, nil - } +// callNodeExpandOnPlugin is newer version of calling node expansion on plugins, which does support +// recovery from volume expansion failure. +func (og *operationGenerator) callNodeExpandOnPlugin(resizeOp nodeResizeOperationOpts) inTreeResizeResponse { + pvc := resizeOp.pvc + pv := resizeOp.pv + volumeToMount := resizeOp.vmt + rsOpts := resizeOp.pluginResizeOpts + actualStateOfWorld := resizeOp.actualStateOfWorld + expandableVolumePlugin := resizeOp.volumePlugin - // Get expander, if possible - expandableVolumePlugin, _ := - og.volumePluginMgr.FindNodeExpandablePluginBySpec(volumeToMount.VolumeSpec) - if expandableVolumePlugin != nil && - expandableVolumePlugin.RequiresFSResize() && - volumeToMount.VolumeSpec.PersistentVolume != nil { - return true, expandableVolumePlugin + var err error + pvcStatusCap := pvc.Status.Capacity[v1.ResourceStorage] + pvSpecCap := pv.Spec.Capacity[v1.ResourceStorage] + + resizeResponse := inTreeResizeResponse{ + pvc: pvc, + pv: pv, } - return false, nil -} -func (og *operationGenerator) nodeExpandVolume( - volumeToMount VolumeToMount, - actualStateOfWorld ActualStateOfWorldMounterUpdater, - rsOpts volume.NodeResizeOptions) (bool, error) { + if permitNodeExpansion(pvc, pv) { + // File system resize was requested, proceed + klog.V(4).InfoS(volumeToMount.GenerateMsgDetailed("MountVolume.NodeExpandVolume entering", fmt.Sprintf("DevicePath %q", volumeToMount.DevicePath)), "pod", klog.KObj(volumeToMount.Pod)) - supportsExpansion, expandableVolumePlugin := og.checkIfSupportsNodeExpansion(volumeToMount) + rsOpts.VolumeSpec = volumeToMount.VolumeSpec + rsOpts.NewSize = pvSpecCap + rsOpts.OldSize = pvcStatusCap + pvc, err = util.MarkNodeExpansionInProgress(pvc, og.kubeClient) - if supportsExpansion { - // lets use sizes handed over to us by caller for comparison - if rsOpts.NewSize.Cmp(rsOpts.OldSize) > 0 { - pv := volumeToMount.VolumeSpec.PersistentVolume - pvc, err := og.kubeClient.CoreV1().PersistentVolumeClaims(pv.Spec.ClaimRef.Namespace).Get(context.TODO(), pv.Spec.ClaimRef.Name, metav1.GetOptions{}) - if err != nil { - // Return error rather than leave the file system un-resized, caller will log and retry - return false, fmt.Errorf("mountVolume.NodeExpandVolume get PVC failed : %v", err) - } + if err != nil { + msg := volumeToMount.GenerateErrorDetailed("MountVolume.NodeExpandVolume failed to mark node expansion in progress: %v", err) + klog.Errorf(msg.Error()) + resizeResponse.err = msg + return resizeResponse + } - if volumeToMount.VolumeSpec.ReadOnly { - simpleMsg, detailedMsg := volumeToMount.GenerateMsg("MountVolume.NodeExpandVolume failed", "requested read-only file system") - klog.Warningf(detailedMsg) - og.recorder.Eventf(volumeToMount.Pod, v1.EventTypeWarning, kevents.FileSystemResizeFailed, simpleMsg) - og.recorder.Eventf(pvc, v1.EventTypeWarning, kevents.FileSystemResizeFailed, simpleMsg) - return true, nil - } - resizeOp := nodeResizeOperationOpts{ - vmt: volumeToMount, - pvc: pvc, - pv: pv, - pluginResizeOpts: rsOpts, - volumePlugin: expandableVolumePlugin, - actualStateOfWorld: actualStateOfWorld, + resizeDone, resizeErr := expandableVolumePlugin.NodeExpand(rsOpts) + resizeResponse.resizeCalled = true + + if resizeErr != nil { + if volumetypes.IsOperationFinishedError(resizeErr) { + var markFailedError error + pvc, markFailedError = util.MarkNodeExpansionFailed(pvc, og.kubeClient) + // update the pvc with node expansion object + resizeResponse.pvc = pvc + resizeResponse.assumeResizeOpAsFinished = true + if markFailedError != nil { + klog.Errorf(volumeToMount.GenerateErrorDetailed("MountMount.NodeExpandVolume failed to mark node expansion as failed: %v", err).Error()) + } } - if utilfeature.DefaultFeatureGate.Enabled(features.RecoverVolumeExpansionFailure) { - nodeExpander := newNodeExpander(resizeOp, og.kubeClient, og.recorder) - resizeFinished, err, _ := nodeExpander.expandOnPlugin() - return resizeFinished, err - } else { - return og.legacyCallNodeExpandOnPlugin(resizeOp) + + // if driver returned FailedPrecondition error that means + // volume expansion should not be retried on this node but + // expansion operation should not block mounting + if volumetypes.IsFailedPreconditionError(resizeErr) { + actualStateOfWorld.MarkForInUseExpansionError(volumeToMount.VolumeName) + klog.Errorf(volumeToMount.GenerateErrorDetailed("MountVolume.NodeExapndVolume failed with %v", resizeErr).Error()) + resizeResponse.assumeResizeOpAsFinished = true + return resizeResponse } + + resizeResponse.err = resizeErr + return resizeResponse + } + resizeResponse.resizeFinished = resizeDone + + // Volume resizing is not done but it did not error out. This could happen if a CSI volume + // does not have node stage_unstage capability but was asked to resize the volume before + // node publish. In which case - we must retry resizing after node publish. + if !resizeDone { + return resizeResponse } + + simpleMsg, detailedMsg := volumeToMount.GenerateMsg("MountVolume.NodeExpandVolume succeeded", "") + og.recorder.Eventf(volumeToMount.Pod, v1.EventTypeNormal, kevents.FileSystemResizeSuccess, simpleMsg) + og.recorder.Eventf(pvc, v1.EventTypeNormal, kevents.FileSystemResizeSuccess, simpleMsg) + klog.InfoS(detailedMsg, "pod", klog.KObj(volumeToMount.Pod)) + + // File system resize succeeded, now update the PVC's Capacity to match the PV's + pvc, err = util.MarkFSResizeFinished(pvc, pvSpecCap, og.kubeClient) + resizeResponse.pvc = pvc + + if err != nil { + resizeResponse.err = fmt.Errorf("mountVolume.NodeExpandVolume update PVC status failed : %v", err) + // On retry, NodeExpandVolume will be called again but do nothing + return resizeResponse + } + resizeResponse.assumeResizeOpAsFinished = true + return resizeResponse } - return true, nil + // somehow a resize operation was queued, but we can not perform any resizing because + // prechecks required for node expansion failed. Kubelet should not retry expanding the volume. + resizeResponse.assumeResizeOpAsFinished = true + return resizeResponse } // legacyCallNodeExpandOnPlugin is old version of calling node expansion on plugin, which does not support // recovery from volume expansion failure -// TODO: Removing this code when RecoverVolumeExpansionFailure feature goes GA. func (og *operationGenerator) legacyCallNodeExpandOnPlugin(resizeOp nodeResizeOperationOpts) (bool, error) { pvc := resizeOp.pvc + pv := resizeOp.pv volumeToMount := resizeOp.vmt rsOpts := resizeOp.pluginResizeOpts actualStateOfWorld := resizeOp.actualStateOfWorld expandableVolumePlugin := resizeOp.volumePlugin - pvcStatusCap := pvc.Status.Capacity[v1.ResourceStorage] - - nodeName := volumeToMount.Pod.Spec.NodeName - var err error - // File system resize was requested, proceed - klog.V(4).InfoS(volumeToMount.GenerateMsgDetailed("MountVolume.NodeExpandVolume entering", fmt.Sprintf("DevicePath %q", volumeToMount.DevicePath)), "pod", klog.KObj(volumeToMount.Pod)) - - rsOpts.VolumeSpec = volumeToMount.VolumeSpec - - _, resizeErr := expandableVolumePlugin.NodeExpand(rsOpts) - if resizeErr != nil { - // if driver returned FailedPrecondition error that means - // volume expansion should not be retried on this node but - // expansion operation should not block mounting - if volumetypes.IsFailedPreconditionError(resizeErr) { - actualStateOfWorld.MarkForInUseExpansionError(volumeToMount.VolumeName) - klog.Errorf(volumeToMount.GenerateErrorDetailed("MountVolume.NodeExapndVolume failed", resizeErr).Error()) - return true, nil + pvcStatusCap := pvc.Status.Capacity[v1.ResourceStorage] + pvSpecCap := pv.Spec.Capacity[v1.ResourceStorage] + if pvcStatusCap.Cmp(pvSpecCap) < 0 { + // File system resize was requested, proceed + klog.V(4).InfoS(volumeToMount.GenerateMsgDetailed("MountVolume.NodeExpandVolume entering", fmt.Sprintf("DevicePath %q", volumeToMount.DevicePath)), "pod", klog.KObj(volumeToMount.Pod)) + + rsOpts.VolumeSpec = volumeToMount.VolumeSpec + rsOpts.NewSize = pvSpecCap + rsOpts.OldSize = pvcStatusCap + resizeDone, resizeErr := expandableVolumePlugin.NodeExpand(rsOpts) + if resizeErr != nil { + // if driver returned FailedPrecondition error that means + // volume expansion should not be retried on this node but + // expansion operation should not block mounting + if volumetypes.IsFailedPreconditionError(resizeErr) { + actualStateOfWorld.MarkForInUseExpansionError(volumeToMount.VolumeName) + klog.Errorf(volumeToMount.GenerateErrorDetailed("MountVolume.NodeExapndVolume failed with %v", resizeErr).Error()) + return true, nil + } + return false, resizeErr + } + // Volume resizing is not done but it did not error out. This could happen if a CSI volume + // does not have node stage_unstage capability but was asked to resize the volume before + // node publish. In which case - we must retry resizing after node publish. + if !resizeDone { + return false, nil + } + simpleMsg, detailedMsg := volumeToMount.GenerateMsg("MountVolume.NodeExpandVolume succeeded", "") + og.recorder.Eventf(volumeToMount.Pod, v1.EventTypeNormal, kevents.FileSystemResizeSuccess, simpleMsg) + og.recorder.Eventf(pvc, v1.EventTypeNormal, kevents.FileSystemResizeSuccess, simpleMsg) + klog.InfoS(detailedMsg, "pod", klog.KObj(volumeToMount.Pod)) + // File system resize succeeded, now update the PVC's Capacity to match the PV's + _, err = util.MarkFSResizeFinished(pvc, pvSpecCap, og.kubeClient) + if err != nil { + // On retry, NodeExpandVolume will be called again but do nothing + return false, fmt.Errorf("mountVolume.NodeExpandVolume update PVC status failed : %v", err) } - return false, resizeErr - } - - simpleMsg, detailedMsg := volumeToMount.GenerateMsg("MountVolume.NodeExpandVolume succeeded", nodeName) - og.recorder.Eventf(volumeToMount.Pod, v1.EventTypeNormal, kevents.FileSystemResizeSuccess, simpleMsg) - og.recorder.Eventf(pvc, v1.EventTypeNormal, kevents.FileSystemResizeSuccess, simpleMsg) - klog.InfoS(detailedMsg, "pod", klog.KObj(volumeToMount.Pod)) - - // if PVC already has new size, there is no need to update it. - if pvcStatusCap.Cmp(rsOpts.NewSize) >= 0 { return true, nil } + return true, nil +} - // File system resize succeeded, now update the PVC's Capacity to match the PV's - _, err = util.MarkFSResizeFinished(pvc, rsOpts.NewSize, og.kubeClient) - if err != nil { - // On retry, NodeExpandVolume will be called again but do nothing - return false, fmt.Errorf("mountVolume.NodeExpandVolume update PVC status failed : %v", err) +func permitNodeExpansion(pvc *v1.PersistentVolumeClaim, pv *v1.PersistentVolume) bool { + pvcStatusCap := pvc.Status.Capacity[v1.ResourceStorage] + pvSpecCap := pv.Spec.Capacity[v1.ResourceStorage] + // if pvc.Status.Cap is >= pv.Spec.Cap then volume is already expanded + if pvcStatusCap.Cmp(pvSpecCap) >= 0 { + return false + } + + resizeStatus := pvc.Status.ResizeStatus + // if resizestatus is nil or NodeExpansionInProgress or NodeExpansionPending then we should allow volume expansion on + // the node to proceed. We are making an exception for resizeStatus being nil because it will support use cases where + // resizeStatus may not be set (old control-plane expansion controller etc). + if resizeStatus == nil || *resizeStatus == v1.PersistentVolumeClaimNodeExpansionPending || *resizeStatus == v1.PersistentVolumeClaimNodeExpansionInProgress { + return true + } else { + klog.Infof("volume %s/%s can not be expanded because resizeStaus is: %s", pvc.Namespace, pvc.Name, *resizeStatus) + return false } - return true, nil } func checkMountOptionSupport(og *operationGenerator, volumeToMount VolumeToMount, plugin volume.VolumePlugin) error { @@ -2214,7 +2290,7 @@ func checkNodeAffinity(og *operationGenerator, volumeToMount VolumeToMount) erro if err != nil { return err } - err = storagehelpers.CheckNodeAffinity(pv, nodeLabels) + err = util.CheckNodeAffinity(pv, nodeLabels) if err != nil { return err } diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/subpath/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/subpath/OWNERS index 3514de0fc089..c8821ce73541 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/subpath/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/subpath/OWNERS @@ -10,3 +10,4 @@ approvers: - jingxu97 - saad-ali - jsafrane + diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/subpath/subpath_linux.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/subpath/subpath_linux.go index 4a505be3b3c6..7da8ca10a95e 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/subpath/subpath_linux.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/subpath/subpath_linux.go @@ -260,12 +260,7 @@ func doCleanSubPaths(mounter mount.Interface, podDir string, volumeName string) // scan /var/lib/kubelet/pods//volume-subpaths///* fullContainerDirPath := filepath.Join(subPathDir, containerDir.Name()) - // The original traversal method here was ReadDir, which was not so robust to handle some error such as "stale NFS file handle", - // so it was replaced with filepath.Walk in a later patch, which can pass through error and handled by the callback WalkFunc. - // After go 1.16, WalkDir was introduced, it's more effective than Walk because the callback WalkDirFunc is called before - // reading a directory, making it save some time when a container's subPath contains lots of dirs. - // See https://github.com/kubernetes/kubernetes/pull/71804 and https://github.com/kubernetes/kubernetes/issues/107667 for more details. - err = filepath.WalkDir(fullContainerDirPath, func(path string, info os.DirEntry, _ error) error { + err = filepath.Walk(fullContainerDirPath, func(path string, info os.FileInfo, _ error) error { if path == fullContainerDirPath { // Skip top level directory return nil diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/util.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/util.go index f772bd5869f6..702f136e0de7 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/util.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/util/util.go @@ -36,6 +36,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" clientset "k8s.io/client-go/kubernetes" + "k8s.io/component-helpers/scheduling/corev1" storagehelpers "k8s.io/component-helpers/storage/volume" "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/api/legacyscheme" @@ -163,6 +164,30 @@ func GetClassForVolume(kubeClient clientset.Interface, pv *v1.PersistentVolume) return class, nil } +// CheckNodeAffinity looks at the PV node affinity, and checks if the node has the same corresponding labels +// This ensures that we don't mount a volume that doesn't belong to this node +func CheckNodeAffinity(pv *v1.PersistentVolume, nodeLabels map[string]string) error { + return checkVolumeNodeAffinity(pv, &v1.Node{ObjectMeta: metav1.ObjectMeta{Labels: nodeLabels}}) +} + +func checkVolumeNodeAffinity(pv *v1.PersistentVolume, node *v1.Node) error { + if pv.Spec.NodeAffinity == nil { + return nil + } + + if pv.Spec.NodeAffinity.Required != nil { + terms := pv.Spec.NodeAffinity.Required + klog.V(10).Infof("Match for Required node selector terms %+v", terms) + if matches, err := corev1.MatchNodeSelectorTerms(node, terms); err != nil { + return err + } else if !matches { + return fmt.Errorf("no matching NodeSelectorTerms") + } + } + + return nil +} + // LoadPodFromFile will read, decode, and return a Pod from a file. func LoadPodFromFile(filePath string) (*v1.Pod, error) { if filePath == "" { diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/volume.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/volume.go index f46f7d4876a3..13d75a63381c 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/volume.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/volume.go @@ -115,9 +115,9 @@ type Metrics struct { // Attributes represents the attributes of this mounter. type Attributes struct { - ReadOnly bool - Managed bool - SELinuxRelabel bool + ReadOnly bool + Managed bool + SupportsSELinux bool } // MounterArgs provides more easily extensible arguments to Mounter @@ -136,6 +136,17 @@ type Mounter interface { // Uses Interface to provide the path for Docker binds. Volume + // CanMount is called immediately prior to Setup to check if + // the required components (binaries, etc.) are available on + // the underlying node to complete the subsequent SetUp (mount) + // operation. If CanMount returns error, the mount operation is + // aborted and an event is generated indicating that the node + // does not have the required binaries to complete the mount. + // If CanMount succeeds, the mount operation continues + // normally. The CanMount check can be enabled or disabled + // using the experimental-check-mount-binaries binary flag + CanMount() error + // SetUp prepares and mounts/unpacks the volume to a // self-determined directory path. The mount point and its // content should be owned by `fsUser` or 'fsGroup' so that it can be diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/volume_linux.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/volume_linux.go index 57c02815029a..c55eac77b337 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/volume_linux.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/volume_linux.go @@ -98,7 +98,7 @@ func changeFilePermission(filename string, fsGroup *int64, readonly bool, info o err = os.Chmod(filename, info.Mode()|mask) if err != nil { - klog.ErrorS(err, "chmod failed", "path", filename) + klog.ErrorS(err, "Chown failed", "path", filename) } return nil diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/OWNERS b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/OWNERS index 91e08a7eeba1..18bf03c6c07a 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/OWNERS @@ -1,19 +1,22 @@ # See the OWNERS docs at https://go.k8s.io/owners approvers: - - saad-ali - - thockin - - divyenpatel +- pmorie +- saad-ali +- thockin +- SandeepPissay +- divyenpatel +- BaluDontu emeritus_approvers: - - matchstick - - abrarshivani - - BaluDontu - - SandeepPissay - - pmorie +- matchstick +- abrarshivani reviewers: - - saad-ali - - justinsb - - jsafrane - - jingxu97 - - msau42 - - divyenpatel +- saad-ali +- justinsb +- jsafrane +- rootfs +- jingxu97 +- msau42 +- SandeepPissay +- divyenpatel +- BaluDontu diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/vsphere_volume.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/vsphere_volume.go index 0c6c37d66077..a8b644a727c7 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/vsphere_volume.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/pkg/volume/vsphere_volume/vsphere_volume.go @@ -208,8 +208,8 @@ type vsphereVolumeMounter struct { func (b *vsphereVolumeMounter) GetAttributes() volume.Attributes { return volume.Attributes{ - SELinuxRelabel: true, - Managed: true, + SupportsSELinux: true, + Managed: true, } } @@ -218,6 +218,13 @@ func (b *vsphereVolumeMounter) SetUp(mounterArgs volume.MounterArgs) error { return b.SetUpAt(b.GetPath(), mounterArgs) } +// Checks prior to mount operations to verify that the required components (binaries, etc.) +// to mount the volume are available on the underlying node. +// If not, it returns an error +func (b *vsphereVolumeMounter) CanMount() error { + return nil +} + // SetUp attaches the disk and bind mounts to the volume path. func (b *vsphereVolumeMounter) SetUpAt(dir string, mounterArgs volume.MounterArgs) error { klog.V(5).Infof("vSphere volume setup %s to %s", b.volPath, dir) diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/test/utils/admission_webhook.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/test/utils/admission_webhook.go index dbec166d2e73..57c72a9308b7 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/test/utils/admission_webhook.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/test/utils/admission_webhook.go @@ -21,7 +21,7 @@ import ( "crypto/x509" "encoding/json" "fmt" - "io" + "io/ioutil" "net/http" "net/http/httptest" "testing" @@ -55,7 +55,7 @@ func NewAdmissionWebhookServer(handler http.Handler) (string, func(), error) { func AdmissionWebhookHandler(t *testing.T, admit func(*v1beta1.AdmissionReview) error) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { defer r.Body.Close() - data, err := io.ReadAll(r.Body) + data, err := ioutil.ReadAll(r.Body) if err != nil { t.Error(err) return diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/test/utils/create_resources.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/test/utils/create_resources.go index 71a5e1ff79eb..fd8ff2feb984 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/test/utils/create_resources.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/test/utils/create_resources.go @@ -59,9 +59,6 @@ func CreatePodWithRetries(c clientset.Interface, namespace string, obj *v1.Pod) } createFunc := func() (bool, error) { _, err := c.CoreV1().Pods(namespace).Create(context.TODO(), obj, metav1.CreateOptions{}) - if isGenerateNameConflict(obj.ObjectMeta, err) { - return false, nil - } if err == nil || apierrors.IsAlreadyExists(err) { return true, nil } @@ -76,9 +73,6 @@ func CreateRCWithRetries(c clientset.Interface, namespace string, obj *v1.Replic } createFunc := func() (bool, error) { _, err := c.CoreV1().ReplicationControllers(namespace).Create(context.TODO(), obj, metav1.CreateOptions{}) - if isGenerateNameConflict(obj.ObjectMeta, err) { - return false, nil - } if err == nil || apierrors.IsAlreadyExists(err) { return true, nil } @@ -93,9 +87,6 @@ func CreateReplicaSetWithRetries(c clientset.Interface, namespace string, obj *a } createFunc := func() (bool, error) { _, err := c.AppsV1().ReplicaSets(namespace).Create(context.TODO(), obj, metav1.CreateOptions{}) - if isGenerateNameConflict(obj.ObjectMeta, err) { - return false, nil - } if err == nil || apierrors.IsAlreadyExists(err) { return true, nil } @@ -110,9 +101,6 @@ func CreateDeploymentWithRetries(c clientset.Interface, namespace string, obj *a } createFunc := func() (bool, error) { _, err := c.AppsV1().Deployments(namespace).Create(context.TODO(), obj, metav1.CreateOptions{}) - if isGenerateNameConflict(obj.ObjectMeta, err) { - return false, nil - } if err == nil || apierrors.IsAlreadyExists(err) { return true, nil } @@ -127,9 +115,6 @@ func CreateDaemonSetWithRetries(c clientset.Interface, namespace string, obj *ap } createFunc := func() (bool, error) { _, err := c.AppsV1().DaemonSets(namespace).Create(context.TODO(), obj, metav1.CreateOptions{}) - if isGenerateNameConflict(obj.ObjectMeta, err) { - return false, nil - } if err == nil || apierrors.IsAlreadyExists(err) { return true, nil } @@ -144,9 +129,6 @@ func CreateJobWithRetries(c clientset.Interface, namespace string, obj *batch.Jo } createFunc := func() (bool, error) { _, err := c.BatchV1().Jobs(namespace).Create(context.TODO(), obj, metav1.CreateOptions{}) - if isGenerateNameConflict(obj.ObjectMeta, err) { - return false, nil - } if err == nil || apierrors.IsAlreadyExists(err) { return true, nil } @@ -161,9 +143,6 @@ func CreateSecretWithRetries(c clientset.Interface, namespace string, obj *v1.Se } createFunc := func() (bool, error) { _, err := c.CoreV1().Secrets(namespace).Create(context.TODO(), obj, metav1.CreateOptions{}) - if isGenerateNameConflict(obj.ObjectMeta, err) { - return false, nil - } if err == nil || apierrors.IsAlreadyExists(err) { return true, nil } @@ -178,9 +157,6 @@ func CreateConfigMapWithRetries(c clientset.Interface, namespace string, obj *v1 } createFunc := func() (bool, error) { _, err := c.CoreV1().ConfigMaps(namespace).Create(context.TODO(), obj, metav1.CreateOptions{}) - if isGenerateNameConflict(obj.ObjectMeta, err) { - return false, nil - } if err == nil || apierrors.IsAlreadyExists(err) { return true, nil } @@ -195,9 +171,6 @@ func CreateServiceWithRetries(c clientset.Interface, namespace string, obj *v1.S } createFunc := func() (bool, error) { _, err := c.CoreV1().Services(namespace).Create(context.TODO(), obj, metav1.CreateOptions{}) - if isGenerateNameConflict(obj.ObjectMeta, err) { - return false, nil - } if err == nil || apierrors.IsAlreadyExists(err) { return true, nil } @@ -212,9 +185,6 @@ func CreateStorageClassWithRetries(c clientset.Interface, obj *storage.StorageCl } createFunc := func() (bool, error) { _, err := c.StorageV1().StorageClasses().Create(context.TODO(), obj, metav1.CreateOptions{}) - if isGenerateNameConflict(obj.ObjectMeta, err) { - return false, nil - } if err == nil || apierrors.IsAlreadyExists(err) { return true, nil } @@ -229,9 +199,6 @@ func CreateResourceQuotaWithRetries(c clientset.Interface, namespace string, obj } createFunc := func() (bool, error) { _, err := c.CoreV1().ResourceQuotas(namespace).Create(context.TODO(), obj, metav1.CreateOptions{}) - if isGenerateNameConflict(obj.ObjectMeta, err) { - return false, nil - } if err == nil || apierrors.IsAlreadyExists(err) { return true, nil } @@ -246,9 +213,6 @@ func CreatePersistentVolumeWithRetries(c clientset.Interface, obj *v1.Persistent } createFunc := func() (bool, error) { _, err := c.CoreV1().PersistentVolumes().Create(context.TODO(), obj, metav1.CreateOptions{}) - if isGenerateNameConflict(obj.ObjectMeta, err) { - return false, nil - } if err == nil || apierrors.IsAlreadyExists(err) { return true, nil } @@ -263,9 +227,6 @@ func CreatePersistentVolumeClaimWithRetries(c clientset.Interface, namespace str } createFunc := func() (bool, error) { _, err := c.CoreV1().PersistentVolumeClaims(namespace).Create(context.TODO(), obj, metav1.CreateOptions{}) - if isGenerateNameConflict(obj.ObjectMeta, err) { - return false, nil - } if err == nil || apierrors.IsAlreadyExists(err) { return true, nil } @@ -273,11 +234,3 @@ func CreatePersistentVolumeClaimWithRetries(c clientset.Interface, namespace str } return RetryWithExponentialBackOff(createFunc) } - -// isGenerateNameConflict returns whether the error is generateName conflict or not. -func isGenerateNameConflict(meta metav1.ObjectMeta, err error) bool { - if apierrors.IsAlreadyExists(err) && meta.Name == "" { - return true - } - return false -} diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/test/utils/runners.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/test/utils/runners.go index 05df7643255d..ee22eee1f506 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/test/utils/runners.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/test/utils/runners.go @@ -1319,7 +1319,7 @@ func MakePodSpec() v1.PodSpec { return v1.PodSpec{ Containers: []v1.Container{{ Name: "pause", - Image: "k8s.gcr.io/pause:3.7", + Image: "k8s.gcr.io/pause:3.6", Ports: []v1.ContainerPort{{ContainerPort: 80}}, Resources: v1.ResourceRequirements{ Limits: v1.ResourceList{ @@ -1741,7 +1741,7 @@ type DaemonConfig struct { func (config *DaemonConfig) Run() error { if config.Image == "" { - config.Image = "k8s.gcr.io/pause:3.7" + config.Image = "k8s.gcr.io/pause:3.6" } nameLabel := map[string]string{ "name": config.Name + "-daemon", diff --git a/cluster-autoscaler/vendor/k8s.io/kubernetes/test/utils/tmpdir.go b/cluster-autoscaler/vendor/k8s.io/kubernetes/test/utils/tmpdir.go index 0033e0bac1e0..3beaf80fab75 100644 --- a/cluster-autoscaler/vendor/k8s.io/kubernetes/test/utils/tmpdir.go +++ b/cluster-autoscaler/vendor/k8s.io/kubernetes/test/utils/tmpdir.go @@ -17,7 +17,7 @@ limitations under the License. package utils import ( - "os" + "io/ioutil" "k8s.io/klog/v2" ) @@ -26,7 +26,7 @@ func MakeTempDirOrDie(prefix string, baseDir string) string { if baseDir == "" { baseDir = "/tmp" } - tempDir, err := os.MkdirTemp(baseDir, prefix) + tempDir, err := ioutil.TempDir(baseDir, prefix) if err != nil { klog.Fatalf("Can't make a temp rootdir: %v", err) } diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/aws/OWNERS b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/aws/OWNERS index 346f06c8e32c..dc771f785495 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/aws/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/aws/OWNERS @@ -3,16 +3,18 @@ # Any kind/feature PRs must be approved by SIG Cloud Provider going forward. emeritus_approvers: - - justinsb - - gnufied - - jsafrane - - micahhausler - - m00nf1sh - - zmerlynn - - mcrute +- justinsb +- gnufied +- jsafrane +- micahhausler +- m00nf1sh +- zmerlynn +- mcrute reviewers: - - gnufied - - jsafrane - - justinsb - - nckturner - - m00nf1sh +- gnufied +- jsafrane +- justinsb +- chrislovecnm +- nckturner +- micahhausler +- m00nf1sh diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/aws/aws.go b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/aws/aws.go index 541f741cfd1d..3ca90c459aac 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/aws/aws.go +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/aws/aws.go @@ -960,13 +960,6 @@ func (s *awsSdkEC2) DescribeInstances(request *ec2.DescribeInstancesInput) ([]*e results := []*ec2.Instance{} var nextToken *string requestTime := time.Now() - - if request.MaxResults == nil && request.InstanceIds == nil { - // MaxResults must be set in order for pagination to work - // MaxResults cannot be set with InstanceIds - request.MaxResults = aws.Int64(1000) - } - for { response, err := s.ec2.DescribeInstances(request) if err != nil { diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/aws/aws_fakes.go b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/aws/aws_fakes.go index c970a6aaa02e..06fdc92493b4 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/aws/aws_fakes.go +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/aws/aws_fakes.go @@ -30,7 +30,6 @@ import ( "github.com/aws/aws-sdk-go/service/elb" "github.com/aws/aws-sdk-go/service/elbv2" "github.com/aws/aws-sdk-go/service/kms" - _ "github.com/stretchr/testify/mock" "k8s.io/klog/v2" ) diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/OWNERS b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/OWNERS index 7dcb401b48d8..fe30b135ebc8 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/OWNERS @@ -3,16 +3,18 @@ # Any kind/feature PRs must be approved by SIG Cloud Provider going forward. emeritus_approvers: - - andyzhangx - - brendandburns - - feiskyer - - karataliu - - khenidak - - nilo19 +- andyzhangx +- brendandburns +- feiskyer +- karataliu +- khenidak +- nilo19 reviewers: - - andyzhangx - - aramase - - feiskyer - - khenidak - - ritazh - - nilo19 +- andyzhangx +- aramase +- brendandburns +- feiskyer +- karataliu +- khenidak +- ritazh +- nilo19 diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure.go b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure.go index 9c5a108cca88..be61907bb611 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure.go +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure.go @@ -749,6 +749,10 @@ func (az *Cloud) SetInformers(informerFactory informers.SharedInformerFactory) { UpdateFunc: func(prev, obj interface{}) { prevNode := prev.(*v1.Node) newNode := obj.(*v1.Node) + if newNode.Labels[v1.LabelTopologyZone] == + prevNode.Labels[v1.LabelTopologyZone] { + return + } az.updateNodeCaches(prevNode, newNode) }, DeleteFunc: func(obj interface{}) { diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_loadbalancer.go b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_loadbalancer.go index f83131aee49a..a6a9f06ab0aa 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_loadbalancer.go +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_loadbalancer.go @@ -1700,10 +1700,6 @@ func (az *Cloud) reconcileLoadBalancerRule( loadDistribution = network.LoadDistributionSourceIP } - tcpReset := enableTCPReset - if port.Protocol != v1.ProtocolTCP { - tcpReset = nil - } expectedRule := network.LoadBalancingRule{ Name: &lbRuleName, LoadBalancingRulePropertiesFormat: &network.LoadBalancingRulePropertiesFormat{ @@ -1718,7 +1714,7 @@ func (az *Cloud) reconcileLoadBalancerRule( FrontendPort: to.Int32Ptr(port.Port), BackendPort: to.Int32Ptr(port.Port), DisableOutboundSnat: to.BoolPtr(az.disableLoadBalancerOutboundSNAT()), - EnableTCPReset: tcpReset, + EnableTCPReset: enableTCPReset, EnableFloatingIP: to.BoolPtr(true), }, } @@ -2413,21 +2409,14 @@ func equalLoadBalancingRulePropertiesFormat(s *network.LoadBalancingRuleProperti return false } - properties := reflect.DeepEqual(s.Protocol, t.Protocol) - if !properties { - return false - } - - if reflect.DeepEqual(s.Protocol, network.TransportProtocolTCP) { - properties = properties && reflect.DeepEqual(to.Bool(s.EnableTCPReset), to.Bool(t.EnableTCPReset)) - } - - properties = properties && reflect.DeepEqual(s.FrontendIPConfiguration, t.FrontendIPConfiguration) && + properties := reflect.DeepEqual(s.Protocol, t.Protocol) && + reflect.DeepEqual(s.FrontendIPConfiguration, t.FrontendIPConfiguration) && reflect.DeepEqual(s.BackendAddressPool, t.BackendAddressPool) && reflect.DeepEqual(s.LoadDistribution, t.LoadDistribution) && reflect.DeepEqual(s.FrontendPort, t.FrontendPort) && reflect.DeepEqual(s.BackendPort, t.BackendPort) && reflect.DeepEqual(s.EnableFloatingIP, t.EnableFloatingIP) && + reflect.DeepEqual(to.Bool(s.EnableTCPReset), to.Bool(t.EnableTCPReset)) && reflect.DeepEqual(to.Bool(s.DisableOutboundSnat), to.Bool(t.DisableOutboundSnat)) if wantLB && s.IdleTimeoutInMinutes != nil && t.IdleTimeoutInMinutes != nil { diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_managedDiskController.go b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_managedDiskController.go index e7eb3d59e655..000343f31cbf 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_managedDiskController.go +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_managedDiskController.go @@ -229,10 +229,6 @@ func (c *ManagedDiskController) DeleteManagedDisk(diskURI string) error { disk, rerr := c.common.cloud.DisksClient.Get(ctx, resourceGroup, diskName) if rerr != nil { - if rerr.HTTPStatusCode == http.StatusNotFound { - klog.V(2).Infof("azureDisk - disk(%s) is already deleted", diskURI) - return nil - } return rerr.Error() } diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_routes.go b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_routes.go index d15d2659bba7..a03083f8acaa 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_routes.go +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/azure_routes.go @@ -111,7 +111,6 @@ func (d *delayedRouteUpdater) updateRoutes() { // No need to do any updating. if len(d.routesToUpdate) == 0 { - klog.V(6).Info("updateRoutes: nothing to update, returning") return } @@ -218,8 +217,6 @@ func (d *delayedRouteUpdater) cleanupOutdatedRoutes(existingRoutes []network.Rou existingRouteName := to.String(existingRoutes[i].Name) split := strings.Split(existingRouteName, routeNameSeparator) - klog.V(4).Infof("cleanupOutdatedRoutes: checking route %s", existingRouteName) - // filter out unmanaged routes deleteRoute := false if d.az.nodeNames.Has(split[0]) { @@ -470,8 +467,9 @@ func (az *Cloud) DeleteRoute(ctx context.Context, clusterName string, kubeRoute return nil } + klog.V(2).Infof("DeleteRoute: deleting route. clusterName=%q instance=%q cidr=%q", clusterName, kubeRoute.TargetNode, kubeRoute.DestinationCIDR) + routeName := mapNodeNameToRouteName(az.ipv6DualStackEnabled, kubeRoute.TargetNode, string(kubeRoute.DestinationCIDR)) - klog.V(2).Infof("DeleteRoute: deleting route. clusterName=%q instance=%q cidr=%q routeName=%q", clusterName, kubeRoute.TargetNode, kubeRoute.DestinationCIDR, routeName) route := network.Route{ Name: to.StringPtr(routeName), RoutePropertiesFormat: &network.RoutePropertiesFormat{}, @@ -489,28 +487,6 @@ func (az *Cloud) DeleteRoute(ctx context.Context, clusterName string, kubeRoute return err } - // Remove outdated ipv4 routes as well - if az.ipv6DualStackEnabled { - routeNameWithoutIPV6Suffix := strings.Split(routeName, routeNameSeparator)[0] - klog.V(2).Infof("DeleteRoute: deleting route. clusterName=%q instance=%q cidr=%q routeName=%q", clusterName, kubeRoute.TargetNode, kubeRoute.DestinationCIDR, routeNameWithoutIPV6Suffix) - route := network.Route{ - Name: to.StringPtr(routeNameWithoutIPV6Suffix), - RoutePropertiesFormat: &network.RoutePropertiesFormat{}, - } - op, err := az.routeUpdater.addRouteOperation(routeOperationDelete, route) - if err != nil { - klog.Errorf("DeleteRoute failed for node %q with error: %v", kubeRoute.TargetNode, err) - return err - } - - // Wait for operation complete. - err = op.wait() - if err != nil { - klog.Errorf("DeleteRoute failed for node %q with error: %v", kubeRoute.TargetNode, err) - return err - } - } - klog.V(2).Infof("DeleteRoute: route deleted. clusterName=%q instance=%q cidr=%q", clusterName, kubeRoute.TargetNode, kubeRoute.DestinationCIDR) isOperationSucceeded = true diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/mockdiskclient/interface.go b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/mockdiskclient/interface.go index f95c230ca29b..84ad4648f133 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/mockdiskclient/interface.go +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/diskclient/mockdiskclient/interface.go @@ -25,37 +25,51 @@ package mockdiskclient import ( context "context" - reflect "reflect" - compute "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" gomock "github.com/golang/mock/gomock" retry "k8s.io/legacy-cloud-providers/azure/retry" + reflect "reflect" ) -// MockInterface is a mock of Interface interface. +// MockInterface is a mock of Interface interface type MockInterface struct { ctrl *gomock.Controller recorder *MockInterfaceMockRecorder } -// MockInterfaceMockRecorder is the mock recorder for MockInterface. +// MockInterfaceMockRecorder is the mock recorder for MockInterface type MockInterfaceMockRecorder struct { mock *MockInterface } -// NewMockInterface creates a new mock instance. +// NewMockInterface creates a new mock instance func NewMockInterface(ctrl *gomock.Controller) *MockInterface { mock := &MockInterface{ctrl: ctrl} mock.recorder = &MockInterfaceMockRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use. +// EXPECT returns an object that allows the caller to indicate expected use func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { return m.recorder } -// CreateOrUpdate mocks base method. +// Get mocks base method +func (m *MockInterface) Get(ctx context.Context, resourceGroupName, diskName string) (compute.Disk, *retry.Error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, diskName) + ret0, _ := ret[0].(compute.Disk) + ret1, _ := ret[1].(*retry.Error) + return ret0, ret1 +} + +// Get indicates an expected call of Get +func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, diskName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, diskName) +} + +// CreateOrUpdate mocks base method func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, diskName string, diskParameter compute.Disk) *retry.Error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, diskName, diskParameter) @@ -63,42 +77,41 @@ func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, d return ret0 } -// CreateOrUpdate indicates an expected call of CreateOrUpdate. +// CreateOrUpdate indicates an expected call of CreateOrUpdate func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, diskName, diskParameter interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, diskName, diskParameter) } -// Delete mocks base method. -func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, diskName string) *retry.Error { +// Update mocks base method +func (m *MockInterface) Update(ctx context.Context, resourceGroupName, diskName string, diskParameter compute.DiskUpdate) *retry.Error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, diskName) + ret := m.ctrl.Call(m, "Update", ctx, resourceGroupName, diskName, diskParameter) ret0, _ := ret[0].(*retry.Error) return ret0 } -// Delete indicates an expected call of Delete. -func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, diskName interface{}) *gomock.Call { +// Update indicates an expected call of Update +func (mr *MockInterfaceMockRecorder) Update(ctx, resourceGroupName, diskName, diskParameter interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, diskName) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockInterface)(nil).Update), ctx, resourceGroupName, diskName, diskParameter) } -// Get mocks base method. -func (m *MockInterface) Get(ctx context.Context, resourceGroupName, diskName string) (compute.Disk, *retry.Error) { +// Delete mocks base method +func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, diskName string) *retry.Error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, diskName) - ret0, _ := ret[0].(compute.Disk) - ret1, _ := ret[1].(*retry.Error) - return ret0, ret1 + ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, diskName) + ret0, _ := ret[0].(*retry.Error) + return ret0 } -// Get indicates an expected call of Get. -func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, diskName interface{}) *gomock.Call { +// Delete indicates an expected call of Delete +func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, diskName interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, diskName) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, diskName) } -// ListByResourceGroup mocks base method. +// ListByResourceGroup mocks base method func (m *MockInterface) ListByResourceGroup(ctx context.Context, resourceGroupName string) ([]compute.Disk, *retry.Error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ListByResourceGroup", ctx, resourceGroupName) @@ -107,22 +120,8 @@ func (m *MockInterface) ListByResourceGroup(ctx context.Context, resourceGroupNa return ret0, ret1 } -// ListByResourceGroup indicates an expected call of ListByResourceGroup. +// ListByResourceGroup indicates an expected call of ListByResourceGroup func (mr *MockInterfaceMockRecorder) ListByResourceGroup(ctx, resourceGroupName interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListByResourceGroup", reflect.TypeOf((*MockInterface)(nil).ListByResourceGroup), ctx, resourceGroupName) } - -// Update mocks base method. -func (m *MockInterface) Update(ctx context.Context, resourceGroupName, diskName string, diskParameter compute.DiskUpdate) *retry.Error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Update", ctx, resourceGroupName, diskName, diskParameter) - ret0, _ := ret[0].(*retry.Error) - return ret0 -} - -// Update indicates an expected call of Update. -func (mr *MockInterfaceMockRecorder) Update(ctx, resourceGroupName, diskName, diskParameter interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockInterface)(nil).Update), ctx, resourceGroupName, diskName, diskParameter) -} diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/mockinterfaceclient/interface.go b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/mockinterfaceclient/interface.go index 29a5a630778d..1da6ab97873e 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/mockinterfaceclient/interface.go +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/interfaceclient/mockinterfaceclient/interface.go @@ -25,65 +25,36 @@ package mockinterfaceclient import ( context "context" - reflect "reflect" - network "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" gomock "github.com/golang/mock/gomock" retry "k8s.io/legacy-cloud-providers/azure/retry" + reflect "reflect" ) -// MockInterface is a mock of Interface interface. +// MockInterface is a mock of Interface interface type MockInterface struct { ctrl *gomock.Controller recorder *MockInterfaceMockRecorder } -// MockInterfaceMockRecorder is the mock recorder for MockInterface. +// MockInterfaceMockRecorder is the mock recorder for MockInterface type MockInterfaceMockRecorder struct { mock *MockInterface } -// NewMockInterface creates a new mock instance. +// NewMockInterface creates a new mock instance func NewMockInterface(ctrl *gomock.Controller) *MockInterface { mock := &MockInterface{ctrl: ctrl} mock.recorder = &MockInterfaceMockRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use. +// EXPECT returns an object that allows the caller to indicate expected use func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { return m.recorder } -// CreateOrUpdate mocks base method. -func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, networkInterfaceName string, parameters network.Interface) *retry.Error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, networkInterfaceName, parameters) - ret0, _ := ret[0].(*retry.Error) - return ret0 -} - -// CreateOrUpdate indicates an expected call of CreateOrUpdate. -func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, networkInterfaceName, parameters interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, networkInterfaceName, parameters) -} - -// Delete mocks base method. -func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, networkInterfaceName string) *retry.Error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, networkInterfaceName) - ret0, _ := ret[0].(*retry.Error) - return ret0 -} - -// Delete indicates an expected call of Delete. -func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, networkInterfaceName interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, networkInterfaceName) -} - -// Get mocks base method. +// Get mocks base method func (m *MockInterface) Get(ctx context.Context, resourceGroupName, networkInterfaceName, expand string) (network.Interface, *retry.Error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, networkInterfaceName, expand) @@ -92,13 +63,13 @@ func (m *MockInterface) Get(ctx context.Context, resourceGroupName, networkInter return ret0, ret1 } -// Get indicates an expected call of Get. +// Get indicates an expected call of Get func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, networkInterfaceName, expand interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, networkInterfaceName, expand) } -// GetVirtualMachineScaleSetNetworkInterface mocks base method. +// GetVirtualMachineScaleSetNetworkInterface mocks base method func (m *MockInterface) GetVirtualMachineScaleSetNetworkInterface(ctx context.Context, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand string) (network.Interface, *retry.Error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetVirtualMachineScaleSetNetworkInterface", ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand) @@ -107,8 +78,36 @@ func (m *MockInterface) GetVirtualMachineScaleSetNetworkInterface(ctx context.Co return ret0, ret1 } -// GetVirtualMachineScaleSetNetworkInterface indicates an expected call of GetVirtualMachineScaleSetNetworkInterface. +// GetVirtualMachineScaleSetNetworkInterface indicates an expected call of GetVirtualMachineScaleSetNetworkInterface func (mr *MockInterfaceMockRecorder) GetVirtualMachineScaleSetNetworkInterface(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVirtualMachineScaleSetNetworkInterface", reflect.TypeOf((*MockInterface)(nil).GetVirtualMachineScaleSetNetworkInterface), ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand) } + +// CreateOrUpdate mocks base method +func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, networkInterfaceName string, parameters network.Interface) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, networkInterfaceName, parameters) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// CreateOrUpdate indicates an expected call of CreateOrUpdate +func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, networkInterfaceName, parameters interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, networkInterfaceName, parameters) +} + +// Delete mocks base method +func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, networkInterfaceName string) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, networkInterfaceName) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// Delete indicates an expected call of Delete +func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, networkInterfaceName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, networkInterfaceName) +} diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/mockloadbalancerclient/interface.go b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/mockloadbalancerclient/interface.go index 14aef415cad7..3e6711c519f8 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/mockloadbalancerclient/interface.go +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/loadbalancerclient/mockloadbalancerclient/interface.go @@ -25,65 +25,36 @@ package mockloadbalancerclient import ( context "context" - reflect "reflect" - network "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" gomock "github.com/golang/mock/gomock" retry "k8s.io/legacy-cloud-providers/azure/retry" + reflect "reflect" ) -// MockInterface is a mock of Interface interface. +// MockInterface is a mock of Interface interface type MockInterface struct { ctrl *gomock.Controller recorder *MockInterfaceMockRecorder } -// MockInterfaceMockRecorder is the mock recorder for MockInterface. +// MockInterfaceMockRecorder is the mock recorder for MockInterface type MockInterfaceMockRecorder struct { mock *MockInterface } -// NewMockInterface creates a new mock instance. +// NewMockInterface creates a new mock instance func NewMockInterface(ctrl *gomock.Controller) *MockInterface { mock := &MockInterface{ctrl: ctrl} mock.recorder = &MockInterfaceMockRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use. +// EXPECT returns an object that allows the caller to indicate expected use func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { return m.recorder } -// CreateOrUpdate mocks base method. -func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, loadBalancerName string, parameters network.LoadBalancer, etag string) *retry.Error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, loadBalancerName, parameters, etag) - ret0, _ := ret[0].(*retry.Error) - return ret0 -} - -// CreateOrUpdate indicates an expected call of CreateOrUpdate. -func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, loadBalancerName, parameters, etag interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, loadBalancerName, parameters, etag) -} - -// Delete mocks base method. -func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, loadBalancerName string) *retry.Error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, loadBalancerName) - ret0, _ := ret[0].(*retry.Error) - return ret0 -} - -// Delete indicates an expected call of Delete. -func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, loadBalancerName interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, loadBalancerName) -} - -// Get mocks base method. +// Get mocks base method func (m *MockInterface) Get(ctx context.Context, resourceGroupName, loadBalancerName, expand string) (network.LoadBalancer, *retry.Error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, loadBalancerName, expand) @@ -92,13 +63,13 @@ func (m *MockInterface) Get(ctx context.Context, resourceGroupName, loadBalancer return ret0, ret1 } -// Get indicates an expected call of Get. +// Get indicates an expected call of Get func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, loadBalancerName, expand interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, loadBalancerName, expand) } -// List mocks base method. +// List mocks base method func (m *MockInterface) List(ctx context.Context, resourceGroupName string) ([]network.LoadBalancer, *retry.Error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "List", ctx, resourceGroupName) @@ -107,8 +78,36 @@ func (m *MockInterface) List(ctx context.Context, resourceGroupName string) ([]n return ret0, ret1 } -// List indicates an expected call of List. +// List indicates an expected call of List func (mr *MockInterfaceMockRecorder) List(ctx, resourceGroupName interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), ctx, resourceGroupName) } + +// CreateOrUpdate mocks base method +func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, loadBalancerName string, parameters network.LoadBalancer, etag string) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, loadBalancerName, parameters, etag) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// CreateOrUpdate indicates an expected call of CreateOrUpdate +func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, loadBalancerName, parameters, etag interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, loadBalancerName, parameters, etag) +} + +// Delete mocks base method +func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, loadBalancerName string) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, loadBalancerName) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// Delete indicates an expected call of Delete +func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, loadBalancerName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, loadBalancerName) +} diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/mockpublicipclient/interface.go b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/mockpublicipclient/interface.go index dc0597ff8761..b1974288ceae 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/mockpublicipclient/interface.go +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/publicipclient/mockpublicipclient/interface.go @@ -25,65 +25,36 @@ package mockpublicipclient import ( context "context" - reflect "reflect" - network "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" gomock "github.com/golang/mock/gomock" retry "k8s.io/legacy-cloud-providers/azure/retry" + reflect "reflect" ) -// MockInterface is a mock of Interface interface. +// MockInterface is a mock of Interface interface type MockInterface struct { ctrl *gomock.Controller recorder *MockInterfaceMockRecorder } -// MockInterfaceMockRecorder is the mock recorder for MockInterface. +// MockInterfaceMockRecorder is the mock recorder for MockInterface type MockInterfaceMockRecorder struct { mock *MockInterface } -// NewMockInterface creates a new mock instance. +// NewMockInterface creates a new mock instance func NewMockInterface(ctrl *gomock.Controller) *MockInterface { mock := &MockInterface{ctrl: ctrl} mock.recorder = &MockInterfaceMockRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use. +// EXPECT returns an object that allows the caller to indicate expected use func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { return m.recorder } -// CreateOrUpdate mocks base method. -func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, publicIPAddressName string, parameters network.PublicIPAddress) *retry.Error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, publicIPAddressName, parameters) - ret0, _ := ret[0].(*retry.Error) - return ret0 -} - -// CreateOrUpdate indicates an expected call of CreateOrUpdate. -func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, publicIPAddressName, parameters interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, publicIPAddressName, parameters) -} - -// Delete mocks base method. -func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, publicIPAddressName string) *retry.Error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, publicIPAddressName) - ret0, _ := ret[0].(*retry.Error) - return ret0 -} - -// Delete indicates an expected call of Delete. -func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, publicIPAddressName interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, publicIPAddressName) -} - -// Get mocks base method. +// Get mocks base method func (m *MockInterface) Get(ctx context.Context, resourceGroupName, publicIPAddressName, expand string) (network.PublicIPAddress, *retry.Error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, publicIPAddressName, expand) @@ -92,13 +63,13 @@ func (m *MockInterface) Get(ctx context.Context, resourceGroupName, publicIPAddr return ret0, ret1 } -// Get indicates an expected call of Get. +// Get indicates an expected call of Get func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, publicIPAddressName, expand interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, publicIPAddressName, expand) } -// GetVirtualMachineScaleSetPublicIPAddress mocks base method. +// GetVirtualMachineScaleSetPublicIPAddress mocks base method func (m *MockInterface) GetVirtualMachineScaleSetPublicIPAddress(ctx context.Context, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName, publicIPAddressName, expand string) (network.PublicIPAddress, *retry.Error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetVirtualMachineScaleSetPublicIPAddress", ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName, publicIPAddressName, expand) @@ -107,13 +78,13 @@ func (m *MockInterface) GetVirtualMachineScaleSetPublicIPAddress(ctx context.Con return ret0, ret1 } -// GetVirtualMachineScaleSetPublicIPAddress indicates an expected call of GetVirtualMachineScaleSetPublicIPAddress. +// GetVirtualMachineScaleSetPublicIPAddress indicates an expected call of GetVirtualMachineScaleSetPublicIPAddress func (mr *MockInterfaceMockRecorder) GetVirtualMachineScaleSetPublicIPAddress(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName, publicIPAddressName, expand interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVirtualMachineScaleSetPublicIPAddress", reflect.TypeOf((*MockInterface)(nil).GetVirtualMachineScaleSetPublicIPAddress), ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName, publicIPAddressName, expand) } -// List mocks base method. +// List mocks base method func (m *MockInterface) List(ctx context.Context, resourceGroupName string) ([]network.PublicIPAddress, *retry.Error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "List", ctx, resourceGroupName) @@ -122,8 +93,36 @@ func (m *MockInterface) List(ctx context.Context, resourceGroupName string) ([]n return ret0, ret1 } -// List indicates an expected call of List. +// List indicates an expected call of List func (mr *MockInterfaceMockRecorder) List(ctx, resourceGroupName interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), ctx, resourceGroupName) } + +// CreateOrUpdate mocks base method +func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, publicIPAddressName string, parameters network.PublicIPAddress) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, publicIPAddressName, parameters) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// CreateOrUpdate indicates an expected call of CreateOrUpdate +func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, publicIPAddressName, parameters interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, publicIPAddressName, parameters) +} + +// Delete mocks base method +func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, publicIPAddressName string) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, publicIPAddressName) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// Delete indicates an expected call of Delete +func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, publicIPAddressName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, publicIPAddressName) +} diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/routeclient/mockrouteclient/interface.go b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/routeclient/mockrouteclient/interface.go index 9344226c7bae..5c470fd24f44 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/routeclient/mockrouteclient/interface.go +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/routeclient/mockrouteclient/interface.go @@ -25,37 +25,36 @@ package mockrouteclient import ( context "context" - reflect "reflect" - network "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" gomock "github.com/golang/mock/gomock" retry "k8s.io/legacy-cloud-providers/azure/retry" + reflect "reflect" ) -// MockInterface is a mock of Interface interface. +// MockInterface is a mock of Interface interface type MockInterface struct { ctrl *gomock.Controller recorder *MockInterfaceMockRecorder } -// MockInterfaceMockRecorder is the mock recorder for MockInterface. +// MockInterfaceMockRecorder is the mock recorder for MockInterface type MockInterfaceMockRecorder struct { mock *MockInterface } -// NewMockInterface creates a new mock instance. +// NewMockInterface creates a new mock instance func NewMockInterface(ctrl *gomock.Controller) *MockInterface { mock := &MockInterface{ctrl: ctrl} mock.recorder = &MockInterfaceMockRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use. +// EXPECT returns an object that allows the caller to indicate expected use func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { return m.recorder } -// CreateOrUpdate mocks base method. +// CreateOrUpdate mocks base method func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, routeTableName, routeName string, routeParameters network.Route, etag string) *retry.Error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, routeTableName, routeName, routeParameters, etag) @@ -63,13 +62,13 @@ func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, r return ret0 } -// CreateOrUpdate indicates an expected call of CreateOrUpdate. +// CreateOrUpdate indicates an expected call of CreateOrUpdate func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, routeTableName, routeName, routeParameters, etag interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, routeTableName, routeName, routeParameters, etag) } -// Delete mocks base method. +// Delete mocks base method func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, routeTableName, routeName string) *retry.Error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, routeTableName, routeName) @@ -77,7 +76,7 @@ func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, routeTabl return ret0 } -// Delete indicates an expected call of Delete. +// Delete indicates an expected call of Delete func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, routeTableName, routeName interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, routeTableName, routeName) diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/routetableclient/mockroutetableclient/interface.go b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/routetableclient/mockroutetableclient/interface.go index 7fa2a8e51350..f987d9e7f7ed 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/routetableclient/mockroutetableclient/interface.go +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/routetableclient/mockroutetableclient/interface.go @@ -25,51 +25,36 @@ package mockroutetableclient import ( context "context" - reflect "reflect" - network "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" gomock "github.com/golang/mock/gomock" retry "k8s.io/legacy-cloud-providers/azure/retry" + reflect "reflect" ) -// MockInterface is a mock of Interface interface. +// MockInterface is a mock of Interface interface type MockInterface struct { ctrl *gomock.Controller recorder *MockInterfaceMockRecorder } -// MockInterfaceMockRecorder is the mock recorder for MockInterface. +// MockInterfaceMockRecorder is the mock recorder for MockInterface type MockInterfaceMockRecorder struct { mock *MockInterface } -// NewMockInterface creates a new mock instance. +// NewMockInterface creates a new mock instance func NewMockInterface(ctrl *gomock.Controller) *MockInterface { mock := &MockInterface{ctrl: ctrl} mock.recorder = &MockInterfaceMockRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use. +// EXPECT returns an object that allows the caller to indicate expected use func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { return m.recorder } -// CreateOrUpdate mocks base method. -func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, routeTableName string, parameters network.RouteTable, etag string) *retry.Error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, routeTableName, parameters, etag) - ret0, _ := ret[0].(*retry.Error) - return ret0 -} - -// CreateOrUpdate indicates an expected call of CreateOrUpdate. -func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, routeTableName, parameters, etag interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, routeTableName, parameters, etag) -} - -// Get mocks base method. +// Get mocks base method func (m *MockInterface) Get(ctx context.Context, resourceGroupName, routeTableName, expand string) (network.RouteTable, *retry.Error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, routeTableName, expand) @@ -78,8 +63,22 @@ func (m *MockInterface) Get(ctx context.Context, resourceGroupName, routeTableNa return ret0, ret1 } -// Get indicates an expected call of Get. +// Get indicates an expected call of Get func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, routeTableName, expand interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, routeTableName, expand) } + +// CreateOrUpdate mocks base method +func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, routeTableName string, parameters network.RouteTable, etag string) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, routeTableName, parameters, etag) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// CreateOrUpdate indicates an expected call of CreateOrUpdate +func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, routeTableName, parameters, etag interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, routeTableName, parameters, etag) +} diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/mocksecuritygroupclient/interface.go b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/mocksecuritygroupclient/interface.go index 152585e9c925..d943555c8dfd 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/mocksecuritygroupclient/interface.go +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/securitygroupclient/mocksecuritygroupclient/interface.go @@ -25,65 +25,36 @@ package mocksecuritygroupclient import ( context "context" - reflect "reflect" - network "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" gomock "github.com/golang/mock/gomock" retry "k8s.io/legacy-cloud-providers/azure/retry" + reflect "reflect" ) -// MockInterface is a mock of Interface interface. +// MockInterface is a mock of Interface interface type MockInterface struct { ctrl *gomock.Controller recorder *MockInterfaceMockRecorder } -// MockInterfaceMockRecorder is the mock recorder for MockInterface. +// MockInterfaceMockRecorder is the mock recorder for MockInterface type MockInterfaceMockRecorder struct { mock *MockInterface } -// NewMockInterface creates a new mock instance. +// NewMockInterface creates a new mock instance func NewMockInterface(ctrl *gomock.Controller) *MockInterface { mock := &MockInterface{ctrl: ctrl} mock.recorder = &MockInterfaceMockRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use. +// EXPECT returns an object that allows the caller to indicate expected use func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { return m.recorder } -// CreateOrUpdate mocks base method. -func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, networkSecurityGroupName string, parameters network.SecurityGroup, etag string) *retry.Error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, networkSecurityGroupName, parameters, etag) - ret0, _ := ret[0].(*retry.Error) - return ret0 -} - -// CreateOrUpdate indicates an expected call of CreateOrUpdate. -func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, networkSecurityGroupName, parameters, etag interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, networkSecurityGroupName, parameters, etag) -} - -// Delete mocks base method. -func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, networkSecurityGroupName string) *retry.Error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, networkSecurityGroupName) - ret0, _ := ret[0].(*retry.Error) - return ret0 -} - -// Delete indicates an expected call of Delete. -func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, networkSecurityGroupName interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, networkSecurityGroupName) -} - -// Get mocks base method. +// Get mocks base method func (m *MockInterface) Get(ctx context.Context, resourceGroupName, networkSecurityGroupName, expand string) (network.SecurityGroup, *retry.Error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, networkSecurityGroupName, expand) @@ -92,13 +63,13 @@ func (m *MockInterface) Get(ctx context.Context, resourceGroupName, networkSecur return ret0, ret1 } -// Get indicates an expected call of Get. +// Get indicates an expected call of Get func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, networkSecurityGroupName, expand interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, networkSecurityGroupName, expand) } -// List mocks base method. +// List mocks base method func (m *MockInterface) List(ctx context.Context, resourceGroupName string) ([]network.SecurityGroup, *retry.Error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "List", ctx, resourceGroupName) @@ -107,8 +78,36 @@ func (m *MockInterface) List(ctx context.Context, resourceGroupName string) ([]n return ret0, ret1 } -// List indicates an expected call of List. +// List indicates an expected call of List func (mr *MockInterfaceMockRecorder) List(ctx, resourceGroupName interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), ctx, resourceGroupName) } + +// CreateOrUpdate mocks base method +func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, networkSecurityGroupName string, parameters network.SecurityGroup, etag string) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, networkSecurityGroupName, parameters, etag) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// CreateOrUpdate indicates an expected call of CreateOrUpdate +func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, networkSecurityGroupName, parameters, etag interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, networkSecurityGroupName, parameters, etag) +} + +// Delete mocks base method +func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, networkSecurityGroupName string) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, networkSecurityGroupName) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// Delete indicates an expected call of Delete +func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, networkSecurityGroupName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, networkSecurityGroupName) +} diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/subnetclient/mocksubnetclient/interface.go b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/subnetclient/mocksubnetclient/interface.go index d23b6f1ad88b..8c0a4e2ebc15 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/subnetclient/mocksubnetclient/interface.go +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/subnetclient/mocksubnetclient/interface.go @@ -25,65 +25,36 @@ package mocksubnetclient import ( context "context" - reflect "reflect" - network "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network" gomock "github.com/golang/mock/gomock" retry "k8s.io/legacy-cloud-providers/azure/retry" + reflect "reflect" ) -// MockInterface is a mock of Interface interface. +// MockInterface is a mock of Interface interface type MockInterface struct { ctrl *gomock.Controller recorder *MockInterfaceMockRecorder } -// MockInterfaceMockRecorder is the mock recorder for MockInterface. +// MockInterfaceMockRecorder is the mock recorder for MockInterface type MockInterfaceMockRecorder struct { mock *MockInterface } -// NewMockInterface creates a new mock instance. +// NewMockInterface creates a new mock instance func NewMockInterface(ctrl *gomock.Controller) *MockInterface { mock := &MockInterface{ctrl: ctrl} mock.recorder = &MockInterfaceMockRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use. +// EXPECT returns an object that allows the caller to indicate expected use func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { return m.recorder } -// CreateOrUpdate mocks base method. -func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, virtualNetworkName, subnetName string, subnetParameters network.Subnet) *retry.Error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, virtualNetworkName, subnetName, subnetParameters) - ret0, _ := ret[0].(*retry.Error) - return ret0 -} - -// CreateOrUpdate indicates an expected call of CreateOrUpdate. -func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, virtualNetworkName, subnetName, subnetParameters interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, virtualNetworkName, subnetName, subnetParameters) -} - -// Delete mocks base method. -func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, virtualNetworkName, subnetName string) *retry.Error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, virtualNetworkName, subnetName) - ret0, _ := ret[0].(*retry.Error) - return ret0 -} - -// Delete indicates an expected call of Delete. -func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, virtualNetworkName, subnetName interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, virtualNetworkName, subnetName) -} - -// Get mocks base method. +// Get mocks base method func (m *MockInterface) Get(ctx context.Context, resourceGroupName, virtualNetworkName, subnetName, expand string) (network.Subnet, *retry.Error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, virtualNetworkName, subnetName, expand) @@ -92,13 +63,13 @@ func (m *MockInterface) Get(ctx context.Context, resourceGroupName, virtualNetwo return ret0, ret1 } -// Get indicates an expected call of Get. +// Get indicates an expected call of Get func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, virtualNetworkName, subnetName, expand interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, virtualNetworkName, subnetName, expand) } -// List mocks base method. +// List mocks base method func (m *MockInterface) List(ctx context.Context, resourceGroupName, virtualNetworkName string) ([]network.Subnet, *retry.Error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "List", ctx, resourceGroupName, virtualNetworkName) @@ -107,8 +78,36 @@ func (m *MockInterface) List(ctx context.Context, resourceGroupName, virtualNetw return ret0, ret1 } -// List indicates an expected call of List. +// List indicates an expected call of List func (mr *MockInterfaceMockRecorder) List(ctx, resourceGroupName, virtualNetworkName interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), ctx, resourceGroupName, virtualNetworkName) } + +// CreateOrUpdate mocks base method +func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, virtualNetworkName, subnetName string, subnetParameters network.Subnet) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, virtualNetworkName, subnetName, subnetParameters) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// CreateOrUpdate indicates an expected call of CreateOrUpdate +func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, virtualNetworkName, subnetName, subnetParameters interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, virtualNetworkName, subnetName, subnetParameters) +} + +// Delete mocks base method +func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, virtualNetworkName, subnetName string) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, virtualNetworkName, subnetName) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// Delete indicates an expected call of Delete +func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, virtualNetworkName, subnetName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, virtualNetworkName, subnetName) +} diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/mockvmclient/interface.go b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/mockvmclient/interface.go index 4b6da919d175..8e353a30cb85 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/mockvmclient/interface.go +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmclient/mockvmclient/interface.go @@ -25,65 +25,36 @@ package mockvmclient import ( context "context" - reflect "reflect" - compute "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" gomock "github.com/golang/mock/gomock" retry "k8s.io/legacy-cloud-providers/azure/retry" + reflect "reflect" ) -// MockInterface is a mock of Interface interface. +// MockInterface is a mock of Interface interface type MockInterface struct { ctrl *gomock.Controller recorder *MockInterfaceMockRecorder } -// MockInterfaceMockRecorder is the mock recorder for MockInterface. +// MockInterfaceMockRecorder is the mock recorder for MockInterface type MockInterfaceMockRecorder struct { mock *MockInterface } -// NewMockInterface creates a new mock instance. +// NewMockInterface creates a new mock instance func NewMockInterface(ctrl *gomock.Controller) *MockInterface { mock := &MockInterface{ctrl: ctrl} mock.recorder = &MockInterfaceMockRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use. +// EXPECT returns an object that allows the caller to indicate expected use func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { return m.recorder } -// CreateOrUpdate mocks base method. -func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, VMName string, parameters compute.VirtualMachine, source string) *retry.Error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, VMName, parameters, source) - ret0, _ := ret[0].(*retry.Error) - return ret0 -} - -// CreateOrUpdate indicates an expected call of CreateOrUpdate. -func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, VMName, parameters, source interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, VMName, parameters, source) -} - -// Delete mocks base method. -func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, VMName string) *retry.Error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, VMName) - ret0, _ := ret[0].(*retry.Error) - return ret0 -} - -// Delete indicates an expected call of Delete. -func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, VMName interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, VMName) -} - -// Get mocks base method. +// Get mocks base method func (m *MockInterface) Get(ctx context.Context, resourceGroupName, VMName string, expand compute.InstanceViewTypes) (compute.VirtualMachine, *retry.Error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, VMName, expand) @@ -92,13 +63,13 @@ func (m *MockInterface) Get(ctx context.Context, resourceGroupName, VMName strin return ret0, ret1 } -// Get indicates an expected call of Get. +// Get indicates an expected call of Get func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, VMName, expand interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, VMName, expand) } -// List mocks base method. +// List mocks base method func (m *MockInterface) List(ctx context.Context, resourceGroupName string) ([]compute.VirtualMachine, *retry.Error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "List", ctx, resourceGroupName) @@ -107,13 +78,27 @@ func (m *MockInterface) List(ctx context.Context, resourceGroupName string) ([]c return ret0, ret1 } -// List indicates an expected call of List. +// List indicates an expected call of List func (mr *MockInterfaceMockRecorder) List(ctx, resourceGroupName interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), ctx, resourceGroupName) } -// Update mocks base method. +// CreateOrUpdate mocks base method +func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, VMName string, parameters compute.VirtualMachine, source string) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, VMName, parameters, source) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// CreateOrUpdate indicates an expected call of CreateOrUpdate +func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, VMName, parameters, source interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, VMName, parameters, source) +} + +// Update mocks base method func (m *MockInterface) Update(ctx context.Context, resourceGroupName, VMName string, parameters compute.VirtualMachineUpdate, source string) *retry.Error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Update", ctx, resourceGroupName, VMName, parameters, source) @@ -121,8 +106,22 @@ func (m *MockInterface) Update(ctx context.Context, resourceGroupName, VMName st return ret0 } -// Update indicates an expected call of Update. +// Update indicates an expected call of Update func (mr *MockInterfaceMockRecorder) Update(ctx, resourceGroupName, VMName, parameters, source interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockInterface)(nil).Update), ctx, resourceGroupName, VMName, parameters, source) } + +// Delete mocks base method +func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, VMName string) *retry.Error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, VMName) + ret0, _ := ret[0].(*retry.Error) + return ret0 +} + +// Delete indicates an expected call of Delete +func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, VMName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, VMName) +} diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/mockvmssclient/interface.go b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/mockvmssclient/interface.go index efba8f9de946..ba843cea9333 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/mockvmssclient/interface.go +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssclient/mockvmssclient/interface.go @@ -25,39 +25,68 @@ package mockvmssclient import ( context "context" - http "net/http" - reflect "reflect" - compute "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" azure "github.com/Azure/go-autorest/autorest/azure" gomock "github.com/golang/mock/gomock" retry "k8s.io/legacy-cloud-providers/azure/retry" + http "net/http" + reflect "reflect" ) -// MockInterface is a mock of Interface interface. +// MockInterface is a mock of Interface interface type MockInterface struct { ctrl *gomock.Controller recorder *MockInterfaceMockRecorder } -// MockInterfaceMockRecorder is the mock recorder for MockInterface. +// MockInterfaceMockRecorder is the mock recorder for MockInterface type MockInterfaceMockRecorder struct { mock *MockInterface } -// NewMockInterface creates a new mock instance. +// NewMockInterface creates a new mock instance func NewMockInterface(ctrl *gomock.Controller) *MockInterface { mock := &MockInterface{ctrl: ctrl} mock.recorder = &MockInterfaceMockRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use. +// EXPECT returns an object that allows the caller to indicate expected use func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { return m.recorder } -// CreateOrUpdate mocks base method. +// Get mocks base method +func (m *MockInterface) Get(ctx context.Context, resourceGroupName, VMScaleSetName string) (compute.VirtualMachineScaleSet, *retry.Error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, VMScaleSetName) + ret0, _ := ret[0].(compute.VirtualMachineScaleSet) + ret1, _ := ret[1].(*retry.Error) + return ret0, ret1 +} + +// Get indicates an expected call of Get +func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, VMScaleSetName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, VMScaleSetName) +} + +// List mocks base method +func (m *MockInterface) List(ctx context.Context, resourceGroupName string) ([]compute.VirtualMachineScaleSet, *retry.Error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "List", ctx, resourceGroupName) + ret0, _ := ret[0].([]compute.VirtualMachineScaleSet) + ret1, _ := ret[1].(*retry.Error) + return ret0, ret1 +} + +// List indicates an expected call of List +func (mr *MockInterfaceMockRecorder) List(ctx, resourceGroupName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), ctx, resourceGroupName) +} + +// CreateOrUpdate mocks base method func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, VMScaleSetName string, parameters compute.VirtualMachineScaleSet) *retry.Error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, VMScaleSetName, parameters) @@ -65,13 +94,13 @@ func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, V return ret0 } -// CreateOrUpdate indicates an expected call of CreateOrUpdate. +// CreateOrUpdate indicates an expected call of CreateOrUpdate func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, VMScaleSetName, parameters interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, VMScaleSetName, parameters) } -// CreateOrUpdateAsync mocks base method. +// CreateOrUpdateAsync mocks base method func (m *MockInterface) CreateOrUpdateAsync(ctx context.Context, resourceGroupName, VMScaleSetName string, parameters compute.VirtualMachineScaleSet) (*azure.Future, *retry.Error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "CreateOrUpdateAsync", ctx, resourceGroupName, VMScaleSetName, parameters) @@ -80,28 +109,28 @@ func (m *MockInterface) CreateOrUpdateAsync(ctx context.Context, resourceGroupNa return ret0, ret1 } -// CreateOrUpdateAsync indicates an expected call of CreateOrUpdateAsync. +// CreateOrUpdateAsync indicates an expected call of CreateOrUpdateAsync func (mr *MockInterfaceMockRecorder) CreateOrUpdateAsync(ctx, resourceGroupName, VMScaleSetName, parameters interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdateAsync", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdateAsync), ctx, resourceGroupName, VMScaleSetName, parameters) } -// DeallocateInstancesAsync mocks base method. -func (m *MockInterface) DeallocateInstancesAsync(ctx context.Context, resourceGroupName, vmScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs) (*azure.Future, *retry.Error) { +// WaitForAsyncOperationResult mocks base method +func (m *MockInterface) WaitForAsyncOperationResult(ctx context.Context, future *azure.Future) (*http.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeallocateInstancesAsync", ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs) - ret0, _ := ret[0].(*azure.Future) - ret1, _ := ret[1].(*retry.Error) + ret := m.ctrl.Call(m, "WaitForAsyncOperationResult", ctx, future) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) return ret0, ret1 } -// DeallocateInstancesAsync indicates an expected call of DeallocateInstancesAsync. -func (mr *MockInterfaceMockRecorder) DeallocateInstancesAsync(ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs interface{}) *gomock.Call { +// WaitForAsyncOperationResult indicates an expected call of WaitForAsyncOperationResult +func (mr *MockInterfaceMockRecorder) WaitForAsyncOperationResult(ctx, future interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeallocateInstancesAsync", reflect.TypeOf((*MockInterface)(nil).DeallocateInstancesAsync), ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForAsyncOperationResult", reflect.TypeOf((*MockInterface)(nil).WaitForAsyncOperationResult), ctx, future) } -// DeleteInstances mocks base method. +// DeleteInstances mocks base method func (m *MockInterface) DeleteInstances(ctx context.Context, resourceGroupName, vmScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs) *retry.Error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "DeleteInstances", ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs) @@ -109,13 +138,13 @@ func (m *MockInterface) DeleteInstances(ctx context.Context, resourceGroupName, return ret0 } -// DeleteInstances indicates an expected call of DeleteInstances. +// DeleteInstances indicates an expected call of DeleteInstances func (mr *MockInterfaceMockRecorder) DeleteInstances(ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInstances", reflect.TypeOf((*MockInterface)(nil).DeleteInstances), ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs) } -// DeleteInstancesAsync mocks base method. +// DeleteInstancesAsync mocks base method func (m *MockInterface) DeleteInstancesAsync(ctx context.Context, resourceGroupName, vmScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs) (*azure.Future, *retry.Error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "DeleteInstancesAsync", ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs) @@ -124,88 +153,58 @@ func (m *MockInterface) DeleteInstancesAsync(ctx context.Context, resourceGroupN return ret0, ret1 } -// DeleteInstancesAsync indicates an expected call of DeleteInstancesAsync. +// DeleteInstancesAsync indicates an expected call of DeleteInstancesAsync func (mr *MockInterfaceMockRecorder) DeleteInstancesAsync(ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInstancesAsync", reflect.TypeOf((*MockInterface)(nil).DeleteInstancesAsync), ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs) } -// Get mocks base method. -func (m *MockInterface) Get(ctx context.Context, resourceGroupName, VMScaleSetName string) (compute.VirtualMachineScaleSet, *retry.Error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, VMScaleSetName) - ret0, _ := ret[0].(compute.VirtualMachineScaleSet) - ret1, _ := ret[1].(*retry.Error) - return ret0, ret1 -} - -// Get indicates an expected call of Get. -func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, VMScaleSetName interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, VMScaleSetName) -} - -// List mocks base method. -func (m *MockInterface) List(ctx context.Context, resourceGroupName string) ([]compute.VirtualMachineScaleSet, *retry.Error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "List", ctx, resourceGroupName) - ret0, _ := ret[0].([]compute.VirtualMachineScaleSet) - ret1, _ := ret[1].(*retry.Error) - return ret0, ret1 -} - -// List indicates an expected call of List. -func (mr *MockInterfaceMockRecorder) List(ctx, resourceGroupName interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), ctx, resourceGroupName) -} - -// StartInstancesAsync mocks base method. -func (m *MockInterface) StartInstancesAsync(ctx context.Context, resourceGroupName, vmScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs) (*azure.Future, *retry.Error) { +// WaitForCreateOrUpdateResult mocks base method +func (m *MockInterface) WaitForCreateOrUpdateResult(ctx context.Context, future *azure.Future, resourceGroupName string) (*http.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "StartInstancesAsync", ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs) - ret0, _ := ret[0].(*azure.Future) - ret1, _ := ret[1].(*retry.Error) + ret := m.ctrl.Call(m, "WaitForCreateOrUpdateResult", ctx, future, resourceGroupName) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) return ret0, ret1 } -// StartInstancesAsync indicates an expected call of StartInstancesAsync. -func (mr *MockInterfaceMockRecorder) StartInstancesAsync(ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs interface{}) *gomock.Call { +// WaitForCreateOrUpdateResult indicates an expected call of WaitForCreateOrUpdateResult +func (mr *MockInterfaceMockRecorder) WaitForCreateOrUpdateResult(ctx, future, resourceGroupName interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartInstancesAsync", reflect.TypeOf((*MockInterface)(nil).StartInstancesAsync), ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForCreateOrUpdateResult", reflect.TypeOf((*MockInterface)(nil).WaitForCreateOrUpdateResult), ctx, future, resourceGroupName) } -// WaitForAsyncOperationResult mocks base method. -func (m *MockInterface) WaitForAsyncOperationResult(ctx context.Context, future *azure.Future) (*http.Response, error) { +// WaitForDeleteInstancesResult mocks base method +func (m *MockInterface) WaitForDeleteInstancesResult(ctx context.Context, future *azure.Future, resourceGroupName string) (*http.Response, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "WaitForAsyncOperationResult", ctx, future) + ret := m.ctrl.Call(m, "WaitForDeleteInstancesResult", ctx, future, resourceGroupName) ret0, _ := ret[0].(*http.Response) ret1, _ := ret[1].(error) return ret0, ret1 } -// WaitForAsyncOperationResult indicates an expected call of WaitForAsyncOperationResult. -func (mr *MockInterfaceMockRecorder) WaitForAsyncOperationResult(ctx, future interface{}) *gomock.Call { +// WaitForDeleteInstancesResult indicates an expected call of WaitForDeleteInstancesResult +func (mr *MockInterfaceMockRecorder) WaitForDeleteInstancesResult(ctx, future, resourceGroupName interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForAsyncOperationResult", reflect.TypeOf((*MockInterface)(nil).WaitForAsyncOperationResult), ctx, future) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForDeleteInstancesResult", reflect.TypeOf((*MockInterface)(nil).WaitForDeleteInstancesResult), ctx, future, resourceGroupName) } -// WaitForCreateOrUpdateResult mocks base method. -func (m *MockInterface) WaitForCreateOrUpdateResult(ctx context.Context, future *azure.Future, resourceGroupName string) (*http.Response, error) { +// DeallocateInstancesAsync mocks base method +func (m *MockInterface) DeallocateInstancesAsync(ctx context.Context, resourceGroupName, vmScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs) (*azure.Future, *retry.Error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "WaitForCreateOrUpdateResult", ctx, future, resourceGroupName) - ret0, _ := ret[0].(*http.Response) - ret1, _ := ret[1].(error) + ret := m.ctrl.Call(m, "DeallocateInstancesAsync", ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs) + ret0, _ := ret[0].(*azure.Future) + ret1, _ := ret[1].(*retry.Error) return ret0, ret1 } -// WaitForCreateOrUpdateResult indicates an expected call of WaitForCreateOrUpdateResult. -func (mr *MockInterfaceMockRecorder) WaitForCreateOrUpdateResult(ctx, future, resourceGroupName interface{}) *gomock.Call { +// DeallocateInstancesAsync indicates an expected call of DeallocateInstancesAsync +func (mr *MockInterfaceMockRecorder) DeallocateInstancesAsync(ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForCreateOrUpdateResult", reflect.TypeOf((*MockInterface)(nil).WaitForCreateOrUpdateResult), ctx, future, resourceGroupName) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeallocateInstancesAsync", reflect.TypeOf((*MockInterface)(nil).DeallocateInstancesAsync), ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs) } -// WaitForDeallocateInstancesResult mocks base method. +// WaitForDeallocateInstancesResult mocks base method func (m *MockInterface) WaitForDeallocateInstancesResult(ctx context.Context, future *azure.Future, resourceGroupName string) (*http.Response, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "WaitForDeallocateInstancesResult", ctx, future, resourceGroupName) @@ -214,28 +213,28 @@ func (m *MockInterface) WaitForDeallocateInstancesResult(ctx context.Context, fu return ret0, ret1 } -// WaitForDeallocateInstancesResult indicates an expected call of WaitForDeallocateInstancesResult. +// WaitForDeallocateInstancesResult indicates an expected call of WaitForDeallocateInstancesResult func (mr *MockInterfaceMockRecorder) WaitForDeallocateInstancesResult(ctx, future, resourceGroupName interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForDeallocateInstancesResult", reflect.TypeOf((*MockInterface)(nil).WaitForDeallocateInstancesResult), ctx, future, resourceGroupName) } -// WaitForDeleteInstancesResult mocks base method. -func (m *MockInterface) WaitForDeleteInstancesResult(ctx context.Context, future *azure.Future, resourceGroupName string) (*http.Response, error) { +// StartInstancesAsync mocks base method +func (m *MockInterface) StartInstancesAsync(ctx context.Context, resourceGroupName, vmScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs) (*azure.Future, *retry.Error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "WaitForDeleteInstancesResult", ctx, future, resourceGroupName) - ret0, _ := ret[0].(*http.Response) - ret1, _ := ret[1].(error) + ret := m.ctrl.Call(m, "StartInstancesAsync", ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs) + ret0, _ := ret[0].(*azure.Future) + ret1, _ := ret[1].(*retry.Error) return ret0, ret1 } -// WaitForDeleteInstancesResult indicates an expected call of WaitForDeleteInstancesResult. -func (mr *MockInterfaceMockRecorder) WaitForDeleteInstancesResult(ctx, future, resourceGroupName interface{}) *gomock.Call { +// StartInstancesAsync indicates an expected call of StartInstancesAsync +func (mr *MockInterfaceMockRecorder) StartInstancesAsync(ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForDeleteInstancesResult", reflect.TypeOf((*MockInterface)(nil).WaitForDeleteInstancesResult), ctx, future, resourceGroupName) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartInstancesAsync", reflect.TypeOf((*MockInterface)(nil).StartInstancesAsync), ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs) } -// WaitForStartInstancesResult mocks base method. +// WaitForStartInstancesResult mocks base method func (m *MockInterface) WaitForStartInstancesResult(ctx context.Context, future *azure.Future, resourceGroupName string) (*http.Response, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "WaitForStartInstancesResult", ctx, future, resourceGroupName) @@ -244,7 +243,7 @@ func (m *MockInterface) WaitForStartInstancesResult(ctx context.Context, future return ret0, ret1 } -// WaitForStartInstancesResult indicates an expected call of WaitForStartInstancesResult. +// WaitForStartInstancesResult indicates an expected call of WaitForStartInstancesResult func (mr *MockInterfaceMockRecorder) WaitForStartInstancesResult(ctx, future, resourceGroupName interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForStartInstancesResult", reflect.TypeOf((*MockInterface)(nil).WaitForStartInstancesResult), ctx, future, resourceGroupName) diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/mockvmssvmclient/interface.go b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/mockvmssvmclient/interface.go index c38a82a5f6bf..e4d55ffbdf7b 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/mockvmssvmclient/interface.go +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/azure/clients/vmssvmclient/mockvmssvmclient/interface.go @@ -25,37 +25,36 @@ package mockvmssvmclient import ( context "context" - reflect "reflect" - compute "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute" gomock "github.com/golang/mock/gomock" retry "k8s.io/legacy-cloud-providers/azure/retry" + reflect "reflect" ) -// MockInterface is a mock of Interface interface. +// MockInterface is a mock of Interface interface type MockInterface struct { ctrl *gomock.Controller recorder *MockInterfaceMockRecorder } -// MockInterfaceMockRecorder is the mock recorder for MockInterface. +// MockInterfaceMockRecorder is the mock recorder for MockInterface type MockInterfaceMockRecorder struct { mock *MockInterface } -// NewMockInterface creates a new mock instance. +// NewMockInterface creates a new mock instance func NewMockInterface(ctrl *gomock.Controller) *MockInterface { mock := &MockInterface{ctrl: ctrl} mock.recorder = &MockInterfaceMockRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use. +// EXPECT returns an object that allows the caller to indicate expected use func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { return m.recorder } -// Get mocks base method. +// Get mocks base method func (m *MockInterface) Get(ctx context.Context, resourceGroupName, VMScaleSetName, instanceID string, expand compute.InstanceViewTypes) (compute.VirtualMachineScaleSetVM, *retry.Error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, VMScaleSetName, instanceID, expand) @@ -64,13 +63,13 @@ func (m *MockInterface) Get(ctx context.Context, resourceGroupName, VMScaleSetNa return ret0, ret1 } -// Get indicates an expected call of Get. +// Get indicates an expected call of Get func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, VMScaleSetName, instanceID, expand interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, VMScaleSetName, instanceID, expand) } -// List mocks base method. +// List mocks base method func (m *MockInterface) List(ctx context.Context, resourceGroupName, virtualMachineScaleSetName, expand string) ([]compute.VirtualMachineScaleSetVM, *retry.Error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "List", ctx, resourceGroupName, virtualMachineScaleSetName, expand) @@ -79,13 +78,13 @@ func (m *MockInterface) List(ctx context.Context, resourceGroupName, virtualMach return ret0, ret1 } -// List indicates an expected call of List. +// List indicates an expected call of List func (mr *MockInterfaceMockRecorder) List(ctx, resourceGroupName, virtualMachineScaleSetName, expand interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), ctx, resourceGroupName, virtualMachineScaleSetName, expand) } -// Update mocks base method. +// Update mocks base method func (m *MockInterface) Update(ctx context.Context, resourceGroupName, VMScaleSetName, instanceID string, parameters compute.VirtualMachineScaleSetVM, source string) *retry.Error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Update", ctx, resourceGroupName, VMScaleSetName, instanceID, parameters, source) @@ -93,13 +92,13 @@ func (m *MockInterface) Update(ctx context.Context, resourceGroupName, VMScaleSe return ret0 } -// Update indicates an expected call of Update. +// Update indicates an expected call of Update func (mr *MockInterfaceMockRecorder) Update(ctx, resourceGroupName, VMScaleSetName, instanceID, parameters, source interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockInterface)(nil).Update), ctx, resourceGroupName, VMScaleSetName, instanceID, parameters, source) } -// UpdateVMs mocks base method. +// UpdateVMs mocks base method func (m *MockInterface) UpdateVMs(ctx context.Context, resourceGroupName, VMScaleSetName string, instances map[string]compute.VirtualMachineScaleSetVM, source string) *retry.Error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "UpdateVMs", ctx, resourceGroupName, VMScaleSetName, instances, source) @@ -107,7 +106,7 @@ func (m *MockInterface) UpdateVMs(ctx context.Context, resourceGroupName, VMScal return ret0 } -// UpdateVMs indicates an expected call of UpdateVMs. +// UpdateVMs indicates an expected call of UpdateVMs func (mr *MockInterfaceMockRecorder) UpdateVMs(ctx, resourceGroupName, VMScaleSetName, instances, source interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateVMs", reflect.TypeOf((*MockInterface)(nil).UpdateVMs), ctx, resourceGroupName, VMScaleSetName, instances, source) diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/gce/OWNERS b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/gce/OWNERS index f218ab3a1cd7..a43ade8d6cc6 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/gce/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/gce/OWNERS @@ -2,9 +2,9 @@ # We are no longer accepting features into k8s.io/legacy-cloud-providers. # Any kind/feature PRs must be approved by SIG Cloud Provider going forward. emeritus_approvers: - - saad-ali - - jingxu97 - - bowei - - freehan - - mrhohn - - cheftako +- saad-ali +- jingxu97 +- bowei +- freehan +- mrhohn +- cheftako diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/gce/gce_alpha.go b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/gce/gce_alpha.go index 64a4f1b23615..bbc419f23be0 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/gce/gce_alpha.go +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/gce/gce_alpha.go @@ -23,10 +23,6 @@ const ( // AlphaFeatureILBSubsets allows InternalLoadBalancer services to include a subset // of cluster nodes as backends instead of all nodes. AlphaFeatureILBSubsets = "ILBSubsets" - - // AlphaFeatureSkipIGsManagement enabled L4 Regional Backend Services and - // disables instance group management in service controller - AlphaFeatureSkipIGsManagement = "SkipIGsManagement" ) // AlphaFeatureGate contains a mapping of alpha features to whether they are enabled diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/gce/gce_annotations.go b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/gce/gce_annotations.go index f1b4a921ffa5..2dd59e8da097 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/gce/gce_annotations.go +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/gce/gce_annotations.go @@ -74,13 +74,6 @@ const ( // NetworkTierAnnotationPremium is an annotation to indicate the Service is on the Premium network tier NetworkTierAnnotationPremium = cloud.NetworkTierPremium - - // RBSAnnotationKey is annotated on a Service object to indicate - // opt-in mode for RBS NetLB - RBSAnnotationKey = "cloud.google.com/l4-rbs" - - // RBSEnabled is an annotation to indicate the Service is opt-in for RBS - RBSEnabled = "enabled" ) // GetLoadBalancerAnnotationType returns the type of GCP load balancer which should be assembled. diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/gce/gce_instancegroup.go b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/gce/gce_instancegroup.go index 46c58792b683..d1e929a86798 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/gce/gce_instancegroup.go +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/gce/gce_instancegroup.go @@ -50,16 +50,6 @@ func (g *Cloud) DeleteInstanceGroup(name string, zone string) error { return mc.Observe(g.c.InstanceGroups().Delete(ctx, meta.ZonalKey(name, zone))) } -// FilterInstanceGroupsByName lists all InstanceGroups in the project and -// zone that match the name regexp. -func (g *Cloud) FilterInstanceGroupsByNamePrefix(namePrefix, zone string) ([]*compute.InstanceGroup, error) { - ctx, cancel := cloud.ContextWithCallTimeout() - defer cancel() - mc := newInstanceGroupMetricContext("filter", zone) - v, err := g.c.InstanceGroups().List(ctx, zone, filter.Regexp("name", namePrefix+".*")) - return v, mc.Observe(err) -} - // ListInstanceGroups lists all InstanceGroups in the project and // zone. func (g *Cloud) ListInstanceGroups(zone string) ([]*compute.InstanceGroup, error) { diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_external.go b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_external.go index 6e13b4b698e7..86d437891267 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_external.go +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_external.go @@ -31,7 +31,6 @@ import ( "k8s.io/apimachinery/pkg/types" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/sets" - cloudprovider "k8s.io/cloud-provider" servicehelpers "k8s.io/cloud-provider/service/helpers" utilnet "k8s.io/utils/net" @@ -41,8 +40,6 @@ import ( const ( errStrLbNoHosts = "cannot EnsureLoadBalancer() with no hosts" - - ELBRbsFinalizer = "gke.networking.io/l4-netlb-v2" ) // ensureExternalLoadBalancer is the external implementation of LoadBalancer.EnsureLoadBalancer. @@ -54,19 +51,6 @@ const ( // new load balancers and updating existing load balancers, recognizing when // each is needed. func (g *Cloud) ensureExternalLoadBalancer(clusterName string, clusterID string, apiService *v1.Service, existingFwdRule *compute.ForwardingRule, nodes []*v1.Node) (*v1.LoadBalancerStatus, error) { - // Skip service handling if managed by ingress-gce using Regional Backend Services - if val, ok := apiService.Annotations[RBSAnnotationKey]; ok && val == RBSEnabled { - return nil, cloudprovider.ImplementedElsewhere - } - // Skip service handling if service has Regional Backend Services finalizer - if hasFinalizer(apiService, ELBRbsFinalizer) { - return nil, cloudprovider.ImplementedElsewhere - } - // Skip service handling if it has Regional Backend Service created by Ingress-GCE - if existingFwdRule != nil && existingFwdRule.BackendService != "" { - return nil, cloudprovider.ImplementedElsewhere - } - if len(nodes) == 0 { return nil, fmt.Errorf(errStrLbNoHosts) } diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_internal.go b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_internal.go index b16e5888c4be..05da9d545fa9 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_internal.go +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer_internal.go @@ -31,7 +31,7 @@ import ( "github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud/meta" "github.com/google/go-cmp/cmp" compute "google.golang.org/api/compute/v1" - v1 "k8s.io/api/core/v1" + "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" cloudprovider "k8s.io/cloud-provider" @@ -202,10 +202,8 @@ func (g *Cloud) ensureInternalLoadBalancer(clusterName, clusterID string, svc *v // Delete existing forwarding rule before making changes to the backend service. For example - changing protocol // of backend service without first deleting forwarding rule will throw an error since the linked forwarding // rule would show the old protocol. - if klogV := klog.V(2); klogV.Enabled() { - frDiff := cmp.Diff(existingFwdRule, newFwdRule) - klogV.Infof("ensureInternalLoadBalancer(%v): forwarding rule changed - Existing - %+v\n, New - %+v\n, Diff(-existing, +new) - %s\n. Deleting existing forwarding rule.", loadBalancerName, existingFwdRule, newFwdRule, frDiff) - } + frDiff := cmp.Diff(existingFwdRule, newFwdRule) + klog.V(2).Infof("ensureInternalLoadBalancer(%v): forwarding rule changed - Existing - %+v\n, New - %+v\n, Diff(-existing, +new) - %s\n. Deleting existing forwarding rule.", loadBalancerName, existingFwdRule, newFwdRule, frDiff) if err = ignoreNotFound(g.DeleteRegionForwardingRule(loadBalancerName, g.region)); err != nil { return nil, err } @@ -625,21 +623,11 @@ func (g *Cloud) ensureInternalInstanceGroups(name string, nodes []*v1.Node) ([]s klog.V(2).Infof("ensureInternalInstanceGroups(%v): %d nodes over %d zones in region %v", name, len(nodes), len(zonedNodes), g.region) var igLinks []string for zone, nodes := range zonedNodes { - if g.AlphaFeatureGate.Enabled(AlphaFeatureSkipIGsManagement) { - igs, err := g.FilterInstanceGroupsByNamePrefix(name, zone) - if err != nil { - return nil, err - } - for _, ig := range igs { - igLinks = append(igLinks, ig.SelfLink) - } - } else { - igLink, err := g.ensureInternalInstanceGroup(name, zone, nodes) - if err != nil { - return nil, err - } - igLinks = append(igLinks, igLink) + igLink, err := g.ensureInternalInstanceGroup(name, zone, nodes) + if err != nil { + return []string{}, err } + igLinks = append(igLinks, igLink) } return igLinks, nil @@ -652,13 +640,10 @@ func (g *Cloud) ensureInternalInstanceGroupsDeleted(name string) error { return err } - // Skip Instance Group deletion if IG management was moved out of k/k code - if !g.AlphaFeatureGate.Enabled(AlphaFeatureSkipIGsManagement) { - klog.V(2).Infof("ensureInternalInstanceGroupsDeleted(%v): attempting delete instance group in all %d zones", name, len(zones)) - for _, z := range zones { - if err := g.DeleteInstanceGroup(name, z.Name); err != nil && !isNotFoundOrInUse(err) { - return err - } + klog.V(2).Infof("ensureInternalInstanceGroupsDeleted(%v): attempting delete instance group in all %d zones", name, len(zones)) + for _, z := range zones { + if err := g.DeleteInstanceGroup(name, z.Name); err != nil && !isNotFoundOrInUse(err) { + return err } } return nil diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/openstack/OWNERS b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/openstack/OWNERS index 6b5183953e24..8c6dce01b630 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/openstack/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/openstack/OWNERS @@ -3,11 +3,12 @@ # Any kind/feature PRs must be approved by SIG Cloud Provider going forward. emeritus_approvers: - - anguslees - - NickrenREN - - dims - - FengyunPan2 +- anguslees +- NickrenREN +- dims +- FengyunPan2 reviewers: - - anguslees - - NickrenREN - - dims +- anguslees +- NickrenREN +- dims +- FengyunPan2 diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/OWNERS b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/OWNERS index acca323a42fd..02ec4847d154 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/OWNERS @@ -1,12 +1,16 @@ # See the OWNERS docs at https://go.k8s.io/owners emeritus_approvers: - - baludontu - - divyenpatel - - frapposelli - - dougm - - SandeepPissay - - imkin - - abrarshivani +- baludontu +- divyenpatel +- frapposelli +- dougm +- SandeepPissay +- imkin +- abrarshivani reviewers: - - divyenpatel +- baludontu +- divyenpatel +- frapposelli +- dougm +- SandeepPissay diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/connection.go b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/connection.go index 44d8f4a9dcd1..601d5bf9aea7 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/connection.go +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/connection.go @@ -206,11 +206,10 @@ func (connection *VSphereConnection) NewClient(ctx context.Context) (*vim25.Clie if err != nil { return nil, err } - klogV := klog.V(3) - if klogV.Enabled() { + if klog.V(3).Enabled() { s, err := session.NewManager(client).UserSession(ctx) if err == nil { - klogV.Infof("New session ID for '%s' = %s", s.UserName, s.Key) + klog.Infof("New session ID for '%s' = %s", s.UserName, s.Key) } } @@ -223,10 +222,6 @@ func (connection *VSphereConnection) NewClient(ctx context.Context) (*vim25.Clie klog.Errorf("failed to check if vCenter version:%v and api version: %s is deprecated. Error: %v", client.ServiceContent.About.Version, client.ServiceContent.About.ApiVersion, err) } if vcdeprecated { - // After this deprecation, vSphere 6.5 support period is extended to October 15, 2022 as - // https://blogs.vmware.com/vsphere/2021/03/announcing-limited-extension-of-vmware-vsphere-6-5-general-support-period.html - // In addition, the external vSphere cloud provider does not support vSphere 6.5. - // Please keep vSphere 6.5 support til the period. klog.Warningf("vCenter is deprecated. version: %s, api verson: %s Please consider upgrading vCenter and ESXi servers to 6.7u3 or higher", client.ServiceContent.About.Version, client.ServiceContent.About.ApiVersion) } return client, nil diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/constants.go b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/constants.go index a7638aa0161a..4aa7f5f48467 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/constants.go +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/constants.go @@ -53,7 +53,7 @@ const ( ClusterComputeResourceType = "ClusterComputeResource" HostSystemType = "HostSystem" NameProperty = "name" - MinvCenterVersion = "7.0.2" + MinvCenterVersion = "6.7.0" ) // Test Constants diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/utils.go b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/utils.go index 3662248d596f..ac19f9b8f1b6 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/utils.go +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vclib/utils.go @@ -20,9 +20,9 @@ import ( "fmt" "path/filepath" "regexp" - "strconv" "strings" + "github.com/blang/semver" "github.com/vmware/govmomi/find" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/vim25/soap" @@ -202,82 +202,32 @@ func VerifyVolumePathsForVMDevices(vmDevices object.VirtualDeviceList, volPaths } // isvCenterDeprecated takes vCenter version and vCenter API version as input and return true if vCenter is deprecated -func isvCenterDeprecated(vCenterVersion string, vCenterAPIVersion string) (bool, error) { - var vcversion, vcapiversion, minvcversion vcVersion - var err error - err = vcversion.parse(vCenterVersion) +func isvCenterDeprecated(vCenterVersion string, vCenerAPIVersion string) (bool, error) { + minvcversion, err := semver.New(MinvCenterVersion) + vcdeprecated := false if err != nil { - return false, fmt.Errorf("failed to parse vCenter version: %s. err: %+v", vCenterVersion, err) - } - err = vcapiversion.parse(vCenterAPIVersion) - if err != nil { - return false, fmt.Errorf("failed to parse vCenter API version: %s. err: %+v", vCenterAPIVersion, err) - } - err = minvcversion.parse(MinvCenterVersion) - if err != nil { - return false, fmt.Errorf("failed to parse minimum vCenter version: %s. err: %+v", MinvCenterVersion, err) - } - if vcversion.isLessThan(minvcversion) && vcapiversion.isLessThan(minvcversion) { - return true, nil - } - return false, nil -} - -// vcVersion represents a VC version -type vcVersion struct { - Major int64 - Minor int64 - Revision int64 - Build int64 -} - -// parse helps parse version string to VCVersion -// returns error when parse fail -func (v *vcVersion) parse(version string) error { - for index, value := range strings.Split(version, ".") { - var err error - if index == 0 { - v.Major, err = strconv.ParseInt(value, 10, 64) - } else if index == 1 { - v.Minor, err = strconv.ParseInt(value, 10, 64) - } else if index == 2 { - v.Revision, err = strconv.ParseInt(value, 10, 64) - } else if index == 3 { - v.Build, err = strconv.ParseInt(value, 10, 64) - } + return false, fmt.Errorf("failed to get parse vCenter version: %s. err: %+v", MinvCenterVersion, err) + } else { + vcversion, err := semver.New(vCenterVersion) if err != nil { - return fmt.Errorf("failed to parse version: %q, err: %v", version, err) - } - } - return nil -} - -// isLessThan compares VCVersion v to o and returns -// true if v is less than o -func (v *vcVersion) isLessThan(o vcVersion) bool { - if v.Major != o.Major { - if v.Major > o.Major { - return false - } - return true - } - if v.Minor != o.Minor { - if v.Minor > o.Minor { - return false - } - return true - } - if v.Revision != o.Revision { - if v.Revision > o.Revision { - return false - } - return true - } - if v.Build != o.Build { - if v.Build > o.Build { - return false + return false, fmt.Errorf("failed to parse vCenter version: %s. err: %+v", vCenterVersion, err) + } else { + result := vcversion.Compare(*minvcversion) + if result == -1 { + // vcversion is less than minvcversion + vcdeprecated = true + } else if result == 0 { + // vcversion is equal to minvcversion + // check patch version + vcapiversion, err := semver.ParseTolerant(vCenerAPIVersion) + if err != nil { + return false, fmt.Errorf("failed to parse vCenter api version: %s. err: %+v", vCenerAPIVersion, err) + } + if vcapiversion.Patch < 3 { + vcdeprecated = true + } + } } - return true } - return false + return vcdeprecated, nil } diff --git a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vsphere.go b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vsphere.go index 756c3f6c9993..82c4895b1a5a 100644 --- a/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vsphere.go +++ b/cluster-autoscaler/vendor/k8s.io/legacy-cloud-providers/vsphere/vsphere.go @@ -44,12 +44,9 @@ import ( "github.com/vmware/govmomi/vim25/mo" vmwaretypes "github.com/vmware/govmomi/vim25/types" v1 "k8s.io/api/core/v1" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8stypes "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/informers" - clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/cache" cloudprovider "k8s.io/cloud-provider" nodehelpers "k8s.io/cloud-provider/node/helpers" @@ -65,9 +62,6 @@ import ( // VSphere Cloud Provider constants const ( ProviderName = "vsphere" - providerIDPrefix = "vsphere://" - updateNodeRetryCount = 3 - zoneLabelsResyncPeriod = 5 * time.Minute VolDir = "kubevols" RoundTripperDefaultCount = 3 DummyVMPrefixName = "vsphere-k8s" @@ -101,9 +95,8 @@ var _ cloudprovider.PVLabeler = (*VSphere)(nil) // VSphere is an implementation of cloud provider Interface for VSphere. type VSphere struct { - cfg *VSphereConfig - kubeClient clientset.Interface - hostName string + cfg *VSphereConfig + hostName string // Maps the VSphere IP address to VSphereInstance vsphereInstanceMap map[string]*VSphereInstance vsphereVolumeMap *VsphereVolumeMap @@ -275,7 +268,6 @@ func init() { // Initialize passes a Kubernetes clientBuilder interface to the cloud provider func (vs *VSphere) Initialize(clientBuilder cloudprovider.ControllerClientBuilder, stop <-chan struct{}) { - vs.kubeClient = clientBuilder.ClientOrDie("vsphere-legacy-cloud-provider") } // Initialize Node Informers @@ -313,11 +305,6 @@ func (vs *VSphere) SetInformers(informerFactory informers.SharedInformerFactory) AddFunc: vs.NodeAdded, DeleteFunc: vs.NodeDeleted, }) - // Register sync function for node zone/region labels - nodeInformer.AddEventHandlerWithResyncPeriod( - cache.ResourceEventHandlerFuncs{UpdateFunc: vs.syncNodeZoneLabels}, - zoneLabelsResyncPeriod, - ) klog.V(4).Infof("Node informers in vSphere cloud provider initialized") } @@ -909,16 +896,7 @@ func (vs *VSphere) LoadBalancer() (cloudprovider.LoadBalancer, bool) { } func (vs *VSphere) isZoneEnabled() bool { - isEnabled := vs.cfg != nil && vs.cfg.Labels.Zone != "" && vs.cfg.Labels.Region != "" - // Return false within kubelet in case of credentials stored in secret. - // Otherwise kubelet will not be able to obtain zone labels from vSphere and create initial node - // due to no credentials at this step. - // See https://github.com/kubernetes/kubernetes/blob/b960f7a0e04687c17e0b0801e17e7cab89f273cc/pkg/kubelet/kubelet_node_status.go#L384-L386 - if isEnabled && vs.isSecretInfoProvided && vs.nodeManager.credentialManager == nil { - klog.V(1).Info("Zones can not be populated now due to credentials in Secret, skip.") - return false - } - return isEnabled + return vs.cfg != nil && vs.cfg.Labels.Zone != "" && vs.cfg.Labels.Region != "" } // Zones returns an implementation of Zones for vSphere. @@ -1547,76 +1525,6 @@ func (vs *VSphere) NodeAdded(obj interface{}) { if err := vs.nodeManager.RegisterNode(node); err != nil { klog.Errorf("failed to add node %+v: %v", node, err) } - vs.setNodeZoneLabels(node) -} - -// Node zone labels sync function, intended to be called periodically within kube-controller-manager. -func (vs *VSphere) syncNodeZoneLabels(_ interface{}, newObj interface{}) { - node, ok := newObj.(*v1.Node) - if node == nil || !ok { - klog.Warningf("NodeUpdated: unrecognized object %+v", newObj) - return - } - - // Populate zone and region labels if needed. - // This logic engages only if credentials provided via secret. - // Returns early if topology labels are already presented. - // https://github.com/kubernetes/kubernetes/issues/75175 - if vs.isSecretInfoProvided && vs.isZoneEnabled() { - labels := node.GetLabels() - _, zoneOk := labels[v1.LabelTopologyZone] - _, regionOk := labels[v1.LabelTopologyRegion] - if zoneOk && regionOk { - klog.V(6).Infof("Node topology labels are already populated") - return - } - klog.V(4).Infof("Topology labels was not found, trying to populate for node %s", node.Name) - vs.setNodeZoneLabels(node) - } -} - -func (vs *VSphere) setNodeZoneLabels(node *v1.Node) { - nodeZone := node.ObjectMeta.Labels[v1.LabelTopologyZone] - nodeRegion := node.ObjectMeta.Labels[v1.LabelTopologyRegion] - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - if vs.isSecretInfoProvided && vs.isZoneEnabled() { - zone, err := vs.GetZoneByProviderID(ctx, node.Spec.ProviderID) - if err != nil { - klog.Warningf("Can not get Zones from vCenter: %v", err) - } - - if zone.FailureDomain != nodeZone || zone.Region != nodeRegion { - updatedNode := node.DeepCopy() - labels := updatedNode.ObjectMeta.Labels - if labels == nil { - labels = make(map[string]string) - } - labels[v1.LabelTopologyZone] = zone.FailureDomain - labels[v1.LabelTopologyRegion] = zone.Region - - err = tryUpdateNode(ctx, vs.kubeClient, updatedNode) - if err != nil { - klog.Errorf("vSphere cloud provider can not update node with zones info: %v", err) - } else { - klog.V(4).Infof("Node %s updated with zone and region labels", updatedNode.Name) - } - } - } -} - -func tryUpdateNode(ctx context.Context, client clientset.Interface, updatedNode *v1.Node) error { - for i := 0; i < updateNodeRetryCount; i++ { - _, err := client.CoreV1().Nodes().Update(ctx, updatedNode, metav1.UpdateOptions{}) - if err != nil { - if !apierrors.IsConflict(err) { - return fmt.Errorf("vSphere cloud provider can not update node with zones info: %v", err) - } - } else { - return nil - } - } - return fmt.Errorf("update node exceeds retry count") } // Notification handler when node is removed from k8s cluster. @@ -1712,9 +1620,14 @@ func withTagsClient(ctx context.Context, connection *vclib.VSphereConnection, f return f(c) } -func (vs *VSphere) getZoneByVmUUIDAndNodeName(ctx context.Context, vmUUID string, nodeName k8stypes.NodeName) (cloudprovider.Zone, error) { +// GetZone implements Zones.GetZone +func (vs *VSphere) GetZone(ctx context.Context) (cloudprovider.Zone, error) { + nodeName, err := vs.CurrentNodeName(ctx, vs.hostName) + if err != nil { + klog.Errorf("Cannot get node name.") + return cloudprovider.Zone{}, err + } zone := cloudprovider.Zone{} - vsi, err := vs.getVSphereInstanceForServer(vs.cfg.Workspace.VCenterIP, ctx) if err != nil { klog.Errorf("Cannot connect to vsphere. Get zone for node %s error", nodeName) @@ -1725,7 +1638,7 @@ func (vs *VSphere) getZoneByVmUUIDAndNodeName(ctx context.Context, vmUUID string klog.Errorf("Cannot connect to datacenter. Get zone for node %s error", nodeName) return cloudprovider.Zone{}, err } - vmHost, err := dc.GetHostByVMUUID(ctx, vmUUID) + vmHost, err := dc.GetHostByVMUUID(ctx, vs.vmUUID) if err != nil { klog.Errorf("Cannot find VM runtime host. Get zone for node %s error", nodeName) return cloudprovider.Zone{}, err @@ -1743,12 +1656,12 @@ func (vs *VSphere) getZoneByVmUUIDAndNodeName(ctx context.Context, vmUUID string // search the hierarchy, example order: ["Host", "Cluster", "Datacenter", "Folder"] for i := range objects { obj := objects[len(objects)-1-i] - attachedTags, err := client.ListAttachedTags(ctx, obj) + tags, err := client.ListAttachedTags(ctx, obj) if err != nil { klog.Errorf("Cannot list attached tags. Get zone for node %s: %s", nodeName, err) return err } - for _, value := range attachedTags { + for _, value := range tags { tag, err := client.GetTag(ctx, value) if err != nil { klog.Errorf("Get tag %s: %s", value, err) @@ -1761,7 +1674,7 @@ func (vs *VSphere) getZoneByVmUUIDAndNodeName(ctx context.Context, vmUUID string } found := func() { - klog.Errorf("Found %q tag (%s) for %s attached to %s", category.Name, tag.Name, vmUUID, obj.Reference()) + klog.Errorf("Found %q tag (%s) for %s attached to %s", category.Name, tag.Name, vs.vmUUID, obj.Reference()) } switch { case category.Name == vs.cfg.Labels.Zone: @@ -1779,10 +1692,10 @@ func (vs *VSphere) getZoneByVmUUIDAndNodeName(ctx context.Context, vmUUID string } if zone.Region == "" { - return fmt.Errorf("vSphere region category %q does not match any tags for node %s [%s]", vs.cfg.Labels.Region, nodeName, vmUUID) + return fmt.Errorf("vSphere region category %q does not match any tags for node %s [%s]", vs.cfg.Labels.Region, nodeName, vs.vmUUID) } if zone.FailureDomain == "" { - return fmt.Errorf("vSphere zone category %q does not match any tags for node %s [%s]", vs.cfg.Labels.Zone, nodeName, vmUUID) + return fmt.Errorf("vSphere zone category %q does not match any tags for node %s [%s]", vs.cfg.Labels.Zone, nodeName, vs.vmUUID) } return nil @@ -1794,32 +1707,12 @@ func (vs *VSphere) getZoneByVmUUIDAndNodeName(ctx context.Context, vmUUID string return zone, nil } -// GetZone implements Zones.GetZone -func (vs *VSphere) GetZone(ctx context.Context) (cloudprovider.Zone, error) { - nodeName, err := vs.CurrentNodeName(ctx, vs.hostName) - if err != nil { - klog.Errorf("Cannot get node name.") - return cloudprovider.Zone{}, err - } - return vs.getZoneByVmUUIDAndNodeName(ctx, vs.vmUUID, nodeName) -} - func (vs *VSphere) GetZoneByNodeName(ctx context.Context, nodeName k8stypes.NodeName) (cloudprovider.Zone, error) { return cloudprovider.Zone{}, cloudprovider.NotImplemented } func (vs *VSphere) GetZoneByProviderID(ctx context.Context, providerID string) (cloudprovider.Zone, error) { - var nodeName k8stypes.NodeName - vmUUID := strings.Replace(providerID, providerIDPrefix, "", 1) - - for nName, nInfo := range vs.nodeManager.nodeInfoMap { - if nInfo.vmUUID == vmUUID { - nodeName = convertToK8sType(nName) - break - } - } - - return vs.getZoneByVmUUIDAndNodeName(ctx, vmUUID, nodeName) + return cloudprovider.Zone{}, cloudprovider.NotImplemented } // GetLabelsForVolume implements the PVLabeler interface for VSphere diff --git a/cluster-autoscaler/vendor/k8s.io/mount-utils/OWNERS b/cluster-autoscaler/vendor/k8s.io/mount-utils/OWNERS index 64fb63c1e430..5a474fbcb6cc 100644 --- a/cluster-autoscaler/vendor/k8s.io/mount-utils/OWNERS +++ b/cluster-autoscaler/vendor/k8s.io/mount-utils/OWNERS @@ -11,5 +11,6 @@ approvers: - jingxu97 - saad-ali - jsafrane + labels: - sig/storage diff --git a/cluster-autoscaler/vendor/k8s.io/mount-utils/README.md b/cluster-autoscaler/vendor/k8s.io/mount-utils/README.md index ee7c8e89af6a..5510e99bc4fd 100644 --- a/cluster-autoscaler/vendor/k8s.io/mount-utils/README.md +++ b/cluster-autoscaler/vendor/k8s.io/mount-utils/README.md @@ -28,4 +28,3 @@ Code of Conduct](code-of-conduct.md). ### Contibution Guidelines See [CONTRIBUTING.md](CONTRIBUTING.md) for more information. - diff --git a/cluster-autoscaler/vendor/k8s.io/mount-utils/go.mod b/cluster-autoscaler/vendor/k8s.io/mount-utils/go.mod index 10d8d5d88924..48457f0b1a93 100644 --- a/cluster-autoscaler/vendor/k8s.io/mount-utils/go.mod +++ b/cluster-autoscaler/vendor/k8s.io/mount-utils/go.mod @@ -10,6 +10,6 @@ require ( github.com/stretchr/testify v1.7.0 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect - k8s.io/klog/v2 v2.60.1 - k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 + k8s.io/klog/v2 v2.30.0 + k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b ) diff --git a/cluster-autoscaler/vendor/k8s.io/mount-utils/go.sum b/cluster-autoscaler/vendor/k8s.io/mount-utils/go.sum index 9e8de397ad64..a0b89aa0f349 100644 --- a/cluster-autoscaler/vendor/k8s.io/mount-utils/go.sum +++ b/cluster-autoscaler/vendor/k8s.io/mount-utils/go.sum @@ -26,7 +26,7 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= -k8s.io/klog/v2 v2.60.1 h1:VW25q3bZx9uE3vvdL6M8ezOX79vA2Aq1nEWLqNQclHc= -k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc= -k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/klog/v2 v2.30.0 h1:bUO6drIvCIsvZ/XFgfxoGFQU/a4Qkh0iAlvUR7vlHJw= +k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b h1:wxEMGetGMur3J1xuGLQY7GEQYg9bZxKn3tKo5k/eYcs= +k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= diff --git a/cluster-autoscaler/vendor/k8s.io/mount-utils/mount_helper_common.go b/cluster-autoscaler/vendor/k8s.io/mount-utils/mount_helper_common.go index 196ae30ad1a7..dd4dc2c8e5ad 100644 --- a/cluster-autoscaler/vendor/k8s.io/mount-utils/mount_helper_common.go +++ b/cluster-autoscaler/vendor/k8s.io/mount-utils/mount_helper_common.go @@ -135,3 +135,17 @@ func removePathIfNotMountPoint(mountPath string, mounter Interface, extensiveMou } return notMnt, nil } + +// PathExists returns true if the specified path exists. +// TODO: clean this up to use pkg/util/file/FileExists +func PathExists(path string) (bool, error) { + _, err := os.Stat(path) + if err == nil { + return true, nil + } else if os.IsNotExist(err) { + return false, nil + } else if IsCorruptedMnt(err) { + return true, err + } + return false, err +} diff --git a/cluster-autoscaler/vendor/k8s.io/mount-utils/mount_helper_unix.go b/cluster-autoscaler/vendor/k8s.io/mount-utils/mount_helper_unix.go index cb8732fce74c..77fb817db086 100644 --- a/cluster-autoscaler/vendor/k8s.io/mount-utils/mount_helper_unix.go +++ b/cluster-autoscaler/vendor/k8s.io/mount-utils/mount_helper_unix.go @@ -20,15 +20,12 @@ limitations under the License. package mount import ( - "errors" "fmt" - "io/fs" "os" "strconv" "strings" "syscall" - "k8s.io/klog/v2" utilio "k8s.io/utils/io" ) @@ -54,8 +51,6 @@ func IsCorruptedMnt(err error) bool { underlyingError = pe.Err case *os.SyscallError: underlyingError = pe.Err - case syscall.Errno: - underlyingError = err } return underlyingError == syscall.ENOTCONN || underlyingError == syscall.ESTALE || underlyingError == syscall.EIO || underlyingError == syscall.EACCES || underlyingError == syscall.EHOSTDOWN @@ -136,7 +131,7 @@ func ParseMountInfo(filename string) ([]MountInfo, error) { Minor: minor, Root: fields[3], MountPoint: fields[4], - MountOptions: splitMountOptions(fields[5]), + MountOptions: strings.Split(fields[5], ","), } // All fields until "-" are "optional fields". i := 6 @@ -150,52 +145,15 @@ func ParseMountInfo(filename string) ([]MountInfo, error) { } info.FsType = fields[i] info.Source = fields[i+1] - info.SuperOptions = splitMountOptions(fields[i+2]) + info.SuperOptions = strings.Split(fields[i+2], ",") infos = append(infos, info) } return infos, nil } -// splitMountOptions parses comma-separated list of mount options into an array. -// It respects double quotes - commas in them are not considered as the option separator. -func splitMountOptions(s string) []string { - inQuotes := false - list := strings.FieldsFunc(s, func(r rune) bool { - if r == '"' { - inQuotes = !inQuotes - } - // Report a new field only when outside of double quotes. - return r == ',' && !inQuotes - }) - return list -} - // isMountPointMatch returns true if the path in mp is the same as dir. // Handles case where mountpoint dir has been renamed due to stale NFS mount. func isMountPointMatch(mp MountPoint, dir string) bool { deletedDir := fmt.Sprintf("%s\\040(deleted)", dir) return ((mp.Path == dir) || (mp.Path == deletedDir)) } - -// PathExists returns true if the specified path exists. -// TODO: clean this up to use pkg/util/file/FileExists -func PathExists(path string) (bool, error) { - _, err := os.Stat(path) - if err == nil { - return true, nil - } else if errors.Is(err, fs.ErrNotExist) { - err = syscall.Access(path, syscall.F_OK) - if err == nil { - // The access syscall says the file exists, the stat syscall says it - // doesn't. This was observed on CIFS when the path was removed at - // the server somehow. POSIX calls this a stale file handle, let's fake - // that error and treat the path as existing but corrupted. - klog.Warningf("Potential stale file handle detected: %s", path) - return true, syscall.ESTALE - } - return false, nil - } else if IsCorruptedMnt(err) { - return true, err - } - return false, err -} diff --git a/cluster-autoscaler/vendor/k8s.io/mount-utils/mount_helper_windows.go b/cluster-autoscaler/vendor/k8s.io/mount-utils/mount_helper_windows.go index 995fd5a0cd73..7653062f65f0 100644 --- a/cluster-autoscaler/vendor/k8s.io/mount-utils/mount_helper_windows.go +++ b/cluster-autoscaler/vendor/k8s.io/mount-utils/mount_helper_windows.go @@ -95,17 +95,3 @@ func ValidateDiskNumber(disk string) error { func isMountPointMatch(mp MountPoint, dir string) bool { return mp.Path == dir } - -// PathExists returns true if the specified path exists. -// TODO: clean this up to use pkg/util/file/FileExists -func PathExists(path string) (bool, error) { - _, err := os.Stat(path) - if err == nil { - return true, nil - } else if os.IsNotExist(err) { - return false, nil - } else if IsCorruptedMnt(err) { - return true, err - } - return false, err -} diff --git a/cluster-autoscaler/vendor/k8s.io/mount-utils/resizefs_linux.go b/cluster-autoscaler/vendor/k8s.io/mount-utils/resizefs_linux.go index 929d061e52b8..b92ce1182008 100644 --- a/cluster-autoscaler/vendor/k8s.io/mount-utils/resizefs_linux.go +++ b/cluster-autoscaler/vendor/k8s.io/mount-utils/resizefs_linux.go @@ -129,9 +129,6 @@ func (resizefs *ResizeFs) NeedResize(devicePath string, deviceMountPath string) case "xfs": blockSize, fsSize, err = resizefs.getXFSSize(deviceMountPath) klog.V(5).Infof("Xfs size: filesystem size=%d, block size=%d, err=%v", fsSize, blockSize, err) - case "btrfs": - blockSize, fsSize, err = resizefs.getBtrfsSize(devicePath) - klog.V(5).Infof("Btrfs size: filesystem size=%d, block size=%d, err=%v", fsSize, blockSize, err) default: klog.Errorf("Not able to parse given filesystem info. fsType: %s, will not resize", format) return false, fmt.Errorf("Could not parse fs info on given filesystem format: %s. Supported fs types are: xfs, ext3, ext4", format) @@ -193,51 +190,6 @@ func (resizefs *ResizeFs) getXFSSize(devicePath string) (uint64, uint64, error) return blockSize, blockSize * blockCount, nil } -func (resizefs *ResizeFs) getBtrfsSize(devicePath string) (uint64, uint64, error) { - output, err := resizefs.exec.Command("btrfs", "inspect-internal", "dump-super", "-f", devicePath).CombinedOutput() - if err != nil { - return 0, 0, fmt.Errorf("failed to read size of filesystem on %s: %s: %s", devicePath, err, string(output)) - } - - blockSize, totalBytes, _ := resizefs.parseBtrfsInfoOutput(string(output), "sectorsize", "total_bytes") - - if blockSize == 0 { - return 0, 0, fmt.Errorf("could not find block size of device %s", devicePath) - } - if totalBytes == 0 { - return 0, 0, fmt.Errorf("could not find total size of device %s", devicePath) - } - return blockSize, totalBytes, nil -} - -func (resizefs *ResizeFs) parseBtrfsInfoOutput(cmdOutput string, blockSizeKey string, totalBytesKey string) (uint64, uint64, error) { - lines := strings.Split(cmdOutput, "\n") - var blockSize, blockCount uint64 - var err error - - for _, line := range lines { - tokens := strings.Fields(line) - if len(tokens) != 2 { - continue - } - key, value := strings.ToLower(strings.TrimSpace(tokens[0])), strings.ToLower(strings.TrimSpace(tokens[1])) - - if key == blockSizeKey { - blockSize, err = strconv.ParseUint(value, 10, 64) - if err != nil { - return 0, 0, fmt.Errorf("failed to parse block size %s: %s", value, err) - } - } - if key == totalBytesKey { - blockCount, err = strconv.ParseUint(value, 10, 64) - if err != nil { - return 0, 0, fmt.Errorf("failed to parse total size %s: %s", value, err) - } - } - } - return blockSize, blockCount, err -} - func (resizefs *ResizeFs) parseFsInfoOutput(cmdOutput string, spliter string, blockSizeKey string, blockCountKey string) (uint64, uint64, error) { lines := strings.Split(cmdOutput, "\n") var blockSize, blockCount uint64 diff --git a/cluster-autoscaler/vendor/k8s.io/utils/clock/clock.go b/cluster-autoscaler/vendor/k8s.io/utils/clock/clock.go index b8b6af5c817f..dd181ce8d8b0 100644 --- a/cluster-autoscaler/vendor/k8s.io/utils/clock/clock.go +++ b/cluster-autoscaler/vendor/k8s.io/utils/clock/clock.go @@ -63,16 +63,6 @@ type WithDelayedExecution interface { AfterFunc(d time.Duration, f func()) Timer } -// WithTickerAndDelayedExecution allows for injecting fake or real clocks -// into code that needs Ticker and AfterFunc functionality -type WithTickerAndDelayedExecution interface { - WithTicker - // AfterFunc executes f in its own goroutine after waiting - // for d duration and returns a Timer whose channel can be - // closed by calling Stop() on the Timer. - AfterFunc(d time.Duration, f func()) Timer -} - // Ticker defines the Ticker interface. type Ticker interface { C() <-chan time.Time diff --git a/cluster-autoscaler/vendor/k8s.io/utils/clock/testing/fake_clock.go b/cluster-autoscaler/vendor/k8s.io/utils/clock/testing/fake_clock.go index 79e11deb6596..fb493c4babaa 100644 --- a/cluster-autoscaler/vendor/k8s.io/utils/clock/testing/fake_clock.go +++ b/cluster-autoscaler/vendor/k8s.io/utils/clock/testing/fake_clock.go @@ -239,8 +239,7 @@ func (f *FakeClock) Sleep(d time.Duration) { // IntervalClock implements clock.PassiveClock, but each invocation of Now steps the clock forward the specified duration. // IntervalClock technically implements the other methods of clock.Clock, but each implementation is just a panic. -// -// Deprecated: See SimpleIntervalClock for an alternative that only has the methods of PassiveClock. +// See SimpleIntervalClock for an alternative that only has the methods of PassiveClock. type IntervalClock struct { Time time.Time Duration time.Duration @@ -283,9 +282,9 @@ func (*IntervalClock) Tick(d time.Duration) <-chan time.Time { // NewTicker has no implementation yet and is omitted. // TODO: make interval clock use FakeClock so this can be implemented. -func (*IntervalClock) NewTicker(d time.Duration) clock.Ticker { - panic("IntervalClock doesn't implement NewTicker") -} +//func (*IntervalClock) NewTicker(d time.Duration) clock.Ticker { +// panic("IntervalClock doesn't implement NewTicker") +//} // Sleep is unimplemented, will panic. func (*IntervalClock) Sleep(d time.Duration) { diff --git a/cluster-autoscaler/vendor/k8s.io/utils/inotify/inotify_linux.go b/cluster-autoscaler/vendor/k8s.io/utils/inotify/inotify_linux.go index 2963042e4745..6258277c9659 100644 --- a/cluster-autoscaler/vendor/k8s.io/utils/inotify/inotify_linux.go +++ b/cluster-autoscaler/vendor/k8s.io/utils/inotify/inotify_linux.go @@ -120,11 +120,7 @@ func (w *Watcher) RemoveWatch(path string) error { } success, errno := syscall.InotifyRmWatch(w.fd, watch.wd) if success == -1 { - // when file descriptor or watch descriptor not found, InotifyRmWatch syscall return EINVAL error - // if return error, it may lead this path remain in watches and paths map, and no other event can trigger remove action. - if errno != syscall.EINVAL { - return os.NewSyscallError("inotify_rm_watch", errno) - } + return os.NewSyscallError("inotify_rm_watch", errno) } delete(w.watches, path) // Locking here to protect the read from paths in readEvents. diff --git a/cluster-autoscaler/vendor/k8s.io/utils/net/ebtables/ebtables.go b/cluster-autoscaler/vendor/k8s.io/utils/net/ebtables/ebtables.go new file mode 100644 index 000000000000..3e984a27ee48 --- /dev/null +++ b/cluster-autoscaler/vendor/k8s.io/utils/net/ebtables/ebtables.go @@ -0,0 +1,222 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package ebtables allows to control the ebtables Linux-based bridging firewall. +// Both chains and rules can be added, deleted and modified. +// For ebtables specific documentation see: http://ebtables.netfilter.org/ +package ebtables + +import ( + "fmt" + "regexp" + "strings" + + utilexec "k8s.io/utils/exec" +) + +const ( + cmdebtables = "ebtables" + + // Flag to show full mac in output. The default representation omits leading zeroes. + fullMac = "--Lmac2" +) + +// RulePosition is the rule position within a table +type RulePosition string + +// Relative position for a new rule +const ( + Prepend RulePosition = "-I" + Append RulePosition = "-A" +) + +// Table is an Ebtables table type +type Table string + +// Tables available in ebtables by default +const ( + TableNAT Table = "nat" + TableFilter Table = "filter" + TableBroute Table = "broute" +) + +// Chain is an Ebtables chain type +type Chain string + +// Chains that are built-in in ebtables +const ( + ChainPostrouting Chain = "POSTROUTING" + ChainPrerouting Chain = "PREROUTING" + ChainOutput Chain = "OUTPUT" + ChainInput Chain = "INPUT" + ChainBrouting Chain = "BROUTING" +) + +type operation string + +const ( + opCreateChain operation = "-N" + opFlushChain operation = "-F" + opDeleteChain operation = "-X" + opListChain operation = "-L" + opAppendRule operation = "-A" + opPrependRule operation = "-I" + opDeleteRule operation = "-D" +) + +// Interface for running ebtables commands. Implementations must be goroutine-safe. +type Interface interface { + // GetVersion returns the "X.Y.Z" semver string for ebtables. + GetVersion() (string, error) + // EnsureRule checks if the specified rule is present and, if not, creates it. If the rule existed, return true. + // WARNING: ebtables does not provide check operation like iptables do. Hence we have to do a string match of args. + // Input args must follow the format and sequence of ebtables list output. Otherwise, EnsureRule will always create + // new rules and causing duplicates. + EnsureRule(position RulePosition, table Table, chain Chain, args ...string) (bool, error) + // DeleteRule checks if the specified rule is present and, if so, deletes it. + DeleteRule(table Table, chain Chain, args ...string) error + // EnsureChain checks if the specified chain is present and, if not, creates it. If the rule existed, return true. + EnsureChain(table Table, chain Chain) (bool, error) + // DeleteChain deletes the specified chain. If the chain did not exist, return error. + DeleteChain(table Table, chain Chain) error + // FlushChain flush the specified chain. If the chain did not exist, return error. + FlushChain(table Table, chain Chain) error +} + +// runner implements Interface in terms of exec("ebtables"). +type runner struct { + exec utilexec.Interface +} + +// New returns a new Interface which will exec ebtables. +func New(exec utilexec.Interface) Interface { + runner := &runner{ + exec: exec, + } + return runner +} + +func makeFullArgs(table Table, op operation, chain Chain, args ...string) []string { + return append([]string{"-t", string(table), string(op), string(chain)}, args...) +} + +// getEbtablesVersionString runs "ebtables --version" to get the version string +// in the form "X.X.X" +func getEbtablesVersionString(exec utilexec.Interface) (string, error) { + // this doesn't access mutable state so we don't need to use the interface / runner + bytes, err := exec.Command(cmdebtables, "--version").CombinedOutput() + if err != nil { + return "", err + } + versionMatcher := regexp.MustCompile(`v([0-9]+\.[0-9]+\.[0-9]+)`) + match := versionMatcher.FindStringSubmatch(string(bytes)) + if match == nil { + return "", fmt.Errorf("no ebtables version found in string: %s", bytes) + } + return match[1], nil +} + +func (runner *runner) GetVersion() (string, error) { + return getEbtablesVersionString(runner.exec) +} + +func (runner *runner) EnsureRule(position RulePosition, table Table, chain Chain, args ...string) (bool, error) { + var exist bool + fullArgs := makeFullArgs(table, opListChain, chain, fullMac) + out, err := runner.exec.Command(cmdebtables, fullArgs...).CombinedOutput() + if err != nil { + exist = false + } else { + exist = checkIfRuleExists(string(out), args...) + } + if !exist { + fullArgs = makeFullArgs(table, operation(position), chain, args...) + out, err := runner.exec.Command(cmdebtables, fullArgs...).CombinedOutput() + if err != nil { + return exist, fmt.Errorf("Failed to ensure rule: %v, output: %v", err, string(out)) + } + } + return exist, nil +} + +func (runner *runner) DeleteRule(table Table, chain Chain, args ...string) error { + var exist bool + fullArgs := makeFullArgs(table, opListChain, chain, fullMac) + out, err := runner.exec.Command(cmdebtables, fullArgs...).CombinedOutput() + if err != nil { + exist = false + } else { + exist = checkIfRuleExists(string(out), args...) + } + + if !exist { + return nil + } + fullArgs = makeFullArgs(table, opDeleteRule, chain, args...) + out, err = runner.exec.Command(cmdebtables, fullArgs...).CombinedOutput() + if err != nil { + return fmt.Errorf("Failed to delete rule: %v, output: %s", err, out) + } + return nil +} + +func (runner *runner) EnsureChain(table Table, chain Chain) (bool, error) { + exist := true + + args := makeFullArgs(table, opListChain, chain) + _, err := runner.exec.Command(cmdebtables, args...).CombinedOutput() + if err != nil { + exist = false + } + if !exist { + args = makeFullArgs(table, opCreateChain, chain) + out, err := runner.exec.Command(cmdebtables, args...).CombinedOutput() + if err != nil { + return exist, fmt.Errorf("Failed to ensure %v chain: %v, output: %v", chain, err, string(out)) + } + } + return exist, nil +} + +// checkIfRuleExists takes the output of ebtables list chain and checks if the input rules exists +// WARNING: checkIfRuleExists expects the input args matches the format and sequence of ebtables list output +func checkIfRuleExists(listChainOutput string, args ...string) bool { + rule := strings.Join(args, " ") + for _, line := range strings.Split(listChainOutput, "\n") { + if strings.TrimSpace(line) == rule { + return true + } + } + return false +} + +func (runner *runner) DeleteChain(table Table, chain Chain) error { + fullArgs := makeFullArgs(table, opDeleteChain, chain) + out, err := runner.exec.Command(cmdebtables, fullArgs...).CombinedOutput() + if err != nil { + return fmt.Errorf("Failed to delete %v chain %v: %v, output: %v", string(table), string(chain), err, string(out)) + } + return nil +} + +func (runner *runner) FlushChain(table Table, chain Chain) error { + fullArgs := makeFullArgs(table, opFlushChain, chain) + out, err := runner.exec.Command(cmdebtables, fullArgs...).CombinedOutput() + if err != nil { + return fmt.Errorf("Failed to flush %v chain %v: %v, output: %v", string(table), string(chain), err, string(out)) + } + return nil +} diff --git a/cluster-autoscaler/vendor/k8s.io/utils/pointer/pointer.go b/cluster-autoscaler/vendor/k8s.io/utils/pointer/pointer.go index f5802d2e81be..2cab2c580026 100644 --- a/cluster-autoscaler/vendor/k8s.io/utils/pointer/pointer.go +++ b/cluster-autoscaler/vendor/k8s.io/utils/pointer/pointer.go @@ -19,7 +19,6 @@ package pointer import ( "fmt" "reflect" - "time" ) // AllPtrFieldsNil tests whether all pointer fields in a struct are nil. This is useful when, @@ -185,7 +184,7 @@ func StringEqual(a, b *string) bool { return *a == *b } -// Float32 returns a pointer to a float32. +// Float32 returns a pointer to the a float32. func Float32(i float32) *float32 { return &i } @@ -215,7 +214,7 @@ func Float32Equal(a, b *float32) bool { return *a == *b } -// Float64 returns a pointer to a float64. +// Float64 returns a pointer to the a float64. func Float64(i float64) *float64 { return &i } @@ -244,29 +243,3 @@ func Float64Equal(a, b *float64) bool { } return *a == *b } - -// Duration returns a pointer to a time.Duration. -func Duration(d time.Duration) *time.Duration { - return &d -} - -// DurationDeref dereferences the time.Duration ptr and returns it if not nil, or else -// returns def. -func DurationDeref(ptr *time.Duration, def time.Duration) time.Duration { - if ptr != nil { - return *ptr - } - return def -} - -// DurationEqual returns true if both arguments are nil or both arguments -// dereference to the same value. -func DurationEqual(a, b *time.Duration) bool { - if (a == nil) != (b == nil) { - return false - } - if a == nil { - return true - } - return *a == *b -} diff --git a/cluster-autoscaler/vendor/modules.txt b/cluster-autoscaler/vendor/modules.txt index 4f447884b9ac..2b84482a9f84 100644 --- a/cluster-autoscaler/vendor/modules.txt +++ b/cluster-autoscaler/vendor/modules.txt @@ -16,6 +16,9 @@ github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-02-01/storage github.com/Azure/azure-sdk-for-go/storage github.com/Azure/azure-sdk-for-go/version +# github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 +github.com/Azure/go-ansiterm +github.com/Azure/go-ansiterm/winterm # github.com/Azure/go-autorest v14.2.0+incompatible github.com/Azure/go-autorest # github.com/Azure/go-autorest/autorest v0.11.22 @@ -38,7 +41,7 @@ github.com/Azure/go-autorest/autorest/mocks # github.com/Azure/go-autorest/autorest/to v0.4.0 ## explicit github.com/Azure/go-autorest/autorest/to -# github.com/Azure/go-autorest/autorest/validation v0.3.1 +# github.com/Azure/go-autorest/autorest/validation v0.3.0 github.com/Azure/go-autorest/autorest/validation # github.com/Azure/go-autorest/logger v0.2.1 github.com/Azure/go-autorest/logger @@ -146,14 +149,16 @@ github.com/aws/aws-sdk-go/service/sts github.com/aws/aws-sdk-go/service/sts/stsiface # github.com/beorn7/perks v1.0.1 github.com/beorn7/perks/quantile -# github.com/blang/semver/v4 v4.0.0 -github.com/blang/semver/v4 +# github.com/bits-and-blooms/bitset v1.2.0 +github.com/bits-and-blooms/bitset +# github.com/blang/semver v3.5.1+incompatible +github.com/blang/semver # github.com/cespare/xxhash/v2 v2.1.2 github.com/cespare/xxhash/v2 -# github.com/checkpoint-restore/go-criu/v5 v5.3.0 +# github.com/checkpoint-restore/go-criu/v5 v5.0.0 github.com/checkpoint-restore/go-criu/v5 github.com/checkpoint-restore/go-criu/v5/rpc -# github.com/cilium/ebpf v0.7.0 +# github.com/cilium/ebpf v0.6.2 github.com/cilium/ebpf github.com/cilium/ebpf/asm github.com/cilium/ebpf/internal @@ -166,23 +171,34 @@ github.com/clusterhq/flocker-go github.com/container-storage-interface/spec/lib/go/csi # github.com/containerd/cgroups v1.0.1 github.com/containerd/cgroups/stats/v1 -# github.com/containerd/console v1.0.3 +# github.com/containerd/console v1.0.2 github.com/containerd/console -# github.com/containerd/containerd v1.4.12 +# github.com/containerd/containerd v1.4.11 github.com/containerd/containerd/api/services/containers/v1 github.com/containerd/containerd/api/services/tasks/v1 github.com/containerd/containerd/api/services/version/v1 github.com/containerd/containerd/api/types github.com/containerd/containerd/api/types/task +github.com/containerd/containerd/errdefs +github.com/containerd/containerd/log +github.com/containerd/containerd/platforms # github.com/containerd/ttrpc v1.0.2 github.com/containerd/ttrpc +# github.com/containernetworking/cni v0.8.1 +github.com/containernetworking/cni/libcni +github.com/containernetworking/cni/pkg/invoke +github.com/containernetworking/cni/pkg/types +github.com/containernetworking/cni/pkg/types/020 +github.com/containernetworking/cni/pkg/types/current +github.com/containernetworking/cni/pkg/utils +github.com/containernetworking/cni/pkg/version # github.com/coreos/go-semver v0.3.0 github.com/coreos/go-semver/semver # github.com/coreos/go-systemd/v22 v22.3.2 github.com/coreos/go-systemd/v22/daemon github.com/coreos/go-systemd/v22/dbus github.com/coreos/go-systemd/v22/journal -# github.com/cyphar/filepath-securejoin v0.2.3 +# github.com/cyphar/filepath-securejoin v0.2.2 github.com/cyphar/filepath-securejoin # github.com/davecgh/go-spew v1.1.1 github.com/davecgh/go-spew/spew @@ -191,9 +207,35 @@ github.com/davecgh/go-spew/spew github.com/digitalocean/godo # github.com/dimchansky/utfbom v1.1.1 github.com/dimchansky/utfbom -# github.com/docker/distribution v2.8.1+incompatible +# github.com/docker/distribution v2.7.1+incompatible github.com/docker/distribution/digestset github.com/docker/distribution/reference +github.com/docker/distribution/registry/api/errcode +# github.com/docker/docker v20.10.7+incompatible +github.com/docker/docker/api +github.com/docker/docker/api/types +github.com/docker/docker/api/types/blkiodev +github.com/docker/docker/api/types/container +github.com/docker/docker/api/types/events +github.com/docker/docker/api/types/filters +github.com/docker/docker/api/types/image +github.com/docker/docker/api/types/mount +github.com/docker/docker/api/types/network +github.com/docker/docker/api/types/registry +github.com/docker/docker/api/types/strslice +github.com/docker/docker/api/types/swarm +github.com/docker/docker/api/types/swarm/runtime +github.com/docker/docker/api/types/time +github.com/docker/docker/api/types/versions +github.com/docker/docker/api/types/volume +github.com/docker/docker/client +github.com/docker/docker/errdefs +github.com/docker/docker/pkg/jsonmessage +github.com/docker/docker/pkg/stdcopy +# github.com/docker/go-connections v0.4.0 +github.com/docker/go-connections/nat +github.com/docker/go-connections/sockets +github.com/docker/go-connections/tlsconfig # github.com/docker/go-units v0.4.0 github.com/docker/go-units # github.com/emicklei/go-restful v2.9.5+incompatible @@ -207,7 +249,7 @@ github.com/evanphx/json-patch github.com/felixge/httpsnoop # github.com/form3tech-oss/jwt-go v3.2.3+incompatible github.com/form3tech-oss/jwt-go -# github.com/fsnotify/fsnotify v1.5.1 +# github.com/fsnotify/fsnotify v1.4.9 github.com/fsnotify/fsnotify # github.com/ghodss/yaml v1.0.0 ## explicit @@ -223,7 +265,7 @@ github.com/go-openapi/swag # github.com/go-ozzo/ozzo-validation v3.5.0+incompatible github.com/go-ozzo/ozzo-validation github.com/go-ozzo/ozzo-validation/is -# github.com/godbus/dbus/v5 v5.0.6 +# github.com/godbus/dbus/v5 v5.0.4 github.com/godbus/dbus/v5 # github.com/gofrs/uuid v4.0.0+incompatible ## explicit @@ -252,7 +294,7 @@ github.com/golang/protobuf/ptypes/any github.com/golang/protobuf/ptypes/duration github.com/golang/protobuf/ptypes/timestamp github.com/golang/protobuf/ptypes/wrappers -# github.com/google/cadvisor v0.44.1 +# github.com/google/cadvisor v0.43.0 github.com/google/cadvisor/accelerators github.com/google/cadvisor/cache/memory github.com/google/cadvisor/collector @@ -267,6 +309,9 @@ github.com/google/cadvisor/container/containerd/namespaces github.com/google/cadvisor/container/containerd/pkg/dialer github.com/google/cadvisor/container/crio github.com/google/cadvisor/container/crio/install +github.com/google/cadvisor/container/docker +github.com/google/cadvisor/container/docker/install +github.com/google/cadvisor/container/docker/utils github.com/google/cadvisor/container/libcontainer github.com/google/cadvisor/container/raw github.com/google/cadvisor/container/systemd @@ -297,12 +342,7 @@ github.com/google/cadvisor/utils/sysfs github.com/google/cadvisor/utils/sysinfo github.com/google/cadvisor/version github.com/google/cadvisor/watcher -# github.com/google/gnostic v0.5.7-v3refs -github.com/google/gnostic/compiler -github.com/google/gnostic/extensions -github.com/google/gnostic/jsonschema -github.com/google/gnostic/openapiv2 -github.com/google/gnostic/openapiv3 +github.com/google/cadvisor/zfs # github.com/google/go-cmp v0.5.5 github.com/google/go-cmp/cmp github.com/google/go-cmp/cmp/cmpopts @@ -320,6 +360,12 @@ github.com/google/gofuzz github.com/google/uuid # github.com/googleapis/gax-go/v2 v2.0.5 github.com/googleapis/gax-go/v2 +# github.com/googleapis/gnostic v0.5.5 +github.com/googleapis/gnostic/compiler +github.com/googleapis/gnostic/extensions +github.com/googleapis/gnostic/jsonschema +github.com/googleapis/gnostic/openapiv2 +github.com/googleapis/gnostic/openapiv3 # github.com/gophercloud/gophercloud v0.1.0 github.com/gophercloud/gophercloud github.com/gophercloud/gophercloud/openstack @@ -405,14 +451,19 @@ github.com/moby/ipvs # github.com/moby/spdystream v0.2.0 github.com/moby/spdystream github.com/moby/spdystream/spdy -# github.com/moby/sys/mountinfo v0.6.0 +# github.com/moby/sys/mountinfo v0.4.1 github.com/moby/sys/mountinfo +# github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 +github.com/moby/term +github.com/moby/term/windows # github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd github.com/modern-go/concurrent # github.com/modern-go/reflect2 v1.0.2 github.com/modern-go/reflect2 # github.com/mohae/deepcopy v0.0.0-20170603005431-491d3605edfb github.com/mohae/deepcopy +# github.com/morikuni/aec v1.0.0 +github.com/morikuni/aec # github.com/mrunalp/fileutils v0.5.0 github.com/mrunalp/fileutils # github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 @@ -421,7 +472,10 @@ github.com/munnerz/goautoneg github.com/mxk/go-flowrate/flowrate # github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/go-digest -# github.com/opencontainers/runc v1.1.1 +# github.com/opencontainers/image-spec v1.0.1 +github.com/opencontainers/image-spec/specs-go +github.com/opencontainers/image-spec/specs-go/v1 +# github.com/opencontainers/runc v1.0.2 github.com/opencontainers/runc/libcontainer github.com/opencontainers/runc/libcontainer/apparmor github.com/opencontainers/runc/libcontainer/capabilities @@ -432,7 +486,6 @@ github.com/opencontainers/runc/libcontainer/cgroups/ebpf/devicefilter github.com/opencontainers/runc/libcontainer/cgroups/fs github.com/opencontainers/runc/libcontainer/cgroups/fs2 github.com/opencontainers/runc/libcontainer/cgroups/fscommon -github.com/opencontainers/runc/libcontainer/cgroups/manager github.com/opencontainers/runc/libcontainer/cgroups/systemd github.com/opencontainers/runc/libcontainer/configs github.com/opencontainers/runc/libcontainer/configs/validate @@ -442,6 +495,7 @@ github.com/opencontainers/runc/libcontainer/keys github.com/opencontainers/runc/libcontainer/logs github.com/opencontainers/runc/libcontainer/seccomp github.com/opencontainers/runc/libcontainer/seccomp/patchbpf +github.com/opencontainers/runc/libcontainer/stacktrace github.com/opencontainers/runc/libcontainer/system github.com/opencontainers/runc/libcontainer/user github.com/opencontainers/runc/libcontainer/userns @@ -449,11 +503,10 @@ github.com/opencontainers/runc/libcontainer/utils github.com/opencontainers/runc/types # github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 github.com/opencontainers/runtime-spec/specs-go -# github.com/opencontainers/selinux v1.10.0 +# github.com/opencontainers/selinux v1.8.2 github.com/opencontainers/selinux/go-selinux github.com/opencontainers/selinux/go-selinux/label github.com/opencontainers/selinux/pkg/pwalk -github.com/opencontainers/selinux/pkg/pwalkdir # github.com/pkg/errors v0.9.1 ## explicit github.com/pkg/errors @@ -483,11 +536,11 @@ github.com/rubiojr/go-vhd/vhd # github.com/satori/go.uuid v1.2.0 ## explicit github.com/satori/go.uuid -# github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921 +# github.com/seccomp/libseccomp-golang v0.9.1 github.com/seccomp/libseccomp-golang # github.com/sirupsen/logrus v1.8.1 github.com/sirupsen/logrus -# github.com/spf13/cobra v1.4.0 +# github.com/spf13/cobra v1.2.1 github.com/spf13/cobra # github.com/spf13/pflag v1.0.5 ## explicit @@ -539,21 +592,21 @@ github.com/vmware/govmomi/vim25/progress github.com/vmware/govmomi/vim25/soap github.com/vmware/govmomi/vim25/types github.com/vmware/govmomi/vim25/xml -# go.etcd.io/etcd/api/v3 v3.5.1 +# go.etcd.io/etcd/api/v3 v3.5.0 go.etcd.io/etcd/api/v3/authpb go.etcd.io/etcd/api/v3/etcdserverpb go.etcd.io/etcd/api/v3/membershippb go.etcd.io/etcd/api/v3/mvccpb go.etcd.io/etcd/api/v3/v3rpc/rpctypes go.etcd.io/etcd/api/v3/version -# go.etcd.io/etcd/client/pkg/v3 v3.5.1 +# go.etcd.io/etcd/client/pkg/v3 v3.5.0 go.etcd.io/etcd/client/pkg/v3/fileutil go.etcd.io/etcd/client/pkg/v3/logutil go.etcd.io/etcd/client/pkg/v3/systemd go.etcd.io/etcd/client/pkg/v3/tlsutil go.etcd.io/etcd/client/pkg/v3/transport go.etcd.io/etcd/client/pkg/v3/types -# go.etcd.io/etcd/client/v3 v3.5.1 +# go.etcd.io/etcd/client/v3 v3.5.0 go.etcd.io/etcd/client/v3 go.etcd.io/etcd/client/v3/credentials go.etcd.io/etcd/client/v3/internal/endpoint @@ -645,7 +698,7 @@ go.uber.org/zap/internal/color go.uber.org/zap/internal/exit go.uber.org/zap/zapcore go.uber.org/zap/zapgrpc -# golang.org/x/crypto v0.0.0-20220214200702-86341886e292 +# golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 ## explicit golang.org/x/crypto/cryptobyte golang.org/x/crypto/cryptobyte/asn1 @@ -655,7 +708,7 @@ golang.org/x/crypto/nacl/secretbox golang.org/x/crypto/pkcs12 golang.org/x/crypto/pkcs12/internal/rc2 golang.org/x/crypto/salsa20/salsa -# golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd +# golang.org/x/net v0.0.0-20210825183410-e898025ed96a golang.org/x/net/bpf golang.org/x/net/context golang.org/x/net/context/ctxhttp @@ -670,7 +723,7 @@ golang.org/x/net/internal/timeseries golang.org/x/net/proxy golang.org/x/net/trace golang.org/x/net/websocket -# golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 +# golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f ## explicit golang.org/x/oauth2 golang.org/x/oauth2/authhandler @@ -682,7 +735,7 @@ golang.org/x/oauth2/jws golang.org/x/oauth2/jwt # golang.org/x/sync v0.0.0-20210220032951-036812b2e83c golang.org/x/sync/singleflight -# golang.org/x/sys v0.0.0-20220209214540-3681064d5158 +# golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 golang.org/x/sys/cpu golang.org/x/sys/internal/unsafeheader golang.org/x/sys/plan9 @@ -690,7 +743,7 @@ golang.org/x/sys/unix golang.org/x/sys/windows golang.org/x/sys/windows/registry golang.org/x/sys/windows/svc -# golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 +# golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b golang.org/x/term # golang.org/x/text v0.3.7 golang.org/x/text/encoding @@ -704,7 +757,7 @@ golang.org/x/text/transform golang.org/x/text/unicode/bidi golang.org/x/text/unicode/norm golang.org/x/text/width -# golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 +# golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac golang.org/x/time/rate # golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 golang.org/x/xerrors @@ -739,7 +792,7 @@ google.golang.org/appengine/internal/modules google.golang.org/appengine/internal/remote_api google.golang.org/appengine/internal/urlfetch google.golang.org/appengine/urlfetch -# google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368 +# google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2 google.golang.org/genproto/googleapis/api/annotations google.golang.org/genproto/googleapis/api/httpbody google.golang.org/genproto/googleapis/rpc/status @@ -846,7 +899,7 @@ gopkg.in/warnings.v0 gopkg.in/yaml.v2 # gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b gopkg.in/yaml.v3 -# k8s.io/api v0.24.0 => k8s.io/api v0.24.0 +# k8s.io/api v0.23.0 => k8s.io/api v0.23.0 ## explicit k8s.io/api/admission/v1 k8s.io/api/admission/v1beta1 @@ -895,7 +948,7 @@ k8s.io/api/scheduling/v1beta1 k8s.io/api/storage/v1 k8s.io/api/storage/v1alpha1 k8s.io/api/storage/v1beta1 -# k8s.io/apimachinery v0.24.0 => k8s.io/apimachinery v0.24.1-rc.0 +# k8s.io/apimachinery v0.23.0 => k8s.io/apimachinery v0.23.1-rc.0 ## explicit k8s.io/apimachinery/pkg/api/equality k8s.io/apimachinery/pkg/api/errors @@ -955,7 +1008,7 @@ k8s.io/apimachinery/pkg/watch k8s.io/apimachinery/third_party/forked/golang/json k8s.io/apimachinery/third_party/forked/golang/netutil k8s.io/apimachinery/third_party/forked/golang/reflect -# k8s.io/apiserver v0.24.0 => k8s.io/apiserver v0.24.0 +# k8s.io/apiserver v0.23.0 => k8s.io/apiserver v0.23.0 ## explicit k8s.io/apiserver/pkg/admission k8s.io/apiserver/pkg/admission/configuration @@ -983,6 +1036,8 @@ k8s.io/apiserver/pkg/apis/apiserver/v1beta1 k8s.io/apiserver/pkg/apis/audit k8s.io/apiserver/pkg/apis/audit/install k8s.io/apiserver/pkg/apis/audit/v1 +k8s.io/apiserver/pkg/apis/audit/v1alpha1 +k8s.io/apiserver/pkg/apis/audit/v1beta1 k8s.io/apiserver/pkg/apis/audit/validation k8s.io/apiserver/pkg/apis/config k8s.io/apiserver/pkg/apis/config/v1 @@ -1083,7 +1138,7 @@ k8s.io/apiserver/plugin/pkg/audit/truncate k8s.io/apiserver/plugin/pkg/audit/webhook k8s.io/apiserver/plugin/pkg/authenticator/token/webhook k8s.io/apiserver/plugin/pkg/authorizer/webhook -# k8s.io/client-go v0.24.0 => k8s.io/client-go v0.24.0 +# k8s.io/client-go v0.23.0 => k8s.io/client-go v0.23.0 ## explicit k8s.io/client-go/applyconfigurations/admissionregistration/v1 k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1 @@ -1330,11 +1385,10 @@ k8s.io/client-go/listers/scheduling/v1beta1 k8s.io/client-go/listers/storage/v1 k8s.io/client-go/listers/storage/v1alpha1 k8s.io/client-go/listers/storage/v1beta1 -k8s.io/client-go/openapi -k8s.io/client-go/openapi/cached k8s.io/client-go/pkg/apis/clientauthentication k8s.io/client-go/pkg/apis/clientauthentication/install k8s.io/client-go/pkg/apis/clientauthentication/v1 +k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1 k8s.io/client-go/pkg/apis/clientauthentication/v1beta1 k8s.io/client-go/pkg/version k8s.io/client-go/plugin/pkg/client/auth/exec @@ -1380,7 +1434,7 @@ k8s.io/client-go/util/homedir k8s.io/client-go/util/keyutil k8s.io/client-go/util/retry k8s.io/client-go/util/workqueue -# k8s.io/cloud-provider v0.24.0 => k8s.io/cloud-provider v0.24.0 +# k8s.io/cloud-provider v0.23.0 => k8s.io/cloud-provider v0.23.0 ## explicit k8s.io/cloud-provider k8s.io/cloud-provider/api @@ -1390,7 +1444,7 @@ k8s.io/cloud-provider/service/helpers k8s.io/cloud-provider/volume k8s.io/cloud-provider/volume/errors k8s.io/cloud-provider/volume/helpers -# k8s.io/component-base v0.24.0 => k8s.io/component-base v0.24.0 +# k8s.io/component-base v0.23.0 => k8s.io/component-base v0.23.0 ## explicit k8s.io/component-base/cli/flag k8s.io/component-base/codec @@ -1401,8 +1455,10 @@ k8s.io/component-base/config/validation k8s.io/component-base/configz k8s.io/component-base/featuregate k8s.io/component-base/logs +k8s.io/component-base/logs/datapol k8s.io/component-base/logs/logreduction k8s.io/component-base/logs/registry +k8s.io/component-base/logs/sanitization k8s.io/component-base/metrics k8s.io/component-base/metrics/legacyregistry k8s.io/component-base/metrics/prometheus/ratelimiter @@ -1412,7 +1468,7 @@ k8s.io/component-base/metrics/testutil k8s.io/component-base/traces k8s.io/component-base/version k8s.io/component-base/version/verflag -# k8s.io/component-helpers v0.24.0 => k8s.io/component-helpers v0.24.0 +# k8s.io/component-helpers v0.23.0 => k8s.io/component-helpers v0.23.0 ## explicit k8s.io/component-helpers/apimachinery/lease k8s.io/component-helpers/node/topology @@ -1422,46 +1478,37 @@ k8s.io/component-helpers/scheduling/corev1 k8s.io/component-helpers/scheduling/corev1/nodeaffinity k8s.io/component-helpers/storage/ephemeral k8s.io/component-helpers/storage/volume -# k8s.io/cri-api v0.0.0 => k8s.io/cri-api v0.25.0-alpha.0 +# k8s.io/cri-api v0.0.0 => k8s.io/cri-api v0.23.1-rc.0 k8s.io/cri-api/pkg/apis k8s.io/cri-api/pkg/apis/runtime/v1 k8s.io/cri-api/pkg/apis/runtime/v1alpha2 -k8s.io/cri-api/pkg/errors -# k8s.io/csi-translation-lib v0.24.0 => k8s.io/csi-translation-lib v0.24.0 +# k8s.io/csi-translation-lib v0.23.0 => k8s.io/csi-translation-lib v0.23.0 k8s.io/csi-translation-lib k8s.io/csi-translation-lib/plugins -# k8s.io/klog/v2 v2.60.1 +# k8s.io/klog/v2 v2.30.0 ## explicit k8s.io/klog/v2 -k8s.io/klog/v2/internal/buffer -k8s.io/klog/v2/internal/clock -k8s.io/klog/v2/internal/serialize -k8s.io/klog/v2/internal/severity -# k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 +# k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 k8s.io/kube-openapi/pkg/builder k8s.io/kube-openapi/pkg/builder3 -k8s.io/kube-openapi/pkg/builder3/util k8s.io/kube-openapi/pkg/common -k8s.io/kube-openapi/pkg/common/restfuladapter k8s.io/kube-openapi/pkg/handler k8s.io/kube-openapi/pkg/handler3 -k8s.io/kube-openapi/pkg/internal/handler -k8s.io/kube-openapi/pkg/openapiconv k8s.io/kube-openapi/pkg/schemaconv k8s.io/kube-openapi/pkg/schemamutation k8s.io/kube-openapi/pkg/spec3 k8s.io/kube-openapi/pkg/util k8s.io/kube-openapi/pkg/util/proto k8s.io/kube-openapi/pkg/validation/spec -# k8s.io/kube-proxy v0.0.0 => k8s.io/kube-proxy v0.24.0 +# k8s.io/kube-proxy v0.0.0 => k8s.io/kube-proxy v0.23.0 k8s.io/kube-proxy/config/v1alpha1 -# k8s.io/kube-scheduler v0.0.0 => k8s.io/kube-scheduler v0.24.0 +# k8s.io/kube-scheduler v0.0.0 => k8s.io/kube-scheduler v0.23.0 k8s.io/kube-scheduler/config/v1beta2 k8s.io/kube-scheduler/config/v1beta3 k8s.io/kube-scheduler/extender/v1 -# k8s.io/kubectl v0.0.0 => k8s.io/kubectl v0.24.0 +# k8s.io/kubectl v0.0.0 => k8s.io/kubectl v0.23.0 k8s.io/kubectl/pkg/scale -# k8s.io/kubelet v0.23.0 => k8s.io/kubelet v0.24.0 +# k8s.io/kubelet v0.0.0 => k8s.io/kubelet v0.23.0 ## explicit k8s.io/kubelet/config/v1alpha1 k8s.io/kubelet/config/v1beta1 @@ -1469,13 +1516,12 @@ k8s.io/kubelet/pkg/apis k8s.io/kubelet/pkg/apis/credentialprovider k8s.io/kubelet/pkg/apis/credentialprovider/install k8s.io/kubelet/pkg/apis/credentialprovider/v1alpha1 -k8s.io/kubelet/pkg/apis/credentialprovider/v1beta1 k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1 k8s.io/kubelet/pkg/apis/pluginregistration/v1 k8s.io/kubelet/pkg/apis/podresources/v1 k8s.io/kubelet/pkg/apis/podresources/v1alpha1 k8s.io/kubelet/pkg/apis/stats/v1alpha1 -# k8s.io/kubernetes v1.24.0 +# k8s.io/kubernetes v1.23.0 ## explicit k8s.io/kubernetes/cmd/kube-proxy/app k8s.io/kubernetes/cmd/kubelet/app @@ -1511,6 +1557,7 @@ k8s.io/kubernetes/pkg/controller k8s.io/kubernetes/pkg/controller/daemon k8s.io/kubernetes/pkg/controller/daemon/util k8s.io/kubernetes/pkg/controller/deployment/util +k8s.io/kubernetes/pkg/controller/volume/persistentvolume/util k8s.io/kubernetes/pkg/credentialprovider k8s.io/kubernetes/pkg/credentialprovider/aws k8s.io/kubernetes/pkg/credentialprovider/azure @@ -1556,16 +1603,33 @@ k8s.io/kubernetes/pkg/kubelet/cri/remote/util k8s.io/kubernetes/pkg/kubelet/cri/streaming k8s.io/kubernetes/pkg/kubelet/cri/streaming/portforward k8s.io/kubernetes/pkg/kubelet/cri/streaming/remotecommand +k8s.io/kubernetes/pkg/kubelet/dockershim +k8s.io/kubernetes/pkg/kubelet/dockershim/cm +k8s.io/kubernetes/pkg/kubelet/dockershim/libdocker +k8s.io/kubernetes/pkg/kubelet/dockershim/metrics +k8s.io/kubernetes/pkg/kubelet/dockershim/network +k8s.io/kubernetes/pkg/kubelet/dockershim/network/cni +k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport +k8s.io/kubernetes/pkg/kubelet/dockershim/network/kubenet +k8s.io/kubernetes/pkg/kubelet/dockershim/network/metrics +k8s.io/kubernetes/pkg/kubelet/dockershim/remote k8s.io/kubernetes/pkg/kubelet/envvars k8s.io/kubernetes/pkg/kubelet/events k8s.io/kubernetes/pkg/kubelet/eviction k8s.io/kubernetes/pkg/kubelet/eviction/api k8s.io/kubernetes/pkg/kubelet/images +k8s.io/kubernetes/pkg/kubelet/kubeletconfig +k8s.io/kubernetes/pkg/kubelet/kubeletconfig/checkpoint +k8s.io/kubernetes/pkg/kubelet/kubeletconfig/checkpoint/store k8s.io/kubernetes/pkg/kubelet/kubeletconfig/configfiles +k8s.io/kubernetes/pkg/kubelet/kubeletconfig/status k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/codec +k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/files +k8s.io/kubernetes/pkg/kubelet/kubeletconfig/util/panic k8s.io/kubernetes/pkg/kubelet/kuberuntime k8s.io/kubernetes/pkg/kubelet/kuberuntime/logs k8s.io/kubernetes/pkg/kubelet/leaky +k8s.io/kubernetes/pkg/kubelet/legacy k8s.io/kubernetes/pkg/kubelet/lifecycle k8s.io/kubernetes/pkg/kubelet/logs k8s.io/kubernetes/pkg/kubelet/metrics @@ -1588,7 +1652,6 @@ k8s.io/kubernetes/pkg/kubelet/pod k8s.io/kubernetes/pkg/kubelet/preemption k8s.io/kubernetes/pkg/kubelet/prober k8s.io/kubernetes/pkg/kubelet/prober/results -k8s.io/kubernetes/pkg/kubelet/prober/testing k8s.io/kubernetes/pkg/kubelet/qos k8s.io/kubernetes/pkg/kubelet/runtimeclass k8s.io/kubernetes/pkg/kubelet/secret @@ -1638,7 +1701,6 @@ k8s.io/kubernetes/pkg/proxy/util k8s.io/kubernetes/pkg/proxy/util/iptables k8s.io/kubernetes/pkg/proxy/winkernel k8s.io/kubernetes/pkg/proxy/winuserspace -k8s.io/kubernetes/pkg/scheduler k8s.io/kubernetes/pkg/scheduler/apis/config k8s.io/kubernetes/pkg/scheduler/apis/config/latest k8s.io/kubernetes/pkg/scheduler/apis/config/scheme @@ -1671,12 +1733,7 @@ k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumerestrictions k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumezone k8s.io/kubernetes/pkg/scheduler/framework/preemption k8s.io/kubernetes/pkg/scheduler/framework/runtime -k8s.io/kubernetes/pkg/scheduler/internal/cache -k8s.io/kubernetes/pkg/scheduler/internal/cache/debugger -k8s.io/kubernetes/pkg/scheduler/internal/heap -k8s.io/kubernetes/pkg/scheduler/internal/queue k8s.io/kubernetes/pkg/scheduler/metrics -k8s.io/kubernetes/pkg/scheduler/profile k8s.io/kubernetes/pkg/scheduler/util k8s.io/kubernetes/pkg/security/apparmor k8s.io/kubernetes/pkg/security/podsecuritypolicy/seccomp @@ -1684,6 +1741,7 @@ k8s.io/kubernetes/pkg/security/podsecuritypolicy/sysctl k8s.io/kubernetes/pkg/security/podsecuritypolicy/util k8s.io/kubernetes/pkg/securitycontext k8s.io/kubernetes/pkg/util/async +k8s.io/kubernetes/pkg/util/bandwidth k8s.io/kubernetes/pkg/util/config k8s.io/kubernetes/pkg/util/conntrack k8s.io/kubernetes/pkg/util/env @@ -1702,8 +1760,11 @@ k8s.io/kubernetes/pkg/util/node k8s.io/kubernetes/pkg/util/oom k8s.io/kubernetes/pkg/util/parsers k8s.io/kubernetes/pkg/util/pod +k8s.io/kubernetes/pkg/util/procfs k8s.io/kubernetes/pkg/util/removeall k8s.io/kubernetes/pkg/util/rlimit +k8s.io/kubernetes/pkg/util/selinux +k8s.io/kubernetes/pkg/util/slice k8s.io/kubernetes/pkg/util/tail k8s.io/kubernetes/pkg/util/taints k8s.io/kubernetes/pkg/volume @@ -1750,7 +1811,7 @@ k8s.io/kubernetes/pkg/volume/vsphere_volume k8s.io/kubernetes/pkg/windows/service k8s.io/kubernetes/test/utils k8s.io/kubernetes/third_party/forked/golang/expansion -# k8s.io/legacy-cloud-providers v0.0.0 => k8s.io/legacy-cloud-providers v0.24.0 +# k8s.io/legacy-cloud-providers v0.0.0 => k8s.io/legacy-cloud-providers v0.23.0 ## explicit k8s.io/legacy-cloud-providers/aws k8s.io/legacy-cloud-providers/azure @@ -1794,9 +1855,9 @@ k8s.io/legacy-cloud-providers/openstack k8s.io/legacy-cloud-providers/vsphere k8s.io/legacy-cloud-providers/vsphere/vclib k8s.io/legacy-cloud-providers/vsphere/vclib/diskmanagers -# k8s.io/mount-utils v0.24.0 => k8s.io/mount-utils v0.24.1-rc.0 +# k8s.io/mount-utils v0.23.0 => k8s.io/mount-utils v0.23.2-rc.0 k8s.io/mount-utils -# k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 +# k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b ## explicit k8s.io/utils/buffer k8s.io/utils/clock @@ -1810,16 +1871,17 @@ k8s.io/utils/io k8s.io/utils/keymutex k8s.io/utils/lru k8s.io/utils/net +k8s.io/utils/net/ebtables k8s.io/utils/nsenter k8s.io/utils/path k8s.io/utils/pointer k8s.io/utils/strings k8s.io/utils/strings/slices k8s.io/utils/trace -# sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.30 +# sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25 sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client sigs.k8s.io/apiserver-network-proxy/konnectivity-client/proto/client -# sigs.k8s.io/cloud-provider-azure v1.23.2 +# sigs.k8s.io/cloud-provider-azure v1.1.3 ## explicit sigs.k8s.io/cloud-provider-azure/pkg/auth sigs.k8s.io/cloud-provider-azure/pkg/azureclients @@ -1867,44 +1929,44 @@ sigs.k8s.io/cloud-provider-azure/pkg/metrics sigs.k8s.io/cloud-provider-azure/pkg/provider sigs.k8s.io/cloud-provider-azure/pkg/retry sigs.k8s.io/cloud-provider-azure/pkg/version -# sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 +# sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 sigs.k8s.io/json sigs.k8s.io/json/internal/golang/encoding/json -# sigs.k8s.io/structured-merge-diff/v4 v4.2.1 +# sigs.k8s.io/structured-merge-diff/v4 v4.1.2 sigs.k8s.io/structured-merge-diff/v4/fieldpath sigs.k8s.io/structured-merge-diff/v4/merge sigs.k8s.io/structured-merge-diff/v4/schema sigs.k8s.io/structured-merge-diff/v4/typed sigs.k8s.io/structured-merge-diff/v4/value -# sigs.k8s.io/yaml v1.3.0 +# sigs.k8s.io/yaml v1.2.0 sigs.k8s.io/yaml # github.com/aws/aws-sdk-go/service/eks => github.com/aws/aws-sdk-go/service/eks v1.38.49 # github.com/digitalocean/godo => github.com/digitalocean/godo v1.27.0 # github.com/rancher/go-rancher => github.com/rancher/go-rancher v0.1.0 -# k8s.io/api => k8s.io/api v0.24.0 -# k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.24.0 -# k8s.io/apimachinery => k8s.io/apimachinery v0.24.1-rc.0 -# k8s.io/apiserver => k8s.io/apiserver v0.24.0 -# k8s.io/cli-runtime => k8s.io/cli-runtime v0.24.0 -# k8s.io/client-go => k8s.io/client-go v0.24.0 -# k8s.io/cloud-provider => k8s.io/cloud-provider v0.24.0 -# k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.24.0 -# k8s.io/code-generator => k8s.io/code-generator v0.24.1-rc.0 -# k8s.io/component-base => k8s.io/component-base v0.24.0 -# k8s.io/component-helpers => k8s.io/component-helpers v0.24.0 -# k8s.io/controller-manager => k8s.io/controller-manager v0.24.0 -# k8s.io/cri-api => k8s.io/cri-api v0.25.0-alpha.0 -# k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.24.0 -# k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.24.0 -# k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.24.0 -# k8s.io/kube-proxy => k8s.io/kube-proxy v0.24.0 -# k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.24.0 -# k8s.io/kubectl => k8s.io/kubectl v0.24.0 -# k8s.io/kubelet => k8s.io/kubelet v0.24.0 -# k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.24.0 -# k8s.io/metrics => k8s.io/metrics v0.24.0 -# k8s.io/mount-utils => k8s.io/mount-utils v0.24.1-rc.0 -# k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.24.0 -# k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.24.0 -# k8s.io/sample-controller => k8s.io/sample-controller v0.24.0 -# k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.24.0 +# k8s.io/api => k8s.io/api v0.23.0 +# k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.23.0 +# k8s.io/apimachinery => k8s.io/apimachinery v0.23.1-rc.0 +# k8s.io/apiserver => k8s.io/apiserver v0.23.0 +# k8s.io/cli-runtime => k8s.io/cli-runtime v0.23.0 +# k8s.io/client-go => k8s.io/client-go v0.23.0 +# k8s.io/cloud-provider => k8s.io/cloud-provider v0.23.0 +# k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.23.0 +# k8s.io/code-generator => k8s.io/code-generator v0.23.1-rc.0 +# k8s.io/component-base => k8s.io/component-base v0.23.0 +# k8s.io/component-helpers => k8s.io/component-helpers v0.23.0 +# k8s.io/controller-manager => k8s.io/controller-manager v0.23.0 +# k8s.io/cri-api => k8s.io/cri-api v0.23.1-rc.0 +# k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.23.0 +# k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.23.0 +# k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.23.0 +# k8s.io/kube-proxy => k8s.io/kube-proxy v0.23.0 +# k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.23.0 +# k8s.io/kubectl => k8s.io/kubectl v0.23.0 +# k8s.io/kubelet => k8s.io/kubelet v0.23.0 +# k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.23.0 +# k8s.io/metrics => k8s.io/metrics v0.23.0 +# k8s.io/mount-utils => k8s.io/mount-utils v0.23.2-rc.0 +# k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.23.0 +# k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.23.0 +# k8s.io/sample-controller => k8s.io/sample-controller v0.23.0 +# k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.23.0 diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/client.go b/cluster-autoscaler/vendor/sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/client.go index a3e17cb103e3..31bf9e11fe52 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/client.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/client.go @@ -43,17 +43,10 @@ type dialResult struct { connid int64 } -type pendingDial struct { - // resultCh is the channel to send the dial result to - resultCh chan<- dialResult - // cancelCh is the channel closed when resultCh no longer has a receiver - cancelCh <-chan struct{} -} - // grpcTunnel implements Tunnel type grpcTunnel struct { stream client.ProxyService_ProxyClient - pendingDial map[int64]pendingDial + pendingDial map[int64]chan<- dialResult conns map[int64]*conn pendingDialLock sync.RWMutex connsLock sync.RWMutex @@ -83,13 +76,12 @@ func CreateSingleUseGrpcTunnel(ctx context.Context, address string, opts ...grpc stream, err := grpcClient.Proxy(ctx) if err != nil { - c.Close() return nil, err } tunnel := &grpcTunnel{ stream: stream, - pendingDial: make(map[int64]pendingDial), + pendingDial: make(map[int64]chan<- dialResult), conns: make(map[int64]*conn), readTimeoutSeconds: 10, } @@ -118,28 +110,21 @@ func (t *grpcTunnel) serve(c clientConn) { case client.PacketType_DIAL_RSP: resp := pkt.GetDialResponse() t.pendingDialLock.RLock() - pendingDial, ok := t.pendingDial[resp.Random] + ch, ok := t.pendingDial[resp.Random] t.pendingDialLock.RUnlock() if !ok { - klog.V(1).InfoS("DialResp not recognized; dropped", "connectionID", resp.ConnectID, "dialID", resp.Random) - return + klog.V(1).Infoln("DialResp not recognized; dropped") } else { result := dialResult{ err: resp.Error, connid: resp.ConnectID, } - select { - // try to send to the result channel - case pendingDial.resultCh <- result: - // unblock if the cancel channel is closed - case <-pendingDial.cancelCh: - // If there are no readers of the pending dial channel above, it means one of two things: - // 1. There was a second DIAL_RSP for the connection request (this is very unlikely but possible) - // 2. grpcTunnel.DialContext() returned early due to a dial timeout or the client canceling the context - // - // In either scenario, we should return here as this tunnel is no longer needed. - klog.V(1).InfoS("Pending dial has been cancelled; dropped", "connectionID", resp.ConnectID, "dialID", resp.Random) + select { + case ch <- result: + default: + klog.ErrorS(fmt.Errorf("blocked pending channel"), "Received second dial response for connection request", "connectionID", resp.ConnectID, "dialID", resp.Random) + // On multiple dial responses, avoid leaking serve goroutine. return } } @@ -196,16 +181,9 @@ func (t *grpcTunnel) DialContext(ctx context.Context, protocol, address string) } random := rand.Int63() /* #nosec G404 */ - - // This channel is closed once we're returning and no longer waiting on resultCh - cancelCh := make(chan struct{}) - defer close(cancelCh) - - // This channel MUST NOT be buffered. The sender needs to know when we are not receiving things, so they can abort. - resCh := make(chan dialResult) - + resCh := make(chan dialResult, 1) t.pendingDialLock.Lock() - t.pendingDial[random] = pendingDial{resultCh: resCh, cancelCh: cancelCh} + t.pendingDial[random] = resCh t.pendingDialLock.Unlock() defer func() { t.pendingDialLock.Lock() @@ -246,10 +224,8 @@ func (t *grpcTunnel) DialContext(ctx context.Context, protocol, address string) t.conns[res.connid] = c t.connsLock.Unlock() case <-time.After(30 * time.Second): - klog.V(5).InfoS("Timed out waiting for DialResp", "dialID", random) return nil, errors.New("dial timeout, backstop") case <-ctx.Done(): - klog.V(5).InfoS("Context canceled waiting for DialResp", "ctxErr", ctx.Err(), "dialID", random) return nil, errors.New("dial timeout, context") } diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/auth/azure_auth.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/auth/azure_auth.go index 730a0a2c5b33..2dfa5d3fe267 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/auth/azure_auth.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/auth/azure_auth.go @@ -237,12 +237,14 @@ func ParseAzureEnvironment(cloudName, resourceManagerEndpoint, identitySystem st return &env, err } -// UsesNetworkResourceInDifferentTenantOrSubscription determines whether the AzureAuthConfig indicates to use network resources in different AAD Tenant and Subscription than those for the cluster -// Return true when one of NetworkResourceTenantID and NetworkResourceSubscriptionID are specified -// and equal to one defined in global configs -func (config *AzureAuthConfig) UsesNetworkResourceInDifferentTenantOrSubscription() bool { - return (len(config.NetworkResourceTenantID) > 0 && !strings.EqualFold(config.NetworkResourceTenantID, config.TenantID)) || - (len(config.NetworkResourceSubscriptionID) > 0 && !strings.EqualFold(config.NetworkResourceSubscriptionID, config.SubscriptionID)) +// UsesNetworkResourceInDifferentTenant determines whether the AzureAuthConfig indicates to use network resources in different AAD Tenant and Subscription than those for the cluster +// Return true only when both NetworkResourceTenantID and NetworkResourceSubscriptionID are specified +// and they are not equals to TenantID and SubscriptionID +func (config *AzureAuthConfig) UsesNetworkResourceInDifferentTenant() bool { + return len(config.NetworkResourceTenantID) > 0 && + len(config.NetworkResourceSubscriptionID) > 0 && + !strings.EqualFold(config.NetworkResourceTenantID, config.TenantID) && + !strings.EqualFold(config.NetworkResourceSubscriptionID, config.SubscriptionID) } // decodePkcs12 decodes a PKCS#12 client certificate by extracting the public certificate and @@ -274,7 +276,7 @@ func azureStackOverrides(env *azure.Environment, resourceManagerEndpoint, identi // checkConfigWhenNetworkResourceInDifferentTenant checks configuration for the scenario of using network resource in different tenant func (config *AzureAuthConfig) checkConfigWhenNetworkResourceInDifferentTenant() error { - if !config.UsesNetworkResourceInDifferentTenantOrSubscription() { + if !config.UsesNetworkResourceInDifferentTenant() { return fmt.Errorf("NetworkResourceTenantID and NetworkResourceSubscriptionID must be configured") } diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/armclient/azure_armclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/armclient/azure_armclient.go index 350128667c97..895f01bfafd7 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/armclient/azure_armclient.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/armclient/azure_armclient.go @@ -31,8 +31,6 @@ import ( "time" "unicode" - "sigs.k8s.io/cloud-provider-azure/pkg/azureclients" - "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" @@ -77,35 +75,20 @@ type Client struct { } // New creates a ARM client -func New(authorizer autorest.Authorizer, clientConfig azureclients.ClientConfig, baseURI, apiVersion string) *Client { - restClient := autorest.NewClientWithUserAgent(clientConfig.UserAgent) +func New(authorizer autorest.Authorizer, baseURI, userAgent, apiVersion, clientRegion string, clientBackoff *retry.Backoff) *Client { + restClient := autorest.NewClientWithUserAgent(userAgent) + restClient.PollingDelay = 5 * time.Second + restClient.RetryAttempts = 3 + restClient.RetryDuration = time.Second * 1 restClient.Authorizer = authorizer restClient.Sender = getSender() restClient.Sender = autorest.DecorateSender(restClient.Sender, autorest.DoCloseIfError()) - if clientConfig.UserAgent == "" { + if userAgent == "" { restClient.UserAgent = GetUserAgent(restClient) } - if clientConfig.RestClientConfig.PollingDelay == nil { - restClient.PollingDelay = 5 * time.Second - } else { - restClient.PollingDelay = *clientConfig.RestClientConfig.PollingDelay - } - - if clientConfig.RestClientConfig.RetryAttempts == nil { - restClient.RetryAttempts = 3 - } else { - restClient.RetryAttempts = *clientConfig.RestClientConfig.RetryAttempts - } - - if clientConfig.RestClientConfig.RetryDuration == nil { - restClient.RetryDuration = 1 * time.Second - } else { - restClient.RetryDuration = *clientConfig.RestClientConfig.RetryDuration - } - - backoff := clientConfig.Backoff + backoff := clientBackoff if backoff == nil { backoff = &retry.Backoff{} } @@ -119,7 +102,7 @@ func New(authorizer autorest.Authorizer, clientConfig azureclients.ClientConfig, baseURI: baseURI, backoff: backoff, apiVersion: apiVersion, - clientRegion: NormalizeAzureRegion(clientConfig.Location), + clientRegion: NormalizeAzureRegion(clientRegion), } } @@ -243,10 +226,6 @@ func dumpResponse(resp *http.Response, v klog.Level) { } func dumpRequest(req *http.Request, v klog.Level) { - if req == nil { - return - } - requestDump, err := httputil.DumpRequest(req, true) if err != nil { klog.Errorf("Failed to dump request: %v", err) @@ -416,7 +395,46 @@ func (c *Client) PutResource(ctx context.Context, resourceID string, parameters return c.PutResourceWithDecorators(ctx, resourceID, parameters, putDecorators) } -func (c *Client) waitAsync(ctx context.Context, futures map[string]*azure.Future, previousResponses map[string]*PutResourcesResponse) { +// PutResources puts a list of resources from resources map[resourceID]parameters. +// Those resources sync requests are sequential while async requests are concurrent. It's especially +// useful when the ARM API doesn't support concurrent requests. +func (c *Client) PutResources(ctx context.Context, resources map[string]interface{}) map[string]*PutResourcesResponse { + if len(resources) == 0 { + return nil + } + + // Sequential sync requests. + futures := make(map[string]*azure.Future) + responses := make(map[string]*PutResourcesResponse) + for resourceID, parameters := range resources { + decorators := []autorest.PrepareDecorator{ + autorest.WithPathParameters("{resourceID}", map[string]interface{}{"resourceID": resourceID}), + autorest.WithJSON(parameters), + } + request, err := c.PreparePutRequest(ctx, decorators...) + if err != nil { + klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "put.prepare", resourceID, err) + responses[resourceID] = &PutResourcesResponse{ + Error: retry.NewError(false, err), + } + continue + } + dumpRequest(request, 10) + + future, resp, clientErr := c.SendAsync(ctx, request) + defer c.CloseResponse(ctx, resp) + if clientErr != nil { + klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "put.send", resourceID, clientErr.Error()) + responses[resourceID] = &PutResourcesResponse{ + Error: clientErr, + } + continue + } + + futures[resourceID] = future + } + + // Concurrent async requests. wg := sync.WaitGroup{} var responseLock sync.Mutex for resourceID, future := range futures { @@ -439,122 +457,33 @@ func (c *Client) waitAsync(ctx context.Context, futures map[string]*azure.Future } responseLock.Lock() - previousResponses[resourceID] = &PutResourcesResponse{ + responses[resourceID] = &PutResourcesResponse{ Error: retriableErr, } responseLock.Unlock() return } - }(resourceID, future) - } - wg.Wait() -} - -// PutResources puts a list of resources from resources map[resourceID]parameters. -// Those resources sync requests are sequential while async requests are concurrent. It's especially -// useful when the ARM API doesn't support concurrent requests. -func (c *Client) PutResources(ctx context.Context, resources map[string]interface{}) map[string]*PutResourcesResponse { - if len(resources) == 0 { - return nil - } - // Sequential sync requests. - futures := make(map[string]*azure.Future) - responses := make(map[string]*PutResourcesResponse) - for resourceID, parameters := range resources { - future, rerr := c.PutResourceAsync(ctx, resourceID, parameters) - if rerr != nil { + responseLock.Lock() responses[resourceID] = &PutResourcesResponse{ - Error: rerr, + Response: response, } - continue - } - futures[resourceID] = future - } - - c.waitAsync(ctx, futures, responses) - - return responses -} - -// PutResourcesInBatches is similar with PutResources, but it sends sync request concurrently in batches. -func (c *Client) PutResourcesInBatches(ctx context.Context, resources map[string]interface{}, batchSize int) map[string]*PutResourcesResponse { - if len(resources) == 0 { - return nil - } - - if batchSize <= 0 { - klog.V(4).Infof("PutResourcesInBatches: batch size %d, put resources in sequence", batchSize) - return c.PutResources(ctx, resources) - } - - if batchSize > len(resources) { - klog.V(4).Infof("PutResourcesInBatches: batch size %d, but the number of the resources is %d", batchSize, resources) - batchSize = len(resources) - } - klog.V(4).Infof("PutResourcesInBatches: send sync requests in parallel with the batch size %d", batchSize) - - // Convert map to slice because it is more straightforward to - // loop over slice in batches than map. - type resourcesMeta struct { - resourceID string - parameters interface{} - } - resourcesList := make([]resourcesMeta, 0) - for resourceID, parameters := range resources { - resourcesList = append(resourcesList, resourcesMeta{ - resourceID: resourceID, - parameters: parameters, - }) - } - - // Concurrent sync requests in batches. - futures := make(map[string]*azure.Future) - responses := make(map[string]*PutResourcesResponse) - wg := sync.WaitGroup{} - var responseLock, futuresLock sync.Mutex - for i := 0; i < len(resourcesList); i += batchSize { - j := i + batchSize - if j > len(resourcesList) { - j = len(resourcesList) - } - - for k := i; k < j; k++ { - wg.Add(1) - go func(resourceID string, parameters interface{}) { - defer wg.Done() - future, rerr := c.PutResourceAsync(ctx, resourceID, parameters) - if rerr != nil { - responseLock.Lock() - responses[resourceID] = &PutResourcesResponse{ - Error: rerr, - } - responseLock.Unlock() - return - } - - futuresLock.Lock() - futures[resourceID] = future - futuresLock.Unlock() - }(resourcesList[k].resourceID, resourcesList[k].parameters) - } - wg.Wait() + responseLock.Unlock() + }(resourceID, future) } - // Concurrent async requests. - c.waitAsync(ctx, futures, responses) - + wg.Wait() return responses } // PutResourceWithDecorators puts a resource by resource ID func (c *Client) PutResourceWithDecorators(ctx context.Context, resourceID string, parameters interface{}, decorators []autorest.PrepareDecorator) (*http.Response, *retry.Error) { request, err := c.PreparePutRequest(ctx, decorators...) - dumpRequest(request, 10) if err != nil { klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "put.prepare", resourceID, err) return nil, retry.NewError(false, err) } + dumpRequest(request, 10) future, resp, clientErr := c.SendAsync(ctx, request) defer c.CloseResponse(ctx, resp) @@ -653,11 +582,11 @@ func (c *Client) PutResourceAsync(ctx context.Context, resourceID string, parame } request, err := c.PreparePutRequest(ctx, decorators...) - dumpRequest(request, 10) if err != nil { klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "put.prepare", resourceID, err) return nil, retry.NewError(false, err) } + dumpRequest(request, 10) future, resp, rErr := c.SendAsync(ctx, request) defer c.CloseResponse(ctx, resp) @@ -670,7 +599,7 @@ func (c *Client) PutResourceAsync(ctx context.Context, resourceID string, parame } // PostResource posts a resource by resource ID -func (c *Client) PostResource(ctx context.Context, resourceID, action string, parameters interface{}, queryParameters map[string]interface{}) (*http.Response, *retry.Error) { +func (c *Client) PostResource(ctx context.Context, resourceID, action string, parameters interface{}) (*http.Response, *retry.Error) { pathParameters := map[string]interface{}{ "resourceID": resourceID, "action": action, @@ -680,10 +609,6 @@ func (c *Client) PostResource(ctx context.Context, resourceID, action string, pa autorest.WithPathParameters("{resourceID}/{action}", pathParameters), autorest.WithJSON(parameters), } - if len(queryParameters) > 0 { - decorators = append(decorators, autorest.WithQueryParameters(queryParameters)) - } - request, err := c.PreparePostRequest(ctx, decorators...) if err != nil { klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "post.prepare", resourceID, err) diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/armclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/armclient/interface.go index 0970f3e2e08d..48d6de8a3458 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/armclient/interface.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/armclient/interface.go @@ -70,9 +70,6 @@ type Interface interface { // useful when the ARM API doesn't support concurrent requests. PutResources(ctx context.Context, resources map[string]interface{}) map[string]*PutResourcesResponse - // PutResourcesInBatches is similar with PutResources, but it sends sync request concurrently in batches. - PutResourcesInBatches(ctx context.Context, resources map[string]interface{}, batchSize int) map[string]*PutResourcesResponse - // PutResourceWithDecorators puts a resource with decorators by resource ID PutResourceWithDecorators(ctx context.Context, resourceID string, parameters interface{}, decorators []autorest.PrepareDecorator) (*http.Response, *retry.Error) @@ -95,7 +92,7 @@ type Interface interface { GetResourceWithDecorators(ctx context.Context, resourceID string, decorators []autorest.PrepareDecorator) (*http.Response, *retry.Error) // PostResource posts a resource by resource ID - PostResource(ctx context.Context, resourceID, action string, parameters interface{}, queryParameters map[string]interface{}) (*http.Response, *retry.Error) + PostResource(ctx context.Context, resourceID, action string, parameters interface{}) (*http.Response, *retry.Error) // DeleteResource deletes a resource by resource ID DeleteResource(ctx context.Context, resourceID, ifMatch string) *retry.Error diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/azure_client_config.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/azure_client_config.go index e25f5caa962e..558b1f11f56d 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/azure_client_config.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/azure_client_config.go @@ -17,8 +17,6 @@ limitations under the License. package azureclients import ( - "time" - "github.com/Azure/go-autorest/autorest" "k8s.io/client-go/util/flowcontrol" @@ -34,7 +32,6 @@ type ClientConfig struct { ResourceManagerEndpoint string Authorizer autorest.Authorizer RateLimitConfig *RateLimitConfig - RestClientConfig RestClientConfig Backoff *retry.Backoff UserAgent string DisableAzureStackCloud bool @@ -61,12 +58,6 @@ type RateLimitConfig struct { CloudProviderRateLimitBucketWrite int `json:"cloudProviderRateLimitBucketWrite,omitempty" yaml:"cloudProviderRateLimitBucketWrite,omitempty"` } -type RestClientConfig struct { - PollingDelay *time.Duration - RetryAttempts *int - RetryDuration *time.Duration -} - // ExtendedLocation contains additional info about the location of resources. type ExtendedLocation struct { // Name - The name of the extended location. diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/containerserviceclient/azure_containerserviceclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/containerserviceclient/azure_containerserviceclient.go index 34f5710590cc..3e3bd6a1eb44 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/containerserviceclient/azure_containerserviceclient.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/containerserviceclient/azure_containerserviceclient.go @@ -56,7 +56,7 @@ type Client struct { func New(config *azclients.ClientConfig) *Client { baseURI := config.ResourceManagerEndpoint authorizer := config.Authorizer - armClient := armclient.New(authorizer, *config, baseURI, APIVersion) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, APIVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) if azclients.RateLimitEnabled(config.RateLimitConfig) { diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/deploymentclient/azure_deploymentclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/deploymentclient/azure_deploymentclient.go index 9067d288ecd4..7aecca20ff9e 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/deploymentclient/azure_deploymentclient.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/deploymentclient/azure_deploymentclient.go @@ -56,7 +56,7 @@ type Client struct { func New(config *azclients.ClientConfig) *Client { baseURI := config.ResourceManagerEndpoint authorizer := config.Authorizer - armClient := armclient.New(authorizer, *config, baseURI, APIVersion) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, APIVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) if azclients.RateLimitEnabled(config.RateLimitConfig) { @@ -438,7 +438,7 @@ func (c *Client) ExportTemplate(ctx context.Context, resourceGroupName string, d autorest.Encode("path", c.subscriptionID), autorest.Encode("path", resourceGroupName), autorest.Encode("path", deploymentName)) - response, rerr := c.armClient.PostResource(ctx, resourceID, "exportTemplate", struct{}{}, map[string]interface{}{}) + response, rerr := c.armClient.PostResource(ctx, resourceID, "exportTemplate", struct{}{}) defer c.armClient.CloseResponse(ctx, response) if rerr != nil { klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "deployment.exportTemplate.request", resourceID, rerr.Error()) diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/diskclient/azure_diskclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/diskclient/azure_diskclient.go index 50c21e7e38ea..771809734573 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/diskclient/azure_diskclient.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/diskclient/azure_diskclient.go @@ -65,7 +65,7 @@ func New(config *azclients.ClientConfig) *Client { } klog.V(2).Infof("Azure DisksClient using API version: %s", apiVersion) - armClient := armclient.New(authorizer, *config, baseURI, apiVersion) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, apiVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) if azclients.RateLimitEnabled(config.RateLimitConfig) { diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/diskclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/diskclient/interface.go index 405464a31c08..80fba4b1e955 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/diskclient/interface.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/diskclient/interface.go @@ -26,7 +26,7 @@ import ( const ( // APIVersion is the API version for compute. - APIVersion = "2021-04-01" + APIVersion = "2020-12-01" // AzureStackCloudAPIVersion is the API version for Azure Stack AzureStackCloudAPIVersion = "2019-03-01" // AzureStackCloudName is the cloud name of Azure Stack diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/fileclient/azure_fileclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/fileclient/azure_fileclient.go index 6b6a4d34c53c..be7d9d3a4747 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/fileclient/azure_fileclient.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/fileclient/azure_fileclient.go @@ -42,8 +42,6 @@ type ShareOptions struct { Name string Protocol storage.EnabledProtocols RequestGiB int - // supported values: ""(by default), "TransactionOptimized", "Cool", "Hot", "Premium" - AccessTier string } // New creates a azure file client @@ -74,9 +72,6 @@ func (c *Client) CreateFileShare(resourceGroupName, accountName string, shareOpt if shareOptions.Protocol == storage.EnabledProtocolsNFS { fileShareProperties.EnabledProtocols = shareOptions.Protocol } - if shareOptions.AccessTier != "" { - fileShareProperties.AccessTier = storage.ShareAccessTier(shareOptions.AccessTier) - } fileShare := storage.FileShare{ Name: &shareOptions.Name, FileShareProperties: fileShareProperties, diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/interfaceclient/azure_interfaceclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/interfaceclient/azure_interfaceclient.go index 85248c0d4ccb..e3f3b413a81f 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/interfaceclient/azure_interfaceclient.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/interfaceclient/azure_interfaceclient.go @@ -63,7 +63,7 @@ func New(config *azclients.ClientConfig) *Client { if strings.EqualFold(config.CloudName, AzureStackCloudName) && !config.DisableAzureStackCloud { apiVersion = AzureStackCloudAPIVersion } - armClient := armclient.New(authorizer, *config, baseURI, apiVersion) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, apiVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) if azclients.RateLimitEnabled(config.RateLimitConfig) { diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/loadbalancerclient/azure_loadbalancerclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/loadbalancerclient/azure_loadbalancerclient.go index ca17e982f0c4..f52dfeffbf36 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/loadbalancerclient/azure_loadbalancerclient.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/loadbalancerclient/azure_loadbalancerclient.go @@ -62,7 +62,7 @@ func New(config *azclients.ClientConfig) *Client { if strings.EqualFold(config.CloudName, AzureStackCloudName) && !config.DisableAzureStackCloud { apiVersion = AzureStackCloudAPIVersion } - armClient := armclient.New(authorizer, *config, baseURI, apiVersion) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, apiVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) if azclients.RateLimitEnabled(config.RateLimitConfig) { diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/privatednsclient/azure_privatednsclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/privatednsclient/azure_privatednsclient.go index 0c2369b9b48e..d160e7c1be8e 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/privatednsclient/azure_privatednsclient.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/privatednsclient/azure_privatednsclient.go @@ -33,7 +33,7 @@ type Client struct { // New creates a new privatedns client. func New(config *azclients.ClientConfig) *Client { - privateDNSClient := privatedns.NewPrivateZonesClientWithBaseURI(config.ResourceManagerEndpoint, config.SubscriptionID) + privateDNSClient := privatedns.NewPrivateZonesClient(config.SubscriptionID) privateDNSClient.Authorizer = config.Authorizer client := &Client{ privateDNSClient: privateDNSClient, diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/privatednszonegroupclient/azure_privatednszonegroupclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/privatednszonegroupclient/azure_privatednszonegroupclient.go index 401d7d0d38d1..71e218643e8d 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/privatednszonegroupclient/azure_privatednszonegroupclient.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/privatednszonegroupclient/azure_privatednszonegroupclient.go @@ -33,7 +33,7 @@ type Client struct { // New creates a new private dns zone group client. func New(config *azclients.ClientConfig) *Client { - privateDNSZoneGroupClient := network.NewPrivateDNSZoneGroupsClientWithBaseURI(config.ResourceManagerEndpoint, config.SubscriptionID) + privateDNSZoneGroupClient := network.NewPrivateDNSZoneGroupsClient(config.SubscriptionID) privateDNSZoneGroupClient.Authorizer = config.Authorizer client := &Client{ privateDNSZoneGroupClient: privateDNSZoneGroupClient, diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/privateendpointclient/azure_privateendpointclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/privateendpointclient/azure_privateendpointclient.go index f7883321fd01..15096d412327 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/privateendpointclient/azure_privateendpointclient.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/privateendpointclient/azure_privateendpointclient.go @@ -33,7 +33,7 @@ type Client struct { // New creates a new private endpoint client. func New(config *azclients.ClientConfig) *Client { - privateEndpointClient := network.NewPrivateEndpointsClientWithBaseURI(config.ResourceManagerEndpoint, config.SubscriptionID) + privateEndpointClient := network.NewPrivateEndpointsClient(config.SubscriptionID) privateEndpointClient.Authorizer = config.Authorizer client := &Client{ diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/publicipclient/azure_publicipclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/publicipclient/azure_publicipclient.go index be60a4f08a64..04940097d69c 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/publicipclient/azure_publicipclient.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/publicipclient/azure_publicipclient.go @@ -63,7 +63,7 @@ func New(config *azclients.ClientConfig) *Client { if strings.EqualFold(config.CloudName, AzureStackCloudName) && !config.DisableAzureStackCloud { apiVersion = AzureStackCloudAPIVersion } - armClient := armclient.New(authorizer, *config, baseURI, apiVersion) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, apiVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) if azclients.RateLimitEnabled(config.RateLimitConfig) { diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routeclient/azure_routeclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routeclient/azure_routeclient.go index e70801760764..8349f032dd55 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routeclient/azure_routeclient.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routeclient/azure_routeclient.go @@ -60,7 +60,7 @@ func New(config *azclients.ClientConfig) *Client { if strings.EqualFold(config.CloudName, AzureStackCloudName) && !config.DisableAzureStackCloud { apiVersion = AzureStackCloudAPIVersion } - armClient := armclient.New(authorizer, *config, baseURI, apiVersion) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, apiVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) if azclients.RateLimitEnabled(config.RateLimitConfig) { diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routetableclient/azure_routetableclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routetableclient/azure_routetableclient.go index bb81cd8ac58c..b289c58ba7e8 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routetableclient/azure_routetableclient.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routetableclient/azure_routetableclient.go @@ -60,7 +60,7 @@ func New(config *azclients.ClientConfig) *Client { if strings.EqualFold(config.CloudName, AzureStackCloudName) && !config.DisableAzureStackCloud { apiVersion = AzureStackCloudAPIVersion } - armClient := armclient.New(authorizer, *config, baseURI, apiVersion) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, apiVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) if azclients.RateLimitEnabled(config.RateLimitConfig) { diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/securitygroupclient/azure_securitygroupclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/securitygroupclient/azure_securitygroupclient.go index 9bc7a54fbff8..c19b1ca42b08 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/securitygroupclient/azure_securitygroupclient.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/securitygroupclient/azure_securitygroupclient.go @@ -62,7 +62,7 @@ func New(config *azclients.ClientConfig) *Client { if strings.EqualFold(config.CloudName, AzureStackCloudName) && !config.DisableAzureStackCloud { apiVersion = AzureStackCloudAPIVersion } - armClient := armclient.New(authorizer, *config, baseURI, apiVersion) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, apiVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) if azclients.RateLimitEnabled(config.RateLimitConfig) { diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/snapshotclient/azure_snapshotclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/snapshotclient/azure_snapshotclient.go index 5e5000876476..9c0b3daa04e7 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/snapshotclient/azure_snapshotclient.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/snapshotclient/azure_snapshotclient.go @@ -62,7 +62,7 @@ func New(config *azclients.ClientConfig) *Client { if strings.EqualFold(config.CloudName, AzureStackCloudName) && !config.DisableAzureStackCloud { apiVersion = AzureStackCloudAPIVersion } - armClient := armclient.New(authorizer, *config, baseURI, apiVersion) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, apiVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) if azclients.RateLimitEnabled(config.RateLimitConfig) { diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/storageaccountclient/azure_storageaccountclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/storageaccountclient/azure_storageaccountclient.go index 78b868a53c34..02591e52518a 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/storageaccountclient/azure_storageaccountclient.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/storageaccountclient/azure_storageaccountclient.go @@ -62,7 +62,7 @@ func New(config *azclients.ClientConfig) *Client { if strings.EqualFold(config.CloudName, AzureStackCloudName) && !config.DisableAzureStackCloud { apiVersion = AzureStackCloudAPIVersion } - armClient := armclient.New(authorizer, *config, baseURI, apiVersion) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, apiVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) if azclients.RateLimitEnabled(config.RateLimitConfig) { @@ -187,7 +187,7 @@ func (c *Client) listStorageAccountKeys(ctx context.Context, resourceGroupName s ) result := storage.AccountListKeysResult{} - response, rerr := c.armClient.PostResource(ctx, resourceID, "listKeys", struct{}{}, map[string]interface{}{}) + response, rerr := c.armClient.PostResource(ctx, resourceID, "listKeys", struct{}{}) defer c.armClient.CloseResponse(ctx, response) if rerr != nil { klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "storageaccount.listkeys.request", resourceID, rerr.Error()) diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/subnetclient/azure_subnetclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/subnetclient/azure_subnetclient.go index 1d6ed1480f3c..4464081084fa 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/subnetclient/azure_subnetclient.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/subnetclient/azure_subnetclient.go @@ -61,7 +61,7 @@ func New(config *azclients.ClientConfig) *Client { if strings.EqualFold(config.CloudName, AzureStackCloudName) && !config.DisableAzureStackCloud { apiVersion = AzureStackCloudAPIVersion } - armClient := armclient.New(authorizer, *config, baseURI, apiVersion) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, apiVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) if azclients.RateLimitEnabled(config.RateLimitConfig) { diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmasclient/azure_vmasclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmasclient/azure_vmasclient.go index ce3616aaa7d6..be1b33ca764a 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmasclient/azure_vmasclient.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmasclient/azure_vmasclient.go @@ -62,7 +62,7 @@ func New(config *azclients.ClientConfig) *Client { if strings.EqualFold(config.CloudName, AzureStackCloudName) && !config.DisableAzureStackCloud { apiVersion = AzureStackCloudAPIVersion } - armClient := armclient.New(authorizer, *config, baseURI, apiVersion) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, apiVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) if azclients.RateLimitEnabled(config.RateLimitConfig) { diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmclient/azure_vmclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmclient/azure_vmclient.go index 5063d411bb40..1c3fbf487bec 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmclient/azure_vmclient.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmclient/azure_vmclient.go @@ -62,7 +62,7 @@ func New(config *azclients.ClientConfig) *Client { if strings.EqualFold(config.CloudName, AzureStackCloudName) && !config.DisableAzureStackCloud { apiVersion = AzureStackCloudAPIVersion } - armClient := armclient.New(authorizer, *config, baseURI, apiVersion) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, apiVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) if azclients.RateLimitEnabled(config.RateLimitConfig) { diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmsizeclient/azure_vmsizeclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmsizeclient/azure_vmsizeclient.go index d3a6711ea074..f4c296022f8d 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmsizeclient/azure_vmsizeclient.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmsizeclient/azure_vmsizeclient.go @@ -61,7 +61,7 @@ func New(config *azclients.ClientConfig) *Client { if strings.EqualFold(config.CloudName, AzureStackCloudName) && !config.DisableAzureStackCloud { apiVersion = AzureStackCloudAPIVersion } - armClient := armclient.New(authorizer, *config, baseURI, apiVersion) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, apiVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) if azclients.RateLimitEnabled(config.RateLimitConfig) { diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssclient/azure_vmssclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssclient/azure_vmssclient.go index 59aac83e8108..8ce131feb49e 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssclient/azure_vmssclient.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssclient/azure_vmssclient.go @@ -62,7 +62,7 @@ func New(config *azclients.ClientConfig) *Client { if strings.EqualFold(config.CloudName, AzureStackCloudName) && !config.DisableAzureStackCloud { apiVersion = AzureStackCloudAPIVersion } - armClient := armclient.New(authorizer, *config, baseURI, apiVersion) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, apiVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) if azclients.RateLimitEnabled(config.RateLimitConfig) { @@ -472,7 +472,7 @@ func (c *Client) DeleteInstances(ctx context.Context, resourceGroupName string, } // DeleteInstancesAsync sends the delete request to ARM client and DOEST NOT wait on the future -func (c *Client) DeleteInstancesAsync(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs, forceDelete bool) (*azure.Future, *retry.Error) { +func (c *Client) DeleteInstancesAsync(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs) (*azure.Future, *retry.Error) { mc := metrics.NewMetricContext("vmss", "delete_instances_async", resourceGroupName, c.subscriptionID, "") // Report errors if the client is rate limited. @@ -495,13 +495,7 @@ func (c *Client) DeleteInstancesAsync(ctx context.Context, resourceGroupName str vmScaleSetName, ) - var queryParameters map[string]interface{} - if forceDelete { - queryParameters = map[string]interface{}{ - "forceDeletion": true, - } - } - response, rerr := c.armClient.PostResource(ctx, resourceID, "delete", vmInstanceIDs, queryParameters) + response, rerr := c.armClient.PostResource(ctx, resourceID, "delete", vmInstanceIDs) defer c.armClient.CloseResponse(ctx, response) if rerr != nil { @@ -550,7 +544,7 @@ func (c *Client) DeallocateInstancesAsync(ctx context.Context, resourceGroupName vmScaleSetName, ) - response, rerr := c.armClient.PostResource(ctx, resourceID, "deallocate", vmInstanceIDs, map[string]interface{}{}) + response, rerr := c.armClient.PostResource(ctx, resourceID, "deallocate", vmInstanceIDs) defer c.armClient.CloseResponse(ctx, response) if rerr != nil { @@ -599,7 +593,7 @@ func (c *Client) StartInstancesAsync(ctx context.Context, resourceGroupName stri vmScaleSetName, ) - response, rerr := c.armClient.PostResource(ctx, resourceID, "start", vmInstanceIDs, map[string]interface{}{}) + response, rerr := c.armClient.PostResource(ctx, resourceID, "start", vmInstanceIDs) defer c.armClient.CloseResponse(ctx, response) if rerr != nil { @@ -632,7 +626,7 @@ func (c *Client) deleteVMSSInstances(ctx context.Context, resourceGroupName stri "Microsoft.Compute/virtualMachineScaleSets", vmScaleSetName, ) - response, rerr := c.armClient.PostResource(ctx, resourceID, "delete", vmInstanceIDs, map[string]interface{}{}) + response, rerr := c.armClient.PostResource(ctx, resourceID, "delete", vmInstanceIDs) defer c.armClient.CloseResponse(ctx, response) if rerr != nil { klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "vmss.deletevms.request", resourceID, rerr.Error()) diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssclient/interface.go index 5f572e35f5bb..a1b1bd86b4aa 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssclient/interface.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssclient/interface.go @@ -57,7 +57,7 @@ type Interface interface { DeleteInstances(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs) *retry.Error // DeleteInstancesAsync sends the delete request to the ARM client and DOEST NOT wait on the future - DeleteInstancesAsync(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs, forceDelete bool) (*azure.Future, *retry.Error) + DeleteInstancesAsync(ctx context.Context, resourceGroupName string, vmScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs) (*azure.Future, *retry.Error) // WaitForCreateOrUpdateResult waits for the response of the create or update request WaitForCreateOrUpdateResult(ctx context.Context, future *azure.Future, resourceGroupName string) (*http.Response, error) diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssclient/mockvmssclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssclient/mockvmssclient/interface.go index 2cbd7d4c7784..d3871345b9f7 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssclient/mockvmssclient/interface.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssclient/mockvmssclient/interface.go @@ -144,18 +144,18 @@ func (mr *MockInterfaceMockRecorder) DeleteInstances(ctx, resourceGroupName, vmS } // DeleteInstancesAsync mocks base method. -func (m *MockInterface) DeleteInstancesAsync(ctx context.Context, resourceGroupName, VMScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs, forceDelete bool) (*azure.Future, *retry.Error) { +func (m *MockInterface) DeleteInstancesAsync(ctx context.Context, resourceGroupName, vmScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs) (*azure.Future, *retry.Error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteInstancesAsync", ctx, resourceGroupName, VMScaleSetName, vmInstanceIDs, forceDelete) + ret := m.ctrl.Call(m, "DeleteInstancesAsync", ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs) ret0, _ := ret[0].(*azure.Future) ret1, _ := ret[1].(*retry.Error) return ret0, ret1 } // DeleteInstancesAsync indicates an expected call of DeleteInstancesAsync. -func (mr *MockInterfaceMockRecorder) DeleteInstancesAsync(ctx, resourceGroupName, VMScaleSetName, vmInstanceIDs, forceDelete interface{}) *gomock.Call { +func (mr *MockInterfaceMockRecorder) DeleteInstancesAsync(ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInstancesAsync", reflect.TypeOf((*MockInterface)(nil).DeleteInstancesAsync), ctx, resourceGroupName, VMScaleSetName, vmInstanceIDs, forceDelete) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInstancesAsync", reflect.TypeOf((*MockInterface)(nil).DeleteInstancesAsync), ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs) } // WaitForCreateOrUpdateResult mocks base method. diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssvmclient/azure_vmssvmclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssvmclient/azure_vmssvmclient.go index 8379f2449297..f6d45bff924c 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssvmclient/azure_vmssvmclient.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssvmclient/azure_vmssvmclient.go @@ -63,7 +63,7 @@ func New(config *azclients.ClientConfig) *Client { if strings.EqualFold(config.CloudName, AzureStackCloudName) && !config.DisableAzureStackCloud { apiVersion = AzureStackCloudAPIVersion } - armClient := armclient.New(authorizer, *config, baseURI, apiVersion) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, apiVersion, config.Location, config.Backoff) rateLimiterReader, rateLimiterWriter := azclients.NewRateLimiter(config.RateLimitConfig) if azclients.RateLimitEnabled(config.RateLimitConfig) { @@ -439,9 +439,7 @@ func (page VirtualMachineScaleSetVMListResultPage) Values() []compute.VirtualMac } // UpdateVMs updates a list of VirtualMachineScaleSetVM from map[instanceID]compute.VirtualMachineScaleSetVM. -// If the batch size > 0, it will send sync requests concurrently in batches, or it will send sync requests in sequence. -// No matter what the batch size is, it will process the async requests concurrently in one single batch. -func (c *Client) UpdateVMs(ctx context.Context, resourceGroupName string, VMScaleSetName string, instances map[string]compute.VirtualMachineScaleSetVM, source string, batchSize int) *retry.Error { +func (c *Client) UpdateVMs(ctx context.Context, resourceGroupName string, VMScaleSetName string, instances map[string]compute.VirtualMachineScaleSetVM, source string) *retry.Error { mc := metrics.NewMetricContext("vmssvm", "update_vms", resourceGroupName, c.subscriptionID, source) // Report errors if the client is rate limited. @@ -457,7 +455,7 @@ func (c *Client) UpdateVMs(ctx context.Context, resourceGroupName string, VMScal return rerr } - rerr := c.updateVMSSVMs(ctx, resourceGroupName, VMScaleSetName, instances, batchSize) + rerr := c.updateVMSSVMs(ctx, resourceGroupName, VMScaleSetName, instances) mc.Observe(rerr) if rerr != nil { if rerr.IsThrottled() { @@ -472,7 +470,7 @@ func (c *Client) UpdateVMs(ctx context.Context, resourceGroupName string, VMScal } // updateVMSSVMs updates a list of VirtualMachineScaleSetVM from map[instanceID]compute.VirtualMachineScaleSetVM. -func (c *Client) updateVMSSVMs(ctx context.Context, resourceGroupName string, VMScaleSetName string, instances map[string]compute.VirtualMachineScaleSetVM, batchSize int) *retry.Error { +func (c *Client) updateVMSSVMs(ctx context.Context, resourceGroupName string, VMScaleSetName string, instances map[string]compute.VirtualMachineScaleSetVM) *retry.Error { resources := make(map[string]interface{}) for instanceID, parameter := range instances { resourceID := armclient.GetChildResourceID( @@ -486,7 +484,7 @@ func (c *Client) updateVMSSVMs(ctx context.Context, resourceGroupName string, VM resources[resourceID] = parameter } - responses := c.armClient.PutResourcesInBatches(ctx, resources, batchSize) + responses := c.armClient.PutResources(ctx, resources) errors := make([]*retry.Error, 0) for resourceID, resp := range responses { if resp == nil { diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssvmclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssvmclient/interface.go index 84adbee110bf..e10775cb2d09 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssvmclient/interface.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssvmclient/interface.go @@ -53,5 +53,5 @@ type Interface interface { WaitForUpdateResult(ctx context.Context, future *azure.Future, resourceGroupName, source string) *retry.Error // UpdateVMs updates a list of VirtualMachineScaleSetVM from map[instanceID]compute.VirtualMachineScaleSetVM. - UpdateVMs(ctx context.Context, resourceGroupName string, VMScaleSetName string, instances map[string]compute.VirtualMachineScaleSetVM, source string, batchSize int) *retry.Error + UpdateVMs(ctx context.Context, resourceGroupName string, VMScaleSetName string, instances map[string]compute.VirtualMachineScaleSetVM, source string) *retry.Error } diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssvmclient/mockvmssvmclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssvmclient/mockvmssvmclient/interface.go index f98312e9e2dd..cecf71964992 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssvmclient/mockvmssvmclient/interface.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssvmclient/mockvmssvmclient/interface.go @@ -23,37 +23,38 @@ package mockvmssvmclient import ( context "context" + reflect "reflect" + compute "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute" azure "github.com/Azure/go-autorest/autorest/azure" gomock "github.com/golang/mock/gomock" - reflect "reflect" retry "sigs.k8s.io/cloud-provider-azure/pkg/retry" ) -// MockInterface is a mock of Interface interface +// MockInterface is a mock of Interface interface. type MockInterface struct { ctrl *gomock.Controller recorder *MockInterfaceMockRecorder } -// MockInterfaceMockRecorder is the mock recorder for MockInterface +// MockInterfaceMockRecorder is the mock recorder for MockInterface. type MockInterfaceMockRecorder struct { mock *MockInterface } -// NewMockInterface creates a new mock instance +// NewMockInterface creates a new mock instance. func NewMockInterface(ctrl *gomock.Controller) *MockInterface { mock := &MockInterface{ctrl: ctrl} mock.recorder = &MockInterfaceMockRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use +// EXPECT returns an object that allows the caller to indicate expected use. func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder { return m.recorder } -// Get mocks base method +// Get mocks base method. func (m *MockInterface) Get(ctx context.Context, resourceGroupName, VMScaleSetName, instanceID string, expand compute.InstanceViewTypes) (compute.VirtualMachineScaleSetVM, *retry.Error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, VMScaleSetName, instanceID, expand) @@ -62,13 +63,13 @@ func (m *MockInterface) Get(ctx context.Context, resourceGroupName, VMScaleSetNa return ret0, ret1 } -// Get indicates an expected call of Get +// Get indicates an expected call of Get. func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, VMScaleSetName, instanceID, expand interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, VMScaleSetName, instanceID, expand) } -// List mocks base method +// List mocks base method. func (m *MockInterface) List(ctx context.Context, resourceGroupName, virtualMachineScaleSetName, expand string) ([]compute.VirtualMachineScaleSetVM, *retry.Error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "List", ctx, resourceGroupName, virtualMachineScaleSetName, expand) @@ -77,13 +78,13 @@ func (m *MockInterface) List(ctx context.Context, resourceGroupName, virtualMach return ret0, ret1 } -// List indicates an expected call of List +// List indicates an expected call of List. func (mr *MockInterfaceMockRecorder) List(ctx, resourceGroupName, virtualMachineScaleSetName, expand interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), ctx, resourceGroupName, virtualMachineScaleSetName, expand) } -// Update mocks base method +// Update mocks base method. func (m *MockInterface) Update(ctx context.Context, resourceGroupName, VMScaleSetName, instanceID string, parameters compute.VirtualMachineScaleSetVM, source string) *retry.Error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Update", ctx, resourceGroupName, VMScaleSetName, instanceID, parameters, source) @@ -91,13 +92,13 @@ func (m *MockInterface) Update(ctx context.Context, resourceGroupName, VMScaleSe return ret0 } -// Update indicates an expected call of Update +// Update indicates an expected call of Update. func (mr *MockInterfaceMockRecorder) Update(ctx, resourceGroupName, VMScaleSetName, instanceID, parameters, source interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockInterface)(nil).Update), ctx, resourceGroupName, VMScaleSetName, instanceID, parameters, source) } -// UpdateAsync mocks base method +// UpdateAsync mocks base method. func (m *MockInterface) UpdateAsync(ctx context.Context, resourceGroupName, VMScaleSetName, instanceID string, parameters compute.VirtualMachineScaleSetVM, source string) (*azure.Future, *retry.Error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "UpdateAsync", ctx, resourceGroupName, VMScaleSetName, instanceID, parameters, source) @@ -106,13 +107,13 @@ func (m *MockInterface) UpdateAsync(ctx context.Context, resourceGroupName, VMSc return ret0, ret1 } -// UpdateAsync indicates an expected call of UpdateAsync +// UpdateAsync indicates an expected call of UpdateAsync. func (mr *MockInterfaceMockRecorder) UpdateAsync(ctx, resourceGroupName, VMScaleSetName, instanceID, parameters, source interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAsync", reflect.TypeOf((*MockInterface)(nil).UpdateAsync), ctx, resourceGroupName, VMScaleSetName, instanceID, parameters, source) } -// WaitForUpdateResult mocks base method +// WaitForUpdateResult mocks base method. func (m *MockInterface) WaitForUpdateResult(ctx context.Context, future *azure.Future, resourceGroupName, source string) *retry.Error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "WaitForUpdateResult", ctx, future, resourceGroupName, source) @@ -120,22 +121,22 @@ func (m *MockInterface) WaitForUpdateResult(ctx context.Context, future *azure.F return ret0 } -// WaitForUpdateResult indicates an expected call of WaitForUpdateResult +// WaitForUpdateResult indicates an expected call of WaitForUpdateResult. func (mr *MockInterfaceMockRecorder) WaitForUpdateResult(ctx, future, resourceGroupName, source interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForUpdateResult", reflect.TypeOf((*MockInterface)(nil).WaitForUpdateResult), ctx, future, resourceGroupName, source) } -// UpdateVMs mocks base method -func (m *MockInterface) UpdateVMs(ctx context.Context, resourceGroupName, VMScaleSetName string, instances map[string]compute.VirtualMachineScaleSetVM, source string, batchSize int) *retry.Error { +// UpdateVMs mocks base method. +func (m *MockInterface) UpdateVMs(ctx context.Context, resourceGroupName, VMScaleSetName string, instances map[string]compute.VirtualMachineScaleSetVM, source string) *retry.Error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UpdateVMs", ctx, resourceGroupName, VMScaleSetName, instances, source, batchSize) + ret := m.ctrl.Call(m, "UpdateVMs", ctx, resourceGroupName, VMScaleSetName, instances, source) ret0, _ := ret[0].(*retry.Error) return ret0 } -// UpdateVMs indicates an expected call of UpdateVMs -func (mr *MockInterfaceMockRecorder) UpdateVMs(ctx, resourceGroupName, VMScaleSetName, instances, source, batchSize interface{}) *gomock.Call { +// UpdateVMs indicates an expected call of UpdateVMs. +func (mr *MockInterfaceMockRecorder) UpdateVMs(ctx, resourceGroupName, VMScaleSetName, instances, source interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateVMs", reflect.TypeOf((*MockInterface)(nil).UpdateVMs), ctx, resourceGroupName, VMScaleSetName, instances, source, batchSize) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateVMs", reflect.TypeOf((*MockInterface)(nil).UpdateVMs), ctx, resourceGroupName, VMScaleSetName, instances, source) } diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/zoneclient/azure_zoneclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/zoneclient/azure_zoneclient.go index 0d43ddd619c5..c1966b7e852f 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/zoneclient/azure_zoneclient.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/zoneclient/azure_zoneclient.go @@ -69,7 +69,7 @@ func New(config *azclients.ClientConfig) *Client { apiVersion = AzureStackCloudAPIVersion } - armClient := armclient.New(authorizer, *config, baseURI, apiVersion) + armClient := armclient.New(authorizer, baseURI, config.UserAgent, apiVersion, config.Location, config.Backoff) client := &Client{ armClient: armClient, subscriptionID: config.SubscriptionID, diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/consts/consts.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/consts/consts.go index 6edd9f1a29de..20f6b532dbb4 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/consts/consts.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/consts/consts.go @@ -83,8 +83,6 @@ const ( // NodeLabelRole specifies the role of a node NodeLabelRole = "kubernetes.io/role" - // NodeLabelHostName specifies the host name of a node - NodeLabelHostName = "kubernetes.io/hostname" // MasterNodeRoleLabel specifies is the master node label for a node MasterNodeRoleLabel = "node-role.kubernetes.io/master" // ControlPlaneNodeRoleLabel specifies is the control-plane node label for a node @@ -96,8 +94,6 @@ const ( // StorageAccountNameMaxLength is the max length of a storage name StorageAccountNameMaxLength = 24 - CannotFindDiskLUN = "cannot find Lun" - // DefaultStorageAccountType is the default storage account type DefaultStorageAccountType = string(storage.SkuNameStandardLRS) // DefaultStorageAccountKind is the default storage account kind @@ -275,14 +271,11 @@ const ( ServiceAnnotationAdditionalPublicIPs = "service.beta.kubernetes.io/azure-additional-public-ips" // ServiceTagKey is the service key applied for public IP tags. - ServiceTagKey = "k8s-azure-service" - LegacyServiceTagKey = "service" + ServiceTagKey = "service" // ClusterNameKey is the cluster name key applied for public IP tags. - ClusterNameKey = "k8s-azure-cluster-name" - LegacyClusterNameKey = "kubernetes-cluster-name" + ClusterNameKey = "kubernetes-cluster-name" // ServiceUsingDNSKey is the service name consuming the DNS label on the public IP - ServiceUsingDNSKey = "k8s-azure-dns-label-service" - LegacyServiceUsingDNSKey = "kubernetes-dns-label-service" + ServiceUsingDNSKey = "kubernetes-dns-label-service" // DefaultLoadBalancerSourceRanges is the default value of the load balancer source ranges DefaultLoadBalancerSourceRanges = "0.0.0.0/0" @@ -309,14 +302,6 @@ const ( FrontendIPConfigNameMaxLength = 80 // LoadBalancerRuleNameMaxLength is the max length of the load balancing rule LoadBalancerRuleNameMaxLength = 80 - - // LoadBalancerBackendPoolConfigurationTypeNodeIPConfiguration is the lb backend pool config type node IP configuration - LoadBalancerBackendPoolConfigurationTypeNodeIPConfiguration = "nodeIPConfiguration" - // LoadBalancerBackendPoolConfigurationTypeNodeIP is the lb backend pool config type node ip - LoadBalancerBackendPoolConfigurationTypeNodeIP = "nodeIP" - // LoadBalancerBackendPoolConfigurationTypePODIP is the lb backend pool config type pod ip - // TODO (nilo19): support pod IP in the future - LoadBalancerBackendPoolConfigurationTypePODIP = "podIP" ) // error messages @@ -370,6 +355,3 @@ const ( // RateLimited error string const RateLimited = "rate limited" - -// CreatedByTag tag key for CSI drivers -const CreatedByTag = "k8s-azure-created-by" diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure.go index 45fa3984fe02..32708a8e614c 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure.go @@ -232,15 +232,6 @@ type Config struct { RouteUpdateWaitingInSeconds int `json:"routeUpdateWaitingInSeconds,omitempty" yaml:"routeUpdateWaitingInSeconds,omitempty"` // The user agent for Azure customer usage attribution UserAgent string `json:"userAgent,omitempty" yaml:"userAgent,omitempty"` - // LoadBalancerBackendPoolConfigurationType defines how vms join the load balancer backend pools. Supported values - // are `nodeIPConfiguration`, `nodeIP` and `podIP`. - // `nodeIPConfiguration`: vm network interfaces will be attached to the inbound backend pool of the load balancer (default); - // `nodeIP`: vm private IPs will be attached to the inbound backend pool of the load balancer; - // `podIP`: pod IPs will be attached to the inbound backend pool of the load balancer (not supported yet). - LoadBalancerBackendPoolConfigurationType string `json:"loadBalancerBackendPoolConfigurationType,omitempty" yaml:"loadBalancerBackendPoolConfigurationType,omitempty"` - // PutVMSSVMBatchSize defines how many requests the client send concurrently when putting the VMSS VMs. - // If it is smaller than or equal to zero, the request will be sent one by one in sequence (default). - PutVMSSVMBatchSize int `json:"putVMSSVMBatchSize" yaml:"putVMSSVMBatchSize"` } type InitSecretConfig struct { @@ -291,10 +282,9 @@ type Cloud struct { privatednszonegroupclient privatednszonegroupclient.Interface virtualNetworkLinksClient virtualnetworklinksclient.Interface - ResourceRequestBackoff wait.Backoff - Metadata *InstanceMetadataService - VMSet VMSet - LoadBalancerBackendPool BackendPool + ResourceRequestBackoff wait.Backoff + metadata *InstanceMetadataService + VMSet VMSet // ipv6DualStack allows overriding for unit testing. It's normally initialized from featuregates ipv6DualStackEnabled bool @@ -313,7 +303,6 @@ type Cloud struct { unmanagedNodes sets.String // excludeLoadBalancerNodes holds a list of nodes that should be excluded from LoadBalancer. excludeLoadBalancerNodes sets.String - nodePrivateIPs map[string]sets.String // nodeInformerSynced is for determining if the informer has synced. nodeInformerSynced cache.InformerSynced @@ -336,6 +325,7 @@ type Cloud struct { nsgCache *azcache.TimedCache rtCache *azcache.TimedCache + *BlobDiskController *ManagedDiskController *controllerCommon } @@ -425,7 +415,6 @@ func NewCloudFromSecret(clientBuilder cloudprovider.ControllerClientBuilder, sec unmanagedNodes: sets.NewString(), routeCIDRs: map[string]string{}, excludeLoadBalancerNodes: sets.NewString(), - nodePrivateIPs: map[string]sets.String{}, } az.configSecretMetadata(secretName, secretNamespace, cloudConfigKey) @@ -457,7 +446,6 @@ func NewCloudWithoutFeatureGates(configReader io.Reader, callFromCCM bool) (*Clo unmanagedNodes: sets.NewString(), routeCIDRs: map[string]string{}, excludeLoadBalancerNodes: sets.NewString(), - nodePrivateIPs: map[string]sets.String{}, } err = az.InitializeCloudFromConfig(config, false, callFromCCM) @@ -509,20 +497,6 @@ func (az *Cloud) InitializeCloudFromConfig(config *Config, fromSecret, callFromC } } - if config.LoadBalancerBackendPoolConfigurationType == "" || - // TODO(nilo19): support pod IP mode in the future - strings.EqualFold(config.LoadBalancerBackendPoolConfigurationType, consts.LoadBalancerBackendPoolConfigurationTypePODIP) { - config.LoadBalancerBackendPoolConfigurationType = consts.LoadBalancerBackendPoolConfigurationTypeNodeIPConfiguration - } else { - supportedLoadBalancerBackendPoolConfigurationTypes := sets.NewString( - strings.ToLower(consts.LoadBalancerBackendPoolConfigurationTypeNodeIPConfiguration), - strings.ToLower(consts.LoadBalancerBackendPoolConfigurationTypeNodeIP), - strings.ToLower(consts.LoadBalancerBackendPoolConfigurationTypePODIP)) - if !supportedLoadBalancerBackendPoolConfigurationTypes.Has(strings.ToLower(config.LoadBalancerBackendPoolConfigurationType)) { - return fmt.Errorf("loadBalancerBackendPoolConfigurationType %s is not supported, supported values are %v", config.LoadBalancerBackendPoolConfigurationType, supportedLoadBalancerBackendPoolConfigurationTypes.List()) - } - } - env, err := auth.ParseAzureEnvironment(config.Cloud, config.ResourceManagerEndpoint, config.IdentitySystem) if err != nil { return err @@ -562,7 +536,7 @@ func (az *Cloud) InitializeCloudFromConfig(config *Config, fromSecret, callFromC az.Config = *config az.Environment = *env az.ResourceRequestBackoff = resourceRequestBackoff - az.Metadata, err = NewInstanceMetadataService(consts.ImdsServer) + az.metadata, err = NewInstanceMetadataService(consts.ImdsServer) if err != nil { return err } @@ -595,12 +569,6 @@ func (az *Cloud) InitializeCloudFromConfig(config *Config, fromSecret, callFromC } } - if az.isLBBackendPoolTypeNodeIPConfig() { - az.LoadBalancerBackendPool = newBackendPoolTypeNodeIPConfig(az) - } else if az.isLBBackendPoolTypeNodeIP() { - az.LoadBalancerBackendPool = newBackendPoolTypeNodeIP(az) - } - err = az.initCaches() if err != nil { return err @@ -633,18 +601,6 @@ func (az *Cloud) InitializeCloudFromConfig(config *Config, fromSecret, callFromC return nil } -func (az *Cloud) isLBBackendPoolTypeNodeIPConfig() bool { - return strings.EqualFold(az.LoadBalancerBackendPoolConfigurationType, consts.LoadBalancerBackendPoolConfigurationTypeNodeIPConfiguration) -} - -func (az *Cloud) isLBBackendPoolTypeNodeIP() bool { - return strings.EqualFold(az.LoadBalancerBackendPoolConfigurationType, consts.LoadBalancerBackendPoolConfigurationTypeNodeIP) -} - -func (az *Cloud) getPutVMSSVMBatchSize() int { - return az.PutVMSSVMBatchSize -} - func (az *Cloud) initCaches() (err error) { az.vmCache, err = az.newVMCache() if err != nil { @@ -692,7 +648,7 @@ func (az *Cloud) configureMultiTenantClients(servicePrincipalToken *adal.Service var err error var multiTenantServicePrincipalToken *adal.MultiTenantServicePrincipalToken var networkResourceServicePrincipalToken *adal.ServicePrincipalToken - if az.Config.UsesNetworkResourceInDifferentTenantOrSubscription() { + if az.Config.UsesNetworkResourceInDifferentTenant() { multiTenantServicePrincipalToken, err = auth.GetMultiTenantServicePrincipalToken(&az.Config.AzureAuthConfig, &az.Environment) if err != nil { return err @@ -970,6 +926,7 @@ func initDiskControllers(az *Cloud) error { } } + az.BlobDiskController = &BlobDiskController{common: common} az.ManagedDiskController = &ManagedDiskController{common: common} az.controllerCommon = common @@ -1047,12 +1004,6 @@ func (az *Cloud) updateNodeCaches(prevNode, newNode *v1.Node) { if _, hasExcludeBalancerLabel := prevNode.ObjectMeta.Labels[v1.LabelNodeExcludeBalancers]; hasExcludeBalancerLabel { az.excludeLoadBalancerNodes.Delete(prevNode.ObjectMeta.Name) } - - // Remove from nodePrivateIPs cache. - for _, address := range getNodePrivateIPAddresses(prevNode) { - klog.V(4).Infof("removing IP address %s of the node %s", address, prevNode.Name) - az.nodePrivateIPs[prevNode.Name].Delete(address) - } } if newNode != nil { @@ -1083,19 +1034,8 @@ func (az *Cloud) updateNodeCaches(prevNode, newNode *v1.Node) { // Add to excludeLoadBalancerNodes cache. if _, hasExcludeBalancerLabel := newNode.ObjectMeta.Labels[v1.LabelNodeExcludeBalancers]; hasExcludeBalancerLabel { - klog.V(4).Infof("adding node %s from the exclude-from-lb list because the label %s is found", newNode.Name, v1.LabelNodeExcludeBalancers) az.excludeLoadBalancerNodes.Insert(newNode.ObjectMeta.Name) } - - // Add to nodePrivateIPs cache - for _, address := range getNodePrivateIPAddresses(newNode) { - if az.nodePrivateIPs[newNode.Name] == nil { - az.nodePrivateIPs[newNode.Name] = sets.NewString() - } - - klog.V(4).Infof("adding IP address %s of the node %s", address, newNode.Name) - az.nodePrivateIPs[newNode.Name].Insert(address) - } } } diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_backoff.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_backoff.go index c236fca7b1d9..8aeba3a658c4 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_backoff.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_backoff.go @@ -17,7 +17,6 @@ limitations under the License. package provider import ( - "encoding/json" "errors" "fmt" "net/http" @@ -160,9 +159,6 @@ func (az *Cloud) CreateOrUpdateSecurityGroup(sg network.SecurityGroup) error { return nil } - nsgJSON, _ := json.Marshal(sg) - klog.Warningf("CreateOrUpdateSecurityGroup(%s) failed: %v, NSG request: %s", to.String(sg.Name), rerr.Error(), string(nsgJSON)) - // Invalidate the cache because ETAG precondition mismatch. if rerr.HTTPStatusCode == http.StatusPreconditionFailed { klog.V(3).Infof("SecurityGroup cache for %s is cleanup because of http.StatusPreconditionFailed", *sg.Name) @@ -221,9 +217,6 @@ func (az *Cloud) CreateOrUpdateLB(service *v1.Service, lb network.LoadBalancer) return nil } - lbJSON, _ := json.Marshal(lb) - klog.Warningf("LoadBalancerClient.CreateOrUpdate(%s) failed: %v, LoadBalancer request: %s", to.String(lb.Name), rerr.Error(), string(lbJSON)) - // Invalidate the cache because ETAG precondition mismatch. if rerr.HTTPStatusCode == http.StatusPreconditionFailed { klog.V(3).Infof("LoadBalancer cache for %s is cleanup because of http.StatusPreconditionFailed", to.String(lb.Name)) @@ -241,20 +234,20 @@ func (az *Cloud) CreateOrUpdateLB(service *v1.Service, lb network.LoadBalancer) if strings.Contains(strings.ToLower(retryErrorMessage), strings.ToLower(consts.ReferencedResourceNotProvisionedMessageCode)) { matches := pipErrorMessageRE.FindStringSubmatch(retryErrorMessage) if len(matches) != 3 { - klog.Errorf("Failed to parse the retry error message %s", retryErrorMessage) + klog.Warningf("Failed to parse the retry error message %s", retryErrorMessage) return rerr.Error() } pipRG, pipName := matches[1], matches[2] klog.V(3).Infof("The public IP %s referenced by load balancer %s is not in Succeeded provisioning state, will try to update it", pipName, to.String(lb.Name)) pip, _, err := az.getPublicIPAddress(pipRG, pipName) if err != nil { - klog.Errorf("Failed to get the public IP %s in resource group %s: %v", pipName, pipRG, err) + klog.Warningf("Failed to get the public IP %s in resource group %s: %v", pipName, pipRG, err) return rerr.Error() } // Perform a dummy update to fix the provisioning state err = az.CreateOrUpdatePIP(service, pipRG, pip) if err != nil { - klog.Errorf("Failed to update the public IP %s in resource group %s: %v", pipName, pipRG, err) + klog.Warningf("Failed to update the public IP %s in resource group %s: %v", pipName, pipRG, err) return rerr.Error() } // Invalidate the LB cache, return the error, and the controller manager @@ -265,34 +258,6 @@ func (az *Cloud) CreateOrUpdateLB(service *v1.Service, lb network.LoadBalancer) return rerr.Error() } -func (az *Cloud) CreateOrUpdateLBBackendPool(lbName string, backendPool network.BackendAddressPool) error { - ctx, cancel := getContextWithCancel() - defer cancel() - - klog.V(4).Infof("CreateOrUpdateLBBackendPool: updating backend pool %s in LB %s", to.String(backendPool.Name), lbName) - rerr := az.LoadBalancerClient.CreateOrUpdateBackendPools(ctx, az.getLoadBalancerResourceGroup(), lbName, to.String(backendPool.Name), backendPool, to.String(backendPool.Etag)) - if rerr == nil { - // Invalidate the cache right after updating - _ = az.lbCache.Delete(lbName) - return nil - } - - // Invalidate the cache because ETAG precondition mismatch. - if rerr.HTTPStatusCode == http.StatusPreconditionFailed { - klog.V(3).Infof("LoadBalancer cache for %s is cleanup because of http.StatusPreconditionFailed", lbName) - _ = az.lbCache.Delete(lbName) - } - - retryErrorMessage := rerr.Error().Error() - // Invalidate the cache because another new operation has canceled the current request. - if strings.Contains(strings.ToLower(retryErrorMessage), consts.OperationCanceledErrorMessage) { - klog.V(3).Infof("LoadBalancer cache for %s is cleanup because CreateOrUpdate is canceled by another operation", lbName) - _ = az.lbCache.Delete(lbName) - } - - return rerr.Error() -} - // ListManagedLBs invokes az.LoadBalancerClient.List and filter out // those that are not managed by cloud provider azure or not associated to a managed VMSet. func (az *Cloud) ListManagedLBs(service *v1.Service, nodes []*v1.Node, clusterName string) ([]network.LoadBalancer, error) { @@ -306,31 +271,22 @@ func (az *Cloud) ListManagedLBs(service *v1.Service, nodes []*v1.Node, clusterNa return nil, nil } - // return early if wantLb=false - if nodes == nil { - return allLBs, nil - } - agentPoolLBs := make([]network.LoadBalancer, 0) agentPoolVMSetNames, err := az.VMSet.GetAgentPoolVMSetNames(nodes) if err != nil { return nil, fmt.Errorf("ListManagedLBs: failed to get agent pool vmSet names: %w", err) } - agentPoolVMSetNamesSet := sets.NewString() if agentPoolVMSetNames != nil && len(*agentPoolVMSetNames) > 0 { for _, vmSetName := range *agentPoolVMSetNames { - klog.V(5).Infof("ListManagedLBs: found agent pool vmSet name %s", vmSetName) agentPoolVMSetNamesSet.Insert(strings.ToLower(vmSetName)) } } for _, lb := range allLBs { vmSetNameFromLBName := az.mapLoadBalancerNameToVMSet(to.String(lb.Name), clusterName) - if strings.EqualFold(strings.TrimSuffix(to.String(lb.Name), consts.InternalLoadBalancerNameSuffix), clusterName) || - agentPoolVMSetNamesSet.Has(strings.ToLower(vmSetNameFromLBName)) { + if agentPoolVMSetNamesSet.Has(strings.ToLower(vmSetNameFromLBName)) { agentPoolLBs = append(agentPoolLBs, lb) - klog.V(4).Infof("ListManagedLBs: found agent pool LB %s", to.String(lb.Name)) } } @@ -383,8 +339,7 @@ func (az *Cloud) CreateOrUpdatePIP(service *v1.Service, pipResourceGroup string, rerr := az.PublicIPAddressesClient.CreateOrUpdate(ctx, pipResourceGroup, to.String(pip.Name), pip) klog.V(10).Infof("PublicIPAddressesClient.CreateOrUpdate(%s, %s): end", pipResourceGroup, to.String(pip.Name)) if rerr != nil { - pipJSON, _ := json.Marshal(pip) - klog.Warningf("PublicIPAddressesClient.CreateOrUpdate(%s, %s) failed: %s, PublicIP request: %s", pipResourceGroup, to.String(pip.Name), rerr.Error().Error(), string(pipJSON)) + klog.Errorf("PublicIPAddressesClient.CreateOrUpdate(%s, %s) failed: %s", pipResourceGroup, to.String(pip.Name), rerr.Error().Error()) az.Event(service, v1.EventTypeWarning, "CreateOrUpdatePublicIPAddress", rerr.Error().Error()) return rerr.Error() } @@ -458,9 +413,6 @@ func (az *Cloud) CreateOrUpdateRouteTable(routeTable network.RouteTable) error { return nil } - rtJSON, _ := json.Marshal(routeTable) - klog.Warningf("RouteTablesClient.CreateOrUpdate(%s) failed: %v, RouteTable request: %s", to.String(routeTable.Name), rerr.Error(), string(rtJSON)) - // Invalidate the cache because etag mismatch. if rerr.HTTPStatusCode == http.StatusPreconditionFailed { klog.V(3).Infof("Route table cache for %s is cleanup because of http.StatusPreconditionFailed", *routeTable.Name) diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_blobDiskController.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_blobDiskController.go new file mode 100644 index 000000000000..4e4d96e73f53 --- /dev/null +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_blobDiskController.go @@ -0,0 +1,643 @@ +/* +Copyright 2020 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package provider + +import ( + "bytes" + "context" + "encoding/binary" + "errors" + "fmt" + "net/url" + "regexp" + "strings" + "sync" + "sync/atomic" + "time" + + "sigs.k8s.io/cloud-provider-azure/pkg/consts" + + "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-02-01/storage" + azstorage "github.com/Azure/azure-sdk-for-go/storage" + "github.com/Azure/go-autorest/autorest/to" + "github.com/rubiojr/go-vhd/vhd" + + kwait "k8s.io/apimachinery/pkg/util/wait" + volerr "k8s.io/cloud-provider/volume/errors" + "k8s.io/klog/v2" +) + +// Attention: blob disk feature is deprecated + +type storageAccountState struct { + name string + saType storage.SkuName + key string + diskCount int32 + isValidating int32 + defaultContainerCreated bool +} + +//BlobDiskController : blob disk controller struct +type BlobDiskController struct { + common *controllerCommon + accounts map[string]*storageAccountState +} + +var ( + accountsLock = &sync.Mutex{} +) + +func (c *BlobDiskController) initStorageAccounts() { + accountsLock.Lock() + defer accountsLock.Unlock() + + if c.accounts == nil { + // get accounts + accounts, err := c.getAllStorageAccounts() + if err != nil { + klog.Errorf("azureDisk - getAllStorageAccounts error: %v", err) + c.accounts = make(map[string]*storageAccountState) + } + c.accounts = accounts + } +} + +// CreateVolume creates a VHD blob in a storage account that has storageType and location using the given storage account. +// If no storage account is given, search all the storage accounts associated with the resource group and pick one that +// fits storage type and location. +func (c *BlobDiskController) CreateVolume(blobName, accountName, accountType, location string, requestGB int) (string, string, int, error) { + accountOptions := &AccountOptions{ + Name: accountName, + Type: accountType, + Kind: string(consts.DefaultStorageAccountKind), + ResourceGroup: c.common.resourceGroup, + Location: location, + EnableHTTPSTrafficOnly: true, + } + account, key, err := c.common.cloud.EnsureStorageAccount(accountOptions, consts.DedicatedDiskAccountNamePrefix) + if err != nil { + return "", "", 0, fmt.Errorf("could not get storage key for storage account %s: %w", accountName, err) + } + + client, err := azstorage.NewBasicClientOnSovereignCloud(account, key, c.common.cloud.Environment) + if err != nil { + return "", "", 0, err + } + blobClient := client.GetBlobService() + + // create a page blob in this account's vhd container + diskName, diskURI, err := c.createVHDBlobDisk(blobClient, account, blobName, consts.VhdContainerName, int64(requestGB)) + if err != nil { + return "", "", 0, err + } + + klog.V(4).Infof("azureDisk - created vhd blob uri: %s", diskURI) + return diskName, diskURI, requestGB, err +} + +// DeleteVolume deletes a VHD blob +func (c *BlobDiskController) DeleteVolume(diskURI string) error { + klog.V(4).Infof("azureDisk - begin to delete volume %s", diskURI) + accountName, blob, err := c.common.cloud.getBlobNameAndAccountFromURI(diskURI) + if err != nil { + return fmt.Errorf("failed to parse vhd URI %w", err) + } + key, err := c.common.cloud.GetStorageAccesskey(accountName, c.common.resourceGroup) + if err != nil { + return fmt.Errorf("no key for storage account %s, err %w", accountName, err) + } + err = c.common.cloud.deleteVhdBlob(accountName, key, blob) + if err != nil { + klog.Warningf("azureDisk - failed to delete blob %s err: %w", diskURI, err) + detail := err.Error() + if strings.Contains(detail, errLeaseIDMissing) { + // disk is still being used + // see https://msdn.microsoft.com/en-us/library/microsoft.windowsazure.storage.blob.protocol.bloberrorcodestrings.leaseidmissing.aspx + return volerr.NewDeletedVolumeInUseError(fmt.Sprintf("disk %q is still in use while being deleted", diskURI)) + } + return fmt.Errorf("failed to delete vhd %v, account %s, blob %s, err: %w", diskURI, accountName, blob, err) + } + klog.V(4).Infof("azureDisk - blob %s deleted", diskURI) + return nil + +} + +// get diskURI https://foo.blob.core.windows.net/vhds/bar.vhd and return foo (account) and bar.vhd (blob name) +func (c *BlobDiskController) getBlobNameAndAccountFromURI(diskURI string) (string, string, error) { + scheme := "http" + if consts.UseHTTPSForBlobBasedDisk { + scheme = "https" + } + host := fmt.Sprintf("%s://(.*).%s.%s", scheme, consts.BlobServiceName, c.common.storageEndpointSuffix) + reStr := fmt.Sprintf("%s/%s/(.*)", host, consts.VhdContainerName) + re := regexp.MustCompile(reStr) + res := re.FindSubmatch([]byte(diskURI)) + if len(res) < 3 { + return "", "", fmt.Errorf("invalid vhd URI for regex %s: %s", reStr, diskURI) + } + return string(res[1]), string(res[2]), nil +} + +func (c *BlobDiskController) createVHDBlobDisk(blobClient azstorage.BlobStorageClient, accountName, vhdName, containerName string, sizeGB int64) (string, string, error) { + container := blobClient.GetContainerReference(containerName) + size := 1024 * 1024 * 1024 * sizeGB + vhdSize := size + vhd.VHD_HEADER_SIZE /* header size */ + // Blob name in URL must end with '.vhd' extension. + vhdName = vhdName + ".vhd" + + tags := make(map[string]string) + tags["createdby"] = "k8sAzureDataDisk" + klog.V(4).Infof("azureDisk - creating page blob %s in container %s account %s", vhdName, containerName, accountName) + + blob := container.GetBlobReference(vhdName) + blob.Properties.ContentLength = vhdSize + blob.Metadata = tags + err := blob.PutPageBlob(nil) + if err != nil { + // if container doesn't exist, create one and retry PutPageBlob + detail := err.Error() + if strings.Contains(detail, errContainerNotFound) { + err = container.Create(&azstorage.CreateContainerOptions{Access: azstorage.ContainerAccessTypePrivate}) + if err == nil { + err = blob.PutPageBlob(nil) + } + } + } + if err != nil { + return "", "", fmt.Errorf("failed to put page blob %s in container %s: %w", vhdName, containerName, err) + } + + // add VHD signature to the blob + h, err := createVHDHeader(uint64(size)) + if err != nil { + _, _ = blob.DeleteIfExists(nil) + return "", "", fmt.Errorf("failed to create vhd header, err: %w", err) + } + + blobRange := azstorage.BlobRange{ + Start: uint64(size), + End: uint64(vhdSize - 1), + } + if err = blob.WriteRange(blobRange, bytes.NewBuffer(h[:vhd.VHD_HEADER_SIZE]), nil); err != nil { + klog.Infof("azureDisk - failed to put header page for data disk %s in container %s account %s, error was %s\n", + vhdName, containerName, accountName, err.Error()) + return "", "", err + } + + scheme := "http" + if consts.UseHTTPSForBlobBasedDisk { + scheme = "https" + } + + host := fmt.Sprintf("%s://%s.%s.%s", scheme, accountName, consts.BlobServiceName, c.common.storageEndpointSuffix) + uri := fmt.Sprintf("%s/%s/%s", host, containerName, vhdName) + return vhdName, uri, nil +} + +// delete a vhd blob +func (c *BlobDiskController) deleteVhdBlob(accountName, accountKey, blobName string) error { + client, err := azstorage.NewBasicClientOnSovereignCloud(accountName, accountKey, c.common.cloud.Environment) + if err != nil { + return err + } + blobSvc := client.GetBlobService() + + container := blobSvc.GetContainerReference(consts.VhdContainerName) + blob := container.GetBlobReference(blobName) + return blob.Delete(nil) +} + +//CreateBlobDisk : create a blob disk in a node +func (c *BlobDiskController) CreateBlobDisk(dataDiskName string, storageAccountType storage.SkuName, sizeGB int) (string, error) { + klog.V(4).Infof("azureDisk - creating blob data disk named:%s on StorageAccountType:%s", dataDiskName, storageAccountType) + + c.initStorageAccounts() + + storageAccountName, err := c.findSANameForDisk(storageAccountType) + if err != nil { + return "", err + } + + blobClient, err := c.getBlobSvcClient(storageAccountName) + if err != nil { + return "", err + } + + _, diskURI, err := c.createVHDBlobDisk(blobClient, storageAccountName, dataDiskName, consts.VhdContainerName, int64(sizeGB)) + if err != nil { + return "", err + } + + atomic.AddInt32(&c.accounts[storageAccountName].diskCount, 1) + + return diskURI, nil +} + +//DeleteBlobDisk : delete a blob disk from a node +func (c *BlobDiskController) DeleteBlobDisk(diskURI string) error { + storageAccountName, vhdName, err := diskNameAndSANameFromURI(diskURI) + if err != nil { + return err + } + + _, ok := c.accounts[storageAccountName] + if !ok { + // the storage account is specified by user + klog.V(4).Infof("azureDisk - deleting volume %s", diskURI) + return c.DeleteVolume(diskURI) + } + + blobSvc, err := c.getBlobSvcClient(storageAccountName) + if err != nil { + return err + } + + klog.V(4).Infof("azureDisk - About to delete vhd file %s on storage account %s container %s", vhdName, storageAccountName, consts.VhdContainerName) + + container := blobSvc.GetContainerReference(consts.VhdContainerName) + blob := container.GetBlobReference(vhdName) + _, err = blob.DeleteIfExists(nil) + + if c.accounts[storageAccountName].diskCount == -1 { + if diskCount, err := c.getDiskCount(storageAccountName); err != nil { + c.accounts[storageAccountName].diskCount = int32(diskCount) + } else { + klog.Warningf("azureDisk - failed to get disk count for %s however the delete disk operation was ok", storageAccountName) + return nil // we have failed to acquire a new count. not an error condition + } + } + atomic.AddInt32(&c.accounts[storageAccountName].diskCount, -1) + return err +} + +func (c *BlobDiskController) getStorageAccountKey(SAName string) (string, error) { + if account, exists := c.accounts[SAName]; exists && account.key != "" { + return c.accounts[SAName].key, nil + } + + ctx, cancel := getContextWithCancel() + defer cancel() + listKeysResult, rerr := c.common.cloud.StorageAccountClient.ListKeys(ctx, c.common.resourceGroup, SAName) + if rerr != nil { + return "", rerr.Error() + } + if listKeysResult.Keys == nil { + return "", fmt.Errorf("azureDisk - empty listKeysResult in storage account:%s keys", SAName) + } + for _, v := range *listKeysResult.Keys { + if v.Value != nil && *v.Value == "key1" { + if _, ok := c.accounts[SAName]; !ok { + klog.Warningf("azureDisk - account %s was not cached while getting keys", SAName) + return *v.Value, nil + } + c.accounts[SAName].key = *v.Value + return c.accounts[SAName].key, nil + } + } + + return "", fmt.Errorf("couldn't find key named key1 in storage account:%s keys", SAName) +} + +func (c *BlobDiskController) getBlobSvcClient(SAName string) (azstorage.BlobStorageClient, error) { + key := "" + var client azstorage.Client + var blobSvc azstorage.BlobStorageClient + var err error + if key, err = c.getStorageAccountKey(SAName); err != nil { + return blobSvc, err + } + + if client, err = azstorage.NewBasicClientOnSovereignCloud(SAName, key, c.common.cloud.Environment); err != nil { + return blobSvc, err + } + + blobSvc = client.GetBlobService() + return blobSvc, nil +} + +func (c *BlobDiskController) ensureDefaultContainer(storageAccountName string) error { + var err error + var blobSvc azstorage.BlobStorageClient + + // short circuit the check via local cache + // we are forgiving the fact that account may not be in cache yet + if v, ok := c.accounts[storageAccountName]; ok && v.defaultContainerCreated { + return nil + } + + // not cached, check existence and readiness + bExist, provisionState, _ := c.getStorageAccountState(storageAccountName) + + // account does not exist + if !bExist { + return fmt.Errorf("azureDisk - account %s does not exist while trying to create/ensure default container", storageAccountName) + } + + // account exists but not ready yet + if provisionState != storage.ProvisioningStateSucceeded { + // we don't want many attempts to validate the account readiness + // here hence we are locking + counter := 1 + for swapped := atomic.CompareAndSwapInt32(&c.accounts[storageAccountName].isValidating, 0, 1); !swapped; { + time.Sleep(3 * time.Second) + counter = counter + 1 + // check if we passed the max sleep + if counter >= 20 { + return fmt.Errorf("azureDisk - timeout waiting to acquire lock to validate account:%s readiness", storageAccountName) + } + } + + // swapped + defer func() { + c.accounts[storageAccountName].isValidating = 0 + }() + + // short circuit the check again. + if v, ok := c.accounts[storageAccountName]; ok && v.defaultContainerCreated { + return nil + } + + err = kwait.ExponentialBackoff(defaultBackOff, func() (bool, error) { + _, provisionState, err := c.getStorageAccountState(storageAccountName) + + if err != nil { + klog.V(4).Infof("azureDisk - GetStorageAccount:%s err %s", storageAccountName, err.Error()) + return false, nil // error performing the query - retryable + } + + if provisionState == storage.ProvisioningStateSucceeded { + return true, nil + } + + klog.V(4).Infof("azureDisk - GetStorageAccount:%s not ready yet (not flagged Succeeded by ARM)", storageAccountName) + return false, nil // back off and see if the account becomes ready on next retry + }) + // we have failed to ensure that account is ready for us to create + // the default vhd container + if err != nil { + if errors.Is(err, kwait.ErrWaitTimeout) { + return fmt.Errorf("azureDisk - timed out waiting for storage account %s to become ready", storageAccountName) + } + return err + } + } + + if blobSvc, err = c.getBlobSvcClient(storageAccountName); err != nil { + return err + } + + container := blobSvc.GetContainerReference(consts.VhdContainerName) + bCreated, err := container.CreateIfNotExists(&azstorage.CreateContainerOptions{Access: azstorage.ContainerAccessTypePrivate}) + if err != nil { + return err + } + if bCreated { + klog.V(2).Infof("azureDisk - storage account:%s had no default container(%s) and it was created \n", storageAccountName, consts.VhdContainerName) + } + + // flag so we no longer have to check on ARM + c.accounts[storageAccountName].defaultContainerCreated = true + return nil +} + +// Gets Disk counts per storage account +func (c *BlobDiskController) getDiskCount(SAName string) (int, error) { + // if we have it in cache + if c.accounts[SAName].diskCount != -1 { + return int(c.accounts[SAName].diskCount), nil + } + + var err error + var blobSvc azstorage.BlobStorageClient + + if err = c.ensureDefaultContainer(SAName); err != nil { + return 0, err + } + + if blobSvc, err = c.getBlobSvcClient(SAName); err != nil { + return 0, err + } + params := azstorage.ListBlobsParameters{} + + container := blobSvc.GetContainerReference(consts.VhdContainerName) + response, err := container.ListBlobs(params) + if err != nil { + return 0, err + } + klog.V(4).Infof("azure-Disk - refreshed data count for account %s and found %v", SAName, len(response.Blobs)) + c.accounts[SAName].diskCount = int32(len(response.Blobs)) + + return int(c.accounts[SAName].diskCount), nil +} + +func (c *BlobDiskController) getAllStorageAccounts() (map[string]*storageAccountState, error) { + ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second) + defer cancel() + accountList, rerr := c.common.cloud.StorageAccountClient.ListByResourceGroup(ctx, c.common.resourceGroup) + if rerr != nil { + return nil, rerr.Error() + } + + accounts := make(map[string]*storageAccountState) + for _, v := range accountList { + if v.Name == nil || v.Sku == nil { + klog.Info("azureDisk - accountListResult Name or Sku is nil") + continue + } + if !strings.HasPrefix(*v.Name, consts.SharedDiskAccountNamePrefix) { + continue + } + klog.Infof("azureDisk - identified account %s as part of shared PVC accounts", *v.Name) + + saState := &storageAccountState{ + name: *v.Name, + saType: (*v.Sku).Name, + diskCount: -1, + } + + accounts[*v.Name] = saState + } + + return accounts, nil +} + +func (c *BlobDiskController) createStorageAccount(storageAccountName string, storageAccountType storage.SkuName, location string, checkMaxAccounts bool) error { + bExist, _, _ := c.getStorageAccountState(storageAccountName) + if bExist { + newAccountState := &storageAccountState{ + diskCount: -1, + saType: storageAccountType, + name: storageAccountName, + } + + c.addAccountState(storageAccountName, newAccountState) + } + // Account Does not exist + if !bExist { + if len(c.accounts) == maxStorageAccounts && checkMaxAccounts { + return fmt.Errorf("azureDisk - can not create new storage account, current storage accounts count:%v Max is:%v", len(c.accounts), maxStorageAccounts) + } + + klog.V(2).Infof("azureDisk - Creating storage account %s type %s", storageAccountName, string(storageAccountType)) + + cp := storage.AccountCreateParameters{ + Sku: &storage.Sku{Name: storageAccountType}, + // switch to use StorageV2 as it's recommended according to https://docs.microsoft.com/en-us/azure/storage/common/storage-account-options + Kind: consts.DefaultStorageAccountKind, + Tags: map[string]*string{"created-by": to.StringPtr("azure-dd")}, + Location: &location} + ctx, cancel := getContextWithCancel() + defer cancel() + + err := c.common.cloud.StorageAccountClient.Create(ctx, c.common.resourceGroup, storageAccountName, cp) + if err != nil { + return fmt.Errorf("failed to create Storage Account: %s, error: %v", storageAccountName, err) + } + + newAccountState := &storageAccountState{ + diskCount: -1, + saType: storageAccountType, + name: storageAccountName, + } + + c.addAccountState(storageAccountName, newAccountState) + } + + // finally, make sure that we default container is created + // before handing it back over + return c.ensureDefaultContainer(storageAccountName) +} + +// finds a new suitable storageAccount for this disk +func (c *BlobDiskController) findSANameForDisk(storageAccountType storage.SkuName) (string, error) { + maxDiskCount := maxDisksPerStorageAccounts + SAName := "" + totalDiskCounts := 0 + countAccounts := 0 // account of this type. + for _, v := range c.accounts { + // filter out any stand-alone disks/accounts + if !strings.HasPrefix(v.name, consts.SharedDiskAccountNamePrefix) { + continue + } + + // note: we compute avg stratified by type. + // this is to enable user to grow per SA type to avoid low + // avg utilization on one account type skewing all data. + + if v.saType == storageAccountType { + // compute average + dCount, err := c.getDiskCount(v.name) + if err != nil { + return "", err + } + totalDiskCounts = totalDiskCounts + dCount + countAccounts = countAccounts + 1 + // empty account + if dCount == 0 { + klog.V(2).Infof("azureDisk - account %s identified for a new disk is because it has 0 allocated disks", v.name) + return v.name, nil // short circuit, avg is good and no need to adjust + } + // if this account is less allocated + if dCount < maxDiskCount { + maxDiskCount = dCount + SAName = v.name + } + } + } + + // if we failed to find storageaccount + if SAName == "" { + klog.V(2).Infof("azureDisk - failed to identify a suitable account for new disk and will attempt to create new account") + SAName = generateStorageAccountName(consts.SharedDiskAccountNamePrefix) + err := c.createStorageAccount(SAName, storageAccountType, c.common.location, true) + if err != nil { + return "", err + } + return SAName, nil + } + + disksAfter := totalDiskCounts + 1 // with the new one! + + avgUtilization := float64(disksAfter) / float64(countAccounts*maxDisksPerStorageAccounts) + aboveAvg := avgUtilization > storageAccountUtilizationBeforeGrowing + + // avg are not create and we should create more accounts if we can + if aboveAvg && countAccounts < maxStorageAccounts { + klog.V(2).Infof("azureDisk - shared storageAccounts utilization(%v) > grow-at-avg-utilization (%v). New storage account will be created", avgUtilization, storageAccountUtilizationBeforeGrowing) + SAName = generateStorageAccountName(consts.SharedDiskAccountNamePrefix) + err := c.createStorageAccount(SAName, storageAccountType, c.common.location, true) + if err != nil { + return "", err + } + return SAName, nil + } + + // averages are not ok and we are at capacity (max storage accounts allowed) + if aboveAvg && countAccounts == maxStorageAccounts { + klog.Infof("azureDisk - shared storageAccounts utilization(%v) > grow-at-avg-utilization (%v). But k8s maxed on SAs for PVC(%v). k8s will now exceed grow-at-avg-utilization without adding accounts", + avgUtilization, storageAccountUtilizationBeforeGrowing, maxStorageAccounts) + } + + // we found a storage accounts && [ avg are ok || we reached max sa count ] + return SAName, nil +} + +//Gets storage account exist, provisionStatus, Error if any +func (c *BlobDiskController) getStorageAccountState(storageAccountName string) (bool, storage.ProvisioningState, error) { + ctx, cancel := getContextWithCancel() + defer cancel() + account, rerr := c.common.cloud.StorageAccountClient.GetProperties(ctx, c.common.resourceGroup, storageAccountName) + if rerr != nil { + return false, "", rerr.Error() + } + return true, account.AccountProperties.ProvisioningState, nil +} + +func (c *BlobDiskController) addAccountState(key string, state *storageAccountState) { + accountsLock.Lock() + defer accountsLock.Unlock() + + if _, ok := c.accounts[key]; !ok { + c.accounts[key] = state + } +} + +func createVHDHeader(size uint64) ([]byte, error) { + h := vhd.CreateFixedHeader(size, &vhd.VHDOptions{}) + b := new(bytes.Buffer) + err := binary.Write(b, binary.BigEndian, h) + if err != nil { + return nil, err + } + return b.Bytes(), nil +} + +func diskNameAndSANameFromURI(diskURI string) (string, string, error) { + uri, err := url.Parse(diskURI) + if err != nil { + return "", "", err + } + + hostName := uri.Host + storageAccountName := strings.Split(hostName, ".")[0] + + segments := strings.Split(uri.Path, "/") + diskNameVhd := segments[len(segments)-1] + + return storageAccountName, diskNameVhd, nil +} diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_controller_common.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_controller_common.go index 42a4611e3361..d96f203ee87e 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_controller_common.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_controller_common.go @@ -41,11 +41,17 @@ import ( ) const ( + // for limits check https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits#storage-limits + maxStorageAccounts = 100 // max # is 200 (250 with special request). this allows 100 for everything else including stand alone disks + maxDisksPerStorageAccounts = 60 + storageAccountUtilizationBeforeGrowing = 0.5 // Disk Caching is not supported for disks 4 TiB and larger // https://docs.microsoft.com/en-us/azure/virtual-machines/premium-storage-performance#disk-caching diskCachingLimit = 4096 // GiB maxLUN = 64 // max number of LUNs per VM + errLeaseIDMissing = "LeaseIdMissing" + errContainerNotFound = "ContainerNotFound" errStatusCode400 = "statuscode=400" errInvalidParameter = `code="invalidparameter"` errTargetInstanceIds = `target="instanceids"` @@ -99,6 +105,7 @@ type AttachDiskOptions struct { cachingMode compute.CachingTypes diskName string diskEncryptionSetID string + isManagedDisk bool writeAcceleratorEnabled bool lun int32 } @@ -138,10 +145,9 @@ func (c *controllerCommon) getNodeVMSet(nodeName types.NodeName, crt azcache.Azu return ss, nil } -// AttachDisk attaches a disk to vm -// parameter async indicates whether allow multiple batch disk attach on one node in parallel +// AttachDisk attaches a vhd to vm. The vhd must exist, can be identified by diskName, diskURI. // return (lun, error) -func (c *controllerCommon) AttachDisk(ctx context.Context, async bool, diskName, diskURI string, nodeName types.NodeName, +func (c *controllerCommon) AttachDisk(isManagedDisk bool, diskName, diskURI string, nodeName types.NodeName, cachingMode compute.CachingTypes, disk *compute.Disk) (int32, error) { diskEncryptionSetID := "" writeAcceleratorEnabled := false @@ -203,6 +209,7 @@ func (c *controllerCommon) AttachDisk(ctx context.Context, async bool, diskName, options := AttachDiskOptions{ lun: -1, + isManagedDisk: isManagedDisk, diskName: diskName, cachingMode: cachingMode, diskEncryptionSetID: diskEncryptionSetID, @@ -248,17 +255,22 @@ func (c *controllerCommon) AttachDisk(ctx context.Context, async bool, diskName, return -1, err } - if async && c.diskOpRateLimiter.TryAccept() { + if c.diskOpRateLimiter.TryAccept() { // unlock and wait for attach disk complete unlock = true c.lockMap.UnlockEntry(node) } else { - klog.Warningf("azureDisk - switch to batch operation due to rate limited(async: %t), QPS: %f", async, c.diskOpRateLimiter.QPS()) + klog.Warningf("azureDisk - switch to batch operation since disk operation is rate limited, current QPS: %f", c.diskOpRateLimiter.QPS()) } + + ctx, cancel := getContextWithCancel() + defer cancel() + resourceGroup, err := getResourceGroupFromDiskURI(diskURI) if err != nil { return -1, err } + return lun, vmset.WaitForUpdateResult(ctx, future, resourceGroup, "attach_disk") } @@ -306,8 +318,11 @@ func (c *controllerCommon) cleanAttachDiskRequests(nodeName string) (map[string] } // DetachDisk detaches a disk from VM -func (c *controllerCommon) DetachDisk(ctx context.Context, diskName, diskURI string, nodeName types.NodeName) error { - if _, err := c.cloud.InstanceID(context.TODO(), nodeName); err != nil { +func (c *controllerCommon) DetachDisk(diskName, diskURI string, nodeName types.NodeName) error { + ctx, cancel := getContextWithCancel() + defer cancel() + _, err := c.cloud.InstanceID(ctx, nodeName) + if err != nil { if errors.Is(err, cloudprovider.InstanceNotFound) { // if host doesn't exist, no need to detach klog.Warningf("azureDisk - failed to get azure instance id(%q), DetachDisk(%s) will assume disk is already detached", @@ -318,11 +333,6 @@ func (c *controllerCommon) DetachDisk(ctx context.Context, diskName, diskURI str return fmt.Errorf("failed to get azure instance id for node %q: %w", nodeName, err) } - vmset, err := c.getNodeVMSet(nodeName, azcache.CacheReadTypeUnsafe) - if err != nil { - return err - } - node := strings.ToLower(string(nodeName)) disk := strings.ToLower(diskURI) if err := c.insertDetachDiskRequest(diskName, disk, node); err != nil { @@ -330,7 +340,12 @@ func (c *controllerCommon) DetachDisk(ctx context.Context, diskName, diskURI str } c.lockMap.LockEntry(node) - defer c.lockMap.UnlockEntry(node) + unlock := false + defer func() { + if !unlock { + c.lockMap.UnlockEntry(node) + } + }() diskMap, err := c.cleanDetachDiskRequests(node) if err != nil { return err @@ -338,26 +353,39 @@ func (c *controllerCommon) DetachDisk(ctx context.Context, diskName, diskURI str klog.V(2).Infof("Trying to detach volume %q from node %q, diskMap: %s", diskURI, nodeName, diskMap) if len(diskMap) > 0 { + vmset, errVMSet := c.getNodeVMSet(nodeName, azcache.CacheReadTypeUnsafe) + if errVMSet != nil { + return errVMSet + } c.diskStateMap.Store(disk, "detaching") defer c.diskStateMap.Delete(disk) - if err = vmset.DetachDisk(nodeName, diskMap); err != nil { + future, err := vmset.DetachDisk(nodeName, diskMap) + if err != nil { if isInstanceNotFoundError(err) { // if host doesn't exist, no need to detach klog.Warningf("azureDisk - got InstanceNotFoundError(%v), DetachDisk(%s) will assume disk is already detached", err, diskURI) return nil } + klog.Errorf("azureDisk - detach disk(%s, %s) failed, err: %v", diskName, diskURI, err) + return err } - } else { - lun, _, errGetLun := c.GetDiskLun(diskName, diskURI, nodeName) - if errGetLun == nil || !strings.Contains(errGetLun.Error(), consts.CannotFindDiskLUN) { - return fmt.Errorf("disk(%s) is still attatched to node(%s) on lun(%d), error: %v", diskURI, nodeName, lun, errGetLun) + resourceGroup, err := getResourceGroupFromDiskURI(diskURI) + if err != nil { + return err + } + if c.diskOpRateLimiter.TryAccept() { + // unlock and wait for attach disk complete + unlock = true + c.lockMap.UnlockEntry(node) + } else { + klog.Warningf("azureDisk - switch to batch operation since disk operation is rate limited, current QPS: %f", c.diskOpRateLimiter.QPS()) } - } - if err != nil { - klog.Errorf("azureDisk - detach disk(%s, %s) failed, err: %v", diskName, diskURI, err) - return err + if err := vmset.WaitForUpdateResult(ctx, future, resourceGroup, "detach_disk"); err != nil { + klog.Errorf("azureDisk - detach disk(%s, %s) failed with error: %v", diskName, diskURI, err) + return err + } } klog.V(2).Infof("azureDisk - detach disk(%s, %s) succeeded", diskName, diskURI) @@ -453,7 +481,7 @@ func (c *controllerCommon) GetDiskLun(diskName, diskURI string, nodeName types.N } } } - return -1, provisioningState, fmt.Errorf("%s for disk %s", consts.CannotFindDiskLUN, diskName) + return -1, provisioningState, fmt.Errorf("cannot find Lun for disk %s", diskName) } // SetDiskLun find unused luns and allocate lun for every disk in diskMap. @@ -650,8 +678,5 @@ func getValidCreationData(subscriptionID, resourceGroup, sourceResourceID, sourc func isInstanceNotFoundError(err error) bool { errMsg := strings.ToLower(err.Error()) - if strings.Contains(errMsg, strings.ToLower(consts.VmssVMNotActiveErrorMessage)) { - return true - } return strings.Contains(errMsg, errStatusCode400) && strings.Contains(errMsg, errInvalidParameter) && strings.Contains(errMsg, errTargetInstanceIds) } diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_controller_standard.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_controller_standard.go index 3bf5d49772c1..b0d6a7910ba9 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_controller_standard.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_controller_standard.go @@ -51,40 +51,53 @@ func (as *availabilitySet) AttachDisk(nodeName types.NodeName, diskMap map[strin for k, v := range diskMap { diskURI := k opt := v - attached := false - for _, disk := range *vm.StorageProfile.DataDisks { - if disk.ManagedDisk != nil && strings.EqualFold(*disk.ManagedDisk.ID, diskURI) { - attached = true - break + if opt.isManagedDisk { + attached := false + for _, disk := range *vm.StorageProfile.DataDisks { + if disk.ManagedDisk != nil && strings.EqualFold(*disk.ManagedDisk.ID, diskURI) { + attached = true + break + } + } + if attached { + klog.V(2).Infof("azureDisk - disk(%s) already attached to node(%s)", diskURI, nodeName) + continue } - } - if attached { - klog.V(2).Infof("azureDisk - disk(%s) already attached to node(%s)", diskURI, nodeName) - continue - } - managedDisk := &compute.ManagedDiskParameters{ID: &diskURI} - if opt.diskEncryptionSetID == "" { - if vm.StorageProfile.OsDisk != nil && - vm.StorageProfile.OsDisk.ManagedDisk != nil && - vm.StorageProfile.OsDisk.ManagedDisk.DiskEncryptionSet != nil && - vm.StorageProfile.OsDisk.ManagedDisk.DiskEncryptionSet.ID != nil { - // set diskEncryptionSet as value of os disk by default - opt.diskEncryptionSetID = *vm.StorageProfile.OsDisk.ManagedDisk.DiskEncryptionSet.ID + managedDisk := &compute.ManagedDiskParameters{ID: &diskURI} + if opt.diskEncryptionSetID == "" { + if vm.StorageProfile.OsDisk != nil && + vm.StorageProfile.OsDisk.ManagedDisk != nil && + vm.StorageProfile.OsDisk.ManagedDisk.DiskEncryptionSet != nil && + vm.StorageProfile.OsDisk.ManagedDisk.DiskEncryptionSet.ID != nil { + // set diskEncryptionSet as value of os disk by default + opt.diskEncryptionSetID = *vm.StorageProfile.OsDisk.ManagedDisk.DiskEncryptionSet.ID + } } + if opt.diskEncryptionSetID != "" { + managedDisk.DiskEncryptionSet = &compute.DiskEncryptionSetParameters{ID: &opt.diskEncryptionSetID} + } + disks = append(disks, + compute.DataDisk{ + Name: &opt.diskName, + Lun: &opt.lun, + Caching: opt.cachingMode, + CreateOption: "attach", + ManagedDisk: managedDisk, + WriteAcceleratorEnabled: to.BoolPtr(opt.writeAcceleratorEnabled), + }) + } else { + disks = append(disks, + compute.DataDisk{ + Name: &opt.diskName, + Vhd: &compute.VirtualHardDisk{ + URI: &diskURI, + }, + Lun: &opt.lun, + Caching: opt.cachingMode, + CreateOption: "attach", + }) } - if opt.diskEncryptionSetID != "" { - managedDisk.DiskEncryptionSet = &compute.DiskEncryptionSetParameters{ID: &opt.diskEncryptionSetID} - } - disks = append(disks, - compute.DataDisk{ - Name: &opt.diskName, - Lun: &opt.lun, - Caching: opt.cachingMode, - CreateOption: "attach", - ManagedDisk: managedDisk, - WriteAcceleratorEnabled: to.BoolPtr(opt.writeAcceleratorEnabled), - }) } newVM := compute.VirtualMachineUpdate{ @@ -130,18 +143,18 @@ func (as *availabilitySet) WaitForUpdateResult(ctx context.Context, future *azur } // DetachDisk detaches a disk from VM -func (as *availabilitySet) DetachDisk(nodeName types.NodeName, diskMap map[string]string) error { +func (as *availabilitySet) DetachDisk(nodeName types.NodeName, diskMap map[string]string) (*azure.Future, error) { vm, err := as.getVirtualMachine(nodeName, azcache.CacheReadTypeDefault) if err != nil { // if host doesn't exist, no need to detach klog.Warningf("azureDisk - cannot find node %s, skip detaching disk list(%s)", nodeName, diskMap) - return nil + return nil, nil } vmName := mapNodeNameToVMName(nodeName) nodeResourceGroup, err := as.GetNodeResourceGroup(vmName) if err != nil { - return err + return nil, err } disks := make([]compute.DataDisk, len(*vm.StorageProfile.DataDisks)) @@ -193,22 +206,22 @@ func (as *availabilitySet) DetachDisk(nodeName types.NodeName, diskMap map[strin _ = as.cloud.vmCache.Delete(vmName) }() - rerr := as.VirtualMachinesClient.Update(ctx, nodeResourceGroup, vmName, newVM, "detach_disk") + future, rerr := as.VirtualMachinesClient.UpdateAsync(ctx, nodeResourceGroup, vmName, newVM, "detach_disk") if rerr != nil { klog.Errorf("azureDisk - detach disk list(%s) on rg(%s) vm(%s) failed, err: %v", diskMap, nodeResourceGroup, vmName, rerr) if rerr.HTTPStatusCode == http.StatusNotFound { klog.Errorf("azureDisk - begin to filterNonExistingDisks(%v) on rg(%s) vm(%s)", diskMap, nodeResourceGroup, vmName) disks := as.filterNonExistingDisks(ctx, *vm.StorageProfile.DataDisks) newVM.VirtualMachineProperties.StorageProfile.DataDisks = &disks - rerr = as.VirtualMachinesClient.Update(ctx, nodeResourceGroup, vmName, newVM, "detach_disk") + future, rerr = as.VirtualMachinesClient.UpdateAsync(ctx, nodeResourceGroup, vmName, newVM, "detach_disk") } } klog.V(2).Infof("azureDisk - update(%s): vm(%s) - detach disk list(%s) returned with %v", nodeResourceGroup, vmName, diskMap, rerr) if rerr != nil { - return rerr.Error() + return future, rerr.Error() } - return nil + return future, nil } // UpdateVM updates a vm diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_controller_vmss.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_controller_vmss.go index 7c9a3268e48c..2dd73ed4f5d5 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_controller_vmss.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_controller_vmss.go @@ -54,40 +54,53 @@ func (ss *ScaleSet) AttachDisk(nodeName types.NodeName, diskMap map[string]*Atta for k, v := range diskMap { diskURI := k opt := v - attached := false - for _, disk := range *vm.StorageProfile.DataDisks { - if disk.ManagedDisk != nil && strings.EqualFold(*disk.ManagedDisk.ID, diskURI) { - attached = true - break + if opt.isManagedDisk { + attached := false + for _, disk := range *vm.StorageProfile.DataDisks { + if disk.ManagedDisk != nil && strings.EqualFold(*disk.ManagedDisk.ID, diskURI) { + attached = true + break + } + } + if attached { + klog.V(2).Infof("azureDisk - disk(%s) already attached to node(%s)", diskURI, nodeName) + continue } - } - if attached { - klog.V(2).Infof("azureDisk - disk(%s) already attached to node(%s)", diskURI, nodeName) - continue - } - managedDisk := &compute.ManagedDiskParameters{ID: &diskURI} - if opt.diskEncryptionSetID == "" { - if vm.StorageProfile.OsDisk != nil && - vm.StorageProfile.OsDisk.ManagedDisk != nil && - vm.StorageProfile.OsDisk.ManagedDisk.DiskEncryptionSet != nil && - vm.StorageProfile.OsDisk.ManagedDisk.DiskEncryptionSet.ID != nil { - // set diskEncryptionSet as value of os disk by default - opt.diskEncryptionSetID = *vm.StorageProfile.OsDisk.ManagedDisk.DiskEncryptionSet.ID + managedDisk := &compute.ManagedDiskParameters{ID: &diskURI} + if opt.diskEncryptionSetID == "" { + if vm.StorageProfile.OsDisk != nil && + vm.StorageProfile.OsDisk.ManagedDisk != nil && + vm.StorageProfile.OsDisk.ManagedDisk.DiskEncryptionSet != nil && + vm.StorageProfile.OsDisk.ManagedDisk.DiskEncryptionSet.ID != nil { + // set diskEncryptionSet as value of os disk by default + opt.diskEncryptionSetID = *vm.StorageProfile.OsDisk.ManagedDisk.DiskEncryptionSet.ID + } } + if opt.diskEncryptionSetID != "" { + managedDisk.DiskEncryptionSet = &compute.DiskEncryptionSetParameters{ID: &opt.diskEncryptionSetID} + } + disks = append(disks, + compute.DataDisk{ + Name: &opt.diskName, + Lun: &opt.lun, + Caching: opt.cachingMode, + CreateOption: "attach", + ManagedDisk: managedDisk, + WriteAcceleratorEnabled: to.BoolPtr(opt.writeAcceleratorEnabled), + }) + } else { + disks = append(disks, + compute.DataDisk{ + Name: &opt.diskName, + Vhd: &compute.VirtualHardDisk{ + URI: &diskURI, + }, + Lun: &opt.lun, + Caching: opt.cachingMode, + CreateOption: "attach", + }) } - if opt.diskEncryptionSetID != "" { - managedDisk.DiskEncryptionSet = &compute.DiskEncryptionSetParameters{ID: &opt.diskEncryptionSetID} - } - disks = append(disks, - compute.DataDisk{ - Name: &opt.diskName, - Lun: &opt.lun, - Caching: opt.cachingMode, - CreateOption: "attach", - ManagedDisk: managedDisk, - WriteAcceleratorEnabled: to.BoolPtr(opt.writeAcceleratorEnabled), - }) } newVM := compute.VirtualMachineScaleSetVM{ @@ -134,16 +147,16 @@ func (ss *ScaleSet) WaitForUpdateResult(ctx context.Context, future *azure.Futur } // DetachDisk detaches a disk from VM -func (ss *ScaleSet) DetachDisk(nodeName types.NodeName, diskMap map[string]string) error { +func (ss *ScaleSet) DetachDisk(nodeName types.NodeName, diskMap map[string]string) (*azure.Future, error) { vmName := mapNodeNameToVMName(nodeName) ssName, instanceID, vm, err := ss.getVmssVM(vmName, azcache.CacheReadTypeDefault) if err != nil { - return err + return nil, err } nodeResourceGroup, err := ss.GetNodeResourceGroup(vmName) if err != nil { - return err + return nil, err } disks := []compute.DataDisk{} @@ -198,22 +211,22 @@ func (ss *ScaleSet) DetachDisk(nodeName types.NodeName, diskMap map[string]strin }() klog.V(2).Infof("azureDisk - update(%s): vm(%s) - detach disk list(%s)", nodeResourceGroup, nodeName, diskMap) - rerr := ss.VirtualMachineScaleSetVMsClient.Update(ctx, nodeResourceGroup, ssName, instanceID, newVM, "detach_disk") + future, rerr := ss.VirtualMachineScaleSetVMsClient.UpdateAsync(ctx, nodeResourceGroup, ssName, instanceID, newVM, "detach_disk") if rerr != nil { klog.Errorf("azureDisk - detach disk list(%s) on rg(%s) vm(%s) failed, err: %v", diskMap, nodeResourceGroup, nodeName, rerr) if rerr.HTTPStatusCode == http.StatusNotFound { klog.Errorf("azureDisk - begin to filterNonExistingDisks(%v) on rg(%s) vm(%s)", diskMap, nodeResourceGroup, nodeName) disks := ss.filterNonExistingDisks(ctx, *newVM.VirtualMachineScaleSetVMProperties.StorageProfile.DataDisks) newVM.VirtualMachineScaleSetVMProperties.StorageProfile.DataDisks = &disks - rerr = ss.VirtualMachineScaleSetVMsClient.Update(ctx, nodeResourceGroup, ssName, instanceID, newVM, "detach_disk") + future, rerr = ss.VirtualMachineScaleSetVMsClient.UpdateAsync(ctx, nodeResourceGroup, ssName, instanceID, newVM, "detach_disk") } } klog.V(2).Infof("azureDisk - update(%s): vm(%s) - detach disk(%v) returned with %v", nodeResourceGroup, nodeName, diskMap, rerr) if rerr != nil { - return rerr.Error() + return future, rerr.Error() } - return nil + return future, nil } // UpdateVM updates a vm diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_fakes.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_fakes.go index abe343f43ad4..2e46c63f8bac 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_fakes.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_fakes.go @@ -67,27 +67,25 @@ func GetTestCloud(ctrl *gomock.Controller) (az *Cloud) { TenantID: "tenant", SubscriptionID: "subscription", }, - ResourceGroup: "rg", - VnetResourceGroup: "rg", - RouteTableResourceGroup: "rg", - SecurityGroupResourceGroup: "rg", - Location: "westus", - VnetName: "vnet", - SubnetName: "subnet", - SecurityGroupName: "nsg", - RouteTableName: "rt", - PrimaryAvailabilitySetName: "as", - PrimaryScaleSetName: "vmss", - MaximumLoadBalancerRuleCount: 250, - VMType: consts.VMTypeStandard, - LoadBalancerBackendPoolConfigurationType: consts.LoadBalancerBackendPoolConfigurationTypeNodeIPConfiguration, + ResourceGroup: "rg", + VnetResourceGroup: "rg", + RouteTableResourceGroup: "rg", + SecurityGroupResourceGroup: "rg", + Location: "westus", + VnetName: "vnet", + SubnetName: "subnet", + SecurityGroupName: "nsg", + RouteTableName: "rt", + PrimaryAvailabilitySetName: "as", + PrimaryScaleSetName: "vmss", + MaximumLoadBalancerRuleCount: 250, + VMType: consts.VMTypeStandard, }, nodeZones: map[string]sets.String{}, nodeInformerSynced: func() bool { return true }, nodeResourceGroups: map[string]string{}, unmanagedNodes: sets.NewString(), excludeLoadBalancerNodes: sets.NewString(), - nodePrivateIPs: map[string]sets.String{}, routeCIDRs: map[string]string{}, eventRecorder: &record.FakeRecorder{}, } @@ -108,7 +106,6 @@ func GetTestCloud(ctrl *gomock.Controller) (az *Cloud) { az.lbCache, _ = az.newLBCache() az.nsgCache, _ = az.newNSGCache() az.rtCache, _ = az.newRouteTableCache() - az.LoadBalancerBackendPool = NewMockBackendPool(ctrl) _ = initDiskControllers(az) diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_instances.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_instances.go index 7ef038d2fbe0..6f97744b9a39 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_instances.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_instances.go @@ -81,7 +81,7 @@ func (az *Cloud) NodeAddresses(ctx context.Context, name types.NodeName) ([]v1.N } if az.UseInstanceMetadata { - metadata, err := az.Metadata.GetMetadata(azcache.CacheReadTypeDefault) + metadata, err := az.metadata.GetMetadata(azcache.CacheReadTypeDefault) if err != nil { return nil, err } @@ -150,7 +150,7 @@ func (az *Cloud) getLocalInstanceNodeAddresses(netInterfaces []NetworkInterface, if len(addresses) == 1 { // No IP addresses is got from instance metadata service, clean up cache and report errors. - _ = az.Metadata.imsCache.Delete(consts.MetadataCacheKey) + _ = az.metadata.imsCache.Delete(consts.MetadataCacheKey) return nil, fmt.Errorf("get empty IP addresses from instance metadata service") } return addresses, nil @@ -170,11 +170,6 @@ func (az *Cloud) NodeAddressesByProviderID(ctx context.Context, providerID strin return nil, nil } - if az.VMSet == nil { - // vmSet == nil indicates credentials are not provided. - return nil, fmt.Errorf("no credentials provided for Azure cloud provider") - } - name, err := az.VMSet.GetNodeNameByProviderID(providerID) if err != nil { return nil, err @@ -196,11 +191,6 @@ func (az *Cloud) InstanceExistsByProviderID(ctx context.Context, providerID stri return true, nil } - if az.VMSet == nil { - // vmSet == nil indicates credentials are not provided. - return false, fmt.Errorf("no credentials provided for Azure cloud provider") - } - name, err := az.VMSet.GetNodeNameByProviderID(providerID) if err != nil { if errors.Is(err, cloudprovider.InstanceNotFound) { @@ -244,10 +234,6 @@ func (az *Cloud) InstanceShutdownByProviderID(ctx context.Context, providerID st if providerID == "" { return false, nil } - if az.VMSet == nil { - // vmSet == nil indicates credentials are not provided. - return false, fmt.Errorf("no credentials provided for Azure cloud provider") - } nodeName, err := az.VMSet.GetNodeNameByProviderID(providerID) if err != nil { @@ -347,7 +333,7 @@ func (az *Cloud) InstanceID(ctx context.Context, name types.NodeName) (string, e } if az.UseInstanceMetadata { - metadata, err := az.Metadata.GetMetadata(azcache.CacheReadTypeDefault) + metadata, err := az.metadata.GetMetadata(azcache.CacheReadTypeDefault) if err != nil { return "", err } @@ -413,11 +399,6 @@ func (az *Cloud) InstanceTypeByProviderID(ctx context.Context, providerID string return "", nil } - if az.VMSet == nil { - // vmSet == nil indicates credentials are not provided. - return "", fmt.Errorf("no credentials provided for Azure cloud provider") - } - name, err := az.VMSet.GetNodeNameByProviderID(providerID) if err != nil { return "", err @@ -442,7 +423,7 @@ func (az *Cloud) InstanceType(ctx context.Context, name types.NodeName) (string, } if az.UseInstanceMetadata { - metadata, err := az.Metadata.GetMetadata(azcache.CacheReadTypeDefault) + metadata, err := az.metadata.GetMetadata(azcache.CacheReadTypeDefault) if err != nil { return "", err } @@ -469,11 +450,6 @@ func (az *Cloud) InstanceType(ctx context.Context, name types.NodeName) (string, } } - if az.VMSet == nil { - // vmSet == nil indicates credentials are not provided. - return "", fmt.Errorf("no credentials provided for Azure cloud provider") - } - return az.VMSet.GetInstanceTypeByNodeName(string(name)) } diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_loadbalancer.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_loadbalancer.go index 0cc786ffe22a..143625d4f8dc 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_loadbalancer.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_loadbalancer.go @@ -19,6 +19,7 @@ package provider import ( "context" "encoding/json" + "errors" "fmt" "math" "reflect" @@ -91,7 +92,7 @@ func (az *Cloud) EnsureLoadBalancer(ctx context.Context, clusterName string, ser // the service may be switched from an internal LB to a public one, or vise versa. // Here we'll firstly ensure service do not lie in the opposite LB. serviceName := getServiceName(service) - klog.V(5).Infof("ensureloadbalancer(%s): START clusterName=%q, service: %v", serviceName, clusterName, service) + klog.V(5).Infof("ensureloadbalancer(%s): START clusterName=%q", serviceName, clusterName) mc := metrics.NewMetricContext("services", "ensure_loadbalancer", az.ResourceGroup, az.SubscriptionID, serviceName) isOperationSucceeded := false @@ -141,17 +142,11 @@ func (az *Cloud) EnsureLoadBalancer(ctx context.Context, clusterName string, ser // UpdateLoadBalancer updates hosts under the specified load balancer. func (az *Cloud) UpdateLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) error { - shouldUpdateLB, err := az.shouldUpdateLoadBalancer(clusterName, service, nodes) - if err != nil { - return err - } - - if !shouldUpdateLB { + if !az.shouldUpdateLoadBalancer(clusterName, service, nodes) { klog.V(2).Infof("UpdateLoadBalancer: skipping service %s because it is either being deleted or does not exist anymore", service.Name) return nil } - - _, err = az.EnsureLoadBalancer(ctx, clusterName, service, nodes) + _, err := az.EnsureLoadBalancer(ctx, clusterName, service, nodes) return err } @@ -209,6 +204,74 @@ func (az *Cloud) getLoadBalancerResourceGroup() string { return az.ResourceGroup } +// cleanupVMSetFromBackendPoolByCondition removes nodes of the unwanted vmSet from the lb backend pool. +// This is needed in two scenarios: +// 1. When migrating from single SLB to multiple SLBs, the existing +// SLB's backend pool contains nodes from different agent pools, while we only want the +// nodes from the primary agent pool to join the backend pool. +// 2. When migrating from dedicated SLB to shared SLB (or vice versa), we should move the vmSet from +// one SLB to another one. +func (az *Cloud) cleanupVMSetFromBackendPoolByCondition(slb *network.LoadBalancer, service *v1.Service, clusterName string, shouldRemoveVMSetFromSLB func(string) bool) (*network.LoadBalancer, error) { + lbBackendPoolName := getBackendPoolName(clusterName, service) + lbResourceGroup := az.getLoadBalancerResourceGroup() + lbBackendPoolID := az.getBackendPoolID(to.String(slb.Name), lbResourceGroup, lbBackendPoolName) + newBackendPools := make([]network.BackendAddressPool, 0) + if slb.LoadBalancerPropertiesFormat != nil && slb.BackendAddressPools != nil { + newBackendPools = *slb.BackendAddressPools + } + vmSetNameToBackendIPConfigurationsToBeDeleted := make(map[string][]network.InterfaceIPConfiguration) + for j, bp := range newBackendPools { + if strings.EqualFold(to.String(bp.Name), lbBackendPoolName) { + klog.V(2).Infof("cleanupVMSetFromBackendPoolByCondition: checking the backend pool %s from standard load balancer %s", to.String(bp.Name), to.String(slb.Name)) + if bp.BackendAddressPoolPropertiesFormat != nil && bp.BackendIPConfigurations != nil { + for i := len(*bp.BackendIPConfigurations) - 1; i >= 0; i-- { + ipConf := (*bp.BackendIPConfigurations)[i] + ipConfigID := to.String(ipConf.ID) + _, vmSetName, err := az.VMSet.GetNodeNameByIPConfigurationID(ipConfigID) + if err != nil && !errors.Is(err, cloudprovider.InstanceNotFound) { + return nil, err + } + + if shouldRemoveVMSetFromSLB(vmSetName) { + klog.V(2).Infof("cleanupVMSetFromBackendPoolByCondition: found unwanted vmSet %s, decouple it from the LB", vmSetName) + // construct a backendPool that only contains the IP config of the node to be deleted + interfaceIPConfigToBeDeleted := network.InterfaceIPConfiguration{ + ID: to.StringPtr(ipConfigID), + } + vmSetNameToBackendIPConfigurationsToBeDeleted[vmSetName] = append(vmSetNameToBackendIPConfigurationsToBeDeleted[vmSetName], interfaceIPConfigToBeDeleted) + *bp.BackendIPConfigurations = append((*bp.BackendIPConfigurations)[:i], (*bp.BackendIPConfigurations)[i+1:]...) + } + } + } + newBackendPools[j] = bp + break + } + } + for vmSetName := range vmSetNameToBackendIPConfigurationsToBeDeleted { + backendIPConfigurationsToBeDeleted := vmSetNameToBackendIPConfigurationsToBeDeleted[vmSetName] + backendpoolToBeDeleted := &[]network.BackendAddressPool{ + { + ID: to.StringPtr(lbBackendPoolID), + BackendAddressPoolPropertiesFormat: &network.BackendAddressPoolPropertiesFormat{ + BackendIPConfigurations: &backendIPConfigurationsToBeDeleted, + }, + }, + } + // decouple the backendPool from the node + err := az.VMSet.EnsureBackendPoolDeleted(service, lbBackendPoolID, vmSetName, backendpoolToBeDeleted, true) + if err != nil { + return nil, err + } + slb.BackendAddressPools = &newBackendPools + // Proactively disable the etag to prevent etag mismatch error when putting lb later. + // This could be happen because when we remove the hosts from the lb, the nrp + // would put the lb to remove the backend references as well. + slb.Etag = nil + } + + return slb, nil +} + // shouldChangeLoadBalancer determines if the load balancer of the service should be switched to another one // according to the mode annotation on the service. This could be happened when the LB selection mode of an // existing service is changed to another VMSS/VMAS. @@ -334,8 +397,16 @@ func (az *Cloud) cleanOrphanedLoadBalancer(lb *network.LoadBalancer, existingLBs // do nothing for availability set lb.BackendAddressPools = nil } + err := az.VMSet.EnsureBackendPoolDeleted(service, lbBackendPoolID, vmSetName, lb.BackendAddressPools, true) + if err != nil { + klog.Errorf("cleanOrphanedLoadBalancer(%s, %s, %s): failed to EnsureBackendPoolDeleted: %v", lbName, serviceName, clusterName, err) + return err + } + klog.V(10).Infof("cleanOrphanedLoadBalancer(%s, %s, %s): EnsureBackendPoolDeleted finished", lbName, serviceName, clusterName) - deleteErr := az.safeDeleteLoadBalancer(*lb, clusterName, vmSetName, service) + // Remove the LB. + klog.V(10).Infof("cleanOrphanedLoadBalancer(%s, %s, %s): az.DeleteLB starts", lbName, serviceName, clusterName) + deleteErr := az.DeleteLB(service, lbName) if deleteErr != nil { klog.Warningf("cleanOrphanedLoadBalancer(%s, %s, %s): failed to DeleteLB: %v", lbName, serviceName, clusterName, deleteErr) @@ -378,19 +449,17 @@ func (az *Cloud) cleanOrphanedLoadBalancer(lb *network.LoadBalancer, existingLBs } // safeDeleteLoadBalancer deletes the load balancer after decoupling it from the vmSet -func (az *Cloud) safeDeleteLoadBalancer(lb network.LoadBalancer, clusterName, vmSetName string, service *v1.Service) *retry.Error { - if strings.EqualFold(az.LoadBalancerBackendPoolConfigurationType, consts.LoadBalancerBackendPoolConfigurationTypeNodeIPConfiguration) { - lbBackendPoolID := az.getBackendPoolID(to.String(lb.Name), az.getLoadBalancerResourceGroup(), getBackendPoolName(clusterName, service)) - err := az.VMSet.EnsureBackendPoolDeleted(service, lbBackendPoolID, vmSetName, lb.BackendAddressPools, true) - if err != nil { - return retry.NewError(false, fmt.Errorf("safeDeleteLoadBalancer: failed to EnsureBackendPoolDeleted: %w", err)) - } +func (az *Cloud) safeDeleteLoadBalancer(lb network.LoadBalancer, clusterName, vmSetName string, service *v1.Service) error { + lbBackendPoolID := az.getBackendPoolID(to.String(lb.Name), az.getLoadBalancerResourceGroup(), getBackendPoolName(clusterName, service)) + err := az.VMSet.EnsureBackendPoolDeleted(service, lbBackendPoolID, vmSetName, lb.BackendAddressPools, true) + if err != nil { + return fmt.Errorf("deleteDedicatedLoadBalancer: failed to EnsureBackendPoolDeleted: %w", err) } - klog.V(2).Infof("safeDeleteLoadBalancer: deleting LB %s because the corresponding vmSet is supposed to be in the primary SLB", to.String(lb.Name)) + klog.V(2).Infof("deleteDedicatedLoadBalancer: deleting LB %s because the corresponding vmSet is supposed to be in the primary SLB", to.String(lb.Name)) rerr := az.DeleteLB(service, to.String(lb.Name)) if rerr != nil { - return rerr + return fmt.Errorf("deleteDedicatedLoadBalancer : failed to DeleteLB: %w", rerr.Error()) } _ = az.lbCache.Delete(to.String(lb.Name)) @@ -434,7 +503,12 @@ func (az *Cloud) reconcileSharedLoadBalancer(service *v1.Service, clusterName st existingLBs, err = az.ListManagedLBs(service, nodes, clusterName) if err != nil { - return nil, fmt.Errorf("reconcileSharedLoadBalancer: failed to list managed LB: %w", err) + return nil, fmt.Errorf("reconcileSharedLoadBalancer: failed to list LB: %w", err) + } + + // skip this operation when wantLb=false + if nodes == nil { + return existingLBs, nil } // only run once since the controller manager rebooted @@ -454,7 +528,7 @@ func (az *Cloud) reconcileSharedLoadBalancer(service *v1.Service, clusterName st lbBackendPoolName := getBackendPoolName(clusterName, service) lbNamesToBeDeleted := sets.NewString() - // 1: delete unwanted LBs + // loop 1: delete unwanted LBs for _, lb := range existingLBs { lbNamePrefix := strings.TrimSuffix(to.String(lb.Name), consts.InternalLoadBalancerNameSuffix) @@ -475,14 +549,14 @@ func (az *Cloud) reconcileSharedLoadBalancer(service *v1.Service, clusterName st // If the VMSet name is in az.NodePoolsWithoutDedicatedSLB, we should // decouple the VMSet from the lb and delete the lb. Then adding the VMSet // to the backend pool of the primary slb. - rerr := az.safeDeleteLoadBalancer(lb, clusterName, vmSetName, service) - if rerr != nil { - return nil, rerr.Error() + err = az.safeDeleteLoadBalancer(lb, clusterName, vmSetName, service) + if err != nil { + return nil, err } // remove the deleted lb from the list and construct a new primary // lb, so that getServiceLoadBalancer doesn't have to call list api again - lbNamesToBeDeleted.Insert(strings.ToLower(to.String(lb.Name))) + lbNamesToBeDeleted.Insert(to.String(lb.Name)) changed = true } @@ -491,17 +565,15 @@ func (az *Cloud) reconcileSharedLoadBalancer(service *v1.Service, clusterName st return existingLBs, nil } - vmSetsToBeMovedToPrimarySLB := sets.NewString() ipConfigIDsToBeAddedToPrimarySLB := sets.NewString() - // 2: add nodes to the backend pool of the primary SLBs + // loop2: add nodes to the backend pool of the primary SLBs for i := len(existingLBs) - 1; i >= 0; i-- { lb := existingLBs[i] - if !lbNamesToBeDeleted.Has(strings.ToLower(to.String(lb.Name))) { + if !lbNamesToBeDeleted.Has(to.String(lb.Name)) { continue } vmSetName := strings.ToLower(az.mapLoadBalancerNameToVMSet(to.String(lb.Name), clusterName)) - vmSetsToBeMovedToPrimarySLB.Insert(vmSetName) isInternalLB := strings.HasSuffix(to.String(lb.Name), consts.InternalLoadBalancerNameSuffix) primarySLBName := clusterName if isInternalLB { @@ -510,15 +582,13 @@ func (az *Cloud) reconcileSharedLoadBalancer(service *v1.Service, clusterName st primaryLBBackendPoolID := az.getBackendPoolID(primarySLBName, az.getLoadBalancerResourceGroup(), getBackendPoolName(clusterName, service)) klog.V(2).Infof("reconcileSharedLoadBalancer: binding the vmSet %s to the backend pool %s", vmSetName, primaryLBBackendPoolID) - if strings.EqualFold(az.LoadBalancerBackendPoolConfigurationType, consts.LoadBalancerBackendPoolConfigurationTypeNodeIPConfiguration) { - err = az.VMSet.EnsureHostsInPool(service, nodes, primaryLBBackendPoolID, vmSetName) - if err != nil { - return nil, fmt.Errorf("reconcileSharedLoadBalancer: failed to EnsureHostsInPool: %w", err) - } + err = az.VMSet.EnsureHostsInPool(service, nodes, primaryLBBackendPoolID, vmSetName, false) + if err != nil { + return nil, fmt.Errorf("reconcileSharedLoadBalancer: failed to EnsureHostsInPool: %w", err) + } - for _, id := range extractBackendIPConfigurationIDsFromLB(lb, lbBackendPoolName) { - ipConfigIDsToBeAddedToPrimarySLB.Insert(id) - } + for _, id := range extractBackendIPConfigurationIDsFromLB(lb, lbBackendPoolName) { + ipConfigIDsToBeAddedToPrimarySLB.Insert(id) } // remove the deleted LB from the list @@ -530,27 +600,12 @@ func (az *Cloud) reconcileSharedLoadBalancer(service *v1.Service, clusterName st primarySLB.BackendAddressPools != nil { for i := 0; i < len(*primarySLB.BackendAddressPools); i++ { if strings.EqualFold(to.String((*primarySLB.BackendAddressPools)[i].Name), lbBackendPoolName) { - if az.isLBBackendPoolTypeNodeIPConfig() { - backendPoolIPConfigs := (*primarySLB.BackendAddressPools)[i].BackendIPConfigurations - for _, id := range ipConfigIDsToBeAddedToPrimarySLB.List() { - *backendPoolIPConfigs = append(*backendPoolIPConfigs, network.InterfaceIPConfiguration{ - ID: to.StringPtr(id), - }) - } - } else if az.isLBBackendPoolTypeNodeIP() { - backendPool := (*primarySLB.BackendAddressPools)[i] - if backendPool.LoadBalancerBackendAddresses == nil { - lbBackendPoolAddresses := make([]network.LoadBalancerBackendAddress, 0) - backendPool.LoadBalancerBackendAddresses = &lbBackendPoolAddresses - } - - if err := az.LoadBalancerBackendPool.EnsureHostsInPool(service, nodes, "", "", clusterName, to.String(primarySLB.Name), backendPool); err != nil { - return nil, fmt.Errorf("reconcileSharedLoadBalancer: failed to EnsureHostsInPool: %w", err) - } - - (*primarySLB.BackendAddressPools)[i] = backendPool + backendPoolIPConfigs := (*primarySLB.BackendAddressPools)[i].BackendIPConfigurations + for _, id := range ipConfigIDsToBeAddedToPrimarySLB.List() { + *backendPoolIPConfigs = append(*backendPoolIPConfigs, network.InterfaceIPConfiguration{ + ID: to.StringPtr(id), + }) } - break } } @@ -561,7 +616,7 @@ func (az *Cloud) reconcileSharedLoadBalancer(service *v1.Service, clusterName st for _, primarySLB := range primarySLBs { if strings.EqualFold(to.String(existingLB.Name), to.String(primarySLB.Name)) { // Proactively disable the etag to prevent etag mismatch error when putting lb later. - // This could happen because when we remove the hosts from the lb, the nrp + // This could be happen because when we remove the hosts from the lb, the nrp // would put the lb to remove the backend references as well. primarySLB.Etag = nil @@ -615,7 +670,7 @@ func (az *Cloud) getServiceLoadBalancer(service *v1.Service, clusterName string, // need to remove the specific vmSet from the primary SLB. return !strings.EqualFold(vmSetName, primaryVMSetName) && vmSetName != "" } - cleanedLB, err := az.LoadBalancerBackendPool.CleanupVMSetFromBackendPoolByCondition(&existingLB, service, nodes, clusterName, shouldRemoveVMSetFromSLB) + cleanedLB, err := az.cleanupVMSetFromBackendPoolByCondition(&existingLB, service, clusterName, shouldRemoveVMSetFromSLB) if err != nil { return nil, nil, false, err } @@ -947,7 +1002,8 @@ func (az *Cloud) ensurePublicIPExists(service *v1.Service, pipName string, domai // return if pip exist and dns label is the same if strings.EqualFold(getDomainNameLabel(&pip), domainNameLabel) { - if existingServiceName := getServiceFromPIPDNSTags(pip.Tags); existingServiceName != "" && strings.EqualFold(existingServiceName, serviceName) { + if existingServiceName, ok := pip.Tags[consts.ServiceUsingDNSKey]; ok && + strings.EqualFold(*existingServiceName, serviceName) { klog.V(6).Infof("ensurePublicIPExists for service(%s): pip(%s) - "+ "the service is using the DNS label on the public IP", serviceName, pipName) @@ -1102,8 +1158,10 @@ func (az *Cloud) reconcileIPSettings(pip *network.PublicIPAddress, service *v1.S func reconcileDNSSettings(pip *network.PublicIPAddress, domainNameLabel, serviceName, pipName string) (bool, error) { var changed bool - if existingServiceName := getServiceFromPIPDNSTags(pip.Tags); existingServiceName != "" && !strings.EqualFold(existingServiceName, serviceName) { - return false, fmt.Errorf("ensurePublicIPExists for service(%s): pip(%s) - there is an existing service %s consuming the DNS label on the public IP, so the service cannot set the DNS label annotation with this value", serviceName, pipName, existingServiceName) + if existingServiceName, ok := pip.Tags[consts.ServiceUsingDNSKey]; ok { + if !strings.EqualFold(to.String(existingServiceName), serviceName) { + return false, fmt.Errorf("ensurePublicIPExists for service(%s): pip(%s) - there is an existing service %s consuming the DNS label on the public IP, so the service cannot set the DNS label annotation with this value", serviceName, pipName, *existingServiceName) + } } if len(domainNameLabel) == 0 { @@ -1126,7 +1184,8 @@ func reconcileDNSSettings(pip *network.PublicIPAddress, domainNameLabel, service } } - if svc := getServiceFromPIPDNSTags(pip.Tags); svc == "" || !strings.EqualFold(svc, serviceName) { + if svc, ok := pip.Tags[consts.ServiceUsingDNSKey]; !ok || + !strings.EqualFold(to.String(svc), serviceName) { pip.Tags[consts.ServiceUsingDNSKey] = &serviceName changed = true } @@ -1135,48 +1194,6 @@ func reconcileDNSSettings(pip *network.PublicIPAddress, domainNameLabel, service return changed, nil } -func getServiceFromPIPDNSTags(tags map[string]*string) string { - v, ok := tags[consts.ServiceUsingDNSKey] - if ok && v != nil { - return *v - } - - v, ok = tags[consts.LegacyServiceUsingDNSKey] - if ok && v != nil { - return *v - } - - return "" -} - -func getServiceFromPIPServiceTags(tags map[string]*string) string { - v, ok := tags[consts.ServiceTagKey] - if ok && v != nil { - return *v - } - - v, ok = tags[consts.LegacyServiceTagKey] - if ok && v != nil { - return *v - } - - return "" -} - -func getClusterFromPIPClusterTags(tags map[string]*string) string { - v, ok := tags[consts.ClusterNameKey] - if ok && v != nil { - return *v - } - - v, ok = tags[consts.LegacyClusterNameKey] - if ok && v != nil { - return *v - } - - return "" -} - type serviceIPTagRequest struct { IPTagsRequestedByAnnotation bool IPTags *[]network.IPTag @@ -1508,7 +1525,7 @@ func (az *Cloud) reconcileLoadBalancer(clusterName string, service *v1.Service, // reconcile the load balancer's backend pool configuration. if wantLb { - preConfig, changed, err := az.LoadBalancerBackendPool.ReconcileBackendPools(clusterName, service, lb) + preConfig, changed, err := az.reconcileBackendPools(clusterName, service, nodes, lb, isBackendPoolPreConfigured) if err != nil { return lb, err } @@ -1548,15 +1565,18 @@ func (az *Cloud) reconcileLoadBalancer(clusterName string, service *v1.Service, return nil, err } - if changed := az.reconcileLBProbes(lb, service, serviceName, wantLb, expectedProbes); changed { + changed = az.reconcileLBProbes(lb, service, serviceName, wantLb, expectedProbes) + if changed { dirtyLb = true } - if changed := az.reconcileLBRules(lb, service, serviceName, wantLb, expectedRules); changed { + changed = az.reconcileLBRules(lb, service, serviceName, wantLb, expectedRules) + if changed { dirtyLb = true } - if changed := az.ensureLoadBalancerTagged(lb); changed { + changed = az.ensureLoadBalancerTagged(lb) + if changed { dirtyLb = true } @@ -1567,14 +1587,14 @@ func (az *Cloud) reconcileLoadBalancer(clusterName string, service *v1.Service, if lb.FrontendIPConfigurations == nil || len(*lb.FrontendIPConfigurations) == 0 { err := az.cleanOrphanedLoadBalancer(lb, existingLBs, service, clusterName) if err != nil { - klog.Errorf("reconcileLoadBalancer for service(%s): lb(%s) - failed to cleanOrphanedLoadBalancer: %v", serviceName, lbName, err) + klog.V(2).Infof("reconcileLoadBalancer for service(%s): lb(%s) - failed to cleanOrphanedLoadBalancer: %v", serviceName, lbName, err) return nil, err } } else { klog.V(2).Infof("reconcileLoadBalancer: reconcileLoadBalancer for service(%s): lb(%s) - updating", serviceName, lbName) err := az.CreateOrUpdateLB(service, *lb) if err != nil { - klog.Errorf("reconcileLoadBalancer for service(%s) abort backoff: lb(%s) - updating", serviceName, lbName) + klog.V(2).Infof("reconcileLoadBalancer for service(%s) abort backoff: lb(%s) - updating", serviceName, lbName) return nil, err } @@ -1582,7 +1602,7 @@ func (az *Cloud) reconcileLoadBalancer(clusterName string, service *v1.Service, // Refresh updated lb which will be used later in other places. newLB, exist, err := az.getAzureLoadBalancer(lbName, azcache.CacheReadTypeDefault) if err != nil { - klog.Errorf("reconcileLoadBalancer for service(%s): getAzureLoadBalancer(%s) failed: %v", serviceName, lbName, err) + klog.V(2).Infof("reconcileLoadBalancer for service(%s): getAzureLoadBalancer(%s) failed: %v", serviceName, lbName, err) return nil, err } if !exist { @@ -1600,16 +1620,9 @@ func (az *Cloud) reconcileLoadBalancer(clusterName string, service *v1.Service, defer func() { _ = az.lbCache.Delete(lbName) }() - - if lb.LoadBalancerPropertiesFormat != nil && lb.BackendAddressPools != nil { - backendPools := *lb.BackendAddressPools - for _, backendPool := range backendPools { - if strings.EqualFold(to.String(backendPool.Name), getBackendPoolName(clusterName, service)) { - if err := az.LoadBalancerBackendPool.EnsureHostsInPool(service, nodes, lbBackendPoolID, vmSetName, clusterName, lbName, backendPool); err != nil { - return nil, err - } - } - } + err := az.VMSet.EnsureHostsInPool(service, nodes, lbBackendPoolID, vmSetName, isInternal) + if err != nil { + return nil, err } } @@ -1851,6 +1864,93 @@ func (az *Cloud) reconcileFrontendIPConfigs(clusterName string, service *v1.Serv return ownedFIPConfig, dirtyConfigs, err } +func (az *Cloud) reconcileBackendPools(clusterName string, service *v1.Service, nodes []*v1.Node, lb *network.LoadBalancer, isBackendPoolPreConfigured bool) (bool, bool, error) { + var newBackendPools []network.BackendAddressPool + var err error + if lb.BackendAddressPools != nil { + newBackendPools = *lb.BackendAddressPools + } + + foundBackendPool := false + dirtyLb := false + wantLb := true + lbName := *lb.Name + + serviceName := getServiceName(service) + lbBackendPoolName := getBackendPoolName(clusterName, service) + lbBackendPoolID := az.getBackendPoolID(lbName, az.getLoadBalancerResourceGroup(), lbBackendPoolName) + vmSetName := az.mapLoadBalancerNameToVMSet(lbName, clusterName) + + for _, bp := range newBackendPools { + if strings.EqualFold(*bp.Name, lbBackendPoolName) { + klog.V(10).Infof("reconcileLoadBalancer for service (%s)(%t): lb backendpool - found wanted backendpool. not adding anything", serviceName, wantLb) + foundBackendPool = true + + var backendIPConfigurationsToBeDeleted []network.InterfaceIPConfiguration + if bp.BackendAddressPoolPropertiesFormat != nil && bp.BackendIPConfigurations != nil { + for _, ipConf := range *bp.BackendIPConfigurations { + ipConfID := to.String(ipConf.ID) + nodeName, _, err := az.VMSet.GetNodeNameByIPConfigurationID(ipConfID) + if err != nil && !errors.Is(err, cloudprovider.InstanceNotFound) { + return false, false, err + } + + // If a node is not supposed to be included in the LB, it + // would not be in the `nodes` slice. We need to check the nodes that + // have been added to the LB's backendpool, find the unwanted ones and + // delete them from the pool. + shouldExcludeLoadBalancer, err := az.ShouldNodeExcludedFromLoadBalancer(nodeName) + if err != nil { + klog.Errorf("ShouldNodeExcludedFromLoadBalancer(%s) failed with error: %v", nodeName, err) + return false, false, err + } + if shouldExcludeLoadBalancer { + klog.V(2).Infof("reconcileLoadBalancer for service (%s)(%t): lb backendpool - found unwanted node %s, decouple it from the LB", serviceName, wantLb, nodeName) + // construct a backendPool that only contains the IP config of the node to be deleted + backendIPConfigurationsToBeDeleted = append(backendIPConfigurationsToBeDeleted, network.InterfaceIPConfiguration{ID: to.StringPtr(ipConfID)}) + } + } + if len(backendIPConfigurationsToBeDeleted) > 0 { + backendpoolToBeDeleted := &[]network.BackendAddressPool{ + { + ID: to.StringPtr(lbBackendPoolID), + BackendAddressPoolPropertiesFormat: &network.BackendAddressPoolPropertiesFormat{ + BackendIPConfigurations: &backendIPConfigurationsToBeDeleted, + }, + }, + } + // decouple the backendPool from the node + err = az.VMSet.EnsureBackendPoolDeleted(service, lbBackendPoolID, vmSetName, backendpoolToBeDeleted, false) + if err != nil { + return false, false, err + } + } + } + break + } else { + klog.V(10).Infof("reconcileLoadBalancer for service (%s)(%t): lb backendpool - found other backendpool %s", serviceName, wantLb, *bp.Name) + } + } + if !foundBackendPool { + if isBackendPoolPreConfigured { + klog.V(2).Infof("reconcileLoadBalancer for service (%s)(%t): lb backendpool - PreConfiguredBackendPoolLoadBalancerTypes %s has been set but can not find corresponding backend pool, ignoring it", + serviceName, + wantLb, + az.PreConfiguredBackendPoolLoadBalancerTypes) + isBackendPoolPreConfigured = false + } + + newBackendPools = append(newBackendPools, network.BackendAddressPool{ + Name: to.StringPtr(lbBackendPoolName), + }) + klog.V(10).Infof("reconcileLoadBalancer for service (%s)(%t): lb backendpool - adding backendpool", serviceName, wantLb) + + dirtyLb = true + lb.BackendAddressPools = &newBackendPools + } + return isBackendPoolPreConfigured, dirtyLb, err +} + // checkLoadBalancerResourcesConflicts checks if the service is consuming // ports which conflict with the existing loadBalancer resources, // including inbound NAT rule, inbound NAT pools and loadBalancing rules @@ -2387,14 +2487,9 @@ func (az *Cloud) getExpectedSecurityRules(wantLb bool, ports []v1.ServicePort, s return expectedSecurityRules, nil } -func (az *Cloud) shouldUpdateLoadBalancer(clusterName string, service *v1.Service, nodes []*v1.Node) (bool, error) { - existingManagedLBs, err := az.ListManagedLBs(service, nodes, clusterName) - if err != nil { - return false, fmt.Errorf("shouldUpdateLoadBalancer: failed to list managed load balancers: %w", err) - } - - _, _, existsLb, _ := az.getServiceLoadBalancer(service, clusterName, nodes, false, existingManagedLBs) - return existsLb && service.ObjectMeta.DeletionTimestamp == nil, nil +func (az *Cloud) shouldUpdateLoadBalancer(clusterName string, service *v1.Service, nodes []*v1.Node) bool { + _, _, existsLb, _ := az.getServiceLoadBalancer(service, clusterName, nodes, false, []network.LoadBalancer{}) + return existsLb && service.ObjectMeta.DeletionTimestamp == nil } func logSafe(s *string) string { @@ -2554,14 +2649,14 @@ func shouldReleaseExistingOwnedPublicIP(existingPip *network.PublicIPAddress, lb // Check whether the public IP is being referenced by other service. // The owned public IP can be released only when there is not other service using it. - if serviceTag := getServiceFromPIPServiceTags(existingPip.Tags); serviceTag != "" { + if existingPip.Tags[consts.ServiceTagKey] != nil { // case 1: there is at least one reference when deleting the PIP - if !lbShouldExist && len(parsePIPServiceTag(&serviceTag)) > 0 { + if !lbShouldExist && len(parsePIPServiceTag(existingPip.Tags[consts.ServiceTagKey])) > 0 { return false } // case 2: there is at least one reference from other service - if lbShouldExist && len(parsePIPServiceTag(&serviceTag)) > 1 { + if lbShouldExist && len(parsePIPServiceTag(existingPip.Tags[consts.ServiceTagKey])) > 1 { return false } } @@ -2596,11 +2691,11 @@ func (az *Cloud) ensurePIPTagged(service *v1.Service, pip *network.PublicIPAddre // include the cluster name and service names tags when comparing var clusterName, serviceNames *string - if v := getClusterFromPIPClusterTags(pip.Tags); v != "" { - clusterName = &v + if v, ok := pip.Tags[consts.ClusterNameKey]; ok { + clusterName = v } - if v := getServiceFromPIPServiceTags(pip.Tags); v != "" { - serviceNames = &v + if v, ok := pip.Tags[consts.ServiceTagKey]; ok { + serviceNames = v } if clusterName != nil { configTags[consts.ClusterNameKey] = clusterName @@ -3026,30 +3121,32 @@ func serviceOwnsPublicIP(service *v1.Service, pip *network.PublicIPAddress, clus serviceName := getServiceName(service) if pip.Tags != nil { - serviceTag := getServiceFromPIPServiceTags(pip.Tags) - clusterTag := getClusterFromPIPClusterTags(pip.Tags) + serviceTag := pip.Tags[consts.ServiceTagKey] + clusterTag := pip.Tags[consts.ClusterNameKey] // if there is no service tag on the pip, it is user-created pip - if serviceTag == "" { + if to.String(serviceTag) == "" { return strings.EqualFold(to.String(pip.IPAddress), service.Spec.LoadBalancerIP), true } - // if there is service tag on the pip, it is system-created pip - if isSVCNameInPIPTag(serviceTag, serviceName) { - // Backward compatible for clusters upgraded from old releases. - // In such case, only "service" tag is set. - if clusterTag == "" { - return true, false - } + if serviceTag != nil { + // if there is service tag on the pip, it is system-created pip + if isSVCNameInPIPTag(*serviceTag, serviceName) { + // Backward compatible for clusters upgraded from old releases. + // In such case, only "service" tag is set. + if clusterTag == nil { + return true, false + } - // If cluster name tag is set, then return true if it matches. - if clusterTag == clusterName { - return true, false + // If cluster name tag is set, then return true if it matches. + if *clusterTag == clusterName { + return true, false + } + } else { + // if the service is not included in te tags of the system-created pip, check the ip address + // this could happen for secondary services + return strings.EqualFold(to.String(pip.IPAddress), service.Spec.LoadBalancerIP), false } - } else { - // if the service is not included in te tags of the system-created pip, check the ip address - // this could happen for secondary services - return strings.EqualFold(to.String(pip.IPAddress), service.Spec.LoadBalancerIP), false } } @@ -3069,7 +3166,7 @@ func isSVCNameInPIPTag(tag, svcName string) bool { } func parsePIPServiceTag(serviceTag *string) []string { - if serviceTag == nil || len(*serviceTag) == 0 { + if serviceTag == nil { return []string{} } @@ -3099,7 +3196,7 @@ func bindServicesToPIP(pip *network.PublicIPAddress, incomingServiceNames []stri pip.Tags = map[string]*string{consts.ServiceTagKey: to.StringPtr("")} } - serviceTagValue := to.StringPtr(getServiceFromPIPServiceTags(pip.Tags)) + serviceTagValue := pip.Tags[consts.ServiceTagKey] serviceTagValueSet := make(map[string]struct{}) existingServiceNames := parsePIPServiceTag(serviceTagValue) addedNew := false @@ -3143,7 +3240,7 @@ func unbindServiceFromPIP(pip *network.PublicIPAddress, service *v1.Service, ser } // skip removing tags for user assigned pips - serviceTagValue := to.StringPtr(getServiceFromPIPServiceTags(pip.Tags)) + serviceTagValue := pip.Tags[consts.ServiceTagKey] existingServiceNames := parsePIPServiceTag(serviceTagValue) var found bool for i := len(existingServiceNames) - 1; i >= 0; i-- { @@ -3161,8 +3258,10 @@ func unbindServiceFromPIP(pip *network.PublicIPAddress, service *v1.Service, ser return err } - if existingServiceName := getServiceFromPIPDNSTags(pip.Tags); existingServiceName != "" && strings.EqualFold(existingServiceName, serviceName) { - pip.Tags[consts.ServiceUsingDNSKey] = to.StringPtr("") + if existingServiceName, ok := pip.Tags[consts.ServiceUsingDNSKey]; ok { + if strings.EqualFold(*existingServiceName, serviceName) { + pip.Tags[consts.ServiceUsingDNSKey] = to.StringPtr("") + } } return nil @@ -3170,7 +3269,7 @@ func unbindServiceFromPIP(pip *network.PublicIPAddress, service *v1.Service, ser // ensureLoadBalancerTagged ensures every load balancer in the resource group is tagged as configured func (az *Cloud) ensureLoadBalancerTagged(lb *network.LoadBalancer) bool { - if az.Tags == "" && (az.TagsMap == nil || len(az.TagsMap) == 0) { + if az.Tags == "" { return false } tags := parseTags(az.Tags, az.TagsMap) @@ -3186,7 +3285,7 @@ func (az *Cloud) ensureLoadBalancerTagged(lb *network.LoadBalancer) bool { // ensureSecurityGroupTagged ensures the security group is tagged as configured func (az *Cloud) ensureSecurityGroupTagged(sg *network.SecurityGroup) bool { - if az.Tags == "" && (az.TagsMap == nil || len(az.TagsMap) == 0) { + if az.Tags == "" { return false } tags := parseTags(az.Tags, az.TagsMap) diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_loadbalancer_backendpool.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_loadbalancer_backendpool.go deleted file mode 100644 index 2d3c6f86c88c..000000000000 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_loadbalancer_backendpool.go +++ /dev/null @@ -1,445 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package provider - -//go:generate sh -c "mockgen -destination=$GOPATH/src/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_mock_loadbalancer_backendpool.go -source=$GOPATH/src/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_loadbalancer_backendpool.go -package=provider BackendPool" - -import ( - "errors" - "fmt" - "strings" - - "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network" - "github.com/Azure/go-autorest/autorest/to" - - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/util/sets" - cloudprovider "k8s.io/cloud-provider" - "k8s.io/klog/v2" - utilnet "k8s.io/utils/net" - - "sigs.k8s.io/cloud-provider-azure/pkg/consts" -) - -type BackendPool interface { - // EnsureHostsInPool ensures the nodes join the backend pool of the load balancer - EnsureHostsInPool(service *v1.Service, nodes []*v1.Node, backendPoolID, vmSetName, clusterName, lbName string, backendPool network.BackendAddressPool) error - - // CleanupVMSetFromBackendPoolByCondition removes nodes of the unwanted vmSet from the lb backend pool. - // This is needed in two scenarios: - // 1. When migrating from single SLB to multiple SLBs, the existing - // SLB's backend pool contains nodes from different agent pools, while we only want the - // nodes from the primary agent pool to join the backend pool. - // 2. When migrating from dedicated SLB to shared SLB (or vice versa), we should move the vmSet from - // one SLB to another one. - CleanupVMSetFromBackendPoolByCondition(slb *network.LoadBalancer, service *v1.Service, nodes []*v1.Node, clusterName string, shouldRemoveVMSetFromSLB func(string) bool) (*network.LoadBalancer, error) - - // ReconcileBackendPools creates the inbound backend pool if it is not existed, and removes nodes that are supposed to be - // excluded from the load balancers. - ReconcileBackendPools(clusterName string, service *v1.Service, lb *network.LoadBalancer) (bool, bool, error) -} - -type backendPoolTypeNodeIPConfig struct { - *Cloud -} - -func newBackendPoolTypeNodeIPConfig(c *Cloud) BackendPool { - return &backendPoolTypeNodeIPConfig{c} -} - -func (bc *backendPoolTypeNodeIPConfig) EnsureHostsInPool(service *v1.Service, nodes []*v1.Node, backendPoolID, vmSetName, clusterName, lbName string, backendPool network.BackendAddressPool) error { - return bc.VMSet.EnsureHostsInPool(service, nodes, backendPoolID, vmSetName) -} - -func (bc *backendPoolTypeNodeIPConfig) CleanupVMSetFromBackendPoolByCondition(slb *network.LoadBalancer, service *v1.Service, nodes []*v1.Node, clusterName string, shouldRemoveVMSetFromSLB func(string) bool) (*network.LoadBalancer, error) { - lbBackendPoolName := getBackendPoolName(clusterName, service) - lbResourceGroup := bc.getLoadBalancerResourceGroup() - lbBackendPoolID := bc.getBackendPoolID(to.String(slb.Name), lbResourceGroup, lbBackendPoolName) - newBackendPools := make([]network.BackendAddressPool, 0) - if slb.LoadBalancerPropertiesFormat != nil && slb.BackendAddressPools != nil { - newBackendPools = *slb.BackendAddressPools - } - vmSetNameToBackendIPConfigurationsToBeDeleted := make(map[string][]network.InterfaceIPConfiguration) - - for j, bp := range newBackendPools { - if strings.EqualFold(to.String(bp.Name), lbBackendPoolName) { - klog.V(2).Infof("bc.CleanupVMSetFromBackendPoolByCondition: checking the backend pool %s from standard load balancer %s", to.String(bp.Name), to.String(slb.Name)) - if bp.BackendAddressPoolPropertiesFormat != nil && bp.BackendIPConfigurations != nil { - for i := len(*bp.BackendIPConfigurations) - 1; i >= 0; i-- { - ipConf := (*bp.BackendIPConfigurations)[i] - ipConfigID := to.String(ipConf.ID) - _, vmSetName, err := bc.VMSet.GetNodeNameByIPConfigurationID(ipConfigID) - if err != nil && !errors.Is(err, cloudprovider.InstanceNotFound) { - return nil, err - } - - if shouldRemoveVMSetFromSLB(vmSetName) { - klog.V(2).Infof("bc.CleanupVMSetFromBackendPoolByCondition: found unwanted vmSet %s, decouple it from the LB", vmSetName) - // construct a backendPool that only contains the IP config of the node to be deleted - interfaceIPConfigToBeDeleted := network.InterfaceIPConfiguration{ - ID: to.StringPtr(ipConfigID), - } - vmSetNameToBackendIPConfigurationsToBeDeleted[vmSetName] = append(vmSetNameToBackendIPConfigurationsToBeDeleted[vmSetName], interfaceIPConfigToBeDeleted) - *bp.BackendIPConfigurations = append((*bp.BackendIPConfigurations)[:i], (*bp.BackendIPConfigurations)[i+1:]...) - } - } - } - - newBackendPools[j] = bp - break - } - } - - for vmSetName := range vmSetNameToBackendIPConfigurationsToBeDeleted { - backendIPConfigurationsToBeDeleted := vmSetNameToBackendIPConfigurationsToBeDeleted[vmSetName] - backendpoolToBeDeleted := &[]network.BackendAddressPool{ - { - ID: to.StringPtr(lbBackendPoolID), - BackendAddressPoolPropertiesFormat: &network.BackendAddressPoolPropertiesFormat{ - BackendIPConfigurations: &backendIPConfigurationsToBeDeleted, - }, - }, - } - // decouple the backendPool from the node - err := bc.VMSet.EnsureBackendPoolDeleted(service, lbBackendPoolID, vmSetName, backendpoolToBeDeleted, true) - if err != nil { - return nil, err - } - slb.BackendAddressPools = &newBackendPools - // Proactively disable the etag to prevent etag mismatch error when putting lb later. - // This could happen because when we remove the hosts from the lb, the nrp - // would put the lb to remove the backend references as well. - slb.Etag = nil - } - - return slb, nil -} - -func (bc *backendPoolTypeNodeIPConfig) ReconcileBackendPools(clusterName string, service *v1.Service, lb *network.LoadBalancer) (bool, bool, error) { - var newBackendPools []network.BackendAddressPool - var err error - if lb.BackendAddressPools != nil { - newBackendPools = *lb.BackendAddressPools - } - - foundBackendPool := false - wantLb := true - changed := false - lbName := *lb.Name - - serviceName := getServiceName(service) - lbBackendPoolName := getBackendPoolName(clusterName, service) - lbBackendPoolID := bc.getBackendPoolID(lbName, bc.getLoadBalancerResourceGroup(), lbBackendPoolName) - vmSetName := bc.mapLoadBalancerNameToVMSet(lbName, clusterName) - - for _, bp := range newBackendPools { - if strings.EqualFold(*bp.Name, lbBackendPoolName) { - klog.V(10).Infof("bc.ReconcileBackendPools for service (%s)(%t): lb backendpool - found wanted backendpool. not adding anything", serviceName, wantLb) - foundBackendPool = true - - var backendIPConfigurationsToBeDeleted []network.InterfaceIPConfiguration - if bp.BackendAddressPoolPropertiesFormat != nil && bp.BackendIPConfigurations != nil { - for _, ipConf := range *bp.BackendIPConfigurations { - ipConfID := to.String(ipConf.ID) - nodeName, _, err := bc.VMSet.GetNodeNameByIPConfigurationID(ipConfID) - if err != nil && !errors.Is(err, cloudprovider.InstanceNotFound) { - return false, false, err - } - - // If a node is not supposed to be included in the LB, it - // would not be in the `nodes` slice. We need to check the nodes that - // have been added to the LB's backendpool, find the unwanted ones and - // delete them from the pool. - shouldExcludeLoadBalancer, err := bc.ShouldNodeExcludedFromLoadBalancer(nodeName) - if err != nil { - klog.Errorf("bc.ReconcileBackendPools: ShouldNodeExcludedFromLoadBalancer(%s) failed with error: %v", nodeName, err) - return false, false, err - } - if shouldExcludeLoadBalancer { - klog.V(2).Infof("bc.ReconcileBackendPools for service (%s)(%t): lb backendpool - found unwanted node %s, decouple it from the LB %s", serviceName, wantLb, nodeName, lbName) - // construct a backendPool that only contains the IP config of the node to be deleted - backendIPConfigurationsToBeDeleted = append(backendIPConfigurationsToBeDeleted, network.InterfaceIPConfiguration{ID: to.StringPtr(ipConfID)}) - } - } - } - if len(backendIPConfigurationsToBeDeleted) > 0 { - backendpoolToBeDeleted := &[]network.BackendAddressPool{ - { - ID: to.StringPtr(lbBackendPoolID), - BackendAddressPoolPropertiesFormat: &network.BackendAddressPoolPropertiesFormat{ - BackendIPConfigurations: &backendIPConfigurationsToBeDeleted, - }, - }, - } - // decouple the backendPool from the node - err = bc.VMSet.EnsureBackendPoolDeleted(service, lbBackendPoolID, vmSetName, backendpoolToBeDeleted, false) - if err != nil { - return false, false, err - } - } - break - } else { - klog.V(10).Infof("bc.ReconcileBackendPools for service (%s)(%t): lb backendpool - found unmanaged backendpool %s", serviceName, wantLb, *bp.Name) - } - } - - isBackendPoolPreConfigured := bc.isBackendPoolPreConfigured(service) - if !foundBackendPool { - isBackendPoolPreConfigured = newBackendPool(lb, isBackendPoolPreConfigured, bc.PreConfiguredBackendPoolLoadBalancerTypes, getServiceName(service), getBackendPoolName(clusterName, service)) - changed = true - } - - return isBackendPoolPreConfigured, changed, err -} - -type backendPoolTypeNodeIP struct { - *Cloud -} - -func newBackendPoolTypeNodeIP(c *Cloud) BackendPool { - return &backendPoolTypeNodeIP{c} -} - -func (bi *backendPoolTypeNodeIP) EnsureHostsInPool(service *v1.Service, nodes []*v1.Node, backendPoolID, vmSetName, clusterName, lbName string, backendPool network.BackendAddressPool) error { - vnetResourceGroup := bi.ResourceGroup - if len(bi.VnetResourceGroup) > 0 { - vnetResourceGroup = bi.VnetResourceGroup - } - vnetID := fmt.Sprintf("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualNetworks/%s", bi.SubscriptionID, vnetResourceGroup, bi.VnetName) - - changed := false - lbBackendPoolName := getBackendPoolName(clusterName, service) - if strings.EqualFold(to.String(backendPool.Name), lbBackendPoolName) && - backendPool.BackendAddressPoolPropertiesFormat != nil { - if backendPool.LoadBalancerBackendAddresses == nil { - lbBackendPoolAddresses := make([]network.LoadBalancerBackendAddress, 0) - backendPool.LoadBalancerBackendAddresses = &lbBackendPoolAddresses - } - - existingIPs := sets.NewString() - for _, loadBalancerBackendAddress := range *backendPool.LoadBalancerBackendAddresses { - if loadBalancerBackendAddress.LoadBalancerBackendAddressPropertiesFormat != nil && - loadBalancerBackendAddress.IPAddress != nil { - klog.V(4).Infof("bi.EnsureHostsInPool: found existing IP %s in the backend pool %s", to.String(loadBalancerBackendAddress.IPAddress), lbBackendPoolName) - existingIPs.Insert(to.String(loadBalancerBackendAddress.IPAddress)) - } - } - - for _, node := range nodes { - if isControlPlaneNode(node) { - klog.V(4).Infof("bi.EnsureHostsInPool: skipping control plane node %s", node.Name) - continue - } - - var err error - shouldSkip := false - useSingleSLB := strings.EqualFold(bi.LoadBalancerSku, consts.LoadBalancerSkuStandard) && !bi.EnableMultipleStandardLoadBalancers - if !useSingleSLB { - vmSetName, err = bi.VMSet.GetNodeVMSetName(node) - if err != nil { - klog.Errorf("bi.EnsureHostsInPool: failed to get vmSet name by node name: %s", err.Error()) - return err - } - - if !strings.EqualFold(vmSetName, bi.mapLoadBalancerNameToVMSet(lbName, clusterName)) { - shouldSkip = true - - lbNamePrefix := strings.TrimSuffix(lbName, consts.InternalLoadBalancerNameSuffix) - if strings.EqualFold(lbNamePrefix, clusterName) && - strings.EqualFold(bi.LoadBalancerSku, consts.LoadBalancerSkuStandard) && - bi.getVMSetNamesSharingPrimarySLB().Has(vmSetName) { - shouldSkip = false - } - } - } - if shouldSkip { - klog.V(4).Infof("bi.EnsureHostsInPool: skipping attaching node %s to lb %s, because the vmSet of the node is %s", node.Name, lbName, vmSetName) - continue - } - - privateIP := getNodePrivateIPAddress(service, node) - if !existingIPs.Has(privateIP) { - name := node.Name - if utilnet.IsIPv6String(privateIP) { - name = fmt.Sprintf("%s-ipv6", name) - } - - klog.V(4).Infof("bi.EnsureHostsInPool: adding %s with ip address %s", name, privateIP) - *backendPool.LoadBalancerBackendAddresses = append(*backendPool.LoadBalancerBackendAddresses, network.LoadBalancerBackendAddress{ - Name: to.StringPtr(name), - LoadBalancerBackendAddressPropertiesFormat: &network.LoadBalancerBackendAddressPropertiesFormat{ - IPAddress: to.StringPtr(privateIP), - VirtualNetwork: &network.SubResource{ID: to.StringPtr(vnetID)}, - }, - }) - changed = true - } - } - } - if changed { - klog.V(2).Infof("bi.EnsureHostsInPool: updating backend pool %s of load balancer %s", lbBackendPoolName, lbName) - if err := bi.CreateOrUpdateLBBackendPool(lbName, backendPool); err != nil { - return fmt.Errorf("bi.EnsureHostsInPool: failed to update backend pool %s: %w", lbBackendPoolName, err) - } - } - - return nil -} - -func (bi *backendPoolTypeNodeIP) CleanupVMSetFromBackendPoolByCondition(slb *network.LoadBalancer, service *v1.Service, nodes []*v1.Node, clusterName string, shouldRemoveVMSetFromSLB func(string) bool) (*network.LoadBalancer, error) { - lbBackendPoolName := getBackendPoolName(clusterName, service) - newBackendPools := make([]network.BackendAddressPool, 0) - if slb.LoadBalancerPropertiesFormat != nil && slb.BackendAddressPools != nil { - newBackendPools = *slb.BackendAddressPools - } - - var updatedPrivateIPs bool - for j, bp := range newBackendPools { - if strings.EqualFold(to.String(bp.Name), lbBackendPoolName) { - klog.V(2).Infof("bi.CleanupVMSetFromBackendPoolByCondition: checking the backend pool %s from standard load balancer %s", to.String(bp.Name), to.String(slb.Name)) - vmIPsToBeDeleted := sets.NewString() - for _, node := range nodes { - vmSetName, err := bi.VMSet.GetNodeVMSetName(node) - if err != nil { - return nil, err - } - - if shouldRemoveVMSetFromSLB(vmSetName) { - privateIP := getNodePrivateIPAddress(service, node) - klog.V(4).Infof("bi.CleanupVMSetFromBackendPoolByCondition: removing ip %s from the backend pool %s", privateIP, lbBackendPoolName) - vmIPsToBeDeleted.Insert(privateIP) - } - } - - if bp.BackendAddressPoolPropertiesFormat != nil && bp.LoadBalancerBackendAddresses != nil { - for i := len(*bp.LoadBalancerBackendAddresses) - 1; i >= 0; i-- { - if (*bp.LoadBalancerBackendAddresses)[i].LoadBalancerBackendAddressPropertiesFormat != nil && - vmIPsToBeDeleted.Has(to.String((*bp.LoadBalancerBackendAddresses)[i].IPAddress)) { - *bp.LoadBalancerBackendAddresses = append((*bp.LoadBalancerBackendAddresses)[:i], (*bp.LoadBalancerBackendAddresses)[i+1:]...) - updatedPrivateIPs = true - } - } - } - - newBackendPools[j] = bp - break - } - } - if updatedPrivateIPs { - klog.V(2).Infof("bi.CleanupVMSetFromBackendPoolByCondition: updating lb %s since there are private IP updates", to.String(slb.Name)) - slb.BackendAddressPools = &newBackendPools - - for _, backendAddressPool := range *slb.BackendAddressPools { - if strings.EqualFold(lbBackendPoolName, to.String(backendAddressPool.Name)) { - if err := bi.CreateOrUpdateLBBackendPool(to.String(slb.Name), backendAddressPool); err != nil { - return nil, fmt.Errorf("bi.CleanupVMSetFromBackendPoolByCondition: failed to create or update backend pool %s: %w", lbBackendPoolName, err) - } - } - } - } - - return slb, nil -} - -func (bi *backendPoolTypeNodeIP) ReconcileBackendPools(clusterName string, service *v1.Service, lb *network.LoadBalancer) (bool, bool, error) { - var newBackendPools []network.BackendAddressPool - var err error - if lb.BackendAddressPools != nil { - newBackendPools = *lb.BackendAddressPools - } - - foundBackendPool := false - wantLb := true - changed := false - lbName := *lb.Name - serviceName := getServiceName(service) - lbBackendPoolName := getBackendPoolName(clusterName, service) - - for i, bp := range newBackendPools { - if strings.EqualFold(*bp.Name, lbBackendPoolName) { - klog.V(10).Infof("bi.ReconcileBackendPools for service (%s)(%t): lb backendpool - found wanted backendpool. not adding anything", serviceName, wantLb) - foundBackendPool = true - - var nodeIPAddressesToBeDeleted []string - for nodeName := range bi.excludeLoadBalancerNodes { - for ip := range bi.nodePrivateIPs[nodeName] { - klog.V(2).Infof("bi.ReconcileBackendPools for service (%s)(%t): lb backendpool - found unwanted node private IP %s, decouple it from the LB %s", serviceName, wantLb, ip, lbName) - nodeIPAddressesToBeDeleted = append(nodeIPAddressesToBeDeleted, ip) - } - } - if len(nodeIPAddressesToBeDeleted) > 0 { - updated := removeNodeIPAddressesFromBackendPool(bp, nodeIPAddressesToBeDeleted) - if updated { - (*lb.BackendAddressPools)[i] = bp - if err := bi.CreateOrUpdateLBBackendPool(lbName, bp); err != nil { - return false, false, fmt.Errorf("bi.ReconcileBackendPools for service (%s)(%t): lb backendpool - failed to update backend pool %s for load balancer %s: %w", serviceName, wantLb, lbBackendPoolName, lbName, err) - } - } - } - break - } else { - klog.V(10).Infof("bi.ReconcileBackendPools for service (%s)(%t): lb backendpool - found unmanaged backendpool %s", serviceName, wantLb, *bp.Name) - } - } - - isBackendPoolPreConfigured := bi.isBackendPoolPreConfigured(service) - if !foundBackendPool { - isBackendPoolPreConfigured = newBackendPool(lb, isBackendPoolPreConfigured, bi.PreConfiguredBackendPoolLoadBalancerTypes, getServiceName(service), getBackendPoolName(clusterName, service)) - changed = true - } - - return isBackendPoolPreConfigured, changed, err -} - -func newBackendPool(lb *network.LoadBalancer, isBackendPoolPreConfigured bool, preConfiguredBackendPoolLoadBalancerTypes, serviceName, lbBackendPoolName string) bool { - if isBackendPoolPreConfigured { - klog.V(2).Infof("newBackendPool for service (%s)(true): lb backendpool - PreConfiguredBackendPoolLoadBalancerTypes %s has been set but can not find corresponding backend pool, ignoring it", - serviceName, - preConfiguredBackendPoolLoadBalancerTypes) - isBackendPoolPreConfigured = false - } - - if lb.BackendAddressPools == nil { - lb.BackendAddressPools = &[]network.BackendAddressPool{} - } - *lb.BackendAddressPools = append(*lb.BackendAddressPools, network.BackendAddressPool{ - Name: to.StringPtr(lbBackendPoolName), - BackendAddressPoolPropertiesFormat: &network.BackendAddressPoolPropertiesFormat{}, - }) - - return isBackendPoolPreConfigured -} - -func removeNodeIPAddressesFromBackendPool(backendPool network.BackendAddressPool, nodeIPAddresses []string) bool { - changed := false - nodeIPsSet := sets.NewString(nodeIPAddresses...) - if backendPool.BackendAddressPoolPropertiesFormat != nil && - backendPool.LoadBalancerBackendAddresses != nil { - for i := len(*backendPool.LoadBalancerBackendAddresses) - 1; i >= 0; i-- { - if (*backendPool.LoadBalancerBackendAddresses)[i].LoadBalancerBackendAddressPropertiesFormat != nil { - ipAddress := to.String((*backendPool.LoadBalancerBackendAddresses)[i].IPAddress) - if nodeIPsSet.Has(ipAddress) { - klog.V(4).Infof("removeNodeIPAddressFromBackendPool: removing %s from the backend pool %s", ipAddress, to.String(backendPool.Name)) - *backendPool.LoadBalancerBackendAddresses = append((*backendPool.LoadBalancerBackendAddresses)[:i], (*backendPool.LoadBalancerBackendAddresses)[i+1:]...) - changed = true - } - } - } - } - - return changed -} diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_managedDiskController.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_managedDiskController.go index 09e439a64687..a7df010a2f44 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_managedDiskController.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_managedDiskController.go @@ -98,7 +98,7 @@ func (c *ManagedDiskController) CreateManagedDisk(options *ManagedDiskOptions) ( // insert original tags to newTags newTags := make(map[string]*string) azureDDTag := "kubernetes-azure-dd" - newTags[consts.CreatedByTag] = &azureDDTag + newTags["created-by"] = &azureDDTag if options.Tags != nil { for k, v := range options.Tags { // Azure won't allow / (forward slash) in tags @@ -306,7 +306,7 @@ func (c *ManagedDiskController) GetDisk(resourceGroup, diskName string) (string, } // ResizeDisk Expand the disk to new size -func (c *ManagedDiskController) ResizeDisk(diskURI string, oldSize resource.Quantity, newSize resource.Quantity, supportOnlineResize bool) (resource.Quantity, error) { +func (c *ManagedDiskController) ResizeDisk(diskURI string, oldSize resource.Quantity, newSize resource.Quantity) (resource.Quantity, error) { ctx, cancel := getContextWithCancel() defer cancel() @@ -339,7 +339,7 @@ func (c *ManagedDiskController) ResizeDisk(diskURI string, oldSize resource.Quan return newSizeQuant, nil } - if !supportOnlineResize && result.DiskProperties.DiskState != compute.Unattached { + if result.DiskProperties.DiskState != compute.Unattached { return oldSize, fmt.Errorf("azureDisk - disk resize is only supported on Unattached disk, current disk state: %s, already attached to %s", result.DiskProperties.DiskState, to.String(result.ManagedBy)) } diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_mock_loadbalancer_backendpool.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_mock_loadbalancer_backendpool.go deleted file mode 100644 index d0611a98a510..000000000000 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_mock_loadbalancer_backendpool.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright 2021 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package provider - -import ( - reflect "reflect" - - network "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network" - gomock "github.com/golang/mock/gomock" - - v1 "k8s.io/api/core/v1" -) - -// MockBackendPool is a mock of BackendPool interface -type MockBackendPool struct { - ctrl *gomock.Controller - recorder *MockBackendPoolMockRecorder -} - -// MockBackendPoolMockRecorder is the mock recorder for MockBackendPool -type MockBackendPoolMockRecorder struct { - mock *MockBackendPool -} - -// NewMockBackendPool creates a new mock instance -func NewMockBackendPool(ctrl *gomock.Controller) *MockBackendPool { - mock := &MockBackendPool{ctrl: ctrl} - mock.recorder = &MockBackendPoolMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use -func (m *MockBackendPool) EXPECT() *MockBackendPoolMockRecorder { - return m.recorder -} - -// EnsureHostsInPool mocks base method -func (m *MockBackendPool) EnsureHostsInPool(service *v1.Service, nodes []*v1.Node, backendPoolID, vmSetName, clusterName, lbName string, backendPool network.BackendAddressPool) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnsureHostsInPool", service, nodes, backendPoolID, vmSetName, clusterName, lbName, backendPool) - ret0, _ := ret[0].(error) - return ret0 -} - -// EnsureHostsInPool indicates an expected call of EnsureHostsInPool -func (mr *MockBackendPoolMockRecorder) EnsureHostsInPool(service, nodes, backendPoolID, vmSetName, clusterName, lbName, backendPool interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureHostsInPool", reflect.TypeOf((*MockBackendPool)(nil).EnsureHostsInPool), service, nodes, backendPoolID, vmSetName, clusterName, lbName, backendPool) -} - -// CleanupVMSetFromBackendPoolByCondition mocks base method -func (m *MockBackendPool) CleanupVMSetFromBackendPoolByCondition(slb *network.LoadBalancer, service *v1.Service, nodes []*v1.Node, clusterName string, shouldRemoveVMSetFromSLB func(string) bool) (*network.LoadBalancer, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CleanupVMSetFromBackendPoolByCondition", slb, service, nodes, clusterName, shouldRemoveVMSetFromSLB) - ret0, _ := ret[0].(*network.LoadBalancer) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// CleanupVMSetFromBackendPoolByCondition indicates an expected call of CleanupVMSetFromBackendPoolByCondition -func (mr *MockBackendPoolMockRecorder) CleanupVMSetFromBackendPoolByCondition(slb, service, nodes, clusterName, shouldRemoveVMSetFromSLB interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CleanupVMSetFromBackendPoolByCondition", reflect.TypeOf((*MockBackendPool)(nil).CleanupVMSetFromBackendPoolByCondition), slb, service, nodes, clusterName, shouldRemoveVMSetFromSLB) -} - -// ReconcileBackendPools mocks base method -func (m *MockBackendPool) ReconcileBackendPools(clusterName string, service *v1.Service, lb *network.LoadBalancer) (bool, bool, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ReconcileBackendPools", clusterName, service, lb) - ret0, _ := ret[0].(bool) - ret1, _ := ret[1].(bool) - ret2, _ := ret[2].(error) - return ret0, ret1, ret2 -} - -// ReconcileBackendPools indicates an expected call of ReconcileBackendPools -func (mr *MockBackendPoolMockRecorder) ReconcileBackendPools(clusterName, service, lb interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReconcileBackendPools", reflect.TypeOf((*MockBackendPool)(nil).ReconcileBackendPools), clusterName, service, lb) -} diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_mock_vmsets.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_mock_vmsets.go deleted file mode 100644 index e606b554a95d..000000000000 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_mock_vmsets.go +++ /dev/null @@ -1,414 +0,0 @@ -/* -Copyright 2020 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package provider - -import ( - context "context" - reflect "reflect" - - compute "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute" - network "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network" - azure "github.com/Azure/go-autorest/autorest/azure" - gomock "github.com/golang/mock/gomock" - v1 "k8s.io/api/core/v1" - types "k8s.io/apimachinery/pkg/types" - cloud_provider "k8s.io/cloud-provider" - cache "sigs.k8s.io/cloud-provider-azure/pkg/cache" -) - -// MockVMSet is a mock of VMSet interface -type MockVMSet struct { - ctrl *gomock.Controller - recorder *MockVMSetMockRecorder -} - -// MockVMSetMockRecorder is the mock recorder for MockVMSet -type MockVMSetMockRecorder struct { - mock *MockVMSet -} - -// NewMockVMSet creates a new mock instance -func NewMockVMSet(ctrl *gomock.Controller) *MockVMSet { - mock := &MockVMSet{ctrl: ctrl} - mock.recorder = &MockVMSetMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use -func (m *MockVMSet) EXPECT() *MockVMSetMockRecorder { - return m.recorder -} - -// GetInstanceIDByNodeName mocks base method -func (m *MockVMSet) GetInstanceIDByNodeName(name string) (string, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetInstanceIDByNodeName", name) - ret0, _ := ret[0].(string) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetInstanceIDByNodeName indicates an expected call of GetInstanceIDByNodeName -func (mr *MockVMSetMockRecorder) GetInstanceIDByNodeName(name interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceIDByNodeName", reflect.TypeOf((*MockVMSet)(nil).GetInstanceIDByNodeName), name) -} - -// GetInstanceTypeByNodeName mocks base method -func (m *MockVMSet) GetInstanceTypeByNodeName(name string) (string, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetInstanceTypeByNodeName", name) - ret0, _ := ret[0].(string) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetInstanceTypeByNodeName indicates an expected call of GetInstanceTypeByNodeName -func (mr *MockVMSetMockRecorder) GetInstanceTypeByNodeName(name interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceTypeByNodeName", reflect.TypeOf((*MockVMSet)(nil).GetInstanceTypeByNodeName), name) -} - -// GetIPByNodeName mocks base method -func (m *MockVMSet) GetIPByNodeName(name string) (string, string, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetIPByNodeName", name) - ret0, _ := ret[0].(string) - ret1, _ := ret[1].(string) - ret2, _ := ret[2].(error) - return ret0, ret1, ret2 -} - -// GetIPByNodeName indicates an expected call of GetIPByNodeName -func (mr *MockVMSetMockRecorder) GetIPByNodeName(name interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetIPByNodeName", reflect.TypeOf((*MockVMSet)(nil).GetIPByNodeName), name) -} - -// GetPrimaryInterface mocks base method -func (m *MockVMSet) GetPrimaryInterface(nodeName string) (network.Interface, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetPrimaryInterface", nodeName) - ret0, _ := ret[0].(network.Interface) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetPrimaryInterface indicates an expected call of GetPrimaryInterface -func (mr *MockVMSetMockRecorder) GetPrimaryInterface(nodeName interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPrimaryInterface", reflect.TypeOf((*MockVMSet)(nil).GetPrimaryInterface), nodeName) -} - -// GetNodeNameByProviderID mocks base method -func (m *MockVMSet) GetNodeNameByProviderID(providerID string) (types.NodeName, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetNodeNameByProviderID", providerID) - ret0, _ := ret[0].(types.NodeName) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetNodeNameByProviderID indicates an expected call of GetNodeNameByProviderID -func (mr *MockVMSetMockRecorder) GetNodeNameByProviderID(providerID interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNodeNameByProviderID", reflect.TypeOf((*MockVMSet)(nil).GetNodeNameByProviderID), providerID) -} - -// GetZoneByNodeName mocks base method -func (m *MockVMSet) GetZoneByNodeName(name string) (cloud_provider.Zone, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetZoneByNodeName", name) - ret0, _ := ret[0].(cloud_provider.Zone) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetZoneByNodeName indicates an expected call of GetZoneByNodeName -func (mr *MockVMSetMockRecorder) GetZoneByNodeName(name interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetZoneByNodeName", reflect.TypeOf((*MockVMSet)(nil).GetZoneByNodeName), name) -} - -// GetPrimaryVMSetName mocks base method -func (m *MockVMSet) GetPrimaryVMSetName() string { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetPrimaryVMSetName") - ret0, _ := ret[0].(string) - return ret0 -} - -// GetPrimaryVMSetName indicates an expected call of GetPrimaryVMSetName -func (mr *MockVMSetMockRecorder) GetPrimaryVMSetName() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPrimaryVMSetName", reflect.TypeOf((*MockVMSet)(nil).GetPrimaryVMSetName)) -} - -// GetVMSetNames mocks base method -func (m *MockVMSet) GetVMSetNames(service *v1.Service, nodes []*v1.Node) (*[]string, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetVMSetNames", service, nodes) - ret0, _ := ret[0].(*[]string) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetVMSetNames indicates an expected call of GetVMSetNames -func (mr *MockVMSetMockRecorder) GetVMSetNames(service, nodes interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVMSetNames", reflect.TypeOf((*MockVMSet)(nil).GetVMSetNames), service, nodes) -} - -// GetNodeVMSetName mocks base method -func (m *MockVMSet) GetNodeVMSetName(node *v1.Node) (string, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetNodeVMSetName", node) - ret0, _ := ret[0].(string) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetNodeVMSetName indicates an expected call of GetNodeVMSetName -func (mr *MockVMSetMockRecorder) GetNodeVMSetName(node interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNodeVMSetName", reflect.TypeOf((*MockVMSet)(nil).GetNodeVMSetName), node) -} - -// EnsureHostsInPool mocks base method -func (m *MockVMSet) EnsureHostsInPool(service *v1.Service, nodes []*v1.Node, backendPoolID, vmSetName string) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnsureHostsInPool", service, nodes, backendPoolID, vmSetName) - ret0, _ := ret[0].(error) - return ret0 -} - -// EnsureHostsInPool indicates an expected call of EnsureHostsInPool -func (mr *MockVMSetMockRecorder) EnsureHostsInPool(service, nodes, backendPoolID, vmSetName interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureHostsInPool", reflect.TypeOf((*MockVMSet)(nil).EnsureHostsInPool), service, nodes, backendPoolID, vmSetName) -} - -// EnsureHostInPool mocks base method -func (m *MockVMSet) EnsureHostInPool(service *v1.Service, nodeName types.NodeName, backendPoolID, vmSetName string) (string, string, string, *compute.VirtualMachineScaleSetVM, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnsureHostInPool", service, nodeName, backendPoolID, vmSetName) - ret0, _ := ret[0].(string) - ret1, _ := ret[1].(string) - ret2, _ := ret[2].(string) - ret3, _ := ret[3].(*compute.VirtualMachineScaleSetVM) - ret4, _ := ret[4].(error) - return ret0, ret1, ret2, ret3, ret4 -} - -// EnsureHostInPool indicates an expected call of EnsureHostInPool -func (mr *MockVMSetMockRecorder) EnsureHostInPool(service, nodeName, backendPoolID, vmSetName interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureHostInPool", reflect.TypeOf((*MockVMSet)(nil).EnsureHostInPool), service, nodeName, backendPoolID, vmSetName) -} - -// EnsureBackendPoolDeleted mocks base method -func (m *MockVMSet) EnsureBackendPoolDeleted(service *v1.Service, backendPoolID, vmSetName string, backendAddressPools *[]network.BackendAddressPool, deleteFromVMSet bool) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnsureBackendPoolDeleted", service, backendPoolID, vmSetName, backendAddressPools, deleteFromVMSet) - ret0, _ := ret[0].(error) - return ret0 -} - -// EnsureBackendPoolDeleted indicates an expected call of EnsureBackendPoolDeleted -func (mr *MockVMSetMockRecorder) EnsureBackendPoolDeleted(service, backendPoolID, vmSetName, backendAddressPools, deleteFromVMSet interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureBackendPoolDeleted", reflect.TypeOf((*MockVMSet)(nil).EnsureBackendPoolDeleted), service, backendPoolID, vmSetName, backendAddressPools, deleteFromVMSet) -} - -// EnsureBackendPoolDeletedFromVMSets mocks base method -func (m *MockVMSet) EnsureBackendPoolDeletedFromVMSets(vmSetNamesMap map[string]bool, backendPoolID string) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnsureBackendPoolDeletedFromVMSets", vmSetNamesMap, backendPoolID) - ret0, _ := ret[0].(error) - return ret0 -} - -// EnsureBackendPoolDeletedFromVMSets indicates an expected call of EnsureBackendPoolDeletedFromVMSets -func (mr *MockVMSetMockRecorder) EnsureBackendPoolDeletedFromVMSets(vmSetNamesMap, backendPoolID interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureBackendPoolDeletedFromVMSets", reflect.TypeOf((*MockVMSet)(nil).EnsureBackendPoolDeletedFromVMSets), vmSetNamesMap, backendPoolID) -} - -// AttachDisk mocks base method -func (m *MockVMSet) AttachDisk(nodeName types.NodeName, diskMap map[string]*AttachDiskOptions) (*azure.Future, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AttachDisk", nodeName, diskMap) - ret0, _ := ret[0].(*azure.Future) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// AttachDisk indicates an expected call of AttachDisk -func (mr *MockVMSetMockRecorder) AttachDisk(nodeName, diskMap interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AttachDisk", reflect.TypeOf((*MockVMSet)(nil).AttachDisk), nodeName, diskMap) -} - -// DetachDisk mocks base method -func (m *MockVMSet) DetachDisk(nodeName types.NodeName, diskMap map[string]string) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DetachDisk", nodeName, diskMap) - ret0, _ := ret[0].(error) - return ret0 -} - -// DetachDisk indicates an expected call of DetachDisk -func (mr *MockVMSetMockRecorder) DetachDisk(nodeName, diskMap interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetachDisk", reflect.TypeOf((*MockVMSet)(nil).DetachDisk), nodeName, diskMap) -} - -// WaitForUpdateResult mocks base method -func (m *MockVMSet) WaitForUpdateResult(ctx context.Context, future *azure.Future, resourceGroupName, source string) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "WaitForUpdateResult", ctx, future, resourceGroupName, source) - ret0, _ := ret[0].(error) - return ret0 -} - -// WaitForUpdateResult indicates an expected call of WaitForUpdateResult -func (mr *MockVMSetMockRecorder) WaitForUpdateResult(ctx, future, resourceGroupName, source interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForUpdateResult", reflect.TypeOf((*MockVMSet)(nil).WaitForUpdateResult), ctx, future, resourceGroupName, source) -} - -// GetDataDisks mocks base method -func (m *MockVMSet) GetDataDisks(nodeName types.NodeName, crt cache.AzureCacheReadType) ([]compute.DataDisk, *string, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetDataDisks", nodeName, crt) - ret0, _ := ret[0].([]compute.DataDisk) - ret1, _ := ret[1].(*string) - ret2, _ := ret[2].(error) - return ret0, ret1, ret2 -} - -// GetDataDisks indicates an expected call of GetDataDisks -func (mr *MockVMSetMockRecorder) GetDataDisks(nodeName, crt interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDataDisks", reflect.TypeOf((*MockVMSet)(nil).GetDataDisks), nodeName, crt) -} - -// UpdateVM mocks base method -func (m *MockVMSet) UpdateVM(nodeName types.NodeName) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UpdateVM", nodeName) - ret0, _ := ret[0].(error) - return ret0 -} - -// UpdateVM indicates an expected call of UpdateVM -func (mr *MockVMSetMockRecorder) UpdateVM(nodeName interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateVM", reflect.TypeOf((*MockVMSet)(nil).UpdateVM), nodeName) -} - -// GetPowerStatusByNodeName mocks base method -func (m *MockVMSet) GetPowerStatusByNodeName(name string) (string, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetPowerStatusByNodeName", name) - ret0, _ := ret[0].(string) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetPowerStatusByNodeName indicates an expected call of GetPowerStatusByNodeName -func (mr *MockVMSetMockRecorder) GetPowerStatusByNodeName(name interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPowerStatusByNodeName", reflect.TypeOf((*MockVMSet)(nil).GetPowerStatusByNodeName), name) -} - -// GetProvisioningStateByNodeName mocks base method -func (m *MockVMSet) GetProvisioningStateByNodeName(name string) (string, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetProvisioningStateByNodeName", name) - ret0, _ := ret[0].(string) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetProvisioningStateByNodeName indicates an expected call of GetProvisioningStateByNodeName -func (mr *MockVMSetMockRecorder) GetProvisioningStateByNodeName(name interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProvisioningStateByNodeName", reflect.TypeOf((*MockVMSet)(nil).GetProvisioningStateByNodeName), name) -} - -// GetPrivateIPsByNodeName mocks base method -func (m *MockVMSet) GetPrivateIPsByNodeName(name string) ([]string, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetPrivateIPsByNodeName", name) - ret0, _ := ret[0].([]string) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetPrivateIPsByNodeName indicates an expected call of GetPrivateIPsByNodeName -func (mr *MockVMSetMockRecorder) GetPrivateIPsByNodeName(name interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPrivateIPsByNodeName", reflect.TypeOf((*MockVMSet)(nil).GetPrivateIPsByNodeName), name) -} - -// GetNodeNameByIPConfigurationID mocks base method -func (m *MockVMSet) GetNodeNameByIPConfigurationID(ipConfigurationID string) (string, string, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetNodeNameByIPConfigurationID", ipConfigurationID) - ret0, _ := ret[0].(string) - ret1, _ := ret[1].(string) - ret2, _ := ret[2].(error) - return ret0, ret1, ret2 -} - -// GetNodeNameByIPConfigurationID indicates an expected call of GetNodeNameByIPConfigurationID -func (mr *MockVMSetMockRecorder) GetNodeNameByIPConfigurationID(ipConfigurationID interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNodeNameByIPConfigurationID", reflect.TypeOf((*MockVMSet)(nil).GetNodeNameByIPConfigurationID), ipConfigurationID) -} - -// GetNodeCIDRMasksByProviderID mocks base method -func (m *MockVMSet) GetNodeCIDRMasksByProviderID(providerID string) (int, int, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetNodeCIDRMasksByProviderID", providerID) - ret0, _ := ret[0].(int) - ret1, _ := ret[1].(int) - ret2, _ := ret[2].(error) - return ret0, ret1, ret2 -} - -// GetNodeCIDRMasksByProviderID indicates an expected call of GetNodeCIDRMasksByProviderID -func (mr *MockVMSetMockRecorder) GetNodeCIDRMasksByProviderID(providerID interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNodeCIDRMasksByProviderID", reflect.TypeOf((*MockVMSet)(nil).GetNodeCIDRMasksByProviderID), providerID) -} - -// GetAgentPoolVMSetNames mocks base method -func (m *MockVMSet) GetAgentPoolVMSetNames(nodes []*v1.Node) (*[]string, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAgentPoolVMSetNames", nodes) - ret0, _ := ret[0].(*[]string) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetAgentPoolVMSetNames indicates an expected call of GetAgentPoolVMSetNames -func (mr *MockVMSetMockRecorder) GetAgentPoolVMSetNames(nodes interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAgentPoolVMSetNames", reflect.TypeOf((*MockVMSet)(nil).GetAgentPoolVMSetNames), nodes) -} diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_routes.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_routes.go index 92a93d73c1e2..f0dd91c6f7b6 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_routes.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_routes.go @@ -563,7 +563,7 @@ func cidrtoRfc1035(cidr string) string { // ensureRouteTableTagged ensures the route table is tagged as configured func (az *Cloud) ensureRouteTableTagged(rt *network.RouteTable) (map[string]*string, bool) { - if az.Tags == "" && (az.TagsMap == nil || len(az.TagsMap) == 0) { + if az.Tags == "" { return nil, false } tags := parseTags(az.Tags, az.TagsMap) diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_standard.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_standard.go index 3a912f71c078..fe2c823f8851 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_standard.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_standard.go @@ -36,6 +36,7 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" utilerrors "k8s.io/apimachinery/pkg/util/errors" + "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/uuid" cloudprovider "k8s.io/cloud-provider" "k8s.io/klog/v2" @@ -105,7 +106,7 @@ func (az *Cloud) getLoadBalancerProbeID(lbName, rgName, lbRuleName string) strin // getNetworkResourceSubscriptionID returns the subscription id which hosts network resources func (az *Cloud) getNetworkResourceSubscriptionID() string { - if az.Config.UsesNetworkResourceInDifferentTenantOrSubscription() { + if az.Config.UsesNetworkResourceInDifferentTenant() { return az.NetworkResourceSubscriptionID } return az.SubscriptionID @@ -580,15 +581,11 @@ func (as *availabilitySet) GetInstanceTypeByNodeName(name string) (string, error return "", err } - if machine.HardwareProfile == nil { - return "", fmt.Errorf("HardwareProfile of node(%s) is nil", name) - } return string(machine.HardwareProfile.VMSize), nil } // GetZoneByNodeName gets availability zone for the specified node. If the node is not running // with availability zone, then it returns fault domain. -// for details, refer to https://kubernetes-sigs.github.io/cloud-provider-azure/topics/availability-zones/#node-labels func (as *availabilitySet) GetZoneByNodeName(name string) (cloudprovider.Zone, error) { vm, err := as.getVirtualMachine(types.NodeName(name), azcache.CacheReadTypeUnsafe) if err != nil { @@ -689,6 +686,7 @@ func (as *availabilitySet) getAgentPoolAvailabilitySets(vms []compute.VirtualMac vmNameToAvailabilitySetID[*vm.Name] = *vm.AvailabilitySet.ID } } + availabilitySetIDs := sets.NewString() agentPoolAvailabilitySets = &[]string{} for nx := range nodes { nodeName := (*nodes[nx]).Name @@ -700,6 +698,10 @@ func (as *availabilitySet) getAgentPoolAvailabilitySets(vms []compute.VirtualMac klog.Warningf("as.getNodeAvailabilitySet - Node(%s) has no availability sets", nodeName) continue } + if availabilitySetIDs.Has(asID) { + // already added in the list + continue + } asName, err := getLastSegment(asID, "/") if err != nil { klog.Errorf("as.getNodeAvailabilitySet - Node (%s)- getLastSegment(%s), err=%v", nodeName, asID, err) @@ -762,50 +764,6 @@ func (as *availabilitySet) GetVMSetNames(service *v1.Service, nodes []*v1.Node) return availabilitySetNames, nil } -func (as *availabilitySet) GetNodeVMSetName(node *v1.Node) (string, error) { - var hostName string - for _, nodeAddress := range node.Status.Addresses { - if strings.EqualFold(string(nodeAddress.Type), string(v1.NodeHostName)) { - hostName = nodeAddress.Address - } - } - if hostName == "" { - if name, ok := node.Labels[consts.NodeLabelHostName]; ok { - hostName = name - } - } - if hostName == "" { - klog.Warningf("as.GetNodeVMSetName: cannot get host name from node %s", node.Name) - return "", nil - } - - vms, err := as.ListVirtualMachines(as.ResourceGroup) - if err != nil { - klog.Errorf("as.GetNodeVMSetName - ListVirtualMachines failed, err=%v", err) - return "", err - } - - var asName string - for _, vm := range vms { - if strings.EqualFold(to.String(vm.Name), hostName) { - if vm.AvailabilitySet != nil && to.String(vm.AvailabilitySet.ID) != "" { - klog.V(4).Infof("as.GetNodeVMSetName: found vm %s", hostName) - - asName, err = getLastSegment(to.String(vm.AvailabilitySet.ID), "/") - if err != nil { - klog.Errorf("as.GetNodeVMSetName: failed to get last segment of ID %s: %s", to.String(vm.AvailabilitySet.ID), err) - return "", err - } - } - - break - } - } - - klog.V(4).Infof("as.GetNodeVMSetName: found availability set name %s from node name %s", asName, node.Name) - return asName, nil -} - // GetPrimaryInterface gets machine primary network interface by node name. func (as *availabilitySet) GetPrimaryInterface(nodeName string) (network.Interface, error) { nic, _, err := as.getPrimaryInterfaceWithVMSet(nodeName, "") @@ -891,7 +849,7 @@ func (as *availabilitySet) getPrimaryInterfaceWithVMSet(nodeName, vmSetName stri // EnsureHostInPool ensures the given VM's Primary NIC's Primary IP Configuration is // participating in the specified LoadBalancer Backend Pool. -func (as *availabilitySet) EnsureHostInPool(service *v1.Service, nodeName types.NodeName, backendPoolID string, vmSetName string) (string, string, string, *compute.VirtualMachineScaleSetVM, error) { +func (as *availabilitySet) EnsureHostInPool(service *v1.Service, nodeName types.NodeName, backendPoolID string, vmSetName string, isInternal bool) (string, string, string, *compute.VirtualMachineScaleSetVM, error) { vmName := mapNodeNameToVMName(nodeName) serviceName := getServiceName(service) nic, _, err := as.getPrimaryInterfaceWithVMSet(vmName, vmSetName) @@ -976,7 +934,7 @@ func (as *availabilitySet) EnsureHostInPool(service *v1.Service, nodeName types. // EnsureHostsInPool ensures the given Node's primary IP configurations are // participating in the specified LoadBalancer Backend Pool. -func (as *availabilitySet) EnsureHostsInPool(service *v1.Service, nodes []*v1.Node, backendPoolID string, vmSetName string) error { +func (as *availabilitySet) EnsureHostsInPool(service *v1.Service, nodes []*v1.Node, backendPoolID string, vmSetName string, isInternal bool) error { mc := metrics.NewMetricContext("services", "vmas_ensure_hosts_in_pool", as.ResourceGroup, as.SubscriptionID, service.Name) isOperationSucceeded := false defer func() { @@ -1002,7 +960,7 @@ func (as *availabilitySet) EnsureHostsInPool(service *v1.Service, nodes []*v1.No } f := func() error { - _, _, _, _, err := as.EnsureHostInPool(service, types.NodeName(localNodeName), backendPoolID, vmSetName) + _, _, _, _, err := as.EnsureHostInPool(service, types.NodeName(localNodeName), backendPoolID, vmSetName, isInternal) if err != nil { return fmt.Errorf("ensure(%s): backendPoolID(%s) - failed to ensure host in pool: %w", getServiceName(service), backendPoolID, err) } diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_storage.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_storage.go index 1d00b965978d..db1ad994b347 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_storage.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_storage.go @@ -17,7 +17,6 @@ limitations under the License. package provider import ( - "context" "fmt" "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-02-01/storage" @@ -30,7 +29,7 @@ import ( // CreateFileShare creates a file share, using a matching storage account type, account kind, etc. // storage account will be created if specified account is not found -func (az *Cloud) CreateFileShare(ctx context.Context, accountOptions *AccountOptions, shareOptions *fileclient.ShareOptions) (string, string, error) { +func (az *Cloud) CreateFileShare(accountOptions *AccountOptions, shareOptions *fileclient.ShareOptions) (string, string, error) { if accountOptions == nil { return "", "", fmt.Errorf("account options is nil") } @@ -46,7 +45,7 @@ func (az *Cloud) CreateFileShare(ctx context.Context, accountOptions *AccountOpt accountOptions.EnableHTTPSTrafficOnly = false } - accountName, accountKey, err := az.EnsureStorageAccount(ctx, accountOptions, consts.FileShareAccountNamePrefix) + accountName, accountKey, err := az.EnsureStorageAccount(accountOptions, consts.FileShareAccountNamePrefix) if err != nil { return "", "", fmt.Errorf("could not get storage key for storage account %s: %w", accountOptions.Name, err) } diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_storageaccount.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_storageaccount.go index 480e89e6d369..cfc981fa0483 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_storageaccount.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_storageaccount.go @@ -42,15 +42,14 @@ const PrivateDNSZoneName = "privatelink.file.core.windows.net" // AccountOptions contains the fields which are used to create storage account. type AccountOptions struct { Name, Type, Kind, ResourceGroup, Location string - EnableHTTPSTrafficOnly bool - // indicate whether create new account when Name is empty or when account does not exists + // indicate whether create new account when Name is empty + EnableHTTPSTrafficOnly bool CreateAccount bool EnableLargeFileShare bool CreatePrivateEndpoint bool DisableFileServiceDeleteRetentionPolicy bool IsHnsEnabled *bool EnableNfsV3 *bool - AllowBlobPublicAccess *bool Tags map[string]string VirtualNetworkResourceIDs []string } @@ -60,10 +59,12 @@ type accountWithLocation struct { } // getStorageAccounts get matching storage accounts -func (az *Cloud) getStorageAccounts(ctx context.Context, accountOptions *AccountOptions) ([]accountWithLocation, error) { +func (az *Cloud) getStorageAccounts(accountOptions *AccountOptions) ([]accountWithLocation, error) { if az.StorageAccountClient == nil { return nil, fmt.Errorf("StorageAccountClient is nil") } + ctx, cancel := getContextWithCancel() + defer cancel() result, rerr := az.StorageAccountClient.ListByResourceGroup(ctx, accountOptions.ResourceGroup) if rerr != nil { return nil, rerr.Error() @@ -90,11 +91,13 @@ func (az *Cloud) getStorageAccounts(ctx context.Context, accountOptions *Account } // GetStorageAccesskey gets the storage account access key -func (az *Cloud) GetStorageAccesskey(ctx context.Context, account, resourceGroup string) (string, error) { +func (az *Cloud) GetStorageAccesskey(account, resourceGroup string) (string, error) { if az.StorageAccountClient == nil { return "", fmt.Errorf("StorageAccountClient is nil") } + ctx, cancel := getContextWithCancel() + defer cancel() result, rerr := az.StorageAccountClient.ListKeys(ctx, resourceGroup, account) if rerr != nil { return "", rerr.Error() @@ -116,7 +119,7 @@ func (az *Cloud) GetStorageAccesskey(ctx context.Context, account, resourceGroup } // EnsureStorageAccount search storage account, create one storage account(with genAccountNamePrefix) if not found, return accountName, accountKey -func (az *Cloud) EnsureStorageAccount(ctx context.Context, accountOptions *AccountOptions, genAccountNamePrefix string) (string, string, error) { +func (az *Cloud) EnsureStorageAccount(accountOptions *AccountOptions, genAccountNamePrefix string) (string, string, error) { if accountOptions == nil { return "", "", fmt.Errorf("account options is nil") } @@ -128,168 +131,149 @@ func (az *Cloud) EnsureStorageAccount(ctx context.Context, accountOptions *Accou location := accountOptions.Location enableHTTPSTrafficOnly := accountOptions.EnableHTTPSTrafficOnly - var createNewAccount bool if len(accountName) == 0 { - createNewAccount = true if !accountOptions.CreateAccount { // find a storage account that matches accountType - accounts, err := az.getStorageAccounts(ctx, accountOptions) + accounts, err := az.getStorageAccounts(accountOptions) if err != nil { return "", "", fmt.Errorf("could not list storage accounts for account type %s: %w", accountType, err) } if len(accounts) > 0 { accountName = accounts[0].Name - createNewAccount = false klog.V(4).Infof("found a matching account %s type %s location %s", accounts[0].Name, accounts[0].StorageType, accounts[0].Location) } } if len(accountName) == 0 { - accountName = generateStorageAccountName(genAccountNamePrefix) - } - } else { - createNewAccount = false - if accountOptions.CreateAccount { - // check whether account exists - if _, err := az.GetStorageAccesskey(ctx, accountName, resourceGroup); err != nil { - klog.V(2).Infof("get storage key for storage account %s returned with %v", accountName, err) - createNewAccount = true + // set network rules for storage account + var networkRuleSet *storage.NetworkRuleSet + virtualNetworkRules := []storage.VirtualNetworkRule{} + for i, subnetID := range accountOptions.VirtualNetworkResourceIDs { + vnetRule := storage.VirtualNetworkRule{ + VirtualNetworkResourceID: &accountOptions.VirtualNetworkResourceIDs[i], + Action: storage.ActionAllow, + } + virtualNetworkRules = append(virtualNetworkRules, vnetRule) + klog.V(4).Infof("subnetID(%s) has been set", subnetID) + } + if len(virtualNetworkRules) > 0 { + networkRuleSet = &storage.NetworkRuleSet{ + VirtualNetworkRules: &virtualNetworkRules, + DefaultAction: storage.DefaultActionDeny, + } } - } - } - - vnetResourceGroup := az.ResourceGroup - if len(az.VnetResourceGroup) > 0 { - vnetResourceGroup = az.VnetResourceGroup - } - if accountOptions.CreatePrivateEndpoint { - // Create DNS zone first, this could make sure driver has write permission on vnetResourceGroup - if err := az.createPrivateDNSZone(ctx, vnetResourceGroup); err != nil { - return "", "", fmt.Errorf("Failed to create private DNS zone(%s) in resourceGroup(%s), error: %v", PrivateDNSZoneName, vnetResourceGroup, err) - } - } + if accountOptions.CreatePrivateEndpoint { + networkRuleSet = &storage.NetworkRuleSet{ + DefaultAction: storage.DefaultActionDeny, + } + } - if createNewAccount { - // set network rules for storage account - var networkRuleSet *storage.NetworkRuleSet - virtualNetworkRules := []storage.VirtualNetworkRule{} - for i, subnetID := range accountOptions.VirtualNetworkResourceIDs { - vnetRule := storage.VirtualNetworkRule{ - VirtualNetworkResourceID: &accountOptions.VirtualNetworkResourceIDs[i], - Action: storage.ActionAllow, + // not found a matching account, now create a new account in current resource group + accountName = generateStorageAccountName(genAccountNamePrefix) + if location == "" { + location = az.Location } - virtualNetworkRules = append(virtualNetworkRules, vnetRule) - klog.V(4).Infof("subnetID(%s) has been set", subnetID) - } - if len(virtualNetworkRules) > 0 { - networkRuleSet = &storage.NetworkRuleSet{ - VirtualNetworkRules: &virtualNetworkRules, - DefaultAction: storage.DefaultActionDeny, + if accountType == "" { + accountType = consts.DefaultStorageAccountType } - } - if accountOptions.CreatePrivateEndpoint { - networkRuleSet = &storage.NetworkRuleSet{ - DefaultAction: storage.DefaultActionDeny, + // use StorageV2 by default per https://docs.microsoft.com/en-us/azure/storage/common/storage-account-options + kind := consts.DefaultStorageAccountKind + if accountKind != "" { + kind = storage.Kind(accountKind) } - } - - if location == "" { - location = az.Location - } - if accountType == "" { - accountType = consts.DefaultStorageAccountType - } - - // use StorageV2 by default per https://docs.microsoft.com/en-us/azure/storage/common/storage-account-options - kind := consts.DefaultStorageAccountKind - if accountKind != "" { - kind = storage.Kind(accountKind) - } - if len(accountOptions.Tags) == 0 { - accountOptions.Tags = make(map[string]string) - } - accountOptions.Tags[consts.CreatedByTag] = "azure" - tags := convertMapToMapPointer(accountOptions.Tags) - - klog.V(2).Infof("azure - no matching account found, begin to create a new account %s in resource group %s, location: %s, accountType: %s, accountKind: %s, tags: %+v", - accountName, resourceGroup, location, accountType, kind, accountOptions.Tags) - - cp := storage.AccountCreateParameters{ - Sku: &storage.Sku{Name: storage.SkuName(accountType)}, - Kind: kind, - AccountPropertiesCreateParameters: &storage.AccountPropertiesCreateParameters{ - EnableHTTPSTrafficOnly: &enableHTTPSTrafficOnly, - NetworkRuleSet: networkRuleSet, - IsHnsEnabled: accountOptions.IsHnsEnabled, - EnableNfsV3: accountOptions.EnableNfsV3, - MinimumTLSVersion: storage.MinimumTLSVersionTLS12, - }, - Tags: tags, - Location: &location} - - if accountOptions.EnableLargeFileShare { - klog.V(2).Infof("Enabling LargeFileShare for storage account(%s)", accountName) - cp.AccountPropertiesCreateParameters.LargeFileSharesState = storage.LargeFileSharesStateEnabled - } - if accountOptions.AllowBlobPublicAccess != nil { - klog.V(2).Infof("set AllowBlobPublicAccess(%v) for storage account(%s)", *accountOptions.AllowBlobPublicAccess, accountName) - cp.AccountPropertiesCreateParameters.AllowBlobPublicAccess = accountOptions.AllowBlobPublicAccess - } - if az.StorageAccountClient == nil { - return "", "", fmt.Errorf("StorageAccountClient is nil") - } - - if rerr := az.StorageAccountClient.Create(ctx, resourceGroup, accountName, cp); rerr != nil { - return "", "", fmt.Errorf("failed to create storage account %s, error: %v", accountName, rerr) - } - - if accountOptions.DisableFileServiceDeleteRetentionPolicy { - klog.V(2).Infof("disable DisableFileServiceDeleteRetentionPolicy on account(%s), resource group(%s)", accountName, resourceGroup) - prop, err := az.FileClient.GetServiceProperties(resourceGroup, accountName) - if err != nil { - return "", "", err + if len(accountOptions.Tags) == 0 { + accountOptions.Tags = make(map[string]string) } - if prop.FileServicePropertiesProperties == nil { - return "", "", fmt.Errorf("FileServicePropertiesProperties of account(%s), resource group(%s) is nil", accountName, resourceGroup) + accountOptions.Tags["created-by"] = "azure" + tags := convertMapToMapPointer(accountOptions.Tags) + + klog.V(2).Infof("azure - no matching account found, begin to create a new account %s in resource group %s, location: %s, accountType: %s, accountKind: %s, tags: %+v", + accountName, resourceGroup, location, accountType, kind, accountOptions.Tags) + + cp := storage.AccountCreateParameters{ + Sku: &storage.Sku{Name: storage.SkuName(accountType)}, + Kind: kind, + AccountPropertiesCreateParameters: &storage.AccountPropertiesCreateParameters{ + EnableHTTPSTrafficOnly: &enableHTTPSTrafficOnly, + NetworkRuleSet: networkRuleSet, + IsHnsEnabled: accountOptions.IsHnsEnabled, + EnableNfsV3: accountOptions.EnableNfsV3, + MinimumTLSVersion: storage.MinimumTLSVersionTLS12, + }, + Tags: tags, + Location: &location} + + if accountOptions.EnableLargeFileShare { + klog.V(2).Infof("Enabling LargeFileShare for the storage account") + cp.AccountPropertiesCreateParameters.LargeFileSharesState = storage.LargeFileSharesStateEnabled } - prop.FileServicePropertiesProperties.ShareDeleteRetentionPolicy = &storage.DeleteRetentionPolicy{Enabled: to.BoolPtr(false)} - if _, err := az.FileClient.SetServiceProperties(resourceGroup, accountName, prop); err != nil { - return "", "", err + if az.StorageAccountClient == nil { + return "", "", fmt.Errorf("StorageAccountClient is nil") } - } - if accountOptions.CreatePrivateEndpoint { - // Get properties of the storageAccount - storageAccount, err := az.StorageAccountClient.GetProperties(ctx, resourceGroup, accountName) - if err != nil { - return "", "", fmt.Errorf("Failed to get the properties of storage account(%s), resourceGroup(%s), error: %v", accountName, resourceGroup, err) + ctx, cancel := getContextWithCancel() + defer cancel() + if rerr := az.StorageAccountClient.Create(ctx, resourceGroup, accountName, cp); rerr != nil { + return "", "", fmt.Errorf("failed to create storage account %s, error: %v", accountName, rerr) } - // Create private endpoint - privateEndpointName := accountName + "-pvtendpoint" - if err := az.createPrivateEndpoint(ctx, accountName, storageAccount.ID, privateEndpointName, vnetResourceGroup); err != nil { - return "", "", fmt.Errorf("Failed to create private endpoint for storage account(%s), resourceGroup(%s), error: %v", accountName, vnetResourceGroup, err) + if accountOptions.DisableFileServiceDeleteRetentionPolicy { + klog.V(2).Infof("disable DisableFileServiceDeleteRetentionPolicy on account(%s), resource group(%s)", accountName, resourceGroup) + prop, err := az.FileClient.GetServiceProperties(resourceGroup, accountName) + if err != nil { + return "", "", err + } + if prop.FileServicePropertiesProperties == nil { + return "", "", fmt.Errorf("FileServicePropertiesProperties of account(%s), resource group(%s) is nil", accountName, resourceGroup) + } + prop.FileServicePropertiesProperties.ShareDeleteRetentionPolicy = &storage.DeleteRetentionPolicy{Enabled: to.BoolPtr(false)} + if _, err := az.FileClient.SetServiceProperties(resourceGroup, accountName, prop); err != nil { + return "", "", err + } } - // Create virtual link to the zone private DNS zone - vNetLinkName := accountName + "-vnetlink" - if err := az.createVNetLink(ctx, vNetLinkName, vnetResourceGroup); err != nil { - return "", "", fmt.Errorf("Failed to create virtual link for vnet(%s) and DNS Zone(%s) in resourceGroup(%s), error: %v", az.VnetName, PrivateDNSZoneName, vnetResourceGroup, err) - } + if accountOptions.CreatePrivateEndpoint { + vnetResourceGroup := az.ResourceGroup + if len(az.VnetResourceGroup) > 0 { + vnetResourceGroup = az.VnetResourceGroup + } + // Get properties of the storageAccount + storageAccount, err := az.StorageAccountClient.GetProperties(ctx, resourceGroup, accountName) + if err != nil { + return "", "", fmt.Errorf("Failed to get the properties of storage account(%s), resourceGroup(%s), error: %v", accountName, resourceGroup, err) + } + + // Create private endpoint + privateEndpointName := accountName + "-pvtendpoint" + if err := az.createPrivateEndpoint(ctx, accountName, storageAccount.ID, privateEndpointName, vnetResourceGroup); err != nil { + return "", "", fmt.Errorf("Failed to create private endpoint for storage account(%s), resourceGroup(%s), error: %v", accountName, vnetResourceGroup, err) + } + + // Create DNS zone + if err := az.createPrivateDNSZone(ctx, vnetResourceGroup); err != nil { + return "", "", fmt.Errorf("Failed to create private DNS zone(%s) in resourceGroup(%s), error: %v", PrivateDNSZoneName, vnetResourceGroup, err) + } - // Create dns zone group - dnsZoneGroupName := accountName + "-dnszonegroup" - if err := az.createPrivateDNSZoneGroup(ctx, dnsZoneGroupName, privateEndpointName, vnetResourceGroup); err != nil { - return "", "", fmt.Errorf("Failed to create private DNS zone group - privateEndpoint(%s), vNetName(%s), resourceGroup(%s), error: %v", privateEndpointName, az.VnetName, vnetResourceGroup, err) + // Create virtual link to the zone private DNS zone + vNetLinkName := accountName + "-vnetlink" + if err := az.createVNetLink(ctx, vNetLinkName, vnetResourceGroup); err != nil { + return "", "", fmt.Errorf("Failed to create virtual link for vnet(%s) and DNS Zone(%s) in resourceGroup(%s), error: %v", az.VnetName, PrivateDNSZoneName, vnetResourceGroup, err) + } + + // Create dns zone group + dnsZoneGroupName := accountName + "-dnszonegroup" + if err := az.createPrivateDNSZoneGroup(ctx, dnsZoneGroupName, privateEndpointName, vnetResourceGroup); err != nil { + return "", "", fmt.Errorf("Failed to create private DNS zone group - privateEndpoint(%s), vNetName(%s), resourceGroup(%s), error: %v", privateEndpointName, az.VnetName, vnetResourceGroup, err) + } } } } // find the access key with this account - accountKey, err := az.GetStorageAccesskey(ctx, accountName, resourceGroup) + accountKey, err := az.GetStorageAccesskey(accountName, resourceGroup) if err != nil { return "", "", fmt.Errorf("could not get storage key for storage account %s: %w", accountName, err) } diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_utils.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_utils.go index 1bde0b5612ef..1b5dd1e801fd 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_utils.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_utils.go @@ -23,13 +23,13 @@ import ( "strings" "sync" + v1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/util/sets" + "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network" "github.com/Azure/go-autorest/autorest/to" - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/util/sets" "k8s.io/klog/v2" - utilnet "k8s.io/utils/net" "sigs.k8s.io/cloud-provider-azure/pkg/consts" ) @@ -235,28 +235,3 @@ func getServiceAdditionalPublicIPs(service *v1.Service) ([]string, error) { return result, nil } - -func getNodePrivateIPAddress(service *v1.Service, node *v1.Node) string { - isIPV6SVC := utilnet.IsIPv6String(service.Spec.ClusterIP) - for _, nodeAddress := range node.Status.Addresses { - if strings.EqualFold(string(nodeAddress.Type), string(v1.NodeInternalIP)) && - utilnet.IsIPv6String(nodeAddress.Address) == isIPV6SVC { - klog.V(4).Infof("getNodePrivateIPAddress: node %s, ip %s", node.Name, nodeAddress.Address) - return nodeAddress.Address - } - } - - klog.Warningf("getNodePrivateIPAddress: empty ip found for node %s", node.Name) - return "" -} - -func getNodePrivateIPAddresses(node *v1.Node) []string { - addresses := make([]string, 0) - for _, nodeAddress := range node.Status.Addresses { - if strings.EqualFold(string(nodeAddress.Type), string(v1.NodeInternalIP)) { - addresses = append(addresses, nodeAddress.Address) - } - } - - return addresses -} diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_vmsets.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_vmsets.go index cea1dc5f8a01..09896b249398 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_vmsets.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_vmsets.go @@ -30,12 +30,10 @@ import ( azcache "sigs.k8s.io/cloud-provider-azure/pkg/cache" ) -//go:generate sh -c "mockgen -destination=$GOPATH/src/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_mock_vmsets.go -source=$GOPATH/src/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_vmsets.go -package=provider VMSet" - // VMSet defines functions all vmsets (including scale set and availability // set) should be implemented. // Don't forget to run the following command to generate the mock client: -// mockgen -destination=$GOPATH/src/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_mock_vmsets.go -source=$GOPATH/src/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_vmsets.go -package=provider VMSet +// mockgen -source=$GOPATH/src/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_vmsets.go -package=provider VMSet > $GOPATH/src/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_mock_vmsets_test.go type VMSet interface { // GetInstanceIDByNodeName gets the cloud provider ID by node name. // It must return ("", cloudprovider.InstanceNotFound) if the instance does @@ -61,15 +59,12 @@ type VMSet interface { // no loadbalancer mode annotation returns the primary VMSet. If service annotation // for loadbalancer exists then return the eligible VMSet. GetVMSetNames(service *v1.Service, nodes []*v1.Node) (availabilitySetNames *[]string, err error) - // GetNodeVMSetName returns the availability set or vmss name by the node name. - // It will return empty string when using standalone vms. - GetNodeVMSetName(node *v1.Node) (string, error) // EnsureHostsInPool ensures the given Node's primary IP configurations are // participating in the specified LoadBalancer Backend Pool. - EnsureHostsInPool(service *v1.Service, nodes []*v1.Node, backendPoolID string, vmSetName string) error + EnsureHostsInPool(service *v1.Service, nodes []*v1.Node, backendPoolID string, vmSetName string, isInternal bool) error // EnsureHostInPool ensures the given VM's Primary NIC's Primary IP Configuration is // participating in the specified LoadBalancer Backend Pool. - EnsureHostInPool(service *v1.Service, nodeName types.NodeName, backendPoolID string, vmSetName string) (string, string, string, *compute.VirtualMachineScaleSetVM, error) + EnsureHostInPool(service *v1.Service, nodeName types.NodeName, backendPoolID string, vmSetName string, isInternal bool) (string, string, string, *compute.VirtualMachineScaleSetVM, error) // EnsureBackendPoolDeleted ensures the loadBalancer backendAddressPools deleted from the specified nodes. EnsureBackendPoolDeleted(service *v1.Service, backendPoolID, vmSetName string, backendAddressPools *[]network.BackendAddressPool, deleteFromVMSet bool) error //EnsureBackendPoolDeletedFromVMSets ensures the loadBalancer backendAddressPools deleted from the specified VMSS/VMAS @@ -78,7 +73,7 @@ type VMSet interface { // AttachDisk attaches a disk to vm AttachDisk(nodeName types.NodeName, diskMap map[string]*AttachDiskOptions) (*azure.Future, error) // DetachDisk detaches a disk from vm - DetachDisk(nodeName types.NodeName, diskMap map[string]string) error + DetachDisk(nodeName types.NodeName, diskMap map[string]string) (*azure.Future, error) // WaitForUpdateResult waits for the response of the update request WaitForUpdateResult(ctx context.Context, future *azure.Future, resourceGroupName, source string) error diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_vmss.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_vmss.go index 0a14b870ca5a..58d1f4669937 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_vmss.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_vmss.go @@ -76,8 +76,6 @@ type ScaleSet struct { vmssCache *azcache.TimedCache vmssVMCache *sync.Map // [resourcegroup/vmssname]*azcache.TimedCache availabilitySetNodesCache *azcache.TimedCache - // lockMap in cache refresh - lockMap *lockMap } // newScaleSet creates a new ScaleSet. @@ -95,7 +93,6 @@ func newScaleSet(az *Cloud) (VMSet, error) { Cloud: az, availabilitySet: as, vmssVMCache: &sync.Map{}, - lockMap: newLockMap(), } if !ss.DisableAvailabilitySetNodes { @@ -186,16 +183,7 @@ func (ss *ScaleSet) getVmssVMByNodeIdentity(node *nodeIdentity, crt azcache.Azur } if !found { - // lock and try find nodeName from cache again, refresh cache if still not found - ss.lockMap.LockEntry(cacheKey) - defer ss.lockMap.UnlockEntry(cacheKey) - vmssName, instanceID, vm, found, err = getter(node.nodeName, crt) - if err == nil && found && vm != nil { - klog.V(2).Infof("found VMSS VM with nodeName %s after retry", node.nodeName) - return vmssName, instanceID, vm, nil - } - - klog.V(2).Infof("Couldn't find VMSS VM with nodeName %s, refreshing the cache(vmss: %s, rg: %s)", node.nodeName, node.vmssName, node.resourceGroup) + klog.V(2).Infof("Couldn't find VMSS VM with nodeName %s, refreshing the cache", node.nodeName) vmssName, instanceID, vm, found, err = getter(node.nodeName, azcache.CacheReadTypeForceRefresh) if err != nil { return "", "", nil, err @@ -966,7 +954,7 @@ func (ss *ScaleSet) getConfigForScaleSetByIPFamily(config *compute.VirtualMachin // EnsureHostInPool ensures the given VM's Primary NIC's Primary IP Configuration is // participating in the specified LoadBalancer Backend Pool, which returns (resourceGroup, vmasName, instanceID, vmssVM, error). -func (ss *ScaleSet) EnsureHostInPool(service *v1.Service, nodeName types.NodeName, backendPoolID string, vmSetNameOfLB string) (string, string, string, *compute.VirtualMachineScaleSetVM, error) { +func (ss *ScaleSet) EnsureHostInPool(service *v1.Service, nodeName types.NodeName, backendPoolID string, vmSetNameOfLB string, isInternal bool) (string, string, string, *compute.VirtualMachineScaleSetVM, error) { vmName := mapNodeNameToVMName(nodeName) ssName, instanceID, vm, err := ss.getVmssVM(vmName, azcache.CacheReadTypeDefault) if err != nil { @@ -1244,7 +1232,7 @@ func (ss *ScaleSet) ensureVMSSInPool(service *v1.Service, nodes []*v1.Node, back // EnsureHostsInPool ensures the given Node's primary IP configurations are // participating in the specified LoadBalancer Backend Pool. -func (ss *ScaleSet) EnsureHostsInPool(service *v1.Service, nodes []*v1.Node, backendPoolID string, vmSetNameOfLB string) error { +func (ss *ScaleSet) EnsureHostsInPool(service *v1.Service, nodes []*v1.Node, backendPoolID string, vmSetNameOfLB string, isInternal bool) error { mc := metrics.NewMetricContext("services", "vmss_ensure_hosts_in_pool", ss.ResourceGroup, ss.SubscriptionID, service.Name) isOperationSucceeded := false defer func() { @@ -1284,7 +1272,7 @@ func (ss *ScaleSet) EnsureHostsInPool(service *v1.Service, nodes []*v1.Node, bac // VMAS nodes should also be added to the SLB backends. if ss.useStandardLoadBalancer() { hostUpdates = append(hostUpdates, func() error { - _, _, _, _, err := ss.availabilitySet.EnsureHostInPool(service, types.NodeName(localNodeName), backendPoolID, vmSetNameOfLB) + _, _, _, _, err := ss.availabilitySet.EnsureHostInPool(service, types.NodeName(localNodeName), backendPoolID, vmSetNameOfLB, isInternal) return err }) continue @@ -1294,7 +1282,7 @@ func (ss *ScaleSet) EnsureHostsInPool(service *v1.Service, nodes []*v1.Node, bac continue } - nodeResourceGroup, nodeVMSS, nodeInstanceID, nodeVMSSVM, err := ss.EnsureHostInPool(service, types.NodeName(localNodeName), backendPoolID, vmSetNameOfLB) + nodeResourceGroup, nodeVMSS, nodeInstanceID, nodeVMSSVM, err := ss.EnsureHostInPool(service, types.NodeName(localNodeName), backendPoolID, vmSetNameOfLB, isInternal) if err != nil { klog.Errorf("EnsureHostInPool(%s): backendPoolID(%s) - failed to ensure host in pool: %q", getServiceName(service), backendPoolID, err) errors = append(errors, err) @@ -1330,7 +1318,7 @@ func (ss *ScaleSet) EnsureHostsInPool(service *v1.Service, nodes []*v1.Node, bac ctx, cancel := getContextWithCancel() defer cancel() klog.V(2).Infof("EnsureHostInPool begins to UpdateVMs for VMSS(%s, %s) with new backendPoolID %s", meta.resourceGroup, meta.vmssName, backendPoolID) - rerr := ss.VirtualMachineScaleSetVMsClient.UpdateVMs(ctx, meta.resourceGroup, meta.vmssName, update, "network_update", ss.getPutVMSSVMBatchSize()) + rerr := ss.VirtualMachineScaleSetVMsClient.UpdateVMs(ctx, meta.resourceGroup, meta.vmssName, update, "network_update") if rerr != nil { klog.Errorf("EnsureHostInPool UpdateVMs for VMSS(%s, %s) failed with error %v", meta.resourceGroup, meta.vmssName, rerr.Error()) return rerr.Error() @@ -1592,7 +1580,7 @@ func (ss *ScaleSet) EnsureBackendPoolDeleted(service *v1.Service, backendPoolID, ctx, cancel := getContextWithCancel() defer cancel() klog.V(2).Infof("EnsureBackendPoolDeleted begins to UpdateVMs for VMSS(%s, %s) with backendPoolID %s", meta.resourceGroup, meta.vmssName, backendPoolID) - rerr := ss.VirtualMachineScaleSetVMsClient.UpdateVMs(ctx, meta.resourceGroup, meta.vmssName, update, "network_update", ss.getPutVMSSVMBatchSize()) + rerr := ss.VirtualMachineScaleSetVMsClient.UpdateVMs(ctx, meta.resourceGroup, meta.vmssName, update, "network_update") if rerr != nil { klog.Errorf("EnsureBackendPoolDeleted UpdateVMs for VMSS(%s, %s) failed with error %v", meta.resourceGroup, meta.vmssName, rerr.Error()) return rerr.Error() @@ -1780,15 +1768,3 @@ func (ss *ScaleSet) GetAgentPoolVMSetNames(nodes []*v1.Node) (*[]string, error) return &vmSetNames, nil } - -func (ss *ScaleSet) GetNodeVMSetName(node *v1.Node) (string, error) { - providerID := node.Spec.ProviderID - _, vmssName, err := getVmssAndResourceGroupNameByVMProviderID(providerID) - if err != nil { - klog.Warningf("ss.GetNodeVMSetName: the provider ID %s of node %s does not match the format of a VMSS instance, assuming it is managed by an availability set", providerID, node.Name) - return ss.availabilitySet.GetNodeVMSetName(node) - } - - klog.V(4).Infof("ss.GetNodeVMSetName: found vmss name %s from node name %s", vmssName, node.Name) - return vmssName, nil -} diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_wrap.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_wrap.go index 32b6fed7233d..f9d279906a99 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_wrap.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_wrap.go @@ -80,10 +80,6 @@ func (az *Cloud) getVirtualMachine(nodeName types.NodeName, crt azcache.AzureCac } func (az *Cloud) getRouteTable(crt azcache.AzureCacheReadType) (routeTable network.RouteTable, exists bool, err error) { - if len(az.RouteTableName) == 0 { - return routeTable, false, fmt.Errorf("Route table name is not configured") - } - cachedRt, err := az.rtCache.Get(az.RouteTableName, crt) if err != nil { return routeTable, false, err diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_zones.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_zones.go index 52e178c0135b..9d69688d4d67 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_zones.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_zones.go @@ -143,13 +143,13 @@ func (az *Cloud) GetZoneID(zoneLabel string) string { // If the node is not running with availability zones, then it will fall back to fault domain. func (az *Cloud) GetZone(ctx context.Context) (cloudprovider.Zone, error) { if az.UseInstanceMetadata { - metadata, err := az.Metadata.GetMetadata(azcache.CacheReadTypeUnsafe) + metadata, err := az.metadata.GetMetadata(azcache.CacheReadTypeUnsafe) if err != nil { return cloudprovider.Zone{}, err } if metadata.Compute == nil { - _ = az.Metadata.imsCache.Delete(consts.MetadataCacheKey) + _ = az.metadata.imsCache.Delete(consts.MetadataCacheKey) return cloudprovider.Zone{}, fmt.Errorf("failure of getting compute information from instance metadata") } diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/doc.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/doc.go index fb46d8c807f6..26587698b0cb 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/doc.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/doc.go @@ -16,4 +16,4 @@ limitations under the License. // Package provider is an implementation of CloudProvider Interface, LoadBalancer // and Instances for Azure. -package provider // import "sigs.k8s.io/cloud-provider-azure/pkg/provider" +package provider // import "sigs.k8s.io/cloud-provider-azure/pkg/provider diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/json/go.mod b/cluster-autoscaler/vendor/sigs.k8s.io/json/go.mod index 6fad584a0c75..11cb4728ccee 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/json/go.mod +++ b/cluster-autoscaler/vendor/sigs.k8s.io/json/go.mod @@ -1,3 +1,3 @@ module sigs.k8s.io/json -go 1.17 +go 1.16 diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/json/internal/golang/encoding/json/decode.go b/cluster-autoscaler/vendor/sigs.k8s.io/json/internal/golang/encoding/json/decode.go index 3a8b64547da3..a047d981bfea 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/json/internal/golang/encoding/json/decode.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/json/internal/golang/encoding/json/decode.go @@ -234,7 +234,6 @@ type decodeState struct { savedStrictErrors []error seenStrictErrors map[string]struct{} - strictFieldStack []string caseSensitive bool @@ -262,8 +261,6 @@ func (d *decodeState) init(data []byte) *decodeState { // Reuse the allocated space for the FieldStack slice. d.errorContext.FieldStack = d.errorContext.FieldStack[:0] } - // Reuse the allocated space for the strict FieldStack slice. - d.strictFieldStack = d.strictFieldStack[:0] return d } @@ -558,12 +555,6 @@ func (d *decodeState) array(v reflect.Value) error { break } - origStrictFieldStackLen := len(d.strictFieldStack) - defer func() { - // Reset to original length and reuse the allocated space for the strict FieldStack slice. - d.strictFieldStack = d.strictFieldStack[:origStrictFieldStackLen] - }() - i := 0 for { // Look ahead for ] - can only happen on first iteration. @@ -589,7 +580,6 @@ func (d *decodeState) array(v reflect.Value) error { } } - d.appendStrictFieldStackIndex(i) if i < v.Len() { // Decode into element. if err := d.value(v.Index(i)); err != nil { @@ -601,8 +591,6 @@ func (d *decodeState) array(v reflect.Value) error { return err } } - // Reset to original length and reuse the allocated space for the strict FieldStack slice. - d.strictFieldStack = d.strictFieldStack[:origStrictFieldStackLen] i++ // Next token must be , or ]. @@ -695,7 +683,7 @@ func (d *decodeState) object(v reflect.Value) error { seenKeys = map[string]struct{}{} } if _, seen := seenKeys[fieldName]; seen { - d.saveStrictError(d.newFieldError("duplicate field", fieldName)) + d.saveStrictError(fmt.Errorf("duplicate field %q", fieldName)) } else { seenKeys[fieldName] = struct{}{} } @@ -711,7 +699,7 @@ func (d *decodeState) object(v reflect.Value) error { var seenKeys uint64 checkDuplicateField = func(fieldNameIndex int, fieldName string) { if seenKeys&(1< 0 { - return fmt.Errorf("%s %q", msg, strings.Join(d.strictFieldStack, "")+"."+field) - } else { - return fmt.Errorf("%s %q", msg, field) - } -} - // saveStrictError saves a strict decoding error, // for reporting at the end of the unmarshal if no other errors occurred. func (d *decodeState) saveStrictError(err error) { @@ -100,24 +90,6 @@ func (d *decodeState) saveStrictError(err error) { d.savedStrictErrors = append(d.savedStrictErrors, err) } -func (d *decodeState) appendStrictFieldStackKey(key string) { - if !d.disallowDuplicateFields && !d.disallowUnknownFields { - return - } - if len(d.strictFieldStack) > 0 { - d.strictFieldStack = append(d.strictFieldStack, ".", key) - } else { - d.strictFieldStack = append(d.strictFieldStack, key) - } -} - -func (d *decodeState) appendStrictFieldStackIndex(i int) { - if !d.disallowDuplicateFields && !d.disallowUnknownFields { - return - } - d.strictFieldStack = append(d.strictFieldStack, "[", strconv.Itoa(i), "]") -} - // UnmarshalStrictError holds errors resulting from use of strict disallow___ decoder directives. // If this is returned from Unmarshal(), it means the decoding was successful in all other respects. type UnmarshalStrictError struct { diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/structured-merge-diff/v4/typed/merge.go b/cluster-autoscaler/vendor/sigs.k8s.io/structured-merge-diff/v4/typed/merge.go index 75244ef64679..7e20f4083a72 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/structured-merge-diff/v4/typed/merge.go +++ b/cluster-autoscaler/vendor/sigs.k8s.io/structured-merge-diff/v4/typed/merge.go @@ -17,6 +17,8 @@ limitations under the License. package typed import ( + "math" + "sigs.k8s.io/structured-merge-diff/v4/fieldpath" "sigs.k8s.io/structured-merge-diff/v4/schema" "sigs.k8s.io/structured-merge-diff/v4/value" @@ -168,142 +170,86 @@ func (w *mergingWalker) visitListItems(t *schema.List, lhs, rhs value.List) (err if lhs != nil { lLen = lhs.Length() } - outLen := lLen - if outLen < rLen { - outLen = rLen - } - out := make([]interface{}, 0, outLen) - - rhsOrder, observedRHS, rhsErrs := w.indexListPathElements(t, rhs) - errs = append(errs, rhsErrs...) - lhsOrder, observedLHS, lhsErrs := w.indexListPathElements(t, lhs) - errs = append(errs, lhsErrs...) - - sharedOrder := make([]*fieldpath.PathElement, 0, rLen) - for i := range rhsOrder { - pe := &rhsOrder[i] - if _, ok := observedLHS.Get(*pe); ok { - sharedOrder = append(sharedOrder, pe) - } - } + out := make([]interface{}, 0, int(math.Max(float64(rLen), float64(lLen)))) - var nextShared *fieldpath.PathElement - if len(sharedOrder) > 0 { - nextShared = sharedOrder[0] - sharedOrder = sharedOrder[1:] - } + // TODO: ordering is totally wrong. + // TODO: might as well make the map order work the same way. - lLen, rLen = len(lhsOrder), len(rhsOrder) - for lI, rI := 0, 0; lI < lLen || rI < rLen; { - if lI < lLen && rI < rLen { - pe := lhsOrder[lI] - if pe.Equals(rhsOrder[rI]) { - // merge LHS & RHS items - lChild, _ := observedLHS.Get(pe) - rChild, _ := observedRHS.Get(pe) - mergeOut, errs := w.mergeListItem(t, pe, lChild, rChild) - errs = append(errs, errs...) - if mergeOut != nil { - out = append(out, *mergeOut) - } - lI++ - rI++ - - nextShared = nil - if len(sharedOrder) > 0 { - nextShared = sharedOrder[0] - sharedOrder = sharedOrder[1:] - } + // This is a cheap hack to at least make the output order stable. + rhsOrder := make([]fieldpath.PathElement, 0, rLen) + + // First, collect all RHS children. + observedRHS := fieldpath.MakePathElementValueMap(rLen) + if rhs != nil { + for i := 0; i < rhs.Length(); i++ { + child := rhs.At(i) + pe, err := listItemToPathElement(w.allocator, w.schema, t, i, child) + if err != nil { + errs = append(errs, errorf("rhs: element %v: %v", i, err.Error())...) + // If we can't construct the path element, we can't + // even report errors deeper in the schema, so bail on + // this element. continue } - if _, ok := observedRHS.Get(pe); ok && nextShared != nil && !nextShared.Equals(lhsOrder[lI]) { - // shared item, but not the one we want in this round - lI++ - continue + if _, ok := observedRHS.Get(pe); ok { + errs = append(errs, errorf("rhs: duplicate entries for key %v", pe.String())...) } + observedRHS.Insert(pe, child) + rhsOrder = append(rhsOrder, pe) } - if lI < lLen { - pe := lhsOrder[lI] - if _, ok := observedRHS.Get(pe); !ok { - // take LHS item - lChild, _ := observedLHS.Get(pe) - mergeOut, errs := w.mergeListItem(t, pe, lChild, nil) - errs = append(errs, errs...) - if mergeOut != nil { - out = append(out, *mergeOut) - } - lI++ + } + + // Then merge with LHS children. + observedLHS := fieldpath.MakePathElementSet(lLen) + if lhs != nil { + for i := 0; i < lhs.Length(); i++ { + child := lhs.At(i) + pe, err := listItemToPathElement(w.allocator, w.schema, t, i, child) + if err != nil { + errs = append(errs, errorf("lhs: element %v: %v", i, err.Error())...) + // If we can't construct the path element, we can't + // even report errors deeper in the schema, so bail on + // this element. continue } - } - if rI < rLen { - // Take the RHS item, merge with matching LHS item if possible - pe := rhsOrder[rI] - lChild, _ := observedLHS.Get(pe) // may be nil - rChild, _ := observedRHS.Get(pe) - mergeOut, errs := w.mergeListItem(t, pe, lChild, rChild) - errs = append(errs, errs...) - if mergeOut != nil { - out = append(out, *mergeOut) + if observedLHS.Has(pe) { + errs = append(errs, errorf("lhs: duplicate entries for key %v", pe.String())...) + continue } - rI++ - // Advance nextShared, if we are merging nextShared. - if nextShared != nil && nextShared.Equals(pe) { - nextShared = nil - if len(sharedOrder) > 0 { - nextShared = sharedOrder[0] - sharedOrder = sharedOrder[1:] - } + observedLHS.Insert(pe) + w2 := w.prepareDescent(pe, t.ElementType) + w2.lhs = value.Value(child) + if rchild, ok := observedRHS.Get(pe); ok { + w2.rhs = rchild } + errs = append(errs, w2.merge(pe.String)...) + if w2.out != nil { + out = append(out, *w2.out) + } + w.finishDescent(w2) } } - if len(out) > 0 { - i := interface{}(out) - w.out = &i - } - - return errs -} - -func (w *mergingWalker) indexListPathElements(t *schema.List, list value.List) ([]fieldpath.PathElement, fieldpath.PathElementValueMap, ValidationErrors) { - var errs ValidationErrors - length := 0 - if list != nil { - length = list.Length() - } - observed := fieldpath.MakePathElementValueMap(length) - pes := make([]fieldpath.PathElement, 0, length) - for i := 0; i < length; i++ { - child := list.At(i) - pe, err := listItemToPathElement(w.allocator, w.schema, t, i, child) - if err != nil { - errs = append(errs, errorf("element %v: %v", i, err.Error())...) - // If we can't construct the path element, we can't - // even report errors deeper in the schema, so bail on - // this element. + for _, pe := range rhsOrder { + if observedLHS.Has(pe) { continue } - if _, found := observed.Get(pe); found { - errs = append(errs, errorf("duplicate entries for key %v", pe.String())...) - continue + value, _ := observedRHS.Get(pe) + w2 := w.prepareDescent(pe, t.ElementType) + w2.rhs = value + errs = append(errs, w2.merge(pe.String)...) + if w2.out != nil { + out = append(out, *w2.out) } - observed.Insert(pe, child) - pes = append(pes, pe) + w.finishDescent(w2) } - return pes, observed, errs -} -func (w *mergingWalker) mergeListItem(t *schema.List, pe fieldpath.PathElement, lChild, rChild value.Value) (out *interface{}, errs ValidationErrors) { - w2 := w.prepareDescent(pe, t.ElementType) - w2.lhs = lChild - w2.rhs = rChild - errs = append(errs, w2.merge(pe.String)...) - if w2.out != nil { - out = w2.out + if len(out) > 0 { + i := interface{}(out) + w.out = &i } - w.finishDescent(w2) - return + + return errs } func (w *mergingWalker) derefList(prefix string, v value.Value) (value.List, ValidationErrors) { diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/yaml/.gitignore b/cluster-autoscaler/vendor/sigs.k8s.io/yaml/.gitignore index 2dc92904ef56..e256a31e00a5 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/yaml/.gitignore +++ b/cluster-autoscaler/vendor/sigs.k8s.io/yaml/.gitignore @@ -6,10 +6,6 @@ .project .settings/** -# Idea files -.idea/** -.idea/ - # Emacs save files *~ diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/yaml/.travis.yml b/cluster-autoscaler/vendor/sigs.k8s.io/yaml/.travis.yml index 54ed8f9cb969..d20e23eff439 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/yaml/.travis.yml +++ b/cluster-autoscaler/vendor/sigs.k8s.io/yaml/.travis.yml @@ -1,7 +1,8 @@ language: go -arch: arm64 -dist: focal -go: 1.15.x +dist: xenial +go: + - 1.12.x + - 1.13.x script: - diff -u <(echo -n) <(gofmt -d *.go) - diff -u <(echo -n) <(golint $(go list -e ./...) | grep -v YAMLToJSON) diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/yaml/README.md b/cluster-autoscaler/vendor/sigs.k8s.io/yaml/README.md index e81cc426be6e..5a651d91633a 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/yaml/README.md +++ b/cluster-autoscaler/vendor/sigs.k8s.io/yaml/README.md @@ -107,8 +107,8 @@ func main() { } fmt.Println(string(y)) /* Output: - age: 30 name: John + age: 30 */ j2, err := yaml.YAMLToJSON(y) if err != nil { diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/yaml/go.mod b/cluster-autoscaler/vendor/sigs.k8s.io/yaml/go.mod index 818bbb51937d..7224f34971cc 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/yaml/go.mod +++ b/cluster-autoscaler/vendor/sigs.k8s.io/yaml/go.mod @@ -4,5 +4,5 @@ go 1.12 require ( github.com/davecgh/go-spew v1.1.1 - gopkg.in/yaml.v2 v2.4.0 + gopkg.in/yaml.v2 v2.2.8 ) diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/yaml/go.sum b/cluster-autoscaler/vendor/sigs.k8s.io/yaml/go.sum index b7b8cbb104fa..76e49483af48 100644 --- a/cluster-autoscaler/vendor/sigs.k8s.io/yaml/go.sum +++ b/cluster-autoscaler/vendor/sigs.k8s.io/yaml/go.sum @@ -1,6 +1,9 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo= +gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vertical-pod-autoscaler/e2e/go.sum b/vertical-pod-autoscaler/e2e/go.sum index 749517932304..821b6eae8cb9 100644 --- a/vertical-pod-autoscaler/e2e/go.sum +++ b/vertical-pod-autoscaler/e2e/go.sum @@ -73,7 +73,9 @@ github.com/Microsoft/hcsshim v0.8.22/go.mod h1:91uVCVzvX2QD16sMCenoxxXo6L1wJnLMX github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -187,6 +189,7 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/euank/go-kmsg-parser v2.0.0+incompatible/go.mod h1:MhmAMZ8V4CYH4ybgdRwPr2TU5ThnS43puaKEMpja1uw= +github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -207,6 +210,7 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= @@ -224,10 +228,14 @@ github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTg github.com/go-logr/logr v1.2.0 h1:QK40JKJyMdUDz+h+xvCsru/bJhvG0UxvePV0ufL/AcE= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= +github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-ozzo/ozzo-validation v3.5.0+incompatible/go.mod h1:gsEKFIVnabGBt6mXmxK0MoFy+cZoTJY6mu5Ll3LVLBU= @@ -243,6 +251,7 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -257,6 +266,7 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -319,6 +329,8 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= @@ -375,6 +387,7 @@ github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUB github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -409,6 +422,7 @@ github.com/lpabon/godbc v0.1.1/go.mod h1:Jo9QV0cf3U6jZABgiJ2skINAXb9j8m51r07g4KI github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= @@ -708,6 +722,7 @@ golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hM golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -728,6 +743,7 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -786,6 +802,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -865,6 +882,7 @@ golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -884,6 +902,7 @@ golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1137,10 +1156,13 @@ k8s.io/component-helpers v0.23.5/go.mod h1:5riXJgjTIs+ZB8xnf5M2anZ8iQuq37a0B/0Bg k8s.io/controller-manager v0.23.5/go.mod h1:n/KRlUzAtkFcZodZ/w0GlQdmErVKh7lS/wS0bbo7W4I= k8s.io/cri-api v0.23.6-rc.0/go.mod h1:REJE3PSU0h/LOV1APBrupxrEJqnoxZC8KWzkBUHwrK4= k8s.io/csi-translation-lib v0.23.5/go.mod h1:8RyFkoHAJrFU7c7MN1ZUjctm3ZhHclKm1FIHNSyGcuw= +k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/klog v0.3.0 h1:0VPpR+sizsiivjIfIAQH/rl8tan6jvWkS7lU+0di3lE= +k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= +k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= @@ -1149,6 +1171,7 @@ k8s.io/klog/v2 v2.30.0 h1:bUO6drIvCIsvZ/XFgfxoGFQU/a4Qkh0iAlvUR7vlHJw= k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-aggregator v0.23.5/go.mod h1:3ynYx07Co6dzjpKPgipM+1/Mt2Jcm7dY++cRlKLr5s8= k8s.io/kube-controller-manager v0.23.5/go.mod h1:Pkg5lIk9YG9Qjj4F7Dn0gi6/k8cEYP63oLdgrlrrtu4= +k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= @@ -1189,8 +1212,11 @@ sigs.k8s.io/kustomize/api v0.10.1/go.mod h1:2FigT1QN6xKdcnGS2Ppp1uIWrtWN28Ms8A3O sigs.k8s.io/kustomize/cmd/config v0.10.2/go.mod h1:K2aW7nXJ0AaT+VA/eO0/dzFLxmpFcTzudmAgDwPY1HQ= sigs.k8s.io/kustomize/kustomize/v4 v4.4.1/go.mod h1:qOKJMMz2mBP+vcS7vK+mNz4HBLjaQSWRY22EF6Tb7Io= sigs.k8s.io/kustomize/kyaml v0.13.0/go.mod h1:FTJxEZ86ScK184NpGSAQcfEqee0nul8oLCK30D47m4E= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=