From 2ce836a1ea31241971e5c3de41bf0ab05cd210ea Mon Sep 17 00:00:00 2001 From: Mike Cutalo Date: Fri, 23 Jun 2023 12:56:18 -0700 Subject: [PATCH] remove usage of clusterName to upgrade k8s --- backend/go.mod | 27 ++-- backend/go.sum | 140 ++++++--------------- backend/service/k8s/cache_test.go | 8 +- backend/service/k8s/configmap.go | 3 +- backend/service/k8s/configmap_test.go | 14 ++- backend/service/k8s/cronjob.go | 2 +- backend/service/k8s/cronjob_test.go | 14 ++- backend/service/k8s/deployment.go | 2 +- backend/service/k8s/deployment_test.go | 20 +-- backend/service/k8s/event.go | 2 +- backend/service/k8s/hpa.go | 2 +- backend/service/k8s/hpa_test.go | 16 +-- backend/service/k8s/job.go | 2 +- backend/service/k8s/job_test.go | 10 +- backend/service/k8s/kube_cluster.go | 43 +++++++ backend/service/k8s/lightweightinformer.go | 12 +- backend/service/k8s/log_test.go | 14 ++- backend/service/k8s/meta.go | 15 --- backend/service/k8s/meta_test.go | 10 +- backend/service/k8s/namespace.go | 2 +- backend/service/k8s/node.go | 3 +- backend/service/k8s/pods.go | 7 +- backend/service/k8s/pods_test.go | 75 +++++++---- backend/service/k8s/service.go | 2 +- backend/service/k8s/service_test.go | 10 +- backend/service/k8s/statefulset.go | 2 +- backend/service/k8s/statefulset_test.go | 14 ++- 27 files changed, 248 insertions(+), 223 deletions(-) create mode 100644 backend/service/k8s/kube_cluster.go diff --git a/backend/go.mod b/backend/go.mod index f0cff6f9541..8700a4df978 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -57,10 +57,10 @@ require ( google.golang.org/protobuf v1.30.0 gopkg.in/square/go-jose.v2 v2.6.0 gopkg.in/yaml.v3 v3.0.1 - k8s.io/api v0.23.6 - k8s.io/apimachinery v0.23.6 - k8s.io/client-go v0.23.6 - k8s.io/metrics v0.23.6 + k8s.io/api v0.27.3 + k8s.io/apimachinery v0.27.3 + k8s.io/client-go v0.27.3 + k8s.io/metrics v0.27.3 k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 ) @@ -89,12 +89,16 @@ require ( github.com/cloudflare/circl v1.1.0 // indirect github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/emicklei/go-restful/v3 v3.9.0 // indirect github.com/emirpasic/gods v1.18.1 // indirect github.com/evanphx/json-patch v4.12.0+incompatible // indirect github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a // indirect github.com/go-git/gcfg v1.5.0 // indirect github.com/go-jose/go-jose/v3 v3.0.0 // indirect - github.com/go-logr/logr v1.2.2 // indirect + github.com/go-logr/logr v1.2.3 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.1 // indirect + github.com/go-openapi/swag v0.22.3 // indirect github.com/gofrs/uuid v4.0.0+incompatible // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect @@ -102,24 +106,27 @@ require ( github.com/golang/glog v1.0.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect + github.com/google/gnostic v0.5.7-v3refs // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/googleapis/gnostic v0.5.5 // indirect github.com/gorilla/websocket v1.4.2 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/imdario/mergo v0.3.13 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect github.com/lyft/protoc-gen-star v0.6.1 // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pborman/uuid v1.2.1 // indirect github.com/pjbgf/sha1cd v0.2.4-0.20230130103033-0066bacacbf6 // indirect github.com/pkg/errors v0.9.1 // indirect @@ -153,9 +160,9 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - k8s.io/klog/v2 v2.80.1 // indirect - k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect - sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect + k8s.io/klog/v2 v2.90.1 // indirect + k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/backend/go.sum b/backend/go.sum index edb182f51e5..30cb0fc94a4 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -383,13 +383,6 @@ cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vf cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= -github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= -github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= -github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= 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/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= @@ -399,13 +392,10 @@ github.com/Masterminds/squirrel v1.5.4/go.mod h1:NNaOrjSoIDfDA40n7sr2tPNZRfjzjA4 github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4/go.mod h1:UBYPn8k0D56RtnR8RFQMjmh4KrZzWJ5o7Z9SYjossQ8= github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA= github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -421,7 +411,6 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-sdk-go-v2 v1.17.5/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= github.com/aws/aws-sdk-go-v2 v1.18.0 h1:882kkTpSFhdgYRKVZ/VCgf7sd0ru57p2JCxz4/oN5RY= github.com/aws/aws-sdk-go-v2 v1.18.0/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= @@ -534,9 +523,8 @@ github.com/docker/docker v20.10.24+incompatible h1:Ugvxm7a8+Gz6vqQYQQ2W7GYq5EUPa github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -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/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= +github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -558,14 +546,9 @@ github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQL github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a h1:yDWHCSQ40h88yih2JAcL6Ls/kVkSE8GFACTGVnMPruw= github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a/go.mod h1:7Ga40egUymuWXxAe151lTNnCv97MddSOVsjpPPkityA= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fullstorydev/grpcurl v1.8.7 h1:xJWosq3BQovQ4QrdPO72OrPiWuGgEsxY8ldYsJbPrqI= github.com/fullstorydev/grpcurl v1.8.7/go.mod h1:pVtM4qe3CMoLaIzYS8uvTuDj2jVYmXqMUkZeijnXp/E= -github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= @@ -590,18 +573,17 @@ github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vb github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.2 h1:ahHml/yUpnlb96Rp8HCvtYVPY8ZYpxq3g7UYchIYwbs= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= +github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonreference v0.20.1 h1:FBLnyygC4/IZZr893oiomc9XaghoveYTrLC1F86HID8= +github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-test/deep v1.0.4 h1:u2CU3YKy9I2pmu9pX0eq50wCgjfGIt539SqR7FbHiho= github.com/go-test/deep v1.0.4/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= @@ -664,7 +646,8 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= +github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -686,7 +669,6 @@ github.com/google/go-github/v50 v50.2.0/go.mod h1:VBY8FB6yPIjrtKhozXv4FQupxKLS6H github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= @@ -707,6 +689,7 @@ github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -726,17 +709,12 @@ github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= -github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= -github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= -github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= @@ -767,12 +745,10 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= @@ -793,6 +769,7 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGw github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -818,8 +795,8 @@ github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -833,9 +810,8 @@ github.com/lib/pq v1.10.8/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lyft/protoc-gen-star v0.6.1 h1:erE0rdztuaDq3bpGifD95wfoPrSZc95nGA6tbiNYh6M= github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A= github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= @@ -854,7 +830,6 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= 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= @@ -864,23 +839,15 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= -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/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso= -github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -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.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= -github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.15.0 h1:WjP/FQ/sk43MRmnEcT+MlDw2TFvkrXlprrPST/IudjU= +github.com/onsi/ginkgo/v2 v2.9.1 h1:zie5Ly042PD3bsCvsSOPvRnFwyo3rKe64TJlD6nu0mk= +github.com/onsi/gomega v1.27.4 h1:Z2AnStgsdSayCMDiCU42qIz+HLqEPcgiOCXjAU/w+8E= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -888,7 +855,6 @@ github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FI github.com/pborman/uuid v1.2.1 h1:+ZZIw58t/ozdjRaXh/3awHfmWRbzYxJoAdNJxe/3pvw= github.com/pborman/uuid v1.2.1/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pjbgf/sha1cd v0.2.3/go.mod h1:HOK9QrgzdHpbc2Kzip0Q1yi3M2MFGPADtR6HjG65m5M= github.com/pjbgf/sha1cd v0.2.4-0.20230130103033-0066bacacbf6 h1:q2LiYty0ffGD4aLJl2zKqFoYrSZOfOGDmTPK44Ajack= github.com/pjbgf/sha1cd v0.2.4-0.20230130103033-0066bacacbf6/go.mod h1:HOK9QrgzdHpbc2Kzip0Q1yi3M2MFGPADtR6HjG65m5M= @@ -929,6 +895,7 @@ github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ= github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= @@ -955,7 +922,6 @@ github.com/slack-go/slack v0.12.2/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= @@ -998,7 +964,6 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= @@ -1046,9 +1011,7 @@ golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= @@ -1099,7 +1062,6 @@ golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1114,7 +1076,6 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1125,7 +1086,6 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= @@ -1141,11 +1101,9 @@ golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLd golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210907225631-ff17edfbf26d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210913180222-943fd674d43e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -1216,7 +1174,6 @@ golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1228,11 +1185,9 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1247,7 +1202,6 @@ golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1276,9 +1230,7 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908143011-c212e7322662/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210910150752-751e447fb3d0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1381,7 +1333,6 @@ golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjs golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -1404,7 +1355,6 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo= @@ -1662,14 +1612,11 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/square/go-jose.v2 v2.6.0 h1:NGk74WTnPKBNUhNzQX7PYcTLUjoq7mzKk2OKbvwk2iI= gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/validator.v2 v2.0.0-20200605151824-2b28d334fa05/go.mod h1:o4V0GXN9/CAmCsvJ0oXYZvrZOe7syiDZSN1GWGZTGzc= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= @@ -1695,35 +1642,26 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.23.6 h1:yOK34wbYECH4RsJbQ9sfkFK3O7f/DUHRlzFehkqZyVw= -k8s.io/api v0.23.6/go.mod h1:1kFaYxGCFHYp3qd6a85DAj/yW8aVD6XLZMqJclkoi9g= -k8s.io/apimachinery v0.23.6 h1:RH1UweWJkWNTlFx0D8uxOpaU1tjIOvVVWV/bu5b3/NQ= -k8s.io/apimachinery v0.23.6/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= -k8s.io/client-go v0.23.6 h1:7h4SctDVQAQbkHQnR4Kzi7EyUyvla5G1pFWf4+Od7hQ= -k8s.io/client-go v0.23.6/go.mod h1:Umt5icFOMLV/+qbtZ3PR0D+JA6lvvb3syzodv4irpK4= -k8s.io/code-generator v0.23.6/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= -k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= -k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4= -k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4= -k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= -k8s.io/metrics v0.23.6 h1:GH9tTTq7l6DNhzFsLW3Q3xG1LWEk/VT853T6r1mo3uI= -k8s.io/metrics v0.23.6/go.mod h1:Fm9VzVMZ7KVEEeLStF2y3XogfcDwpGyI15o1xB6PbYk= -k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/api v0.27.3 h1:yR6oQXXnUEBWEWcvPWS0jQL575KoAboQPfJAuKNrw5Y= +k8s.io/api v0.27.3/go.mod h1:C4BNvZnQOF7JA/0Xed2S+aUyJSfTGkGFxLXz9MnpIpg= +k8s.io/apimachinery v0.27.3 h1:Ubye8oBufD04l9QnNtW05idcOe9Z3GQN8+7PqmuVcUM= +k8s.io/apimachinery v0.27.3/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= +k8s.io/client-go v0.27.3 h1:7dnEGHZEJld3lYwxvLl7WoehK6lAq7GvgjxpA3nv1E8= +k8s.io/client-go v0.27.3/go.mod h1:2MBEKuTo6V1lbKy3z1euEGnhPfGZLKTS9tiJ2xodM48= +k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= +k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= +k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= +k8s.io/metrics v0.27.3 h1:pBVKgQjfui8xzfTidIxiOmLHwcCk3KbeuWowo/Oh0t0= +k8s.io/metrics v0.27.3/go.mod h1:pXj63OTdOjpYgSc95p+88fB3t4krLybM7MOeqIksI6o= k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 h1:kmDqav+P+/5e1i9tFfHq1qcF3sOrDp+YEkVDAHu7Jwk= k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s= -sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= -sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= -sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/backend/service/k8s/cache_test.go b/backend/service/k8s/cache_test.go index 27ccc148554..868e6a087c5 100644 --- a/backend/service/k8s/cache_test.go +++ b/backend/service/k8s/cache_test.go @@ -26,9 +26,11 @@ func TestProcessInformerEvent(t *testing.T) { pod := &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ - ClusterName: "cluster", - Name: "test-pod-1", - Namespace: "testing-namespace", + Name: "test-pod-1", + Namespace: "testing-namespace", + Labels: map[string]string{ + clusterClutchNameLabel: "cluster", + }, }, } diff --git a/backend/service/k8s/configmap.go b/backend/service/k8s/configmap.go index 44c17f097dc..08c9d4bd38c 100644 --- a/backend/service/k8s/configmap.go +++ b/backend/service/k8s/configmap.go @@ -20,7 +20,6 @@ func (s *svc) DescribeConfigMap(ctx context.Context, clientset, cluster, namespa configMapList, err := cs.CoreV1().ConfigMaps(cs.Namespace()).List(ctx, metav1.ListOptions{ FieldSelector: "metadata.name=" + name, }) - if err != nil { return nil, err } @@ -70,7 +69,7 @@ func (s *svc) ListConfigMaps(ctx context.Context, clientset, cluster, namespace } func protoForConfigMap(cluster string, k8sconfigMap *v1.ConfigMap) *k8sapiv1.ConfigMap { - clusterName := k8sconfigMap.ClusterName + clusterName := GetKubeCluster(k8sconfigMap) if clusterName == "" { clusterName = cluster } diff --git a/backend/service/k8s/configmap_test.go b/backend/service/k8s/configmap_test.go index 107524ccc18..3d3ac579206 100644 --- a/backend/service/k8s/configmap_test.go +++ b/backend/service/k8s/configmap_test.go @@ -158,7 +158,7 @@ func TestDeleteConfigMap(t *testing.T) { func TestProtoForConfigMap(t *testing.T) { t.Parallel() - var configMapTestCases = []struct { + configMapTestCases := []struct { id string inputClusterName string expectedClusterName string @@ -170,7 +170,9 @@ func TestProtoForConfigMap(t *testing.T) { expectedClusterName: "production", configMap: &v1.ConfigMap{ ObjectMeta: metav1.ObjectMeta{ - ClusterName: "production", + Labels: map[string]string{ + "cluster.clutch.sh/name": "production", + }, }, }, }, @@ -180,7 +182,9 @@ func TestProtoForConfigMap(t *testing.T) { expectedClusterName: "staging", configMap: &v1.ConfigMap{ ObjectMeta: metav1.ObjectMeta{ - ClusterName: "", + Labels: map[string]string{ + "cluster.clutch.sh/name": "production", + }, }, }, }, @@ -190,7 +194,9 @@ func TestProtoForConfigMap(t *testing.T) { expectedClusterName: "test", configMap: &v1.ConfigMap{ ObjectMeta: metav1.ObjectMeta{ - ClusterName: "", + Labels: map[string]string{ + "cluster.clutch.sh/name": "production", + }, }, Data: map[string]string{ "key1": "value1", diff --git a/backend/service/k8s/cronjob.go b/backend/service/k8s/cronjob.go index ff228c992eb..5b5b6eb6151 100644 --- a/backend/service/k8s/cronjob.go +++ b/backend/service/k8s/cronjob.go @@ -70,7 +70,7 @@ func (s *svc) DeleteCronJob(ctx context.Context, clientset, cluster, namespace, } func ProtoForCronJob(cluster string, k8scronJob *v1beta1.CronJob) *k8sapiv1.CronJob { - clusterName := k8scronJob.ClusterName + clusterName := GetKubeCluster(k8scronJob) if clusterName == "" { clusterName = cluster } diff --git a/backend/service/k8s/cronjob_test.go b/backend/service/k8s/cronjob_test.go index ab4e79b2a1e..62a090bf48e 100644 --- a/backend/service/k8s/cronjob_test.go +++ b/backend/service/k8s/cronjob_test.go @@ -73,7 +73,7 @@ func TestDeleteCron(t *testing.T) { func TestProtoForCron(t *testing.T) { t.Parallel() - var cronTestCases = []struct { + cronTestCases := []struct { id string inputClusterName string expectedClusterName string @@ -87,8 +87,10 @@ func TestProtoForCron(t *testing.T) { expectedName: "test1", cron: &v1beta1.CronJob{ ObjectMeta: metav1.ObjectMeta{ - ClusterName: "production", - Name: "test1", + Labels: map[string]string{ + clusterClutchNameLabel: "production", + }, + Name: "test1", }, }, }, @@ -99,8 +101,10 @@ func TestProtoForCron(t *testing.T) { expectedName: "test2", cron: &v1beta1.CronJob{ ObjectMeta: metav1.ObjectMeta{ - ClusterName: "", - Name: "test2", + Labels: map[string]string{ + clusterClutchNameLabel: "", + }, + Name: "test2", }, Spec: v1beta1.CronJobSpec{ ConcurrencyPolicy: v1beta1.AllowConcurrent, diff --git a/backend/service/k8s/deployment.go b/backend/service/k8s/deployment.go index 114224faf11..71d2f63559c 100644 --- a/backend/service/k8s/deployment.go +++ b/backend/service/k8s/deployment.go @@ -65,7 +65,7 @@ func (s *svc) ListDeployments(ctx context.Context, clientset, cluster, namespace } func ProtoForDeployment(cluster string, deployment *appsv1.Deployment) *k8sapiv1.Deployment { - clusterName := deployment.ClusterName + clusterName := GetKubeCluster(deployment) if clusterName == "" { clusterName = cluster } diff --git a/backend/service/k8s/deployment_test.go b/backend/service/k8s/deployment_test.go index 19700335aa6..67a1cb64e8a 100644 --- a/backend/service/k8s/deployment_test.go +++ b/backend/service/k8s/deployment_test.go @@ -16,9 +16,7 @@ import ( k8sapiv1 "github.com/lyft/clutch/backend/api/k8s/v1" ) -var ( - t1 = time.Date(2021, time.May, 4, 0, 0, 0, 0, time.UTC) -) +var t1 = time.Date(2021, time.May, 4, 0, 0, 0, 0, time.UTC) func testDeploymentClientset() k8s.Interface { deployment := &appsv1.Deployment{ @@ -125,7 +123,7 @@ func TestDeleteDeployment(t *testing.T) { func TestMergeDeploymentLabelsAndAnnotations(t *testing.T) { t.Parallel() - var mergeDeploymentLabelAnnotationsTestCases = []struct { + mergeDeploymentLabelAnnotationsTestCases := []struct { id string fields *k8sapiv1.UpdateDeploymentRequest_Fields expect *appsv1.Deployment @@ -216,7 +214,7 @@ func TestMergeDeploymentLabelsAndAnnotations(t *testing.T) { func TestProtoForDeploymentClusterName(t *testing.T) { t.Parallel() - var deploymentTestCases = []struct { + deploymentTestCases := []struct { id string inputClusterName string expectedClusterName string @@ -228,7 +226,9 @@ func TestProtoForDeploymentClusterName(t *testing.T) { expectedClusterName: "production", deployment: &appsv1.Deployment{ ObjectMeta: metav1.ObjectMeta{ - ClusterName: "production", + Labels: map[string]string{ + clusterClutchNameLabel: "production", + }, }, }, }, @@ -238,7 +238,9 @@ func TestProtoForDeploymentClusterName(t *testing.T) { expectedClusterName: "staging", deployment: &appsv1.Deployment{ ObjectMeta: metav1.ObjectMeta{ - ClusterName: "", + Labels: map[string]string{ + clusterClutchNameLabel: "", + }, }, }, }, @@ -258,7 +260,7 @@ func TestProtoForDeploymentClusterName(t *testing.T) { func TestProtoForDeploymentSpec(t *testing.T) { t.Parallel() - var deploymentTestCases = []struct { + deploymentTestCases := []struct { id string deployment *appsv1.Deployment }{ @@ -306,7 +308,7 @@ func TestProtoForDeploymentSpec(t *testing.T) { func TestProtoForDeploymentStatus(t *testing.T) { t.Parallel() - var deploymentTestCases = []struct { + deploymentTestCases := []struct { id string deployment *appsv1.Deployment }{ diff --git a/backend/service/k8s/event.go b/backend/service/k8s/event.go index d1088eb1b2d..96a056b6ad2 100644 --- a/backend/service/k8s/event.go +++ b/backend/service/k8s/event.go @@ -35,7 +35,7 @@ func (s *svc) ListEvents(ctx context.Context, clientset, cluster, namespace, obj } func ProtoForEvent(cluster string, k8sEvent *corev1.Event) *k8sapiv1.Event { - clusterName := k8sEvent.ClusterName + clusterName := GetKubeCluster(k8sEvent) if clusterName == "" { clusterName = cluster } diff --git a/backend/service/k8s/hpa.go b/backend/service/k8s/hpa.go index 56b9ea7e726..2709634fea0 100644 --- a/backend/service/k8s/hpa.go +++ b/backend/service/k8s/hpa.go @@ -35,7 +35,7 @@ func (s *svc) DescribeHPA(ctx context.Context, clientset, cluster, namespace, na } func ProtoForHPA(cluster string, autoscaler *autoscalingv1.HorizontalPodAutoscaler) *k8sapiv1.HPA { - clusterName := autoscaler.ClusterName + clusterName := GetKubeCluster(autoscaler) if clusterName == "" { clusterName = cluster } diff --git a/backend/service/k8s/hpa_test.go b/backend/service/k8s/hpa_test.go index 45c529037a0..f23d09984a3 100644 --- a/backend/service/k8s/hpa_test.go +++ b/backend/service/k8s/hpa_test.go @@ -13,9 +13,7 @@ import ( k8sapiv1 "github.com/lyft/clutch/backend/api/k8s/v1" ) -var ( - newInt32 = func(n int32) *int32 { return &n } -) +var newInt32 = func(n int32) *int32 { return &n } func testHPAClientset() k8s.Interface { hpa := &autoscalingv1.HorizontalPodAutoscaler{ @@ -33,7 +31,7 @@ func testHPAClientset() k8s.Interface { func TestNormalizeChanges(t *testing.T) { t.Parallel() - var applyScalingTestCases = []struct { + applyScalingTestCases := []struct { id string sizing *k8sapiv1.ResizeHPARequest_Sizing resultSpec autoscalingv1.HorizontalPodAutoscalerSpec @@ -124,7 +122,7 @@ func TestResizeHPA(t *testing.T) { func TestProtoForHPAClusterName(t *testing.T) { t.Parallel() - var hpaTestCases = []struct { + hpaTestCases := []struct { id string inputClusterName string expectedClusterName string @@ -136,7 +134,9 @@ func TestProtoForHPAClusterName(t *testing.T) { expectedClusterName: "production", hpa: &autoscalingv1.HorizontalPodAutoscaler{ ObjectMeta: metav1.ObjectMeta{ - ClusterName: "production", + Labels: map[string]string{ + clusterClutchNameLabel: "production", + }, }, Spec: autoscalingv1.HorizontalPodAutoscalerSpec{ MinReplicas: newInt32(1), @@ -150,7 +150,9 @@ func TestProtoForHPAClusterName(t *testing.T) { expectedClusterName: "staging", hpa: &autoscalingv1.HorizontalPodAutoscaler{ ObjectMeta: metav1.ObjectMeta{ - ClusterName: "", + Labels: map[string]string{ + clusterClutchNameLabel: "", + }, }, Spec: autoscalingv1.HorizontalPodAutoscalerSpec{ MinReplicas: newInt32(1), diff --git a/backend/service/k8s/job.go b/backend/service/k8s/job.go index 90f66caef8e..3b38eb0636e 100644 --- a/backend/service/k8s/job.go +++ b/backend/service/k8s/job.go @@ -85,7 +85,7 @@ func (s *svc) ListJobs(ctx context.Context, clientset, cluster, namespace string } func protoForJob(cluster string, k8sJob *v1.Job) *k8sapiv1.Job { - clusterName := k8sJob.ClusterName + clusterName := GetKubeCluster(k8sJob) if clusterName == "" { clusterName = cluster } diff --git a/backend/service/k8s/job_test.go b/backend/service/k8s/job_test.go index 818b1999b66..0a6890d28d7 100644 --- a/backend/service/k8s/job_test.go +++ b/backend/service/k8s/job_test.go @@ -172,7 +172,7 @@ func TestCreateJob(t *testing.T) { func TestProtoForJob(t *testing.T) { t.Parallel() - var jobTestCases = []struct { + jobTestCases := []struct { id string inputClusterName string expectedClusterName string @@ -184,7 +184,9 @@ func TestProtoForJob(t *testing.T) { expectedClusterName: "production", job: &v1.Job{ ObjectMeta: metav1.ObjectMeta{ - ClusterName: "production", + Labels: map[string]string{ + clusterClutchNameLabel: "production", + }, }, }, }, @@ -194,7 +196,9 @@ func TestProtoForJob(t *testing.T) { expectedClusterName: "staging", job: &v1.Job{ ObjectMeta: metav1.ObjectMeta{ - ClusterName: "", + Labels: map[string]string{ + clusterClutchNameLabel: "production", + }, }, }, }, diff --git a/backend/service/k8s/kube_cluster.go b/backend/service/k8s/kube_cluster.go new file mode 100644 index 00000000000..a279a6cf3a9 --- /dev/null +++ b/backend/service/k8s/kube_cluster.go @@ -0,0 +1,43 @@ +// helper methods for accessing k8s cluster metadata in object labels +// add detail as to why this needs to exist. + +package k8s + +import ( + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" +) + +const clusterClutchNameLabel = "cluster.clutch.sh/name" + +// (mikecutalo) - debate this return sig +func GetKubeCluster(obj any) string { + ObjectMeta, err := meta.Accessor(obj) + if err != nil { + return "" + } + + labels := ObjectMeta.GetLabels() + if cluster, ok := labels[clusterClutchNameLabel]; ok { + return cluster + } + + return "" +} + +// Applies the name of the cluster to a kube object +// ClusterName is still not set in kube v1.20 so we are setting this manually. +// https://github.com/kubernetes/apimachinery/blob/2456ebdaba229616fab2161a615148884b46644b/pkg/apis/meta/v1/types.go#L266-L270 +func ApplyClusterMetadata(cluster string, obj runtime.Object) error { + objMeta, err := meta.Accessor(obj) + if err != nil { + return err + } + + objMeta.SetLabels(labels.Merge(objMeta.GetLabels(), labels.Set{ + clusterClutchNameLabel: cluster, + })) + + return nil +} diff --git a/backend/service/k8s/lightweightinformer.go b/backend/service/k8s/lightweightinformer.go index fc29818d192..b7a6cff5056 100644 --- a/backend/service/k8s/lightweightinformer.go +++ b/backend/service/k8s/lightweightinformer.go @@ -5,6 +5,7 @@ import ( "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/tools/cache" ) @@ -58,7 +59,7 @@ func NewLightweightInformer( ObjectType: objType, FullResyncPeriod: 0, RetryOnError: false, - Process: func(obj interface{}) error { + Process: func(obj interface{}, isInInitialList bool) error { for _, d := range obj.(cache.Deltas) { incomingObjectMeta, err := meta.Accessor(d.Object) if err != nil { @@ -70,9 +71,9 @@ func NewLightweightInformer( Namespace: incomingObjectMeta.GetNamespace(), } - // ClusterName is still not set in kube v1.20 so we are setting this manually. - // https://github.com/kubernetes/apimachinery/blob/2456ebdaba229616fab2161a615148884b46644b/pkg/apis/meta/v1/types.go#L266-L270 - incomingObjectMeta.SetClusterName(clusterName) + incomingObjectMeta.SetLabels(labels.Merge(incomingObjectMeta.GetLabels(), labels.Set{ + clusterClutchNameLabel: clusterName, + })) switch d.Type { case cache.Sync, cache.Replaced, cache.Added, cache.Updated: @@ -90,7 +91,8 @@ func NewLightweightInformer( if err := cacheStore.Add(lightweightObj); err != nil { return err } - h.OnAdd(d.Object) + // (mikecutalo) : double check what isInInitialList is doing + h.OnAdd(d.Object, false) } case cache.Deleted: if err := cacheStore.Delete(lightweightObj); err != nil { diff --git a/backend/service/k8s/log_test.go b/backend/service/k8s/log_test.go index f7858f3de1c..886f23f128a 100644 --- a/backend/service/k8s/log_test.go +++ b/backend/service/k8s/log_test.go @@ -20,10 +20,12 @@ func TestGetPodLogs(t *testing.T) { testPods := []runtime.Object{ &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ - Name: "testing-pod-name", - Namespace: "testing-namespace", - ClusterName: "core-testing", - Labels: map[string]string{"foo": "bar"}, + Name: "testing-pod-name", + Namespace: "testing-namespace", + Labels: map[string]string{ + "foo": "bar", + clusterClutchNameLabel: "core-testing", + }, Annotations: map[string]string{"baz": "quuz"}, }, Status: corev1.PodStatus{ @@ -73,7 +75,9 @@ func TestBufferToResponse(t *testing.T) { { S: "Hello!", }, - }}}, + }, + }, + }, } for idx, tc := range tcs { diff --git a/backend/service/k8s/meta.go b/backend/service/k8s/meta.go index d9b280988cd..c6c447d04c8 100644 --- a/backend/service/k8s/meta.go +++ b/backend/service/k8s/meta.go @@ -1,10 +1,8 @@ package k8s import ( - "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime" k8sapiv1 "github.com/lyft/clutch/backend/api/k8s/v1" ) @@ -30,16 +28,3 @@ func ApplyListOptions(listOpts *k8sapiv1.ListOptions) (metav1.ListOptions, error _, err := labels.Parse(opts.LabelSelector) return opts, err } - -// Applies the name of the cluster to a kube object -// ClusterName is still not set in kube v1.20 so we are setting this manually. -// https://github.com/kubernetes/apimachinery/blob/2456ebdaba229616fab2161a615148884b46644b/pkg/apis/meta/v1/types.go#L266-L270 -func ApplyClusterMetadata(cluster string, obj runtime.Object) error { - objMeta, err := meta.Accessor(obj) - if err != nil { - return err - } - - objMeta.SetClusterName(cluster) - return nil -} diff --git a/backend/service/k8s/meta_test.go b/backend/service/k8s/meta_test.go index 944d30dcbbd..25a5c226803 100644 --- a/backend/service/k8s/meta_test.go +++ b/backend/service/k8s/meta_test.go @@ -6,7 +6,6 @@ import ( "github.com/stretchr/testify/assert" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -16,7 +15,7 @@ import ( func TestApplyListOptions(t *testing.T) { t.Parallel() - var testCases = []struct { + testCases := []struct { id string listOptions *k8sapiv1.ListOptions expectedListOptions metav1.ListOptions @@ -98,7 +97,7 @@ func TestApplyListOptions(t *testing.T) { func TestApplyClusterMetadata(t *testing.T) { t.Parallel() - var tests = []struct { + tests := []struct { id string cluster string obj runtime.Object @@ -130,10 +129,7 @@ func TestApplyClusterMetadata(t *testing.T) { err := ApplyClusterMetadata(tt.cluster, tt.obj) if !tt.shouldError { assert.NoError(t, err) - - objMeta, err := meta.Accessor(tt.obj) - assert.NoError(t, err) - assert.Equal(t, tt.cluster, objMeta.GetClusterName()) + assert.Equal(t, tt.cluster, GetKubeCluster(tt.obj)) } else { assert.Error(t, err) } diff --git a/backend/service/k8s/namespace.go b/backend/service/k8s/namespace.go index 6eeb2bc5e83..da8b0a9297a 100644 --- a/backend/service/k8s/namespace.go +++ b/backend/service/k8s/namespace.go @@ -33,7 +33,7 @@ func (s *svc) DescribeNamespace(ctx context.Context, clientset, cluster, name st } func ProtoForNamespace(cluster string, k8snamespace *corev1.Namespace) *k8sapiv1.Namespace { - clusterName := k8snamespace.ClusterName + clusterName := GetKubeCluster(k8snamespace) if clusterName == "" { clusterName = cluster } diff --git a/backend/service/k8s/node.go b/backend/service/k8s/node.go index fe2a8f0d973..e6be3c3aa84 100644 --- a/backend/service/k8s/node.go +++ b/backend/service/k8s/node.go @@ -21,7 +21,6 @@ func (s *svc) DescribeNode(ctx context.Context, clientset, cluster, name string) nodes, err := cs.CoreV1().Nodes().List(ctx, metav1.ListOptions{ FieldSelector: "metadata.name=" + name, }) - if err != nil { return nil, err } @@ -35,7 +34,7 @@ func (s *svc) DescribeNode(ctx context.Context, clientset, cluster, name string) } func ProtoForNode(cluster string, k8snode *corev1.Node) *k8sapiv1.Node { - clusterName := k8snode.ClusterName + clusterName := GetKubeCluster(k8snode) if clusterName == "" { clusterName = cluster } diff --git a/backend/service/k8s/pods.go b/backend/service/k8s/pods.go index f51bef966b1..b2fdec99ddc 100644 --- a/backend/service/k8s/pods.go +++ b/backend/service/k8s/pods.go @@ -171,7 +171,7 @@ func podDescription(k8spod *corev1.Pod, cluster string) *k8sapiv1.Pod { // if converted, err := ptypes.TimestampProto(k8spod.Status.StartTime.Time); err == nil { // launch = converted // } - clusterName := k8spod.ClusterName + clusterName := GetKubeCluster(k8spod) if clusterName == "" { clusterName = cluster } @@ -183,7 +183,7 @@ func podDescription(k8spod *corev1.Pod, cluster string) *k8sapiv1.Pod { NodeIp: k8spod.Status.HostIP, PodIp: k8spod.Status.PodIP, State: protoForPodState(k8spod.Status.Phase), - //StartTime: launch, + // StartTime: launch, Labels: k8spod.Labels, Annotations: k8spod.Annotations, StateReason: k8spod.Status.Reason, @@ -284,7 +284,7 @@ func protoForContainerStateRunning(state *corev1.ContainerStateRunning) *k8sapiv return &k8sapiv1.Container_StateRunning{ StateRunning: &k8sapiv1.StateRunning{ // FE serialization currently does not support timestamp - //StartTime: state.StartedAt, + // StartTime: state.StartedAt, }, } } @@ -303,6 +303,7 @@ func protoForConditionType(conditionType corev1.PodConditionType) k8sapiv1.PodCo return k8sapiv1.PodCondition_TYPE_UNSPECIFIED } } + func protoForConditionStatus(status corev1.ConditionStatus) k8sapiv1.PodCondition_Status { switch status { case corev1.ConditionTrue: diff --git a/backend/service/k8s/pods_test.go b/backend/service/k8s/pods_test.go index 33c013c6eaa..7af67a4fed7 100644 --- a/backend/service/k8s/pods_test.go +++ b/backend/service/k8s/pods_test.go @@ -33,10 +33,12 @@ func testPodClientset() *fake.Clientset { testPods := []runtime.Object{ &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ - Name: "testing-pod-name", - Namespace: "testing-namespace", - ClusterName: "production", - Labels: map[string]string{"foo": "bar"}, + Name: "testing-pod-name", + Namespace: "testing-namespace", + Labels: map[string]string{ + "foo": "bar", + clusterClutchNameLabel: "production", + }, Annotations: map[string]string{"baz": "quuz"}, }, Status: corev1.PodStatus{ @@ -50,10 +52,12 @@ func testPodClientset() *fake.Clientset { }, &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ - Name: "testing-pod-name-1", - Namespace: "testing-namespace", - ClusterName: "staging", - Labels: map[string]string{"foo": "bar"}, + Name: "testing-pod-name-1", + Namespace: "testing-namespace", + Labels: map[string]string{ + "foo": "bar", + clusterClutchNameLabel: "staging", + }, Annotations: map[string]string{"baz": "quuz"}, }, Status: corev1.PodStatus{ @@ -95,9 +99,11 @@ func testListFakeClientset(numPods int) *fake.Clientset { for i := 0; i < numPods; i++ { pods.Items = append(pods.Items, corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ - Name: fmt.Sprintf("testing-pod-name-%b", i), - Namespace: "testing-namespace", - ClusterName: "staging", + Name: fmt.Sprintf("testing-pod-name-%b", i), + Namespace: "testing-namespace", + Labels: map[string]string{ + clusterClutchNameLabel: "staging", + }, }, }) } @@ -218,7 +224,7 @@ func TestListPods(t *testing.T) { func TestPodDescription(t *testing.T) { t.Parallel() - var podTestCases = []struct { + podTestCases := []struct { id string inputClusterName string expectedClusterName string @@ -230,7 +236,9 @@ func TestPodDescription(t *testing.T) { expectedClusterName: "production", pod: &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ - ClusterName: "production", + Labels: map[string]string{ + clusterClutchNameLabel: "production", + }, }, Status: corev1.PodStatus{ StartTime: &metav1.Time{}, @@ -260,7 +268,9 @@ func TestPodDescription(t *testing.T) { expectedClusterName: "staging", pod: &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ - ClusterName: "", + Labels: map[string]string{ + clusterClutchNameLabel: "", + }, }, Status: corev1.PodStatus{ StartTime: &metav1.Time{}, @@ -309,10 +319,12 @@ func TestUpdatePod(t *testing.T) { pods := &corev1.PodList{} pods.Items = append(pods.Items, corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ - Name: "testing-pod-name", - Namespace: "testing-namespace", - ClusterName: "staging", - Labels: map[string]string{"foo": "bar"}, + Name: "testing-pod-name", + Namespace: "testing-namespace", + Labels: map[string]string{ + "foo": "bar", + clusterClutchNameLabel: "staging", + }, Annotations: map[string]string{"baz": "quuz"}, }, }) @@ -340,7 +352,8 @@ func TestUpdatePod(t *testing.T) { Interface: &fakeClient, namespace: "testing-namespace", cluster: "testing-cluster", - }}, + }, + }, }, } @@ -431,7 +444,7 @@ func TestUpdatePod(t *testing.T) { func TestMakeContainers(t *testing.T) { t.Parallel() - var podTestCases = []struct { + podTestCases := []struct { id string expectedContainers []*k8sv1.Container statuses []corev1.ContainerStatus @@ -523,7 +536,7 @@ func TestPodStatus(t *testing.T) { t.Parallel() timeStamp := metav1.Now() - var podTestCases = []struct { + podTestCases := []struct { id string expectedPodStatus string pod *corev1.Pod @@ -533,7 +546,9 @@ func TestPodStatus(t *testing.T) { expectedPodStatus: "CreateContainerError", pod: &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ - ClusterName: "production", + Labels: map[string]string{ + clusterClutchNameLabel: "production", + }, }, Status: corev1.PodStatus{ ContainerStatuses: []corev1.ContainerStatus{ @@ -556,7 +571,9 @@ func TestPodStatus(t *testing.T) { expectedPodStatus: "CrashLoopBackOff", pod: &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ - ClusterName: "production", + Labels: map[string]string{ + clusterClutchNameLabel: "production", + }, }, Status: corev1.PodStatus{ ContainerStatuses: []corev1.ContainerStatus{ @@ -579,7 +596,9 @@ func TestPodStatus(t *testing.T) { expectedPodStatus: "Running", pod: &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ - ClusterName: "production", + Labels: map[string]string{ + clusterClutchNameLabel: "production", + }, }, Status: corev1.PodStatus{ Phase: "Running", @@ -612,7 +631,9 @@ func TestPodStatus(t *testing.T) { expectedPodStatus: "Init: 0/0", pod: &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ - ClusterName: "production", + Labels: map[string]string{ + clusterClutchNameLabel: "production", + }, }, Status: corev1.PodStatus{ InitContainerStatuses: []corev1.ContainerStatus{ @@ -635,7 +656,9 @@ func TestPodStatus(t *testing.T) { expectedPodStatus: "Signal: 9", pod: &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ - ClusterName: "production", + Labels: map[string]string{ + clusterClutchNameLabel: "production", + }, }, Status: corev1.PodStatus{ ContainerStatuses: []corev1.ContainerStatus{ diff --git a/backend/service/k8s/service.go b/backend/service/k8s/service.go index 8e9daea26d9..78dc4918b51 100644 --- a/backend/service/k8s/service.go +++ b/backend/service/k8s/service.go @@ -69,7 +69,7 @@ func (s *svc) DeleteService(ctx context.Context, clientset, cluster, namespace, } func ProtoForService(cluster string, k8sservice *corev1.Service) *k8sapiv1.Service { - clusterName := k8sservice.ClusterName + clusterName := GetKubeCluster(k8sservice) if clusterName == "" { clusterName = cluster } diff --git a/backend/service/k8s/service_test.go b/backend/service/k8s/service_test.go index a815b9ad23c..a4cca19cee1 100644 --- a/backend/service/k8s/service_test.go +++ b/backend/service/k8s/service_test.go @@ -92,7 +92,7 @@ func TestListServices(t *testing.T) { func TestProtoForServiceClusterName(t *testing.T) { t.Parallel() - var serviceTestCases = []struct { + serviceTestCases := []struct { id string inputClusterName string expectedClusterName string @@ -104,7 +104,9 @@ func TestProtoForServiceClusterName(t *testing.T) { expectedClusterName: "production", service: &corev1.Service{ ObjectMeta: metav1.ObjectMeta{ - ClusterName: "production", + Labels: map[string]string{ + clusterClutchNameLabel: "production", + }, }, }, }, @@ -114,7 +116,9 @@ func TestProtoForServiceClusterName(t *testing.T) { expectedClusterName: "staging", service: &corev1.Service{ ObjectMeta: metav1.ObjectMeta{ - ClusterName: "", + Labels: map[string]string{ + clusterClutchNameLabel: "", + }, }, }, }, diff --git a/backend/service/k8s/statefulset.go b/backend/service/k8s/statefulset.go index c5adb24ad3b..de258b0aa3e 100644 --- a/backend/service/k8s/statefulset.go +++ b/backend/service/k8s/statefulset.go @@ -63,7 +63,7 @@ func (s *svc) ListStatefulSets(ctx context.Context, clientset, cluster, namespac // ProtoForStatefulSet maps a Kubernetes Stateful Set object to a k8sapiv1 object func ProtoForStatefulSet(cluster string, statefulSet *appsv1.StatefulSet) *k8sapiv1.StatefulSet { - clusterName := statefulSet.ClusterName + clusterName := GetKubeCluster(statefulSet) if clusterName == "" { clusterName = cluster } diff --git a/backend/service/k8s/statefulset_test.go b/backend/service/k8s/statefulset_test.go index 85449716597..48f8624a1a6 100644 --- a/backend/service/k8s/statefulset_test.go +++ b/backend/service/k8s/statefulset_test.go @@ -79,7 +79,7 @@ func TestUpdateStatefulSet(t *testing.T) { func TestMergeStatefulSetLabelsAndAnnotations(t *testing.T) { t.Parallel() - var mergeLabelAnnotationsTestCases = []struct { + mergeLabelAnnotationsTestCases := []struct { id string fields *k8sapiv1.UpdateStatefulSetRequest_Fields expect *appsv1.StatefulSet @@ -170,7 +170,7 @@ func TestMergeStatefulSetLabelsAndAnnotations(t *testing.T) { func TestProtoForStatefulSetClusterName(t *testing.T) { t.Parallel() - var statefulSetTestCases = []struct { + statefulSetTestCases := []struct { id string inputClusterName string expectedClusterName string @@ -182,7 +182,9 @@ func TestProtoForStatefulSetClusterName(t *testing.T) { expectedClusterName: "production", statefulSet: &appsv1.StatefulSet{ ObjectMeta: metav1.ObjectMeta{ - ClusterName: "production", + Labels: map[string]string{ + clusterClutchNameLabel: "production", + }, }, }, }, @@ -192,7 +194,9 @@ func TestProtoForStatefulSetClusterName(t *testing.T) { expectedClusterName: "staging", statefulSet: &appsv1.StatefulSet{ ObjectMeta: metav1.ObjectMeta{ - ClusterName: "", + Labels: map[string]string{ + clusterClutchNameLabel: "", + }, }, }, }, @@ -236,7 +240,7 @@ func TestDeleteStatefulSet(t *testing.T) { func TestProtoForStatus(t *testing.T) { t.Parallel() - var testCases = []struct { + testCases := []struct { id string statefulSet *appsv1.StatefulSet }{