diff --git a/aio/scripts/conf.sh b/aio/scripts/conf.sh index d8ddee2d91ce..d0cd2f7e64c8 100644 --- a/aio/scripts/conf.sh +++ b/aio/scripts/conf.sh @@ -43,7 +43,7 @@ HEAPSTER_VERSION="v1.5.4" HEAPSTER_PORT=8082 KIND_VERSION="v0.5.1" KIND_BIN=${CACHE_DIR}/kind-${KIND_VERSION} -CODEGEN_VERSION="v0.17.3" +CODEGEN_VERSION="v0.18.0" CODEGEN_BIN=${GOPATH}/pkg/mod/k8s.io/code-generator@${CODEGEN_VERSION}/generate-groups.sh # Setup logger. diff --git a/go.mod b/go.mod index 8c840581b473..ea0acea1b782 100644 --- a/go.mod +++ b/go.mod @@ -4,20 +4,20 @@ go 1.13 require ( github.com/docker/distribution v2.7.1+incompatible - github.com/emicklei/go-restful v2.11.2+incompatible + github.com/emicklei/go-restful v2.12.0+incompatible github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b github.com/igm/sockjs-go v2.0.1+incompatible // indirect github.com/opencontainers/go-digest v1.0.0-rc1 // indirect - github.com/prometheus/client_golang v1.4.1 + github.com/prometheus/client_golang v1.5.1 github.com/spf13/pflag v1.0.5 - golang.org/x/net v0.0.0-20200202094626-16171245cfb2 + golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e golang.org/x/text v0.3.2 gopkg.in/igm/sockjs-go.v2 v2.0.1 gopkg.in/square/go-jose.v2 v2.4.1 gopkg.in/yaml.v2 v2.2.8 - k8s.io/api v0.17.3 - k8s.io/apiextensions-apiserver v0.17.3 - k8s.io/apimachinery v0.17.3 - k8s.io/client-go v0.17.3 + k8s.io/api v0.18.0 + k8s.io/apiextensions-apiserver v0.18.0 + k8s.io/apimachinery v0.18.0 + k8s.io/client-go v0.18.0 k8s.io/heapster v1.5.4 ) diff --git a/go.sum b/go.sum index f1196da86b89..ca5ec8186c26 100644 --- a/go.sum +++ b/go.sum @@ -10,7 +10,7 @@ github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxB github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= 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/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46 h1:lsxEuwrXEAokXB9qhlbKWPpo3KMLZQ5WB5WLQRW1uq0= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= @@ -27,29 +27,35 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +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/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 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/blang/semver v3.5.0+incompatible h1:CGxCgetQ64DKk7rdZ++Vfnb1+ogGNnB17OJKJXD2Cfs= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= 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/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/coreos/etcd v3.3.10+incompatible h1:jFneRYjIvLMLhDLCzuTuU4rSJUjRplcJQ7pD7MnhC04= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea h1:n2Ltr3SrfQlf/9nOna1DoGKxLx3qTSI8Ttl6Xrqp6mw= github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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= @@ -63,12 +69,14 @@ github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96 h1:cenwrSVm+Z7QL github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e h1:p1yVGRW3nmb85p1Sh1ZJSDm4A4iKLS5QNbvUHMgGu/M= -github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.11.2+incompatible h1:Z4Z0K2AuOw+QtgwkkJnwpT165MBr12qS8rnBwjP/Pzs= -github.com/emicklei/go-restful v2.11.2+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.12.0+incompatible h1:SIvoTSbsMEwuM3dzFirLwKc4BH6VXP5CNf+G1FfJVr4= +github.com/emicklei/go-restful v2.12.0+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.2.0+incompatible h1:fUDGZCv/7iAN7u0puUVhvKCcsR6vRfwrJatElLBEf0I= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -87,9 +95,11 @@ github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70t github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.5 h1:8b2ZgKfKIUTVQpTb77MoRDIMEIwvDVw40o3aOXdfYzI= github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.19.2 h1:a2kIyV3w+OS3S97zxUndRVD46+FhGOUBDFY7nmu4CsY= github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= @@ -107,9 +117,11 @@ github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= +github.com/go-openapi/loads v0.19.4 h1:5I4CCSqoWzT+82bBkNIvmLc0UOsoKKQ4Fz+3VxOB7SY= github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= +github.com/go-openapi/runtime v0.19.4 h1:csnOgcgAiuGoM/Po7PEpKDoNulCcF3FGbSnbHfxgjMI= github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= @@ -120,6 +132,7 @@ github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8 github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= +github.com/go-openapi/strfmt v0.19.3 h1:eRfyY5SkaNJCAwmmMcADjY31ow9+N7MCLW7oRkbsINA= github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= @@ -129,12 +142,14 @@ github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tF github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= +github.com/go-openapi/validate v0.19.5 h1:QhCBKRYqZR+SKo4gl1lPhPahope8/RLt6EVgY8X80w0= github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d h1:3PaI8p3seN09VjbTYC/QWlUZdZ1qS1zGjy7LH2Wt07I= -github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903 h1:LbsanbbD6LieFkXbj9YNNBupiGHJgFeLpO0j0Fza1h8= @@ -153,23 +168,25 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw 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= -github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= -github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +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/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/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/gnostic v0.0.0-20170729233727-0c5108395e2d h1:7XGaL1e6bYS1yIonGp9761ExpPPV1ui0SAC59Yube9k= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.1.0 h1:rVsPeBmXbYv4If/cumu1AzZPwV58q433hvONV1UEZoI= +github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -182,9 +199,9 @@ github.com/igm/sockjs-go v2.0.1+incompatible h1:iyv0auU1Xh1KC8N+GIiLPa3zZXwRsfRZ github.com/igm/sockjs-go v2.0.1+incompatible/go.mod h1:Yu6pvqjNniWNJe07LPObeCG6R77Qc97C6Kss0roF8tU= github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -217,23 +234,24 @@ github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzp github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= 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= -github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= +github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= @@ -243,17 +261,18 @@ github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtP github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= 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 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 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/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.4.1 h1:FFSuS004yOQEtDdTq+TAOLP5xUq63KqAFYyOi8zA+Y8= -github.com/prometheus/client_golang v1.4.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.5.1 h1:bdHYieyGlH+6OLEk2YQha8THib30KP0/yD0YH9m6xcA= +github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= 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= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -263,7 +282,6 @@ github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= @@ -274,6 +292,7 @@ github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -285,7 +304,6 @@ github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM 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= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 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 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= @@ -298,13 +316,18 @@ github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738 h1:VcrIfasaLFkyjk6KNlXQSzO+B0fZcnECiDrKJsfxka0= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.2 h1:jxcFYjlkl8xaERsgLo+RNquI0epW6zuy/ZRQs6jnrFA= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -313,17 +336,13 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586 h1:7KByu05hhLed2MO29w7p1XfZvZ13m8mub3shuVftRs0= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 h1:/Tl7pH94bvbAAHBdZJT947M/+gp0+CqQXDtMRC0fseo= +golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/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-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= 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/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= 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= @@ -341,8 +360,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/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-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 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 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= @@ -352,6 +371,7 @@ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJ 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 h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/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-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -362,14 +382,16 @@ golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/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-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82 h1:ywK/j/KkyTHcdyYSZNXGjMwgmDSfjglYZ3vStQ/gSCU= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/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= @@ -385,10 +407,8 @@ golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGm 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-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/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-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= @@ -398,10 +418,6 @@ golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 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= -gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485 h1:OB/uP/Puiu5vS5QMRPrXCDWUPb+kt8f1KW8oQzFejQw= -gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0= -gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= 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= @@ -410,9 +426,13 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 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-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -425,6 +445,7 @@ gopkg.in/igm/sockjs-go.v2 v2.0.1 h1:TJr+r4W3oNGANvL5UEH4bIemyXL84+qlO2HIJDOyLGk= gopkg.in/igm/sockjs-go.v2 v2.0.1/go.mod h1:xvdpHZ3OpjP0TzQzl+174DglrrnYZKVd6qHPIX20Z1Q= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +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= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= @@ -443,37 +464,38 @@ gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81 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-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/api v0.17.3 h1:XAm3PZp3wnEdzekNkcmj/9Y1zdmQYJ1I4GKSBBZ8aG0= -k8s.io/api v0.17.3/go.mod h1:YZ0OTkuw7ipbe305fMpIdf3GLXZKRigjtZaV5gzC2J0= -k8s.io/apiextensions-apiserver v0.17.3 h1:WDZWkPcbgvchEdDd7ysL21GGPx3UKZQLDZXEkevT6n4= -k8s.io/apiextensions-apiserver v0.17.3/go.mod h1:CJbCyMfkKftAd/X/V6OTHYhVn7zXnDdnkUjS1h0GTeY= -k8s.io/apimachinery v0.17.3 h1:f+uZV6rm4/tHE7xXgLyToprg6xWairaClGVkm2t8omg= -k8s.io/apimachinery v0.17.3/go.mod h1:gxLnyZcGNdZTCLnq3fgzyg2A5BVCHTNDFrw8AmuJ+0g= -k8s.io/apiserver v0.17.3/go.mod h1:iJtsPpu1ZpEnHaNawpSV0nYTGBhhX2dUlnn7/QS7QiY= -k8s.io/client-go v0.17.3 h1:deUna1Ksx05XeESH6XGCyONNFfiQmDdqeqUvicvP6nU= -k8s.io/client-go v0.17.3/go.mod h1:cLXlTMtWHkuK4tD360KpWz2gG2KtdWEr/OT02i3emRQ= -k8s.io/code-generator v0.17.3 h1:q/hDMk2cvFzSxol7k/VA1qCssR7VSMXHQHhzuX29VJ8= -k8s.io/code-generator v0.17.3/go.mod h1:l8BLVwASXQZTo2xamW5mQNFCe1XPiAesVq7Y1t7PiQQ= -k8s.io/component-base v0.17.3/go.mod h1:GeQf4BrgelWm64PXkIXiPh/XS0hnO42d9gx9BtbZRp8= +k8s.io/api v0.18.0 h1:lwYk8Vt7rsVTwjRU6pzEsa9YNhThbmbocQlKvNBB4EQ= +k8s.io/api v0.18.0/go.mod h1:q2HRQkfDzHMBZL9l/y9rH63PkQl4vae0xRT+8prbrK8= +k8s.io/apiextensions-apiserver v0.18.0 h1:HN4/P8vpGZFvB5SOMuPPH2Wt9Y/ryX+KRvIyAkchu1Q= +k8s.io/apiextensions-apiserver v0.18.0/go.mod h1:18Cwn1Xws4xnWQNC00FLq1E350b9lUF+aOdIWDOZxgo= +k8s.io/apimachinery v0.18.0 h1:fuPfYpk3cs1Okp/515pAf0dNhL66+8zk8RLbSX+EgAE= +k8s.io/apimachinery v0.18.0/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= +k8s.io/apiserver v0.18.0 h1:ELAWpGWC6XdbRLi5lwAbEbvksD7hkXxPdxaJsdpist4= +k8s.io/apiserver v0.18.0/go.mod h1:3S2O6FeBBd6XTo0njUrLxiqk8GNy6wWOftjhJcXYnjw= +k8s.io/client-go v0.18.0 h1:yqKw4cTUQraZK3fcVCMeSa+lqKwcjZ5wtcOIPnxQno4= +k8s.io/client-go v0.18.0/go.mod h1:uQSYDYs4WhVZ9i6AIoEZuwUggLVEF64HOD37boKAtF8= +k8s.io/code-generator v0.18.0 h1:0xIRWzym+qMgVpGmLESDeMfz/orwgxwxFFAo1xfGNtQ= +k8s.io/code-generator v0.18.0/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= +k8s.io/component-base v0.18.0 h1:I+lP0fNfsEdTDpHaL61bCAqTZLoiWjEEP304Mo5ZQgE= +k8s.io/component-base v0.18.0/go.mod h1:u3BCg0z1uskkzrnAKFzulmYaEpZF7XC9Pf/uFyb1v2c= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20190822140433-26a664648505 h1:ZY6yclUKVbZ+SdWnkfY+Je5vrMpKOxmGeKRbsXVmqYM= -k8s.io/gengo v0.0.0-20190822140433-26a664648505/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20200114144118-36b2048a9120 h1:RPscN6KhmG54S33L+lr3GS+oD1jmchIU0ll519K6FA4= +k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/heapster v1.5.4 h1:lH2GCZdqRmUKDoyqRgiXbRmIcevaPYTvkguOuYUl8gQ= k8s.io/heapster v1.5.4/go.mod h1:h1uhptVXMwC8xtZBYsPXKVi8fpdlYkTs6k949KozGrM= 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/kube-openapi v0.0.0-20191107075043-30be4d16710a h1:UcxjrRMyNx/i/y8G7kPvLyy7rfbeuf1PYyBf973pgyU= -k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= -k8s.io/utils v0.0.0-20191114184206-e782cd3c129f h1:GiPwtSzdP43eI1hpPCbROQCCIgCuiMMNF8YUVLF3vJo= -k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -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= -modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= -modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= -sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= -sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06/go.mod h1:/ULNhyfzRopfcjskuui0cTITekDduZ7ycKN3oUT9R18= -sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= +k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c h1:/KUFqjjqAcY4Us6luF5RDNZ16KJtb49HfR3ZHB9qYXM= +k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= +k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 h1:d4vVOjXm687F1iLSP2q3lyPPuyvTUt3aVoBpi2DqRsU= +k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7 h1:uuHDyjllyzRyCIvvn0OBjiRB0SgBZGqHNYAmjR7fO50= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= +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 h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJYFZUiaOp8E= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= 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= diff --git a/src/app/backend/client/csrf/manager.go b/src/app/backend/client/csrf/manager.go index a759737d68b7..f1d61fb7114e 100644 --- a/src/app/backend/client/csrf/manager.go +++ b/src/app/backend/client/csrf/manager.go @@ -15,6 +15,7 @@ package csrf import ( + "context" "log" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -34,7 +35,7 @@ func (self *csrfTokenManager) init() { log.Printf("Initializing csrf token from %s secret", api.CsrfTokenSecretName) tokenSecret, err := self.client.CoreV1(). Secrets(args.Holder.GetNamespace()). - Get(api.CsrfTokenSecretName, v1.GetOptions{}) + Get(context.TODO(), api.CsrfTokenSecretName, v1.GetOptions{}) if err != nil { panic(err) @@ -45,7 +46,7 @@ func (self *csrfTokenManager) init() { log.Printf("Empty token. Generating and storing in a secret %s", api.CsrfTokenSecretName) token = api.GenerateCSRFKey() tokenSecret.StringData = map[string]string{api.CsrfTokenSecretData: token} - _, err := self.client.CoreV1().Secrets(args.Holder.GetNamespace()).Update(tokenSecret) + _, err := self.client.CoreV1().Secrets(args.Holder.GetNamespace()).Update(context.TODO(), tokenSecret, v1.UpdateOptions{}) if err != nil { panic(err) } diff --git a/src/app/backend/client/manager.go b/src/app/backend/client/manager.go index c99b3eae4337..bbc863923274 100644 --- a/src/app/backend/client/manager.go +++ b/src/app/backend/client/manager.go @@ -15,12 +15,14 @@ package client import ( + "context" "log" "strings" "github.com/emicklei/go-restful" v1 "k8s.io/api/authorization/v1" apiextensionsclientset "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" + metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" @@ -189,7 +191,7 @@ func (self *clientManager) CanI(req *restful.Request, ssar *v1.SelfSubjectAccess return false } - response, err := client.AuthorizationV1().SelfSubjectAccessReviews().Create(ssar) + response, err := client.AuthorizationV1().SelfSubjectAccessReviews().Create(context.TODO(), ssar, metaV1.CreateOptions{}) if err != nil { log.Println(err) return false diff --git a/src/app/backend/client/verber.go b/src/app/backend/client/verber.go index 858a50773d13..96c09c7793df 100644 --- a/src/app/backend/client/verber.go +++ b/src/app/backend/client/verber.go @@ -15,6 +15,7 @@ package client import ( + "context" "fmt" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" @@ -118,7 +119,7 @@ func (verber *resourceVerber) getCRDGroupAndVersion(kind string) (info crdInfo, var crdv1 apiextensionsv1.CustomResourceDefinition var crdv1beta1 apiextensionsv1beta1.CustomResourceDefinition - err = verber.apiExtensionsClient.Get().Resource("customresourcedefinitions").Name(kind).Do().Into(&crdv1) + err = verber.apiExtensionsClient.Get().Resource("customresourcedefinitions").Name(kind).Do(context.TODO()).Into(&crdv1) if err != nil { if errors.IsNotFoundError(err) { return info, errors.NewInvalid(fmt.Sprintf("Unknown resource kind: %s", kind)) @@ -136,7 +137,7 @@ func (verber *resourceVerber) getCRDGroupAndVersion(kind string) (info crdInfo, return } - err = verber.apiExtensionsClient.Get().Resource("customresourcedefinitions").Name(kind).Do().Into(&crdv1beta1) + err = verber.apiExtensionsClient.Get().Resource("customresourcedefinitions").Name(kind).Do(context.TODO()).Into(&crdv1beta1) if err != nil { if errors.IsNotFoundError(err) { return info, errors.NewInvalid(fmt.Sprintf("Unknown resource kind: %s", kind)) @@ -187,7 +188,7 @@ func (verber *resourceVerber) Delete(kind string, namespaceSet bool, namespace s req.Namespace(namespace) } - return req.Do().Error() + return req.Do(context.TODO()).Error() } // Put puts new resource version of the given kind in the given namespace with the given name. @@ -209,7 +210,7 @@ func (verber *resourceVerber) Put(kind string, namespaceSet bool, namespace stri req.Namespace(namespace) } - return req.Do().Error() + return req.Do(context.TODO()).Error() } // Get gets the resource of the given kind in the given namespace with the given name. @@ -226,6 +227,6 @@ func (verber *resourceVerber) Get(kind string, namespaceSet bool, namespace stri req.Namespace(namespace) } - err = req.Do().Into(result) + err = req.Do(context.TODO()).Into(result) return result, err } diff --git a/src/app/backend/integration/metric/heapster/client.go b/src/app/backend/integration/metric/heapster/client.go index f381425633ed..cbe60324d501 100644 --- a/src/app/backend/integration/metric/heapster/client.go +++ b/src/app/backend/integration/metric/heapster/client.go @@ -15,6 +15,7 @@ package heapster import ( + "context" "encoding/json" "fmt" "log" @@ -222,7 +223,7 @@ func (self heapsterClient) allInOneDownload(selector heapsterSelector, metricNam // unmarshalType performs heapster GET request to the specifies path and transfers // the data to the interface provided. func (self heapsterClient) unmarshalType(path string, v interface{}) error { - rawData, err := self.client.Get("/model/" + path).DoRaw() + rawData, err := self.client.Get("/model/" + path).DoRaw(context.TODO()) if err != nil { return err } diff --git a/src/app/backend/integration/metric/heapster/client_test.go b/src/app/backend/integration/metric/heapster/client_test.go index a89c89ae1ca5..bfdb88c85d09 100644 --- a/src/app/backend/integration/metric/heapster/client_test.go +++ b/src/app/backend/integration/metric/heapster/client_test.go @@ -15,6 +15,7 @@ package heapster import ( + "context" "encoding/json" "fmt" "log" @@ -90,7 +91,7 @@ func (self FakeHeapster) ID() integrationapi.IntegrationID { return "fakeHeapster" } -func (self FakeRequest) DoRaw() ([]byte, error) { +func (self FakeRequest) DoRaw(ctx context.Context) ([]byte, error) { _NumRequests.increment() log.Println("Performing req...") path := self.Path diff --git a/src/app/backend/integration/metric/heapster/restclient.go b/src/app/backend/integration/metric/heapster/restclient.go index 9adc531f207b..7a142b646987 100644 --- a/src/app/backend/integration/metric/heapster/restclient.go +++ b/src/app/backend/integration/metric/heapster/restclient.go @@ -15,6 +15,8 @@ package heapster import ( + "context" + "k8s.io/client-go/rest" ) @@ -30,7 +32,7 @@ type HeapsterRESTClient interface { // RequestInterface is an interface that allows to make operations on pure request object. // Separation is done to allow testing. type RequestInterface interface { - DoRaw() ([]byte, error) + DoRaw(context.Context) ([]byte, error) AbsPath(segments ...string) *rest.Request } @@ -59,7 +61,7 @@ func (self inClusterHeapsterClient) HealthCheck() error { Name("heapster"). SubResource("proxy"). Suffix("/healthz"). - DoRaw() + DoRaw(context.TODO()) return err } @@ -77,6 +79,6 @@ func (c remoteHeapsterClient) Get(path string) RequestInterface { // HealthCheck does a health check of the application. // Returns nil if connection to application can be established, error object otherwise. func (self remoteHeapsterClient) HealthCheck() error { - _, err := self.Get("healthz").AbsPath("/").DoRaw() + _, err := self.Get("healthz").AbsPath("/").DoRaw(context.TODO()) return err } diff --git a/src/app/backend/integration/metric/sidecar/client.go b/src/app/backend/integration/metric/sidecar/client.go index 19da7fa0b697..8925a317cbc2 100644 --- a/src/app/backend/integration/metric/sidecar/client.go +++ b/src/app/backend/integration/metric/sidecar/client.go @@ -15,6 +15,7 @@ package sidecar import ( + "context" "encoding/json" "errors" "fmt" @@ -249,7 +250,7 @@ func (self sidecarClient) allInOneDownload(selector sidecarSelector, metricName // unmarshalType performs sidecar GET request to the specifies path and transfers // the data to the interface provided. func (self sidecarClient) unmarshalType(path string, v interface{}) error { - rawData, err := self.client.Get("/api/v1/dashboard/" + path).DoRaw() + rawData, err := self.client.Get("/api/v1/dashboard/" + path).DoRaw(context.TODO()) if err != nil { return err } diff --git a/src/app/backend/integration/metric/sidecar/client_test.go b/src/app/backend/integration/metric/sidecar/client_test.go index eda26f4eaafb..310aa51f8520 100644 --- a/src/app/backend/integration/metric/sidecar/client_test.go +++ b/src/app/backend/integration/metric/sidecar/client_test.go @@ -15,6 +15,7 @@ package sidecar import ( + "context" "encoding/json" "fmt" "log" @@ -89,7 +90,7 @@ func (self FakeSidecar) ID() integrationapi.IntegrationID { return "fakeSidecar" } -func (self FakeRequest) DoRaw() ([]byte, error) { +func (self FakeRequest) DoRaw(ctx context.Context) ([]byte, error) { _NumRequests.increment() log.Println("Performing req...") path := self.Path diff --git a/src/app/backend/integration/metric/sidecar/restclient.go b/src/app/backend/integration/metric/sidecar/restclient.go index 3f5d4ffc8fe9..96ccfa0f698d 100644 --- a/src/app/backend/integration/metric/sidecar/restclient.go +++ b/src/app/backend/integration/metric/sidecar/restclient.go @@ -15,6 +15,8 @@ package sidecar import ( + "context" + "github.com/kubernetes/dashboard/src/app/backend/args" "k8s.io/client-go/rest" ) @@ -31,7 +33,7 @@ type SidecarRESTClient interface { // RequestInterface is an interface that allows to make operations on pure request object. // Separation is done to allow testing. type RequestInterface interface { - DoRaw() ([]byte, error) + DoRaw(context.Context) ([]byte, error) AbsPath(segments ...string) *rest.Request } @@ -60,7 +62,7 @@ func (self inClusterSidecarClient) HealthCheck() error { Name("dashboard-metrics-scraper"). SubResource("proxy"). Suffix("/healthz"). - DoRaw() + DoRaw(context.TODO()) return err } @@ -78,6 +80,6 @@ func (c remoteSidecarClient) Get(path string) RequestInterface { // HealthCheck does a health check of the application. // Returns nil if connection to application can be established, error object otherwise. func (self remoteSidecarClient) HealthCheck() error { - _, err := self.Get("healthz").AbsPath("/").DoRaw() + _, err := self.Get("healthz").AbsPath("/").DoRaw(context.TODO()) return err } diff --git a/src/app/backend/plugin/client/clientset/versioned/clientset.go b/src/app/backend/plugin/client/clientset/versioned/clientset.go index 4da0630b7f91..dee214fff0ba 100644 --- a/src/app/backend/plugin/client/clientset/versioned/clientset.go +++ b/src/app/backend/plugin/client/clientset/versioned/clientset.go @@ -57,7 +57,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") } configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } diff --git a/src/app/backend/plugin/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_plugin.go b/src/app/backend/plugin/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_plugin.go index d08b3e7b8d10..1ee8b204e8db 100644 --- a/src/app/backend/plugin/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_plugin.go +++ b/src/app/backend/plugin/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_plugin.go @@ -17,6 +17,8 @@ package fake import ( + "context" + v1alpha1 "github.com/kubernetes/dashboard/src/app/backend/plugin/apis/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -37,7 +39,7 @@ var pluginsResource = schema.GroupVersionResource{Group: "dashboard.k8s.io", Ver var pluginsKind = schema.GroupVersionKind{Group: "dashboard.k8s.io", Version: "v1alpha1", Kind: "Plugin"} // Get takes name of the plugin, and returns the corresponding plugin object, and an error if there is any. -func (c *FakePlugins) Get(name string, options v1.GetOptions) (result *v1alpha1.Plugin, err error) { +func (c *FakePlugins) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Plugin, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(pluginsResource, c.ns, name), &v1alpha1.Plugin{}) @@ -48,7 +50,7 @@ func (c *FakePlugins) Get(name string, options v1.GetOptions) (result *v1alpha1. } // List takes label and field selectors, and returns the list of Plugins that match those selectors. -func (c *FakePlugins) List(opts v1.ListOptions) (result *v1alpha1.PluginList, err error) { +func (c *FakePlugins) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PluginList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(pluginsResource, pluginsKind, c.ns, opts), &v1alpha1.PluginList{}) @@ -70,14 +72,14 @@ func (c *FakePlugins) List(opts v1.ListOptions) (result *v1alpha1.PluginList, er } // Watch returns a watch.Interface that watches the requested plugins. -func (c *FakePlugins) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakePlugins) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(pluginsResource, c.ns, opts)) } // Create takes the representation of a plugin and creates it. Returns the server's representation of the plugin, and an error, if there is any. -func (c *FakePlugins) Create(plugin *v1alpha1.Plugin) (result *v1alpha1.Plugin, err error) { +func (c *FakePlugins) Create(ctx context.Context, plugin *v1alpha1.Plugin, opts v1.CreateOptions) (result *v1alpha1.Plugin, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(pluginsResource, c.ns, plugin), &v1alpha1.Plugin{}) @@ -88,7 +90,7 @@ func (c *FakePlugins) Create(plugin *v1alpha1.Plugin) (result *v1alpha1.Plugin, } // Update takes the representation of a plugin and updates it. Returns the server's representation of the plugin, and an error, if there is any. -func (c *FakePlugins) Update(plugin *v1alpha1.Plugin) (result *v1alpha1.Plugin, err error) { +func (c *FakePlugins) Update(ctx context.Context, plugin *v1alpha1.Plugin, opts v1.UpdateOptions) (result *v1alpha1.Plugin, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(pluginsResource, c.ns, plugin), &v1alpha1.Plugin{}) @@ -99,7 +101,7 @@ func (c *FakePlugins) Update(plugin *v1alpha1.Plugin) (result *v1alpha1.Plugin, } // Delete takes name of the plugin and deletes it. Returns an error if one occurs. -func (c *FakePlugins) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakePlugins) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(pluginsResource, c.ns, name), &v1alpha1.Plugin{}) @@ -107,15 +109,15 @@ func (c *FakePlugins) Delete(name string, options *v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *FakePlugins) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(pluginsResource, c.ns, listOptions) +func (c *FakePlugins) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(pluginsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.PluginList{}) return err } // Patch applies the patch and returns the patched plugin. -func (c *FakePlugins) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Plugin, err error) { +func (c *FakePlugins) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Plugin, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(pluginsResource, c.ns, name, pt, data, subresources...), &v1alpha1.Plugin{}) diff --git a/src/app/backend/plugin/client/clientset/versioned/typed/apis/v1alpha1/plugin.go b/src/app/backend/plugin/client/clientset/versioned/typed/apis/v1alpha1/plugin.go index 0c5bcc88296f..410c53bb3e70 100644 --- a/src/app/backend/plugin/client/clientset/versioned/typed/apis/v1alpha1/plugin.go +++ b/src/app/backend/plugin/client/clientset/versioned/typed/apis/v1alpha1/plugin.go @@ -17,6 +17,7 @@ package v1alpha1 import ( + "context" "time" v1alpha1 "github.com/kubernetes/dashboard/src/app/backend/plugin/apis/v1alpha1" @@ -35,14 +36,14 @@ type PluginsGetter interface { // PluginInterface has methods to work with Plugin resources. type PluginInterface interface { - Create(*v1alpha1.Plugin) (*v1alpha1.Plugin, error) - Update(*v1alpha1.Plugin) (*v1alpha1.Plugin, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.Plugin, error) - List(opts v1.ListOptions) (*v1alpha1.PluginList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Plugin, err error) + Create(ctx context.Context, plugin *v1alpha1.Plugin, opts v1.CreateOptions) (*v1alpha1.Plugin, error) + Update(ctx context.Context, plugin *v1alpha1.Plugin, opts v1.UpdateOptions) (*v1alpha1.Plugin, 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) (*v1alpha1.Plugin, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.PluginList, error) + 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 *v1alpha1.Plugin, err error) PluginExpansion } @@ -61,20 +62,20 @@ func newPlugins(c *DashboardV1alpha1Client, namespace string) *plugins { } // Get takes name of the plugin, and returns the corresponding plugin object, and an error if there is any. -func (c *plugins) Get(name string, options v1.GetOptions) (result *v1alpha1.Plugin, err error) { +func (c *plugins) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Plugin, err error) { result = &v1alpha1.Plugin{} err = c.client.Get(). Namespace(c.ns). Resource("plugins"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of Plugins that match those selectors. -func (c *plugins) List(opts v1.ListOptions) (result *v1alpha1.PluginList, err error) { +func (c *plugins) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PluginList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -85,13 +86,13 @@ func (c *plugins) List(opts v1.ListOptions) (result *v1alpha1.PluginList, err er Resource("plugins"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested plugins. -func (c *plugins) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *plugins) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -102,71 +103,74 @@ func (c *plugins) Watch(opts v1.ListOptions) (watch.Interface, error) { Resource("plugins"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a plugin and creates it. Returns the server's representation of the plugin, and an error, if there is any. -func (c *plugins) Create(plugin *v1alpha1.Plugin) (result *v1alpha1.Plugin, err error) { +func (c *plugins) Create(ctx context.Context, plugin *v1alpha1.Plugin, opts v1.CreateOptions) (result *v1alpha1.Plugin, err error) { result = &v1alpha1.Plugin{} err = c.client.Post(). Namespace(c.ns). Resource("plugins"). + VersionedParams(&opts, scheme.ParameterCodec). Body(plugin). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a plugin and updates it. Returns the server's representation of the plugin, and an error, if there is any. -func (c *plugins) Update(plugin *v1alpha1.Plugin) (result *v1alpha1.Plugin, err error) { +func (c *plugins) Update(ctx context.Context, plugin *v1alpha1.Plugin, opts v1.UpdateOptions) (result *v1alpha1.Plugin, err error) { result = &v1alpha1.Plugin{} err = c.client.Put(). Namespace(c.ns). Resource("plugins"). Name(plugin.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(plugin). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the plugin and deletes it. Returns an error if one occurs. -func (c *plugins) Delete(name string, options *v1.DeleteOptions) error { +func (c *plugins) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("plugins"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *plugins) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *plugins) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("plugins"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched plugin. -func (c *plugins) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Plugin, err error) { +func (c *plugins) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Plugin, err error) { result = &v1alpha1.Plugin{} err = c.client.Patch(pt). Namespace(c.ns). Resource("plugins"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/src/app/backend/plugin/client/informers/externalversions/apis/v1alpha1/plugin.go b/src/app/backend/plugin/client/informers/externalversions/apis/v1alpha1/plugin.go index 9fb2fbad839c..ed49a1a308a6 100644 --- a/src/app/backend/plugin/client/informers/externalversions/apis/v1alpha1/plugin.go +++ b/src/app/backend/plugin/client/informers/externalversions/apis/v1alpha1/plugin.go @@ -17,6 +17,7 @@ package v1alpha1 import ( + "context" time "time" apisv1alpha1 "github.com/kubernetes/dashboard/src/app/backend/plugin/apis/v1alpha1" @@ -59,13 +60,13 @@ func NewFilteredPluginInformer(client versioned.Interface, namespace string, res if tweakListOptions != nil { tweakListOptions(&options) } - return client.DashboardV1alpha1().Plugins(namespace).List(options) + return client.DashboardV1alpha1().Plugins(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.DashboardV1alpha1().Plugins(namespace).Watch(options) + return client.DashboardV1alpha1().Plugins(namespace).Watch(context.TODO(), options) }, }, &apisv1alpha1.Plugin{}, diff --git a/src/app/backend/plugin/config_test.go b/src/app/backend/plugin/config_test.go index 13808597483b..fc0989a55543 100644 --- a/src/app/backend/plugin/config_test.go +++ b/src/app/backend/plugin/config_test.go @@ -15,6 +15,7 @@ package plugin import ( + "context" "net/http" "net/http/httptest" "testing" @@ -45,7 +46,7 @@ func Test_handleConfig(t *testing.T) { h := Handler{&fakeClientManager{}} pcs, _ := h.cManager.PluginClient(nil) - _, _ = pcs.DashboardV1alpha1().Plugins(ns).Create(&v1alpha1.Plugin{ + _, _ = pcs.DashboardV1alpha1().Plugins(ns).Create(context.TODO(), &v1alpha1.Plugin{ ObjectMeta: metaV1.ObjectMeta{Name: pluginName, Namespace: ns}, Spec: v1alpha1.PluginSpec{ Source: v1alpha1.Source{ @@ -53,7 +54,7 @@ func Test_handleConfig(t *testing.T) { LocalObjectReference: coreV1.LocalObjectReference{Name: cfgMapName}, }, Filename: filename}}, - }) + }, metaV1.CreateOptions{}) httpReq, _ := http.NewRequest(http.MethodGet, "/api/v1/plugin/config", nil) req := restful.NewRequest(httpReq) diff --git a/src/app/backend/plugin/detail.go b/src/app/backend/plugin/detail.go index 8be7c65a6e98..8fbe6166120f 100644 --- a/src/app/backend/plugin/detail.go +++ b/src/app/backend/plugin/detail.go @@ -15,6 +15,8 @@ package plugin import ( + "context" + pluginclientset "github.com/kubernetes/dashboard/src/app/backend/plugin/client/clientset/versioned" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" @@ -22,11 +24,11 @@ import ( // GetPluginSource has the logic to get the actual plugin source code from information in Plugin.Spec func GetPluginSource(client pluginclientset.Interface, k8sClient kubernetes.Interface, ns string, name string) ([]byte, error) { - plugin, err := client.DashboardV1alpha1().Plugins(ns).Get(name, v1.GetOptions{}) + plugin, err := client.DashboardV1alpha1().Plugins(ns).Get(context.TODO(), name, v1.GetOptions{}) if err != nil { return nil, err } - cfgMap, err := k8sClient.CoreV1().ConfigMaps(ns).Get(plugin.Spec.Source.ConfigMapRef.Name, v1.GetOptions{}) + cfgMap, err := k8sClient.CoreV1().ConfigMaps(ns).Get(context.TODO(), plugin.Spec.Source.ConfigMapRef.Name, v1.GetOptions{}) if err != nil { return nil, err } diff --git a/src/app/backend/plugin/detail_test.go b/src/app/backend/plugin/detail_test.go index 6a479ecb0a46..77b14fcdf6a9 100644 --- a/src/app/backend/plugin/detail_test.go +++ b/src/app/backend/plugin/detail_test.go @@ -16,6 +16,7 @@ package plugin import ( "bytes" + "context" "net/http" "net/http/httptest" "testing" @@ -25,6 +26,7 @@ import ( "github.com/kubernetes/dashboard/src/app/backend/plugin/apis/v1alpha1" fakePluginClientset "github.com/kubernetes/dashboard/src/app/backend/plugin/client/clientset/versioned/fake" coreV1 "k8s.io/api/core/v1" + metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" fakeK8sClient "k8s.io/client-go/kubernetes/fake" ) @@ -45,7 +47,7 @@ func TestGetPluginSource(t *testing.T) { t.Errorf("error 'plugins.dashboard.k8s.io \"%s\" not found' did not occur", pluginName) } - _, _ = pcs.DashboardV1alpha1().Plugins(ns).Create(&v1alpha1.Plugin{ + _, _ = pcs.DashboardV1alpha1().Plugins(ns).Create(context.TODO(), &v1alpha1.Plugin{ ObjectMeta: v1.ObjectMeta{Name: pluginName, Namespace: ns}, Spec: v1alpha1.PluginSpec{ Source: v1alpha1.Source{ @@ -53,18 +55,18 @@ func TestGetPluginSource(t *testing.T) { LocalObjectReference: coreV1.LocalObjectReference{Name: cfgMapName}, }, Filename: filename}}, - }) + }, metaV1.CreateOptions{}) _, err = GetPluginSource(pcs, cs, ns, pluginName) if err == nil { t.Errorf("error 'configmaps \"%s\" not found' did not occur", cfgMapName) } - _, _ = cs.CoreV1().ConfigMaps(ns).Create(&coreV1.ConfigMap{ + _, _ = cs.CoreV1().ConfigMaps(ns).Create(context.TODO(), &coreV1.ConfigMap{ ObjectMeta: v1.ObjectMeta{ Name: cfgMapName, Namespace: ns}, Data: map[string]string{filename: srcData}, - }) + }, v1.CreateOptions{}) data, err := GetPluginSource(pcs, cs, ns, pluginName) if err != nil { @@ -84,7 +86,7 @@ func Test_servePluginSource(t *testing.T) { h := Handler{&fakeClientManager{}} pcs, _ := h.cManager.PluginClient(nil) - _, _ = pcs.DashboardV1alpha1().Plugins(ns).Create(&v1alpha1.Plugin{ + _, _ = pcs.DashboardV1alpha1().Plugins(ns).Create(context.TODO(), &v1alpha1.Plugin{ ObjectMeta: v1.ObjectMeta{Name: pluginName, Namespace: ns}, Spec: v1alpha1.PluginSpec{ Source: v1alpha1.Source{ @@ -92,7 +94,7 @@ func Test_servePluginSource(t *testing.T) { LocalObjectReference: coreV1.LocalObjectReference{Name: cfgMapName}, }, Filename: filename}}, - }) + }, metaV1.CreateOptions{}) httpReq, _ := http.NewRequest(http.MethodGet, "/api/v1/plugin/default/test-plugin", nil) req := restful.NewRequest(httpReq) diff --git a/src/app/backend/plugin/list.go b/src/app/backend/plugin/list.go index 1c440c626259..1da0efe69197 100644 --- a/src/app/backend/plugin/list.go +++ b/src/app/backend/plugin/list.go @@ -15,6 +15,7 @@ package plugin import ( + "context" "fmt" "github.com/kubernetes/dashboard/src/app/backend/api" @@ -61,7 +62,7 @@ func (p PluginCell) GetProperty(name dataselect.PropertyName) dataselect.Compara // GetPluginList returns all the registered plugins func GetPluginList(client pluginclientset.Interface, ns string, dsQuery *dataselect.DataSelectQuery) (*PluginList, error) { - plugins, err := client.DashboardV1alpha1().Plugins(ns).List(v1.ListOptions{}) + plugins, err := client.DashboardV1alpha1().Plugins(ns).List(context.TODO(), v1.ListOptions{}) nonCriticalErrors, criticalError := errors.HandleError(err) if criticalError != nil { return &PluginList{Items: []Plugin{}, Errors: []error{criticalError}}, nil diff --git a/src/app/backend/plugin/list_test.go b/src/app/backend/plugin/list_test.go index a73f4b602bf6..47fb095dd158 100644 --- a/src/app/backend/plugin/list_test.go +++ b/src/app/backend/plugin/list_test.go @@ -15,6 +15,7 @@ package plugin import ( + "context" "net/http" "net/http/httptest" "testing" @@ -26,6 +27,7 @@ import ( "github.com/kubernetes/dashboard/src/app/backend/plugin/apis/v1alpha1" fakePluginClientset "github.com/kubernetes/dashboard/src/app/backend/plugin/client/clientset/versioned/fake" coreV1 "k8s.io/api/core/v1" + metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -37,7 +39,7 @@ func TestGetPluginList(t *testing.T) { pcs := fakePluginClientset.NewSimpleClientset() - _, _ = pcs.DashboardV1alpha1().Plugins(ns).Create(&v1alpha1.Plugin{ + _, _ = pcs.DashboardV1alpha1().Plugins(ns).Create(context.TODO(), &v1alpha1.Plugin{ ObjectMeta: v1.ObjectMeta{Name: pluginName, Namespace: ns}, Spec: v1alpha1.PluginSpec{ Source: v1alpha1.Source{ @@ -45,7 +47,7 @@ func TestGetPluginList(t *testing.T) { LocalObjectReference: coreV1.LocalObjectReference{Name: cfgMapName}, }, Filename: filename}}, - }) + }, metaV1.CreateOptions{}) dsQuery := dataselect.DataSelectQuery{ PaginationQuery: &dataselect.PaginationQuery{ @@ -74,7 +76,7 @@ func Test_handlePluginList(t *testing.T) { h := Handler{&fakeClientManager{}} pcs, _ := h.cManager.PluginClient(nil) - _, _ = pcs.DashboardV1alpha1().Plugins(ns).Create(&v1alpha1.Plugin{ + _, _ = pcs.DashboardV1alpha1().Plugins(ns).Create(context.TODO(), &v1alpha1.Plugin{ ObjectMeta: v1.ObjectMeta{Name: pluginName, Namespace: ns}, Spec: v1alpha1.PluginSpec{ Source: v1alpha1.Source{ @@ -82,7 +84,7 @@ func Test_handlePluginList(t *testing.T) { LocalObjectReference: coreV1.LocalObjectReference{Name: cfgMapName}, }, Filename: filename}}, - }) + }, metaV1.CreateOptions{}) httpReq, _ := http.NewRequest(http.MethodGet, "/api/v1/plugin/default?itemsPerPage=10&page=1&sortBy=d,creationTimestamp", nil) req := restful.NewRequest(httpReq) diff --git a/src/app/backend/resource/clusterrole/detail.go b/src/app/backend/resource/clusterrole/detail.go index 83a275cf5f80..f3a6da63be24 100644 --- a/src/app/backend/resource/clusterrole/detail.go +++ b/src/app/backend/resource/clusterrole/detail.go @@ -15,6 +15,8 @@ package clusterrole import ( + "context" + rbac "k8s.io/api/rbac/v1" metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sClient "k8s.io/client-go/kubernetes" @@ -33,7 +35,7 @@ type ClusterRoleDetail struct { // GetClusterRoleDetail gets Cluster Role details. func GetClusterRoleDetail(client k8sClient.Interface, name string) (*ClusterRoleDetail, error) { - rawObject, err := client.RbacV1().ClusterRoles().Get(name, metaV1.GetOptions{}) + rawObject, err := client.RbacV1().ClusterRoles().Get(context.TODO(), name, metaV1.GetOptions{}) if err != nil { return nil, err } diff --git a/src/app/backend/resource/clusterrolebinding/detail.go b/src/app/backend/resource/clusterrolebinding/detail.go index 4eb5bf81c3da..972b77a78ac2 100644 --- a/src/app/backend/resource/clusterrolebinding/detail.go +++ b/src/app/backend/resource/clusterrolebinding/detail.go @@ -15,6 +15,8 @@ package clusterrolebinding import ( + "context" + rbac "k8s.io/api/rbac/v1" metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sClient "k8s.io/client-go/kubernetes" @@ -35,7 +37,7 @@ type ClusterRoleBindingDetail struct { // GetClusterRoleBindingDetail gets ClusterRoleBinding details. func GetClusterRoleBindingDetail(client k8sClient.Interface, name string) (*ClusterRoleBindingDetail, error) { - rawObject, err := client.RbacV1().ClusterRoleBindings().Get(name, metaV1.GetOptions{}) + rawObject, err := client.RbacV1().ClusterRoleBindings().Get(context.TODO(), name, metaV1.GetOptions{}) if err != nil { return nil, err } diff --git a/src/app/backend/resource/common/resourcechannels.go b/src/app/backend/resource/common/resourcechannels.go index 44b757a0584b..91c08ae6798a 100644 --- a/src/app/backend/resource/common/resourcechannels.go +++ b/src/app/backend/resource/common/resourcechannels.go @@ -15,6 +15,8 @@ package common import ( + "context" + apps "k8s.io/api/apps/v1" autoscaling "k8s.io/api/autoscaling/v1" batch "k8s.io/api/batch/v1" @@ -139,7 +141,7 @@ func GetServiceListChannel(client client.Interface, nsQuery *NamespaceQuery, Error: make(chan error, numReads), } go func() { - list, err := client.CoreV1().Services(nsQuery.ToRequestParam()).List(api.ListEverything) + list, err := client.CoreV1().Services(nsQuery.ToRequestParam()).List(context.TODO(), api.ListEverything) var filteredItems []v1.Service for _, item := range list.Items { if nsQuery.Matches(item.ObjectMeta.Namespace) { @@ -172,7 +174,7 @@ func GetIngressListChannel(client client.Interface, nsQuery *NamespaceQuery, Error: make(chan error, numReads), } go func() { - list, err := client.ExtensionsV1beta1().Ingresses(nsQuery.ToRequestParam()).List(api.ListEverything) + list, err := client.ExtensionsV1beta1().Ingresses(nsQuery.ToRequestParam()).List(context.TODO(), api.ListEverything) var filteredItems []extensions.Ingress for _, item := range list.Items { if nsQuery.Matches(item.ObjectMeta.Namespace) { @@ -206,7 +208,7 @@ func GetLimitRangeListChannel(client client.Interface, nsQuery *NamespaceQuery, } go func() { - list, err := client.CoreV1().LimitRanges(nsQuery.ToRequestParam()).List(api.ListEverything) + list, err := client.CoreV1().LimitRanges(nsQuery.ToRequestParam()).List(context.TODO(), api.ListEverything) for i := 0; i < numReads; i++ { channel.List <- list channel.Error <- err @@ -231,7 +233,7 @@ func GetNodeListChannel(client client.Interface, numReads int) NodeListChannel { } go func() { - list, err := client.CoreV1().Nodes().List(api.ListEverything) + list, err := client.CoreV1().Nodes().List(context.TODO(), api.ListEverything) for i := 0; i < numReads; i++ { channel.List <- list channel.Error <- err @@ -257,7 +259,7 @@ func GetNamespaceListChannel(client client.Interface, numReads int) NamespaceLis } go func() { - list, err := client.CoreV1().Namespaces().List(api.ListEverything) + list, err := client.CoreV1().Namespaces().List(context.TODO(), api.ListEverything) for i := 0; i < numReads; i++ { channel.List <- list channel.Error <- err @@ -289,7 +291,7 @@ func GetEventListChannelWithOptions(client client.Interface, } go func() { - list, err := client.CoreV1().Events(nsQuery.ToRequestParam()).List(options) + list, err := client.CoreV1().Events(nsQuery.ToRequestParam()).List(context.TODO(), options) var filteredItems []v1.Event for _, item := range list.Items { if nsQuery.Matches(item.ObjectMeta.Namespace) { @@ -325,7 +327,7 @@ func GetEndpointListChannelWithOptions(client client.Interface, } go func() { - list, err := client.CoreV1().Endpoints(nsQuery.ToRequestParam()).List(opt) + list, err := client.CoreV1().Endpoints(nsQuery.ToRequestParam()).List(context.TODO(), opt) for i := 0; i < numReads; i++ { channel.List <- list @@ -359,7 +361,7 @@ func GetPodListChannelWithOptions(client client.Interface, nsQuery *NamespaceQue } go func() { - list, err := client.CoreV1().Pods(nsQuery.ToRequestParam()).List(options) + list, err := client.CoreV1().Pods(nsQuery.ToRequestParam()).List(context.TODO(), options) var filteredItems []v1.Pod for _, item := range list.Items { if nsQuery.Matches(item.ObjectMeta.Namespace) { @@ -395,7 +397,7 @@ func GetReplicationControllerListChannel(client client.Interface, go func() { list, err := client.CoreV1().ReplicationControllers(nsQuery.ToRequestParam()). - List(api.ListEverything) + List(context.TODO(), api.ListEverything) var filteredItems []v1.ReplicationController for _, item := range list.Items { if nsQuery.Matches(item.ObjectMeta.Namespace) { @@ -430,7 +432,7 @@ func GetDeploymentListChannel(client client.Interface, go func() { list, err := client.AppsV1().Deployments(nsQuery.ToRequestParam()). - List(api.ListEverything) + List(context.TODO(), api.ListEverything) var filteredItems []apps.Deployment for _, item := range list.Items { if nsQuery.Matches(item.ObjectMeta.Namespace) { @@ -471,7 +473,7 @@ func GetReplicaSetListChannelWithOptions(client client.Interface, nsQuery *Names go func() { list, err := client.AppsV1().ReplicaSets(nsQuery.ToRequestParam()). - List(options) + List(context.TODO(), options) var filteredItems []apps.ReplicaSet for _, item := range list.Items { if nsQuery.Matches(item.ObjectMeta.Namespace) { @@ -503,7 +505,7 @@ func GetDaemonSetListChannel(client client.Interface, nsQuery *NamespaceQuery, n } go func() { - list, err := client.AppsV1().DaemonSets(nsQuery.ToRequestParam()).List(api.ListEverything) + list, err := client.AppsV1().DaemonSets(nsQuery.ToRequestParam()).List(context.TODO(), api.ListEverything) var filteredItems []apps.DaemonSet for _, item := range list.Items { if nsQuery.Matches(item.ObjectMeta.Namespace) { @@ -535,7 +537,7 @@ func GetJobListChannel(client client.Interface, } go func() { - list, err := client.BatchV1().Jobs(nsQuery.ToRequestParam()).List(api.ListEverything) + list, err := client.BatchV1().Jobs(nsQuery.ToRequestParam()).List(context.TODO(), api.ListEverything) var filteredItems []batch.Job for _, item := range list.Items { if nsQuery.Matches(item.ObjectMeta.Namespace) { @@ -566,7 +568,7 @@ func GetCronJobListChannel(client client.Interface, nsQuery *NamespaceQuery, num } go func() { - list, err := client.BatchV1beta1().CronJobs(nsQuery.ToRequestParam()).List(api.ListEverything) + list, err := client.BatchV1beta1().CronJobs(nsQuery.ToRequestParam()).List(context.TODO(), api.ListEverything) var filteredItems []batch2.CronJob for _, item := range list.Items { if nsQuery.Matches(item.ObjectMeta.Namespace) { @@ -599,7 +601,7 @@ func GetStatefulSetListChannel(client client.Interface, } go func() { - statefulSets, err := client.AppsV1().StatefulSets(nsQuery.ToRequestParam()).List(api.ListEverything) + statefulSets, err := client.AppsV1().StatefulSets(nsQuery.ToRequestParam()).List(context.TODO(), api.ListEverything) var filteredItems []apps.StatefulSet for _, item := range statefulSets.Items { if nsQuery.Matches(item.ObjectMeta.Namespace) { @@ -633,7 +635,7 @@ func GetConfigMapListChannel(client client.Interface, nsQuery *NamespaceQuery, } go func() { - list, err := client.CoreV1().ConfigMaps(nsQuery.ToRequestParam()).List(api.ListEverything) + list, err := client.CoreV1().ConfigMaps(nsQuery.ToRequestParam()).List(context.TODO(), api.ListEverything) var filteredItems []v1.ConfigMap for _, item := range list.Items { if nsQuery.Matches(item.ObjectMeta.Namespace) { @@ -667,7 +669,7 @@ func GetSecretListChannel(client client.Interface, nsQuery *NamespaceQuery, } go func() { - list, err := client.CoreV1().Secrets(nsQuery.ToRequestParam()).List(api.ListEverything) + list, err := client.CoreV1().Secrets(nsQuery.ToRequestParam()).List(context.TODO(), api.ListEverything) var filteredItems []v1.Secret for _, item := range list.Items { if nsQuery.Matches(item.ObjectMeta.Namespace) { @@ -699,7 +701,7 @@ func GetRoleListChannel(client client.Interface, nsQuery *NamespaceQuery, numRea } go func() { - list, err := client.RbacV1().Roles(nsQuery.ToRequestParam()).List(api.ListEverything) + list, err := client.RbacV1().Roles(nsQuery.ToRequestParam()).List(context.TODO(), api.ListEverything) for i := 0; i < numReads; i++ { channel.List <- list channel.Error <- err @@ -724,7 +726,7 @@ func GetClusterRoleListChannel(client client.Interface, numReads int) ClusterRol } go func() { - list, err := client.RbacV1().ClusterRoles().List(api.ListEverything) + list, err := client.RbacV1().ClusterRoles().List(context.TODO(), api.ListEverything) for i := 0; i < numReads; i++ { channel.List <- list channel.Error <- err @@ -749,7 +751,7 @@ func GetRoleBindingListChannel(client client.Interface, nsQuery *NamespaceQuery, } go func() { - list, err := client.RbacV1().RoleBindings(nsQuery.ToRequestParam()).List(api.ListEverything) + list, err := client.RbacV1().RoleBindings(nsQuery.ToRequestParam()).List(context.TODO(), api.ListEverything) for i := 0; i < numReads; i++ { channel.List <- list channel.Error <- err @@ -775,7 +777,7 @@ func GetClusterRoleBindingListChannel(client client.Interface, } go func() { - list, err := client.RbacV1().ClusterRoleBindings().List(api.ListEverything) + list, err := client.RbacV1().ClusterRoleBindings().List(context.TODO(), api.ListEverything) for i := 0; i < numReads; i++ { channel.List <- list channel.Error <- err @@ -801,7 +803,7 @@ func GetPersistentVolumeListChannel(client client.Interface, } go func() { - list, err := client.CoreV1().PersistentVolumes().List(api.ListEverything) + list, err := client.CoreV1().PersistentVolumes().List(context.TODO(), api.ListEverything) for i := 0; i < numReads; i++ { channel.List <- list channel.Error <- err @@ -828,7 +830,7 @@ func GetPersistentVolumeClaimListChannel(client client.Interface, nsQuery *Names } go func() { - list, err := client.CoreV1().PersistentVolumeClaims(nsQuery.ToRequestParam()).List(api.ListEverything) + list, err := client.CoreV1().PersistentVolumeClaims(nsQuery.ToRequestParam()).List(context.TODO(), api.ListEverything) for i := 0; i < numReads; i++ { channel.List <- list channel.Error <- err @@ -853,7 +855,7 @@ func GetCustomResourceDefinitionChannelV1(client apiextensionsclientset.Interfac } go func() { - list, err := client.ApiextensionsV1().CustomResourceDefinitions().List(api.ListEverything) + list, err := client.ApiextensionsV1().CustomResourceDefinitions().List(context.TODO(), api.ListEverything) for i := 0; i < numReads; i++ { channel.List <- list channel.Error <- err @@ -878,7 +880,7 @@ func GetCustomResourceDefinitionChannelV1beta1(client apiextensionsclientset.Int } go func() { - list, err := client.ApiextensionsV1beta1().CustomResourceDefinitions().List(api.ListEverything) + list, err := client.ApiextensionsV1beta1().CustomResourceDefinitions().List(context.TODO(), api.ListEverything) for i := 0; i < numReads; i++ { channel.List <- list channel.Error <- err @@ -905,7 +907,7 @@ func GetResourceQuotaListChannel(client client.Interface, nsQuery *NamespaceQuer } go func() { - list, err := client.CoreV1().ResourceQuotas(nsQuery.ToRequestParam()).List(api.ListEverything) + list, err := client.CoreV1().ResourceQuotas(nsQuery.ToRequestParam()).List(context.TODO(), api.ListEverything) for i := 0; i < numReads; i++ { channel.List <- list channel.Error <- err @@ -932,7 +934,7 @@ func GetHorizontalPodAutoscalerListChannel(client client.Interface, nsQuery *Nam go func() { list, err := client.AutoscalingV1().HorizontalPodAutoscalers(nsQuery.ToRequestParam()). - List(api.ListEverything) + List(context.TODO(), api.ListEverything) for i := 0; i < numReads; i++ { channel.List <- list channel.Error <- err @@ -957,7 +959,7 @@ func GetStorageClassListChannel(client client.Interface, numReads int) StorageCl } go func() { - list, err := client.StorageV1().StorageClasses().List(api.ListEverything) + list, err := client.StorageV1().StorageClasses().List(context.TODO(), api.ListEverything) for i := 0; i < numReads; i++ { channel.List <- list channel.Error <- err diff --git a/src/app/backend/resource/configmap/detail.go b/src/app/backend/resource/configmap/detail.go index c0352dbd667e..813be1c8d5e4 100644 --- a/src/app/backend/resource/configmap/detail.go +++ b/src/app/backend/resource/configmap/detail.go @@ -15,6 +15,7 @@ package configmap import ( + "context" "log" v1 "k8s.io/api/core/v1" @@ -37,7 +38,7 @@ type ConfigMapDetail struct { func GetConfigMapDetail(client kubernetes.Interface, namespace, name string) (*ConfigMapDetail, error) { log.Printf("Getting details of %s config map in %s namespace", name, namespace) - rawConfigMap, err := client.CoreV1().ConfigMaps(namespace).Get(name, metaV1.GetOptions{}) + rawConfigMap, err := client.CoreV1().ConfigMaps(namespace).Get(context.TODO(), name, metaV1.GetOptions{}) if err != nil { return nil, err diff --git a/src/app/backend/resource/container/logs.go b/src/app/backend/resource/container/logs.go index a981f32dbd84..3ff6cacad25d 100644 --- a/src/app/backend/resource/container/logs.go +++ b/src/app/backend/resource/container/logs.go @@ -15,6 +15,7 @@ package container import ( + "context" "io" "io/ioutil" @@ -38,7 +39,7 @@ type PodContainerList struct { // GetPodContainers returns containers that a pod has. func GetPodContainers(client kubernetes.Interface, namespace, podID string) (*PodContainerList, error) { - pod, err := client.CoreV1().Pods(namespace).Get(podID, metaV1.GetOptions{}) + pod, err := client.CoreV1().Pods(namespace).Get(context.TODO(), podID, metaV1.GetOptions{}) if err != nil { return nil, err } @@ -56,7 +57,7 @@ func GetPodContainers(client kubernetes.Interface, namespace, podID string) (*Po // are returned. Previous indicates to read archived logs created by log rotation or container crash func GetLogDetails(client kubernetes.Interface, namespace, podID string, container string, logSelector *logs.Selection, usePreviousLogs bool) (*logs.LogDetails, error) { - pod, err := client.CoreV1().Pods(namespace).Get(podID, metaV1.GetOptions{}) + pod, err := client.CoreV1().Pods(namespace).Get(context.TODO(), podID, metaV1.GetOptions{}) if err != nil { return nil, err } @@ -130,7 +131,7 @@ func openStream(client kubernetes.Interface, namespace, podID string, logOptions Name(podID). Resource("pods"). SubResource("log"). - VersionedParams(logOptions, scheme.ParameterCodec).Stream() + VersionedParams(logOptions, scheme.ParameterCodec).Stream(context.TODO()) } // ConstructLogDetails creates a new log details structure for given parameters. diff --git a/src/app/backend/resource/controller/controller.go b/src/app/backend/resource/controller/controller.go index 10b20e4a5051..d9469147bf16 100644 --- a/src/app/backend/resource/controller/controller.go +++ b/src/app/backend/resource/controller/controller.go @@ -15,6 +15,7 @@ package controller import ( + "context" "fmt" "strings" @@ -65,37 +66,37 @@ func NewResourceController(ref meta.OwnerReference, namespace string, client cli ResourceController, error) { switch strings.ToLower(ref.Kind) { case api.ResourceKindJob: - job, err := client.BatchV1().Jobs(namespace).Get(ref.Name, meta.GetOptions{}) + job, err := client.BatchV1().Jobs(namespace).Get(context.TODO(), ref.Name, meta.GetOptions{}) if err != nil { return nil, err } return JobController(*job), nil case api.ResourceKindPod: - pod, err := client.CoreV1().Pods(namespace).Get(ref.Name, meta.GetOptions{}) + pod, err := client.CoreV1().Pods(namespace).Get(context.TODO(), ref.Name, meta.GetOptions{}) if err != nil { return nil, err } return PodController(*pod), nil case api.ResourceKindReplicaSet: - rs, err := client.AppsV1().ReplicaSets(namespace).Get(ref.Name, meta.GetOptions{}) + rs, err := client.AppsV1().ReplicaSets(namespace).Get(context.TODO(), ref.Name, meta.GetOptions{}) if err != nil { return nil, err } return ReplicaSetController(*rs), nil case api.ResourceKindReplicationController: - rc, err := client.CoreV1().ReplicationControllers(namespace).Get(ref.Name, meta.GetOptions{}) + rc, err := client.CoreV1().ReplicationControllers(namespace).Get(context.TODO(), ref.Name, meta.GetOptions{}) if err != nil { return nil, err } return ReplicationControllerController(*rc), nil case api.ResourceKindDaemonSet: - ds, err := client.AppsV1().DaemonSets(namespace).Get(ref.Name, meta.GetOptions{}) + ds, err := client.AppsV1().DaemonSets(namespace).Get(context.TODO(), ref.Name, meta.GetOptions{}) if err != nil { return nil, err } return DaemonSetController(*ds), nil case api.ResourceKindStatefulSet: - ss, err := client.AppsV1().StatefulSets(namespace).Get(ref.Name, meta.GetOptions{}) + ss, err := client.AppsV1().StatefulSets(namespace).Get(context.TODO(), ref.Name, meta.GetOptions{}) if err != nil { return nil, err } diff --git a/src/app/backend/resource/cronjob/detail.go b/src/app/backend/resource/cronjob/detail.go index 086a01d80883..8becbe6c8450 100644 --- a/src/app/backend/resource/cronjob/detail.go +++ b/src/app/backend/resource/cronjob/detail.go @@ -15,6 +15,8 @@ package cronjob import ( + "context" + batch2 "k8s.io/api/batch/v1beta1" metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sClient "k8s.io/client-go/kubernetes" @@ -35,7 +37,7 @@ type CronJobDetail struct { // GetCronJobDetail gets Cron Job details. func GetCronJobDetail(client k8sClient.Interface, namespace, name string) (*CronJobDetail, error) { - rawObject, err := client.BatchV1beta1().CronJobs(namespace).Get(name, metaV1.GetOptions{}) + rawObject, err := client.BatchV1beta1().CronJobs(namespace).Get(context.TODO(), name, metaV1.GetOptions{}) if err != nil { return nil, err } diff --git a/src/app/backend/resource/cronjob/jobs.go b/src/app/backend/resource/cronjob/jobs.go index 9b73002d020b..7c4aef0424de 100644 --- a/src/app/backend/resource/cronjob/jobs.go +++ b/src/app/backend/resource/cronjob/jobs.go @@ -15,6 +15,8 @@ package cronjob import ( + "context" + "github.com/kubernetes/dashboard/src/app/backend/api" "github.com/kubernetes/dashboard/src/app/backend/errors" metricapi "github.com/kubernetes/dashboard/src/app/backend/integration/metric/api" @@ -40,7 +42,7 @@ var emptyJobList = &job.JobList{ func GetCronJobJobs(client client.Interface, metricClient metricapi.MetricClient, dsQuery *dataselect.DataSelectQuery, namespace, name string, active bool) (*job.JobList, error) { - cronJob, err := client.BatchV1beta1().CronJobs(namespace).Get(name, metaV1.GetOptions{}) + cronJob, err := client.BatchV1beta1().CronJobs(namespace).Get(context.TODO(), name, metaV1.GetOptions{}) if err != nil { return emptyJobList, err } @@ -82,7 +84,7 @@ func GetCronJobJobs(client client.Interface, metricClient metricapi.MetricClient func TriggerCronJob(client client.Interface, namespace, name string) error { - cronJob, err := client.BatchV1beta1().CronJobs(namespace).Get(name, metaV1.GetOptions{}) + cronJob, err := client.BatchV1beta1().CronJobs(namespace).Get(context.TODO(), name, metaV1.GetOptions{}) if err != nil { return err @@ -114,7 +116,7 @@ func TriggerCronJob(client client.Interface, Spec: cronJob.Spec.JobTemplate.Spec, } - _, err = client.BatchV1().Jobs(namespace).Create(jobToCreate) + _, err = client.BatchV1().Jobs(namespace).Create(context.TODO(), jobToCreate, metaV1.CreateOptions{}) if err != nil { return err diff --git a/src/app/backend/resource/cronjob/jobs_test.go b/src/app/backend/resource/cronjob/jobs_test.go index a3d3ea2eb4b5..3ecc508648d4 100644 --- a/src/app/backend/resource/cronjob/jobs_test.go +++ b/src/app/backend/resource/cronjob/jobs_test.go @@ -15,6 +15,7 @@ package cronjob_test import ( + "context" "strings" "testing" @@ -83,7 +84,7 @@ func TestTriggerCronJob(t *testing.T) { } //check if client has the newly triggered job - list, err := client.BatchV1().Jobs(namespace).List(metaV1.ListOptions{}) + list, err := client.BatchV1().Jobs(namespace).List(context.TODO(), metaV1.ListOptions{}) if err != nil { t.Error(err) } diff --git a/src/app/backend/resource/customresourcedefinition/v1/detail.go b/src/app/backend/resource/customresourcedefinition/v1/detail.go index 9dcfaf6cb42f..6430fedb24e2 100644 --- a/src/app/backend/resource/customresourcedefinition/v1/detail.go +++ b/src/app/backend/resource/customresourcedefinition/v1/detail.go @@ -15,6 +15,8 @@ package v1 import ( + "context" + apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" apiextensionsclientset "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -28,7 +30,7 @@ import ( // GetCustomResourceDefinitionDetail returns detailed information about a custom resource definition. func GetCustomResourceDefinitionDetail(client apiextensionsclientset.Interface, config *rest.Config, name string) (*types.CustomResourceDefinitionDetail, error) { - customResourceDefinition, err := client.ApiextensionsV1().CustomResourceDefinitions().Get(name, metav1.GetOptions{}) + customResourceDefinition, err := client.ApiextensionsV1().CustomResourceDefinitions().Get(context.TODO(), name, metav1.GetOptions{}) nonCriticalErrors, criticalError := errors.HandleError(err) if criticalError != nil { return nil, criticalError diff --git a/src/app/backend/resource/customresourcedefinition/v1/objects.go b/src/app/backend/resource/customresourcedefinition/v1/objects.go index 3ffe92728313..d1f912eea4bb 100644 --- a/src/app/backend/resource/customresourcedefinition/v1/objects.go +++ b/src/app/backend/resource/customresourcedefinition/v1/objects.go @@ -15,6 +15,7 @@ package v1 import ( + "context" "encoding/json" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" @@ -36,7 +37,7 @@ func GetCustomResourceObjectList(client apiextensionsclientset.Interface, config customResourceDefinition, err := client.ApiextensionsV1(). CustomResourceDefinitions(). - Get(crdName, metav1.GetOptions{}) + Get(context.TODO(), crdName, metav1.GetOptions{}) nonCriticalErrors, criticalError := errors.HandleError(err) if criticalError != nil { return nil, criticalError @@ -51,7 +52,7 @@ func GetCustomResourceObjectList(client apiextensionsclientset.Interface, config raw, err := restClient.Get(). NamespaceIfScoped(namespace.ToRequestParam(), customResourceDefinition.Spec.Scope == apiextensionsv1.NamespaceScoped). Resource(customResourceDefinition.Spec.Names.Plural). - Do().Raw() + Do(context.TODO()).Raw() nonCriticalErrors, criticalError = errors.AppendError(err, nonCriticalErrors) if criticalError != nil { return nil, criticalError @@ -82,7 +83,7 @@ func GetCustomResourceObjectDetail(client apiextensionsclientset.Interface, name customResourceDefinition, err := client.ApiextensionsV1(). CustomResourceDefinitions(). - Get(crdName, metav1.GetOptions{}) + Get(context.TODO(), crdName, metav1.GetOptions{}) nonCriticalErrors, criticalError := errors.HandleError(err) if criticalError != nil { return nil, criticalError @@ -97,7 +98,7 @@ func GetCustomResourceObjectDetail(client apiextensionsclientset.Interface, name raw, err := restClient.Get(). NamespaceIfScoped(namespace.ToRequestParam(), customResourceDefinition.Spec.Scope == apiextensionsv1.NamespaceScoped). Resource(customResourceDefinition.Spec.Names.Plural). - Name(name).Do().Raw() + Name(name).Do(context.TODO()).Raw() nonCriticalErrors, criticalError = errors.AppendError(err, nonCriticalErrors) if criticalError != nil { return nil, criticalError diff --git a/src/app/backend/resource/customresourcedefinition/v1beta1/detail.go b/src/app/backend/resource/customresourcedefinition/v1beta1/detail.go index 8ddb96d9f61b..73e76dc2a72b 100644 --- a/src/app/backend/resource/customresourcedefinition/v1beta1/detail.go +++ b/src/app/backend/resource/customresourcedefinition/v1beta1/detail.go @@ -15,6 +15,8 @@ package v1beta1 import ( + "context" + apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" apiextensionsclientset "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -28,7 +30,7 @@ import ( // GetCustomResourceDefinitionDetail returns detailed information about a custom resource definition. func GetCustomResourceDefinitionDetail(client apiextensionsclientset.Interface, config *rest.Config, name string) (*types.CustomResourceDefinitionDetail, error) { - customResourceDefinition, err := client.ApiextensionsV1beta1().CustomResourceDefinitions().Get(name, metav1.GetOptions{}) + customResourceDefinition, err := client.ApiextensionsV1beta1().CustomResourceDefinitions().Get(context.TODO(), name, metav1.GetOptions{}) nonCriticalErrors, criticalError := errors.HandleError(err) if criticalError != nil { return nil, criticalError diff --git a/src/app/backend/resource/customresourcedefinition/v1beta1/objects.go b/src/app/backend/resource/customresourcedefinition/v1beta1/objects.go index 750d7dce6966..3466e99fa686 100644 --- a/src/app/backend/resource/customresourcedefinition/v1beta1/objects.go +++ b/src/app/backend/resource/customresourcedefinition/v1beta1/objects.go @@ -15,6 +15,7 @@ package v1beta1 import ( + "context" "encoding/json" apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" @@ -36,7 +37,7 @@ func GetCustomResourceObjectList(client apiextensionsclientset.Interface, config customResourceDefinition, err := client.ApiextensionsV1beta1(). CustomResourceDefinitions(). - Get(crdName, metav1.GetOptions{}) + Get(context.TODO(), crdName, metav1.GetOptions{}) nonCriticalErrors, criticalError := errors.HandleError(err) if criticalError != nil { return nil, criticalError @@ -51,7 +52,7 @@ func GetCustomResourceObjectList(client apiextensionsclientset.Interface, config raw, err := restClient.Get(). NamespaceIfScoped(namespace.ToRequestParam(), customResourceDefinition.Spec.Scope == apiextensions.NamespaceScoped). Resource(customResourceDefinition.Spec.Names.Plural). - Do().Raw() + Do(context.TODO()).Raw() nonCriticalErrors, criticalError = errors.AppendError(err, nonCriticalErrors) if criticalError != nil { return nil, criticalError @@ -82,7 +83,7 @@ func GetCustomResourceObjectDetail(client apiextensionsclientset.Interface, name customResourceDefinition, err := client.ApiextensionsV1beta1(). CustomResourceDefinitions(). - Get(crdName, metav1.GetOptions{}) + Get(context.TODO(), crdName, metav1.GetOptions{}) nonCriticalErrors, criticalError := errors.HandleError(err) if criticalError != nil { return nil, criticalError @@ -97,7 +98,7 @@ func GetCustomResourceObjectDetail(client apiextensionsclientset.Interface, name raw, err := restClient.Get(). NamespaceIfScoped(namespace.ToRequestParam(), customResourceDefinition.Spec.Scope == apiextensions.NamespaceScoped). Resource(customResourceDefinition.Spec.Names.Plural). - Name(name).Do().Raw() + Name(name).Do(context.TODO()).Raw() nonCriticalErrors, criticalError = errors.AppendError(err, nonCriticalErrors) if criticalError != nil { return nil, criticalError diff --git a/src/app/backend/resource/daemonset/common.go b/src/app/backend/resource/daemonset/common.go index 09490480a0a8..e3a25e55d692 100644 --- a/src/app/backend/resource/daemonset/common.go +++ b/src/app/backend/resource/daemonset/common.go @@ -15,6 +15,8 @@ package daemonset import ( + "context" + "github.com/kubernetes/dashboard/src/app/backend/api" metricapi "github.com/kubernetes/dashboard/src/app/backend/integration/metric/api" "github.com/kubernetes/dashboard/src/app/backend/resource/common" @@ -34,7 +36,7 @@ import ( func GetServicesForDSDeletion(client client.Interface, labelSelector labels.Selector, namespace string) ([]v1.Service, error) { - daemonSet, err := client.AppsV1().DaemonSets(namespace).List(metaV1.ListOptions{ + daemonSet, err := client.AppsV1().DaemonSets(namespace).List(context.TODO(), metaV1.ListOptions{ LabelSelector: labelSelector.String(), FieldSelector: fields.Everything().String(), }) @@ -49,7 +51,7 @@ func GetServicesForDSDeletion(client client.Interface, labelSelector labels.Sele return []v1.Service{}, nil } - services, err := client.CoreV1().Services(namespace).List(metaV1.ListOptions{ + services, err := client.CoreV1().Services(namespace).List(context.TODO(), metaV1.ListOptions{ LabelSelector: labelSelector.String(), FieldSelector: fields.Everything().String(), }) diff --git a/src/app/backend/resource/daemonset/detail.go b/src/app/backend/resource/daemonset/detail.go index 473590307cf9..148a66f85bd3 100644 --- a/src/app/backend/resource/daemonset/detail.go +++ b/src/app/backend/resource/daemonset/detail.go @@ -15,6 +15,7 @@ package daemonset import ( + "context" "log" metricapi "github.com/kubernetes/dashboard/src/app/backend/integration/metric/api" @@ -40,7 +41,7 @@ func GetDaemonSetDetail(client k8sClient.Interface, metricClient metricapi.Metri namespace, name string) (*DaemonSetDetail, error) { log.Printf("Getting details of %s daemon set in %s namespace", name, namespace) - daemonSet, err := client.AppsV1().DaemonSets(namespace).Get(name, metaV1.GetOptions{}) + daemonSet, err := client.AppsV1().DaemonSets(namespace).Get(context.TODO(), name, metaV1.GetOptions{}) if err != nil { return nil, err } diff --git a/src/app/backend/resource/daemonset/pods.go b/src/app/backend/resource/daemonset/pods.go index ee1680903458..6aeef63dbd80 100644 --- a/src/app/backend/resource/daemonset/pods.go +++ b/src/app/backend/resource/daemonset/pods.go @@ -15,6 +15,7 @@ package daemonset import ( + "context" "log" "github.com/kubernetes/dashboard/src/app/backend/errors" @@ -50,7 +51,7 @@ func GetDaemonSetPods(client k8sClient.Interface, metricClient metricapi.MetricC // Returns array of api pods targeting daemon set with given name. func getRawDaemonSetPods(client k8sClient.Interface, daemonSetName, namespace string) ([]api.Pod, error) { - daemonSet, err := client.AppsV1().DaemonSets(namespace).Get(daemonSetName, metaV1.GetOptions{}) + daemonSet, err := client.AppsV1().DaemonSets(namespace).Get(context.TODO(), daemonSetName, metaV1.GetOptions{}) if err != nil { return nil, err } diff --git a/src/app/backend/resource/daemonset/services.go b/src/app/backend/resource/daemonset/services.go index dfdd5c9da2ba..d07c75322556 100644 --- a/src/app/backend/resource/daemonset/services.go +++ b/src/app/backend/resource/daemonset/services.go @@ -15,6 +15,8 @@ package daemonset import ( + "context" + "github.com/kubernetes/dashboard/src/app/backend/errors" "github.com/kubernetes/dashboard/src/app/backend/resource/common" "github.com/kubernetes/dashboard/src/app/backend/resource/dataselect" @@ -28,7 +30,7 @@ import ( func GetDaemonSetServices(client client.Interface, dsQuery *dataselect.DataSelectQuery, namespace, name string) (*service.ServiceList, error) { - daemonSet, err := client.AppsV1().DaemonSets(namespace).Get(name, metaV1.GetOptions{}) + daemonSet, err := client.AppsV1().DaemonSets(namespace).Get(context.TODO(), name, metaV1.GetOptions{}) if err != nil { return nil, err } diff --git a/src/app/backend/resource/deployment/deploy.go b/src/app/backend/resource/deployment/deploy.go index 92cfab44d2ce..3d66803dff29 100644 --- a/src/app/backend/resource/deployment/deploy.go +++ b/src/app/backend/resource/deployment/deploy.go @@ -15,6 +15,7 @@ package deployment import ( + "context" "fmt" "io" "log" @@ -219,7 +220,7 @@ func DeployApp(spec *AppDeploymentSpec, client client.Interface) error { }, }, } - _, err := client.AppsV1().Deployments(spec.Namespace).Create(deployment) + _, err := client.AppsV1().Deployments(spec.Namespace).Create(context.TODO(), deployment, metaV1.CreateOptions{}) if err != nil { return err @@ -253,7 +254,7 @@ func DeployApp(spec *AppDeploymentSpec, client client.Interface) error { service.Spec.Ports = append(service.Spec.Ports, servicePort) } - _, err = client.CoreV1().Services(spec.Namespace).Create(service) + _, err = client.CoreV1().Services(spec.Namespace).Create(context.TODO(), service, metaV1.CreateOptions{}) return err } @@ -355,9 +356,9 @@ func DeployAppFromFile(cfg *rest.Config, spec *AppDeploymentFromFileSpec) (bool, } if resource.Namespaced { - _, err = dynamicClient.Resource(groupVersionResource).Namespace(namespace).Create(data, metaV1.CreateOptions{}) + _, err = dynamicClient.Resource(groupVersionResource).Namespace(namespace).Create(context.TODO(), data, metaV1.CreateOptions{}) } else { - _, err = dynamicClient.Resource(groupVersionResource).Create(data, metaV1.CreateOptions{}) + _, err = dynamicClient.Resource(groupVersionResource).Create(context.TODO(), data, metaV1.CreateOptions{}) } if err != nil { diff --git a/src/app/backend/resource/deployment/detail.go b/src/app/backend/resource/deployment/detail.go index 29ce2ab55529..630ae4a1a523 100644 --- a/src/app/backend/resource/deployment/detail.go +++ b/src/app/backend/resource/deployment/detail.go @@ -15,6 +15,7 @@ package deployment import ( + "context" "log" "github.com/kubernetes/dashboard/src/app/backend/errors" @@ -83,7 +84,7 @@ func GetDeploymentDetail(client client.Interface, namespace string, deploymentNa log.Printf("Getting details of %s deployment in %s namespace", deploymentName, namespace) - deployment, err := client.AppsV1().Deployments(namespace).Get(deploymentName, metaV1.GetOptions{}) + deployment, err := client.AppsV1().Deployments(namespace).Get(context.TODO(), deploymentName, metaV1.GetOptions{}) if err != nil { return nil, err } diff --git a/src/app/backend/resource/deployment/newreplicasets.go b/src/app/backend/resource/deployment/newreplicasets.go index fc63cf495f4d..926573e031c6 100644 --- a/src/app/backend/resource/deployment/newreplicasets.go +++ b/src/app/backend/resource/deployment/newreplicasets.go @@ -15,6 +15,8 @@ package deployment import ( + "context" + apps "k8s.io/api/apps/v1" metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1" client "k8s.io/client-go/kubernetes" @@ -31,7 +33,7 @@ func GetDeploymentNewReplicaSet(client client.Interface, dsQuery *dataselect.Dat newReplicaSet := &replicaset.ReplicaSet{} - deployment, err := client.AppsV1().Deployments(namespace).Get(deploymentName, metaV1.GetOptions{}) + deployment, err := client.AppsV1().Deployments(namespace).Get(context.TODO(), deploymentName, metaV1.GetOptions{}) if err != nil { return newReplicaSet, err } diff --git a/src/app/backend/resource/deployment/oldreplicasets.go b/src/app/backend/resource/deployment/oldreplicasets.go index 2f79af25a39d..ccf2d6567a6f 100644 --- a/src/app/backend/resource/deployment/oldreplicasets.go +++ b/src/app/backend/resource/deployment/oldreplicasets.go @@ -15,6 +15,8 @@ package deployment import ( + "context" + "github.com/kubernetes/dashboard/src/app/backend/api" "github.com/kubernetes/dashboard/src/app/backend/errors" "github.com/kubernetes/dashboard/src/app/backend/resource/common" @@ -34,7 +36,7 @@ func GetDeploymentOldReplicaSets(client client.Interface, dsQuery *dataselect.Da ListMeta: api.ListMeta{TotalItems: 0}, } - deployment, err := client.AppsV1().Deployments(namespace).Get(deploymentName, metaV1.GetOptions{}) + deployment, err := client.AppsV1().Deployments(namespace).Get(context.TODO(), deploymentName, metaV1.GetOptions{}) if err != nil { return oldReplicaSetList, err } diff --git a/src/app/backend/resource/deployment/pods.go b/src/app/backend/resource/deployment/pods.go index b7f95775bc0e..177be6dfc01a 100644 --- a/src/app/backend/resource/deployment/pods.go +++ b/src/app/backend/resource/deployment/pods.go @@ -15,6 +15,8 @@ package deployment import ( + "context" + "github.com/kubernetes/dashboard/src/app/backend/errors" metricapi "github.com/kubernetes/dashboard/src/app/backend/integration/metric/api" "github.com/kubernetes/dashboard/src/app/backend/resource/common" @@ -29,7 +31,7 @@ import ( func GetDeploymentPods(client client.Interface, metricClient metricapi.MetricClient, dsQuery *dataselect.DataSelectQuery, namespace, deploymentName string) (*pod.PodList, error) { - deployment, err := client.AppsV1().Deployments(namespace).Get(deploymentName, metaV1.GetOptions{}) + deployment, err := client.AppsV1().Deployments(namespace).Get(context.TODO(), deploymentName, metaV1.GetOptions{}) if err != nil { return pod.EmptyPodList, err } diff --git a/src/app/backend/resource/event/common.go b/src/app/backend/resource/event/common.go index ca990801cfca..4ae12d0b6251 100644 --- a/src/app/backend/resource/event/common.go +++ b/src/app/backend/resource/event/common.go @@ -15,6 +15,8 @@ package event import ( + "context" + "github.com/kubernetes/dashboard/src/app/backend/api" "github.com/kubernetes/dashboard/src/app/backend/errors" "github.com/kubernetes/dashboard/src/app/backend/resource/common" @@ -128,7 +130,7 @@ func GetNodeEvents(client kubernetes.Interface, dsQuery *dataselect.DataSelectQu scheme.AddKnownTypes(groupVersion, &v1.Node{}) mc := client.CoreV1().Nodes() - node, err := mc.Get(nodeName, metaV1.GetOptions{}) + node, err := mc.Get(context.TODO(), nodeName, metaV1.GetOptions{}) if err != nil { return &eventList, err } @@ -144,7 +146,7 @@ func GetNodeEvents(client kubernetes.Interface, dsQuery *dataselect.DataSelectQu // GetNamespaceEvents gets events associated to a namespace with given name. func GetNamespaceEvents(client kubernetes.Interface, dsQuery *dataselect.DataSelectQuery, namespace string) (common.EventList, error) { - events, _ := client.CoreV1().Events(namespace).List(api.ListEverything) + events, _ := client.CoreV1().Events(namespace).List(context.TODO(), api.ListEverything) return CreateEventList(FillEventsType(events.Items), dsQuery), nil } diff --git a/src/app/backend/resource/horizontalpodautoscaler/detail.go b/src/app/backend/resource/horizontalpodautoscaler/detail.go index f0e158e84458..2648d42293ef 100644 --- a/src/app/backend/resource/horizontalpodautoscaler/detail.go +++ b/src/app/backend/resource/horizontalpodautoscaler/detail.go @@ -15,6 +15,7 @@ package horizontalpodautoscaler import ( + "context" "log" autoscaling "k8s.io/api/autoscaling/v1" @@ -36,7 +37,7 @@ type HorizontalPodAutoscalerDetail struct { func GetHorizontalPodAutoscalerDetail(client client.Interface, namespace string, name string) (*HorizontalPodAutoscalerDetail, error) { log.Printf("Getting details of %s horizontal pod autoscaler", name) - rawHorizontalPodAutoscaler, err := client.AutoscalingV1().HorizontalPodAutoscalers(namespace).Get(name, v1.GetOptions{}) + rawHorizontalPodAutoscaler, err := client.AutoscalingV1().HorizontalPodAutoscalers(namespace).Get(context.TODO(), name, v1.GetOptions{}) if err != nil { return nil, err } diff --git a/src/app/backend/resource/ingress/detail.go b/src/app/backend/resource/ingress/detail.go index 1fa43bedfced..1212119ed3be 100644 --- a/src/app/backend/resource/ingress/detail.go +++ b/src/app/backend/resource/ingress/detail.go @@ -15,6 +15,7 @@ package ingress import ( + "context" "log" extensions "k8s.io/api/extensions/v1beta1" @@ -42,7 +43,7 @@ type IngressDetail struct { func GetIngressDetail(client client.Interface, namespace, name string) (*IngressDetail, error) { log.Printf("Getting details of %s ingress in %s namespace", name, namespace) - rawIngress, err := client.ExtensionsV1beta1().Ingresses(namespace).Get(name, metaV1.GetOptions{}) + rawIngress, err := client.ExtensionsV1beta1().Ingresses(namespace).Get(context.TODO(), name, metaV1.GetOptions{}) if err != nil { return nil, err diff --git a/src/app/backend/resource/ingress/list.go b/src/app/backend/resource/ingress/list.go index 61c347ff1716..f38128be9fe8 100644 --- a/src/app/backend/resource/ingress/list.go +++ b/src/app/backend/resource/ingress/list.go @@ -15,6 +15,8 @@ package ingress import ( + "context" + "github.com/kubernetes/dashboard/src/app/backend/api" "github.com/kubernetes/dashboard/src/app/backend/errors" "github.com/kubernetes/dashboard/src/app/backend/resource/common" @@ -46,7 +48,7 @@ type IngressList struct { // GetIngressList returns all ingresses in the given namespace. func GetIngressList(client client.Interface, namespace *common.NamespaceQuery, dsQuery *dataselect.DataSelectQuery) (*IngressList, error) { - ingressList, err := client.ExtensionsV1beta1().Ingresses(namespace.ToRequestParam()).List(api.ListEverything) + ingressList, err := client.ExtensionsV1beta1().Ingresses(namespace.ToRequestParam()).List(context.TODO(), api.ListEverything) nonCriticalErrors, criticalError := errors.HandleError(err) if criticalError != nil { diff --git a/src/app/backend/resource/job/detail.go b/src/app/backend/resource/job/detail.go index adfe65454991..ad76340d508b 100644 --- a/src/app/backend/resource/job/detail.go +++ b/src/app/backend/resource/job/detail.go @@ -15,6 +15,8 @@ package job import ( + "context" + "github.com/kubernetes/dashboard/src/app/backend/errors" "github.com/kubernetes/dashboard/src/app/backend/resource/common" batch "k8s.io/api/batch/v1" @@ -36,7 +38,7 @@ type JobDetail struct { // GetJobDetail gets job details. func GetJobDetail(client k8sClient.Interface, namespace, name string) (*JobDetail, error) { - jobData, err := client.BatchV1().Jobs(namespace).Get(name, metaV1.GetOptions{}) + jobData, err := client.BatchV1().Jobs(namespace).Get(context.TODO(), name, metaV1.GetOptions{}) if err != nil { return nil, err } diff --git a/src/app/backend/resource/job/pods.go b/src/app/backend/resource/job/pods.go index d98faf2f6052..233b2227ca55 100644 --- a/src/app/backend/resource/job/pods.go +++ b/src/app/backend/resource/job/pods.go @@ -15,6 +15,7 @@ package job import ( + "context" "log" "github.com/kubernetes/dashboard/src/app/backend/errors" @@ -53,7 +54,7 @@ func GetJobPods(client k8sClient.Interface, metricClient metricapi.MetricClient, // Returns array of api pods targeting job with given name. func getRawJobPods(client k8sClient.Interface, petSetName, namespace string) ([]v1.Pod, error) { - job, err := client.BatchV1().Jobs(namespace).Get(petSetName, metaV1.GetOptions{}) + job, err := client.BatchV1().Jobs(namespace).Get(context.TODO(), petSetName, metaV1.GetOptions{}) if err != nil { return nil, err } diff --git a/src/app/backend/resource/logs/source.go b/src/app/backend/resource/logs/source.go index 2f2efa7e41e5..b1a6169cb8cc 100644 --- a/src/app/backend/resource/logs/source.go +++ b/src/app/backend/resource/logs/source.go @@ -15,6 +15,8 @@ package logs import ( + "context" + "github.com/kubernetes/dashboard/src/app/backend/api" "github.com/kubernetes/dashboard/src/app/backend/resource/common" "github.com/kubernetes/dashboard/src/app/backend/resource/controller" @@ -32,7 +34,7 @@ func GetLogSources(k8sClient kubernetes.Interface, ns string, resourceName strin // GetLogSourcesFromPod returns all containers for a given pod func getLogSourcesFromPod(k8sClient kubernetes.Interface, ns, resourceName string) (controller.LogSources, error) { - pod, err := k8sClient.CoreV1().Pods(ns).Get(resourceName, meta.GetOptions{}) + pod, err := k8sClient.CoreV1().Pods(ns).Get(context.TODO(), resourceName, meta.GetOptions{}) if err != nil { return controller.LogSources{}, err } @@ -50,7 +52,7 @@ func getLogSourcesFromController(k8sClient kubernetes.Interface, ns, resourceNam if err != nil { return controller.LogSources{}, err } - allPods, err := k8sClient.CoreV1().Pods(ns).List(api.ListEverything) + allPods, err := k8sClient.CoreV1().Pods(ns).List(context.TODO(), api.ListEverything) if err != nil { return controller.LogSources{}, err } diff --git a/src/app/backend/resource/namespace/common.go b/src/app/backend/resource/namespace/common.go index 47cbd531a6bc..a00861718510 100644 --- a/src/app/backend/resource/namespace/common.go +++ b/src/app/backend/resource/namespace/common.go @@ -15,6 +15,7 @@ package namespace import ( + "context" "log" "github.com/kubernetes/dashboard/src/app/backend/resource/dataselect" @@ -39,7 +40,7 @@ func CreateNamespace(spec *NamespaceSpec, client kubernetes.Interface) error { }, } - _, err := client.CoreV1().Namespaces().Create(namespace) + _, err := client.CoreV1().Namespaces().Create(context.TODO(), namespace, metaV1.CreateOptions{}) return err } diff --git a/src/app/backend/resource/namespace/detail.go b/src/app/backend/resource/namespace/detail.go index f4003fb397a3..5e627c78716c 100644 --- a/src/app/backend/resource/namespace/detail.go +++ b/src/app/backend/resource/namespace/detail.go @@ -15,6 +15,7 @@ package namespace import ( + "context" "log" "github.com/kubernetes/dashboard/src/app/backend/api" @@ -46,7 +47,7 @@ type NamespaceDetail struct { func GetNamespaceDetail(client k8sClient.Interface, name string) (*NamespaceDetail, error) { log.Printf("Getting details of %s namespace\n", name) - namespace, err := client.CoreV1().Namespaces().Get(name, metaV1.GetOptions{}) + namespace, err := client.CoreV1().Namespaces().Get(context.TODO(), name, metaV1.GetOptions{}) if err != nil { return nil, err } @@ -79,7 +80,7 @@ func toNamespaceDetail(namespace v1.Namespace, resourceQuotaList *rq.ResourceQuo } func getResourceQuotas(client k8sClient.Interface, namespace v1.Namespace) (*rq.ResourceQuotaDetailList, error) { - list, err := client.CoreV1().ResourceQuotas(namespace.Name).List(api.ListEverything) + list, err := client.CoreV1().ResourceQuotas(namespace.Name).List(context.TODO(), api.ListEverything) result := &rq.ResourceQuotaDetailList{ Items: make([]rq.ResourceQuotaDetail, 0), @@ -95,7 +96,7 @@ func getResourceQuotas(client k8sClient.Interface, namespace v1.Namespace) (*rq. } func getLimitRanges(client k8sClient.Interface, namespace v1.Namespace) ([]limitrange.LimitRangeItem, error) { - list, err := client.CoreV1().LimitRanges(namespace.Name).List(api.ListEverything) + list, err := client.CoreV1().LimitRanges(namespace.Name).List(context.TODO(), api.ListEverything) if err != nil { return nil, err } diff --git a/src/app/backend/resource/namespace/list.go b/src/app/backend/resource/namespace/list.go index c973d073ff84..fb154c17d0b9 100644 --- a/src/app/backend/resource/namespace/list.go +++ b/src/app/backend/resource/namespace/list.go @@ -15,6 +15,7 @@ package namespace import ( + "context" "log" "github.com/kubernetes/dashboard/src/app/backend/api" @@ -62,7 +63,7 @@ func GetNamespaceListFromChannels(channels *common.ResourceChannels, dsQuery *da // GetNamespaceList returns a list of all namespaces in the cluster. func GetNamespaceList(client kubernetes.Interface, dsQuery *dataselect.DataSelectQuery) (*NamespaceList, error) { log.Println("Getting list of namespaces") - namespaces, err := client.CoreV1().Namespaces().List(api.ListEverything) + namespaces, err := client.CoreV1().Namespaces().List(context.TODO(), api.ListEverything) nonCriticalErrors, criticalError := errors.HandleError(err) if criticalError != nil { diff --git a/src/app/backend/resource/node/detail.go b/src/app/backend/resource/node/detail.go index 960fe49d2bb1..61c561e9c744 100644 --- a/src/app/backend/resource/node/detail.go +++ b/src/app/backend/resource/node/detail.go @@ -15,6 +15,7 @@ package node import ( + "context" "log" "github.com/kubernetes/dashboard/src/app/backend/api" @@ -126,7 +127,7 @@ func GetNodeDetail(client k8sClient.Interface, metricClient metricapi.MetricClie dsQuery *dataselect.DataSelectQuery) (*NodeDetail, error) { log.Printf("Getting details of %s node", name) - node, err := client.CoreV1().Nodes().Get(name, metaV1.GetOptions{}) + node, err := client.CoreV1().Nodes().Get(context.TODO(), name, metaV1.GetOptions{}) if err != nil { return nil, err } @@ -295,7 +296,7 @@ func GetNodePods(client k8sClient.Interface, metricClient metricapi.MetricClient CumulativeMetrics: []metricapi.Metric{}, } - node, err := client.CoreV1().Nodes().Get(name, metaV1.GetOptions{}) + node, err := client.CoreV1().Nodes().Get(context.TODO(), name, metaV1.GetOptions{}) if err != nil { return &podList, err } @@ -324,7 +325,7 @@ func getNodePods(client k8sClient.Interface, node v1.Node) (*v1.PodList, error) return nil, err } - return client.CoreV1().Pods(v1.NamespaceAll).List(metaV1.ListOptions{ + return client.CoreV1().Pods(v1.NamespaceAll).List(context.TODO(), metaV1.ListOptions{ FieldSelector: fieldSelector.String(), }) } diff --git a/src/app/backend/resource/node/list.go b/src/app/backend/resource/node/list.go index 2776f4dfa546..0016ae7d7187 100644 --- a/src/app/backend/resource/node/list.go +++ b/src/app/backend/resource/node/list.go @@ -15,6 +15,7 @@ package node import ( + "context" "log" v1 "k8s.io/api/core/v1" @@ -47,7 +48,7 @@ type Node struct { // GetNodeList returns a list of all Nodes in the cluster. func GetNodeList(client client.Interface, dsQuery *dataselect.DataSelectQuery, metricClient metricapi.MetricClient) (*NodeList, error) { - nodes, err := client.CoreV1().Nodes().List(api.ListEverything) + nodes, err := client.CoreV1().Nodes().List(context.TODO(), api.ListEverything) nonCriticalErrors, criticalError := errors.HandleError(err) if criticalError != nil { diff --git a/src/app/backend/resource/persistentvolume/common.go b/src/app/backend/resource/persistentvolume/common.go index 776ffeb34bf8..da0f12ac63d2 100644 --- a/src/app/backend/resource/persistentvolume/common.go +++ b/src/app/backend/resource/persistentvolume/common.go @@ -15,6 +15,7 @@ package persistentvolume import ( + "context" "log" "strings" @@ -30,7 +31,7 @@ import ( func GetStorageClassPersistentVolumes(client client.Interface, storageClassName string, dsQuery *dataselect.DataSelectQuery) (*PersistentVolumeList, error) { - storageClass, err := client.StorageV1().StorageClasses().Get(storageClassName, metaV1.GetOptions{}) + storageClass, err := client.StorageV1().StorageClasses().Get(context.TODO(), storageClassName, metaV1.GetOptions{}) if err != nil { return nil, err diff --git a/src/app/backend/resource/persistentvolume/detail.go b/src/app/backend/resource/persistentvolume/detail.go index 753088e873fb..8e990a8e9ce9 100644 --- a/src/app/backend/resource/persistentvolume/detail.go +++ b/src/app/backend/resource/persistentvolume/detail.go @@ -15,6 +15,7 @@ package persistentvolume import ( + "context" "log" v1 "k8s.io/api/core/v1" @@ -35,7 +36,7 @@ type PersistentVolumeDetail struct { func GetPersistentVolumeDetail(client client.Interface, name string) (*PersistentVolumeDetail, error) { log.Printf("Getting details of %s persistent volume", name) - rawPersistentVolume, err := client.CoreV1().PersistentVolumes().Get(name, metaV1.GetOptions{}) + rawPersistentVolume, err := client.CoreV1().PersistentVolumes().Get(context.TODO(), name, metaV1.GetOptions{}) if err != nil { return nil, err } diff --git a/src/app/backend/resource/persistentvolumeclaim/common.go b/src/app/backend/resource/persistentvolumeclaim/common.go index 367c78b3cc12..9e17f261b9e0 100644 --- a/src/app/backend/resource/persistentvolumeclaim/common.go +++ b/src/app/backend/resource/persistentvolumeclaim/common.go @@ -15,6 +15,7 @@ package persistentvolumeclaim import ( + "context" "log" "strings" @@ -34,7 +35,7 @@ type PersistentVolumeClaimCell api.PersistentVolumeClaim func GetPodPersistentVolumeClaims(client client.Interface, namespace string, podName string, dsQuery *dataselect.DataSelectQuery) (*PersistentVolumeClaimList, error) { - pod, err := client.CoreV1().Pods(namespace).Get(podName, metaV1.GetOptions{}) + pod, err := client.CoreV1().Pods(namespace).Get(context.TODO(), podName, metaV1.GetOptions{}) if err != nil { return nil, err } diff --git a/src/app/backend/resource/persistentvolumeclaim/detail.go b/src/app/backend/resource/persistentvolumeclaim/detail.go index 8eec5d2c519d..89e5fedb8448 100644 --- a/src/app/backend/resource/persistentvolumeclaim/detail.go +++ b/src/app/backend/resource/persistentvolumeclaim/detail.go @@ -15,6 +15,7 @@ package persistentvolumeclaim import ( + "context" "log" v1 "k8s.io/api/core/v1" @@ -32,7 +33,7 @@ type PersistentVolumeClaimDetail struct { func GetPersistentVolumeClaimDetail(client kubernetes.Interface, namespace string, name string) (*PersistentVolumeClaimDetail, error) { log.Printf("Getting details of %s persistent volume claim", name) - pvc, err := client.CoreV1().PersistentVolumeClaims(namespace).Get(name, metaV1.GetOptions{}) + pvc, err := client.CoreV1().PersistentVolumeClaims(namespace).Get(context.TODO(), name, metaV1.GetOptions{}) if err != nil { return nil, err } diff --git a/src/app/backend/resource/pod/detail.go b/src/app/backend/resource/pod/detail.go index d7d5f420669d..ffc33ac67a8f 100644 --- a/src/app/backend/resource/pod/detail.go +++ b/src/app/backend/resource/pod/detail.go @@ -15,6 +15,7 @@ package pod import ( + "context" "encoding/base64" "fmt" "log" @@ -100,7 +101,7 @@ func GetPodDetail(client kubernetes.Interface, metricClient metricapi.MetricClie SecretList: common.GetSecretListChannel(client, common.NewSameNamespaceQuery(namespace), 1), } - pod, err := client.CoreV1().Pods(namespace).Get(name, metaV1.GetOptions{}) + pod, err := client.CoreV1().Pods(namespace).Get(context.TODO(), name, metaV1.GetOptions{}) if err != nil { return nil, err } diff --git a/src/app/backend/resource/replicaset/detail.go b/src/app/backend/resource/replicaset/detail.go index 7b77b4d09b20..0c3fe946f860 100644 --- a/src/app/backend/resource/replicaset/detail.go +++ b/src/app/backend/resource/replicaset/detail.go @@ -15,6 +15,7 @@ package replicaset import ( + "context" "log" "github.com/kubernetes/dashboard/src/app/backend/errors" @@ -48,7 +49,7 @@ func GetReplicaSetDetail(client k8sClient.Interface, metricClient metricapi.Metr namespace, name string) (*ReplicaSetDetail, error) { log.Printf("Getting details of %s service in %s namespace", name, namespace) - rs, err := client.AppsV1().ReplicaSets(namespace).Get(name, metaV1.GetOptions{}) + rs, err := client.AppsV1().ReplicaSets(namespace).Get(context.TODO(), name, metaV1.GetOptions{}) if err != nil { return nil, err } diff --git a/src/app/backend/resource/replicaset/pods.go b/src/app/backend/resource/replicaset/pods.go index 6f25cb9405ef..eb6f2fbae0a4 100644 --- a/src/app/backend/resource/replicaset/pods.go +++ b/src/app/backend/resource/replicaset/pods.go @@ -15,6 +15,7 @@ package replicaset import ( + "context" "log" "github.com/kubernetes/dashboard/src/app/backend/errors" @@ -51,7 +52,7 @@ func GetReplicaSetPods(client k8sClient.Interface, metricClient metricapi.Metric } func getRawReplicaSetPods(client k8sClient.Interface, replicaSetName, namespace string) ([]v1.Pod, error) { - rs, err := client.AppsV1().ReplicaSets(namespace).Get(replicaSetName, metaV1.GetOptions{}) + rs, err := client.AppsV1().ReplicaSets(namespace).Get(context.TODO(), replicaSetName, metaV1.GetOptions{}) if err != nil { return nil, err } diff --git a/src/app/backend/resource/replicaset/services.go b/src/app/backend/resource/replicaset/services.go index d2b5d0d7b709..40e51864234b 100644 --- a/src/app/backend/resource/replicaset/services.go +++ b/src/app/backend/resource/replicaset/services.go @@ -15,6 +15,8 @@ package replicaset import ( + "context" + "github.com/kubernetes/dashboard/src/app/backend/errors" "github.com/kubernetes/dashboard/src/app/backend/resource/common" "github.com/kubernetes/dashboard/src/app/backend/resource/dataselect" @@ -27,7 +29,7 @@ import ( func GetReplicaSetServices(client client.Interface, dsQuery *dataselect.DataSelectQuery, namespace, name string) (*service.ServiceList, error) { - replicaSet, err := client.AppsV1().ReplicaSets(namespace).Get(name, metaV1.GetOptions{}) + replicaSet, err := client.AppsV1().ReplicaSets(namespace).Get(context.TODO(), name, metaV1.GetOptions{}) if err != nil { return nil, err } diff --git a/src/app/backend/resource/replicationcontroller/common.go b/src/app/backend/resource/replicationcontroller/common.go index a07369f8854b..29f55b5fbc26 100644 --- a/src/app/backend/resource/replicationcontroller/common.go +++ b/src/app/backend/resource/replicationcontroller/common.go @@ -15,6 +15,8 @@ package replicationcontroller import ( + "context" + "github.com/kubernetes/dashboard/src/app/backend/api" metricapi "github.com/kubernetes/dashboard/src/app/backend/integration/metric/api" "github.com/kubernetes/dashboard/src/app/backend/resource/common" @@ -45,7 +47,7 @@ func toLabelSelector(selector map[string]string) (labels.Selector, error) { func getServicesForDeletion(client client.Interface, labelSelector labels.Selector, namespace string) ([]v1.Service, error) { - replicationControllers, err := client.CoreV1().ReplicationControllers(namespace).List(metaV1.ListOptions{ + replicationControllers, err := client.CoreV1().ReplicationControllers(namespace).List(context.TODO(), metaV1.ListOptions{ LabelSelector: labelSelector.String(), FieldSelector: fields.Everything().String(), }) @@ -60,7 +62,7 @@ func getServicesForDeletion(client client.Interface, labelSelector labels.Select return []v1.Service{}, nil } - services, err := client.CoreV1().Services(namespace).List(metaV1.ListOptions{ + services, err := client.CoreV1().Services(namespace).List(context.TODO(), metaV1.ListOptions{ LabelSelector: labelSelector.String(), FieldSelector: fields.Everything().String(), }) diff --git a/src/app/backend/resource/replicationcontroller/detail.go b/src/app/backend/resource/replicationcontroller/detail.go index 84389c989019..151f27c32b6e 100644 --- a/src/app/backend/resource/replicationcontroller/detail.go +++ b/src/app/backend/resource/replicationcontroller/detail.go @@ -15,6 +15,7 @@ package replicationcontroller import ( + "context" "log" "github.com/kubernetes/dashboard/src/app/backend/errors" @@ -46,7 +47,7 @@ type ReplicationControllerSpec struct { func GetReplicationControllerDetail(client k8sClient.Interface, namespace, name string) (*ReplicationControllerDetail, error) { log.Printf("Getting details of %s replication controller in %s namespace", name, namespace) - replicationController, err := client.CoreV1().ReplicationControllers(namespace).Get(name, metaV1.GetOptions{}) + replicationController, err := client.CoreV1().ReplicationControllers(namespace).Get(context.TODO(), name, metaV1.GetOptions{}) if err != nil { return nil, err } @@ -66,14 +67,14 @@ func UpdateReplicasCount(client k8sClient.Interface, namespace, name string, spe log.Printf("Updating replicas count to %d for %s replication controller from %s namespace", spec.Replicas, name, namespace) - replicationController, err := client.CoreV1().ReplicationControllers(namespace).Get(name, metaV1.GetOptions{}) + replicationController, err := client.CoreV1().ReplicationControllers(namespace).Get(context.TODO(), name, metaV1.GetOptions{}) if err != nil { return err } replicationController.Spec.Replicas = &spec.Replicas - _, err = client.CoreV1().ReplicationControllers(namespace).Update(replicationController) + _, err = client.CoreV1().ReplicationControllers(namespace).Update(context.TODO(), replicationController, metaV1.UpdateOptions{}) if err != nil { return err } diff --git a/src/app/backend/resource/replicationcontroller/pods.go b/src/app/backend/resource/replicationcontroller/pods.go index 7053875339db..324daca66cf6 100644 --- a/src/app/backend/resource/replicationcontroller/pods.go +++ b/src/app/backend/resource/replicationcontroller/pods.go @@ -15,6 +15,7 @@ package replicationcontroller import ( + "context" "log" "github.com/kubernetes/dashboard/src/app/backend/errors" @@ -51,7 +52,7 @@ func GetReplicationControllerPods(client k8sClient.Interface, } func getRawReplicationControllerPods(client k8sClient.Interface, rcName, namespace string) ([]v1.Pod, error) { - rc, err := client.CoreV1().ReplicationControllers(namespace).Get(rcName, metaV1.GetOptions{}) + rc, err := client.CoreV1().ReplicationControllers(namespace).Get(context.TODO(), rcName, metaV1.GetOptions{}) if err != nil { return nil, err } diff --git a/src/app/backend/resource/replicationcontroller/services.go b/src/app/backend/resource/replicationcontroller/services.go index 6afaf81ad54b..d15545a93c48 100644 --- a/src/app/backend/resource/replicationcontroller/services.go +++ b/src/app/backend/resource/replicationcontroller/services.go @@ -15,6 +15,8 @@ package replicationcontroller import ( + "context" + "github.com/kubernetes/dashboard/src/app/backend/errors" "github.com/kubernetes/dashboard/src/app/backend/resource/common" "github.com/kubernetes/dashboard/src/app/backend/resource/dataselect" @@ -28,7 +30,7 @@ import ( func GetReplicationControllerServices(client client.Interface, dsQuery *dataselect.DataSelectQuery, namespace, rcName string) (*service.ServiceList, error) { - replicationController, err := client.CoreV1().ReplicationControllers(namespace).Get(rcName, metaV1.GetOptions{}) + replicationController, err := client.CoreV1().ReplicationControllers(namespace).Get(context.TODO(), rcName, metaV1.GetOptions{}) if err != nil { return nil, err } diff --git a/src/app/backend/resource/role/detail.go b/src/app/backend/resource/role/detail.go index 9d5bbac5f1d3..14b65925b54b 100644 --- a/src/app/backend/resource/role/detail.go +++ b/src/app/backend/resource/role/detail.go @@ -15,6 +15,8 @@ package role import ( + "context" + rbac "k8s.io/api/rbac/v1" metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sClient "k8s.io/client-go/kubernetes" @@ -33,7 +35,7 @@ type RoleDetail struct { // GetRoleDetail gets Role details. func GetRoleDetail(client k8sClient.Interface, namespace, name string) (*RoleDetail, error) { - rawObject, err := client.RbacV1().Roles(namespace).Get(name, metaV1.GetOptions{}) + rawObject, err := client.RbacV1().Roles(namespace).Get(context.TODO(), name, metaV1.GetOptions{}) if err != nil { return nil, err } diff --git a/src/app/backend/resource/rolebinding/detail.go b/src/app/backend/resource/rolebinding/detail.go index ae534cad2ae2..0d326b9b2160 100644 --- a/src/app/backend/resource/rolebinding/detail.go +++ b/src/app/backend/resource/rolebinding/detail.go @@ -15,6 +15,8 @@ package rolebinding import ( + "context" + rbac "k8s.io/api/rbac/v1" metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sClient "k8s.io/client-go/kubernetes" @@ -35,7 +37,7 @@ type RoleBindingDetail struct { // GetRoleBindingDetail gets RoleBinding details. func GetRoleBindingDetail(client k8sClient.Interface, namespace, name string) (*RoleBindingDetail, error) { - rawObject, err := client.RbacV1().RoleBindings(namespace).Get(name, metaV1.GetOptions{}) + rawObject, err := client.RbacV1().RoleBindings(namespace).Get(context.TODO(), name, metaV1.GetOptions{}) if err != nil { return nil, err } diff --git a/src/app/backend/resource/secret/detail.go b/src/app/backend/resource/secret/detail.go index 29dd534a6a5b..9ef4b6d209d0 100644 --- a/src/app/backend/resource/secret/detail.go +++ b/src/app/backend/resource/secret/detail.go @@ -15,6 +15,7 @@ package secret import ( + "context" "log" v1 "k8s.io/api/core/v1" @@ -39,7 +40,7 @@ type SecretDetail struct { func GetSecretDetail(client kubernetes.Interface, namespace, name string) (*SecretDetail, error) { log.Printf("Getting details of %s secret in %s namespace\n", name, namespace) - rawSecret, err := client.CoreV1().Secrets(namespace).Get(name, metaV1.GetOptions{}) + rawSecret, err := client.CoreV1().Secrets(namespace).Get(context.TODO(), name, metaV1.GetOptions{}) if err != nil { return nil, err } diff --git a/src/app/backend/resource/secret/list.go b/src/app/backend/resource/secret/list.go index 592144d2b4bc..70e0c2cd21bb 100644 --- a/src/app/backend/resource/secret/list.go +++ b/src/app/backend/resource/secret/list.go @@ -15,6 +15,7 @@ package secret import ( + "context" "log" "github.com/kubernetes/dashboard/src/app/backend/api" @@ -85,7 +86,7 @@ type SecretList struct { func GetSecretList(client kubernetes.Interface, namespace *common.NamespaceQuery, dsQuery *dataselect.DataSelectQuery) (*SecretList, error) { log.Printf("Getting list of secrets in %s namespace\n", namespace) - secretList, err := client.CoreV1().Secrets(namespace.ToRequestParam()).List(api.ListEverything) + secretList, err := client.CoreV1().Secrets(namespace.ToRequestParam()).List(context.TODO(), api.ListEverything) nonCriticalErrors, criticalError := errors.HandleError(err) if criticalError != nil { @@ -106,7 +107,7 @@ func CreateSecret(client kubernetes.Interface, spec SecretSpec) (*Secret, error) Type: spec.GetType(), Data: spec.GetData(), } - _, err := client.CoreV1().Secrets(namespace).Create(secret) + _, err := client.CoreV1().Secrets(namespace).Create(context.TODO(), secret, metaV1.CreateOptions{}) result := toSecret(secret) return &result, err } diff --git a/src/app/backend/resource/service/detail.go b/src/app/backend/resource/service/detail.go index d772ce87501d..f9568090c8fe 100644 --- a/src/app/backend/resource/service/detail.go +++ b/src/app/backend/resource/service/detail.go @@ -15,6 +15,7 @@ package service import ( + "context" "log" "github.com/kubernetes/dashboard/src/app/backend/errors" @@ -42,7 +43,7 @@ type ServiceDetail struct { // GetServiceDetail gets service details. func GetServiceDetail(client k8sClient.Interface, namespace, name string) (*ServiceDetail, error) { log.Printf("Getting details of %s service in %s namespace", name, namespace) - serviceData, err := client.CoreV1().Services(namespace).Get(name, metaV1.GetOptions{}) + serviceData, err := client.CoreV1().Services(namespace).Get(context.TODO(), name, metaV1.GetOptions{}) if err != nil { return nil, err } diff --git a/src/app/backend/resource/service/pods.go b/src/app/backend/resource/service/pods.go index 0704ca46928c..ed49f3a6875a 100644 --- a/src/app/backend/resource/service/pods.go +++ b/src/app/backend/resource/service/pods.go @@ -15,6 +15,8 @@ package service import ( + "context" + "github.com/kubernetes/dashboard/src/app/backend/errors" metricapi "github.com/kubernetes/dashboard/src/app/backend/integration/metric/api" "github.com/kubernetes/dashboard/src/app/backend/resource/common" @@ -35,7 +37,7 @@ func GetServicePods(client k8sClient.Interface, metricClient metricapi.MetricCli CumulativeMetrics: []metricapi.Metric{}, } - service, err := client.CoreV1().Services(namespace).Get(name, metaV1.GetOptions{}) + service, err := client.CoreV1().Services(namespace).Get(context.TODO(), name, metaV1.GetOptions{}) if err != nil { return &podList, err } diff --git a/src/app/backend/resource/statefulset/detail.go b/src/app/backend/resource/statefulset/detail.go index 3be272454162..02fff026f55f 100644 --- a/src/app/backend/resource/statefulset/detail.go +++ b/src/app/backend/resource/statefulset/detail.go @@ -15,6 +15,7 @@ package statefulset import ( + "context" "log" "github.com/kubernetes/dashboard/src/app/backend/errors" @@ -39,7 +40,7 @@ func GetStatefulSetDetail(client kubernetes.Interface, metricClient metricapi.Me name string) (*StatefulSetDetail, error) { log.Printf("Getting details of %s statefulset in %s namespace", name, namespace) - ss, err := client.AppsV1().StatefulSets(namespace).Get(name, metaV1.GetOptions{}) + ss, err := client.AppsV1().StatefulSets(namespace).Get(context.TODO(), name, metaV1.GetOptions{}) if err != nil { return nil, err } diff --git a/src/app/backend/resource/statefulset/pods.go b/src/app/backend/resource/statefulset/pods.go index 869339f0206b..99f36ddcb622 100644 --- a/src/app/backend/resource/statefulset/pods.go +++ b/src/app/backend/resource/statefulset/pods.go @@ -15,6 +15,7 @@ package statefulset import ( + "context" "log" "github.com/kubernetes/dashboard/src/app/backend/errors" @@ -52,7 +53,7 @@ func GetStatefulSetPods(client kubernetes.Interface, metricClient metricapi.Metr // getRawStatefulSetPods return array of api pods targeting pet set with given name. func getRawStatefulSetPods(client kubernetes.Interface, name, namespace string) ([]v1.Pod, error) { - statefulSet, err := client.AppsV1().StatefulSets(namespace).Get(name, metaV1.GetOptions{}) + statefulSet, err := client.AppsV1().StatefulSets(namespace).Get(context.TODO(), name, metaV1.GetOptions{}) if err != nil { return nil, err } diff --git a/src/app/backend/resource/storageclass/detail.go b/src/app/backend/resource/storageclass/detail.go index 429678c0a426..e4cb68e802a4 100644 --- a/src/app/backend/resource/storageclass/detail.go +++ b/src/app/backend/resource/storageclass/detail.go @@ -15,6 +15,7 @@ package storageclass import ( + "context" "log" storage "k8s.io/api/storage/v1" @@ -32,7 +33,7 @@ type StorageClassDetail struct { func GetStorageClass(client kubernetes.Interface, name string) (*StorageClassDetail, error) { log.Printf("Getting details of %s storage class", name) - sc, err := client.StorageV1().StorageClasses().Get(name, metaV1.GetOptions{}) + sc, err := client.StorageV1().StorageClasses().Get(context.TODO(), name, metaV1.GetOptions{}) if err != nil { return nil, err } diff --git a/src/app/backend/scaling/scale.go b/src/app/backend/scaling/scale.go index 66569fe91f31..49246767ea60 100644 --- a/src/app/backend/scaling/scale.go +++ b/src/app/backend/scaling/scale.go @@ -15,9 +15,11 @@ package scaling import ( + "context" "strconv" apps "k8s.io/api/apps/v1" + metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/discovery" "k8s.io/client-go/discovery/cached/memory" @@ -42,7 +44,7 @@ func GetReplicaCounts(cfg *rest.Config, kind, namespace, name string) (*ReplicaC } gr := getGroupResource(kind) - res, err := sc.Scales(namespace).Get(gr, name) + res, err := sc.Scales(namespace).Get(context.TODO(), gr, name, metaV1.GetOptions{}) if err != nil { return nil, err } @@ -63,7 +65,7 @@ func ScaleResource(cfg *rest.Config, kind, namespace, name, count string) (*Repl } gr := getGroupResource(kind) - res, err := sc.Scales(namespace).Get(gr, name) + res, err := sc.Scales(namespace).Get(context.TODO(), gr, name, metaV1.GetOptions{}) if err != nil { return nil, err } @@ -75,7 +77,7 @@ func ScaleResource(cfg *rest.Config, kind, namespace, name, count string) (*Repl res.Spec.Replicas = int32(c) - res, err = sc.Scales(namespace).Update(gr, res) + res, err = sc.Scales(namespace).Update(context.TODO(), gr, res, metaV1.UpdateOptions{}) if err != nil { return nil, err } diff --git a/src/app/backend/settings/manager.go b/src/app/backend/settings/manager.go index fd130b5a723c..da5aaf134f96 100644 --- a/src/app/backend/settings/manager.go +++ b/src/app/backend/settings/manager.go @@ -15,6 +15,7 @@ package settings import ( + "context" "log" "net/http" "reflect" @@ -46,7 +47,7 @@ func NewSettingsManager() api.SettingsManager { // load config map data into settings manager and return true if new settings are different. func (sm *SettingsManager) load(client kubernetes.Interface) (configMap *v1.ConfigMap, isDifferent bool) { configMap, err := client.CoreV1().ConfigMaps(args.Holder.GetNamespace()). - Get(api.SettingsConfigMapName, metav1.GetOptions{}) + Get(context.TODO(), api.SettingsConfigMapName, metav1.GetOptions{}) if err != nil { log.Printf("Cannot find settings config map: %s", err.Error()) sm.restoreConfigMap(client) @@ -85,7 +86,7 @@ func (sm *SettingsManager) load(client kubernetes.Interface) (configMap *v1.Conf // restoreConfigMap restores settings config map using default global settings. func (sm *SettingsManager) restoreConfigMap(client kubernetes.Interface) { restoredConfigMap, err := client.CoreV1().ConfigMaps(args.Holder.GetNamespace()). - Create(api.GetDefaultSettingsConfigMap(args.Holder.GetNamespace())) + Create(context.TODO(), api.GetDefaultSettingsConfigMap(args.Holder.GetNamespace()), metav1.CreateOptions{}) if err != nil { log.Printf("Cannot restore settings config map: %s", err.Error()) } else { @@ -124,7 +125,7 @@ func (sm *SettingsManager) SaveGlobalSettings(client kubernetes.Interface, s *ap defer sm.load(client) cm.Data[api.GlobalSettingsKey] = s.Marshal() - _, err := client.CoreV1().ConfigMaps(args.Holder.GetNamespace()).Update(cm) + _, err := client.CoreV1().ConfigMaps(args.Holder.GetNamespace()).Update(context.TODO(), cm, metav1.UpdateOptions{}) return err } @@ -162,7 +163,7 @@ func (sm *SettingsManager) SavePinnedResource(client kubernetes.Interface, r *ap defer sm.load(client) sm.pinnedResources = append(sm.pinnedResources, *r) cm.Data[api.PinnedResourcesKey] = api.MarshalPinnedResources(sm.pinnedResources) - _, err := client.CoreV1().ConfigMaps(args.Holder.GetNamespace()).Update(cm) + _, err := client.CoreV1().ConfigMaps(args.Holder.GetNamespace()).Update(context.TODO(), cm, metav1.UpdateOptions{}) return err } @@ -191,6 +192,6 @@ func (sm *SettingsManager) DeletePinnedResource(client kubernetes.Interface, r * defer sm.load(client) sm.pinnedResources = append(sm.pinnedResources[:index], sm.pinnedResources[index+1:]...) cm.Data[api.PinnedResourcesKey] = api.MarshalPinnedResources(sm.pinnedResources) - _, err := client.CoreV1().ConfigMaps(args.Holder.GetNamespace()).Update(cm) + _, err := client.CoreV1().ConfigMaps(args.Holder.GetNamespace()).Update(context.TODO(), cm, metav1.UpdateOptions{}) return err } diff --git a/src/app/backend/sync/poll/secret.go b/src/app/backend/sync/poll/secret.go index 762e83ce9eaf..6c955127856a 100644 --- a/src/app/backend/sync/poll/secret.go +++ b/src/app/backend/sync/poll/secret.go @@ -15,6 +15,7 @@ package poll import ( + "context" "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -52,7 +53,7 @@ func (self *SecretPoller) Poll(interval time.Duration) watch.Interface { // Gets secret from API server and transforms it to watch.Event object. func (self *SecretPoller) getSecretEvent() (event watch.Event) { - secret, err := self.client.CoreV1().Secrets(self.namespace).Get(self.name, metav1.GetOptions{}) + secret, err := self.client.CoreV1().Secrets(self.namespace).Get(context.TODO(), self.name, metav1.GetOptions{}) event = watch.Event{ Object: secret, Type: watch.Added, diff --git a/src/app/backend/sync/secret.go b/src/app/backend/sync/secret.go index bcb3c24c9281..5b5e63794e0f 100644 --- a/src/app/backend/sync/secret.go +++ b/src/app/backend/sync/secret.go @@ -15,6 +15,7 @@ package sync import ( + "context" "fmt" "log" "reflect" @@ -92,7 +93,7 @@ func (self *secretSynchronizer) Error() chan error { // Create implements Synchronizer interface. See Synchronizer for more information. func (self *secretSynchronizer) Create(obj runtime.Object) error { secret := self.getSecret(obj) - _, err := self.client.CoreV1().Secrets(secret.Namespace).Create(secret) + _, err := self.client.CoreV1().Secrets(secret.Namespace).Create(context.TODO(), secret, metaV1.CreateOptions{}) if err != nil { return err } @@ -107,7 +108,7 @@ func (self *secretSynchronizer) Get() runtime.Object { if self.secret == nil { // In case secret was not yet initialized try to do it synchronously - secret, err := self.client.CoreV1().Secrets(self.namespace).Get(self.name, metaV1.GetOptions{}) + secret, err := self.client.CoreV1().Secrets(self.namespace).Get(context.TODO(), self.name, metaV1.GetOptions{}) if err != nil { return nil } @@ -123,7 +124,7 @@ func (self *secretSynchronizer) Get() runtime.Object { // Update implements Synchronizer interface. See Synchronizer for more information. func (self *secretSynchronizer) Update(obj runtime.Object) error { secret := self.getSecret(obj) - _, err := self.client.CoreV1().Secrets(secret.Namespace).Update(secret) + _, err := self.client.CoreV1().Secrets(secret.Namespace).Update(context.TODO(), secret, metaV1.UpdateOptions{}) if err != nil { return err } @@ -133,8 +134,8 @@ func (self *secretSynchronizer) Update(obj runtime.Object) error { // Delete implements Synchronizer interface. See Synchronizer for more information. func (self *secretSynchronizer) Delete() error { - return self.client.CoreV1().Secrets(self.namespace).Delete(self.name, - &metaV1.DeleteOptions{GracePeriodSeconds: new(int64)}) + return self.client.CoreV1().Secrets(self.namespace).Delete(context.TODO(), self.name, + metaV1.DeleteOptions{GracePeriodSeconds: new(int64)}) } // RegisterActionHandler implements Synchronizer interface. See Synchronizer for more information. @@ -153,7 +154,7 @@ func (self *secretSynchronizer) Refresh() { self.mux.Lock() defer self.mux.Unlock() - secret, err := self.client.CoreV1().Secrets(self.namespace).Get(self.name, metaV1.GetOptions{}) + secret, err := self.client.CoreV1().Secrets(self.namespace).Get(context.TODO(), self.name, metaV1.GetOptions{}) if err != nil { log.Printf("Secret synchronizer %s failed to refresh secret", self.Name()) return diff --git a/src/app/backend/validation/validateappname.go b/src/app/backend/validation/validateappname.go index b95178a722e0..579cd3846cfc 100644 --- a/src/app/backend/validation/validateappname.go +++ b/src/app/backend/validation/validateappname.go @@ -15,6 +15,7 @@ package validation import ( + "context" "log" metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -43,7 +44,7 @@ func ValidateAppName(spec *AppNameValiditySpec, client client.Interface) (*AppNa isValidDeployment := false isValidService := false - _, err := client.AppsV1().Deployments(spec.Namespace).Get(spec.Name, metaV1.GetOptions{}) + _, err := client.AppsV1().Deployments(spec.Namespace).Get(context.TODO(), spec.Name, metaV1.GetOptions{}) if err != nil { if errors.IsNotFoundError(err) || errors.IsForbiddenError(err) { isValidDeployment = true @@ -52,7 +53,7 @@ func ValidateAppName(spec *AppNameValiditySpec, client client.Interface) (*AppNa } } - _, err = client.CoreV1().Services(spec.Namespace).Get(spec.Name, metaV1.GetOptions{}) + _, err = client.CoreV1().Services(spec.Namespace).Get(context.TODO(), spec.Name, metaV1.GetOptions{}) if err != nil { if errors.IsNotFoundError(err) || errors.IsForbiddenError(err) { isValidService = true