diff --git a/config/crd/bases/carto.run_workloads.yaml b/config/crd/bases/carto.run_workloads.yaml index 1c77da773..7e3d2a314 100644 --- a/config/crd/bases/carto.run_workloads.yaml +++ b/config/crd/bases/carto.run_workloads.yaml @@ -322,6 +322,27 @@ spec: resources: description: Resource constraints for the application. See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ properties: + claims: + description: "Claims lists the names of resources, defined in + spec.resourceClaims, that are used by this container. \n This + is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be set + for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in pod.spec.resourceClaims + of the Pod where this field is used. It makes that resource + available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -342,7 +363,8 @@ spec: description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + to an implementation-defined value. Requests cannot exceed Limits. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object serviceAccountName: diff --git a/go.mod b/go.mod index 520205d3b..7ab244828 100644 --- a/go.mod +++ b/go.mod @@ -4,100 +4,91 @@ go 1.20 require ( github.com/MakeNowJust/heredoc v1.0.0 - github.com/go-logr/logr v1.2.3 + github.com/go-logr/logr v1.2.4 github.com/onsi/ginkgo v1.16.5 - github.com/onsi/gomega v1.24.1 + github.com/onsi/gomega v1.28.0 github.com/valyala/fasttemplate v1.2.2 - go.uber.org/zap v1.24.0 + go.uber.org/zap v1.26.0 golang.org/x/net v0.17.0 // indirect golang.org/x/text v0.13.0 // indirect - k8s.io/api v0.25.6 - k8s.io/apiextensions-apiserver v0.25.6 - k8s.io/apimachinery v0.25.6 - k8s.io/apiserver v0.25.6 - k8s.io/client-go v0.25.6 - k8s.io/utils v0.0.0-20220823124924-e9cbc92d1a73 - sigs.k8s.io/cluster-api v1.3.0 - sigs.k8s.io/controller-runtime v0.13.1 + k8s.io/api v0.28.2 + k8s.io/apiextensions-apiserver v0.28.2 + k8s.io/apimachinery v0.28.2 + k8s.io/apiserver v0.28.2 + k8s.io/client-go v0.28.2 + k8s.io/utils v0.0.0-20230726121419-3b25d923346b + sigs.k8s.io/cluster-api v1.5.2 + sigs.k8s.io/controller-runtime v0.16.2 sigs.k8s.io/controller-tools v0.10.0 sigs.k8s.io/yaml v1.3.0 ) require ( - github.com/google/gnostic v0.6.9 + github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 github.com/google/go-cmp v0.5.9 github.com/hashicorp/go-multierror v1.1.1 github.com/sirupsen/logrus v1.9.0 - github.com/spf13/cobra v1.6.1 + github.com/spf13/cobra v1.7.0 gopkg.in/yaml.v3 v3.0.1 - k8s.io/klog/v2 v2.80.1 + k8s.io/klog/v2 v2.100.1 ) require ( - cloud.google.com/go/compute v1.7.0 // indirect - github.com/Azure/go-autorest v14.2.0+incompatible // indirect - github.com/Azure/go-autorest/autorest v0.11.27 // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.20 // indirect - github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect - github.com/Azure/go-autorest/logger v0.2.1 // indirect - github.com/Azure/go-autorest/tracing v0.6.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver v3.5.1+incompatible // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/blang/semver/v4 v4.0.0 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.9.0 // indirect - github.com/evanphx/json-patch v5.6.0+incompatible // indirect - github.com/evanphx/json-patch/v5 v5.6.0 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect + github.com/evanphx/json-patch v5.7.0+incompatible // indirect + github.com/evanphx/json-patch/v5 v5.7.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-logr/zapr v1.2.3 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.20.0 // indirect - github.com/go-openapi/swag v0.22.3 // indirect - github.com/gobuffalo/flect v0.3.0 // indirect + github.com/go-logr/zapr v1.2.4 // indirect + github.com/go-openapi/jsonpointer v0.20.0 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/swag v0.22.4 // indirect + github.com/gobuffalo/flect v1.0.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang-jwt/jwt/v4 v4.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/uuid v1.3.0 // indirect + github.com/google/uuid v1.3.1 // indirect github.com/hashicorp/errwrap v1.0.0 // indirect - github.com/imdario/mergo v0.3.13 // indirect - github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/imdario/mergo v0.3.16 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/kr/pretty v0.3.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // 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/nxadm/tail v1.4.8 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/prometheus/client_golang v1.13.0 // indirect - github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.37.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect + github.com/prometheus/client_golang v1.17.0 // indirect + github.com/prometheus/client_model v0.5.0 // indirect + github.com/prometheus/common v0.44.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect - go.uber.org/atomic v1.7.0 // indirect - go.uber.org/multierr v1.6.0 // indirect - golang.org/x/crypto v0.14.0 // indirect - golang.org/x/mod v0.8.0 // indirect - golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect + golang.org/x/mod v0.12.0 // indirect + golang.org/x/oauth2 v0.12.0 // indirect golang.org/x/sys v0.13.0 // indirect golang.org/x/term v0.13.0 // indirect - golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect - golang.org/x/tools v0.6.0 // indirect - gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.28.1 // indirect + golang.org/x/time v0.3.0 // indirect + golang.org/x/tools v0.13.0 // indirect + gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - k8s.io/component-base v0.25.6 // indirect - k8s.io/kube-openapi v0.0.0-20220803164354-a70c9af30aea // indirect - sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + k8s.io/component-base v0.28.2 // indirect + k8s.io/kube-openapi v0.0.0-20230928205116-a78145627833 // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect ) retract ( diff --git a/go.sum b/go.sum index 2b2c0b534..0ec417955 100644 --- a/go.sum +++ b/go.sum @@ -1,325 +1,108 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= -cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= -cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= -cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= -cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= -cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= -cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= -cloud.google.com/go/compute v1.7.0 h1:v/k9Eueb8aAJ0vZuxKMrgm6kPhCLZU9HxFU+AFDs9Uk= -cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= -github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.27 h1:F3R3q42aWytozkV8ihzcgMO4OA4cuqr3bNlsEuF6//A= -github.com/Azure/go-autorest/autorest v0.11.27/go.mod h1:7l8ybrIdUmGqZMTD0sRtAr8NvbHjfofbf8RSP2q7w7U= -github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= -github.com/Azure/go-autorest/autorest/adal v0.9.20 h1:gJ3E98kMpFB1MFqQCvA1yFab8vthOeD4VlFRQULxahg= -github.com/Azure/go-autorest/autorest/adal v0.9.20/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= -github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= -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/autorest/mocks v0.4.2 h1:PGN4EDXnuQbojHbU0UWoNvmu9AGVwYHG9/fkDYhtAfw= -github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= -github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= -github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= -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/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -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/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= +github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -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/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= -github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= -github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= -github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= -github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ2tG6yudJd8LBksgI= +github.com/evanphx/json-patch v5.7.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0nW9SYGc= +github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -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-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -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-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= -github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= -github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= +github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= +github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= 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-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= +github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/gobuffalo/flect v0.3.0 h1:erfPWM+K1rFNIQeRPdeEXxo8yFr/PO17lhRnS8FUrtk= -github.com/gobuffalo/flect v0.3.0/go.mod h1:5pf3aGnsvqvCj50AVni7mJJF8ICxGZ8HomberC3pXLE= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/gobuffalo/flect v1.0.2 h1:eqjPGSo2WmjgY2XlpGwo2NXgL3RucAKo4k4qQMNA5sA= +github.com/gobuffalo/flect v1.0.2/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU= -github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -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/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= -github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 h1:0VpGH+cDhbDtdcweoyCVsF3fhN8kejK6rFe/2FFX2nU= +github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49/go.mod h1:BkkQ4L1KS1xMt2aWSPStnn55ChGC0DPOn2FQYj+f25M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.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= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/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/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= -github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= -github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= -github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= +github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= +github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -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.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= -github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= -github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= -github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= +github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= 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= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -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.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= 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= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -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.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= 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-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/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/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= @@ -327,305 +110,110 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.5.0 h1:TRtrvv2vdQqzkwrQ1ke6vtXf7IK34RBUJafIy1wMwls= +github.com/onsi/ginkgo/v2 v2.12.0 h1:UIVDowFPwpg6yMUpPjGkYvf06K3RAiJXUhCxEwQVHRI= 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.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= -github.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmvt1jM= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/onsi/gomega v1.28.0 h1:i2rg/p9n/UqIDAMFUJ6qIUUMcsqOuUHgbpbu235Vr1c= +github.com/onsi/gomega v1.28.0/go.mod h1:A1H2JE76sI14WIP57LMKj7FVfCHx3g3BcZVjJG8bjX8= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -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.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -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= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -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.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= +github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= +github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= +github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -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/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= -github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= +github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= -go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= +go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-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-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= -golang.org/x/mod v0.8.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/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/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-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-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= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/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-20211112202133-69e39bad7dc2/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= -golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= -golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= +golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= -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/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/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= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-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-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= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/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-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -633,326 +221,87 @@ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9sn golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 h1:ftMN5LMiBFjbzleLqtoBZk7KdJwhuybIU+FckUHgoyQ= -golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -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.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= -gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= -google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= -google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= -google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= -google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= -google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= -google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= -google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= -google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= +gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= 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= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/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/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.25.6 h1:LwDY2H6kD/3R8TekJYYaJWOdekNdXDO44eVpX6sNtJA= -k8s.io/api v0.25.6/go.mod h1:bVp01KUcl8VUHFBTJMOknWNo7XvR0cMbeTTuFg1zCUs= -k8s.io/apiextensions-apiserver v0.25.6 h1:MwdaCpHtGVSM5SiA6Hm4g2w5voMNiPCwBjOqz9YTlrg= -k8s.io/apiextensions-apiserver v0.25.6/go.mod h1:aXw8Xmhf6/gfGx3y0xkj8o8evTZbfOFqZeWIigg4XsE= -k8s.io/apimachinery v0.25.6 h1:r6KIF2AHwLqFfZ0LcOA3I11SF62YZK83dxj1fn14NOQ= -k8s.io/apimachinery v0.25.6/go.mod h1:1S2i1QHkmxc8+EZCIxe/fX5hpldVXk4gvnJInMEb8D4= -k8s.io/apiserver v0.25.6 h1:32mn8HAlsEl1tpuiVmhAl0YCVkOugjybsJ6l6kf0c8k= -k8s.io/apiserver v0.25.6/go.mod h1:IEp2B2/FvQ8GmdspscUoUS0iFF/GGc6NVrJ/cTM4OaA= -k8s.io/client-go v0.25.6 h1:CHxACHi0DijmlYyUR7ooZoXnD5P8jYLgBHcxp775x/U= -k8s.io/client-go v0.25.6/go.mod h1:s9mMAGFYiH3Z66j7BESzu0GEradT9GQ2LjFf/YRrnyc= -k8s.io/component-base v0.25.6 h1:v3ci6FbXFcxpjyQJaaLq0MgzT3vyFzwUDWtO+KRv9Bk= -k8s.io/component-base v0.25.6/go.mod h1:k7DfcfJ8cOI6A2xTCfU5LxsnXV+lWw1ME8cRCHzIh6o= -k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= -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-20220803164354-a70c9af30aea h1:3QOH5+2fGsY8e1qf+GIFpg+zw/JGNrgyZRQR7/m6uWg= -k8s.io/kube-openapi v0.0.0-20220803164354-a70c9af30aea/go.mod h1:C/N6wCaBHeBHkHUesQOQy2/MZqGgMAFPqGsGQLdbZBU= -k8s.io/utils v0.0.0-20220823124924-e9cbc92d1a73 h1:H9TCJUUx+2VA0ZiD9lvtaX8fthFsMoD+Izn93E/hm8U= -k8s.io/utils v0.0.0-20220823124924-e9cbc92d1a73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/cluster-api v1.3.0 h1:T1FM0ATWBkPiJ/qNVQmnQMogU76zdUTOe7NxBRr6QYc= -sigs.k8s.io/cluster-api v1.3.0/go.mod h1:Mv33sb01w2bqd7AurCyCiqyN93meP7b0/GPFYNUYYj4= -sigs.k8s.io/controller-runtime v0.13.1 h1:tUsRCSJVM1QQOOeViGeX3GMT3dQF1eePPw6sEE3xSlg= -sigs.k8s.io/controller-runtime v0.13.1/go.mod h1:Zbz+el8Yg31jubvAEyglRZGdLAjplZl+PgtYNI6WNTI= +k8s.io/api v0.28.2 h1:9mpl5mOb6vXZvqbQmankOfPIGiudghwCoLl1EYfUZbw= +k8s.io/api v0.28.2/go.mod h1:RVnJBsjU8tcMq7C3iaRSGMeaKt2TWEUXcpIt/90fjEg= +k8s.io/apiextensions-apiserver v0.28.2 h1:J6/QRWIKV2/HwBhHRVITMLYoypCoPY1ftigDM0Kn+QU= +k8s.io/apiextensions-apiserver v0.28.2/go.mod h1:5tnkxLGa9nefefYzWuAlWZ7RZYuN/765Au8cWLA6SRg= +k8s.io/apimachinery v0.28.2 h1:KCOJLrc6gu+wV1BYgwik4AF4vXOlVJPdiqn0yAWWwXQ= +k8s.io/apimachinery v0.28.2/go.mod h1:RdzF87y/ngqk9H4z3EL2Rppv5jj95vGS/HaFXrLDApU= +k8s.io/apiserver v0.28.2 h1:rBeYkLvF94Nku9XfXyUIirsVzCzJBs6jMn3NWeHieyI= +k8s.io/apiserver v0.28.2/go.mod h1:f7D5e8wH8MWcKD7azq6Csw9UN+CjdtXIVQUyUhrtb+E= +k8s.io/client-go v0.28.2 h1:DNoYI1vGq0slMBN/SWKMZMw0Rq+0EQW6/AK4v9+3VeY= +k8s.io/client-go v0.28.2/go.mod h1:sMkApowspLuc7omj1FOSUxSoqjr+d5Q0Yc0LOFnYFJY= +k8s.io/component-base v0.28.2 h1:Yc1yU+6AQSlpJZyvehm/NkJBII72rzlEsd6MkBQ+G0E= +k8s.io/component-base v0.28.2/go.mod h1:4IuQPQviQCg3du4si8GpMrhAIegxpsgPngPRR/zWpzc= +k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= +k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kube-openapi v0.0.0-20230928205116-a78145627833 h1:iFFEmmB7szQhJP42AvRD2+gzdVP7EuIKY1rJgxf0JZY= +k8s.io/kube-openapi v0.0.0-20230928205116-a78145627833/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/cluster-api v1.5.2 h1:pCsyEHwTBb7n+U5Z2OA5STxdJ1EuSpJv8FLBx4lii3s= +sigs.k8s.io/cluster-api v1.5.2/go.mod h1:EGJUNpFWi7dF426tO8MG/jE+w7T0UO5KyMnOwQ5riUY= +sigs.k8s.io/controller-runtime v0.16.2 h1:mwXAVuEk3EQf478PQwQ48zGOXvW27UJc8NHktQVuIPU= +sigs.k8s.io/controller-runtime v0.16.2/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU= sigs.k8s.io/controller-tools v0.10.0 h1:0L5DTDTFB67jm9DkfrONgTGmfc/zYow0ZaHyppizU2U= sigs.k8s.io/controller-tools v0.10.0/go.mod h1:uvr0EW6IsprfB0jpQq6evtKy+hHyHCXNfdWI5ONPx94= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/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/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.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= +sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/pkg/apis/v1alpha1/cluster_config_template_test.go b/pkg/apis/v1alpha1/cluster_config_template_test.go index 220b9669d..73fbce840 100644 --- a/pkg/apis/v1alpha1/cluster_config_template_test.go +++ b/pkg/apis/v1alpha1/cluster_config_template_test.go @@ -60,7 +60,8 @@ var _ = Describe("ClusterConfigTemplate", func() { }) It("succeeds", func() { - Expect(template.ValidateCreate()).To(Succeed()) + _, err := template.ValidateCreate() + Expect(err).To(Succeed()) }) }) @@ -84,7 +85,8 @@ var _ = Describe("ClusterConfigTemplate", func() { }) It("returns an error", func() { - Expect(template.ValidateCreate()). + _, err := template.ValidateCreate() + Expect(err). To(MatchError("invalid template: template should not set metadata.namespace on the child object")) }) }) @@ -110,7 +112,8 @@ var _ = Describe("ClusterConfigTemplate", func() { }) It("succeeds", func() { - Expect(template.ValidateUpdate(nil)).To(Succeed()) + _, err := template.ValidateUpdate(nil) + Expect(err).To(Succeed()) }) }) @@ -134,7 +137,8 @@ var _ = Describe("ClusterConfigTemplate", func() { }) It("returns an error", func() { - Expect(template.ValidateUpdate(nil)). + _, err := template.ValidateUpdate(nil) + Expect(err). To(MatchError("invalid template: template should not set metadata.namespace on the child object")) }) }) @@ -144,7 +148,8 @@ var _ = Describe("ClusterConfigTemplate", func() { Context("Any template", func() { var anyTemplate *v1alpha1.ClusterConfigTemplate It("always succeeds", func() { - Expect(anyTemplate.ValidateDelete()).NotTo(HaveOccurred()) + _, err := anyTemplate.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) }) diff --git a/pkg/apis/v1alpha1/cluster_config_template_webhook.go b/pkg/apis/v1alpha1/cluster_config_template_webhook.go index ad081c890..8ec1af26b 100644 --- a/pkg/apis/v1alpha1/cluster_config_template_webhook.go +++ b/pkg/apis/v1alpha1/cluster_config_template_webhook.go @@ -18,22 +18,23 @@ import ( "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" ) // +kubebuilder:webhook:path=/validate-carto-run-v1alpha1-clusterconfigtemplate,mutating=false,failurePolicy=fail,sideEffects=none,admissionReviewVersions=v1beta1;v1,groups=carto.run,resources=clusterconfigtemplates,verbs=create;update,versions=v1alpha1,name=config-template-validator.cartographer.com var _ webhook.Validator = &ClusterConfigTemplate{} -func (c *ClusterConfigTemplate) ValidateCreate() error { +func (c *ClusterConfigTemplate) ValidateCreate() (admission.Warnings, error) { return c.Spec.TemplateSpec.validate() } -func (c *ClusterConfigTemplate) ValidateUpdate(_ runtime.Object) error { +func (c *ClusterConfigTemplate) ValidateUpdate(_ runtime.Object) (admission.Warnings, error) { return c.Spec.TemplateSpec.validate() } -func (c *ClusterConfigTemplate) ValidateDelete() error { - return nil +func (c *ClusterConfigTemplate) ValidateDelete() (admission.Warnings, error) { + return nil, nil } func (c *ClusterConfigTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error { diff --git a/pkg/apis/v1alpha1/cluster_delivery_webhook.go b/pkg/apis/v1alpha1/cluster_delivery_webhook.go index bec2a1766..c27ec2f7a 100644 --- a/pkg/apis/v1alpha1/cluster_delivery_webhook.go +++ b/pkg/apis/v1alpha1/cluster_delivery_webhook.go @@ -20,30 +20,31 @@ import ( "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" ) // +kubebuilder:webhook:path=/validate-carto-run-v1alpha1-clusterdelivery,mutating=false,failurePolicy=fail,sideEffects=none,admissionReviewVersions=v1beta1;v1,groups=carto.run,resources=clusterdeliveries,verbs=create;update,versions=v1alpha1,name=delivery-validator.cartographer.com var _ webhook.Validator = &ClusterDelivery{} -func (c *ClusterDelivery) ValidateCreate() error { +func (c *ClusterDelivery) ValidateCreate() (admission.Warnings, error) { err := c.validateNewState() if err != nil { - return fmt.Errorf("error validating clusterdelivery [%s]: %w", c.Name, err) + return nil, fmt.Errorf("error validating clusterdelivery [%s]: %w", c.Name, err) } - return nil + return nil, nil } -func (c *ClusterDelivery) ValidateUpdate(_ runtime.Object) error { +func (c *ClusterDelivery) ValidateUpdate(_ runtime.Object) (admission.Warnings, error) { err := c.validateNewState() if err != nil { - return fmt.Errorf("error validating clusterdelivery [%s]: %w", c.Name, err) + return nil, fmt.Errorf("error validating clusterdelivery [%s]: %w", c.Name, err) } - return nil + return nil, nil } -func (c *ClusterDelivery) ValidateDelete() error { - return nil +func (c *ClusterDelivery) ValidateDelete() (admission.Warnings, error) { + return nil, nil } func (c *ClusterDelivery) validateNewState() error { diff --git a/pkg/apis/v1alpha1/cluster_delivery_webhook_test.go b/pkg/apis/v1alpha1/cluster_delivery_webhook_test.go index 3ce4a1290..4f668112c 100644 --- a/pkg/apis/v1alpha1/cluster_delivery_webhook_test.go +++ b/pkg/apis/v1alpha1/cluster_delivery_webhook_test.go @@ -66,11 +66,13 @@ var _ = Describe("Delivery Validation", func() { }) Context("Well formed delivery", func() { It("creates without error", func() { - Expect(delivery.ValidateCreate()).NotTo(HaveOccurred()) + _, err := delivery.ValidateCreate() + Expect(err).NotTo(HaveOccurred()) }) It("updates without error", func() { - Expect(delivery.ValidateUpdate(oldDelivery)).NotTo(HaveOccurred()) + _, err := delivery.ValidateUpdate(oldDelivery) + Expect(err).NotTo(HaveOccurred()) }) }) @@ -82,11 +84,13 @@ var _ = Describe("Delivery Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(delivery.ValidateCreate()).To(MatchError(`error validating clusterdelivery [delivery-resource]: spec.resources[1].name "source-provider" cannot appear twice`)) + _, err := delivery.ValidateCreate() + Expect(err).To(MatchError(`error validating clusterdelivery [delivery-resource]: spec.resources[1].name "source-provider" cannot appear twice`)) }) It("on update, it rejects the Resource", func() { - Expect(delivery.ValidateUpdate(oldDelivery)).To(MatchError(`error validating clusterdelivery [delivery-resource]: spec.resources[1].name "source-provider" cannot appear twice`)) + _, err := delivery.ValidateUpdate(oldDelivery) + Expect(err).To(MatchError(`error validating clusterdelivery [delivery-resource]: spec.resources[1].name "source-provider" cannot appear twice`)) }) }) @@ -101,13 +105,15 @@ var _ = Describe("Delivery Validation", func() { } }) It("on create, it rejects the Resource", func() { - Expect(delivery.ValidateCreate()).To(MatchError( + _, err := delivery.ValidateCreate() + Expect(err).To(MatchError( "error validating clusterdelivery [delivery-resource]: param [some-param] is invalid: must set exactly one of value and default", )) }) It("on update, it rejects the Resource", func() { - Expect(delivery.ValidateUpdate(oldDelivery)).To(MatchError( + _, err := delivery.ValidateUpdate(oldDelivery) + Expect(err).To(MatchError( "error validating clusterdelivery [delivery-resource]: param [some-param] is invalid: must set exactly one of value and default", )) }) @@ -125,13 +131,15 @@ var _ = Describe("Delivery Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(delivery.ValidateCreate()).To(MatchError( + _, err := delivery.ValidateCreate() + Expect(err).To(MatchError( "error validating clusterdelivery [delivery-resource]: param [some-param] is invalid: must set exactly one of value and default", )) }) It("on update, it rejects the Resource", func() { - Expect(delivery.ValidateUpdate(oldDelivery)).To(MatchError( + _, err := delivery.ValidateUpdate(oldDelivery) + Expect(err).To(MatchError( "error validating clusterdelivery [delivery-resource]: param [some-param] is invalid: must set exactly one of value and default", )) }) @@ -148,13 +156,15 @@ var _ = Describe("Delivery Validation", func() { } }) It("on create, it rejects the Resource", func() { - Expect(delivery.ValidateCreate()).To(MatchError( + _, err := delivery.ValidateCreate() + Expect(err).To(MatchError( "error validating clusterdelivery [delivery-resource]: resource [source-provider] is invalid: param [some-param] is invalid: must set exactly one of value and default", )) }) It("on update, it rejects the Resource", func() { - Expect(delivery.ValidateUpdate(oldDelivery)).To(MatchError( + _, err := delivery.ValidateUpdate(oldDelivery) + Expect(err).To(MatchError( "error validating clusterdelivery [delivery-resource]: resource [source-provider] is invalid: param [some-param] is invalid: must set exactly one of value and default", )) }) @@ -171,13 +181,15 @@ var _ = Describe("Delivery Validation", func() { } }) It("on create, it rejects the Resourcer", func() { - Expect(delivery.ValidateCreate()).To(MatchError( + _, err := delivery.ValidateCreate() + Expect(err).To(MatchError( "error validating clusterdelivery [delivery-resource]: resource [source-provider] is invalid: param [some-param] is invalid: must set exactly one of value and default", )) }) It("on update, it rejects the Resourcer", func() { - Expect(delivery.ValidateUpdate(oldDelivery)).To(MatchError( + _, err := delivery.ValidateUpdate(oldDelivery) + Expect(err).To(MatchError( "error validating clusterdelivery [delivery-resource]: resource [source-provider] is invalid: param [some-param] is invalid: must set exactly one of value and default", )) }) @@ -240,15 +252,18 @@ var _ = Describe("Delivery Validation", func() { Context("Well formed delivery", func() { It("creates without error", func() { - Expect(delivery.ValidateCreate()).NotTo(HaveOccurred()) + _, err := delivery.ValidateCreate() + Expect(err).NotTo(HaveOccurred()) }) It("updates without error", func() { - Expect(delivery.ValidateUpdate(oldDelivery)).NotTo(HaveOccurred()) + _, err := delivery.ValidateUpdate(oldDelivery) + Expect(err).NotTo(HaveOccurred()) }) It("deletes without error", func() { - Expect(delivery.ValidateDelete()).NotTo(HaveOccurred()) + _, err := delivery.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -258,19 +273,22 @@ var _ = Describe("Delivery Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(delivery.ValidateCreate()).To(MatchError( + _, err := delivery.ValidateCreate() + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: duplicate template name [source-2] found in options for resource [source-provider]", )) }) It("on update, it rejects the Resource", func() { - Expect(delivery.ValidateUpdate(oldDelivery)).To(MatchError( + _, err := delivery.ValidateUpdate(oldDelivery) + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: duplicate template name [source-2] found in options for resource [source-provider]", )) }) It("deletes without error", func() { - Expect(delivery.ValidateDelete()).NotTo(HaveOccurred()) + _, err := delivery.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -285,19 +303,22 @@ var _ = Describe("Delivery Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(delivery.ValidateCreate()).To(MatchError( + _, err := delivery.ValidateCreate() + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: templateRef.Options must have more than one option", )) }) It("on update, it rejects the Resource", func() { - Expect(delivery.ValidateUpdate(oldDelivery)).To(MatchError( + _, err := delivery.ValidateUpdate(oldDelivery) + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: templateRef.Options must have more than one option", )) }) It("deletes without error", func() { - Expect(delivery.ValidateDelete()).NotTo(HaveOccurred()) + _, err := delivery.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -312,19 +333,22 @@ var _ = Describe("Delivery Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(delivery.ValidateCreate()).To(MatchError( + _, err := delivery.ValidateCreate() + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: error validating option [source-1] selector: cannot specify values with operator [Exists]", )) }) It("on update, it rejects the Resource", func() { - Expect(delivery.ValidateUpdate(oldDelivery)).To(MatchError( + _, err := delivery.ValidateUpdate(oldDelivery) + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: error validating option [source-1] selector: cannot specify values with operator [Exists]", )) }) It("deletes without error", func() { - Expect(delivery.ValidateDelete()).NotTo(HaveOccurred()) + _, err := delivery.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -338,19 +362,22 @@ var _ = Describe("Delivery Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(delivery.ValidateCreate()).To(MatchError( + _, err := delivery.ValidateCreate() + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: error validating option [source-1] selector: cannot specify values with operator [DoesNotExist]", )) }) It("on update, it rejects the Resource", func() { - Expect(delivery.ValidateUpdate(oldDelivery)).To(MatchError( + _, err := delivery.ValidateUpdate(oldDelivery) + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: error validating option [source-1] selector: cannot specify values with operator [DoesNotExist]", )) }) It("deletes without error", func() { - Expect(delivery.ValidateDelete()).NotTo(HaveOccurred()) + _, err := delivery.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) Context("operator is In and does NOT have values", func() { @@ -362,19 +389,22 @@ var _ = Describe("Delivery Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(delivery.ValidateCreate()).To(MatchError( + _, err := delivery.ValidateCreate() + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: error validating option [source-1] selector: must specify values with operator [In]", )) }) It("on update, it rejects the Resource", func() { - Expect(delivery.ValidateUpdate(oldDelivery)).To(MatchError( + _, err := delivery.ValidateUpdate(oldDelivery) + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: error validating option [source-1] selector: must specify values with operator [In]", )) }) It("deletes without error", func() { - Expect(delivery.ValidateDelete()).NotTo(HaveOccurred()) + _, err := delivery.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) Context("operator is NotIn and does NOT have values", func() { @@ -386,19 +416,22 @@ var _ = Describe("Delivery Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(delivery.ValidateCreate()).To(MatchError( + _, err := delivery.ValidateCreate() + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: error validating option [source-1] selector: must specify values with operator [NotIn]", )) }) It("on update, it rejects the Resource", func() { - Expect(delivery.ValidateUpdate(oldDelivery)).To(MatchError( + _, err := delivery.ValidateUpdate(oldDelivery) + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: error validating option [source-1] selector: must specify values with operator [NotIn]", )) }) It("deletes without error", func() { - Expect(delivery.ValidateDelete()).NotTo(HaveOccurred()) + _, err := delivery.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) }) @@ -410,19 +443,22 @@ var _ = Describe("Delivery Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(delivery.ValidateCreate()).To(MatchError( + _, err := delivery.ValidateCreate() + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: duplicate selector found in options [source-1, source-2]", )) }) It("on update, it rejects the Resource", func() { - Expect(delivery.ValidateUpdate(oldDelivery)).To(MatchError( + _, err := delivery.ValidateUpdate(oldDelivery) + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: duplicate selector found in options [source-1, source-2]", )) }) It("deletes without error", func() { - Expect(delivery.ValidateDelete()).NotTo(HaveOccurred()) + _, err := delivery.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) }) @@ -433,19 +469,22 @@ var _ = Describe("Delivery Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(delivery.ValidateCreate()).To(MatchError( + _, err := delivery.ValidateCreate() + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: error validating option [source-1] selector: requirement key [spec.does.not.exist] is not a valid path", )) }) It("on update, it rejects the Resource", func() { - Expect(delivery.ValidateUpdate(oldDelivery)).To(MatchError( + _, err := delivery.ValidateUpdate(oldDelivery) + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: error validating option [source-1] selector: requirement key [spec.does.not.exist] is not a valid path", )) }) It("deletes without error", func() { - Expect(delivery.ValidateDelete()).NotTo(HaveOccurred()) + _, err := delivery.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -455,19 +494,22 @@ var _ = Describe("Delivery Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(delivery.ValidateCreate()).To(MatchError(ContainSubstring( + _, err := delivery.ValidateCreate() + Expect(err).To(MatchError(ContainSubstring( `error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: error validating option [source-1] selector: matchLabels are not valid: [key: Invalid value: "not-valid-"`, ))) }) It("on update, it rejects the Resource", func() { - Expect(delivery.ValidateUpdate(oldDelivery)).To(MatchError(ContainSubstring( + _, err := delivery.ValidateUpdate(oldDelivery) + Expect(err).To(MatchError(ContainSubstring( `error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: error validating option [source-1] selector: matchLabels are not valid: [key: Invalid value: "not-valid-"`, ))) }) It("deletes without error", func() { - Expect(delivery.ValidateDelete()).NotTo(HaveOccurred()) + _, err := delivery.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -477,17 +519,18 @@ var _ = Describe("Delivery Validation", func() { }) It("on create, it does not reject the Resource", func() { - err := delivery.ValidateCreate() + _, err := delivery.ValidateCreate() Expect(err).NotTo(HaveOccurred()) }) It("on update, it does not reject the Resource", func() { - err := delivery.ValidateUpdate(oldDelivery) + _, err := delivery.ValidateUpdate(oldDelivery) Expect(err).NotTo(HaveOccurred()) }) It("deletes without error", func() { - Expect(delivery.ValidateDelete()).NotTo(HaveOccurred()) + _, err := delivery.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -497,19 +540,22 @@ var _ = Describe("Delivery Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(delivery.ValidateCreate()).To(MatchError( + _, err := delivery.ValidateCreate() + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: exactly one of templateRef.Name or templateRef.Options must be specified, found both", )) }) It("on update, it rejects the Resource", func() { - Expect(delivery.ValidateUpdate(oldDelivery)).To(MatchError( + _, err := delivery.ValidateUpdate(oldDelivery) + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: exactly one of templateRef.Name or templateRef.Options must be specified, found both", )) }) It("deletes without error", func() { - Expect(delivery.ValidateDelete()).NotTo(HaveOccurred()) + _, err := delivery.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -519,19 +565,22 @@ var _ = Describe("Delivery Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(delivery.ValidateCreate()).To(MatchError( + _, err := delivery.ValidateCreate() + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: exactly one of templateRef.Name or templateRef.Options must be specified, found neither", )) }) It("on update, it rejects the Resource", func() { - Expect(delivery.ValidateUpdate(oldDelivery)).To(MatchError( + _, err := delivery.ValidateUpdate(oldDelivery) + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: exactly one of templateRef.Name or templateRef.Options must be specified, found neither", )) }) It("deletes without error", func() { - Expect(delivery.ValidateDelete()).NotTo(HaveOccurred()) + _, err := delivery.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -541,19 +590,22 @@ var _ = Describe("Delivery Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(delivery.ValidateCreate()).To(MatchError( + _, err := delivery.ValidateCreate() + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: exactly one of option.Name or option.PassThrough must be specified, found neither", )) }) It("on update, it rejects the Resource", func() { - Expect(delivery.ValidateUpdate(oldDelivery)).To(MatchError( + _, err := delivery.ValidateUpdate(oldDelivery) + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: exactly one of option.Name or option.PassThrough must be specified, found neither", )) }) It("deletes without error", func() { - Expect(delivery.ValidateDelete()).NotTo(HaveOccurred()) + _, err := delivery.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -582,19 +634,22 @@ var _ = Describe("Delivery Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(delivery.ValidateCreate()).To(MatchError( + _, err := delivery.ValidateCreate() + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: pass through [wrong-input] does not refer to a known input", )) }) It("on update, it rejects the Resource", func() { - Expect(delivery.ValidateUpdate(oldDelivery)).To(MatchError( + _, err := delivery.ValidateUpdate(oldDelivery) + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: pass through [wrong-input] does not refer to a known input", )) }) It("deletes without error", func() { - Expect(delivery.ValidateDelete()).NotTo(HaveOccurred()) + _, err := delivery.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -605,19 +660,22 @@ var _ = Describe("Delivery Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(delivery.ValidateCreate()).To(MatchError( + _, err := delivery.ValidateCreate() + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: cannot have more than one pass through option, found 2", )) }) It("on update, it rejects the Resource", func() { - Expect(delivery.ValidateUpdate(oldDelivery)).To(MatchError( + _, err := delivery.ValidateUpdate(oldDelivery) + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: cannot have more than one pass through option, found 2", )) }) It("deletes without error", func() { - Expect(delivery.ValidateDelete()).NotTo(HaveOccurred()) + _, err := delivery.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -627,19 +685,22 @@ var _ = Describe("Delivery Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(delivery.ValidateCreate()).To(MatchError( + _, err := delivery.ValidateCreate() + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: exactly one of option.Name or option.PassThrough must be specified, found both", )) }) It("on update, it rejects the Resource", func() { - Expect(delivery.ValidateUpdate(oldDelivery)).To(MatchError( + _, err := delivery.ValidateUpdate(oldDelivery) + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: exactly one of option.Name or option.PassThrough must be specified, found both", )) }) It("deletes without error", func() { - Expect(delivery.ValidateDelete()).NotTo(HaveOccurred()) + _, err := delivery.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -652,19 +713,22 @@ var _ = Describe("Delivery Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(delivery.ValidateCreate()).To(MatchError( + _, err := delivery.ValidateCreate() + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: duplicate selector found in options [source-1, passThrough]", )) }) It("on update, it rejects the Resource", func() { - Expect(delivery.ValidateUpdate(oldDelivery)).To(MatchError( + _, err := delivery.ValidateUpdate(oldDelivery) + Expect(err).To(MatchError( "error validating clusterdelivery [responsible-ops---default-params]: error validating resource [source-provider]: duplicate selector found in options [source-1, passThrough]", )) }) It("deletes without error", func() { - Expect(delivery.ValidateDelete()).NotTo(HaveOccurred()) + _, err := delivery.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) }) @@ -676,15 +740,18 @@ var _ = Describe("Delivery Validation", func() { }) It("creates without error", func() { - Expect(delivery.ValidateCreate()).NotTo(HaveOccurred()) + _, err := delivery.ValidateCreate() + Expect(err).NotTo(HaveOccurred()) }) It("updates without error", func() { - Expect(delivery.ValidateUpdate(oldDelivery)).NotTo(HaveOccurred()) + _, err := delivery.ValidateUpdate(oldDelivery) + Expect(err).NotTo(HaveOccurred()) }) It("deletes without error", func() { - Expect(delivery.ValidateDelete()).NotTo(HaveOccurred()) + _, err := delivery.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) }) @@ -730,19 +797,22 @@ var _ = Describe("Delivery Validation", func() { }) It("on create, returns an error", func() { - Expect(delivery.ValidateCreate()).To(MatchError( + _, err := delivery.ValidateCreate() + Expect(err).To(MatchError( "error validating clusterdelivery [delivery-resource]: at least one selector, selectorMatchExpression, selectorMatchField must be specified", )) }) It("on update, returns an error", func() { - Expect(delivery.ValidateUpdate(nil)).To(MatchError( + _, err := delivery.ValidateUpdate(nil) + Expect(err).To(MatchError( "error validating clusterdelivery [delivery-resource]: at least one selector, selectorMatchExpression, selectorMatchField must be specified", )) }) It("deletes without error", func() { - Expect(delivery.ValidateDelete()).NotTo(HaveOccurred()) + _, err := delivery.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) Context("Empty selection", func() { @@ -752,19 +822,22 @@ var _ = Describe("Delivery Validation", func() { }) It("on create, returns an error", func() { - Expect(delivery.ValidateCreate()).To(MatchError( + _, err := delivery.ValidateCreate() + Expect(err).To(MatchError( "error validating clusterdelivery [delivery-resource]: at least one selector, selectorMatchExpression, selectorMatchField must be specified", )) }) It("on update, returns an error", func() { - Expect(delivery.ValidateUpdate(nil)).To(MatchError( + _, err := delivery.ValidateUpdate(nil) + Expect(err).To(MatchError( "error validating clusterdelivery [delivery-resource]: at least one selector, selectorMatchExpression, selectorMatchField must be specified", )) }) It("deletes without error", func() { - Expect(delivery.ValidateDelete()).NotTo(HaveOccurred()) + _, err := delivery.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) Context("A Selector", func() { @@ -774,15 +847,18 @@ var _ = Describe("Delivery Validation", func() { }) It("creates without error", func() { - Expect(delivery.ValidateCreate()).NotTo(HaveOccurred()) + _, err := delivery.ValidateCreate() + Expect(err).NotTo(HaveOccurred()) }) It("on update, returns an error", func() { - Expect(delivery.ValidateUpdate(nil)).NotTo(HaveOccurred()) + _, err := delivery.ValidateUpdate(nil) + Expect(err).NotTo(HaveOccurred()) }) It("deletes without error", func() { - Expect(delivery.ValidateDelete()).NotTo(HaveOccurred()) + _, err := delivery.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) Context("A SelectorMatchExpression", func() { @@ -792,15 +868,18 @@ var _ = Describe("Delivery Validation", func() { }) It("creates without error", func() { - Expect(delivery.ValidateCreate()).NotTo(HaveOccurred()) + _, err := delivery.ValidateCreate() + Expect(err).NotTo(HaveOccurred()) }) It("updates without error", func() { - Expect(delivery.ValidateUpdate(nil)).NotTo(HaveOccurred()) + _, err := delivery.ValidateUpdate(nil) + Expect(err).NotTo(HaveOccurred()) }) It("deletes without error", func() { - Expect(delivery.ValidateDelete()).NotTo(HaveOccurred()) + _, err := delivery.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) Context("A SelectorMatchFields", func() { @@ -810,15 +889,18 @@ var _ = Describe("Delivery Validation", func() { }) It("creates without error", func() { - Expect(delivery.ValidateCreate()).NotTo(HaveOccurred()) + _, err := delivery.ValidateCreate() + Expect(err).NotTo(HaveOccurred()) }) It("updates without error", func() { - Expect(delivery.ValidateUpdate(nil)).NotTo(HaveOccurred()) + _, err := delivery.ValidateUpdate(nil) + Expect(err).NotTo(HaveOccurred()) }) It("deletes without error", func() { - Expect(delivery.ValidateDelete()).NotTo(HaveOccurred()) + _, err := delivery.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) }) @@ -882,7 +964,8 @@ var _ = Describe("Delivery Validation", func() { } }) It("creates without error", func() { - Expect(delivery.ValidateCreate()).NotTo(HaveOccurred()) + _, err := delivery.ValidateCreate() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -899,7 +982,8 @@ var _ = Describe("Delivery Validation", func() { } }) It("rejects with an error", func() { - Expect(delivery.ValidateCreate()).To(MatchError("error validating clusterdelivery [some-name]: invalid jsonpath for key [spec.params[0].{{}}]: unrecognized character in action: U+007B '{'")) + _, err := delivery.ValidateCreate() + Expect(err).To(MatchError("error validating clusterdelivery [some-name]: invalid jsonpath for key [spec.params[0].{{}}]: unrecognized character in action: U+007B '{'")) }) }) @@ -915,7 +999,8 @@ var _ = Describe("Delivery Validation", func() { } }) It("rejects with an error", func() { - Expect(delivery.ValidateCreate()).To(MatchError("error validating clusterdelivery [some-name]: requirement key [foo] is not a valid path")) + _, err := delivery.ValidateCreate() + Expect(err).To(MatchError("error validating clusterdelivery [some-name]: requirement key [foo] is not a valid path")) }) }) }) @@ -934,7 +1019,8 @@ var _ = Describe("Delivery Validation", func() { }) It("creates without error", func() { - Expect(delivery.ValidateCreate()).NotTo(HaveOccurred()) + _, err := delivery.ValidateCreate() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -951,7 +1037,8 @@ var _ = Describe("Delivery Validation", func() { }) It("rejects with error", func() { - Expect(delivery.ValidateCreate()).To(MatchError(ContainSubstring("error validating clusterdelivery [some-name]: selectorMatchExpressions are not valid: key: Invalid value: \"-my-label\""))) + _, err := delivery.ValidateCreate() + Expect(err).To(MatchError(ContainSubstring("error validating clusterdelivery [some-name]: selectorMatchExpressions are not valid: key: Invalid value: \"-my-label\""))) }) }) }) @@ -965,7 +1052,8 @@ var _ = Describe("Delivery Validation", func() { }) It("creates without error", func() { - Expect(delivery.ValidateCreate()).NotTo(HaveOccurred()) + _, err := delivery.ValidateCreate() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -977,7 +1065,8 @@ var _ = Describe("Delivery Validation", func() { }) It("rejects with error", func() { - Expect(delivery.ValidateCreate()).To(MatchError(ContainSubstring("error validating clusterdelivery [some-name]: selector is not valid: key: Invalid value: \"-my-label\""))) + _, err := delivery.ValidateCreate() + Expect(err).To(MatchError(ContainSubstring("error validating clusterdelivery [some-name]: selector is not valid: key: Invalid value: \"-my-label\""))) }) }) }) diff --git a/pkg/apis/v1alpha1/cluster_deployment_template_test.go b/pkg/apis/v1alpha1/cluster_deployment_template_test.go index 685e900dc..5dac4de32 100644 --- a/pkg/apis/v1alpha1/cluster_deployment_template_test.go +++ b/pkg/apis/v1alpha1/cluster_deployment_template_test.go @@ -69,11 +69,13 @@ var _ = Describe("ClusterDeploymentTemplate", func() { }) It("create succeeds", func() { - Expect(template.ValidateCreate()).To(Succeed()) + _, err := template.ValidateCreate() + Expect(err).To(Succeed()) }) It("update succeeds", func() { - Expect(template.ValidateUpdate(nil)).To(Succeed()) + _, err := template.ValidateUpdate(nil) + Expect(err).To(Succeed()) }) }) Context("with observedMatches", func() { @@ -87,11 +89,13 @@ var _ = Describe("ClusterDeploymentTemplate", func() { }) It("create succeeds", func() { - Expect(template.ValidateCreate()).To(Succeed()) + _, err := template.ValidateCreate() + Expect(err).To(Succeed()) }) It("update succeeds", func() { - Expect(template.ValidateUpdate(nil)).To(Succeed()) + _, err := template.ValidateUpdate(nil) + Expect(err).To(Succeed()) }) }) }) @@ -113,23 +117,27 @@ var _ = Describe("ClusterDeploymentTemplate", func() { }) It("create returns an error", func() { - Expect(template.ValidateCreate()). + _, err := template.ValidateCreate() + Expect(err). To(MatchError("invalid spec: must set exactly one of spec.ObservedMatches and spec.ObservedCompletion")) }) It("update returns an error", func() { - Expect(template.ValidateUpdate(nil)). + _, err := template.ValidateUpdate(nil) + Expect(err). To(MatchError("invalid spec: must set exactly one of spec.ObservedMatches and spec.ObservedCompletion")) }) }) Context("with neither observedCompletion or observedMatches", func() { It("create returns an error", func() { - Expect(template.ValidateCreate()). + _, err := template.ValidateCreate() + Expect(err). To(MatchError("invalid spec: must set exactly one of spec.ObservedMatches and spec.ObservedCompletion")) }) It("update returns an error", func() { - Expect(template.ValidateUpdate(nil)). + _, err := template.ValidateUpdate(nil) + Expect(err). To(MatchError("invalid spec: must set exactly one of spec.ObservedMatches and spec.ObservedCompletion")) }) }) @@ -163,12 +171,14 @@ var _ = Describe("ClusterDeploymentTemplate", func() { }) It("create returns an error", func() { - Expect(template.ValidateCreate()). + _, err := template.ValidateCreate() + Expect(err). To(MatchError("invalid template: template should not set metadata.namespace on the child object")) }) It("update returns an error", func() { - Expect(template.ValidateUpdate(nil)). + _, err := template.ValidateUpdate(nil) + Expect(err). To(MatchError("invalid template: template should not set metadata.namespace on the child object")) }) }) @@ -178,7 +188,8 @@ var _ = Describe("ClusterDeploymentTemplate", func() { Context("Any template", func() { var anyTemplate *v1alpha1.ClusterDeploymentTemplate It("always succeeds", func() { - Expect(anyTemplate.ValidateDelete()).NotTo(HaveOccurred()) + _, err := anyTemplate.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) }) diff --git a/pkg/apis/v1alpha1/cluster_deployment_template_webhook.go b/pkg/apis/v1alpha1/cluster_deployment_template_webhook.go index 523f0e8eb..fb748712e 100644 --- a/pkg/apis/v1alpha1/cluster_deployment_template_webhook.go +++ b/pkg/apis/v1alpha1/cluster_deployment_template_webhook.go @@ -20,26 +20,27 @@ import ( "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" ) // +kubebuilder:webhook:path=/validate-carto-run-v1alpha1-clusterdeploymenttemplate,mutating=false,failurePolicy=fail,sideEffects=none,admissionReviewVersions=v1beta1;v1,groups=carto.run,resources=clusterdeploymenttemplates,verbs=create;update,versions=v1alpha1,name=deployment-template-validator.cartographer.com var _ webhook.Validator = &ClusterDeploymentTemplate{} -func (c *ClusterDeploymentTemplate) ValidateCreate() error { - return c.validate() +func (c *ClusterDeploymentTemplate) ValidateCreate() (admission.Warnings, error) { + return nil, c.validate() } -func (c *ClusterDeploymentTemplate) ValidateUpdate(_ runtime.Object) error { - return c.validate() +func (c *ClusterDeploymentTemplate) ValidateUpdate(_ runtime.Object) (admission.Warnings, error) { + return nil, c.validate() } -func (c *ClusterDeploymentTemplate) ValidateDelete() error { - return nil +func (c *ClusterDeploymentTemplate) ValidateDelete() (admission.Warnings, error) { + return nil, nil } func (c *ClusterDeploymentTemplate) validate() error { - err := c.Spec.TemplateSpec.validate() + _, err := c.Spec.TemplateSpec.validate() if err != nil { return err } diff --git a/pkg/apis/v1alpha1/cluster_image_template_test.go b/pkg/apis/v1alpha1/cluster_image_template_test.go index c5354c5f4..782c0d659 100644 --- a/pkg/apis/v1alpha1/cluster_image_template_test.go +++ b/pkg/apis/v1alpha1/cluster_image_template_test.go @@ -60,7 +60,8 @@ var _ = Describe("ClusterImageTemplate", func() { }) It("succeeds", func() { - Expect(template.ValidateCreate()).To(Succeed()) + _, err := template.ValidateCreate() + Expect(err).To(Succeed()) }) }) @@ -84,7 +85,8 @@ var _ = Describe("ClusterImageTemplate", func() { }) It("returns an error", func() { - Expect(template.ValidateCreate()). + _, err := template.ValidateCreate() + Expect(err). To(MatchError("invalid template: template should not set metadata.namespace on the child object")) }) }) @@ -110,7 +112,8 @@ var _ = Describe("ClusterImageTemplate", func() { }) It("succeeds", func() { - Expect(template.ValidateUpdate(nil)).To(Succeed()) + _, err := template.ValidateUpdate(nil) + Expect(err).To(Succeed()) }) }) @@ -134,7 +137,8 @@ var _ = Describe("ClusterImageTemplate", func() { }) It("returns an error", func() { - Expect(template.ValidateUpdate(nil)). + _, err := template.ValidateUpdate(nil) + Expect(err). To(MatchError("invalid template: template should not set metadata.namespace on the child object")) }) }) @@ -144,7 +148,8 @@ var _ = Describe("ClusterImageTemplate", func() { Context("Any template", func() { var anyTemplate *v1alpha1.ClusterImageTemplate It("always succeeds", func() { - Expect(anyTemplate.ValidateDelete()).NotTo(HaveOccurred()) + _, err := anyTemplate.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) }) diff --git a/pkg/apis/v1alpha1/cluster_image_template_webhook.go b/pkg/apis/v1alpha1/cluster_image_template_webhook.go index 4d4d3ce0b..8a8e425e5 100644 --- a/pkg/apis/v1alpha1/cluster_image_template_webhook.go +++ b/pkg/apis/v1alpha1/cluster_image_template_webhook.go @@ -18,22 +18,23 @@ import ( "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" ) // +kubebuilder:webhook:path=/validate-carto-run-v1alpha1-clusterimagetemplate,mutating=false,failurePolicy=fail,sideEffects=none,admissionReviewVersions=v1beta1;v1,groups=carto.run,resources=clusterimagetemplates,verbs=create;update,versions=v1alpha1,name=image-template-validator.cartographer.com var _ webhook.Validator = &ClusterImageTemplate{} -func (c *ClusterImageTemplate) ValidateCreate() error { +func (c *ClusterImageTemplate) ValidateCreate() (admission.Warnings, error) { return c.Spec.TemplateSpec.validate() } -func (c *ClusterImageTemplate) ValidateUpdate(_ runtime.Object) error { +func (c *ClusterImageTemplate) ValidateUpdate(_ runtime.Object) (admission.Warnings, error) { return c.Spec.TemplateSpec.validate() } -func (c *ClusterImageTemplate) ValidateDelete() error { - return nil +func (c *ClusterImageTemplate) ValidateDelete() (admission.Warnings, error) { + return nil, nil } func (c *ClusterImageTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error { diff --git a/pkg/apis/v1alpha1/cluster_run_template_test.go b/pkg/apis/v1alpha1/cluster_run_template_test.go index 36a024028..c4f958a10 100644 --- a/pkg/apis/v1alpha1/cluster_run_template_test.go +++ b/pkg/apis/v1alpha1/cluster_run_template_test.go @@ -61,7 +61,8 @@ var _ = Describe("ClusterRunTemplate", func() { }) It("succeeds", func() { - Expect(template.ValidateCreate()).To(Succeed()) + _, err := template.ValidateCreate() + Expect(err).To(Succeed()) }) }) @@ -85,7 +86,8 @@ var _ = Describe("ClusterRunTemplate", func() { }) It("returns an error", func() { - Expect(template.ValidateCreate()). + _, err := template.ValidateCreate() + Expect(err). To(MatchError("invalid template: template should not set metadata.namespace on the child object")) }) }) @@ -110,7 +112,8 @@ var _ = Describe("ClusterRunTemplate", func() { }) It("returns an error", func() { - Expect(template.ValidateCreate()). + _, err := template.ValidateCreate() + Expect(err). To(MatchError(ContainSubstring("invalid template: object must have a spec; templated object:"))) }) }) @@ -136,7 +139,8 @@ var _ = Describe("ClusterRunTemplate", func() { }) It("succeeds", func() { - Expect(template.ValidateUpdate(nil)).To(Succeed()) + _, err := template.ValidateUpdate(nil) + Expect(err).To(Succeed()) }) }) @@ -160,7 +164,8 @@ var _ = Describe("ClusterRunTemplate", func() { }) It("returns an error", func() { - Expect(template.ValidateUpdate(nil)). + _, err := template.ValidateUpdate(nil) + Expect(err). To(MatchError("invalid template: template should not set metadata.namespace on the child object")) }) }) @@ -185,7 +190,8 @@ var _ = Describe("ClusterRunTemplate", func() { }) It("returns an error", func() { - Expect(template.ValidateCreate()). + _, err := template.ValidateCreate() + Expect(err). To(MatchError(ContainSubstring("invalid template: object must have a spec; templated object:"))) }) }) @@ -195,7 +201,8 @@ var _ = Describe("ClusterRunTemplate", func() { Context("Any template", func() { var anyTemplate *v1alpha1.ClusterRunTemplate It("always succeeds", func() { - Expect(anyTemplate.ValidateDelete()).NotTo(HaveOccurred()) + _, err := anyTemplate.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) }) diff --git a/pkg/apis/v1alpha1/cluster_run_template_webhook.go b/pkg/apis/v1alpha1/cluster_run_template_webhook.go index 49aad727b..31dda1e8e 100644 --- a/pkg/apis/v1alpha1/cluster_run_template_webhook.go +++ b/pkg/apis/v1alpha1/cluster_run_template_webhook.go @@ -23,22 +23,23 @@ import ( "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" ) // +kubebuilder:webhook:path=/validate-carto-run-v1alpha1-clusterruntemplate,mutating=false,failurePolicy=fail,sideEffects=none,admissionReviewVersions=v1beta1;v1,groups=carto.run,resources=clusterruntemplates,verbs=create;update,versions=v1alpha1,name=run-template-validator.cartographer.com var _ webhook.Validator = &ClusterRunTemplate{} -func (c *ClusterRunTemplate) ValidateCreate() error { - return c.Spec.validate() +func (c *ClusterRunTemplate) ValidateCreate() (admission.Warnings, error) { + return nil, c.Spec.validate() } -func (c *ClusterRunTemplate) ValidateUpdate(_ runtime.Object) error { - return c.Spec.validate() +func (c *ClusterRunTemplate) ValidateUpdate(_ runtime.Object) (admission.Warnings, error) { + return nil, c.Spec.validate() } -func (c *ClusterRunTemplate) ValidateDelete() error { - return nil +func (c *ClusterRunTemplate) ValidateDelete() (admission.Warnings, error) { + return nil, nil } func (t *RunTemplateSpec) validate() error { diff --git a/pkg/apis/v1alpha1/cluster_source_template_test.go b/pkg/apis/v1alpha1/cluster_source_template_test.go index c060b6c3f..c4e3a0880 100644 --- a/pkg/apis/v1alpha1/cluster_source_template_test.go +++ b/pkg/apis/v1alpha1/cluster_source_template_test.go @@ -60,7 +60,8 @@ var _ = Describe("ClusterSourceTemplate", func() { }) It("succeeds", func() { - Expect(template.ValidateCreate()).To(Succeed()) + _, err := template.ValidateCreate() + Expect(err).To(Succeed()) }) }) @@ -84,7 +85,8 @@ var _ = Describe("ClusterSourceTemplate", func() { }) It("returns an error", func() { - Expect(template.ValidateCreate()). + _, err := template.ValidateCreate() + Expect(err). To(MatchError("invalid template: template should not set metadata.namespace on the child object")) }) }) @@ -110,7 +112,8 @@ var _ = Describe("ClusterSourceTemplate", func() { }) It("succeeds", func() { - Expect(template.ValidateUpdate(nil)).To(Succeed()) + _, err := template.ValidateUpdate(nil) + Expect(err).To(Succeed()) }) }) @@ -134,7 +137,8 @@ var _ = Describe("ClusterSourceTemplate", func() { }) It("returns an error", func() { - Expect(template.ValidateUpdate(nil)). + _, err := template.ValidateUpdate(nil) + Expect(err). To(MatchError("invalid template: template should not set metadata.namespace on the child object")) }) }) @@ -144,7 +148,8 @@ var _ = Describe("ClusterSourceTemplate", func() { Context("Any template", func() { var anyTemplate *v1alpha1.ClusterSourceTemplate It("always succeeds", func() { - Expect(anyTemplate.ValidateDelete()).NotTo(HaveOccurred()) + _, err := anyTemplate.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) }) diff --git a/pkg/apis/v1alpha1/cluster_source_template_webhook.go b/pkg/apis/v1alpha1/cluster_source_template_webhook.go index d7e8f3fa0..8475752fb 100644 --- a/pkg/apis/v1alpha1/cluster_source_template_webhook.go +++ b/pkg/apis/v1alpha1/cluster_source_template_webhook.go @@ -18,22 +18,23 @@ import ( "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" ) // +kubebuilder:webhook:path=/validate-carto-run-v1alpha1-clustersourcetemplate,mutating=false,failurePolicy=fail,sideEffects=none,admissionReviewVersions=v1beta1;v1,groups=carto.run,resources=clustersourcetemplates,verbs=create;update,versions=v1alpha1,name=source-template-validator.cartographer.com var _ webhook.Validator = &ClusterSourceTemplate{} -func (c *ClusterSourceTemplate) ValidateCreate() error { +func (c *ClusterSourceTemplate) ValidateCreate() (admission.Warnings, error) { return c.Spec.TemplateSpec.validate() } -func (c *ClusterSourceTemplate) ValidateUpdate(_ runtime.Object) error { +func (c *ClusterSourceTemplate) ValidateUpdate(_ runtime.Object) (admission.Warnings, error) { return c.Spec.TemplateSpec.validate() } -func (c *ClusterSourceTemplate) ValidateDelete() error { - return nil +func (c *ClusterSourceTemplate) ValidateDelete() (admission.Warnings, error) { + return nil, nil } func (c *ClusterSourceTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error { diff --git a/pkg/apis/v1alpha1/cluster_supply_chain_webhook.go b/pkg/apis/v1alpha1/cluster_supply_chain_webhook.go index caeb9dbd8..025185cd5 100644 --- a/pkg/apis/v1alpha1/cluster_supply_chain_webhook.go +++ b/pkg/apis/v1alpha1/cluster_supply_chain_webhook.go @@ -20,30 +20,31 @@ import ( "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" ) // +kubebuilder:webhook:path=/validate-carto-run-v1alpha1-clustersupplychain,mutating=false,failurePolicy=fail,sideEffects=none,admissionReviewVersions=v1beta1;v1,groups=carto.run,resources=clustersupplychains,verbs=create;update,versions=v1alpha1,name=supply-chain-validator.cartographer.com var _ webhook.Validator = &ClusterSupplyChain{} -func (c *ClusterSupplyChain) ValidateCreate() error { +func (c *ClusterSupplyChain) ValidateCreate() (admission.Warnings, error) { err := c.validateNewState() if err != nil { - return fmt.Errorf("error validating clustersupplychain [%s]: %w", c.Name, err) + return nil, fmt.Errorf("error validating clustersupplychain [%s]: %w", c.Name, err) } - return nil + return nil, nil } -func (c *ClusterSupplyChain) ValidateUpdate(_ runtime.Object) error { +func (c *ClusterSupplyChain) ValidateUpdate(_ runtime.Object) (admission.Warnings, error) { err := c.validateNewState() if err != nil { - return fmt.Errorf("error validating clustersupplychain [%s]: %w", c.Name, err) + return nil, fmt.Errorf("error validating clustersupplychain [%s]: %w", c.Name, err) } - return nil + return nil, nil } -func (c *ClusterSupplyChain) ValidateDelete() error { - return nil +func (c *ClusterSupplyChain) ValidateDelete() (admission.Warnings, error) { + return nil, nil } func (c *ClusterSupplyChain) validateNewState() error { diff --git a/pkg/apis/v1alpha1/cluster_supply_chain_webhook_test.go b/pkg/apis/v1alpha1/cluster_supply_chain_webhook_test.go index 4f407af45..a8f14abe2 100644 --- a/pkg/apis/v1alpha1/cluster_supply_chain_webhook_test.go +++ b/pkg/apis/v1alpha1/cluster_supply_chain_webhook_test.go @@ -71,15 +71,18 @@ var _ = Describe("Webhook Validation", func() { Context("Well formed supply chain", func() { It("creates without error", func() { - Expect(supplyChain.ValidateCreate()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateCreate() + Expect(err).NotTo(HaveOccurred()) }) It("updates without error", func() { - Expect(supplyChain.ValidateUpdate(oldSupplyChain)).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateUpdate(oldSupplyChain) + Expect(err).NotTo(HaveOccurred()) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -94,19 +97,22 @@ var _ = Describe("Webhook Validation", func() { }) It("on create, returns an error", func() { - Expect(supplyChain.ValidateCreate()).To(MatchError( + _, err := supplyChain.ValidateCreate() + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: invalid sources for resource [other-source-provider]: [some-source] is provided by unknown resource [some-nonexistent-resource]", )) }) It("on update, returns an error", func() { - Expect(supplyChain.ValidateUpdate(oldSupplyChain)).To(MatchError( + _, err := supplyChain.ValidateUpdate(oldSupplyChain) + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: invalid sources for resource [other-source-provider]: [some-source] is provided by unknown resource [some-nonexistent-resource]", )) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -118,19 +124,22 @@ var _ = Describe("Webhook Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(supplyChain.ValidateCreate()).To(MatchError( + _, err := supplyChain.ValidateCreate() + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: duplicate resource name [some-duplicate-name] found", )) }) It("on update, it rejects the Resource", func() { - Expect(supplyChain.ValidateUpdate(oldSupplyChain)).To(MatchError( + _, err := supplyChain.ValidateUpdate(oldSupplyChain) + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: duplicate resource name [some-duplicate-name] found", )) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -145,19 +154,22 @@ var _ = Describe("Webhook Validation", func() { } }) It("on create, returns an error", func() { - Expect(supplyChain.ValidateCreate()).To(MatchError( + _, err := supplyChain.ValidateCreate() + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: param [some-param] is invalid: must set exactly one of value and default", )) }) It("on update, returns an error", func() { - Expect(supplyChain.ValidateUpdate(oldSupplyChain)).To(MatchError( + _, err := supplyChain.ValidateUpdate(oldSupplyChain) + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: param [some-param] is invalid: must set exactly one of value and default", )) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -173,19 +185,22 @@ var _ = Describe("Webhook Validation", func() { }) It("on create, returns an error", func() { - Expect(supplyChain.ValidateCreate()).To(MatchError( + _, err := supplyChain.ValidateCreate() + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: param [some-param] is invalid: must set exactly one of value and default", )) }) It("on update, returns an error", func() { - Expect(supplyChain.ValidateUpdate(oldSupplyChain)).To(MatchError( + _, err := supplyChain.ValidateUpdate(oldSupplyChain) + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: param [some-param] is invalid: must set exactly one of value and default", )) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) }) @@ -200,19 +215,22 @@ var _ = Describe("Webhook Validation", func() { } }) It("on create, returns an error", func() { - Expect(supplyChain.ValidateCreate()).To(MatchError( + _, err := supplyChain.ValidateCreate() + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: resource [source-provider] is invalid: param [some-param] is invalid: must set exactly one of value and default", )) }) It("on update, returns an error", func() { - Expect(supplyChain.ValidateUpdate(oldSupplyChain)).To(MatchError( + _, err := supplyChain.ValidateUpdate(oldSupplyChain) + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: resource [source-provider] is invalid: param [some-param] is invalid: must set exactly one of value and default", )) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -227,19 +245,22 @@ var _ = Describe("Webhook Validation", func() { } }) It("on create, returns an error", func() { - Expect(supplyChain.ValidateCreate()).To(MatchError( + _, err := supplyChain.ValidateCreate() + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: resource [source-provider] is invalid: param [some-param] is invalid: must set exactly one of value and default", )) }) It("on update, returns an error", func() { - Expect(supplyChain.ValidateUpdate(oldSupplyChain)).To(MatchError( + _, err := supplyChain.ValidateUpdate(oldSupplyChain) + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: resource [source-provider] is invalid: param [some-param] is invalid: must set exactly one of value and default", )) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) }) @@ -297,13 +318,13 @@ var _ = Describe("Webhook Validation", func() { } // Create - createErr := supplyChain.ValidateCreate() + _, createErr := supplyChain.ValidateCreate() // Update - updateErr := supplyChain.ValidateUpdate(oldSupplyChain) + _, updateErr := supplyChain.ValidateUpdate(oldSupplyChain) // Delete - deleteErr := supplyChain.ValidateDelete() + _, deleteErr := supplyChain.ValidateDelete() if happy { Expect(createErr).NotTo(HaveOccurred()) @@ -375,19 +396,22 @@ var _ = Describe("Webhook Validation", func() { }) It("on create, returns an error", func() { - Expect(supplyChain.ValidateCreate()).To(MatchError( + _, err := supplyChain.ValidateCreate() + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: at least one selector, selectorMatchExpression, selectorMatchField must be specified", )) }) It("on update, returns an error", func() { - Expect(supplyChain.ValidateUpdate(nil)).To(MatchError( + _, err := supplyChain.ValidateUpdate(nil) + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: at least one selector, selectorMatchExpression, selectorMatchField must be specified", )) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) Context("Empty selection", func() { @@ -397,19 +421,22 @@ var _ = Describe("Webhook Validation", func() { }) It("on create, returns an error", func() { - Expect(supplyChain.ValidateCreate()).To(MatchError( + _, err := supplyChain.ValidateCreate() + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: at least one selector, selectorMatchExpression, selectorMatchField must be specified", )) }) It("on update, returns an error", func() { - Expect(supplyChain.ValidateUpdate(nil)).To(MatchError( + _, err := supplyChain.ValidateUpdate(nil) + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: at least one selector, selectorMatchExpression, selectorMatchField must be specified", )) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) Context("A Selector", func() { @@ -419,15 +446,18 @@ var _ = Describe("Webhook Validation", func() { }) It("creates without error", func() { - Expect(supplyChain.ValidateCreate()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateCreate() + Expect(err).NotTo(HaveOccurred()) }) It("updates without error", func() { - Expect(supplyChain.ValidateUpdate(nil)).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateUpdate(nil) + Expect(err).NotTo(HaveOccurred()) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) Context("A SelectorMatchExpression", func() { @@ -437,15 +467,18 @@ var _ = Describe("Webhook Validation", func() { }) It("creates without error", func() { - Expect(supplyChain.ValidateCreate()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateCreate() + Expect(err).NotTo(HaveOccurred()) }) It("updates without error", func() { - Expect(supplyChain.ValidateUpdate(nil)).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateUpdate(nil) + Expect(err).NotTo(HaveOccurred()) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) Context("A SelectorMatchFields", func() { @@ -455,15 +488,18 @@ var _ = Describe("Webhook Validation", func() { }) It("creates without error", func() { - Expect(supplyChain.ValidateCreate()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateCreate() + Expect(err).NotTo(HaveOccurred()) }) It("updates without error", func() { - Expect(supplyChain.ValidateUpdate(nil)).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateUpdate(nil) + Expect(err).NotTo(HaveOccurred()) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) }) @@ -527,7 +563,8 @@ var _ = Describe("Webhook Validation", func() { } }) It("creates without error", func() { - Expect(supplyChain.ValidateCreate()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateCreate() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -544,7 +581,8 @@ var _ = Describe("Webhook Validation", func() { } }) It("rejects with an error", func() { - Expect(supplyChain.ValidateCreate()).To(MatchError("error validating clustersupplychain [some-name]: invalid jsonpath for key [spec.env[0].{{}}]: unrecognized character in action: U+007B '{'")) + _, err := supplyChain.ValidateCreate() + Expect(err).To(MatchError("error validating clustersupplychain [some-name]: invalid jsonpath for key [spec.env[0].{{}}]: unrecognized character in action: U+007B '{'")) }) }) @@ -560,7 +598,8 @@ var _ = Describe("Webhook Validation", func() { } }) It("rejects with an error", func() { - Expect(supplyChain.ValidateCreate()).To(MatchError("error validating clustersupplychain [some-name]: requirement key [foo] is not a valid path")) + _, err := supplyChain.ValidateCreate() + Expect(err).To(MatchError("error validating clustersupplychain [some-name]: requirement key [foo] is not a valid path")) }) }) }) @@ -579,7 +618,8 @@ var _ = Describe("Webhook Validation", func() { }) It("creates without error", func() { - Expect(supplyChain.ValidateCreate()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateCreate() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -596,7 +636,8 @@ var _ = Describe("Webhook Validation", func() { }) It("rejects with error", func() { - Expect(supplyChain.ValidateCreate()).To(MatchError(ContainSubstring("error validating clustersupplychain [some-name]: selectorMatchExpressions are not valid: key: Invalid value: \"-my-label\""))) + _, err := supplyChain.ValidateCreate() + Expect(err).To(MatchError(ContainSubstring("error validating clustersupplychain [some-name]: selectorMatchExpressions are not valid: key: Invalid value: \"-my-label\""))) }) }) }) @@ -610,7 +651,8 @@ var _ = Describe("Webhook Validation", func() { }) It("creates without error", func() { - Expect(supplyChain.ValidateCreate()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateCreate() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -622,7 +664,8 @@ var _ = Describe("Webhook Validation", func() { }) It("rejects with error", func() { - Expect(supplyChain.ValidateCreate()).To(MatchError(ContainSubstring("error validating clustersupplychain [some-name]: selector is not valid: key: Invalid value: \"-my-label\""))) + _, err := supplyChain.ValidateCreate() + Expect(err).To(MatchError(ContainSubstring("error validating clustersupplychain [some-name]: selector is not valid: key: Invalid value: \"-my-label\""))) }) }) }) @@ -682,15 +725,18 @@ var _ = Describe("Webhook Validation", func() { Context("Well formed supply chain", func() { It("creates without error", func() { - Expect(supplyChain.ValidateCreate()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateCreate() + Expect(err).NotTo(HaveOccurred()) }) It("updates without error", func() { - Expect(supplyChain.ValidateUpdate(oldSupplyChain)).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateUpdate(oldSupplyChain) + Expect(err).NotTo(HaveOccurred()) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -700,19 +746,22 @@ var _ = Describe("Webhook Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(supplyChain.ValidateCreate()).To(MatchError( + _, err := supplyChain.ValidateCreate() + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: duplicate template name [source-2] found in options for resource [source-provider]", )) }) It("on update, it rejects the Resource", func() { - Expect(supplyChain.ValidateUpdate(oldSupplyChain)).To(MatchError( + _, err := supplyChain.ValidateUpdate(oldSupplyChain) + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: duplicate template name [source-2] found in options for resource [source-provider]", )) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -727,19 +776,22 @@ var _ = Describe("Webhook Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(supplyChain.ValidateCreate()).To(MatchError( + _, err := supplyChain.ValidateCreate() + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: templateRef.Options must have more than one option", )) }) It("on update, it rejects the Resource", func() { - Expect(supplyChain.ValidateUpdate(oldSupplyChain)).To(MatchError( + _, err := supplyChain.ValidateUpdate(oldSupplyChain) + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: templateRef.Options must have more than one option", )) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -754,19 +806,22 @@ var _ = Describe("Webhook Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(supplyChain.ValidateCreate()).To(MatchError( + _, err := supplyChain.ValidateCreate() + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: error validating option [source-1] selector: cannot specify values with operator [Exists]", )) }) It("on update, it rejects the Resource", func() { - Expect(supplyChain.ValidateUpdate(oldSupplyChain)).To(MatchError( + _, err := supplyChain.ValidateUpdate(oldSupplyChain) + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: error validating option [source-1] selector: cannot specify values with operator [Exists]", )) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -780,19 +835,22 @@ var _ = Describe("Webhook Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(supplyChain.ValidateCreate()).To(MatchError( + _, err := supplyChain.ValidateCreate() + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: error validating option [source-1] selector: cannot specify values with operator [DoesNotExist]", )) }) It("on update, it rejects the Resource", func() { - Expect(supplyChain.ValidateUpdate(oldSupplyChain)).To(MatchError( + _, err := supplyChain.ValidateUpdate(oldSupplyChain) + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: error validating option [source-1] selector: cannot specify values with operator [DoesNotExist]", )) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) Context("operator is In and does NOT have values", func() { @@ -804,19 +862,22 @@ var _ = Describe("Webhook Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(supplyChain.ValidateCreate()).To(MatchError( + _, err := supplyChain.ValidateCreate() + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: error validating option [source-1] selector: must specify values with operator [In]", )) }) It("on update, it rejects the Resource", func() { - Expect(supplyChain.ValidateUpdate(oldSupplyChain)).To(MatchError( + _, err := supplyChain.ValidateUpdate(oldSupplyChain) + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: error validating option [source-1] selector: must specify values with operator [In]", )) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) Context("operator is NotIn and does NOT have values", func() { @@ -828,19 +889,22 @@ var _ = Describe("Webhook Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(supplyChain.ValidateCreate()).To(MatchError( + _, err := supplyChain.ValidateCreate() + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: error validating option [source-1] selector: must specify values with operator [NotIn]", )) }) It("on update, it rejects the Resource", func() { - Expect(supplyChain.ValidateUpdate(oldSupplyChain)).To(MatchError( + _, err := supplyChain.ValidateUpdate(oldSupplyChain) + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: error validating option [source-1] selector: must specify values with operator [NotIn]", )) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) }) @@ -852,19 +916,22 @@ var _ = Describe("Webhook Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(supplyChain.ValidateCreate()).To(MatchError( + _, err := supplyChain.ValidateCreate() + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: duplicate selector found in options [source-1, source-2]", )) }) It("on update, it rejects the Resource", func() { - Expect(supplyChain.ValidateUpdate(oldSupplyChain)).To(MatchError( + _, err := supplyChain.ValidateUpdate(oldSupplyChain) + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: duplicate selector found in options [source-1, source-2]", )) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) }) @@ -875,19 +942,22 @@ var _ = Describe("Webhook Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(supplyChain.ValidateCreate()).To(MatchError( + _, err := supplyChain.ValidateCreate() + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: error validating option [source-1] selector: requirement key [spec.does.not.exist] is not a valid path", )) }) It("on update, it rejects the Resource", func() { - Expect(supplyChain.ValidateUpdate(oldSupplyChain)).To(MatchError( + _, err := supplyChain.ValidateUpdate(oldSupplyChain) + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: error validating option [source-1] selector: requirement key [spec.does.not.exist] is not a valid path", )) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -897,19 +967,22 @@ var _ = Describe("Webhook Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(supplyChain.ValidateCreate()).To(MatchError(ContainSubstring( + _, err := supplyChain.ValidateCreate() + Expect(err).To(MatchError(ContainSubstring( `error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: error validating option [source-1] selector: matchLabels are not valid: [key: Invalid value: "not-valid-"`, ))) }) It("on update, it rejects the Resource", func() { - Expect(supplyChain.ValidateUpdate(oldSupplyChain)).To(MatchError(ContainSubstring( + _, err := supplyChain.ValidateUpdate(oldSupplyChain) + Expect(err).To(MatchError(ContainSubstring( `error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: error validating option [source-1] selector: matchLabels are not valid: [key: Invalid value: "not-valid-"`, ))) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -919,17 +992,18 @@ var _ = Describe("Webhook Validation", func() { }) It("on create, it does not reject the Resource", func() { - err := supplyChain.ValidateCreate() + _, err := supplyChain.ValidateCreate() Expect(err).NotTo(HaveOccurred()) }) It("on update, it does not reject the Resource", func() { - err := supplyChain.ValidateUpdate(oldSupplyChain) + _, err := supplyChain.ValidateUpdate(oldSupplyChain) Expect(err).NotTo(HaveOccurred()) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -939,19 +1013,22 @@ var _ = Describe("Webhook Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(supplyChain.ValidateCreate()).To(MatchError( + _, err := supplyChain.ValidateCreate() + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: exactly one of templateRef.Name or templateRef.Options must be specified, found both", )) }) It("on update, it rejects the Resource", func() { - Expect(supplyChain.ValidateUpdate(oldSupplyChain)).To(MatchError( + _, err := supplyChain.ValidateUpdate(oldSupplyChain) + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: exactly one of templateRef.Name or templateRef.Options must be specified, found both", )) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -961,19 +1038,22 @@ var _ = Describe("Webhook Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(supplyChain.ValidateCreate()).To(MatchError( + _, err := supplyChain.ValidateCreate() + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: exactly one of templateRef.Name or templateRef.Options must be specified, found neither", )) }) It("on update, it rejects the Resource", func() { - Expect(supplyChain.ValidateUpdate(oldSupplyChain)).To(MatchError( + _, err := supplyChain.ValidateUpdate(oldSupplyChain) + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: exactly one of templateRef.Name or templateRef.Options must be specified, found neither", )) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -983,19 +1063,22 @@ var _ = Describe("Webhook Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(supplyChain.ValidateCreate()).To(MatchError( + _, err := supplyChain.ValidateCreate() + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: exactly one of option.Name or option.PassThrough must be specified, found neither", )) }) It("on update, it rejects the Resource", func() { - Expect(supplyChain.ValidateUpdate(oldSupplyChain)).To(MatchError( + _, err := supplyChain.ValidateUpdate(oldSupplyChain) + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: exactly one of option.Name or option.PassThrough must be specified, found neither", )) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -1024,19 +1107,22 @@ var _ = Describe("Webhook Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(supplyChain.ValidateCreate()).To(MatchError( + _, err := supplyChain.ValidateCreate() + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: pass through [wrong-input] does not refer to a known input", )) }) It("on update, it rejects the Resource", func() { - Expect(supplyChain.ValidateUpdate(oldSupplyChain)).To(MatchError( + _, err := supplyChain.ValidateUpdate(oldSupplyChain) + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: pass through [wrong-input] does not refer to a known input", )) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -1047,19 +1133,22 @@ var _ = Describe("Webhook Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(supplyChain.ValidateCreate()).To(MatchError( + _, err := supplyChain.ValidateCreate() + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: cannot have more than one pass through option, found 2", )) }) It("on update, it rejects the Resource", func() { - Expect(supplyChain.ValidateUpdate(oldSupplyChain)).To(MatchError( + _, err := supplyChain.ValidateUpdate(oldSupplyChain) + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: cannot have more than one pass through option, found 2", )) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -1069,19 +1158,22 @@ var _ = Describe("Webhook Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(supplyChain.ValidateCreate()).To(MatchError( + _, err := supplyChain.ValidateCreate() + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: exactly one of option.Name or option.PassThrough must be specified, found both", )) }) It("on update, it rejects the Resource", func() { - Expect(supplyChain.ValidateUpdate(oldSupplyChain)).To(MatchError( + _, err := supplyChain.ValidateUpdate(oldSupplyChain) + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: exactly one of option.Name or option.PassThrough must be specified, found both", )) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) @@ -1094,19 +1186,22 @@ var _ = Describe("Webhook Validation", func() { }) It("on create, it rejects the Resource", func() { - Expect(supplyChain.ValidateCreate()).To(MatchError( + _, err := supplyChain.ValidateCreate() + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: duplicate selector found in options [source-1, passThrough]", )) }) It("on update, it rejects the Resource", func() { - Expect(supplyChain.ValidateUpdate(oldSupplyChain)).To(MatchError( + _, err := supplyChain.ValidateUpdate(oldSupplyChain) + Expect(err).To(MatchError( "error validating clustersupplychain [responsible-ops---default-params]: error validating resource [source-provider]: duplicate selector found in options [source-1, passThrough]", )) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) }) @@ -1118,15 +1213,18 @@ var _ = Describe("Webhook Validation", func() { }) It("creates without error", func() { - Expect(supplyChain.ValidateCreate()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateCreate() + Expect(err).NotTo(HaveOccurred()) }) It("updates without error", func() { - Expect(supplyChain.ValidateUpdate(oldSupplyChain)).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateUpdate(oldSupplyChain) + Expect(err).NotTo(HaveOccurred()) }) It("deletes without error", func() { - Expect(supplyChain.ValidateDelete()).NotTo(HaveOccurred()) + _, err := supplyChain.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) }) diff --git a/pkg/apis/v1alpha1/cluster_template_test.go b/pkg/apis/v1alpha1/cluster_template_test.go index 59f9901f8..682f85bce 100644 --- a/pkg/apis/v1alpha1/cluster_template_test.go +++ b/pkg/apis/v1alpha1/cluster_template_test.go @@ -62,7 +62,8 @@ var _ = Describe("ClusterTemplate", func() { }) It("succeeds", func() { - Expect(template.ValidateCreate()).To(Succeed()) + _, err := template.ValidateCreate() + Expect(err).To(Succeed()) }) }) @@ -86,7 +87,8 @@ var _ = Describe("ClusterTemplate", func() { }) It("returns an error if no types are specified", func() { - Expect(template.ValidateCreate()). + _, err := template.ValidateCreate() + Expect(err). To(MatchError("invalid health rule: must specify one of alwaysHealthy, singleConditionType or multiMatch, found neither")) }) @@ -127,7 +129,8 @@ var _ = Describe("ClusterTemplate", func() { } else { template.Spec.HealthRule.MultiMatch = nil } - Expect(template.ValidateCreate()). + _, err := template.ValidateCreate() + Expect(err). To(MatchError("invalid health rule: must specify one of alwaysHealthy, singleConditionType or multiMatch, found multiple")) }, @@ -141,14 +144,16 @@ var _ = Describe("ClusterTemplate", func() { template.Spec.HealthRule = &v1alpha1.HealthRule{ AlwaysHealthy: &runtime.RawExtension{Raw: []byte{}}, } - Expect(template.ValidateCreate()).To(Succeed()) + _, err := template.ValidateCreate() + Expect(err).To(Succeed()) }) It("succeeds when SingleConditionType is set", func() { template.Spec.HealthRule = &v1alpha1.HealthRule{ SingleConditionType: "ThisWorksAlone", } - Expect(template.ValidateCreate()).To(Succeed()) + _, err := template.ValidateCreate() + Expect(err).To(Succeed()) }) It("succeeds when MultiMatch is set", func() { @@ -175,7 +180,8 @@ var _ = Describe("ClusterTemplate", func() { }, }, } - Expect(template.ValidateCreate()).To(Succeed()) + _, err := template.ValidateCreate() + Expect(err).To(Succeed()) }) Context("Invalid MultiMatch rules", func() { @@ -210,7 +216,8 @@ var _ = Describe("ClusterTemplate", func() { MatchFields: []v1alpha1.HealthMatchFieldSelectorRequirement{}, MatchConditions: []v1alpha1.ConditionRequirement{}, } - Expect(template.ValidateCreate()). + _, err := template.ValidateCreate() + Expect(err). To(MatchError("invalid multi match health rule: unhealthy rule has no matchFields or matchConditions")) }) @@ -219,7 +226,8 @@ var _ = Describe("ClusterTemplate", func() { MatchFields: []v1alpha1.HealthMatchFieldSelectorRequirement{}, MatchConditions: []v1alpha1.ConditionRequirement{}, } - Expect(template.ValidateCreate()). + _, err := template.ValidateCreate() + Expect(err). To(MatchError("invalid multi match health rule: healthy rule has no matchFields or matchConditions")) }) }) @@ -245,14 +253,16 @@ var _ = Describe("ClusterTemplate", func() { }) It("returns an error", func() { - Expect(template.ValidateCreate()). + _, err := template.ValidateCreate() + Expect(err). To(MatchError("invalid template: template should not set metadata.namespace on the child object")) }) }) Context("template missing", func() { It("succeeds", func() { - Expect(template.ValidateCreate()). + _, err := template.ValidateCreate() + Expect(err). To(MatchError("invalid template: must specify one of template or ytt, found neither")) }) }) @@ -277,7 +287,8 @@ var _ = Describe("ClusterTemplate", func() { }) It("succeeds", func() { - Expect(template.ValidateCreate()). + _, err := template.ValidateCreate() + Expect(err). To(MatchError("invalid template: must specify one of template or ytt, found both")) }) }) @@ -311,13 +322,15 @@ var _ = Describe("ClusterTemplate", func() { } }) It("does not return an error", func() { - Expect(template.ValidateCreate()).To(Succeed()) + _, err := template.ValidateCreate() + Expect(err).To(Succeed()) }) }) Context("a retention policy is not set", func() { It("does not return an error", func() { - Expect(template.ValidateCreate()).To(Succeed()) + _, err := template.ValidateCreate() + Expect(err).To(Succeed()) }) }) }) @@ -334,13 +347,15 @@ var _ = Describe("ClusterTemplate", func() { } }) It("does not return an error", func() { - Expect(template.ValidateCreate()).To(Succeed()) + _, err := template.ValidateCreate() + Expect(err).To(Succeed()) }) }) Context("a retention policy is not set", func() { It("does not return an error", func() { - Expect(template.ValidateCreate()).To(Succeed()) + _, err := template.ValidateCreate() + Expect(err).To(Succeed()) }) }) }) @@ -354,7 +369,7 @@ var _ = Describe("ClusterTemplate", func() { template.Spec.RetentionPolicy = &v1alpha1.RetentionPolicy{} }) It("returns a helpful error", func() { - err := template.ValidateCreate() + _, err := template.ValidateCreate() Expect(err).To(HaveOccurred()) Expect(err).To(MatchError("invalid template: if lifecycle is mutable, no retention policy may be set")) }) @@ -362,7 +377,8 @@ var _ = Describe("ClusterTemplate", func() { Context("a retention policy is not set", func() { It("does not return an error", func() { - Expect(template.ValidateCreate()).To(Succeed()) + _, err := template.ValidateCreate() + Expect(err).To(Succeed()) }) }) }) @@ -389,7 +405,8 @@ var _ = Describe("ClusterTemplate", func() { }) It("succeeds", func() { - Expect(template.ValidateUpdate(nil)).To(Succeed()) + _, err := template.ValidateUpdate(nil) + Expect(err).To(Succeed()) }) }) @@ -413,7 +430,8 @@ var _ = Describe("ClusterTemplate", func() { }) It("returns an error if no types are specified", func() { - Expect(template.ValidateUpdate(nil)). + _, err := template.ValidateUpdate(nil) + Expect(err). To(MatchError("invalid health rule: must specify one of alwaysHealthy, singleConditionType or multiMatch, found neither")) }) @@ -454,7 +472,8 @@ var _ = Describe("ClusterTemplate", func() { } else { template.Spec.HealthRule.MultiMatch = nil } - Expect(template.ValidateUpdate(nil)). + _, err := template.ValidateUpdate(nil) + Expect(err). To(MatchError("invalid health rule: must specify one of alwaysHealthy, singleConditionType or multiMatch, found multiple")) }, @@ -468,14 +487,16 @@ var _ = Describe("ClusterTemplate", func() { template.Spec.HealthRule = &v1alpha1.HealthRule{ AlwaysHealthy: &runtime.RawExtension{Raw: []byte{}}, } - Expect(template.ValidateUpdate(nil)).To(Succeed()) + _, err := template.ValidateUpdate(nil) + Expect(err).To(Succeed()) }) It("succeeds when SingleConditionType is set", func() { template.Spec.HealthRule = &v1alpha1.HealthRule{ SingleConditionType: "ThisWorksAlone", } - Expect(template.ValidateUpdate(nil)).To(Succeed()) + _, err := template.ValidateUpdate(nil) + Expect(err).To(Succeed()) }) It("succeeds when MultiMatch is set", func() { @@ -502,7 +523,8 @@ var _ = Describe("ClusterTemplate", func() { }, }, } - Expect(template.ValidateUpdate(nil)).To(Succeed()) + _, err := template.ValidateUpdate(nil) + Expect(err).To(Succeed()) }) Context("Invalid MultiMatch rules", func() { @@ -537,7 +559,8 @@ var _ = Describe("ClusterTemplate", func() { MatchFields: []v1alpha1.HealthMatchFieldSelectorRequirement{}, MatchConditions: []v1alpha1.ConditionRequirement{}, } - Expect(template.ValidateUpdate(nil)). + _, err := template.ValidateUpdate(nil) + Expect(err). To(MatchError("invalid multi match health rule: unhealthy rule has no matchFields or matchConditions")) }) @@ -546,7 +569,8 @@ var _ = Describe("ClusterTemplate", func() { MatchFields: []v1alpha1.HealthMatchFieldSelectorRequirement{}, MatchConditions: []v1alpha1.ConditionRequirement{}, } - Expect(template.ValidateUpdate(nil)). + _, err := template.ValidateUpdate(nil) + Expect(err). To(MatchError("invalid multi match health rule: healthy rule has no matchFields or matchConditions")) }) }) @@ -572,14 +596,16 @@ var _ = Describe("ClusterTemplate", func() { }) It("returns an error", func() { - Expect(template.ValidateUpdate(nil)). + _, err := template.ValidateUpdate(nil) + Expect(err). To(MatchError("invalid template: template should not set metadata.namespace on the child object")) }) }) Context("template missing", func() { It("succeeds", func() { - Expect(template.ValidateUpdate(nil)). + _, err := template.ValidateUpdate(nil) + Expect(err). To(MatchError("invalid template: must specify one of template or ytt, found neither")) }) }) @@ -604,7 +630,8 @@ var _ = Describe("ClusterTemplate", func() { }) It("succeeds", func() { - Expect(template.ValidateUpdate(nil)). + _, err := template.ValidateUpdate(nil) + Expect(err). To(MatchError("invalid template: must specify one of template or ytt, found both")) }) }) @@ -614,7 +641,8 @@ var _ = Describe("ClusterTemplate", func() { Context("Any template", func() { var anyTemplate *v1alpha1.ClusterTemplate It("always succeeds", func() { - Expect(anyTemplate.ValidateDelete()).NotTo(HaveOccurred()) + _, err := anyTemplate.ValidateDelete() + Expect(err).NotTo(HaveOccurred()) }) }) }) diff --git a/pkg/apis/v1alpha1/cluster_template_webhook.go b/pkg/apis/v1alpha1/cluster_template_webhook.go index 1151742f0..cc9fda969 100644 --- a/pkg/apis/v1alpha1/cluster_template_webhook.go +++ b/pkg/apis/v1alpha1/cluster_template_webhook.go @@ -18,22 +18,25 @@ import ( "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" ) // +kubebuilder:webhook:path=/validate-carto-run-v1alpha1-clustertemplate,mutating=false,failurePolicy=fail,sideEffects=none,admissionReviewVersions=v1beta1;v1,groups=carto.run,resources=clustertemplates,verbs=create;update,versions=v1alpha1,name=template-validator.cartographer.com + var _ webhook.Validator = &ClusterTemplate{} -func (c *ClusterTemplate) ValidateCreate() error { +func (c *ClusterTemplate) ValidateCreate() (admission.Warnings, error) { return c.Spec.validate() + } -func (c *ClusterTemplate) ValidateUpdate(_ runtime.Object) error { +func (c *ClusterTemplate) ValidateUpdate(_ runtime.Object) (admission.Warnings, error) { return c.Spec.validate() } -func (c *ClusterTemplate) ValidateDelete() error { - return nil +func (c *ClusterTemplate) ValidateDelete() (admission.Warnings, error) { + return nil, nil } func (c *ClusterTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error { diff --git a/pkg/apis/v1alpha1/common_validations.go b/pkg/apis/v1alpha1/common_validations.go index b2476601e..eeeed86eb 100644 --- a/pkg/apis/v1alpha1/common_validations.go +++ b/pkg/apis/v1alpha1/common_validations.go @@ -23,6 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/client-go/util/jsonpath" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" ) func validateResourceOptions(options []TemplateOption, validPaths map[string]bool, validPrefixes []string) error { @@ -186,31 +187,31 @@ func validateLegacySelector(selectors LegacySelector, validPaths map[string]bool return nil } -func (t *TemplateSpec) validate() error { +func (t *TemplateSpec) validate() (admission.Warnings, error) { if t.Template == nil && t.Ytt == "" { - return fmt.Errorf("invalid template: must specify one of template or ytt, found neither") + return nil, fmt.Errorf("invalid template: must specify one of template or ytt, found neither") } if t.Template != nil && t.Ytt != "" { - return fmt.Errorf("invalid template: must specify one of template or ytt, found both") + return nil, fmt.Errorf("invalid template: must specify one of template or ytt, found both") } if t.Template != nil { obj := unstructured.Unstructured{} if err := json.Unmarshal(t.Template.Raw, &obj); err != nil { - return fmt.Errorf("invalid template: failed to parse object: %w", err) + return nil, fmt.Errorf("invalid template: failed to parse object: %w", err) } if obj.GetNamespace() != metav1.NamespaceNone { - return fmt.Errorf("invalid template: template should not set metadata.namespace on the child object") + return nil, fmt.Errorf("invalid template: template should not set metadata.namespace on the child object") } } if t.HealthRule != nil { - return t.HealthRule.validate() + return nil, t.HealthRule.validate() } if t.RetentionPolicy != nil && t.Lifecycle == "mutable" { - return fmt.Errorf("invalid template: if lifecycle is mutable, no retention policy may be set") + return nil, fmt.Errorf("invalid template: if lifecycle is mutable, no retention policy may be set") } - return nil + return nil, nil } func (r *HealthRule) validate() error { diff --git a/pkg/cmd/cmd.go b/pkg/cmd/cmd.go index 11f956ffc..265b11563 100644 --- a/pkg/cmd/cmd.go +++ b/pkg/cmd/cmd.go @@ -26,6 +26,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/config" "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/manager" + "sigs.k8s.io/controller-runtime/pkg/metrics/server" + "sigs.k8s.io/controller-runtime/pkg/webhook" "github.com/vmware-tanzu/cartographer/pkg/apis/v1alpha1" "github.com/vmware-tanzu/cartographer/pkg/controllers" @@ -59,14 +61,18 @@ func (cmd *Command) Execute(ctx context.Context) error { } mgrOpts := manager.Options{ - Port: cmd.Port, - CertDir: cmd.CertDir, - Scheme: scheme, - MetricsBindAddress: "0", + WebhookServer: webhook.NewServer(webhook.Options{ + Port: cmd.Port, + CertDir: cmd.CertDir, + }), + Scheme: scheme, + Metrics: server.Options{ + BindAddress: "0", + }, } if cmd.MetricsPort != 0 { - mgrOpts.MetricsBindAddress = fmt.Sprintf(":%d", cmd.MetricsPort) + mgrOpts.Metrics.BindAddress = fmt.Sprintf(":%d", cmd.MetricsPort) } if cmd.PprofPort != 0 { diff --git a/pkg/controllers/controllersfakes/fake_restmapper.go b/pkg/controllers/controllersfakes/fake_restmapper.go new file mode 100644 index 000000000..c7c709043 --- /dev/null +++ b/pkg/controllers/controllersfakes/fake_restmapper.go @@ -0,0 +1,595 @@ +// Code generated by counterfeiter. DO NOT EDIT. +package controllersfakes + +import ( + "sync" + + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +type FakeRESTMapper struct { + KindForStub func(schema.GroupVersionResource) (schema.GroupVersionKind, error) + kindForMutex sync.RWMutex + kindForArgsForCall []struct { + arg1 schema.GroupVersionResource + } + kindForReturns struct { + result1 schema.GroupVersionKind + result2 error + } + kindForReturnsOnCall map[int]struct { + result1 schema.GroupVersionKind + result2 error + } + KindsForStub func(schema.GroupVersionResource) ([]schema.GroupVersionKind, error) + kindsForMutex sync.RWMutex + kindsForArgsForCall []struct { + arg1 schema.GroupVersionResource + } + kindsForReturns struct { + result1 []schema.GroupVersionKind + result2 error + } + kindsForReturnsOnCall map[int]struct { + result1 []schema.GroupVersionKind + result2 error + } + RESTMappingStub func(schema.GroupKind, ...string) (*meta.RESTMapping, error) + rESTMappingMutex sync.RWMutex + rESTMappingArgsForCall []struct { + arg1 schema.GroupKind + arg2 []string + } + rESTMappingReturns struct { + result1 *meta.RESTMapping + result2 error + } + rESTMappingReturnsOnCall map[int]struct { + result1 *meta.RESTMapping + result2 error + } + RESTMappingsStub func(schema.GroupKind, ...string) ([]*meta.RESTMapping, error) + rESTMappingsMutex sync.RWMutex + rESTMappingsArgsForCall []struct { + arg1 schema.GroupKind + arg2 []string + } + rESTMappingsReturns struct { + result1 []*meta.RESTMapping + result2 error + } + rESTMappingsReturnsOnCall map[int]struct { + result1 []*meta.RESTMapping + result2 error + } + ResourceForStub func(schema.GroupVersionResource) (schema.GroupVersionResource, error) + resourceForMutex sync.RWMutex + resourceForArgsForCall []struct { + arg1 schema.GroupVersionResource + } + resourceForReturns struct { + result1 schema.GroupVersionResource + result2 error + } + resourceForReturnsOnCall map[int]struct { + result1 schema.GroupVersionResource + result2 error + } + ResourceSingularizerStub func(string) (string, error) + resourceSingularizerMutex sync.RWMutex + resourceSingularizerArgsForCall []struct { + arg1 string + } + resourceSingularizerReturns struct { + result1 string + result2 error + } + resourceSingularizerReturnsOnCall map[int]struct { + result1 string + result2 error + } + ResourcesForStub func(schema.GroupVersionResource) ([]schema.GroupVersionResource, error) + resourcesForMutex sync.RWMutex + resourcesForArgsForCall []struct { + arg1 schema.GroupVersionResource + } + resourcesForReturns struct { + result1 []schema.GroupVersionResource + result2 error + } + resourcesForReturnsOnCall map[int]struct { + result1 []schema.GroupVersionResource + result2 error + } + invocations map[string][][]interface{} + invocationsMutex sync.RWMutex +} + +func (fake *FakeRESTMapper) KindFor(arg1 schema.GroupVersionResource) (schema.GroupVersionKind, error) { + fake.kindForMutex.Lock() + ret, specificReturn := fake.kindForReturnsOnCall[len(fake.kindForArgsForCall)] + fake.kindForArgsForCall = append(fake.kindForArgsForCall, struct { + arg1 schema.GroupVersionResource + }{arg1}) + stub := fake.KindForStub + fakeReturns := fake.kindForReturns + fake.recordInvocation("KindFor", []interface{}{arg1}) + fake.kindForMutex.Unlock() + if stub != nil { + return stub(arg1) + } + if specificReturn { + return ret.result1, ret.result2 + } + return fakeReturns.result1, fakeReturns.result2 +} + +func (fake *FakeRESTMapper) KindForCallCount() int { + fake.kindForMutex.RLock() + defer fake.kindForMutex.RUnlock() + return len(fake.kindForArgsForCall) +} + +func (fake *FakeRESTMapper) KindForCalls(stub func(schema.GroupVersionResource) (schema.GroupVersionKind, error)) { + fake.kindForMutex.Lock() + defer fake.kindForMutex.Unlock() + fake.KindForStub = stub +} + +func (fake *FakeRESTMapper) KindForArgsForCall(i int) schema.GroupVersionResource { + fake.kindForMutex.RLock() + defer fake.kindForMutex.RUnlock() + argsForCall := fake.kindForArgsForCall[i] + return argsForCall.arg1 +} + +func (fake *FakeRESTMapper) KindForReturns(result1 schema.GroupVersionKind, result2 error) { + fake.kindForMutex.Lock() + defer fake.kindForMutex.Unlock() + fake.KindForStub = nil + fake.kindForReturns = struct { + result1 schema.GroupVersionKind + result2 error + }{result1, result2} +} + +func (fake *FakeRESTMapper) KindForReturnsOnCall(i int, result1 schema.GroupVersionKind, result2 error) { + fake.kindForMutex.Lock() + defer fake.kindForMutex.Unlock() + fake.KindForStub = nil + if fake.kindForReturnsOnCall == nil { + fake.kindForReturnsOnCall = make(map[int]struct { + result1 schema.GroupVersionKind + result2 error + }) + } + fake.kindForReturnsOnCall[i] = struct { + result1 schema.GroupVersionKind + result2 error + }{result1, result2} +} + +func (fake *FakeRESTMapper) KindsFor(arg1 schema.GroupVersionResource) ([]schema.GroupVersionKind, error) { + fake.kindsForMutex.Lock() + ret, specificReturn := fake.kindsForReturnsOnCall[len(fake.kindsForArgsForCall)] + fake.kindsForArgsForCall = append(fake.kindsForArgsForCall, struct { + arg1 schema.GroupVersionResource + }{arg1}) + stub := fake.KindsForStub + fakeReturns := fake.kindsForReturns + fake.recordInvocation("KindsFor", []interface{}{arg1}) + fake.kindsForMutex.Unlock() + if stub != nil { + return stub(arg1) + } + if specificReturn { + return ret.result1, ret.result2 + } + return fakeReturns.result1, fakeReturns.result2 +} + +func (fake *FakeRESTMapper) KindsForCallCount() int { + fake.kindsForMutex.RLock() + defer fake.kindsForMutex.RUnlock() + return len(fake.kindsForArgsForCall) +} + +func (fake *FakeRESTMapper) KindsForCalls(stub func(schema.GroupVersionResource) ([]schema.GroupVersionKind, error)) { + fake.kindsForMutex.Lock() + defer fake.kindsForMutex.Unlock() + fake.KindsForStub = stub +} + +func (fake *FakeRESTMapper) KindsForArgsForCall(i int) schema.GroupVersionResource { + fake.kindsForMutex.RLock() + defer fake.kindsForMutex.RUnlock() + argsForCall := fake.kindsForArgsForCall[i] + return argsForCall.arg1 +} + +func (fake *FakeRESTMapper) KindsForReturns(result1 []schema.GroupVersionKind, result2 error) { + fake.kindsForMutex.Lock() + defer fake.kindsForMutex.Unlock() + fake.KindsForStub = nil + fake.kindsForReturns = struct { + result1 []schema.GroupVersionKind + result2 error + }{result1, result2} +} + +func (fake *FakeRESTMapper) KindsForReturnsOnCall(i int, result1 []schema.GroupVersionKind, result2 error) { + fake.kindsForMutex.Lock() + defer fake.kindsForMutex.Unlock() + fake.KindsForStub = nil + if fake.kindsForReturnsOnCall == nil { + fake.kindsForReturnsOnCall = make(map[int]struct { + result1 []schema.GroupVersionKind + result2 error + }) + } + fake.kindsForReturnsOnCall[i] = struct { + result1 []schema.GroupVersionKind + result2 error + }{result1, result2} +} + +func (fake *FakeRESTMapper) RESTMapping(arg1 schema.GroupKind, arg2 ...string) (*meta.RESTMapping, error) { + fake.rESTMappingMutex.Lock() + ret, specificReturn := fake.rESTMappingReturnsOnCall[len(fake.rESTMappingArgsForCall)] + fake.rESTMappingArgsForCall = append(fake.rESTMappingArgsForCall, struct { + arg1 schema.GroupKind + arg2 []string + }{arg1, arg2}) + stub := fake.RESTMappingStub + fakeReturns := fake.rESTMappingReturns + fake.recordInvocation("RESTMapping", []interface{}{arg1, arg2}) + fake.rESTMappingMutex.Unlock() + if stub != nil { + return stub(arg1, arg2...) + } + if specificReturn { + return ret.result1, ret.result2 + } + return fakeReturns.result1, fakeReturns.result2 +} + +func (fake *FakeRESTMapper) RESTMappingCallCount() int { + fake.rESTMappingMutex.RLock() + defer fake.rESTMappingMutex.RUnlock() + return len(fake.rESTMappingArgsForCall) +} + +func (fake *FakeRESTMapper) RESTMappingCalls(stub func(schema.GroupKind, ...string) (*meta.RESTMapping, error)) { + fake.rESTMappingMutex.Lock() + defer fake.rESTMappingMutex.Unlock() + fake.RESTMappingStub = stub +} + +func (fake *FakeRESTMapper) RESTMappingArgsForCall(i int) (schema.GroupKind, []string) { + fake.rESTMappingMutex.RLock() + defer fake.rESTMappingMutex.RUnlock() + argsForCall := fake.rESTMappingArgsForCall[i] + return argsForCall.arg1, argsForCall.arg2 +} + +func (fake *FakeRESTMapper) RESTMappingReturns(result1 *meta.RESTMapping, result2 error) { + fake.rESTMappingMutex.Lock() + defer fake.rESTMappingMutex.Unlock() + fake.RESTMappingStub = nil + fake.rESTMappingReturns = struct { + result1 *meta.RESTMapping + result2 error + }{result1, result2} +} + +func (fake *FakeRESTMapper) RESTMappingReturnsOnCall(i int, result1 *meta.RESTMapping, result2 error) { + fake.rESTMappingMutex.Lock() + defer fake.rESTMappingMutex.Unlock() + fake.RESTMappingStub = nil + if fake.rESTMappingReturnsOnCall == nil { + fake.rESTMappingReturnsOnCall = make(map[int]struct { + result1 *meta.RESTMapping + result2 error + }) + } + fake.rESTMappingReturnsOnCall[i] = struct { + result1 *meta.RESTMapping + result2 error + }{result1, result2} +} + +func (fake *FakeRESTMapper) RESTMappings(arg1 schema.GroupKind, arg2 ...string) ([]*meta.RESTMapping, error) { + fake.rESTMappingsMutex.Lock() + ret, specificReturn := fake.rESTMappingsReturnsOnCall[len(fake.rESTMappingsArgsForCall)] + fake.rESTMappingsArgsForCall = append(fake.rESTMappingsArgsForCall, struct { + arg1 schema.GroupKind + arg2 []string + }{arg1, arg2}) + stub := fake.RESTMappingsStub + fakeReturns := fake.rESTMappingsReturns + fake.recordInvocation("RESTMappings", []interface{}{arg1, arg2}) + fake.rESTMappingsMutex.Unlock() + if stub != nil { + return stub(arg1, arg2...) + } + if specificReturn { + return ret.result1, ret.result2 + } + return fakeReturns.result1, fakeReturns.result2 +} + +func (fake *FakeRESTMapper) RESTMappingsCallCount() int { + fake.rESTMappingsMutex.RLock() + defer fake.rESTMappingsMutex.RUnlock() + return len(fake.rESTMappingsArgsForCall) +} + +func (fake *FakeRESTMapper) RESTMappingsCalls(stub func(schema.GroupKind, ...string) ([]*meta.RESTMapping, error)) { + fake.rESTMappingsMutex.Lock() + defer fake.rESTMappingsMutex.Unlock() + fake.RESTMappingsStub = stub +} + +func (fake *FakeRESTMapper) RESTMappingsArgsForCall(i int) (schema.GroupKind, []string) { + fake.rESTMappingsMutex.RLock() + defer fake.rESTMappingsMutex.RUnlock() + argsForCall := fake.rESTMappingsArgsForCall[i] + return argsForCall.arg1, argsForCall.arg2 +} + +func (fake *FakeRESTMapper) RESTMappingsReturns(result1 []*meta.RESTMapping, result2 error) { + fake.rESTMappingsMutex.Lock() + defer fake.rESTMappingsMutex.Unlock() + fake.RESTMappingsStub = nil + fake.rESTMappingsReturns = struct { + result1 []*meta.RESTMapping + result2 error + }{result1, result2} +} + +func (fake *FakeRESTMapper) RESTMappingsReturnsOnCall(i int, result1 []*meta.RESTMapping, result2 error) { + fake.rESTMappingsMutex.Lock() + defer fake.rESTMappingsMutex.Unlock() + fake.RESTMappingsStub = nil + if fake.rESTMappingsReturnsOnCall == nil { + fake.rESTMappingsReturnsOnCall = make(map[int]struct { + result1 []*meta.RESTMapping + result2 error + }) + } + fake.rESTMappingsReturnsOnCall[i] = struct { + result1 []*meta.RESTMapping + result2 error + }{result1, result2} +} + +func (fake *FakeRESTMapper) ResourceFor(arg1 schema.GroupVersionResource) (schema.GroupVersionResource, error) { + fake.resourceForMutex.Lock() + ret, specificReturn := fake.resourceForReturnsOnCall[len(fake.resourceForArgsForCall)] + fake.resourceForArgsForCall = append(fake.resourceForArgsForCall, struct { + arg1 schema.GroupVersionResource + }{arg1}) + stub := fake.ResourceForStub + fakeReturns := fake.resourceForReturns + fake.recordInvocation("ResourceFor", []interface{}{arg1}) + fake.resourceForMutex.Unlock() + if stub != nil { + return stub(arg1) + } + if specificReturn { + return ret.result1, ret.result2 + } + return fakeReturns.result1, fakeReturns.result2 +} + +func (fake *FakeRESTMapper) ResourceForCallCount() int { + fake.resourceForMutex.RLock() + defer fake.resourceForMutex.RUnlock() + return len(fake.resourceForArgsForCall) +} + +func (fake *FakeRESTMapper) ResourceForCalls(stub func(schema.GroupVersionResource) (schema.GroupVersionResource, error)) { + fake.resourceForMutex.Lock() + defer fake.resourceForMutex.Unlock() + fake.ResourceForStub = stub +} + +func (fake *FakeRESTMapper) ResourceForArgsForCall(i int) schema.GroupVersionResource { + fake.resourceForMutex.RLock() + defer fake.resourceForMutex.RUnlock() + argsForCall := fake.resourceForArgsForCall[i] + return argsForCall.arg1 +} + +func (fake *FakeRESTMapper) ResourceForReturns(result1 schema.GroupVersionResource, result2 error) { + fake.resourceForMutex.Lock() + defer fake.resourceForMutex.Unlock() + fake.ResourceForStub = nil + fake.resourceForReturns = struct { + result1 schema.GroupVersionResource + result2 error + }{result1, result2} +} + +func (fake *FakeRESTMapper) ResourceForReturnsOnCall(i int, result1 schema.GroupVersionResource, result2 error) { + fake.resourceForMutex.Lock() + defer fake.resourceForMutex.Unlock() + fake.ResourceForStub = nil + if fake.resourceForReturnsOnCall == nil { + fake.resourceForReturnsOnCall = make(map[int]struct { + result1 schema.GroupVersionResource + result2 error + }) + } + fake.resourceForReturnsOnCall[i] = struct { + result1 schema.GroupVersionResource + result2 error + }{result1, result2} +} + +func (fake *FakeRESTMapper) ResourceSingularizer(arg1 string) (string, error) { + fake.resourceSingularizerMutex.Lock() + ret, specificReturn := fake.resourceSingularizerReturnsOnCall[len(fake.resourceSingularizerArgsForCall)] + fake.resourceSingularizerArgsForCall = append(fake.resourceSingularizerArgsForCall, struct { + arg1 string + }{arg1}) + stub := fake.ResourceSingularizerStub + fakeReturns := fake.resourceSingularizerReturns + fake.recordInvocation("ResourceSingularizer", []interface{}{arg1}) + fake.resourceSingularizerMutex.Unlock() + if stub != nil { + return stub(arg1) + } + if specificReturn { + return ret.result1, ret.result2 + } + return fakeReturns.result1, fakeReturns.result2 +} + +func (fake *FakeRESTMapper) ResourceSingularizerCallCount() int { + fake.resourceSingularizerMutex.RLock() + defer fake.resourceSingularizerMutex.RUnlock() + return len(fake.resourceSingularizerArgsForCall) +} + +func (fake *FakeRESTMapper) ResourceSingularizerCalls(stub func(string) (string, error)) { + fake.resourceSingularizerMutex.Lock() + defer fake.resourceSingularizerMutex.Unlock() + fake.ResourceSingularizerStub = stub +} + +func (fake *FakeRESTMapper) ResourceSingularizerArgsForCall(i int) string { + fake.resourceSingularizerMutex.RLock() + defer fake.resourceSingularizerMutex.RUnlock() + argsForCall := fake.resourceSingularizerArgsForCall[i] + return argsForCall.arg1 +} + +func (fake *FakeRESTMapper) ResourceSingularizerReturns(result1 string, result2 error) { + fake.resourceSingularizerMutex.Lock() + defer fake.resourceSingularizerMutex.Unlock() + fake.ResourceSingularizerStub = nil + fake.resourceSingularizerReturns = struct { + result1 string + result2 error + }{result1, result2} +} + +func (fake *FakeRESTMapper) ResourceSingularizerReturnsOnCall(i int, result1 string, result2 error) { + fake.resourceSingularizerMutex.Lock() + defer fake.resourceSingularizerMutex.Unlock() + fake.ResourceSingularizerStub = nil + if fake.resourceSingularizerReturnsOnCall == nil { + fake.resourceSingularizerReturnsOnCall = make(map[int]struct { + result1 string + result2 error + }) + } + fake.resourceSingularizerReturnsOnCall[i] = struct { + result1 string + result2 error + }{result1, result2} +} + +func (fake *FakeRESTMapper) ResourcesFor(arg1 schema.GroupVersionResource) ([]schema.GroupVersionResource, error) { + fake.resourcesForMutex.Lock() + ret, specificReturn := fake.resourcesForReturnsOnCall[len(fake.resourcesForArgsForCall)] + fake.resourcesForArgsForCall = append(fake.resourcesForArgsForCall, struct { + arg1 schema.GroupVersionResource + }{arg1}) + stub := fake.ResourcesForStub + fakeReturns := fake.resourcesForReturns + fake.recordInvocation("ResourcesFor", []interface{}{arg1}) + fake.resourcesForMutex.Unlock() + if stub != nil { + return stub(arg1) + } + if specificReturn { + return ret.result1, ret.result2 + } + return fakeReturns.result1, fakeReturns.result2 +} + +func (fake *FakeRESTMapper) ResourcesForCallCount() int { + fake.resourcesForMutex.RLock() + defer fake.resourcesForMutex.RUnlock() + return len(fake.resourcesForArgsForCall) +} + +func (fake *FakeRESTMapper) ResourcesForCalls(stub func(schema.GroupVersionResource) ([]schema.GroupVersionResource, error)) { + fake.resourcesForMutex.Lock() + defer fake.resourcesForMutex.Unlock() + fake.ResourcesForStub = stub +} + +func (fake *FakeRESTMapper) ResourcesForArgsForCall(i int) schema.GroupVersionResource { + fake.resourcesForMutex.RLock() + defer fake.resourcesForMutex.RUnlock() + argsForCall := fake.resourcesForArgsForCall[i] + return argsForCall.arg1 +} + +func (fake *FakeRESTMapper) ResourcesForReturns(result1 []schema.GroupVersionResource, result2 error) { + fake.resourcesForMutex.Lock() + defer fake.resourcesForMutex.Unlock() + fake.ResourcesForStub = nil + fake.resourcesForReturns = struct { + result1 []schema.GroupVersionResource + result2 error + }{result1, result2} +} + +func (fake *FakeRESTMapper) ResourcesForReturnsOnCall(i int, result1 []schema.GroupVersionResource, result2 error) { + fake.resourcesForMutex.Lock() + defer fake.resourcesForMutex.Unlock() + fake.ResourcesForStub = nil + if fake.resourcesForReturnsOnCall == nil { + fake.resourcesForReturnsOnCall = make(map[int]struct { + result1 []schema.GroupVersionResource + result2 error + }) + } + fake.resourcesForReturnsOnCall[i] = struct { + result1 []schema.GroupVersionResource + result2 error + }{result1, result2} +} + +func (fake *FakeRESTMapper) Invocations() map[string][][]interface{} { + fake.invocationsMutex.RLock() + defer fake.invocationsMutex.RUnlock() + fake.kindForMutex.RLock() + defer fake.kindForMutex.RUnlock() + fake.kindsForMutex.RLock() + defer fake.kindsForMutex.RUnlock() + fake.rESTMappingMutex.RLock() + defer fake.rESTMappingMutex.RUnlock() + fake.rESTMappingsMutex.RLock() + defer fake.rESTMappingsMutex.RUnlock() + fake.resourceForMutex.RLock() + defer fake.resourceForMutex.RUnlock() + fake.resourceSingularizerMutex.RLock() + defer fake.resourceSingularizerMutex.RUnlock() + fake.resourcesForMutex.RLock() + defer fake.resourcesForMutex.RUnlock() + copiedInvocations := map[string][][]interface{}{} + for key, value := range fake.invocations { + copiedInvocations[key] = value + } + return copiedInvocations +} + +func (fake *FakeRESTMapper) recordInvocation(key string, args []interface{}) { + fake.invocationsMutex.Lock() + defer fake.invocationsMutex.Unlock() + if fake.invocations == nil { + fake.invocations = map[string][][]interface{}{} + } + if fake.invocations[key] == nil { + fake.invocations[key] = [][]interface{}{} + } + fake.invocations[key] = append(fake.invocations[key], args) +} + +var _ meta.RESTMapper = new(FakeRESTMapper) diff --git a/pkg/controllers/deliverable_reconciler.go b/pkg/controllers/deliverable_reconciler.go index 6ba771c35..bb16da8c7 100644 --- a/pkg/controllers/deliverable_reconciler.go +++ b/pkg/controllers/deliverable_reconciler.go @@ -25,6 +25,7 @@ import ( "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/kubernetes" @@ -34,7 +35,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" crtcontroller "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/handler" - "sigs.k8s.io/controller-runtime/pkg/source" "github.com/vmware-tanzu/cartographer/pkg/apis/v1alpha1" "github.com/vmware-tanzu/cartographer/pkg/conditions" @@ -65,6 +65,7 @@ type DeliverableReconciler struct { DependencyTracker dependency.DependencyTracker EventRecorder record.EventRecorder RESTMapper meta.RESTMapper + Scheme *runtime.Scheme } func (r *DeliverableReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { @@ -176,7 +177,7 @@ func (r *DeliverableReconciler) Reconcile(ctx context.Context, req ctrl.Request) obj := &unstructured.Unstructured{} obj.SetGroupVersionKind(resource.StampedRef.GroupVersionKind()) - trackingError = r.StampedTracker.Watch(log, obj, &handler.EnqueueRequestForOwner{OwnerType: &v1alpha1.Deliverable{}}) + trackingError = r.StampedTracker.Watch(log, obj, handler.EnqueueRequestForOwner(r.Scheme, r.RESTMapper, &v1alpha1.Deliverable{}, handler.OnlyControllerOwner())) if trackingError != nil { log.Error(err, "failed to add informer for object", "object", resource.StampedRef) @@ -416,6 +417,7 @@ func (r *DeliverableReconciler) SetupWithManager(mgr ctrl.Manager, concurrency i } r.TokenManager = satoken.NewManager(clientSet, mgr.GetLogger().WithName("service-account-token-manager"), nil) r.RESTMapper = mgr.GetRESTMapper() + r.Scheme = mgr.GetScheme() r.EventRecorder = mgr.GetEventRecorderFor("Workload") r.Repo = repository.NewRepository( @@ -456,14 +458,14 @@ func (r *DeliverableReconciler) SetupWithManager(mgr ctrl.Manager, concurrency i for kindType, mapFunc := range watches { builder = builder.Watches( - &source.Kind{Type: kindType}, + kindType, handler.EnqueueRequestsFromMapFunc(mapFunc), ) } for _, template := range v1alpha1.ValidDeliveryTemplates { builder = builder.Watches( - &source.Kind{Type: template}, + template, enqueuer.EnqueueTracked(template, r.DependencyTracker, mgr.GetScheme()), ) } diff --git a/pkg/controllers/deliverable_reconciler_test.go b/pkg/controllers/deliverable_reconciler_test.go index 0042f2d6f..724ba81e6 100644 --- a/pkg/controllers/deliverable_reconciler_test.go +++ b/pkg/controllers/deliverable_reconciler_test.go @@ -102,6 +102,8 @@ var _ = Describe("DeliverableReconciler", func() { err := utils.AddToScheme(scheme) Expect(err).NotTo(HaveOccurred()) repo.GetSchemeReturns(scheme) + fakeRESTMapper := controllersfakes.FakeRESTMapper{} + repo.GetRESTMapperReturns(&fakeRESTMapper) tokenManager = &satokenfakes.FakeTokenManager{} @@ -131,6 +133,8 @@ var _ = Describe("DeliverableReconciler", func() { Realizer: rlzr, StampedTracker: stampedTracker, DependencyTracker: dependencyTracker, + RESTMapper: &fakeRESTMapper, + Scheme: scheme, } req = ctrl.Request{ @@ -476,11 +480,12 @@ var _ = Describe("DeliverableReconciler", func() { _, obj, hndl, _ := stampedTracker.WatchArgsForCall(0) gvks = append(gvks, obj.GetObjectKind().GroupVersionKind()) - Expect(hndl).To(Equal(&handler.EnqueueRequestForOwner{OwnerType: &v1alpha1.Deliverable{}})) + _ = handler.EnqueueRequestForOwner(repo.GetScheme(), repo.GetRESTMapper(), &v1alpha1.Deliverable{}, handler.OnlyControllerOwner()) + Expect(hndl).To(Equal(handler.EnqueueRequestForOwner(repo.GetScheme(), repo.GetRESTMapper(), &v1alpha1.Deliverable{}, handler.OnlyControllerOwner()))) _, obj, hndl, _ = stampedTracker.WatchArgsForCall(1) gvks = append(gvks, obj.GetObjectKind().GroupVersionKind()) - Expect(hndl).To(Equal(&handler.EnqueueRequestForOwner{OwnerType: &v1alpha1.Deliverable{}})) + Expect(hndl).To(Equal(handler.EnqueueRequestForOwner(repo.GetScheme(), repo.GetRESTMapper(), &v1alpha1.Deliverable{}, handler.OnlyControllerOwner()))) currentStatuses := resourceStatuses.GetCurrent() Expect(currentStatuses).To(HaveLen(2)) @@ -570,7 +575,7 @@ var _ = Describe("DeliverableReconciler", func() { _, _ = reconciler.Reconcile(ctx, req) Expect(out).To(Say(`"level":"info"`)) - Expect(out).To(Say(`"deliverable":"my-namespace/my-deliverable-name"`)) + Expect(out).To(Say(`"deliverable":{"name":"my-deliverable-name","namespace":"my-namespace"}`)) Expect(out).To(Say(`"delivery":"some-delivery"`)) Expect(out).To(Say(`"handled error":"delivery \[some-delivery\] is not in ready state"`)) }) @@ -672,7 +677,7 @@ var _ = Describe("DeliverableReconciler", func() { Expect(out).To(Say(`"level":"info"`)) Expect(out).To(Say(`"msg":"handled error reconciling deliverable"`)) - Expect(out).To(Say(`"deliverable":"my-namespace/my-deliverable-name"`)) + Expect(out).To(Say(`"deliverable":{"name":"my-deliverable-name","namespace":"my-namespace"}`)) Expect(out).To(Say(`"delivery":"some-delivery"`)) Expect(out).To(Say(`"handled error":"unable to stamp object for resource \[some-name\] for template \[ClusterDeploymentTemplate/some-template\] in delivery \[some-delivery\]: some error"`)) }) @@ -847,7 +852,7 @@ var _ = Describe("DeliverableReconciler", func() { Expect(out).To(Say(`"level":"info"`)) Expect(out).To(Say(`"msg":"handled error reconciling deliverable"`)) - Expect(out).To(Say(`"deliverable":"my-namespace/my-deliverable-name"`)) + Expect(out).To(Say(`"deliverable":{"name":"my-deliverable-name","namespace":"my-namespace"}`)) Expect(out).To(Say(`"delivery":"some-delivery"`)) Expect(out).To(Say(`"handled error":"unable to retrieve outputs from stamped object \[my-ns/my-obj\] of type \[mything.thing.io\] for resource \[some-resource\] in delivery \[some-delivery\]: some error"`)) }) @@ -887,7 +892,7 @@ var _ = Describe("DeliverableReconciler", func() { Expect(out).To(Say(`"level":"info"`)) Expect(out).To(Say(`"msg":"handled error reconciling deliverable"`)) - Expect(out).To(Say(`"deliverable":"my-namespace/my-deliverable-name"`)) + Expect(out).To(Say(`"deliverable":{"name":"my-deliverable-name","namespace":"my-namespace"}`)) Expect(out).To(Say(`"delivery":"some-delivery"`)) Expect(out).To(Say(`"handled error":"unable to retrieve outputs from stamped object \[my-ns/my-obj\] of type \[mything.thing.io\] for resource \[some-resource\] in delivery \[some-delivery\]: some error"`)) }) @@ -927,7 +932,7 @@ var _ = Describe("DeliverableReconciler", func() { Expect(out).To(Say(`"level":"info"`)) Expect(out).To(Say(`"msg":"handled error reconciling deliverable"`)) - Expect(out).To(Say(`"deliverable":"my-namespace/my-deliverable-name"`)) + Expect(out).To(Say(`"deliverable":{"name":"my-deliverable-name","namespace":"my-namespace"}`)) Expect(out).To(Say(`"delivery":"some-delivery"`)) Expect(out).To(Say(`"handled error":"unable to retrieve outputs from stamped object \[my-ns/my-obj\] of type \[mything.thing.io\] for resource \[some-resource\] in delivery \[some-delivery\]: some error"`)) }) @@ -995,7 +1000,7 @@ var _ = Describe("DeliverableReconciler", func() { Expect(out).To(Say(`"level":"info"`)) Expect(out).To(Say(`"msg":"handled error reconciling deliverable"`)) - Expect(out).To(Say(`"deliverable":"my-namespace/my-deliverable-name"`)) + Expect(out).To(Say(`"deliverable":{"name":"my-deliverable-name","namespace":"my-namespace"}`)) Expect(out).To(Say(`"delivery":"some-delivery"`)) Expect(out).To(Say(`"handled error":"unable to retrieve outputs \[this.wont.find.anything\] from stamped object \[my-ns/my-obj\] of type \[mything.thing.io\] for resource \[some-resource\] in delivery \[some-delivery\]: failed to evaluate json path 'this.wont.find.anything': some error"`)) }) @@ -1035,7 +1040,7 @@ var _ = Describe("DeliverableReconciler", func() { Expect(out).To(Say(`"level":"info"`)) Expect(out).To(Say(`"msg":"handled error reconciling deliverable"`)) - Expect(out).To(Say(`"deliverable":"my-namespace/my-deliverable-name"`)) + Expect(out).To(Say(`"deliverable":{"name":"my-deliverable-name","namespace":"my-namespace"}`)) Expect(out).To(Say(`"delivery":"some-delivery"`)) Expect(out).To(Say(`"handled error":"unable to retrieve outputs from stamped object \[my-ns/my-obj\] of type \[mything.thing.io\] for resource \[some-resource\] in delivery \[some-delivery\]: some error"`)) }) @@ -1099,7 +1104,7 @@ var _ = Describe("DeliverableReconciler", func() { Expect(out).To(Say(`"level":"info"`)) Expect(out).To(Say(`"msg":"handled error reconciling deliverable"`)) - Expect(out).To(Say(`"deliverable":"my-namespace/my-deliverable-name"`)) + Expect(out).To(Say(`"deliverable":{"name":"my-deliverable-name","namespace":"my-namespace"}`)) Expect(out).To(Say(`"delivery":"some-delivery"`)) Expect(out).To(Say(`"handled error":"unable to retrieve outputs from pass through \[configs\] for resource \[some-resource\] in delivery \[some-delivery\]: some error"`)) }) @@ -1126,7 +1131,7 @@ var _ = Describe("DeliverableReconciler", func() { Expect(out).To(Say(`"level":"info"`)) Expect(out).To(Say(`"msg":"handled error reconciling deliverable"`)) - Expect(out).To(Say(`"deliverable":"my-namespace/my-deliverable-name"`)) + Expect(out).To(Say(`"deliverable":{"name":"my-deliverable-name","namespace":"my-namespace"}`)) Expect(out).To(Say(`"delivery":"some-delivery"`)) Expect(out).To(Say(`"handled error":"unable to retrieve outputs from pass through \[configs\] for resource \[some-resource\] in delivery \[some-delivery\]: some error"`)) }) @@ -1166,7 +1171,7 @@ var _ = Describe("DeliverableReconciler", func() { Expect(out).To(Say(`"level":"info"`)) Expect(out).To(Say(`"msg":"handled error reconciling deliverable"`)) - Expect(out).To(Say(`"deliverable":"my-namespace/my-deliverable-name"`)) + Expect(out).To(Say(`"deliverable":{"name":"my-deliverable-name","namespace":"my-namespace"}`)) Expect(out).To(Say(`"delivery":"some-delivery"`)) Expect(out).To(Say(`"handled error":"unable to retrieve outputs from pass through \[configs\] for resource \[some-resource\] in delivery \[some-delivery\]: some error"`)) }) @@ -1427,7 +1432,7 @@ var _ = Describe("DeliverableReconciler", func() { Expect(out).To(Say(`"level":"info"`)) Expect(out).To(Say(`"msg":"handled error reconciling deliverable"`)) - Expect(out).To(Say(`"deliverable":"my-namespace/my-deliverable-name"`)) + Expect(out).To(Say(`"deliverable":{"name":"my-deliverable-name","namespace":"my-namespace"}`)) Expect(out).To(Say(`"handled error":"deliverable \[my-namespace/my-deliverable\] is missing required labels"`)) }) @@ -1453,7 +1458,7 @@ var _ = Describe("DeliverableReconciler", func() { Expect(out).To(Say(`"level":"info"`)) Expect(out).To(Say(`"msg":"handled error reconciling deliverable"`)) - Expect(out).To(Say(`"deliverable":"my-namespace/my-deliverable-name"`)) + Expect(out).To(Say(`"deliverable":{"name":"my-deliverable-name","namespace":"my-namespace"}`)) Expect(out).To(Say(`"handled error":"no delivery \[my-namespace/my-deliverable\] found where full selector is satisfied by labels: map\[some-key:some-val\]"`)) }) }) @@ -1500,7 +1505,7 @@ var _ = Describe("DeliverableReconciler", func() { Expect(out).To(Say(`"level":"info"`)) Expect(out).To(Say(`"msg":"handled error reconciling deliverable"`)) - Expect(out).To(Say(`"deliverable":"my-namespace/my-deliverable-name"`)) + Expect(out).To(Say(`"deliverable":{"name":"my-deliverable-name","namespace":"my-namespace"}`)) Expect(out).To(Say(`"handled error":"more than one delivery selected for deliverable \[my-namespace/my-deliverable\]: \[my-name my-name\]"`)) }) }) @@ -1678,7 +1683,7 @@ var _ = Describe("DeliverableReconciler", func() { _, err := reconciler.Reconcile(ctx, req) Expect(err).NotTo(HaveOccurred()) - Expect(out).To(Say(`"msg":"failed to cleanup orphaned objects","deliverable":"my-namespace/my-deliverable-name"`)) + Expect(out).To(Say(`"msg":"failed to cleanup orphaned objects","deliverable":{"name":"my-deliverable-name","namespace":"my-namespace"}`)) }) }) }) diff --git a/pkg/controllers/delivery_reconciler.go b/pkg/controllers/delivery_reconciler.go index 401f9dfef..9433e2739 100644 --- a/pkg/controllers/delivery_reconciler.go +++ b/pkg/controllers/delivery_reconciler.go @@ -23,7 +23,6 @@ import ( "k8s.io/apimachinery/pkg/types" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "sigs.k8s.io/controller-runtime/pkg/source" "github.com/vmware-tanzu/cartographer/pkg/apis/v1alpha1" "github.com/vmware-tanzu/cartographer/pkg/conditions" @@ -172,7 +171,7 @@ func (r *DeliveryReconiler) SetupWithManager(mgr ctrl.Manager) error { for _, template := range v1alpha1.ValidDeliveryTemplates { builder = builder.Watches( - &source.Kind{Type: template}, + template, enqueuer.EnqueueTracked(template, r.DependencyTracker, mgr.GetScheme()), ) } diff --git a/pkg/controllers/runnable_reconciler.go b/pkg/controllers/runnable_reconciler.go index a712501dc..8d42cdd1e 100644 --- a/pkg/controllers/runnable_reconciler.go +++ b/pkg/controllers/runnable_reconciler.go @@ -25,6 +25,7 @@ import ( apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" kerrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/kubernetes" @@ -34,7 +35,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" crtcontroller "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/handler" - "sigs.k8s.io/controller-runtime/pkg/source" "github.com/vmware-tanzu/cartographer/pkg/apis/v1alpha1" "github.com/vmware-tanzu/cartographer/pkg/conditions" @@ -64,6 +64,7 @@ type RunnableReconciler struct { DependencyTracker dependency.DependencyTracker EventRecorder record.EventRecorder RESTMapper meta.RESTMapper + Scheme *runtime.Scheme } func (r *RunnableReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { @@ -158,7 +159,7 @@ func (r *RunnableReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c conditionManager.AddPositive(conditions.StampedObjectConditionKnown(stampedCondition)) stampedObjectStatusPresent = true } - trackingError = r.StampedTracker.Watch(log, stampedObject, &handler.EnqueueRequestForOwner{OwnerType: &v1alpha1.Runnable{}}) + trackingError = r.StampedTracker.Watch(log, stampedObject, handler.EnqueueRequestForOwner(r.Scheme, r.RESTMapper, &v1alpha1.Runnable{})) if trackingError != nil { log.Error(err, "failed to add informer for object", "object", stampedObject) err = cerrors.NewUnhandledError(trackingError) @@ -240,6 +241,7 @@ func (r *RunnableReconciler) SetupWithManager(mgr ctrl.Manager, concurrency int) r.EventRecorder = mgr.GetEventRecorderFor("Runnable") r.RESTMapper = mgr.GetRESTMapper() + r.Scheme = mgr.GetScheme() r.TokenManager = satoken.NewManager(clientSet, mgr.GetLogger().WithName("service-account-token-manager"), nil) @@ -261,7 +263,8 @@ func (r *RunnableReconciler) SetupWithManager(mgr ctrl.Manager, concurrency int) builder := ctrl.NewControllerManagedBy(mgr). WithOptions(crtcontroller.Options{MaxConcurrentReconciles: concurrency}). For(&v1alpha1.Runnable{}). - Watches(&source.Kind{Type: &v1alpha1.ClusterRunTemplate{}}, + Watches( + &v1alpha1.ClusterRunTemplate{}, enqueuer.EnqueueTracked(&v1alpha1.ClusterRunTemplate{}, r.DependencyTracker, mgr.GetScheme()), ) @@ -281,7 +284,7 @@ func (r *RunnableReconciler) SetupWithManager(mgr ctrl.Manager, concurrency int) for kindType, mapFunc := range watches { builder = builder.Watches( - &source.Kind{Type: kindType}, + kindType, handler.EnqueueRequestsFromMapFunc(mapFunc), ) } diff --git a/pkg/controllers/runnable_reconciler_test.go b/pkg/controllers/runnable_reconciler_test.go index bfb2d8b16..08811cca1 100644 --- a/pkg/controllers/runnable_reconciler_test.go +++ b/pkg/controllers/runnable_reconciler_test.go @@ -28,6 +28,7 @@ import ( kerrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/discovery" @@ -40,6 +41,7 @@ import ( "github.com/vmware-tanzu/cartographer/pkg/conditions" "github.com/vmware-tanzu/cartographer/pkg/conditions/conditionsfakes" "github.com/vmware-tanzu/cartographer/pkg/controllers" + "github.com/vmware-tanzu/cartographer/pkg/controllers/controllersfakes" cerrors "github.com/vmware-tanzu/cartographer/pkg/errors" "github.com/vmware-tanzu/cartographer/pkg/events/eventsfakes" "github.com/vmware-tanzu/cartographer/pkg/realizer/runnable/runnablefakes" @@ -49,6 +51,7 @@ import ( "github.com/vmware-tanzu/cartographer/pkg/templates" "github.com/vmware-tanzu/cartographer/pkg/tracker/dependency/dependencyfakes" "github.com/vmware-tanzu/cartographer/pkg/tracker/stamped/stampedfakes" + "github.com/vmware-tanzu/cartographer/pkg/utils" ) var _ = Describe("Reconcile", func() { @@ -90,6 +93,13 @@ var _ = Describe("Reconcile", func() { fakeDiscoveryClient = &runnablefakes.FakeDiscoveryInterface{} fakeEventRecorder = &eventsfakes.FakeEventRecorder{} + scheme := runtime.NewScheme() + err := utils.AddToScheme(scheme) + Expect(err).NotTo(HaveOccurred()) + repo.GetSchemeReturns(scheme) + fakeRESTMapper := controllersfakes.FakeRESTMapper{} + repo.GetRESTMapperReturns(&fakeRESTMapper) + serviceAccount = &corev1.ServiceAccount{ ObjectMeta: metav1.ObjectMeta{Name: serviceAccountName}, } @@ -123,6 +133,8 @@ var _ = Describe("Reconcile", func() { RepositoryBuilder: repositoryBuilder, DependencyTracker: dependencyTracker, EventRecorder: fakeEventRecorder, + RESTMapper: &fakeRESTMapper, + Scheme: scheme, } request = controllerruntime.Request{ @@ -256,7 +268,7 @@ var _ = Describe("Reconcile", func() { _, obj, hndl, _ := stampedTracker.WatchArgsForCall(0) Expect(obj).To(Equal(stampedObject)) - Expect(hndl).To(Equal(&handler.EnqueueRequestForOwner{OwnerType: &v1alpha1.Runnable{}})) + Expect(hndl).To(Equal(handler.EnqueueRequestForOwner(repo.GetScheme(), repo.GetRESTMapper(), &v1alpha1.Runnable{}))) }) }) diff --git a/pkg/controllers/supplychain_reconciler.go b/pkg/controllers/supplychain_reconciler.go index d16ea748b..0f616f870 100644 --- a/pkg/controllers/supplychain_reconciler.go +++ b/pkg/controllers/supplychain_reconciler.go @@ -23,7 +23,6 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/source" "github.com/vmware-tanzu/cartographer/pkg/apis/v1alpha1" "github.com/vmware-tanzu/cartographer/pkg/conditions" @@ -179,7 +178,7 @@ func (r *SupplyChainReconciler) SetupWithManager(mgr ctrl.Manager) error { for _, template := range v1alpha1.ValidSupplyChainTemplates { builder = builder.Watches( - &source.Kind{Type: template}, + template, enqueuer.EnqueueTracked(template, r.DependencyTracker, mgr.GetScheme()), ) } diff --git a/pkg/controllers/workload_reconciler.go b/pkg/controllers/workload_reconciler.go index de691b6af..45b6b2772 100644 --- a/pkg/controllers/workload_reconciler.go +++ b/pkg/controllers/workload_reconciler.go @@ -25,6 +25,7 @@ import ( "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/kubernetes" @@ -34,7 +35,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" crtcontroller "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/handler" - "sigs.k8s.io/controller-runtime/pkg/source" "github.com/vmware-tanzu/cartographer/pkg/apis/v1alpha1" "github.com/vmware-tanzu/cartographer/pkg/conditions" @@ -65,8 +65,11 @@ type WorkloadReconciler struct { DependencyTracker dependency.DependencyTracker EventRecorder record.EventRecorder RESTMapper meta.RESTMapper + Scheme *runtime.Scheme } +//counterfeiter:generate k8s.io/apimachinery/pkg/api/meta.RESTMapper + func (r *WorkloadReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { log := logr.FromContextOrDiscard(ctx) log.Info("started") @@ -179,7 +182,7 @@ func (r *WorkloadReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c obj := &unstructured.Unstructured{} obj.SetGroupVersionKind(resource.StampedRef.GroupVersionKind()) - trackingError = r.StampedTracker.Watch(log, obj, &handler.EnqueueRequestForOwner{OwnerType: &v1alpha1.Workload{}}) + trackingError = r.StampedTracker.Watch(log, obj, handler.EnqueueRequestForOwner(r.Scheme, r.RESTMapper, &v1alpha1.Workload{})) if trackingError != nil { log.Error(err, "failed to add informer for object", "object", resource.StampedRef) @@ -421,6 +424,7 @@ func (r *WorkloadReconciler) SetupWithManager(mgr ctrl.Manager, concurrency int) } r.TokenManager = satoken.NewManager(clientSet, mgr.GetLogger().WithName("service-account-token-manager"), nil) r.RESTMapper = mgr.GetRESTMapper() + r.Scheme = mgr.GetScheme() r.EventRecorder = mgr.GetEventRecorderFor("Workload") r.Repo = repository.NewRepository( @@ -461,14 +465,14 @@ func (r *WorkloadReconciler) SetupWithManager(mgr ctrl.Manager, concurrency int) for kindType, mapFunc := range watches { builder = builder.Watches( - &source.Kind{Type: kindType}, + kindType, handler.EnqueueRequestsFromMapFunc(mapFunc), ) } for _, template := range v1alpha1.ValidSupplyChainTemplates { builder = builder.Watches( - &source.Kind{Type: template}, + template, enqueuer.EnqueueTracked(template, r.DependencyTracker, mgr.GetScheme()), ) } diff --git a/pkg/controllers/workload_reconciler_test.go b/pkg/controllers/workload_reconciler_test.go index 81df1751d..42de12050 100644 --- a/pkg/controllers/workload_reconciler_test.go +++ b/pkg/controllers/workload_reconciler_test.go @@ -101,6 +101,8 @@ var _ = Describe("WorkloadReconciler", func() { err := utils.AddToScheme(scheme) Expect(err).NotTo(HaveOccurred()) repo.GetSchemeReturns(scheme) + fakeRESTMapper := controllersfakes.FakeRESTMapper{} + repo.GetRESTMapperReturns(&fakeRESTMapper) tokenManager = &satokenfakes.FakeTokenManager{} @@ -133,6 +135,8 @@ var _ = Describe("WorkloadReconciler", func() { Realizer: rlzr, StampedTracker: stampedTracker, DependencyTracker: dependencyTracker, + RESTMapper: &fakeRESTMapper, + Scheme: scheme, } req = ctrl.Request{ @@ -478,11 +482,11 @@ var _ = Describe("WorkloadReconciler", func() { _, obj, hndl, _ := stampedTracker.WatchArgsForCall(0) gvks = append(gvks, obj.GetObjectKind().GroupVersionKind()) - Expect(hndl).To(Equal(&handler.EnqueueRequestForOwner{OwnerType: &v1alpha1.Workload{}})) + Expect(hndl).To(Equal(handler.EnqueueRequestForOwner(repo.GetScheme(), repo.GetRESTMapper(), &v1alpha1.Workload{}))) _, obj, hndl, _ = stampedTracker.WatchArgsForCall(1) gvks = append(gvks, obj.GetObjectKind().GroupVersionKind()) - Expect(hndl).To(Equal(&handler.EnqueueRequestForOwner{OwnerType: &v1alpha1.Workload{}})) + Expect(hndl).To(Equal(handler.EnqueueRequestForOwner(repo.GetScheme(), repo.GetRESTMapper(), &v1alpha1.Workload{}))) currentStatuses := resourceStatuses.GetCurrent() Expect(currentStatuses).To(HaveLen(2)) @@ -1468,7 +1472,7 @@ var _ = Describe("WorkloadReconciler", func() { _, err := reconciler.Reconcile(ctx, req) Expect(err).NotTo(HaveOccurred()) - Expect(out).To(Say(`"msg":"failed to cleanup orphaned objects","workload":"my-namespace/my-workload-name"`)) + Expect(out).To(Say(`"msg":"failed to cleanup orphaned objects","workload":{"name":"my-workload-name","namespace":"my-namespace"}`)) }) }) }) @@ -1741,7 +1745,7 @@ var _ = Describe("WorkloadReconciler", func() { Expect(err).NotTo(HaveOccurred()) Expect(repo.DeleteCallCount()).To(Equal(1)) - Expect(out).To(Say(`"msg":"failed to cleanup orphaned objects","workload":"my-namespace/my-workload-name"`)) + Expect(out).To(Say(`"msg":"failed to cleanup orphaned objects","workload":{"name":"my-workload-name","namespace":"my-namespace"}`)) }) }) }) diff --git a/pkg/enqueuer/enqueuer.go b/pkg/enqueuer/enqueuer.go index 09d06a7e3..3a2e8bc6d 100644 --- a/pkg/enqueuer/enqueuer.go +++ b/pkg/enqueuer/enqueuer.go @@ -19,6 +19,8 @@ SPDX-License-Identifier: Apache-2.0 package enqueuer import ( + "context" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" @@ -30,7 +32,7 @@ import ( func EnqueueTracked(by client.Object, t tracker.DependencyTracker, s *runtime.Scheme) handler.EventHandler { return handler.EnqueueRequestsFromMapFunc( - func(a client.Object) []reconcile.Request { + func(_ context.Context, a client.Object) []reconcile.Request { var requests []reconcile.Request gvks, _, err := s.ObjectKinds(by) diff --git a/pkg/mapper/map_functions.go b/pkg/mapper/map_functions.go index c67c553b6..17cdd9f18 100644 --- a/pkg/mapper/map_functions.go +++ b/pkg/mapper/map_functions.go @@ -46,7 +46,7 @@ type Mapper struct { // Workload -func (mapper *Mapper) ClusterSupplyChainToWorkloadRequests(_ client.Object) []reconcile.Request { +func (mapper *Mapper) ClusterSupplyChainToWorkloadRequests(_ context.Context, _ client.Object) []reconcile.Request { workloadList := &v1alpha1.WorkloadList{} err := mapper.Client.List(context.TODO(), workloadList) if err != nil { @@ -67,7 +67,7 @@ func (mapper *Mapper) ClusterSupplyChainToWorkloadRequests(_ client.Object) []re return requests } -func (mapper *Mapper) ServiceAccountToWorkloadRequests(serviceAccountObject client.Object) []reconcile.Request { +func (mapper *Mapper) ServiceAccountToWorkloadRequests(_ context.Context, serviceAccountObject client.Object) []reconcile.Request { err := mapper.addGVK(serviceAccountObject) if err != nil { mapper.Logger.Error(err, fmt.Sprintf("could not get GVK for service account: %s", serviceAccountObject.GetName())) @@ -90,7 +90,7 @@ func (mapper *Mapper) ServiceAccountToWorkloadRequests(serviceAccountObject clie return requests } -func (mapper *Mapper) RoleBindingToWorkloadRequests(roleBindingObject client.Object) []reconcile.Request { +func (mapper *Mapper) RoleBindingToWorkloadRequests(ctx context.Context, roleBindingObject client.Object) []reconcile.Request { roleBinding, ok := roleBindingObject.(*rbacv1.RoleBinding) if !ok { mapper.Logger.Error(nil, "role binding to workload requests: cast to RoleBinding failed") @@ -101,13 +101,13 @@ func (mapper *Mapper) RoleBindingToWorkloadRequests(roleBindingObject client.Obj var requests []reconcile.Request for _, serviceAccount := range serviceAccounts { - requests = append(requests, mapper.ServiceAccountToWorkloadRequests(serviceAccount)...) + requests = append(requests, mapper.ServiceAccountToWorkloadRequests(ctx, serviceAccount)...) } return requests } -func (mapper *Mapper) ClusterRoleBindingToWorkloadRequests(clusterRoleBindingObject client.Object) []reconcile.Request { +func (mapper *Mapper) ClusterRoleBindingToWorkloadRequests(ctx context.Context, clusterRoleBindingObject client.Object) []reconcile.Request { clusterRoleBinding, ok := clusterRoleBindingObject.(*rbacv1.ClusterRoleBinding) if !ok { mapper.Logger.Error(nil, "cluster role binding to workload requests: cast to ClusterRoleBinding failed") @@ -118,13 +118,13 @@ func (mapper *Mapper) ClusterRoleBindingToWorkloadRequests(clusterRoleBindingObj var requests []reconcile.Request for _, serviceAccount := range serviceAccounts { - requests = append(requests, mapper.ServiceAccountToWorkloadRequests(serviceAccount)...) + requests = append(requests, mapper.ServiceAccountToWorkloadRequests(ctx, serviceAccount)...) } return requests } -func (mapper *Mapper) RoleToWorkloadRequests(roleObject client.Object) []reconcile.Request { +func (mapper *Mapper) RoleToWorkloadRequests(ctx context.Context, roleObject client.Object) []reconcile.Request { role, ok := roleObject.(*rbacv1.Role) if !ok { mapper.Logger.Error(nil, "role to workload requests: cast to Role failed") @@ -142,14 +142,14 @@ func (mapper *Mapper) RoleToWorkloadRequests(roleObject client.Object) []reconci var requests []reconcile.Request for _, roleBinding := range list.Items { if roleBinding.RoleRef.APIGroup == "" && roleBinding.RoleRef.Kind == "Role" && roleBinding.RoleRef.Name == role.Name { - requests = append(requests, mapper.RoleBindingToWorkloadRequests(&roleBinding)...) + requests = append(requests, mapper.RoleBindingToWorkloadRequests(ctx, &roleBinding)...) } } return requests } -func (mapper *Mapper) ClusterRoleToWorkloadRequests(clusterRoleObject client.Object) []reconcile.Request { +func (mapper *Mapper) ClusterRoleToWorkloadRequests(ctx context.Context, clusterRoleObject client.Object) []reconcile.Request { clusterRole, ok := clusterRoleObject.(*rbacv1.ClusterRole) if !ok { mapper.Logger.Error(nil, "cluster role to workload requests: cast to ClusterRole failed") @@ -168,7 +168,7 @@ func (mapper *Mapper) ClusterRoleToWorkloadRequests(clusterRoleObject client.Obj for _, clusterRoleBinding := range clusterRoleBindingList.Items { if clusterRoleBinding.RoleRef.APIGroup == "" && clusterRoleBinding.RoleRef.Kind == "ClusterRole" && clusterRoleBinding.RoleRef.Name == clusterRole.Name { - requests = append(requests, mapper.ClusterRoleBindingToWorkloadRequests(&clusterRoleBinding)...) + requests = append(requests, mapper.ClusterRoleBindingToWorkloadRequests(ctx, &clusterRoleBinding)...) } } @@ -182,7 +182,7 @@ func (mapper *Mapper) ClusterRoleToWorkloadRequests(clusterRoleObject client.Obj for _, roleBinding := range roleBindingList.Items { if roleBinding.RoleRef.APIGroup == "" && roleBinding.RoleRef.Kind == "ClusterRole" && roleBinding.RoleRef.Name == clusterRole.Name { - requests = append(requests, mapper.RoleBindingToWorkloadRequests(&roleBinding)...) + requests = append(requests, mapper.RoleBindingToWorkloadRequests(ctx, &roleBinding)...) } } @@ -191,7 +191,7 @@ func (mapper *Mapper) ClusterRoleToWorkloadRequests(clusterRoleObject client.Obj // Deliverable -func (mapper *Mapper) ClusterDeliveryToDeliverableRequests(_ client.Object) []reconcile.Request { +func (mapper *Mapper) ClusterDeliveryToDeliverableRequests(_ context.Context, _ client.Object) []reconcile.Request { deliverableList := &v1alpha1.DeliverableList{} err := mapper.Client.List(context.TODO(), deliverableList) if err != nil { @@ -212,7 +212,7 @@ func (mapper *Mapper) ClusterDeliveryToDeliverableRequests(_ client.Object) []re return requests } -func (mapper *Mapper) ServiceAccountToDeliverableRequests(serviceAccountObject client.Object) []reconcile.Request { +func (mapper *Mapper) ServiceAccountToDeliverableRequests(_ context.Context, serviceAccountObject client.Object) []reconcile.Request { err := mapper.addGVK(serviceAccountObject) if err != nil { mapper.Logger.Error(err, fmt.Sprintf("could not get GVK for service account: %s", serviceAccountObject.GetName())) @@ -235,7 +235,7 @@ func (mapper *Mapper) ServiceAccountToDeliverableRequests(serviceAccountObject c return requests } -func (mapper *Mapper) RoleBindingToDeliverableRequests(roleBindingObject client.Object) []reconcile.Request { +func (mapper *Mapper) RoleBindingToDeliverableRequests(ctx context.Context, roleBindingObject client.Object) []reconcile.Request { roleBinding, ok := roleBindingObject.(*rbacv1.RoleBinding) if !ok { mapper.Logger.Error(nil, "role binding to deliverable requests: cast to RoleBinding failed") @@ -246,13 +246,13 @@ func (mapper *Mapper) RoleBindingToDeliverableRequests(roleBindingObject client. var requests []reconcile.Request for _, serviceAccount := range serviceAccounts { - requests = append(requests, mapper.ServiceAccountToDeliverableRequests(serviceAccount)...) + requests = append(requests, mapper.ServiceAccountToDeliverableRequests(ctx, serviceAccount)...) } return requests } -func (mapper *Mapper) ClusterRoleBindingToDeliverableRequests(clusterRoleBindingObject client.Object) []reconcile.Request { +func (mapper *Mapper) ClusterRoleBindingToDeliverableRequests(ctx context.Context, clusterRoleBindingObject client.Object) []reconcile.Request { clusterRoleBinding, ok := clusterRoleBindingObject.(*rbacv1.ClusterRoleBinding) if !ok { mapper.Logger.Error(nil, "cluster role binding to deliverable requests: cast to ClusterRoleBinding failed") @@ -263,13 +263,13 @@ func (mapper *Mapper) ClusterRoleBindingToDeliverableRequests(clusterRoleBinding var requests []reconcile.Request for _, serviceAccount := range serviceAccounts { - requests = append(requests, mapper.ServiceAccountToDeliverableRequests(serviceAccount)...) + requests = append(requests, mapper.ServiceAccountToDeliverableRequests(ctx, serviceAccount)...) } return requests } -func (mapper *Mapper) RoleToDeliverableRequests(roleObject client.Object) []reconcile.Request { +func (mapper *Mapper) RoleToDeliverableRequests(ctx context.Context, roleObject client.Object) []reconcile.Request { role, ok := roleObject.(*rbacv1.Role) if !ok { mapper.Logger.Error(nil, "role to deliverable requests: cast to Role failed") @@ -287,14 +287,14 @@ func (mapper *Mapper) RoleToDeliverableRequests(roleObject client.Object) []reco var requests []reconcile.Request for _, roleBinding := range list.Items { if roleBinding.RoleRef.APIGroup == "" && roleBinding.RoleRef.Kind == "Role" && roleBinding.RoleRef.Name == role.Name { - requests = append(requests, mapper.RoleBindingToDeliverableRequests(&roleBinding)...) + requests = append(requests, mapper.RoleBindingToDeliverableRequests(ctx, &roleBinding)...) } } return requests } -func (mapper *Mapper) ClusterRoleToDeliverableRequests(clusterRoleObject client.Object) []reconcile.Request { +func (mapper *Mapper) ClusterRoleToDeliverableRequests(ctx context.Context, clusterRoleObject client.Object) []reconcile.Request { clusterRole, ok := clusterRoleObject.(*rbacv1.ClusterRole) if !ok { mapper.Logger.Error(nil, "cluster role to deliverable requests: cast to ClusterRole failed") @@ -313,7 +313,7 @@ func (mapper *Mapper) ClusterRoleToDeliverableRequests(clusterRoleObject client. for _, clusterRoleBinding := range clusterRoleBindingList.Items { if clusterRoleBinding.RoleRef.APIGroup == "" && clusterRoleBinding.RoleRef.Kind == "ClusterRole" && clusterRoleBinding.RoleRef.Name == clusterRole.Name { - requests = append(requests, mapper.ClusterRoleBindingToDeliverableRequests(&clusterRoleBinding)...) + requests = append(requests, mapper.ClusterRoleBindingToDeliverableRequests(ctx, &clusterRoleBinding)...) } } @@ -327,7 +327,7 @@ func (mapper *Mapper) ClusterRoleToDeliverableRequests(clusterRoleObject client. for _, roleBinding := range roleBindingList.Items { if roleBinding.RoleRef.APIGroup == "" && roleBinding.RoleRef.Kind == "ClusterRole" && roleBinding.RoleRef.Name == clusterRole.Name { - requests = append(requests, mapper.RoleBindingToDeliverableRequests(&roleBinding)...) + requests = append(requests, mapper.RoleBindingToDeliverableRequests(ctx, &roleBinding)...) } } @@ -336,7 +336,7 @@ func (mapper *Mapper) ClusterRoleToDeliverableRequests(clusterRoleObject client. // Runnable -func (mapper *Mapper) ServiceAccountToRunnableRequests(serviceAccountObject client.Object) []reconcile.Request { +func (mapper *Mapper) ServiceAccountToRunnableRequests(ctx context.Context, serviceAccountObject client.Object) []reconcile.Request { err := mapper.addGVK(serviceAccountObject) if err != nil { mapper.Logger.Error(err, fmt.Sprintf("could not get GVK for service account: %s", serviceAccountObject.GetName())) @@ -359,7 +359,7 @@ func (mapper *Mapper) ServiceAccountToRunnableRequests(serviceAccountObject clie return requests } -func (mapper *Mapper) RoleBindingToRunnableRequests(roleBindingObject client.Object) []reconcile.Request { +func (mapper *Mapper) RoleBindingToRunnableRequests(ctx context.Context, roleBindingObject client.Object) []reconcile.Request { roleBinding, ok := roleBindingObject.(*rbacv1.RoleBinding) if !ok { mapper.Logger.Error(nil, "role binding to runnable requests: cast to RoleBinding failed") @@ -370,13 +370,13 @@ func (mapper *Mapper) RoleBindingToRunnableRequests(roleBindingObject client.Obj var requests []reconcile.Request for _, serviceAccount := range serviceAccounts { - requests = append(requests, mapper.ServiceAccountToRunnableRequests(serviceAccount)...) + requests = append(requests, mapper.ServiceAccountToRunnableRequests(ctx, serviceAccount)...) } return requests } -func (mapper *Mapper) ClusterRoleBindingToRunnableRequests(clusterRoleBindingObject client.Object) []reconcile.Request { +func (mapper *Mapper) ClusterRoleBindingToRunnableRequests(ctx context.Context, clusterRoleBindingObject client.Object) []reconcile.Request { clusterRoleBinding, ok := clusterRoleBindingObject.(*rbacv1.ClusterRoleBinding) if !ok { mapper.Logger.Error(nil, "cluster role binding to runnable requests: cast to ClusterRoleBinding failed") @@ -387,13 +387,13 @@ func (mapper *Mapper) ClusterRoleBindingToRunnableRequests(clusterRoleBindingObj var requests []reconcile.Request for _, serviceAccount := range serviceAccounts { - requests = append(requests, mapper.ServiceAccountToRunnableRequests(serviceAccount)...) + requests = append(requests, mapper.ServiceAccountToRunnableRequests(ctx, serviceAccount)...) } return requests } -func (mapper *Mapper) RoleToRunnableRequests(roleObject client.Object) []reconcile.Request { +func (mapper *Mapper) RoleToRunnableRequests(ctx context.Context, roleObject client.Object) []reconcile.Request { role, ok := roleObject.(*rbacv1.Role) if !ok { mapper.Logger.Error(nil, "role to runnable requests: cast to Role failed") @@ -411,14 +411,14 @@ func (mapper *Mapper) RoleToRunnableRequests(roleObject client.Object) []reconci var requests []reconcile.Request for _, roleBinding := range list.Items { if roleBinding.RoleRef.APIGroup == "" && roleBinding.RoleRef.Kind == "Role" && roleBinding.RoleRef.Name == role.Name { - requests = append(requests, mapper.RoleBindingToRunnableRequests(&roleBinding)...) + requests = append(requests, mapper.RoleBindingToRunnableRequests(ctx, &roleBinding)...) } } return requests } -func (mapper *Mapper) ClusterRoleToRunnableRequests(clusterRoleObject client.Object) []reconcile.Request { +func (mapper *Mapper) ClusterRoleToRunnableRequests(ctx context.Context, clusterRoleObject client.Object) []reconcile.Request { clusterRole, ok := clusterRoleObject.(*rbacv1.ClusterRole) if !ok { mapper.Logger.Error(nil, "cluster role to runnable requests: cast to ClusterRole failed") @@ -437,7 +437,7 @@ func (mapper *Mapper) ClusterRoleToRunnableRequests(clusterRoleObject client.Obj for _, clusterRoleBinding := range clusterRoleBindingList.Items { if clusterRoleBinding.RoleRef.APIGroup == "" && clusterRoleBinding.RoleRef.Kind == "ClusterRole" && clusterRoleBinding.RoleRef.Name == clusterRole.Name { - requests = append(requests, mapper.ClusterRoleBindingToRunnableRequests(&clusterRoleBinding)...) + requests = append(requests, mapper.ClusterRoleBindingToRunnableRequests(ctx, &clusterRoleBinding)...) } } @@ -451,7 +451,7 @@ func (mapper *Mapper) ClusterRoleToRunnableRequests(clusterRoleObject client.Obj for _, roleBinding := range roleBindingList.Items { if roleBinding.RoleRef.APIGroup == "" && roleBinding.RoleRef.Kind == "ClusterRole" && roleBinding.RoleRef.Name == clusterRole.Name { - requests = append(requests, mapper.RoleBindingToRunnableRequests(&roleBinding)...) + requests = append(requests, mapper.RoleBindingToRunnableRequests(ctx, &roleBinding)...) } } diff --git a/pkg/mapper/map_functions_test.go b/pkg/mapper/map_functions_test.go index b3841d6c0..f28bb2976 100644 --- a/pkg/mapper/map_functions_test.go +++ b/pkg/mapper/map_functions_test.go @@ -77,7 +77,7 @@ var _ = Describe("MapFunctions", func() { fakeClient.ListReturns(nil) }) It("returns an empty list of requests", func() { - result := m.ClusterSupplyChainToWorkloadRequests(supplyChain) + result := m.ClusterSupplyChainToWorkloadRequests(context.Background(), supplyChain) Expect(result).To(BeEmpty()) }) }) @@ -114,7 +114,7 @@ var _ = Describe("MapFunctions", func() { }, } - result := m.ClusterSupplyChainToWorkloadRequests(supplyChain) + result := m.ClusterSupplyChainToWorkloadRequests(context.Background(), supplyChain) Expect(result).To(Equal(expected)) }) }) @@ -124,7 +124,7 @@ var _ = Describe("MapFunctions", func() { fakeClient.ListReturns(fmt.Errorf("some-error")) }) It("logs an error to the client", func() { - result := m.ClusterSupplyChainToWorkloadRequests(supplyChain) + result := m.ClusterSupplyChainToWorkloadRequests(context.Background(), supplyChain) Expect(result).To(BeEmpty()) Expect(fakeLogger.ErrorCallCount()).To(Equal(1)) @@ -147,7 +147,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns an empty request list", func() { - reqs := m.ServiceAccountToWorkloadRequests(serviceAccount) + reqs := m.ServiceAccountToWorkloadRequests(context.Background(), serviceAccount) Expect(reqs).To(HaveLen(0)) }) @@ -177,7 +177,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns a request for the workload", func() { - reqs := m.ServiceAccountToWorkloadRequests(serviceAccount) + reqs := m.ServiceAccountToWorkloadRequests(context.Background(), serviceAccount) Expect(reqs).To(HaveLen(1)) Expect(reqs[0].Name).To(Equal("some-workload")) @@ -205,7 +205,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns an empty request list", func() { - reqs := m.RoleBindingToWorkloadRequests(roleBinding) + reqs := m.RoleBindingToWorkloadRequests(context.Background(), roleBinding) Expect(reqs).To(HaveLen(0)) }) @@ -230,7 +230,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns a request for the workload", func() { - reqs := m.RoleBindingToWorkloadRequests(roleBinding) + reqs := m.RoleBindingToWorkloadRequests(context.Background(), roleBinding) Expect(reqs).To(HaveLen(1)) Expect(reqs[0].Name).To(Equal("some-workload")) @@ -261,7 +261,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns an empty request list", func() { - reqs := m.ClusterRoleBindingToWorkloadRequests(clusterRoleBinding) + reqs := m.ClusterRoleBindingToWorkloadRequests(context.Background(), clusterRoleBinding) Expect(reqs).To(HaveLen(0)) }) @@ -286,7 +286,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns a request for the workload", func() { - reqs := m.ClusterRoleBindingToWorkloadRequests(clusterRoleBinding) + reqs := m.ClusterRoleBindingToWorkloadRequests(context.Background(), clusterRoleBinding) Expect(reqs).To(HaveLen(1)) Expect(reqs[0].Name).To(Equal("some-workload")) @@ -351,7 +351,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns a request for the workload", func() { - reqs := m.RoleToWorkloadRequests(role) + reqs := m.RoleToWorkloadRequests(context.Background(), role) Expect(reqs).To(HaveLen(1)) Expect(reqs[0].Name).To(Equal("some-workload")) @@ -370,7 +370,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns the error", func() { - reqs := m.RoleToWorkloadRequests(role) + reqs := m.RoleToWorkloadRequests(context.Background(), role) Expect(reqs).To(HaveLen(0)) Expect(fakeLogger.ErrorCallCount()).To(Equal(1)) @@ -444,7 +444,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns a request for the workload", func() { - reqs := m.ClusterRoleToWorkloadRequests(clusterRole) + reqs := m.ClusterRoleToWorkloadRequests(context.Background(), clusterRole) Expect(reqs).To(HaveLen(1)) Expect(reqs[0].Name).To(Equal("some-workload")) @@ -482,7 +482,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns a request for the workload", func() { - reqs := m.ClusterRoleToWorkloadRequests(clusterRole) + reqs := m.ClusterRoleToWorkloadRequests(context.Background(), clusterRole) Expect(reqs).To(HaveLen(1)) Expect(reqs[0].Name).To(Equal("some-workload")) @@ -501,7 +501,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns the error", func() { - reqs := m.ClusterRoleToWorkloadRequests(clusterRole) + reqs := m.ClusterRoleToWorkloadRequests(context.Background(), clusterRole) Expect(reqs).To(HaveLen(0)) Expect(fakeLogger.ErrorCallCount()).To(Equal(1)) @@ -526,7 +526,7 @@ var _ = Describe("MapFunctions", func() { fakeClient.ListReturns(nil) }) It("returns an empty list of requests", func() { - result := m.ClusterDeliveryToDeliverableRequests(delivery) + result := m.ClusterDeliveryToDeliverableRequests(context.Background(), delivery) Expect(result).To(BeEmpty()) }) }) @@ -563,7 +563,7 @@ var _ = Describe("MapFunctions", func() { }, } - result := m.ClusterDeliveryToDeliverableRequests(delivery) + result := m.ClusterDeliveryToDeliverableRequests(context.Background(), delivery) Expect(result).To(Equal(expected)) }) }) @@ -573,7 +573,7 @@ var _ = Describe("MapFunctions", func() { fakeClient.ListReturns(fmt.Errorf("some-error")) }) It("logs an error to the client", func() { - result := m.ClusterDeliveryToDeliverableRequests(delivery) + result := m.ClusterDeliveryToDeliverableRequests(context.Background(), delivery) Expect(result).To(BeEmpty()) Expect(fakeLogger.ErrorCallCount()).To(Equal(1)) @@ -596,7 +596,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns an empty request list", func() { - reqs := m.ServiceAccountToDeliverableRequests(serviceAccount) + reqs := m.ServiceAccountToDeliverableRequests(context.Background(), serviceAccount) Expect(reqs).To(HaveLen(0)) }) @@ -626,7 +626,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns a request for the deliverable", func() { - reqs := m.ServiceAccountToDeliverableRequests(serviceAccount) + reqs := m.ServiceAccountToDeliverableRequests(context.Background(), serviceAccount) Expect(reqs).To(HaveLen(1)) Expect(reqs[0].Name).To(Equal("some-deliverable")) @@ -654,7 +654,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns an empty request list", func() { - reqs := m.RoleBindingToDeliverableRequests(roleBinding) + reqs := m.RoleBindingToDeliverableRequests(context.Background(), roleBinding) Expect(reqs).To(HaveLen(0)) }) @@ -679,7 +679,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns a request for the deliverable", func() { - reqs := m.RoleBindingToDeliverableRequests(roleBinding) + reqs := m.RoleBindingToDeliverableRequests(context.Background(), roleBinding) Expect(reqs).To(HaveLen(1)) Expect(reqs[0].Name).To(Equal("some-deliverable")) @@ -710,7 +710,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns an empty request list", func() { - reqs := m.ClusterRoleBindingToDeliverableRequests(clusterRoleBinding) + reqs := m.ClusterRoleBindingToDeliverableRequests(context.Background(), clusterRoleBinding) Expect(reqs).To(HaveLen(0)) }) @@ -735,7 +735,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns a request for the deliverable", func() { - reqs := m.ClusterRoleBindingToDeliverableRequests(clusterRoleBinding) + reqs := m.ClusterRoleBindingToDeliverableRequests(context.Background(), clusterRoleBinding) Expect(reqs).To(HaveLen(1)) Expect(reqs[0].Name).To(Equal("some-deliverable")) @@ -800,7 +800,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns a request for the deliverable", func() { - reqs := m.RoleToDeliverableRequests(role) + reqs := m.RoleToDeliverableRequests(context.Background(), role) Expect(reqs).To(HaveLen(1)) Expect(reqs[0].Name).To(Equal("some-deliverable")) @@ -819,7 +819,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns the error", func() { - reqs := m.RoleToDeliverableRequests(role) + reqs := m.RoleToDeliverableRequests(context.Background(), role) Expect(reqs).To(HaveLen(0)) Expect(fakeLogger.ErrorCallCount()).To(Equal(1)) @@ -893,7 +893,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns a request for the deliverable", func() { - reqs := m.ClusterRoleToDeliverableRequests(clusterRole) + reqs := m.ClusterRoleToDeliverableRequests(context.Background(), clusterRole) Expect(reqs).To(HaveLen(1)) Expect(reqs[0].Name).To(Equal("some-deliverable")) @@ -931,7 +931,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns a request for the deliverable", func() { - reqs := m.ClusterRoleToDeliverableRequests(clusterRole) + reqs := m.ClusterRoleToDeliverableRequests(context.Background(), clusterRole) Expect(reqs).To(HaveLen(1)) Expect(reqs[0].Name).To(Equal("some-deliverable")) @@ -950,7 +950,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns the error", func() { - reqs := m.ClusterRoleToDeliverableRequests(clusterRole) + reqs := m.ClusterRoleToDeliverableRequests(context.Background(), clusterRole) Expect(reqs).To(HaveLen(0)) Expect(fakeLogger.ErrorCallCount()).To(Equal(1)) @@ -976,7 +976,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns an empty request list", func() { - reqs := m.ServiceAccountToRunnableRequests(serviceAccount) + reqs := m.ServiceAccountToRunnableRequests(context.Background(), serviceAccount) Expect(reqs).To(HaveLen(0)) }) @@ -1006,7 +1006,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns a request for the runnable", func() { - reqs := m.ServiceAccountToRunnableRequests(serviceAccount) + reqs := m.ServiceAccountToRunnableRequests(context.Background(), serviceAccount) Expect(reqs).To(HaveLen(1)) Expect(reqs[0].Name).To(Equal("some-runnable")) @@ -1034,7 +1034,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns an empty request list", func() { - reqs := m.RoleBindingToRunnableRequests(roleBinding) + reqs := m.RoleBindingToRunnableRequests(context.Background(), roleBinding) Expect(reqs).To(HaveLen(0)) }) @@ -1059,7 +1059,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns a request for the runnable", func() { - reqs := m.RoleBindingToRunnableRequests(roleBinding) + reqs := m.RoleBindingToRunnableRequests(context.Background(), roleBinding) Expect(reqs).To(HaveLen(1)) Expect(reqs[0].Name).To(Equal("some-runnable")) @@ -1090,7 +1090,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns an empty request list", func() { - reqs := m.ClusterRoleBindingToRunnableRequests(clusterRoleBinding) + reqs := m.ClusterRoleBindingToRunnableRequests(context.Background(), clusterRoleBinding) Expect(reqs).To(HaveLen(0)) }) @@ -1115,7 +1115,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns a request for the runnable", func() { - reqs := m.ClusterRoleBindingToRunnableRequests(clusterRoleBinding) + reqs := m.ClusterRoleBindingToRunnableRequests(context.Background(), clusterRoleBinding) Expect(reqs).To(HaveLen(1)) Expect(reqs[0].Name).To(Equal("some-runnable")) @@ -1180,7 +1180,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns a request for the runnable", func() { - reqs := m.RoleToRunnableRequests(role) + reqs := m.RoleToRunnableRequests(context.Background(), role) Expect(reqs).To(HaveLen(1)) Expect(reqs[0].Name).To(Equal("some-runnable")) @@ -1199,7 +1199,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns the error", func() { - reqs := m.RoleToRunnableRequests(role) + reqs := m.RoleToRunnableRequests(context.Background(), role) Expect(reqs).To(HaveLen(0)) Expect(fakeLogger.ErrorCallCount()).To(Equal(1)) @@ -1273,7 +1273,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns a request for the runnable", func() { - reqs := m.ClusterRoleToRunnableRequests(clusterRole) + reqs := m.ClusterRoleToRunnableRequests(context.Background(), clusterRole) Expect(reqs).To(HaveLen(1)) Expect(reqs[0].Name).To(Equal("some-runnable")) @@ -1311,7 +1311,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns a request for the runnable", func() { - reqs := m.ClusterRoleToRunnableRequests(clusterRole) + reqs := m.ClusterRoleToRunnableRequests(context.Background(), clusterRole) Expect(reqs).To(HaveLen(1)) Expect(reqs[0].Name).To(Equal("some-runnable")) @@ -1330,7 +1330,7 @@ var _ = Describe("MapFunctions", func() { }) It("returns the error", func() { - reqs := m.ClusterRoleToRunnableRequests(clusterRole) + reqs := m.ClusterRoleToRunnableRequests(context.Background(), clusterRole) Expect(reqs).To(HaveLen(0)) Expect(fakeLogger.ErrorCallCount()).To(Equal(1)) diff --git a/pkg/mapper/mapperfakes/fake_client.go b/pkg/mapper/mapperfakes/fake_client.go index f28956b54..7e6b03bd8 100644 --- a/pkg/mapper/mapperfakes/fake_client.go +++ b/pkg/mapper/mapperfakes/fake_client.go @@ -7,6 +7,7 @@ import ( "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -65,6 +66,32 @@ type FakeClient struct { getReturnsOnCall map[int]struct { result1 error } + GroupVersionKindForStub func(runtime.Object) (schema.GroupVersionKind, error) + groupVersionKindForMutex sync.RWMutex + groupVersionKindForArgsForCall []struct { + arg1 runtime.Object + } + groupVersionKindForReturns struct { + result1 schema.GroupVersionKind + result2 error + } + groupVersionKindForReturnsOnCall map[int]struct { + result1 schema.GroupVersionKind + result2 error + } + IsObjectNamespacedStub func(runtime.Object) (bool, error) + isObjectNamespacedMutex sync.RWMutex + isObjectNamespacedArgsForCall []struct { + arg1 runtime.Object + } + isObjectNamespacedReturns struct { + result1 bool + result2 error + } + isObjectNamespacedReturnsOnCall map[int]struct { + result1 bool + result2 error + } ListStub func(context.Context, client.ObjectList, ...client.ListOption) error listMutex sync.RWMutex listArgsForCall []struct { @@ -112,15 +139,26 @@ type FakeClient struct { schemeReturnsOnCall map[int]struct { result1 *runtime.Scheme } - StatusStub func() client.StatusWriter + StatusStub func() client.SubResourceWriter statusMutex sync.RWMutex statusArgsForCall []struct { } statusReturns struct { - result1 client.StatusWriter + result1 client.SubResourceWriter } statusReturnsOnCall map[int]struct { - result1 client.StatusWriter + result1 client.SubResourceWriter + } + SubResourceStub func(string) client.SubResourceClient + subResourceMutex sync.RWMutex + subResourceArgsForCall []struct { + arg1 string + } + subResourceReturns struct { + result1 client.SubResourceClient + } + subResourceReturnsOnCall map[int]struct { + result1 client.SubResourceClient } UpdateStub func(context.Context, client.Object, ...client.UpdateOption) error updateMutex sync.RWMutex @@ -392,6 +430,134 @@ func (fake *FakeClient) GetReturnsOnCall(i int, result1 error) { }{result1} } +func (fake *FakeClient) GroupVersionKindFor(arg1 runtime.Object) (schema.GroupVersionKind, error) { + fake.groupVersionKindForMutex.Lock() + ret, specificReturn := fake.groupVersionKindForReturnsOnCall[len(fake.groupVersionKindForArgsForCall)] + fake.groupVersionKindForArgsForCall = append(fake.groupVersionKindForArgsForCall, struct { + arg1 runtime.Object + }{arg1}) + stub := fake.GroupVersionKindForStub + fakeReturns := fake.groupVersionKindForReturns + fake.recordInvocation("GroupVersionKindFor", []interface{}{arg1}) + fake.groupVersionKindForMutex.Unlock() + if stub != nil { + return stub(arg1) + } + if specificReturn { + return ret.result1, ret.result2 + } + return fakeReturns.result1, fakeReturns.result2 +} + +func (fake *FakeClient) GroupVersionKindForCallCount() int { + fake.groupVersionKindForMutex.RLock() + defer fake.groupVersionKindForMutex.RUnlock() + return len(fake.groupVersionKindForArgsForCall) +} + +func (fake *FakeClient) GroupVersionKindForCalls(stub func(runtime.Object) (schema.GroupVersionKind, error)) { + fake.groupVersionKindForMutex.Lock() + defer fake.groupVersionKindForMutex.Unlock() + fake.GroupVersionKindForStub = stub +} + +func (fake *FakeClient) GroupVersionKindForArgsForCall(i int) runtime.Object { + fake.groupVersionKindForMutex.RLock() + defer fake.groupVersionKindForMutex.RUnlock() + argsForCall := fake.groupVersionKindForArgsForCall[i] + return argsForCall.arg1 +} + +func (fake *FakeClient) GroupVersionKindForReturns(result1 schema.GroupVersionKind, result2 error) { + fake.groupVersionKindForMutex.Lock() + defer fake.groupVersionKindForMutex.Unlock() + fake.GroupVersionKindForStub = nil + fake.groupVersionKindForReturns = struct { + result1 schema.GroupVersionKind + result2 error + }{result1, result2} +} + +func (fake *FakeClient) GroupVersionKindForReturnsOnCall(i int, result1 schema.GroupVersionKind, result2 error) { + fake.groupVersionKindForMutex.Lock() + defer fake.groupVersionKindForMutex.Unlock() + fake.GroupVersionKindForStub = nil + if fake.groupVersionKindForReturnsOnCall == nil { + fake.groupVersionKindForReturnsOnCall = make(map[int]struct { + result1 schema.GroupVersionKind + result2 error + }) + } + fake.groupVersionKindForReturnsOnCall[i] = struct { + result1 schema.GroupVersionKind + result2 error + }{result1, result2} +} + +func (fake *FakeClient) IsObjectNamespaced(arg1 runtime.Object) (bool, error) { + fake.isObjectNamespacedMutex.Lock() + ret, specificReturn := fake.isObjectNamespacedReturnsOnCall[len(fake.isObjectNamespacedArgsForCall)] + fake.isObjectNamespacedArgsForCall = append(fake.isObjectNamespacedArgsForCall, struct { + arg1 runtime.Object + }{arg1}) + stub := fake.IsObjectNamespacedStub + fakeReturns := fake.isObjectNamespacedReturns + fake.recordInvocation("IsObjectNamespaced", []interface{}{arg1}) + fake.isObjectNamespacedMutex.Unlock() + if stub != nil { + return stub(arg1) + } + if specificReturn { + return ret.result1, ret.result2 + } + return fakeReturns.result1, fakeReturns.result2 +} + +func (fake *FakeClient) IsObjectNamespacedCallCount() int { + fake.isObjectNamespacedMutex.RLock() + defer fake.isObjectNamespacedMutex.RUnlock() + return len(fake.isObjectNamespacedArgsForCall) +} + +func (fake *FakeClient) IsObjectNamespacedCalls(stub func(runtime.Object) (bool, error)) { + fake.isObjectNamespacedMutex.Lock() + defer fake.isObjectNamespacedMutex.Unlock() + fake.IsObjectNamespacedStub = stub +} + +func (fake *FakeClient) IsObjectNamespacedArgsForCall(i int) runtime.Object { + fake.isObjectNamespacedMutex.RLock() + defer fake.isObjectNamespacedMutex.RUnlock() + argsForCall := fake.isObjectNamespacedArgsForCall[i] + return argsForCall.arg1 +} + +func (fake *FakeClient) IsObjectNamespacedReturns(result1 bool, result2 error) { + fake.isObjectNamespacedMutex.Lock() + defer fake.isObjectNamespacedMutex.Unlock() + fake.IsObjectNamespacedStub = nil + fake.isObjectNamespacedReturns = struct { + result1 bool + result2 error + }{result1, result2} +} + +func (fake *FakeClient) IsObjectNamespacedReturnsOnCall(i int, result1 bool, result2 error) { + fake.isObjectNamespacedMutex.Lock() + defer fake.isObjectNamespacedMutex.Unlock() + fake.IsObjectNamespacedStub = nil + if fake.isObjectNamespacedReturnsOnCall == nil { + fake.isObjectNamespacedReturnsOnCall = make(map[int]struct { + result1 bool + result2 error + }) + } + fake.isObjectNamespacedReturnsOnCall[i] = struct { + result1 bool + result2 error + }{result1, result2} +} + func (fake *FakeClient) List(arg1 context.Context, arg2 client.ObjectList, arg3 ...client.ListOption) error { fake.listMutex.Lock() ret, specificReturn := fake.listReturnsOnCall[len(fake.listArgsForCall)] @@ -625,7 +791,7 @@ func (fake *FakeClient) SchemeReturnsOnCall(i int, result1 *runtime.Scheme) { }{result1} } -func (fake *FakeClient) Status() client.StatusWriter { +func (fake *FakeClient) Status() client.SubResourceWriter { fake.statusMutex.Lock() ret, specificReturn := fake.statusReturnsOnCall[len(fake.statusArgsForCall)] fake.statusArgsForCall = append(fake.statusArgsForCall, struct { @@ -649,32 +815,93 @@ func (fake *FakeClient) StatusCallCount() int { return len(fake.statusArgsForCall) } -func (fake *FakeClient) StatusCalls(stub func() client.StatusWriter) { +func (fake *FakeClient) StatusCalls(stub func() client.SubResourceWriter) { fake.statusMutex.Lock() defer fake.statusMutex.Unlock() fake.StatusStub = stub } -func (fake *FakeClient) StatusReturns(result1 client.StatusWriter) { +func (fake *FakeClient) StatusReturns(result1 client.SubResourceWriter) { fake.statusMutex.Lock() defer fake.statusMutex.Unlock() fake.StatusStub = nil fake.statusReturns = struct { - result1 client.StatusWriter + result1 client.SubResourceWriter }{result1} } -func (fake *FakeClient) StatusReturnsOnCall(i int, result1 client.StatusWriter) { +func (fake *FakeClient) StatusReturnsOnCall(i int, result1 client.SubResourceWriter) { fake.statusMutex.Lock() defer fake.statusMutex.Unlock() fake.StatusStub = nil if fake.statusReturnsOnCall == nil { fake.statusReturnsOnCall = make(map[int]struct { - result1 client.StatusWriter + result1 client.SubResourceWriter }) } fake.statusReturnsOnCall[i] = struct { - result1 client.StatusWriter + result1 client.SubResourceWriter + }{result1} +} + +func (fake *FakeClient) SubResource(arg1 string) client.SubResourceClient { + fake.subResourceMutex.Lock() + ret, specificReturn := fake.subResourceReturnsOnCall[len(fake.subResourceArgsForCall)] + fake.subResourceArgsForCall = append(fake.subResourceArgsForCall, struct { + arg1 string + }{arg1}) + stub := fake.SubResourceStub + fakeReturns := fake.subResourceReturns + fake.recordInvocation("SubResource", []interface{}{arg1}) + fake.subResourceMutex.Unlock() + if stub != nil { + return stub(arg1) + } + if specificReturn { + return ret.result1 + } + return fakeReturns.result1 +} + +func (fake *FakeClient) SubResourceCallCount() int { + fake.subResourceMutex.RLock() + defer fake.subResourceMutex.RUnlock() + return len(fake.subResourceArgsForCall) +} + +func (fake *FakeClient) SubResourceCalls(stub func(string) client.SubResourceClient) { + fake.subResourceMutex.Lock() + defer fake.subResourceMutex.Unlock() + fake.SubResourceStub = stub +} + +func (fake *FakeClient) SubResourceArgsForCall(i int) string { + fake.subResourceMutex.RLock() + defer fake.subResourceMutex.RUnlock() + argsForCall := fake.subResourceArgsForCall[i] + return argsForCall.arg1 +} + +func (fake *FakeClient) SubResourceReturns(result1 client.SubResourceClient) { + fake.subResourceMutex.Lock() + defer fake.subResourceMutex.Unlock() + fake.SubResourceStub = nil + fake.subResourceReturns = struct { + result1 client.SubResourceClient + }{result1} +} + +func (fake *FakeClient) SubResourceReturnsOnCall(i int, result1 client.SubResourceClient) { + fake.subResourceMutex.Lock() + defer fake.subResourceMutex.Unlock() + fake.SubResourceStub = nil + if fake.subResourceReturnsOnCall == nil { + fake.subResourceReturnsOnCall = make(map[int]struct { + result1 client.SubResourceClient + }) + } + fake.subResourceReturnsOnCall[i] = struct { + result1 client.SubResourceClient }{result1} } @@ -752,6 +979,10 @@ func (fake *FakeClient) Invocations() map[string][][]interface{} { defer fake.deleteAllOfMutex.RUnlock() fake.getMutex.RLock() defer fake.getMutex.RUnlock() + fake.groupVersionKindForMutex.RLock() + defer fake.groupVersionKindForMutex.RUnlock() + fake.isObjectNamespacedMutex.RLock() + defer fake.isObjectNamespacedMutex.RUnlock() fake.listMutex.RLock() defer fake.listMutex.RUnlock() fake.patchMutex.RLock() @@ -762,6 +993,8 @@ func (fake *FakeClient) Invocations() map[string][][]interface{} { defer fake.schemeMutex.RUnlock() fake.statusMutex.RLock() defer fake.statusMutex.RUnlock() + fake.subResourceMutex.RLock() + defer fake.subResourceMutex.RUnlock() fake.updateMutex.RLock() defer fake.updateMutex.RUnlock() copiedInvocations := map[string][][]interface{}{} diff --git a/pkg/realizer/realizerfakes/fake_client.go b/pkg/realizer/realizerfakes/fake_client.go index a537353ab..74c71908e 100644 --- a/pkg/realizer/realizerfakes/fake_client.go +++ b/pkg/realizer/realizerfakes/fake_client.go @@ -7,6 +7,7 @@ import ( "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -65,6 +66,32 @@ type FakeClient struct { getReturnsOnCall map[int]struct { result1 error } + GroupVersionKindForStub func(runtime.Object) (schema.GroupVersionKind, error) + groupVersionKindForMutex sync.RWMutex + groupVersionKindForArgsForCall []struct { + arg1 runtime.Object + } + groupVersionKindForReturns struct { + result1 schema.GroupVersionKind + result2 error + } + groupVersionKindForReturnsOnCall map[int]struct { + result1 schema.GroupVersionKind + result2 error + } + IsObjectNamespacedStub func(runtime.Object) (bool, error) + isObjectNamespacedMutex sync.RWMutex + isObjectNamespacedArgsForCall []struct { + arg1 runtime.Object + } + isObjectNamespacedReturns struct { + result1 bool + result2 error + } + isObjectNamespacedReturnsOnCall map[int]struct { + result1 bool + result2 error + } ListStub func(context.Context, client.ObjectList, ...client.ListOption) error listMutex sync.RWMutex listArgsForCall []struct { @@ -112,15 +139,26 @@ type FakeClient struct { schemeReturnsOnCall map[int]struct { result1 *runtime.Scheme } - StatusStub func() client.StatusWriter + StatusStub func() client.SubResourceWriter statusMutex sync.RWMutex statusArgsForCall []struct { } statusReturns struct { - result1 client.StatusWriter + result1 client.SubResourceWriter } statusReturnsOnCall map[int]struct { - result1 client.StatusWriter + result1 client.SubResourceWriter + } + SubResourceStub func(string) client.SubResourceClient + subResourceMutex sync.RWMutex + subResourceArgsForCall []struct { + arg1 string + } + subResourceReturns struct { + result1 client.SubResourceClient + } + subResourceReturnsOnCall map[int]struct { + result1 client.SubResourceClient } UpdateStub func(context.Context, client.Object, ...client.UpdateOption) error updateMutex sync.RWMutex @@ -392,6 +430,134 @@ func (fake *FakeClient) GetReturnsOnCall(i int, result1 error) { }{result1} } +func (fake *FakeClient) GroupVersionKindFor(arg1 runtime.Object) (schema.GroupVersionKind, error) { + fake.groupVersionKindForMutex.Lock() + ret, specificReturn := fake.groupVersionKindForReturnsOnCall[len(fake.groupVersionKindForArgsForCall)] + fake.groupVersionKindForArgsForCall = append(fake.groupVersionKindForArgsForCall, struct { + arg1 runtime.Object + }{arg1}) + stub := fake.GroupVersionKindForStub + fakeReturns := fake.groupVersionKindForReturns + fake.recordInvocation("GroupVersionKindFor", []interface{}{arg1}) + fake.groupVersionKindForMutex.Unlock() + if stub != nil { + return stub(arg1) + } + if specificReturn { + return ret.result1, ret.result2 + } + return fakeReturns.result1, fakeReturns.result2 +} + +func (fake *FakeClient) GroupVersionKindForCallCount() int { + fake.groupVersionKindForMutex.RLock() + defer fake.groupVersionKindForMutex.RUnlock() + return len(fake.groupVersionKindForArgsForCall) +} + +func (fake *FakeClient) GroupVersionKindForCalls(stub func(runtime.Object) (schema.GroupVersionKind, error)) { + fake.groupVersionKindForMutex.Lock() + defer fake.groupVersionKindForMutex.Unlock() + fake.GroupVersionKindForStub = stub +} + +func (fake *FakeClient) GroupVersionKindForArgsForCall(i int) runtime.Object { + fake.groupVersionKindForMutex.RLock() + defer fake.groupVersionKindForMutex.RUnlock() + argsForCall := fake.groupVersionKindForArgsForCall[i] + return argsForCall.arg1 +} + +func (fake *FakeClient) GroupVersionKindForReturns(result1 schema.GroupVersionKind, result2 error) { + fake.groupVersionKindForMutex.Lock() + defer fake.groupVersionKindForMutex.Unlock() + fake.GroupVersionKindForStub = nil + fake.groupVersionKindForReturns = struct { + result1 schema.GroupVersionKind + result2 error + }{result1, result2} +} + +func (fake *FakeClient) GroupVersionKindForReturnsOnCall(i int, result1 schema.GroupVersionKind, result2 error) { + fake.groupVersionKindForMutex.Lock() + defer fake.groupVersionKindForMutex.Unlock() + fake.GroupVersionKindForStub = nil + if fake.groupVersionKindForReturnsOnCall == nil { + fake.groupVersionKindForReturnsOnCall = make(map[int]struct { + result1 schema.GroupVersionKind + result2 error + }) + } + fake.groupVersionKindForReturnsOnCall[i] = struct { + result1 schema.GroupVersionKind + result2 error + }{result1, result2} +} + +func (fake *FakeClient) IsObjectNamespaced(arg1 runtime.Object) (bool, error) { + fake.isObjectNamespacedMutex.Lock() + ret, specificReturn := fake.isObjectNamespacedReturnsOnCall[len(fake.isObjectNamespacedArgsForCall)] + fake.isObjectNamespacedArgsForCall = append(fake.isObjectNamespacedArgsForCall, struct { + arg1 runtime.Object + }{arg1}) + stub := fake.IsObjectNamespacedStub + fakeReturns := fake.isObjectNamespacedReturns + fake.recordInvocation("IsObjectNamespaced", []interface{}{arg1}) + fake.isObjectNamespacedMutex.Unlock() + if stub != nil { + return stub(arg1) + } + if specificReturn { + return ret.result1, ret.result2 + } + return fakeReturns.result1, fakeReturns.result2 +} + +func (fake *FakeClient) IsObjectNamespacedCallCount() int { + fake.isObjectNamespacedMutex.RLock() + defer fake.isObjectNamespacedMutex.RUnlock() + return len(fake.isObjectNamespacedArgsForCall) +} + +func (fake *FakeClient) IsObjectNamespacedCalls(stub func(runtime.Object) (bool, error)) { + fake.isObjectNamespacedMutex.Lock() + defer fake.isObjectNamespacedMutex.Unlock() + fake.IsObjectNamespacedStub = stub +} + +func (fake *FakeClient) IsObjectNamespacedArgsForCall(i int) runtime.Object { + fake.isObjectNamespacedMutex.RLock() + defer fake.isObjectNamespacedMutex.RUnlock() + argsForCall := fake.isObjectNamespacedArgsForCall[i] + return argsForCall.arg1 +} + +func (fake *FakeClient) IsObjectNamespacedReturns(result1 bool, result2 error) { + fake.isObjectNamespacedMutex.Lock() + defer fake.isObjectNamespacedMutex.Unlock() + fake.IsObjectNamespacedStub = nil + fake.isObjectNamespacedReturns = struct { + result1 bool + result2 error + }{result1, result2} +} + +func (fake *FakeClient) IsObjectNamespacedReturnsOnCall(i int, result1 bool, result2 error) { + fake.isObjectNamespacedMutex.Lock() + defer fake.isObjectNamespacedMutex.Unlock() + fake.IsObjectNamespacedStub = nil + if fake.isObjectNamespacedReturnsOnCall == nil { + fake.isObjectNamespacedReturnsOnCall = make(map[int]struct { + result1 bool + result2 error + }) + } + fake.isObjectNamespacedReturnsOnCall[i] = struct { + result1 bool + result2 error + }{result1, result2} +} + func (fake *FakeClient) List(arg1 context.Context, arg2 client.ObjectList, arg3 ...client.ListOption) error { fake.listMutex.Lock() ret, specificReturn := fake.listReturnsOnCall[len(fake.listArgsForCall)] @@ -625,7 +791,7 @@ func (fake *FakeClient) SchemeReturnsOnCall(i int, result1 *runtime.Scheme) { }{result1} } -func (fake *FakeClient) Status() client.StatusWriter { +func (fake *FakeClient) Status() client.SubResourceWriter { fake.statusMutex.Lock() ret, specificReturn := fake.statusReturnsOnCall[len(fake.statusArgsForCall)] fake.statusArgsForCall = append(fake.statusArgsForCall, struct { @@ -649,32 +815,93 @@ func (fake *FakeClient) StatusCallCount() int { return len(fake.statusArgsForCall) } -func (fake *FakeClient) StatusCalls(stub func() client.StatusWriter) { +func (fake *FakeClient) StatusCalls(stub func() client.SubResourceWriter) { fake.statusMutex.Lock() defer fake.statusMutex.Unlock() fake.StatusStub = stub } -func (fake *FakeClient) StatusReturns(result1 client.StatusWriter) { +func (fake *FakeClient) StatusReturns(result1 client.SubResourceWriter) { fake.statusMutex.Lock() defer fake.statusMutex.Unlock() fake.StatusStub = nil fake.statusReturns = struct { - result1 client.StatusWriter + result1 client.SubResourceWriter }{result1} } -func (fake *FakeClient) StatusReturnsOnCall(i int, result1 client.StatusWriter) { +func (fake *FakeClient) StatusReturnsOnCall(i int, result1 client.SubResourceWriter) { fake.statusMutex.Lock() defer fake.statusMutex.Unlock() fake.StatusStub = nil if fake.statusReturnsOnCall == nil { fake.statusReturnsOnCall = make(map[int]struct { - result1 client.StatusWriter + result1 client.SubResourceWriter }) } fake.statusReturnsOnCall[i] = struct { - result1 client.StatusWriter + result1 client.SubResourceWriter + }{result1} +} + +func (fake *FakeClient) SubResource(arg1 string) client.SubResourceClient { + fake.subResourceMutex.Lock() + ret, specificReturn := fake.subResourceReturnsOnCall[len(fake.subResourceArgsForCall)] + fake.subResourceArgsForCall = append(fake.subResourceArgsForCall, struct { + arg1 string + }{arg1}) + stub := fake.SubResourceStub + fakeReturns := fake.subResourceReturns + fake.recordInvocation("SubResource", []interface{}{arg1}) + fake.subResourceMutex.Unlock() + if stub != nil { + return stub(arg1) + } + if specificReturn { + return ret.result1 + } + return fakeReturns.result1 +} + +func (fake *FakeClient) SubResourceCallCount() int { + fake.subResourceMutex.RLock() + defer fake.subResourceMutex.RUnlock() + return len(fake.subResourceArgsForCall) +} + +func (fake *FakeClient) SubResourceCalls(stub func(string) client.SubResourceClient) { + fake.subResourceMutex.Lock() + defer fake.subResourceMutex.Unlock() + fake.SubResourceStub = stub +} + +func (fake *FakeClient) SubResourceArgsForCall(i int) string { + fake.subResourceMutex.RLock() + defer fake.subResourceMutex.RUnlock() + argsForCall := fake.subResourceArgsForCall[i] + return argsForCall.arg1 +} + +func (fake *FakeClient) SubResourceReturns(result1 client.SubResourceClient) { + fake.subResourceMutex.Lock() + defer fake.subResourceMutex.Unlock() + fake.SubResourceStub = nil + fake.subResourceReturns = struct { + result1 client.SubResourceClient + }{result1} +} + +func (fake *FakeClient) SubResourceReturnsOnCall(i int, result1 client.SubResourceClient) { + fake.subResourceMutex.Lock() + defer fake.subResourceMutex.Unlock() + fake.SubResourceStub = nil + if fake.subResourceReturnsOnCall == nil { + fake.subResourceReturnsOnCall = make(map[int]struct { + result1 client.SubResourceClient + }) + } + fake.subResourceReturnsOnCall[i] = struct { + result1 client.SubResourceClient }{result1} } @@ -752,6 +979,10 @@ func (fake *FakeClient) Invocations() map[string][][]interface{} { defer fake.deleteAllOfMutex.RUnlock() fake.getMutex.RLock() defer fake.getMutex.RUnlock() + fake.groupVersionKindForMutex.RLock() + defer fake.groupVersionKindForMutex.RUnlock() + fake.isObjectNamespacedMutex.RLock() + defer fake.isObjectNamespacedMutex.RUnlock() fake.listMutex.RLock() defer fake.listMutex.RUnlock() fake.patchMutex.RLock() @@ -762,6 +993,8 @@ func (fake *FakeClient) Invocations() map[string][][]interface{} { defer fake.schemeMutex.RUnlock() fake.statusMutex.RLock() defer fake.statusMutex.RUnlock() + fake.subResourceMutex.RLock() + defer fake.subResourceMutex.RUnlock() fake.updateMutex.RLock() defer fake.updateMutex.RUnlock() copiedInvocations := map[string][][]interface{}{} diff --git a/pkg/realizer/runnable/runnablefakes/fake_discovery_interface.go b/pkg/realizer/runnable/runnablefakes/fake_discovery_interface.go index 4aafacbf3..cb9a1c062 100644 --- a/pkg/realizer/runnable/runnablefakes/fake_discovery_interface.go +++ b/pkg/realizer/runnable/runnablefakes/fake_discovery_interface.go @@ -4,7 +4,7 @@ package runnablefakes import ( "sync" - openapi_v2 "github.com/google/gnostic/openapiv2" + openapi_v2 "github.com/google/gnostic-models/openapiv2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/version" "k8s.io/client-go/discovery" @@ -120,6 +120,16 @@ type FakeDiscoveryInterface struct { result1 *version.Info result2 error } + WithLegacyStub func() discovery.DiscoveryInterface + withLegacyMutex sync.RWMutex + withLegacyArgsForCall []struct { + } + withLegacyReturns struct { + result1 discovery.DiscoveryInterface + } + withLegacyReturnsOnCall map[int]struct { + result1 discovery.DiscoveryInterface + } invocations map[string][][]interface{} invocationsMutex sync.RWMutex } @@ -633,6 +643,59 @@ func (fake *FakeDiscoveryInterface) ServerVersionReturnsOnCall(i int, result1 *v }{result1, result2} } +func (fake *FakeDiscoveryInterface) WithLegacy() discovery.DiscoveryInterface { + fake.withLegacyMutex.Lock() + ret, specificReturn := fake.withLegacyReturnsOnCall[len(fake.withLegacyArgsForCall)] + fake.withLegacyArgsForCall = append(fake.withLegacyArgsForCall, struct { + }{}) + stub := fake.WithLegacyStub + fakeReturns := fake.withLegacyReturns + fake.recordInvocation("WithLegacy", []interface{}{}) + fake.withLegacyMutex.Unlock() + if stub != nil { + return stub() + } + if specificReturn { + return ret.result1 + } + return fakeReturns.result1 +} + +func (fake *FakeDiscoveryInterface) WithLegacyCallCount() int { + fake.withLegacyMutex.RLock() + defer fake.withLegacyMutex.RUnlock() + return len(fake.withLegacyArgsForCall) +} + +func (fake *FakeDiscoveryInterface) WithLegacyCalls(stub func() discovery.DiscoveryInterface) { + fake.withLegacyMutex.Lock() + defer fake.withLegacyMutex.Unlock() + fake.WithLegacyStub = stub +} + +func (fake *FakeDiscoveryInterface) WithLegacyReturns(result1 discovery.DiscoveryInterface) { + fake.withLegacyMutex.Lock() + defer fake.withLegacyMutex.Unlock() + fake.WithLegacyStub = nil + fake.withLegacyReturns = struct { + result1 discovery.DiscoveryInterface + }{result1} +} + +func (fake *FakeDiscoveryInterface) WithLegacyReturnsOnCall(i int, result1 discovery.DiscoveryInterface) { + fake.withLegacyMutex.Lock() + defer fake.withLegacyMutex.Unlock() + fake.WithLegacyStub = nil + if fake.withLegacyReturnsOnCall == nil { + fake.withLegacyReturnsOnCall = make(map[int]struct { + result1 discovery.DiscoveryInterface + }) + } + fake.withLegacyReturnsOnCall[i] = struct { + result1 discovery.DiscoveryInterface + }{result1} +} + func (fake *FakeDiscoveryInterface) Invocations() map[string][][]interface{} { fake.invocationsMutex.RLock() defer fake.invocationsMutex.RUnlock() @@ -654,6 +717,8 @@ func (fake *FakeDiscoveryInterface) Invocations() map[string][][]interface{} { defer fake.serverResourcesForGroupVersionMutex.RUnlock() fake.serverVersionMutex.RLock() defer fake.serverVersionMutex.RUnlock() + fake.withLegacyMutex.RLock() + defer fake.withLegacyMutex.RUnlock() copiedInvocations := map[string][][]interface{}{} for key, value := range fake.invocations { copiedInvocations[key] = value diff --git a/pkg/repository/repository.go b/pkg/repository/repository.go index ce6a84b62..d1e8b049d 100644 --- a/pkg/repository/repository.go +++ b/pkg/repository/repository.go @@ -23,6 +23,7 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" kerrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" @@ -55,6 +56,7 @@ type Repository interface { ListUnstructured(ctx context.Context, gvk schema.GroupVersionKind, namespace string, labels map[string]string) ([]*unstructured.Unstructured, error) GetDelivery(ctx context.Context, name string) (*v1alpha1.ClusterDelivery, error) GetScheme() *runtime.Scheme + GetRESTMapper() meta.RESTMapper GetServiceAccount(ctx context.Context, serviceAccountName, ns string) (*corev1.ServiceAccount, error) Delete(ctx context.Context, objToDelete *unstructured.Unstructured) error } @@ -500,6 +502,10 @@ func (r *repository) GetScheme() *runtime.Scheme { return r.cl.Scheme() } +func (r *repository) GetRESTMapper() meta.RESTMapper { + return r.cl.RESTMapper() +} + func buildOwnerDiscriminant(labels map[string]string) string { var discriminantComponents []string diff --git a/pkg/repository/repositoryfakes/fake_client.go b/pkg/repository/repositoryfakes/fake_client.go index 7ba1e30eb..8c0292468 100644 --- a/pkg/repository/repositoryfakes/fake_client.go +++ b/pkg/repository/repositoryfakes/fake_client.go @@ -7,6 +7,7 @@ import ( "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -65,6 +66,32 @@ type FakeClient struct { getReturnsOnCall map[int]struct { result1 error } + GroupVersionKindForStub func(runtime.Object) (schema.GroupVersionKind, error) + groupVersionKindForMutex sync.RWMutex + groupVersionKindForArgsForCall []struct { + arg1 runtime.Object + } + groupVersionKindForReturns struct { + result1 schema.GroupVersionKind + result2 error + } + groupVersionKindForReturnsOnCall map[int]struct { + result1 schema.GroupVersionKind + result2 error + } + IsObjectNamespacedStub func(runtime.Object) (bool, error) + isObjectNamespacedMutex sync.RWMutex + isObjectNamespacedArgsForCall []struct { + arg1 runtime.Object + } + isObjectNamespacedReturns struct { + result1 bool + result2 error + } + isObjectNamespacedReturnsOnCall map[int]struct { + result1 bool + result2 error + } ListStub func(context.Context, client.ObjectList, ...client.ListOption) error listMutex sync.RWMutex listArgsForCall []struct { @@ -112,15 +139,26 @@ type FakeClient struct { schemeReturnsOnCall map[int]struct { result1 *runtime.Scheme } - StatusStub func() client.StatusWriter + StatusStub func() client.SubResourceWriter statusMutex sync.RWMutex statusArgsForCall []struct { } statusReturns struct { - result1 client.StatusWriter + result1 client.SubResourceWriter } statusReturnsOnCall map[int]struct { - result1 client.StatusWriter + result1 client.SubResourceWriter + } + SubResourceStub func(string) client.SubResourceClient + subResourceMutex sync.RWMutex + subResourceArgsForCall []struct { + arg1 string + } + subResourceReturns struct { + result1 client.SubResourceClient + } + subResourceReturnsOnCall map[int]struct { + result1 client.SubResourceClient } UpdateStub func(context.Context, client.Object, ...client.UpdateOption) error updateMutex sync.RWMutex @@ -392,6 +430,134 @@ func (fake *FakeClient) GetReturnsOnCall(i int, result1 error) { }{result1} } +func (fake *FakeClient) GroupVersionKindFor(arg1 runtime.Object) (schema.GroupVersionKind, error) { + fake.groupVersionKindForMutex.Lock() + ret, specificReturn := fake.groupVersionKindForReturnsOnCall[len(fake.groupVersionKindForArgsForCall)] + fake.groupVersionKindForArgsForCall = append(fake.groupVersionKindForArgsForCall, struct { + arg1 runtime.Object + }{arg1}) + stub := fake.GroupVersionKindForStub + fakeReturns := fake.groupVersionKindForReturns + fake.recordInvocation("GroupVersionKindFor", []interface{}{arg1}) + fake.groupVersionKindForMutex.Unlock() + if stub != nil { + return stub(arg1) + } + if specificReturn { + return ret.result1, ret.result2 + } + return fakeReturns.result1, fakeReturns.result2 +} + +func (fake *FakeClient) GroupVersionKindForCallCount() int { + fake.groupVersionKindForMutex.RLock() + defer fake.groupVersionKindForMutex.RUnlock() + return len(fake.groupVersionKindForArgsForCall) +} + +func (fake *FakeClient) GroupVersionKindForCalls(stub func(runtime.Object) (schema.GroupVersionKind, error)) { + fake.groupVersionKindForMutex.Lock() + defer fake.groupVersionKindForMutex.Unlock() + fake.GroupVersionKindForStub = stub +} + +func (fake *FakeClient) GroupVersionKindForArgsForCall(i int) runtime.Object { + fake.groupVersionKindForMutex.RLock() + defer fake.groupVersionKindForMutex.RUnlock() + argsForCall := fake.groupVersionKindForArgsForCall[i] + return argsForCall.arg1 +} + +func (fake *FakeClient) GroupVersionKindForReturns(result1 schema.GroupVersionKind, result2 error) { + fake.groupVersionKindForMutex.Lock() + defer fake.groupVersionKindForMutex.Unlock() + fake.GroupVersionKindForStub = nil + fake.groupVersionKindForReturns = struct { + result1 schema.GroupVersionKind + result2 error + }{result1, result2} +} + +func (fake *FakeClient) GroupVersionKindForReturnsOnCall(i int, result1 schema.GroupVersionKind, result2 error) { + fake.groupVersionKindForMutex.Lock() + defer fake.groupVersionKindForMutex.Unlock() + fake.GroupVersionKindForStub = nil + if fake.groupVersionKindForReturnsOnCall == nil { + fake.groupVersionKindForReturnsOnCall = make(map[int]struct { + result1 schema.GroupVersionKind + result2 error + }) + } + fake.groupVersionKindForReturnsOnCall[i] = struct { + result1 schema.GroupVersionKind + result2 error + }{result1, result2} +} + +func (fake *FakeClient) IsObjectNamespaced(arg1 runtime.Object) (bool, error) { + fake.isObjectNamespacedMutex.Lock() + ret, specificReturn := fake.isObjectNamespacedReturnsOnCall[len(fake.isObjectNamespacedArgsForCall)] + fake.isObjectNamespacedArgsForCall = append(fake.isObjectNamespacedArgsForCall, struct { + arg1 runtime.Object + }{arg1}) + stub := fake.IsObjectNamespacedStub + fakeReturns := fake.isObjectNamespacedReturns + fake.recordInvocation("IsObjectNamespaced", []interface{}{arg1}) + fake.isObjectNamespacedMutex.Unlock() + if stub != nil { + return stub(arg1) + } + if specificReturn { + return ret.result1, ret.result2 + } + return fakeReturns.result1, fakeReturns.result2 +} + +func (fake *FakeClient) IsObjectNamespacedCallCount() int { + fake.isObjectNamespacedMutex.RLock() + defer fake.isObjectNamespacedMutex.RUnlock() + return len(fake.isObjectNamespacedArgsForCall) +} + +func (fake *FakeClient) IsObjectNamespacedCalls(stub func(runtime.Object) (bool, error)) { + fake.isObjectNamespacedMutex.Lock() + defer fake.isObjectNamespacedMutex.Unlock() + fake.IsObjectNamespacedStub = stub +} + +func (fake *FakeClient) IsObjectNamespacedArgsForCall(i int) runtime.Object { + fake.isObjectNamespacedMutex.RLock() + defer fake.isObjectNamespacedMutex.RUnlock() + argsForCall := fake.isObjectNamespacedArgsForCall[i] + return argsForCall.arg1 +} + +func (fake *FakeClient) IsObjectNamespacedReturns(result1 bool, result2 error) { + fake.isObjectNamespacedMutex.Lock() + defer fake.isObjectNamespacedMutex.Unlock() + fake.IsObjectNamespacedStub = nil + fake.isObjectNamespacedReturns = struct { + result1 bool + result2 error + }{result1, result2} +} + +func (fake *FakeClient) IsObjectNamespacedReturnsOnCall(i int, result1 bool, result2 error) { + fake.isObjectNamespacedMutex.Lock() + defer fake.isObjectNamespacedMutex.Unlock() + fake.IsObjectNamespacedStub = nil + if fake.isObjectNamespacedReturnsOnCall == nil { + fake.isObjectNamespacedReturnsOnCall = make(map[int]struct { + result1 bool + result2 error + }) + } + fake.isObjectNamespacedReturnsOnCall[i] = struct { + result1 bool + result2 error + }{result1, result2} +} + func (fake *FakeClient) List(arg1 context.Context, arg2 client.ObjectList, arg3 ...client.ListOption) error { fake.listMutex.Lock() ret, specificReturn := fake.listReturnsOnCall[len(fake.listArgsForCall)] @@ -625,7 +791,7 @@ func (fake *FakeClient) SchemeReturnsOnCall(i int, result1 *runtime.Scheme) { }{result1} } -func (fake *FakeClient) Status() client.StatusWriter { +func (fake *FakeClient) Status() client.SubResourceWriter { fake.statusMutex.Lock() ret, specificReturn := fake.statusReturnsOnCall[len(fake.statusArgsForCall)] fake.statusArgsForCall = append(fake.statusArgsForCall, struct { @@ -649,32 +815,93 @@ func (fake *FakeClient) StatusCallCount() int { return len(fake.statusArgsForCall) } -func (fake *FakeClient) StatusCalls(stub func() client.StatusWriter) { +func (fake *FakeClient) StatusCalls(stub func() client.SubResourceWriter) { fake.statusMutex.Lock() defer fake.statusMutex.Unlock() fake.StatusStub = stub } -func (fake *FakeClient) StatusReturns(result1 client.StatusWriter) { +func (fake *FakeClient) StatusReturns(result1 client.SubResourceWriter) { fake.statusMutex.Lock() defer fake.statusMutex.Unlock() fake.StatusStub = nil fake.statusReturns = struct { - result1 client.StatusWriter + result1 client.SubResourceWriter }{result1} } -func (fake *FakeClient) StatusReturnsOnCall(i int, result1 client.StatusWriter) { +func (fake *FakeClient) StatusReturnsOnCall(i int, result1 client.SubResourceWriter) { fake.statusMutex.Lock() defer fake.statusMutex.Unlock() fake.StatusStub = nil if fake.statusReturnsOnCall == nil { fake.statusReturnsOnCall = make(map[int]struct { - result1 client.StatusWriter + result1 client.SubResourceWriter }) } fake.statusReturnsOnCall[i] = struct { - result1 client.StatusWriter + result1 client.SubResourceWriter + }{result1} +} + +func (fake *FakeClient) SubResource(arg1 string) client.SubResourceClient { + fake.subResourceMutex.Lock() + ret, specificReturn := fake.subResourceReturnsOnCall[len(fake.subResourceArgsForCall)] + fake.subResourceArgsForCall = append(fake.subResourceArgsForCall, struct { + arg1 string + }{arg1}) + stub := fake.SubResourceStub + fakeReturns := fake.subResourceReturns + fake.recordInvocation("SubResource", []interface{}{arg1}) + fake.subResourceMutex.Unlock() + if stub != nil { + return stub(arg1) + } + if specificReturn { + return ret.result1 + } + return fakeReturns.result1 +} + +func (fake *FakeClient) SubResourceCallCount() int { + fake.subResourceMutex.RLock() + defer fake.subResourceMutex.RUnlock() + return len(fake.subResourceArgsForCall) +} + +func (fake *FakeClient) SubResourceCalls(stub func(string) client.SubResourceClient) { + fake.subResourceMutex.Lock() + defer fake.subResourceMutex.Unlock() + fake.SubResourceStub = stub +} + +func (fake *FakeClient) SubResourceArgsForCall(i int) string { + fake.subResourceMutex.RLock() + defer fake.subResourceMutex.RUnlock() + argsForCall := fake.subResourceArgsForCall[i] + return argsForCall.arg1 +} + +func (fake *FakeClient) SubResourceReturns(result1 client.SubResourceClient) { + fake.subResourceMutex.Lock() + defer fake.subResourceMutex.Unlock() + fake.SubResourceStub = nil + fake.subResourceReturns = struct { + result1 client.SubResourceClient + }{result1} +} + +func (fake *FakeClient) SubResourceReturnsOnCall(i int, result1 client.SubResourceClient) { + fake.subResourceMutex.Lock() + defer fake.subResourceMutex.Unlock() + fake.SubResourceStub = nil + if fake.subResourceReturnsOnCall == nil { + fake.subResourceReturnsOnCall = make(map[int]struct { + result1 client.SubResourceClient + }) + } + fake.subResourceReturnsOnCall[i] = struct { + result1 client.SubResourceClient }{result1} } @@ -752,6 +979,10 @@ func (fake *FakeClient) Invocations() map[string][][]interface{} { defer fake.deleteAllOfMutex.RUnlock() fake.getMutex.RLock() defer fake.getMutex.RUnlock() + fake.groupVersionKindForMutex.RLock() + defer fake.groupVersionKindForMutex.RUnlock() + fake.isObjectNamespacedMutex.RLock() + defer fake.isObjectNamespacedMutex.RUnlock() fake.listMutex.RLock() defer fake.listMutex.RUnlock() fake.patchMutex.RLock() @@ -762,6 +993,8 @@ func (fake *FakeClient) Invocations() map[string][][]interface{} { defer fake.schemeMutex.RUnlock() fake.statusMutex.RLock() defer fake.statusMutex.RUnlock() + fake.subResourceMutex.RLock() + defer fake.subResourceMutex.RUnlock() fake.updateMutex.RLock() defer fake.updateMutex.RUnlock() copiedInvocations := map[string][][]interface{}{} diff --git a/pkg/repository/repositoryfakes/fake_repository.go b/pkg/repository/repositoryfakes/fake_repository.go index 7b09f1466..02cb28d4d 100644 --- a/pkg/repository/repositoryfakes/fake_repository.go +++ b/pkg/repository/repositoryfakes/fake_repository.go @@ -8,6 +8,7 @@ import ( "github.com/vmware-tanzu/cartographer/pkg/apis/v1alpha1" "github.com/vmware-tanzu/cartographer/pkg/repository" v1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" @@ -95,6 +96,16 @@ type FakeRepository struct { result1 *v1alpha1.ClusterDelivery result2 error } + GetRESTMapperStub func() meta.RESTMapper + getRESTMapperMutex sync.RWMutex + getRESTMapperArgsForCall []struct { + } + getRESTMapperReturns struct { + result1 meta.RESTMapper + } + getRESTMapperReturnsOnCall map[int]struct { + result1 meta.RESTMapper + } GetRunTemplateStub func(context.Context, v1alpha1.TemplateReference) (*v1alpha1.ClusterRunTemplate, error) getRunTemplateMutex sync.RWMutex getRunTemplateArgsForCall []struct { @@ -636,6 +647,59 @@ func (fake *FakeRepository) GetDeliveryReturnsOnCall(i int, result1 *v1alpha1.Cl }{result1, result2} } +func (fake *FakeRepository) GetRESTMapper() meta.RESTMapper { + fake.getRESTMapperMutex.Lock() + ret, specificReturn := fake.getRESTMapperReturnsOnCall[len(fake.getRESTMapperArgsForCall)] + fake.getRESTMapperArgsForCall = append(fake.getRESTMapperArgsForCall, struct { + }{}) + stub := fake.GetRESTMapperStub + fakeReturns := fake.getRESTMapperReturns + fake.recordInvocation("GetRESTMapper", []interface{}{}) + fake.getRESTMapperMutex.Unlock() + if stub != nil { + return stub() + } + if specificReturn { + return ret.result1 + } + return fakeReturns.result1 +} + +func (fake *FakeRepository) GetRESTMapperCallCount() int { + fake.getRESTMapperMutex.RLock() + defer fake.getRESTMapperMutex.RUnlock() + return len(fake.getRESTMapperArgsForCall) +} + +func (fake *FakeRepository) GetRESTMapperCalls(stub func() meta.RESTMapper) { + fake.getRESTMapperMutex.Lock() + defer fake.getRESTMapperMutex.Unlock() + fake.GetRESTMapperStub = stub +} + +func (fake *FakeRepository) GetRESTMapperReturns(result1 meta.RESTMapper) { + fake.getRESTMapperMutex.Lock() + defer fake.getRESTMapperMutex.Unlock() + fake.GetRESTMapperStub = nil + fake.getRESTMapperReturns = struct { + result1 meta.RESTMapper + }{result1} +} + +func (fake *FakeRepository) GetRESTMapperReturnsOnCall(i int, result1 meta.RESTMapper) { + fake.getRESTMapperMutex.Lock() + defer fake.getRESTMapperMutex.Unlock() + fake.GetRESTMapperStub = nil + if fake.getRESTMapperReturnsOnCall == nil { + fake.getRESTMapperReturnsOnCall = make(map[int]struct { + result1 meta.RESTMapper + }) + } + fake.getRESTMapperReturnsOnCall[i] = struct { + result1 meta.RESTMapper + }{result1} +} + func (fake *FakeRepository) GetRunTemplate(arg1 context.Context, arg2 v1alpha1.TemplateReference) (*v1alpha1.ClusterRunTemplate, error) { fake.getRunTemplateMutex.Lock() ret, specificReturn := fake.getRunTemplateReturnsOnCall[len(fake.getRunTemplateArgsForCall)] @@ -1357,6 +1421,8 @@ func (fake *FakeRepository) Invocations() map[string][][]interface{} { defer fake.getDeliveriesForDeliverableMutex.RUnlock() fake.getDeliveryMutex.RLock() defer fake.getDeliveryMutex.RUnlock() + fake.getRESTMapperMutex.RLock() + defer fake.getRESTMapperMutex.RUnlock() fake.getRunTemplateMutex.RLock() defer fake.getRunTemplateMutex.RUnlock() fake.getRunnableMutex.RLock() diff --git a/pkg/repository/selector_matcher_test.go b/pkg/repository/selector_matcher_test.go index 378926a7b..bbeff4d73 100644 --- a/pkg/repository/selector_matcher_test.go +++ b/pkg/repository/selector_matcher_test.go @@ -359,8 +359,7 @@ var _ = Describe("BestSelectorMatch", func() { It("returns an error", func() { _, err := repository.BestSelectorMatch(selectable{}, sel) Expect(err).To(MatchError(ContainSubstring("error handling selectors, selectorMatchExpressions or selectorMatchFields of [Special/my-selector]"))) - // TODO: 'pod' - Hmmmmm - perhaps we shouldn't be using v1 code? - Expect(err).To(MatchError(ContainSubstring("\"Matchingest\" is not a valid pod selector operator"))) + Expect(err).To(MatchError(ContainSubstring("\"Matchingest\" is not a valid label selector operator"))) }) }) }) diff --git a/pkg/satoken/satokenfakes/fake_interface.go b/pkg/satoken/satokenfakes/fake_interface.go index a09bd8f80..cb3eb2017 100644 --- a/pkg/satoken/satokenfakes/fake_interface.go +++ b/pkg/satoken/satokenfakes/fake_interface.go @@ -7,12 +7,14 @@ import ( "k8s.io/client-go/discovery" "k8s.io/client-go/kubernetes" v1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1" + "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1" "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" - v1alpha1a "k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1" + v1alpha1d "k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1" v1a "k8s.io/client-go/kubernetes/typed/apps/v1" v1beta1a "k8s.io/client-go/kubernetes/typed/apps/v1beta1" "k8s.io/client-go/kubernetes/typed/apps/v1beta2" v1b "k8s.io/client-go/kubernetes/typed/authentication/v1" + v1alpha1a "k8s.io/client-go/kubernetes/typed/authentication/v1alpha1" v1beta1b "k8s.io/client-go/kubernetes/typed/authentication/v1beta1" v1c "k8s.io/client-go/kubernetes/typed/authorization/v1" v1beta1c "k8s.io/client-go/kubernetes/typed/authorization/v1beta1" @@ -23,6 +25,7 @@ import ( v1e "k8s.io/client-go/kubernetes/typed/batch/v1" v1beta1d "k8s.io/client-go/kubernetes/typed/batch/v1beta1" v1f "k8s.io/client-go/kubernetes/typed/certificates/v1" + v1alpha1b "k8s.io/client-go/kubernetes/typed/certificates/v1alpha1" v1beta1e "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" v1g "k8s.io/client-go/kubernetes/typed/coordination/v1" v1beta1f "k8s.io/client-go/kubernetes/typed/coordination/v1beta1" @@ -32,25 +35,27 @@ import ( v1j "k8s.io/client-go/kubernetes/typed/events/v1" v1beta1h "k8s.io/client-go/kubernetes/typed/events/v1beta1" v1beta1i "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" - "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" + v1alpha1c "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" v1beta1j "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1" v1beta2a "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2" + "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3" v1k "k8s.io/client-go/kubernetes/typed/networking/v1" - v1alpha1b "k8s.io/client-go/kubernetes/typed/networking/v1alpha1" + v1alpha1e "k8s.io/client-go/kubernetes/typed/networking/v1alpha1" v1beta1k "k8s.io/client-go/kubernetes/typed/networking/v1beta1" v1l "k8s.io/client-go/kubernetes/typed/node/v1" - v1alpha1c "k8s.io/client-go/kubernetes/typed/node/v1alpha1" + v1alpha1f "k8s.io/client-go/kubernetes/typed/node/v1alpha1" v1beta1l "k8s.io/client-go/kubernetes/typed/node/v1beta1" v1m "k8s.io/client-go/kubernetes/typed/policy/v1" v1beta1m "k8s.io/client-go/kubernetes/typed/policy/v1beta1" v1n "k8s.io/client-go/kubernetes/typed/rbac/v1" - v1alpha1d "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1" + v1alpha1g "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1" v1beta1n "k8s.io/client-go/kubernetes/typed/rbac/v1beta1" + "k8s.io/client-go/kubernetes/typed/resource/v1alpha2" v1o "k8s.io/client-go/kubernetes/typed/scheduling/v1" - v1alpha1e "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1" + v1alpha1h "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1" v1beta1o "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1" v1p "k8s.io/client-go/kubernetes/typed/storage/v1" - v1alpha1f "k8s.io/client-go/kubernetes/typed/storage/v1alpha1" + v1alpha1i "k8s.io/client-go/kubernetes/typed/storage/v1alpha1" v1beta1p "k8s.io/client-go/kubernetes/typed/storage/v1beta1" ) @@ -65,6 +70,16 @@ type FakeInterface struct { admissionregistrationV1ReturnsOnCall map[int]struct { result1 v1.AdmissionregistrationV1Interface } + AdmissionregistrationV1alpha1Stub func() v1alpha1.AdmissionregistrationV1alpha1Interface + admissionregistrationV1alpha1Mutex sync.RWMutex + admissionregistrationV1alpha1ArgsForCall []struct { + } + admissionregistrationV1alpha1Returns struct { + result1 v1alpha1.AdmissionregistrationV1alpha1Interface + } + admissionregistrationV1alpha1ReturnsOnCall map[int]struct { + result1 v1alpha1.AdmissionregistrationV1alpha1Interface + } AdmissionregistrationV1beta1Stub func() v1beta1.AdmissionregistrationV1beta1Interface admissionregistrationV1beta1Mutex sync.RWMutex admissionregistrationV1beta1ArgsForCall []struct { @@ -115,6 +130,16 @@ type FakeInterface struct { authenticationV1ReturnsOnCall map[int]struct { result1 v1b.AuthenticationV1Interface } + AuthenticationV1alpha1Stub func() v1alpha1a.AuthenticationV1alpha1Interface + authenticationV1alpha1Mutex sync.RWMutex + authenticationV1alpha1ArgsForCall []struct { + } + authenticationV1alpha1Returns struct { + result1 v1alpha1a.AuthenticationV1alpha1Interface + } + authenticationV1alpha1ReturnsOnCall map[int]struct { + result1 v1alpha1a.AuthenticationV1alpha1Interface + } AuthenticationV1beta1Stub func() v1beta1b.AuthenticationV1beta1Interface authenticationV1beta1Mutex sync.RWMutex authenticationV1beta1ArgsForCall []struct { @@ -215,6 +240,16 @@ type FakeInterface struct { certificatesV1ReturnsOnCall map[int]struct { result1 v1f.CertificatesV1Interface } + CertificatesV1alpha1Stub func() v1alpha1b.CertificatesV1alpha1Interface + certificatesV1alpha1Mutex sync.RWMutex + certificatesV1alpha1ArgsForCall []struct { + } + certificatesV1alpha1Returns struct { + result1 v1alpha1b.CertificatesV1alpha1Interface + } + certificatesV1alpha1ReturnsOnCall map[int]struct { + result1 v1alpha1b.CertificatesV1alpha1Interface + } CertificatesV1beta1Stub func() v1beta1e.CertificatesV1beta1Interface certificatesV1beta1Mutex sync.RWMutex certificatesV1beta1ArgsForCall []struct { @@ -315,15 +350,15 @@ type FakeInterface struct { extensionsV1beta1ReturnsOnCall map[int]struct { result1 v1beta1i.ExtensionsV1beta1Interface } - FlowcontrolV1alpha1Stub func() v1alpha1.FlowcontrolV1alpha1Interface + FlowcontrolV1alpha1Stub func() v1alpha1c.FlowcontrolV1alpha1Interface flowcontrolV1alpha1Mutex sync.RWMutex flowcontrolV1alpha1ArgsForCall []struct { } flowcontrolV1alpha1Returns struct { - result1 v1alpha1.FlowcontrolV1alpha1Interface + result1 v1alpha1c.FlowcontrolV1alpha1Interface } flowcontrolV1alpha1ReturnsOnCall map[int]struct { - result1 v1alpha1.FlowcontrolV1alpha1Interface + result1 v1alpha1c.FlowcontrolV1alpha1Interface } FlowcontrolV1beta1Stub func() v1beta1j.FlowcontrolV1beta1Interface flowcontrolV1beta1Mutex sync.RWMutex @@ -345,15 +380,25 @@ type FakeInterface struct { flowcontrolV1beta2ReturnsOnCall map[int]struct { result1 v1beta2a.FlowcontrolV1beta2Interface } - InternalV1alpha1Stub func() v1alpha1a.InternalV1alpha1Interface + FlowcontrolV1beta3Stub func() v1beta3.FlowcontrolV1beta3Interface + flowcontrolV1beta3Mutex sync.RWMutex + flowcontrolV1beta3ArgsForCall []struct { + } + flowcontrolV1beta3Returns struct { + result1 v1beta3.FlowcontrolV1beta3Interface + } + flowcontrolV1beta3ReturnsOnCall map[int]struct { + result1 v1beta3.FlowcontrolV1beta3Interface + } + InternalV1alpha1Stub func() v1alpha1d.InternalV1alpha1Interface internalV1alpha1Mutex sync.RWMutex internalV1alpha1ArgsForCall []struct { } internalV1alpha1Returns struct { - result1 v1alpha1a.InternalV1alpha1Interface + result1 v1alpha1d.InternalV1alpha1Interface } internalV1alpha1ReturnsOnCall map[int]struct { - result1 v1alpha1a.InternalV1alpha1Interface + result1 v1alpha1d.InternalV1alpha1Interface } NetworkingV1Stub func() v1k.NetworkingV1Interface networkingV1Mutex sync.RWMutex @@ -365,15 +410,15 @@ type FakeInterface struct { networkingV1ReturnsOnCall map[int]struct { result1 v1k.NetworkingV1Interface } - NetworkingV1alpha1Stub func() v1alpha1b.NetworkingV1alpha1Interface + NetworkingV1alpha1Stub func() v1alpha1e.NetworkingV1alpha1Interface networkingV1alpha1Mutex sync.RWMutex networkingV1alpha1ArgsForCall []struct { } networkingV1alpha1Returns struct { - result1 v1alpha1b.NetworkingV1alpha1Interface + result1 v1alpha1e.NetworkingV1alpha1Interface } networkingV1alpha1ReturnsOnCall map[int]struct { - result1 v1alpha1b.NetworkingV1alpha1Interface + result1 v1alpha1e.NetworkingV1alpha1Interface } NetworkingV1beta1Stub func() v1beta1k.NetworkingV1beta1Interface networkingV1beta1Mutex sync.RWMutex @@ -395,15 +440,15 @@ type FakeInterface struct { nodeV1ReturnsOnCall map[int]struct { result1 v1l.NodeV1Interface } - NodeV1alpha1Stub func() v1alpha1c.NodeV1alpha1Interface + NodeV1alpha1Stub func() v1alpha1f.NodeV1alpha1Interface nodeV1alpha1Mutex sync.RWMutex nodeV1alpha1ArgsForCall []struct { } nodeV1alpha1Returns struct { - result1 v1alpha1c.NodeV1alpha1Interface + result1 v1alpha1f.NodeV1alpha1Interface } nodeV1alpha1ReturnsOnCall map[int]struct { - result1 v1alpha1c.NodeV1alpha1Interface + result1 v1alpha1f.NodeV1alpha1Interface } NodeV1beta1Stub func() v1beta1l.NodeV1beta1Interface nodeV1beta1Mutex sync.RWMutex @@ -445,15 +490,15 @@ type FakeInterface struct { rbacV1ReturnsOnCall map[int]struct { result1 v1n.RbacV1Interface } - RbacV1alpha1Stub func() v1alpha1d.RbacV1alpha1Interface + RbacV1alpha1Stub func() v1alpha1g.RbacV1alpha1Interface rbacV1alpha1Mutex sync.RWMutex rbacV1alpha1ArgsForCall []struct { } rbacV1alpha1Returns struct { - result1 v1alpha1d.RbacV1alpha1Interface + result1 v1alpha1g.RbacV1alpha1Interface } rbacV1alpha1ReturnsOnCall map[int]struct { - result1 v1alpha1d.RbacV1alpha1Interface + result1 v1alpha1g.RbacV1alpha1Interface } RbacV1beta1Stub func() v1beta1n.RbacV1beta1Interface rbacV1beta1Mutex sync.RWMutex @@ -465,6 +510,16 @@ type FakeInterface struct { rbacV1beta1ReturnsOnCall map[int]struct { result1 v1beta1n.RbacV1beta1Interface } + ResourceV1alpha2Stub func() v1alpha2.ResourceV1alpha2Interface + resourceV1alpha2Mutex sync.RWMutex + resourceV1alpha2ArgsForCall []struct { + } + resourceV1alpha2Returns struct { + result1 v1alpha2.ResourceV1alpha2Interface + } + resourceV1alpha2ReturnsOnCall map[int]struct { + result1 v1alpha2.ResourceV1alpha2Interface + } SchedulingV1Stub func() v1o.SchedulingV1Interface schedulingV1Mutex sync.RWMutex schedulingV1ArgsForCall []struct { @@ -475,15 +530,15 @@ type FakeInterface struct { schedulingV1ReturnsOnCall map[int]struct { result1 v1o.SchedulingV1Interface } - SchedulingV1alpha1Stub func() v1alpha1e.SchedulingV1alpha1Interface + SchedulingV1alpha1Stub func() v1alpha1h.SchedulingV1alpha1Interface schedulingV1alpha1Mutex sync.RWMutex schedulingV1alpha1ArgsForCall []struct { } schedulingV1alpha1Returns struct { - result1 v1alpha1e.SchedulingV1alpha1Interface + result1 v1alpha1h.SchedulingV1alpha1Interface } schedulingV1alpha1ReturnsOnCall map[int]struct { - result1 v1alpha1e.SchedulingV1alpha1Interface + result1 v1alpha1h.SchedulingV1alpha1Interface } SchedulingV1beta1Stub func() v1beta1o.SchedulingV1beta1Interface schedulingV1beta1Mutex sync.RWMutex @@ -505,15 +560,15 @@ type FakeInterface struct { storageV1ReturnsOnCall map[int]struct { result1 v1p.StorageV1Interface } - StorageV1alpha1Stub func() v1alpha1f.StorageV1alpha1Interface + StorageV1alpha1Stub func() v1alpha1i.StorageV1alpha1Interface storageV1alpha1Mutex sync.RWMutex storageV1alpha1ArgsForCall []struct { } storageV1alpha1Returns struct { - result1 v1alpha1f.StorageV1alpha1Interface + result1 v1alpha1i.StorageV1alpha1Interface } storageV1alpha1ReturnsOnCall map[int]struct { - result1 v1alpha1f.StorageV1alpha1Interface + result1 v1alpha1i.StorageV1alpha1Interface } StorageV1beta1Stub func() v1beta1p.StorageV1beta1Interface storageV1beta1Mutex sync.RWMutex @@ -582,6 +637,59 @@ func (fake *FakeInterface) AdmissionregistrationV1ReturnsOnCall(i int, result1 v }{result1} } +func (fake *FakeInterface) AdmissionregistrationV1alpha1() v1alpha1.AdmissionregistrationV1alpha1Interface { + fake.admissionregistrationV1alpha1Mutex.Lock() + ret, specificReturn := fake.admissionregistrationV1alpha1ReturnsOnCall[len(fake.admissionregistrationV1alpha1ArgsForCall)] + fake.admissionregistrationV1alpha1ArgsForCall = append(fake.admissionregistrationV1alpha1ArgsForCall, struct { + }{}) + stub := fake.AdmissionregistrationV1alpha1Stub + fakeReturns := fake.admissionregistrationV1alpha1Returns + fake.recordInvocation("AdmissionregistrationV1alpha1", []interface{}{}) + fake.admissionregistrationV1alpha1Mutex.Unlock() + if stub != nil { + return stub() + } + if specificReturn { + return ret.result1 + } + return fakeReturns.result1 +} + +func (fake *FakeInterface) AdmissionregistrationV1alpha1CallCount() int { + fake.admissionregistrationV1alpha1Mutex.RLock() + defer fake.admissionregistrationV1alpha1Mutex.RUnlock() + return len(fake.admissionregistrationV1alpha1ArgsForCall) +} + +func (fake *FakeInterface) AdmissionregistrationV1alpha1Calls(stub func() v1alpha1.AdmissionregistrationV1alpha1Interface) { + fake.admissionregistrationV1alpha1Mutex.Lock() + defer fake.admissionregistrationV1alpha1Mutex.Unlock() + fake.AdmissionregistrationV1alpha1Stub = stub +} + +func (fake *FakeInterface) AdmissionregistrationV1alpha1Returns(result1 v1alpha1.AdmissionregistrationV1alpha1Interface) { + fake.admissionregistrationV1alpha1Mutex.Lock() + defer fake.admissionregistrationV1alpha1Mutex.Unlock() + fake.AdmissionregistrationV1alpha1Stub = nil + fake.admissionregistrationV1alpha1Returns = struct { + result1 v1alpha1.AdmissionregistrationV1alpha1Interface + }{result1} +} + +func (fake *FakeInterface) AdmissionregistrationV1alpha1ReturnsOnCall(i int, result1 v1alpha1.AdmissionregistrationV1alpha1Interface) { + fake.admissionregistrationV1alpha1Mutex.Lock() + defer fake.admissionregistrationV1alpha1Mutex.Unlock() + fake.AdmissionregistrationV1alpha1Stub = nil + if fake.admissionregistrationV1alpha1ReturnsOnCall == nil { + fake.admissionregistrationV1alpha1ReturnsOnCall = make(map[int]struct { + result1 v1alpha1.AdmissionregistrationV1alpha1Interface + }) + } + fake.admissionregistrationV1alpha1ReturnsOnCall[i] = struct { + result1 v1alpha1.AdmissionregistrationV1alpha1Interface + }{result1} +} + func (fake *FakeInterface) AdmissionregistrationV1beta1() v1beta1.AdmissionregistrationV1beta1Interface { fake.admissionregistrationV1beta1Mutex.Lock() ret, specificReturn := fake.admissionregistrationV1beta1ReturnsOnCall[len(fake.admissionregistrationV1beta1ArgsForCall)] @@ -847,6 +955,59 @@ func (fake *FakeInterface) AuthenticationV1ReturnsOnCall(i int, result1 v1b.Auth }{result1} } +func (fake *FakeInterface) AuthenticationV1alpha1() v1alpha1a.AuthenticationV1alpha1Interface { + fake.authenticationV1alpha1Mutex.Lock() + ret, specificReturn := fake.authenticationV1alpha1ReturnsOnCall[len(fake.authenticationV1alpha1ArgsForCall)] + fake.authenticationV1alpha1ArgsForCall = append(fake.authenticationV1alpha1ArgsForCall, struct { + }{}) + stub := fake.AuthenticationV1alpha1Stub + fakeReturns := fake.authenticationV1alpha1Returns + fake.recordInvocation("AuthenticationV1alpha1", []interface{}{}) + fake.authenticationV1alpha1Mutex.Unlock() + if stub != nil { + return stub() + } + if specificReturn { + return ret.result1 + } + return fakeReturns.result1 +} + +func (fake *FakeInterface) AuthenticationV1alpha1CallCount() int { + fake.authenticationV1alpha1Mutex.RLock() + defer fake.authenticationV1alpha1Mutex.RUnlock() + return len(fake.authenticationV1alpha1ArgsForCall) +} + +func (fake *FakeInterface) AuthenticationV1alpha1Calls(stub func() v1alpha1a.AuthenticationV1alpha1Interface) { + fake.authenticationV1alpha1Mutex.Lock() + defer fake.authenticationV1alpha1Mutex.Unlock() + fake.AuthenticationV1alpha1Stub = stub +} + +func (fake *FakeInterface) AuthenticationV1alpha1Returns(result1 v1alpha1a.AuthenticationV1alpha1Interface) { + fake.authenticationV1alpha1Mutex.Lock() + defer fake.authenticationV1alpha1Mutex.Unlock() + fake.AuthenticationV1alpha1Stub = nil + fake.authenticationV1alpha1Returns = struct { + result1 v1alpha1a.AuthenticationV1alpha1Interface + }{result1} +} + +func (fake *FakeInterface) AuthenticationV1alpha1ReturnsOnCall(i int, result1 v1alpha1a.AuthenticationV1alpha1Interface) { + fake.authenticationV1alpha1Mutex.Lock() + defer fake.authenticationV1alpha1Mutex.Unlock() + fake.AuthenticationV1alpha1Stub = nil + if fake.authenticationV1alpha1ReturnsOnCall == nil { + fake.authenticationV1alpha1ReturnsOnCall = make(map[int]struct { + result1 v1alpha1a.AuthenticationV1alpha1Interface + }) + } + fake.authenticationV1alpha1ReturnsOnCall[i] = struct { + result1 v1alpha1a.AuthenticationV1alpha1Interface + }{result1} +} + func (fake *FakeInterface) AuthenticationV1beta1() v1beta1b.AuthenticationV1beta1Interface { fake.authenticationV1beta1Mutex.Lock() ret, specificReturn := fake.authenticationV1beta1ReturnsOnCall[len(fake.authenticationV1beta1ArgsForCall)] @@ -1377,6 +1538,59 @@ func (fake *FakeInterface) CertificatesV1ReturnsOnCall(i int, result1 v1f.Certif }{result1} } +func (fake *FakeInterface) CertificatesV1alpha1() v1alpha1b.CertificatesV1alpha1Interface { + fake.certificatesV1alpha1Mutex.Lock() + ret, specificReturn := fake.certificatesV1alpha1ReturnsOnCall[len(fake.certificatesV1alpha1ArgsForCall)] + fake.certificatesV1alpha1ArgsForCall = append(fake.certificatesV1alpha1ArgsForCall, struct { + }{}) + stub := fake.CertificatesV1alpha1Stub + fakeReturns := fake.certificatesV1alpha1Returns + fake.recordInvocation("CertificatesV1alpha1", []interface{}{}) + fake.certificatesV1alpha1Mutex.Unlock() + if stub != nil { + return stub() + } + if specificReturn { + return ret.result1 + } + return fakeReturns.result1 +} + +func (fake *FakeInterface) CertificatesV1alpha1CallCount() int { + fake.certificatesV1alpha1Mutex.RLock() + defer fake.certificatesV1alpha1Mutex.RUnlock() + return len(fake.certificatesV1alpha1ArgsForCall) +} + +func (fake *FakeInterface) CertificatesV1alpha1Calls(stub func() v1alpha1b.CertificatesV1alpha1Interface) { + fake.certificatesV1alpha1Mutex.Lock() + defer fake.certificatesV1alpha1Mutex.Unlock() + fake.CertificatesV1alpha1Stub = stub +} + +func (fake *FakeInterface) CertificatesV1alpha1Returns(result1 v1alpha1b.CertificatesV1alpha1Interface) { + fake.certificatesV1alpha1Mutex.Lock() + defer fake.certificatesV1alpha1Mutex.Unlock() + fake.CertificatesV1alpha1Stub = nil + fake.certificatesV1alpha1Returns = struct { + result1 v1alpha1b.CertificatesV1alpha1Interface + }{result1} +} + +func (fake *FakeInterface) CertificatesV1alpha1ReturnsOnCall(i int, result1 v1alpha1b.CertificatesV1alpha1Interface) { + fake.certificatesV1alpha1Mutex.Lock() + defer fake.certificatesV1alpha1Mutex.Unlock() + fake.CertificatesV1alpha1Stub = nil + if fake.certificatesV1alpha1ReturnsOnCall == nil { + fake.certificatesV1alpha1ReturnsOnCall = make(map[int]struct { + result1 v1alpha1b.CertificatesV1alpha1Interface + }) + } + fake.certificatesV1alpha1ReturnsOnCall[i] = struct { + result1 v1alpha1b.CertificatesV1alpha1Interface + }{result1} +} + func (fake *FakeInterface) CertificatesV1beta1() v1beta1e.CertificatesV1beta1Interface { fake.certificatesV1beta1Mutex.Lock() ret, specificReturn := fake.certificatesV1beta1ReturnsOnCall[len(fake.certificatesV1beta1ArgsForCall)] @@ -1907,7 +2121,7 @@ func (fake *FakeInterface) ExtensionsV1beta1ReturnsOnCall(i int, result1 v1beta1 }{result1} } -func (fake *FakeInterface) FlowcontrolV1alpha1() v1alpha1.FlowcontrolV1alpha1Interface { +func (fake *FakeInterface) FlowcontrolV1alpha1() v1alpha1c.FlowcontrolV1alpha1Interface { fake.flowcontrolV1alpha1Mutex.Lock() ret, specificReturn := fake.flowcontrolV1alpha1ReturnsOnCall[len(fake.flowcontrolV1alpha1ArgsForCall)] fake.flowcontrolV1alpha1ArgsForCall = append(fake.flowcontrolV1alpha1ArgsForCall, struct { @@ -1931,32 +2145,32 @@ func (fake *FakeInterface) FlowcontrolV1alpha1CallCount() int { return len(fake.flowcontrolV1alpha1ArgsForCall) } -func (fake *FakeInterface) FlowcontrolV1alpha1Calls(stub func() v1alpha1.FlowcontrolV1alpha1Interface) { +func (fake *FakeInterface) FlowcontrolV1alpha1Calls(stub func() v1alpha1c.FlowcontrolV1alpha1Interface) { fake.flowcontrolV1alpha1Mutex.Lock() defer fake.flowcontrolV1alpha1Mutex.Unlock() fake.FlowcontrolV1alpha1Stub = stub } -func (fake *FakeInterface) FlowcontrolV1alpha1Returns(result1 v1alpha1.FlowcontrolV1alpha1Interface) { +func (fake *FakeInterface) FlowcontrolV1alpha1Returns(result1 v1alpha1c.FlowcontrolV1alpha1Interface) { fake.flowcontrolV1alpha1Mutex.Lock() defer fake.flowcontrolV1alpha1Mutex.Unlock() fake.FlowcontrolV1alpha1Stub = nil fake.flowcontrolV1alpha1Returns = struct { - result1 v1alpha1.FlowcontrolV1alpha1Interface + result1 v1alpha1c.FlowcontrolV1alpha1Interface }{result1} } -func (fake *FakeInterface) FlowcontrolV1alpha1ReturnsOnCall(i int, result1 v1alpha1.FlowcontrolV1alpha1Interface) { +func (fake *FakeInterface) FlowcontrolV1alpha1ReturnsOnCall(i int, result1 v1alpha1c.FlowcontrolV1alpha1Interface) { fake.flowcontrolV1alpha1Mutex.Lock() defer fake.flowcontrolV1alpha1Mutex.Unlock() fake.FlowcontrolV1alpha1Stub = nil if fake.flowcontrolV1alpha1ReturnsOnCall == nil { fake.flowcontrolV1alpha1ReturnsOnCall = make(map[int]struct { - result1 v1alpha1.FlowcontrolV1alpha1Interface + result1 v1alpha1c.FlowcontrolV1alpha1Interface }) } fake.flowcontrolV1alpha1ReturnsOnCall[i] = struct { - result1 v1alpha1.FlowcontrolV1alpha1Interface + result1 v1alpha1c.FlowcontrolV1alpha1Interface }{result1} } @@ -2066,7 +2280,60 @@ func (fake *FakeInterface) FlowcontrolV1beta2ReturnsOnCall(i int, result1 v1beta }{result1} } -func (fake *FakeInterface) InternalV1alpha1() v1alpha1a.InternalV1alpha1Interface { +func (fake *FakeInterface) FlowcontrolV1beta3() v1beta3.FlowcontrolV1beta3Interface { + fake.flowcontrolV1beta3Mutex.Lock() + ret, specificReturn := fake.flowcontrolV1beta3ReturnsOnCall[len(fake.flowcontrolV1beta3ArgsForCall)] + fake.flowcontrolV1beta3ArgsForCall = append(fake.flowcontrolV1beta3ArgsForCall, struct { + }{}) + stub := fake.FlowcontrolV1beta3Stub + fakeReturns := fake.flowcontrolV1beta3Returns + fake.recordInvocation("FlowcontrolV1beta3", []interface{}{}) + fake.flowcontrolV1beta3Mutex.Unlock() + if stub != nil { + return stub() + } + if specificReturn { + return ret.result1 + } + return fakeReturns.result1 +} + +func (fake *FakeInterface) FlowcontrolV1beta3CallCount() int { + fake.flowcontrolV1beta3Mutex.RLock() + defer fake.flowcontrolV1beta3Mutex.RUnlock() + return len(fake.flowcontrolV1beta3ArgsForCall) +} + +func (fake *FakeInterface) FlowcontrolV1beta3Calls(stub func() v1beta3.FlowcontrolV1beta3Interface) { + fake.flowcontrolV1beta3Mutex.Lock() + defer fake.flowcontrolV1beta3Mutex.Unlock() + fake.FlowcontrolV1beta3Stub = stub +} + +func (fake *FakeInterface) FlowcontrolV1beta3Returns(result1 v1beta3.FlowcontrolV1beta3Interface) { + fake.flowcontrolV1beta3Mutex.Lock() + defer fake.flowcontrolV1beta3Mutex.Unlock() + fake.FlowcontrolV1beta3Stub = nil + fake.flowcontrolV1beta3Returns = struct { + result1 v1beta3.FlowcontrolV1beta3Interface + }{result1} +} + +func (fake *FakeInterface) FlowcontrolV1beta3ReturnsOnCall(i int, result1 v1beta3.FlowcontrolV1beta3Interface) { + fake.flowcontrolV1beta3Mutex.Lock() + defer fake.flowcontrolV1beta3Mutex.Unlock() + fake.FlowcontrolV1beta3Stub = nil + if fake.flowcontrolV1beta3ReturnsOnCall == nil { + fake.flowcontrolV1beta3ReturnsOnCall = make(map[int]struct { + result1 v1beta3.FlowcontrolV1beta3Interface + }) + } + fake.flowcontrolV1beta3ReturnsOnCall[i] = struct { + result1 v1beta3.FlowcontrolV1beta3Interface + }{result1} +} + +func (fake *FakeInterface) InternalV1alpha1() v1alpha1d.InternalV1alpha1Interface { fake.internalV1alpha1Mutex.Lock() ret, specificReturn := fake.internalV1alpha1ReturnsOnCall[len(fake.internalV1alpha1ArgsForCall)] fake.internalV1alpha1ArgsForCall = append(fake.internalV1alpha1ArgsForCall, struct { @@ -2090,32 +2357,32 @@ func (fake *FakeInterface) InternalV1alpha1CallCount() int { return len(fake.internalV1alpha1ArgsForCall) } -func (fake *FakeInterface) InternalV1alpha1Calls(stub func() v1alpha1a.InternalV1alpha1Interface) { +func (fake *FakeInterface) InternalV1alpha1Calls(stub func() v1alpha1d.InternalV1alpha1Interface) { fake.internalV1alpha1Mutex.Lock() defer fake.internalV1alpha1Mutex.Unlock() fake.InternalV1alpha1Stub = stub } -func (fake *FakeInterface) InternalV1alpha1Returns(result1 v1alpha1a.InternalV1alpha1Interface) { +func (fake *FakeInterface) InternalV1alpha1Returns(result1 v1alpha1d.InternalV1alpha1Interface) { fake.internalV1alpha1Mutex.Lock() defer fake.internalV1alpha1Mutex.Unlock() fake.InternalV1alpha1Stub = nil fake.internalV1alpha1Returns = struct { - result1 v1alpha1a.InternalV1alpha1Interface + result1 v1alpha1d.InternalV1alpha1Interface }{result1} } -func (fake *FakeInterface) InternalV1alpha1ReturnsOnCall(i int, result1 v1alpha1a.InternalV1alpha1Interface) { +func (fake *FakeInterface) InternalV1alpha1ReturnsOnCall(i int, result1 v1alpha1d.InternalV1alpha1Interface) { fake.internalV1alpha1Mutex.Lock() defer fake.internalV1alpha1Mutex.Unlock() fake.InternalV1alpha1Stub = nil if fake.internalV1alpha1ReturnsOnCall == nil { fake.internalV1alpha1ReturnsOnCall = make(map[int]struct { - result1 v1alpha1a.InternalV1alpha1Interface + result1 v1alpha1d.InternalV1alpha1Interface }) } fake.internalV1alpha1ReturnsOnCall[i] = struct { - result1 v1alpha1a.InternalV1alpha1Interface + result1 v1alpha1d.InternalV1alpha1Interface }{result1} } @@ -2172,7 +2439,7 @@ func (fake *FakeInterface) NetworkingV1ReturnsOnCall(i int, result1 v1k.Networki }{result1} } -func (fake *FakeInterface) NetworkingV1alpha1() v1alpha1b.NetworkingV1alpha1Interface { +func (fake *FakeInterface) NetworkingV1alpha1() v1alpha1e.NetworkingV1alpha1Interface { fake.networkingV1alpha1Mutex.Lock() ret, specificReturn := fake.networkingV1alpha1ReturnsOnCall[len(fake.networkingV1alpha1ArgsForCall)] fake.networkingV1alpha1ArgsForCall = append(fake.networkingV1alpha1ArgsForCall, struct { @@ -2196,32 +2463,32 @@ func (fake *FakeInterface) NetworkingV1alpha1CallCount() int { return len(fake.networkingV1alpha1ArgsForCall) } -func (fake *FakeInterface) NetworkingV1alpha1Calls(stub func() v1alpha1b.NetworkingV1alpha1Interface) { +func (fake *FakeInterface) NetworkingV1alpha1Calls(stub func() v1alpha1e.NetworkingV1alpha1Interface) { fake.networkingV1alpha1Mutex.Lock() defer fake.networkingV1alpha1Mutex.Unlock() fake.NetworkingV1alpha1Stub = stub } -func (fake *FakeInterface) NetworkingV1alpha1Returns(result1 v1alpha1b.NetworkingV1alpha1Interface) { +func (fake *FakeInterface) NetworkingV1alpha1Returns(result1 v1alpha1e.NetworkingV1alpha1Interface) { fake.networkingV1alpha1Mutex.Lock() defer fake.networkingV1alpha1Mutex.Unlock() fake.NetworkingV1alpha1Stub = nil fake.networkingV1alpha1Returns = struct { - result1 v1alpha1b.NetworkingV1alpha1Interface + result1 v1alpha1e.NetworkingV1alpha1Interface }{result1} } -func (fake *FakeInterface) NetworkingV1alpha1ReturnsOnCall(i int, result1 v1alpha1b.NetworkingV1alpha1Interface) { +func (fake *FakeInterface) NetworkingV1alpha1ReturnsOnCall(i int, result1 v1alpha1e.NetworkingV1alpha1Interface) { fake.networkingV1alpha1Mutex.Lock() defer fake.networkingV1alpha1Mutex.Unlock() fake.NetworkingV1alpha1Stub = nil if fake.networkingV1alpha1ReturnsOnCall == nil { fake.networkingV1alpha1ReturnsOnCall = make(map[int]struct { - result1 v1alpha1b.NetworkingV1alpha1Interface + result1 v1alpha1e.NetworkingV1alpha1Interface }) } fake.networkingV1alpha1ReturnsOnCall[i] = struct { - result1 v1alpha1b.NetworkingV1alpha1Interface + result1 v1alpha1e.NetworkingV1alpha1Interface }{result1} } @@ -2331,7 +2598,7 @@ func (fake *FakeInterface) NodeV1ReturnsOnCall(i int, result1 v1l.NodeV1Interfac }{result1} } -func (fake *FakeInterface) NodeV1alpha1() v1alpha1c.NodeV1alpha1Interface { +func (fake *FakeInterface) NodeV1alpha1() v1alpha1f.NodeV1alpha1Interface { fake.nodeV1alpha1Mutex.Lock() ret, specificReturn := fake.nodeV1alpha1ReturnsOnCall[len(fake.nodeV1alpha1ArgsForCall)] fake.nodeV1alpha1ArgsForCall = append(fake.nodeV1alpha1ArgsForCall, struct { @@ -2355,32 +2622,32 @@ func (fake *FakeInterface) NodeV1alpha1CallCount() int { return len(fake.nodeV1alpha1ArgsForCall) } -func (fake *FakeInterface) NodeV1alpha1Calls(stub func() v1alpha1c.NodeV1alpha1Interface) { +func (fake *FakeInterface) NodeV1alpha1Calls(stub func() v1alpha1f.NodeV1alpha1Interface) { fake.nodeV1alpha1Mutex.Lock() defer fake.nodeV1alpha1Mutex.Unlock() fake.NodeV1alpha1Stub = stub } -func (fake *FakeInterface) NodeV1alpha1Returns(result1 v1alpha1c.NodeV1alpha1Interface) { +func (fake *FakeInterface) NodeV1alpha1Returns(result1 v1alpha1f.NodeV1alpha1Interface) { fake.nodeV1alpha1Mutex.Lock() defer fake.nodeV1alpha1Mutex.Unlock() fake.NodeV1alpha1Stub = nil fake.nodeV1alpha1Returns = struct { - result1 v1alpha1c.NodeV1alpha1Interface + result1 v1alpha1f.NodeV1alpha1Interface }{result1} } -func (fake *FakeInterface) NodeV1alpha1ReturnsOnCall(i int, result1 v1alpha1c.NodeV1alpha1Interface) { +func (fake *FakeInterface) NodeV1alpha1ReturnsOnCall(i int, result1 v1alpha1f.NodeV1alpha1Interface) { fake.nodeV1alpha1Mutex.Lock() defer fake.nodeV1alpha1Mutex.Unlock() fake.NodeV1alpha1Stub = nil if fake.nodeV1alpha1ReturnsOnCall == nil { fake.nodeV1alpha1ReturnsOnCall = make(map[int]struct { - result1 v1alpha1c.NodeV1alpha1Interface + result1 v1alpha1f.NodeV1alpha1Interface }) } fake.nodeV1alpha1ReturnsOnCall[i] = struct { - result1 v1alpha1c.NodeV1alpha1Interface + result1 v1alpha1f.NodeV1alpha1Interface }{result1} } @@ -2596,7 +2863,7 @@ func (fake *FakeInterface) RbacV1ReturnsOnCall(i int, result1 v1n.RbacV1Interfac }{result1} } -func (fake *FakeInterface) RbacV1alpha1() v1alpha1d.RbacV1alpha1Interface { +func (fake *FakeInterface) RbacV1alpha1() v1alpha1g.RbacV1alpha1Interface { fake.rbacV1alpha1Mutex.Lock() ret, specificReturn := fake.rbacV1alpha1ReturnsOnCall[len(fake.rbacV1alpha1ArgsForCall)] fake.rbacV1alpha1ArgsForCall = append(fake.rbacV1alpha1ArgsForCall, struct { @@ -2620,32 +2887,32 @@ func (fake *FakeInterface) RbacV1alpha1CallCount() int { return len(fake.rbacV1alpha1ArgsForCall) } -func (fake *FakeInterface) RbacV1alpha1Calls(stub func() v1alpha1d.RbacV1alpha1Interface) { +func (fake *FakeInterface) RbacV1alpha1Calls(stub func() v1alpha1g.RbacV1alpha1Interface) { fake.rbacV1alpha1Mutex.Lock() defer fake.rbacV1alpha1Mutex.Unlock() fake.RbacV1alpha1Stub = stub } -func (fake *FakeInterface) RbacV1alpha1Returns(result1 v1alpha1d.RbacV1alpha1Interface) { +func (fake *FakeInterface) RbacV1alpha1Returns(result1 v1alpha1g.RbacV1alpha1Interface) { fake.rbacV1alpha1Mutex.Lock() defer fake.rbacV1alpha1Mutex.Unlock() fake.RbacV1alpha1Stub = nil fake.rbacV1alpha1Returns = struct { - result1 v1alpha1d.RbacV1alpha1Interface + result1 v1alpha1g.RbacV1alpha1Interface }{result1} } -func (fake *FakeInterface) RbacV1alpha1ReturnsOnCall(i int, result1 v1alpha1d.RbacV1alpha1Interface) { +func (fake *FakeInterface) RbacV1alpha1ReturnsOnCall(i int, result1 v1alpha1g.RbacV1alpha1Interface) { fake.rbacV1alpha1Mutex.Lock() defer fake.rbacV1alpha1Mutex.Unlock() fake.RbacV1alpha1Stub = nil if fake.rbacV1alpha1ReturnsOnCall == nil { fake.rbacV1alpha1ReturnsOnCall = make(map[int]struct { - result1 v1alpha1d.RbacV1alpha1Interface + result1 v1alpha1g.RbacV1alpha1Interface }) } fake.rbacV1alpha1ReturnsOnCall[i] = struct { - result1 v1alpha1d.RbacV1alpha1Interface + result1 v1alpha1g.RbacV1alpha1Interface }{result1} } @@ -2702,6 +2969,59 @@ func (fake *FakeInterface) RbacV1beta1ReturnsOnCall(i int, result1 v1beta1n.Rbac }{result1} } +func (fake *FakeInterface) ResourceV1alpha2() v1alpha2.ResourceV1alpha2Interface { + fake.resourceV1alpha2Mutex.Lock() + ret, specificReturn := fake.resourceV1alpha2ReturnsOnCall[len(fake.resourceV1alpha2ArgsForCall)] + fake.resourceV1alpha2ArgsForCall = append(fake.resourceV1alpha2ArgsForCall, struct { + }{}) + stub := fake.ResourceV1alpha2Stub + fakeReturns := fake.resourceV1alpha2Returns + fake.recordInvocation("ResourceV1alpha2", []interface{}{}) + fake.resourceV1alpha2Mutex.Unlock() + if stub != nil { + return stub() + } + if specificReturn { + return ret.result1 + } + return fakeReturns.result1 +} + +func (fake *FakeInterface) ResourceV1alpha2CallCount() int { + fake.resourceV1alpha2Mutex.RLock() + defer fake.resourceV1alpha2Mutex.RUnlock() + return len(fake.resourceV1alpha2ArgsForCall) +} + +func (fake *FakeInterface) ResourceV1alpha2Calls(stub func() v1alpha2.ResourceV1alpha2Interface) { + fake.resourceV1alpha2Mutex.Lock() + defer fake.resourceV1alpha2Mutex.Unlock() + fake.ResourceV1alpha2Stub = stub +} + +func (fake *FakeInterface) ResourceV1alpha2Returns(result1 v1alpha2.ResourceV1alpha2Interface) { + fake.resourceV1alpha2Mutex.Lock() + defer fake.resourceV1alpha2Mutex.Unlock() + fake.ResourceV1alpha2Stub = nil + fake.resourceV1alpha2Returns = struct { + result1 v1alpha2.ResourceV1alpha2Interface + }{result1} +} + +func (fake *FakeInterface) ResourceV1alpha2ReturnsOnCall(i int, result1 v1alpha2.ResourceV1alpha2Interface) { + fake.resourceV1alpha2Mutex.Lock() + defer fake.resourceV1alpha2Mutex.Unlock() + fake.ResourceV1alpha2Stub = nil + if fake.resourceV1alpha2ReturnsOnCall == nil { + fake.resourceV1alpha2ReturnsOnCall = make(map[int]struct { + result1 v1alpha2.ResourceV1alpha2Interface + }) + } + fake.resourceV1alpha2ReturnsOnCall[i] = struct { + result1 v1alpha2.ResourceV1alpha2Interface + }{result1} +} + func (fake *FakeInterface) SchedulingV1() v1o.SchedulingV1Interface { fake.schedulingV1Mutex.Lock() ret, specificReturn := fake.schedulingV1ReturnsOnCall[len(fake.schedulingV1ArgsForCall)] @@ -2755,7 +3075,7 @@ func (fake *FakeInterface) SchedulingV1ReturnsOnCall(i int, result1 v1o.Scheduli }{result1} } -func (fake *FakeInterface) SchedulingV1alpha1() v1alpha1e.SchedulingV1alpha1Interface { +func (fake *FakeInterface) SchedulingV1alpha1() v1alpha1h.SchedulingV1alpha1Interface { fake.schedulingV1alpha1Mutex.Lock() ret, specificReturn := fake.schedulingV1alpha1ReturnsOnCall[len(fake.schedulingV1alpha1ArgsForCall)] fake.schedulingV1alpha1ArgsForCall = append(fake.schedulingV1alpha1ArgsForCall, struct { @@ -2779,32 +3099,32 @@ func (fake *FakeInterface) SchedulingV1alpha1CallCount() int { return len(fake.schedulingV1alpha1ArgsForCall) } -func (fake *FakeInterface) SchedulingV1alpha1Calls(stub func() v1alpha1e.SchedulingV1alpha1Interface) { +func (fake *FakeInterface) SchedulingV1alpha1Calls(stub func() v1alpha1h.SchedulingV1alpha1Interface) { fake.schedulingV1alpha1Mutex.Lock() defer fake.schedulingV1alpha1Mutex.Unlock() fake.SchedulingV1alpha1Stub = stub } -func (fake *FakeInterface) SchedulingV1alpha1Returns(result1 v1alpha1e.SchedulingV1alpha1Interface) { +func (fake *FakeInterface) SchedulingV1alpha1Returns(result1 v1alpha1h.SchedulingV1alpha1Interface) { fake.schedulingV1alpha1Mutex.Lock() defer fake.schedulingV1alpha1Mutex.Unlock() fake.SchedulingV1alpha1Stub = nil fake.schedulingV1alpha1Returns = struct { - result1 v1alpha1e.SchedulingV1alpha1Interface + result1 v1alpha1h.SchedulingV1alpha1Interface }{result1} } -func (fake *FakeInterface) SchedulingV1alpha1ReturnsOnCall(i int, result1 v1alpha1e.SchedulingV1alpha1Interface) { +func (fake *FakeInterface) SchedulingV1alpha1ReturnsOnCall(i int, result1 v1alpha1h.SchedulingV1alpha1Interface) { fake.schedulingV1alpha1Mutex.Lock() defer fake.schedulingV1alpha1Mutex.Unlock() fake.SchedulingV1alpha1Stub = nil if fake.schedulingV1alpha1ReturnsOnCall == nil { fake.schedulingV1alpha1ReturnsOnCall = make(map[int]struct { - result1 v1alpha1e.SchedulingV1alpha1Interface + result1 v1alpha1h.SchedulingV1alpha1Interface }) } fake.schedulingV1alpha1ReturnsOnCall[i] = struct { - result1 v1alpha1e.SchedulingV1alpha1Interface + result1 v1alpha1h.SchedulingV1alpha1Interface }{result1} } @@ -2914,7 +3234,7 @@ func (fake *FakeInterface) StorageV1ReturnsOnCall(i int, result1 v1p.StorageV1In }{result1} } -func (fake *FakeInterface) StorageV1alpha1() v1alpha1f.StorageV1alpha1Interface { +func (fake *FakeInterface) StorageV1alpha1() v1alpha1i.StorageV1alpha1Interface { fake.storageV1alpha1Mutex.Lock() ret, specificReturn := fake.storageV1alpha1ReturnsOnCall[len(fake.storageV1alpha1ArgsForCall)] fake.storageV1alpha1ArgsForCall = append(fake.storageV1alpha1ArgsForCall, struct { @@ -2938,32 +3258,32 @@ func (fake *FakeInterface) StorageV1alpha1CallCount() int { return len(fake.storageV1alpha1ArgsForCall) } -func (fake *FakeInterface) StorageV1alpha1Calls(stub func() v1alpha1f.StorageV1alpha1Interface) { +func (fake *FakeInterface) StorageV1alpha1Calls(stub func() v1alpha1i.StorageV1alpha1Interface) { fake.storageV1alpha1Mutex.Lock() defer fake.storageV1alpha1Mutex.Unlock() fake.StorageV1alpha1Stub = stub } -func (fake *FakeInterface) StorageV1alpha1Returns(result1 v1alpha1f.StorageV1alpha1Interface) { +func (fake *FakeInterface) StorageV1alpha1Returns(result1 v1alpha1i.StorageV1alpha1Interface) { fake.storageV1alpha1Mutex.Lock() defer fake.storageV1alpha1Mutex.Unlock() fake.StorageV1alpha1Stub = nil fake.storageV1alpha1Returns = struct { - result1 v1alpha1f.StorageV1alpha1Interface + result1 v1alpha1i.StorageV1alpha1Interface }{result1} } -func (fake *FakeInterface) StorageV1alpha1ReturnsOnCall(i int, result1 v1alpha1f.StorageV1alpha1Interface) { +func (fake *FakeInterface) StorageV1alpha1ReturnsOnCall(i int, result1 v1alpha1i.StorageV1alpha1Interface) { fake.storageV1alpha1Mutex.Lock() defer fake.storageV1alpha1Mutex.Unlock() fake.StorageV1alpha1Stub = nil if fake.storageV1alpha1ReturnsOnCall == nil { fake.storageV1alpha1ReturnsOnCall = make(map[int]struct { - result1 v1alpha1f.StorageV1alpha1Interface + result1 v1alpha1i.StorageV1alpha1Interface }) } fake.storageV1alpha1ReturnsOnCall[i] = struct { - result1 v1alpha1f.StorageV1alpha1Interface + result1 v1alpha1i.StorageV1alpha1Interface }{result1} } @@ -3025,6 +3345,8 @@ func (fake *FakeInterface) Invocations() map[string][][]interface{} { defer fake.invocationsMutex.RUnlock() fake.admissionregistrationV1Mutex.RLock() defer fake.admissionregistrationV1Mutex.RUnlock() + fake.admissionregistrationV1alpha1Mutex.RLock() + defer fake.admissionregistrationV1alpha1Mutex.RUnlock() fake.admissionregistrationV1beta1Mutex.RLock() defer fake.admissionregistrationV1beta1Mutex.RUnlock() fake.appsV1Mutex.RLock() @@ -3035,6 +3357,8 @@ func (fake *FakeInterface) Invocations() map[string][][]interface{} { defer fake.appsV1beta2Mutex.RUnlock() fake.authenticationV1Mutex.RLock() defer fake.authenticationV1Mutex.RUnlock() + fake.authenticationV1alpha1Mutex.RLock() + defer fake.authenticationV1alpha1Mutex.RUnlock() fake.authenticationV1beta1Mutex.RLock() defer fake.authenticationV1beta1Mutex.RUnlock() fake.authorizationV1Mutex.RLock() @@ -3055,6 +3379,8 @@ func (fake *FakeInterface) Invocations() map[string][][]interface{} { defer fake.batchV1beta1Mutex.RUnlock() fake.certificatesV1Mutex.RLock() defer fake.certificatesV1Mutex.RUnlock() + fake.certificatesV1alpha1Mutex.RLock() + defer fake.certificatesV1alpha1Mutex.RUnlock() fake.certificatesV1beta1Mutex.RLock() defer fake.certificatesV1beta1Mutex.RUnlock() fake.coordinationV1Mutex.RLock() @@ -3081,6 +3407,8 @@ func (fake *FakeInterface) Invocations() map[string][][]interface{} { defer fake.flowcontrolV1beta1Mutex.RUnlock() fake.flowcontrolV1beta2Mutex.RLock() defer fake.flowcontrolV1beta2Mutex.RUnlock() + fake.flowcontrolV1beta3Mutex.RLock() + defer fake.flowcontrolV1beta3Mutex.RUnlock() fake.internalV1alpha1Mutex.RLock() defer fake.internalV1alpha1Mutex.RUnlock() fake.networkingV1Mutex.RLock() @@ -3105,6 +3433,8 @@ func (fake *FakeInterface) Invocations() map[string][][]interface{} { defer fake.rbacV1alpha1Mutex.RUnlock() fake.rbacV1beta1Mutex.RLock() defer fake.rbacV1beta1Mutex.RUnlock() + fake.resourceV1alpha2Mutex.RLock() + defer fake.resourceV1alpha2Mutex.RUnlock() fake.schedulingV1Mutex.RLock() defer fake.schedulingV1Mutex.RUnlock() fake.schedulingV1alpha1Mutex.RLock() diff --git a/pkg/selector/matcher_test.go b/pkg/selector/matcher_test.go index 226f5afa5..3e5f9a9f4 100644 --- a/pkg/selector/matcher_test.go +++ b/pkg/selector/matcher_test.go @@ -377,8 +377,7 @@ var _ = Describe("BestSelectorMatchIndices", func() { It("returns an error", func() { _, err := selector.BestSelectorMatchIndices(selectable{}, sel) Expect(err).To(MatchError(ContainSubstring("selector labels or matchExpressions are not valid"))) - // TODO: 'pod' - Hmmmmm - perhaps we shouldn't be using metav1 code? - Expect(err).To(MatchError(ContainSubstring("\"Matchingest\" is not a valid pod selector operator"))) + Expect(err).To(MatchError(ContainSubstring("\"Matchingest\" is not a valid label selector operator"))) Expect(err.SelectorIndex()).To(Equal(1)) }) }) diff --git a/pkg/testing/case.go b/pkg/testing/case.go index 07b7a5d9f..212d74b10 100644 --- a/pkg/testing/case.go +++ b/pkg/testing/case.go @@ -89,7 +89,7 @@ func (i *Given) getActualObject() (*unstructured.Unstructured, error) { return nil, fmt.Errorf("get populated template failed: %w", err) } - if err = (*apiTemplate).ValidateCreate(); err != nil { + if _, err = (*apiTemplate).ValidateCreate(); err != nil { return nil, fmt.Errorf("template validation failed: %w", err) } diff --git a/pkg/testing/templates.go b/pkg/testing/templates.go index da549c9b8..eca3e393d 100644 --- a/pkg/testing/templates.go +++ b/pkg/testing/templates.go @@ -23,6 +23,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" "sigs.k8s.io/yaml" "github.com/vmware-tanzu/cartographer/pkg/apis/v1alpha1" @@ -37,7 +38,7 @@ type Inputs struct { } type ValidatableTemplate interface { - ValidateCreate() error + ValidateCreate() (admission.Warnings, error) client.Object }