diff --git a/Makefile b/Makefile index a57f1d266..5decdf632 100644 --- a/Makefile +++ b/Makefile @@ -29,13 +29,13 @@ GOLANGCI_LINT_VER := v1.62.2 GOLANGCI_LINT_BIN := golangci-lint GOLANGCI_LINT := $(GOBIN_DIR)/$(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VER) -KUBE_CLIENT_GEN_VER := v0.32.0 +KUBE_CLIENT_GEN_VER := v0.32.3 KUBE_CLIENT_GEN_BIN := client-gen -KUBE_LISTER_GEN_VER := v0.32.0 +KUBE_LISTER_GEN_VER := v0.32.3 KUBE_LISTER_GEN_BIN := lister-gen -KUBE_INFORMER_GEN_VER := v0.32.0 +KUBE_INFORMER_GEN_VER := v0.32.3 KUBE_INFORMER_GEN_BIN := informer-gen -KUBE_APPLYCONFIGURATION_GEN_VER := v0.32.0 +KUBE_APPLYCONFIGURATION_GEN_VER := v0.32.3 KUBE_APPLYCONFIGURATION_GEN_BIN := applyconfiguration-gen KUBE_CLIENT_GEN := $(GOBIN_DIR)/$(KUBE_CLIENT_GEN_BIN)-$(KUBE_CLIENT_GEN_VER) @@ -98,6 +98,7 @@ lint: $(GOLANGCI_LINT) .PHONY: test test: go test ./... + cd examples; go test ./... # Note, running this locally if you have any modified files, even those that are not generated, # will result in an error. This target is mostly for CI jobs. diff --git a/examples/go.mod b/examples/go.mod index 8aff2ec57..f4f478801 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -5,11 +5,11 @@ go 1.23.0 replace acme.corp/pkg => ./pkg require ( - github.com/kcp-dev/apimachinery/v2 v2.0.1-0.20241230150911-cd7529a844f3 + github.com/kcp-dev/apimachinery/v2 v2.0.1-0.20250425065633-635c2a0fbaba github.com/kcp-dev/client-go v0.0.0-20230927101349-0416c830e3b1 - github.com/kcp-dev/logicalcluster/v3 v3.0.4 - k8s.io/apimachinery v0.32.0 - k8s.io/client-go v0.32.0 + github.com/kcp-dev/logicalcluster/v3 v3.0.5 + k8s.io/apimachinery v0.32.3 + k8s.io/client-go v0.32.3 sigs.k8s.io/structured-merge-diff/v4 v4.4.2 ) @@ -25,7 +25,7 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/gnostic-models v0.6.8 // indirect - github.com/google/go-cmp v0.6.0 // indirect + github.com/google/go-cmp v0.7.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.6.0 // indirect github.com/josharian/intern v1.0.0 // indirect @@ -36,17 +36,17 @@ require ( github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/x448/float16 v0.8.4 // indirect - golang.org/x/net v0.30.0 // indirect - golang.org/x/oauth2 v0.23.0 // indirect - golang.org/x/sys v0.26.0 // indirect - golang.org/x/term v0.25.0 // indirect - golang.org/x/text v0.19.0 // indirect - golang.org/x/time v0.7.0 // indirect + golang.org/x/net v0.39.0 // indirect + golang.org/x/oauth2 v0.29.0 // indirect + golang.org/x/sys v0.32.0 // indirect + golang.org/x/term v0.31.0 // indirect + golang.org/x/text v0.24.0 // indirect + golang.org/x/time v0.11.0 // indirect google.golang.org/protobuf v1.35.1 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.32.0 // indirect + k8s.io/api v0.32.3 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect diff --git a/examples/go.sum b/examples/go.sum index f3b7a2640..6de4bc8fe 100644 --- a/examples/go.sum +++ b/examples/go.sum @@ -28,8 +28,8 @@ github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6 github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= 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= @@ -41,12 +41,12 @@ github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8Hm github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= 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/kcp-dev/apimachinery/v2 v2.0.1-0.20241230150911-cd7529a844f3 h1:c9j9T9Q5g7o8VhC1SqfN/J/RdbcKQODbg3giJUigtYI= -github.com/kcp-dev/apimachinery/v2 v2.0.1-0.20241230150911-cd7529a844f3/go.mod h1:LRmJklLHYYIpEPIYG4GaF8NkCCrmMMQbaMQlhaOTjvU= +github.com/kcp-dev/apimachinery/v2 v2.0.1-0.20250425065633-635c2a0fbaba h1:Ar/8wsCQWrZgRiBF2B5xCqCXEA/oiiuDI0yEsUtrxRs= +github.com/kcp-dev/apimachinery/v2 v2.0.1-0.20250425065633-635c2a0fbaba/go.mod h1:pYqnaSG3NlF/pVwfnYCAdGvrA7FpALFmd5S9X4XXf1Q= github.com/kcp-dev/client-go v0.0.0-20230927101349-0416c830e3b1 h1:cyRhjhVSmcUqsMg0wh+DB/DjlpV58nhRpJYxRgCjayA= github.com/kcp-dev/client-go v0.0.0-20230927101349-0416c830e3b1/go.mod h1:XfQFbR0lb2SsNEiAcR0ktxzgjlcJQpiWLX+OHw3a5ac= -github.com/kcp-dev/logicalcluster/v3 v3.0.4 h1:q7KngML/QM7sWl8aVzmfZF0TPMnBwYNxsPKfwUvvBvU= -github.com/kcp-dev/logicalcluster/v3 v3.0.4/go.mod h1:EWBUBxdr49fUB1cLMO4nOdBWmYifLbP1LfoL20KkXYY= +github.com/kcp-dev/logicalcluster/v3 v3.0.5 h1:JbYakokb+5Uinz09oTXomSUJVQsqfxEvU4RyHUYxHOU= +github.com/kcp-dev/logicalcluster/v3 v3.0.5/go.mod h1:EWBUBxdr49fUB1cLMO4nOdBWmYifLbP1LfoL20KkXYY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -85,8 +85,8 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -100,26 +100,26 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= -golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= -golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= -golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY= +golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E= +golang.org/x/oauth2 v0.29.0 h1:WdYw2tdTK1S8olAzWHdgeqfy+Mtm9XNhv/xJsY65d98= +golang.org/x/oauth2 v0.29.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= 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-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= -golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= +golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= -golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= -golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= +golang.org/x/time v0.11.0 h1:/bpjEDfN9tkoN/ryeYHnv5hcMlc8ncjMcM4XBk5NWV0= +golang.org/x/time v0.11.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -142,12 +142,12 @@ gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/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= -k8s.io/api v0.32.0 h1:OL9JpbvAU5ny9ga2fb24X8H6xQlVp+aJMFlgtQjR9CE= -k8s.io/api v0.32.0/go.mod h1:4LEwHZEf6Q/cG96F3dqR965sYOfmPM7rq81BLgsE0p0= -k8s.io/apimachinery v0.32.0 h1:cFSE7N3rmEEtv4ei5X6DaJPHHX0C+upp+v5lVPiEwpg= -k8s.io/apimachinery v0.32.0/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= -k8s.io/client-go v0.32.0 h1:DimtMcnN/JIKZcrSrstiwvvZvLjG0aSxy8PxN8IChp8= -k8s.io/client-go v0.32.0/go.mod h1:boDWvdM1Drk4NJj/VddSLnx59X3OPgwrOo0vGbtq9+8= +k8s.io/api v0.32.3 h1:Hw7KqxRusq+6QSplE3NYG4MBxZw1BZnq4aP4cJVINls= +k8s.io/api v0.32.3/go.mod h1:2wEDTXADtm/HA7CCMD8D8bK4yuBUptzaRhYcYEEYA3k= +k8s.io/apimachinery v0.32.3 h1:JmDuDarhDmA/Li7j3aPrwhpNBA94Nvk5zLeOge9HH1U= +k8s.io/apimachinery v0.32.3/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= +k8s.io/client-go v0.32.3 h1:RKPVltzopkSgHS7aS98QdscAgtgah/+zmpAogooIqVU= +k8s.io/client-go v0.32.3/go.mod h1:3v0+3k4IcT9bXTc4V2rt+d2ZPPG700Xy6Oi0Gdl2PaY= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f h1:GA7//TjRY9yWGy1poLzYYJJ4JRdzg3+O6e8I+e+8T5Y= diff --git a/examples/pkg/apis/example/doc.go b/examples/pkg/apis/example/doc.go index 3238abfd6..327effea5 100644 --- a/examples/pkg/apis/example/doc.go +++ b/examples/pkg/apis/example/doc.go @@ -15,4 +15,5 @@ limitations under the License. */ // +k8s:deepcopy-gen=package,register +// +groupName=example.dev package example diff --git a/examples/pkg/apis/example/v1/doc.go b/examples/pkg/apis/example/v1/doc.go index 907f7bc67..d854351c1 100644 --- a/examples/pkg/apis/example/v1/doc.go +++ b/examples/pkg/apis/example/v1/doc.go @@ -15,4 +15,5 @@ limitations under the License. */ // +k8s:deepcopy-gen=package,register +// +groupName=example.dev package v1 diff --git a/examples/pkg/apis/example/v1alpha1/doc.go b/examples/pkg/apis/example/v1alpha1/doc.go index bfb9b5875..b44cedfa2 100644 --- a/examples/pkg/apis/example/v1alpha1/doc.go +++ b/examples/pkg/apis/example/v1alpha1/doc.go @@ -15,4 +15,5 @@ limitations under the License. */ // +k8s:deepcopy-gen=package,register +// +groupName=example.dev package v1alpha1 diff --git a/examples/pkg/apis/example/v1beta1/doc.go b/examples/pkg/apis/example/v1beta1/doc.go index 4898c9788..34d9b9dc3 100644 --- a/examples/pkg/apis/example/v1beta1/doc.go +++ b/examples/pkg/apis/example/v1beta1/doc.go @@ -15,4 +15,5 @@ limitations under the License. */ // +k8s:deepcopy-gen=package,register +// +groupName=example.dev package v1beta1 diff --git a/examples/pkg/apis/example/v2/doc.go b/examples/pkg/apis/example/v2/doc.go index 352a93762..90917aae7 100644 --- a/examples/pkg/apis/example/v2/doc.go +++ b/examples/pkg/apis/example/v2/doc.go @@ -15,4 +15,5 @@ limitations under the License. */ // +k8s:deepcopy-gen=package,register +// +groupName=example.dev package v2 diff --git a/examples/pkg/apis/example3/register.go b/examples/pkg/apis/example3/register.go index a529c01f1..885ca8587 100644 --- a/examples/pkg/apis/example3/register.go +++ b/examples/pkg/apis/example3/register.go @@ -17,5 +17,5 @@ limitations under the License. package example const ( - GroupName = "example3.dev" + GroupName = "example3.some.corp" ) diff --git a/examples/pkg/apis/existinginterfaces/register.go b/examples/pkg/apis/existinginterfaces/register.go index a4e8efd75..54fa947df 100644 --- a/examples/pkg/apis/existinginterfaces/register.go +++ b/examples/pkg/apis/existinginterfaces/register.go @@ -17,5 +17,5 @@ limitations under the License. package existinginterfaces const ( - GroupName = "existinginterfaces.dev" + GroupName = "existinginterfaces.acme.corp" ) diff --git a/examples/pkg/apis/secondexample/v1/doc.go b/examples/pkg/apis/secondexample/v1/doc.go index 907f7bc67..73f017d52 100644 --- a/examples/pkg/apis/secondexample/v1/doc.go +++ b/examples/pkg/apis/secondexample/v1/doc.go @@ -15,4 +15,5 @@ limitations under the License. */ // +k8s:deepcopy-gen=package,register +// +groupName=secondexample.dev package v1 diff --git a/examples/pkg/generated/applyconfigurations/example/v1/clustertesttype.go b/examples/pkg/generated/applyconfigurations/example/v1/clustertesttype.go index d253d9807..d09b09c3c 100644 --- a/examples/pkg/generated/applyconfigurations/example/v1/clustertesttype.go +++ b/examples/pkg/generated/applyconfigurations/example/v1/clustertesttype.go @@ -40,7 +40,7 @@ func ClusterTestType(name string) *ClusterTestTypeApplyConfiguration { b := &ClusterTestTypeApplyConfiguration{} b.WithName(name) b.WithKind("ClusterTestType") - b.WithAPIVersion("example/v1") + b.WithAPIVersion("example.dev/v1") return b } diff --git a/examples/pkg/generated/applyconfigurations/example/v1/testtype.go b/examples/pkg/generated/applyconfigurations/example/v1/testtype.go index 4eb03f6c4..2359dadf3 100644 --- a/examples/pkg/generated/applyconfigurations/example/v1/testtype.go +++ b/examples/pkg/generated/applyconfigurations/example/v1/testtype.go @@ -39,7 +39,7 @@ func TestType(name, namespace string) *TestTypeApplyConfiguration { b.WithName(name) b.WithNamespace(namespace) b.WithKind("TestType") - b.WithAPIVersion("example/v1") + b.WithAPIVersion("example.dev/v1") return b } diff --git a/examples/pkg/generated/applyconfigurations/example/v1/withoutverbtype.go b/examples/pkg/generated/applyconfigurations/example/v1/withoutverbtype.go index 3db838628..b632d6c19 100644 --- a/examples/pkg/generated/applyconfigurations/example/v1/withoutverbtype.go +++ b/examples/pkg/generated/applyconfigurations/example/v1/withoutverbtype.go @@ -38,7 +38,7 @@ func WithoutVerbType(name, namespace string) *WithoutVerbTypeApplyConfiguration b.WithName(name) b.WithNamespace(namespace) b.WithKind("WithoutVerbType") - b.WithAPIVersion("example/v1") + b.WithAPIVersion("example.dev/v1") return b } diff --git a/examples/pkg/generated/applyconfigurations/example/v1alpha1/clustertesttype.go b/examples/pkg/generated/applyconfigurations/example/v1alpha1/clustertesttype.go index f479271f8..4a5fb60d2 100644 --- a/examples/pkg/generated/applyconfigurations/example/v1alpha1/clustertesttype.go +++ b/examples/pkg/generated/applyconfigurations/example/v1alpha1/clustertesttype.go @@ -40,7 +40,7 @@ func ClusterTestType(name string) *ClusterTestTypeApplyConfiguration { b := &ClusterTestTypeApplyConfiguration{} b.WithName(name) b.WithKind("ClusterTestType") - b.WithAPIVersion("example/v1alpha1") + b.WithAPIVersion("example.dev/v1alpha1") return b } diff --git a/examples/pkg/generated/applyconfigurations/example/v1alpha1/testtype.go b/examples/pkg/generated/applyconfigurations/example/v1alpha1/testtype.go index 50906a9cc..769990e0c 100644 --- a/examples/pkg/generated/applyconfigurations/example/v1alpha1/testtype.go +++ b/examples/pkg/generated/applyconfigurations/example/v1alpha1/testtype.go @@ -39,7 +39,7 @@ func TestType(name, namespace string) *TestTypeApplyConfiguration { b.WithName(name) b.WithNamespace(namespace) b.WithKind("TestType") - b.WithAPIVersion("example/v1alpha1") + b.WithAPIVersion("example.dev/v1alpha1") return b } diff --git a/examples/pkg/generated/applyconfigurations/example/v1beta1/clustertesttype.go b/examples/pkg/generated/applyconfigurations/example/v1beta1/clustertesttype.go index b6516e0ab..26eca6f9f 100644 --- a/examples/pkg/generated/applyconfigurations/example/v1beta1/clustertesttype.go +++ b/examples/pkg/generated/applyconfigurations/example/v1beta1/clustertesttype.go @@ -40,7 +40,7 @@ func ClusterTestType(name string) *ClusterTestTypeApplyConfiguration { b := &ClusterTestTypeApplyConfiguration{} b.WithName(name) b.WithKind("ClusterTestType") - b.WithAPIVersion("example/v1beta1") + b.WithAPIVersion("example.dev/v1beta1") return b } diff --git a/examples/pkg/generated/applyconfigurations/example/v1beta1/testtype.go b/examples/pkg/generated/applyconfigurations/example/v1beta1/testtype.go index f10cf3806..415c6324b 100644 --- a/examples/pkg/generated/applyconfigurations/example/v1beta1/testtype.go +++ b/examples/pkg/generated/applyconfigurations/example/v1beta1/testtype.go @@ -39,7 +39,7 @@ func TestType(name, namespace string) *TestTypeApplyConfiguration { b.WithName(name) b.WithNamespace(namespace) b.WithKind("TestType") - b.WithAPIVersion("example/v1beta1") + b.WithAPIVersion("example.dev/v1beta1") return b } diff --git a/examples/pkg/generated/applyconfigurations/example/v2/clustertesttype.go b/examples/pkg/generated/applyconfigurations/example/v2/clustertesttype.go index 8b79a777d..706848ba6 100644 --- a/examples/pkg/generated/applyconfigurations/example/v2/clustertesttype.go +++ b/examples/pkg/generated/applyconfigurations/example/v2/clustertesttype.go @@ -40,7 +40,7 @@ func ClusterTestType(name string) *ClusterTestTypeApplyConfiguration { b := &ClusterTestTypeApplyConfiguration{} b.WithName(name) b.WithKind("ClusterTestType") - b.WithAPIVersion("example/v2") + b.WithAPIVersion("example.dev/v2") return b } diff --git a/examples/pkg/generated/applyconfigurations/example/v2/testtype.go b/examples/pkg/generated/applyconfigurations/example/v2/testtype.go index 4b05c0544..62998eaea 100644 --- a/examples/pkg/generated/applyconfigurations/example/v2/testtype.go +++ b/examples/pkg/generated/applyconfigurations/example/v2/testtype.go @@ -39,7 +39,7 @@ func TestType(name, namespace string) *TestTypeApplyConfiguration { b.WithName(name) b.WithNamespace(namespace) b.WithKind("TestType") - b.WithAPIVersion("example/v2") + b.WithAPIVersion("example.dev/v2") return b } diff --git a/examples/pkg/generated/applyconfigurations/secondexample/v1/clustertesttype.go b/examples/pkg/generated/applyconfigurations/secondexample/v1/clustertesttype.go index ffebc0ed2..6c95010e0 100644 --- a/examples/pkg/generated/applyconfigurations/secondexample/v1/clustertesttype.go +++ b/examples/pkg/generated/applyconfigurations/secondexample/v1/clustertesttype.go @@ -40,7 +40,7 @@ func ClusterTestType(name string) *ClusterTestTypeApplyConfiguration { b := &ClusterTestTypeApplyConfiguration{} b.WithName(name) b.WithKind("ClusterTestType") - b.WithAPIVersion("secondexample/v1") + b.WithAPIVersion("secondexample.dev/v1") return b } diff --git a/examples/pkg/generated/applyconfigurations/secondexample/v1/testtype.go b/examples/pkg/generated/applyconfigurations/secondexample/v1/testtype.go index 6a326a6cf..4d24b3426 100644 --- a/examples/pkg/generated/applyconfigurations/secondexample/v1/testtype.go +++ b/examples/pkg/generated/applyconfigurations/secondexample/v1/testtype.go @@ -39,7 +39,7 @@ func TestType(name, namespace string) *TestTypeApplyConfiguration { b.WithName(name) b.WithNamespace(namespace) b.WithKind("TestType") - b.WithAPIVersion("secondexample/v1") + b.WithAPIVersion("secondexample.dev/v1") return b } diff --git a/examples/pkg/generated/applyconfigurations/utils.go b/examples/pkg/generated/applyconfigurations/utils.go index 37a5360df..1475c6953 100644 --- a/examples/pkg/generated/applyconfigurations/utils.go +++ b/examples/pkg/generated/applyconfigurations/utils.go @@ -23,20 +23,20 @@ import ( schema "k8s.io/apimachinery/pkg/runtime/schema" testing "k8s.io/client-go/testing" - v1 "acme.corp/pkg/apis/example/v1" + examplev1 "acme.corp/pkg/apis/example/v1" v1alpha1 "acme.corp/pkg/apis/example/v1alpha1" v1beta1 "acme.corp/pkg/apis/example/v1beta1" v2 "acme.corp/pkg/apis/example/v2" example3v1 "acme.corp/pkg/apis/example3/v1" - exampledashedv1 "acme.corp/pkg/apis/exampledashed/v1" + v1 "acme.corp/pkg/apis/exampledashed/v1" existinginterfacesv1 "acme.corp/pkg/apis/existinginterfaces/v1" secondexamplev1 "acme.corp/pkg/apis/secondexample/v1" - examplev1 "acme.corp/pkg/generated/applyconfigurations/example/v1" + applyconfigurationsexamplev1 "acme.corp/pkg/generated/applyconfigurations/example/v1" examplev1alpha1 "acme.corp/pkg/generated/applyconfigurations/example/v1alpha1" examplev1beta1 "acme.corp/pkg/generated/applyconfigurations/example/v1beta1" examplev2 "acme.corp/pkg/generated/applyconfigurations/example/v2" applyconfigurationsexample3v1 "acme.corp/pkg/generated/applyconfigurations/example3/v1" - applyconfigurationsexampledashedv1 "acme.corp/pkg/generated/applyconfigurations/exampledashed/v1" + exampledashedv1 "acme.corp/pkg/generated/applyconfigurations/exampledashed/v1" applyconfigurationsexistinginterfacesv1 "acme.corp/pkg/generated/applyconfigurations/existinginterfaces/v1" internal "acme.corp/pkg/generated/applyconfigurations/internal" applyconfigurationssecondexamplev1 "acme.corp/pkg/generated/applyconfigurations/secondexample/v1" @@ -46,17 +46,25 @@ import ( // apply configuration type exists for the given GroupVersionKind. func ForKind(kind schema.GroupVersionKind) interface{} { switch kind { - // Group=example, Version=v1 + // Group=example-dashed.some.corp, Version=v1 case v1.SchemeGroupVersion.WithKind("ClusterTestType"): - return &examplev1.ClusterTestTypeApplyConfiguration{} + return &exampledashedv1.ClusterTestTypeApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("ClusterTestTypeStatus"): - return &examplev1.ClusterTestTypeStatusApplyConfiguration{} + return &exampledashedv1.ClusterTestTypeStatusApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("TestType"): - return &examplev1.TestTypeApplyConfiguration{} - case v1.SchemeGroupVersion.WithKind("WithoutVerbType"): - return &examplev1.WithoutVerbTypeApplyConfiguration{} - - // Group=example, Version=v1alpha1 + return &exampledashedv1.TestTypeApplyConfiguration{} + + // Group=example.dev, Version=v1 + case examplev1.SchemeGroupVersion.WithKind("ClusterTestType"): + return &applyconfigurationsexamplev1.ClusterTestTypeApplyConfiguration{} + case examplev1.SchemeGroupVersion.WithKind("ClusterTestTypeStatus"): + return &applyconfigurationsexamplev1.ClusterTestTypeStatusApplyConfiguration{} + case examplev1.SchemeGroupVersion.WithKind("TestType"): + return &applyconfigurationsexamplev1.TestTypeApplyConfiguration{} + case examplev1.SchemeGroupVersion.WithKind("WithoutVerbType"): + return &applyconfigurationsexamplev1.WithoutVerbTypeApplyConfiguration{} + + // Group=example.dev, Version=v1alpha1 case v1alpha1.SchemeGroupVersion.WithKind("ClusterTestType"): return &examplev1alpha1.ClusterTestTypeApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("ClusterTestTypeStatus"): @@ -64,7 +72,7 @@ func ForKind(kind schema.GroupVersionKind) interface{} { case v1alpha1.SchemeGroupVersion.WithKind("TestType"): return &examplev1alpha1.TestTypeApplyConfiguration{} - // Group=example, Version=v1beta1 + // Group=example.dev, Version=v1beta1 case v1beta1.SchemeGroupVersion.WithKind("ClusterTestType"): return &examplev1beta1.ClusterTestTypeApplyConfiguration{} case v1beta1.SchemeGroupVersion.WithKind("ClusterTestTypeStatus"): @@ -72,7 +80,7 @@ func ForKind(kind schema.GroupVersionKind) interface{} { case v1beta1.SchemeGroupVersion.WithKind("TestType"): return &examplev1beta1.TestTypeApplyConfiguration{} - // Group=example, Version=v2 + // Group=example.dev, Version=v2 case v2.SchemeGroupVersion.WithKind("ClusterTestType"): return &examplev2.ClusterTestTypeApplyConfiguration{} case v2.SchemeGroupVersion.WithKind("ClusterTestTypeStatus"): @@ -80,14 +88,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} { case v2.SchemeGroupVersion.WithKind("TestType"): return &examplev2.TestTypeApplyConfiguration{} - // Group=example-dashed.some.corp, Version=v1 - case exampledashedv1.SchemeGroupVersion.WithKind("ClusterTestType"): - return &applyconfigurationsexampledashedv1.ClusterTestTypeApplyConfiguration{} - case exampledashedv1.SchemeGroupVersion.WithKind("ClusterTestTypeStatus"): - return &applyconfigurationsexampledashedv1.ClusterTestTypeStatusApplyConfiguration{} - case exampledashedv1.SchemeGroupVersion.WithKind("TestType"): - return &applyconfigurationsexampledashedv1.TestTypeApplyConfiguration{} - // Group=example3.some.corp, Version=v1 case example3v1.SchemeGroupVersion.WithKind("ClusterTestType"): return &applyconfigurationsexample3v1.ClusterTestTypeApplyConfiguration{} @@ -104,7 +104,7 @@ func ForKind(kind schema.GroupVersionKind) interface{} { case existinginterfacesv1.SchemeGroupVersion.WithKind("TestType"): return &applyconfigurationsexistinginterfacesv1.TestTypeApplyConfiguration{} - // Group=secondexample, Version=v1 + // Group=secondexample.dev, Version=v1 case secondexamplev1.SchemeGroupVersion.WithKind("ClusterTestType"): return &applyconfigurationssecondexamplev1.ClusterTestTypeApplyConfiguration{} case secondexamplev1.SchemeGroupVersion.WithKind("ClusterTestTypeStatus"): diff --git a/examples/pkg/generated/clientset/versioned/typed/example/v1/example_client.go b/examples/pkg/generated/clientset/versioned/typed/example/v1/example_client.go index edae45818..cc1fc8cc8 100644 --- a/examples/pkg/generated/clientset/versioned/typed/example/v1/example_client.go +++ b/examples/pkg/generated/clientset/versioned/typed/example/v1/example_client.go @@ -34,7 +34,7 @@ type ExampleV1Interface interface { WithoutVerbTypesGetter } -// ExampleV1Client is used to interact with features provided by the example group. +// ExampleV1Client is used to interact with features provided by the example.dev group. type ExampleV1Client struct { restClient rest.Interface } diff --git a/examples/pkg/generated/clientset/versioned/typed/example/v1alpha1/example_client.go b/examples/pkg/generated/clientset/versioned/typed/example/v1alpha1/example_client.go index d59494a41..8ed8908e9 100644 --- a/examples/pkg/generated/clientset/versioned/typed/example/v1alpha1/example_client.go +++ b/examples/pkg/generated/clientset/versioned/typed/example/v1alpha1/example_client.go @@ -33,7 +33,7 @@ type ExampleV1alpha1Interface interface { TestTypesGetter } -// ExampleV1alpha1Client is used to interact with features provided by the example group. +// ExampleV1alpha1Client is used to interact with features provided by the example.dev group. type ExampleV1alpha1Client struct { restClient rest.Interface } diff --git a/examples/pkg/generated/clientset/versioned/typed/example/v1beta1/example_client.go b/examples/pkg/generated/clientset/versioned/typed/example/v1beta1/example_client.go index 1e53a2632..5d1503fc7 100644 --- a/examples/pkg/generated/clientset/versioned/typed/example/v1beta1/example_client.go +++ b/examples/pkg/generated/clientset/versioned/typed/example/v1beta1/example_client.go @@ -33,7 +33,7 @@ type ExampleV1beta1Interface interface { TestTypesGetter } -// ExampleV1beta1Client is used to interact with features provided by the example group. +// ExampleV1beta1Client is used to interact with features provided by the example.dev group. type ExampleV1beta1Client struct { restClient rest.Interface } diff --git a/examples/pkg/generated/clientset/versioned/typed/example/v2/example_client.go b/examples/pkg/generated/clientset/versioned/typed/example/v2/example_client.go index f9790b779..670ee9626 100644 --- a/examples/pkg/generated/clientset/versioned/typed/example/v2/example_client.go +++ b/examples/pkg/generated/clientset/versioned/typed/example/v2/example_client.go @@ -33,7 +33,7 @@ type ExampleV2Interface interface { TestTypesGetter } -// ExampleV2Client is used to interact with features provided by the example group. +// ExampleV2Client is used to interact with features provided by the example.dev group. type ExampleV2Client struct { restClient rest.Interface } diff --git a/examples/pkg/generated/clientset/versioned/typed/secondexample/v1/secondexample_client.go b/examples/pkg/generated/clientset/versioned/typed/secondexample/v1/secondexample_client.go index f3bab9db4..1b2307f0a 100644 --- a/examples/pkg/generated/clientset/versioned/typed/secondexample/v1/secondexample_client.go +++ b/examples/pkg/generated/clientset/versioned/typed/secondexample/v1/secondexample_client.go @@ -33,7 +33,7 @@ type SecondexampleV1Interface interface { TestTypesGetter } -// SecondexampleV1Client is used to interact with features provided by the secondexample group. +// SecondexampleV1Client is used to interact with features provided by the secondexample.dev group. type SecondexampleV1Client struct { restClient rest.Interface } diff --git a/examples/pkg/generated/informers/externalversions/generic.go b/examples/pkg/generated/informers/externalversions/generic.go index 4e443e1ff..bebcffc6a 100644 --- a/examples/pkg/generated/informers/externalversions/generic.go +++ b/examples/pkg/generated/informers/externalversions/generic.go @@ -24,12 +24,12 @@ import ( schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" - v1 "acme.corp/pkg/apis/example/v1" + examplev1 "acme.corp/pkg/apis/example/v1" v1alpha1 "acme.corp/pkg/apis/example/v1alpha1" v1beta1 "acme.corp/pkg/apis/example/v1beta1" v2 "acme.corp/pkg/apis/example/v2" example3v1 "acme.corp/pkg/apis/example3/v1" - exampledashedv1 "acme.corp/pkg/apis/exampledashed/v1" + v1 "acme.corp/pkg/apis/exampledashed/v1" existinginterfacesv1 "acme.corp/pkg/apis/existinginterfaces/v1" secondexamplev1 "acme.corp/pkg/apis/secondexample/v1" ) @@ -60,36 +60,36 @@ func (f *genericInformer) Lister() cache.GenericLister { // TODO extend this to unknown resources with a client pool func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { switch resource { - // Group=example, Version=v1 + // Group=example-dashed.some.corp, Version=v1 case v1.SchemeGroupVersion.WithResource("clustertesttypes"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Example().V1().ClusterTestTypes().Informer()}, nil + return &genericInformer{resource: resource.GroupResource(), informer: f.ExampleDashed().V1().ClusterTestTypes().Informer()}, nil case v1.SchemeGroupVersion.WithResource("testtypes"): + return &genericInformer{resource: resource.GroupResource(), informer: f.ExampleDashed().V1().TestTypes().Informer()}, nil + + // Group=example.dev, Version=v1 + case examplev1.SchemeGroupVersion.WithResource("clustertesttypes"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Example().V1().ClusterTestTypes().Informer()}, nil + case examplev1.SchemeGroupVersion.WithResource("testtypes"): return &genericInformer{resource: resource.GroupResource(), informer: f.Example().V1().TestTypes().Informer()}, nil - // Group=example, Version=v1alpha1 + // Group=example.dev, Version=v1alpha1 case v1alpha1.SchemeGroupVersion.WithResource("clustertesttypes"): return &genericInformer{resource: resource.GroupResource(), informer: f.Example().V1alpha1().ClusterTestTypes().Informer()}, nil case v1alpha1.SchemeGroupVersion.WithResource("testtypes"): return &genericInformer{resource: resource.GroupResource(), informer: f.Example().V1alpha1().TestTypes().Informer()}, nil - // Group=example, Version=v1beta1 + // Group=example.dev, Version=v1beta1 case v1beta1.SchemeGroupVersion.WithResource("clustertesttypes"): return &genericInformer{resource: resource.GroupResource(), informer: f.Example().V1beta1().ClusterTestTypes().Informer()}, nil case v1beta1.SchemeGroupVersion.WithResource("testtypes"): return &genericInformer{resource: resource.GroupResource(), informer: f.Example().V1beta1().TestTypes().Informer()}, nil - // Group=example, Version=v2 + // Group=example.dev, Version=v2 case v2.SchemeGroupVersion.WithResource("clustertesttypes"): return &genericInformer{resource: resource.GroupResource(), informer: f.Example().V2().ClusterTestTypes().Informer()}, nil case v2.SchemeGroupVersion.WithResource("testtypes"): return &genericInformer{resource: resource.GroupResource(), informer: f.Example().V2().TestTypes().Informer()}, nil - // Group=example-dashed.some.corp, Version=v1 - case exampledashedv1.SchemeGroupVersion.WithResource("clustertesttypes"): - return &genericInformer{resource: resource.GroupResource(), informer: f.ExampleDashed().V1().ClusterTestTypes().Informer()}, nil - case exampledashedv1.SchemeGroupVersion.WithResource("testtypes"): - return &genericInformer{resource: resource.GroupResource(), informer: f.ExampleDashed().V1().TestTypes().Informer()}, nil - // Group=example3.some.corp, Version=v1 case example3v1.SchemeGroupVersion.WithResource("clustertesttypes"): return &genericInformer{resource: resource.GroupResource(), informer: f.Example3().V1().ClusterTestTypes().Informer()}, nil @@ -102,7 +102,7 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case existinginterfacesv1.SchemeGroupVersion.WithResource("testtypes"): return &genericInformer{resource: resource.GroupResource(), informer: f.Existinginterfaces().V1().TestTypes().Informer()}, nil - // Group=secondexample, Version=v1 + // Group=secondexample.dev, Version=v1 case secondexamplev1.SchemeGroupVersion.WithResource("clustertesttypes"): return &genericInformer{resource: resource.GroupResource(), informer: f.Secondexample().V1().ClusterTestTypes().Informer()}, nil case secondexamplev1.SchemeGroupVersion.WithResource("testtypes"): diff --git a/examples/pkg/kcp/clients/clientset/versioned/typed/example/v1/fake/clustertesttype.go b/examples/pkg/kcp/clients/clientset/versioned/typed/example/v1/fake/clustertesttype.go index 61133c33b..94baccdfa 100644 --- a/examples/pkg/kcp/clients/clientset/versioned/typed/example/v1/fake/clustertesttype.go +++ b/examples/pkg/kcp/clients/clientset/versioned/typed/example/v1/fake/clustertesttype.go @@ -38,8 +38,8 @@ import ( examplev1client "acme.corp/pkg/generated/clientset/versioned/typed/example/v1" ) -var clusterTestTypesResource = schema.GroupVersionResource{Group: "example", Version: "v1", Resource: "clustertesttypes"} -var clusterTestTypesKind = schema.GroupVersionKind{Group: "example", Version: "v1", Kind: "ClusterTestType"} +var clusterTestTypesResource = schema.GroupVersionResource{Group: "example.dev", Version: "v1", Resource: "clustertesttypes"} +var clusterTestTypesKind = schema.GroupVersionKind{Group: "example.dev", Version: "v1", Kind: "ClusterTestType"} type clusterTestTypesClusterClient struct { *kcptesting.Fake diff --git a/examples/pkg/kcp/clients/clientset/versioned/typed/example/v1/fake/testtype.go b/examples/pkg/kcp/clients/clientset/versioned/typed/example/v1/fake/testtype.go index 81dffa362..61d0d11ed 100644 --- a/examples/pkg/kcp/clients/clientset/versioned/typed/example/v1/fake/testtype.go +++ b/examples/pkg/kcp/clients/clientset/versioned/typed/example/v1/fake/testtype.go @@ -39,8 +39,8 @@ import ( kcpexamplev1 "acme.corp/pkg/kcp/clients/clientset/versioned/typed/example/v1" ) -var testTypesResource = schema.GroupVersionResource{Group: "example", Version: "v1", Resource: "testtypes"} -var testTypesKind = schema.GroupVersionKind{Group: "example", Version: "v1", Kind: "TestType"} +var testTypesResource = schema.GroupVersionResource{Group: "example.dev", Version: "v1", Resource: "testtypes"} +var testTypesKind = schema.GroupVersionKind{Group: "example.dev", Version: "v1", Kind: "TestType"} type testTypesClusterClient struct { *kcptesting.Fake diff --git a/examples/pkg/kcp/clients/clientset/versioned/typed/example/v1/fake/withoutverbtype.go b/examples/pkg/kcp/clients/clientset/versioned/typed/example/v1/fake/withoutverbtype.go index f668dcf57..f2c158669 100644 --- a/examples/pkg/kcp/clients/clientset/versioned/typed/example/v1/fake/withoutverbtype.go +++ b/examples/pkg/kcp/clients/clientset/versioned/typed/example/v1/fake/withoutverbtype.go @@ -28,8 +28,8 @@ import ( kcpexamplev1 "acme.corp/pkg/kcp/clients/clientset/versioned/typed/example/v1" ) -var withoutVerbTypesResource = schema.GroupVersionResource{Group: "example", Version: "v1", Resource: "withoutverbtypes"} -var withoutVerbTypesKind = schema.GroupVersionKind{Group: "example", Version: "v1", Kind: "WithoutVerbType"} +var withoutVerbTypesResource = schema.GroupVersionResource{Group: "example.dev", Version: "v1", Resource: "withoutverbtypes"} +var withoutVerbTypesKind = schema.GroupVersionKind{Group: "example.dev", Version: "v1", Kind: "WithoutVerbType"} type withoutVerbTypesClusterClient struct { *kcptesting.Fake diff --git a/examples/pkg/kcp/clients/clientset/versioned/typed/example/v1alpha1/fake/clustertesttype.go b/examples/pkg/kcp/clients/clientset/versioned/typed/example/v1alpha1/fake/clustertesttype.go index c1bbe02d1..fff689735 100644 --- a/examples/pkg/kcp/clients/clientset/versioned/typed/example/v1alpha1/fake/clustertesttype.go +++ b/examples/pkg/kcp/clients/clientset/versioned/typed/example/v1alpha1/fake/clustertesttype.go @@ -38,8 +38,8 @@ import ( examplev1alpha1client "acme.corp/pkg/generated/clientset/versioned/typed/example/v1alpha1" ) -var clusterTestTypesResource = schema.GroupVersionResource{Group: "example", Version: "v1alpha1", Resource: "clustertesttypes"} -var clusterTestTypesKind = schema.GroupVersionKind{Group: "example", Version: "v1alpha1", Kind: "ClusterTestType"} +var clusterTestTypesResource = schema.GroupVersionResource{Group: "example.dev", Version: "v1alpha1", Resource: "clustertesttypes"} +var clusterTestTypesKind = schema.GroupVersionKind{Group: "example.dev", Version: "v1alpha1", Kind: "ClusterTestType"} type clusterTestTypesClusterClient struct { *kcptesting.Fake diff --git a/examples/pkg/kcp/clients/clientset/versioned/typed/example/v1alpha1/fake/testtype.go b/examples/pkg/kcp/clients/clientset/versioned/typed/example/v1alpha1/fake/testtype.go index e760b682e..d891ec1ad 100644 --- a/examples/pkg/kcp/clients/clientset/versioned/typed/example/v1alpha1/fake/testtype.go +++ b/examples/pkg/kcp/clients/clientset/versioned/typed/example/v1alpha1/fake/testtype.go @@ -39,8 +39,8 @@ import ( kcpexamplev1alpha1 "acme.corp/pkg/kcp/clients/clientset/versioned/typed/example/v1alpha1" ) -var testTypesResource = schema.GroupVersionResource{Group: "example", Version: "v1alpha1", Resource: "testtypes"} -var testTypesKind = schema.GroupVersionKind{Group: "example", Version: "v1alpha1", Kind: "TestType"} +var testTypesResource = schema.GroupVersionResource{Group: "example.dev", Version: "v1alpha1", Resource: "testtypes"} +var testTypesKind = schema.GroupVersionKind{Group: "example.dev", Version: "v1alpha1", Kind: "TestType"} type testTypesClusterClient struct { *kcptesting.Fake diff --git a/examples/pkg/kcp/clients/clientset/versioned/typed/example/v1beta1/fake/clustertesttype.go b/examples/pkg/kcp/clients/clientset/versioned/typed/example/v1beta1/fake/clustertesttype.go index 1fc2574d0..bb282611b 100644 --- a/examples/pkg/kcp/clients/clientset/versioned/typed/example/v1beta1/fake/clustertesttype.go +++ b/examples/pkg/kcp/clients/clientset/versioned/typed/example/v1beta1/fake/clustertesttype.go @@ -38,8 +38,8 @@ import ( examplev1beta1client "acme.corp/pkg/generated/clientset/versioned/typed/example/v1beta1" ) -var clusterTestTypesResource = schema.GroupVersionResource{Group: "example", Version: "v1beta1", Resource: "clustertesttypes"} -var clusterTestTypesKind = schema.GroupVersionKind{Group: "example", Version: "v1beta1", Kind: "ClusterTestType"} +var clusterTestTypesResource = schema.GroupVersionResource{Group: "example.dev", Version: "v1beta1", Resource: "clustertesttypes"} +var clusterTestTypesKind = schema.GroupVersionKind{Group: "example.dev", Version: "v1beta1", Kind: "ClusterTestType"} type clusterTestTypesClusterClient struct { *kcptesting.Fake diff --git a/examples/pkg/kcp/clients/clientset/versioned/typed/example/v1beta1/fake/testtype.go b/examples/pkg/kcp/clients/clientset/versioned/typed/example/v1beta1/fake/testtype.go index 2c35552fd..56b1ad634 100644 --- a/examples/pkg/kcp/clients/clientset/versioned/typed/example/v1beta1/fake/testtype.go +++ b/examples/pkg/kcp/clients/clientset/versioned/typed/example/v1beta1/fake/testtype.go @@ -39,8 +39,8 @@ import ( kcpexamplev1beta1 "acme.corp/pkg/kcp/clients/clientset/versioned/typed/example/v1beta1" ) -var testTypesResource = schema.GroupVersionResource{Group: "example", Version: "v1beta1", Resource: "testtypes"} -var testTypesKind = schema.GroupVersionKind{Group: "example", Version: "v1beta1", Kind: "TestType"} +var testTypesResource = schema.GroupVersionResource{Group: "example.dev", Version: "v1beta1", Resource: "testtypes"} +var testTypesKind = schema.GroupVersionKind{Group: "example.dev", Version: "v1beta1", Kind: "TestType"} type testTypesClusterClient struct { *kcptesting.Fake diff --git a/examples/pkg/kcp/clients/clientset/versioned/typed/example/v2/fake/clustertesttype.go b/examples/pkg/kcp/clients/clientset/versioned/typed/example/v2/fake/clustertesttype.go index 6079c9744..7e3cf4cb4 100644 --- a/examples/pkg/kcp/clients/clientset/versioned/typed/example/v2/fake/clustertesttype.go +++ b/examples/pkg/kcp/clients/clientset/versioned/typed/example/v2/fake/clustertesttype.go @@ -38,8 +38,8 @@ import ( examplev2client "acme.corp/pkg/generated/clientset/versioned/typed/example/v2" ) -var clusterTestTypesResource = schema.GroupVersionResource{Group: "example", Version: "v2", Resource: "clustertesttypes"} -var clusterTestTypesKind = schema.GroupVersionKind{Group: "example", Version: "v2", Kind: "ClusterTestType"} +var clusterTestTypesResource = schema.GroupVersionResource{Group: "example.dev", Version: "v2", Resource: "clustertesttypes"} +var clusterTestTypesKind = schema.GroupVersionKind{Group: "example.dev", Version: "v2", Kind: "ClusterTestType"} type clusterTestTypesClusterClient struct { *kcptesting.Fake diff --git a/examples/pkg/kcp/clients/clientset/versioned/typed/example/v2/fake/testtype.go b/examples/pkg/kcp/clients/clientset/versioned/typed/example/v2/fake/testtype.go index a431e9cc5..270778c8d 100644 --- a/examples/pkg/kcp/clients/clientset/versioned/typed/example/v2/fake/testtype.go +++ b/examples/pkg/kcp/clients/clientset/versioned/typed/example/v2/fake/testtype.go @@ -39,8 +39,8 @@ import ( kcpexamplev2 "acme.corp/pkg/kcp/clients/clientset/versioned/typed/example/v2" ) -var testTypesResource = schema.GroupVersionResource{Group: "example", Version: "v2", Resource: "testtypes"} -var testTypesKind = schema.GroupVersionKind{Group: "example", Version: "v2", Kind: "TestType"} +var testTypesResource = schema.GroupVersionResource{Group: "example.dev", Version: "v2", Resource: "testtypes"} +var testTypesKind = schema.GroupVersionKind{Group: "example.dev", Version: "v2", Kind: "TestType"} type testTypesClusterClient struct { *kcptesting.Fake diff --git a/examples/pkg/kcp/clients/clientset/versioned/typed/secondexample/v1/fake/clustertesttype.go b/examples/pkg/kcp/clients/clientset/versioned/typed/secondexample/v1/fake/clustertesttype.go index 0709c5b90..eae881b2b 100644 --- a/examples/pkg/kcp/clients/clientset/versioned/typed/secondexample/v1/fake/clustertesttype.go +++ b/examples/pkg/kcp/clients/clientset/versioned/typed/secondexample/v1/fake/clustertesttype.go @@ -38,8 +38,8 @@ import ( secondexamplev1client "acme.corp/pkg/generated/clientset/versioned/typed/secondexample/v1" ) -var clusterTestTypesResource = schema.GroupVersionResource{Group: "secondexample", Version: "v1", Resource: "clustertesttypes"} -var clusterTestTypesKind = schema.GroupVersionKind{Group: "secondexample", Version: "v1", Kind: "ClusterTestType"} +var clusterTestTypesResource = schema.GroupVersionResource{Group: "secondexample.dev", Version: "v1", Resource: "clustertesttypes"} +var clusterTestTypesKind = schema.GroupVersionKind{Group: "secondexample.dev", Version: "v1", Kind: "ClusterTestType"} type clusterTestTypesClusterClient struct { *kcptesting.Fake diff --git a/examples/pkg/kcp/clients/clientset/versioned/typed/secondexample/v1/fake/testtype.go b/examples/pkg/kcp/clients/clientset/versioned/typed/secondexample/v1/fake/testtype.go index 6d2fc7f62..ba0f59190 100644 --- a/examples/pkg/kcp/clients/clientset/versioned/typed/secondexample/v1/fake/testtype.go +++ b/examples/pkg/kcp/clients/clientset/versioned/typed/secondexample/v1/fake/testtype.go @@ -39,8 +39,8 @@ import ( kcpsecondexamplev1 "acme.corp/pkg/kcp/clients/clientset/versioned/typed/secondexample/v1" ) -var testTypesResource = schema.GroupVersionResource{Group: "secondexample", Version: "v1", Resource: "testtypes"} -var testTypesKind = schema.GroupVersionKind{Group: "secondexample", Version: "v1", Kind: "TestType"} +var testTypesResource = schema.GroupVersionResource{Group: "secondexample.dev", Version: "v1", Resource: "testtypes"} +var testTypesKind = schema.GroupVersionKind{Group: "secondexample.dev", Version: "v1", Kind: "TestType"} type testTypesClusterClient struct { *kcptesting.Fake diff --git a/examples/pkg/kcp/clients/informers/externalversions/generic.go b/examples/pkg/kcp/clients/informers/externalversions/generic.go index ed2034082..eff79f47f 100644 --- a/examples/pkg/kcp/clients/informers/externalversions/generic.go +++ b/examples/pkg/kcp/clients/informers/externalversions/generic.go @@ -100,22 +100,22 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Example3().V1().TestTypes().Informer()}, nil case example3v1.SchemeGroupVersion.WithResource("clustertesttypes"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Example3().V1().ClusterTestTypes().Informer()}, nil - // Group=example, Version=V1 + // Group=example.dev, Version=V1 case examplev1.SchemeGroupVersion.WithResource("testtypes"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Example().V1().TestTypes().Informer()}, nil case examplev1.SchemeGroupVersion.WithResource("clustertesttypes"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Example().V1().ClusterTestTypes().Informer()}, nil - // Group=example, Version=V1alpha1 + // Group=example.dev, Version=V1alpha1 case examplev1alpha1.SchemeGroupVersion.WithResource("testtypes"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Example().V1alpha1().TestTypes().Informer()}, nil case examplev1alpha1.SchemeGroupVersion.WithResource("clustertesttypes"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Example().V1alpha1().ClusterTestTypes().Informer()}, nil - // Group=example, Version=V1beta1 + // Group=example.dev, Version=V1beta1 case examplev1beta1.SchemeGroupVersion.WithResource("testtypes"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Example().V1beta1().TestTypes().Informer()}, nil case examplev1beta1.SchemeGroupVersion.WithResource("clustertesttypes"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Example().V1beta1().ClusterTestTypes().Informer()}, nil - // Group=example, Version=V2 + // Group=example.dev, Version=V2 case examplev2.SchemeGroupVersion.WithResource("testtypes"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Example().V2().TestTypes().Informer()}, nil case examplev2.SchemeGroupVersion.WithResource("clustertesttypes"): @@ -125,7 +125,7 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Existinginterfaces().V1().TestTypes().Informer()}, nil case existinginterfacesv1.SchemeGroupVersion.WithResource("clustertesttypes"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Existinginterfaces().V1().ClusterTestTypes().Informer()}, nil - // Group=secondexample, Version=V1 + // Group=secondexample.dev, Version=V1 case secondexamplev1.SchemeGroupVersion.WithResource("testtypes"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Secondexample().V1().TestTypes().Informer()}, nil case secondexamplev1.SchemeGroupVersion.WithResource("clustertesttypes"): @@ -153,28 +153,28 @@ func (f *sharedScopedInformerFactory) ForResource(resource schema.GroupVersionRe case example3v1.SchemeGroupVersion.WithResource("clustertesttypes"): informer := f.Example3().V1().ClusterTestTypes().Informer() return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil - // Group=example, Version=V1 + // Group=example.dev, Version=V1 case examplev1.SchemeGroupVersion.WithResource("testtypes"): informer := f.Example().V1().TestTypes().Informer() return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil case examplev1.SchemeGroupVersion.WithResource("clustertesttypes"): informer := f.Example().V1().ClusterTestTypes().Informer() return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil - // Group=example, Version=V1alpha1 + // Group=example.dev, Version=V1alpha1 case examplev1alpha1.SchemeGroupVersion.WithResource("testtypes"): informer := f.Example().V1alpha1().TestTypes().Informer() return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil case examplev1alpha1.SchemeGroupVersion.WithResource("clustertesttypes"): informer := f.Example().V1alpha1().ClusterTestTypes().Informer() return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil - // Group=example, Version=V1beta1 + // Group=example.dev, Version=V1beta1 case examplev1beta1.SchemeGroupVersion.WithResource("testtypes"): informer := f.Example().V1beta1().TestTypes().Informer() return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil case examplev1beta1.SchemeGroupVersion.WithResource("clustertesttypes"): informer := f.Example().V1beta1().ClusterTestTypes().Informer() return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil - // Group=example, Version=V2 + // Group=example.dev, Version=V2 case examplev2.SchemeGroupVersion.WithResource("testtypes"): informer := f.Example().V2().TestTypes().Informer() return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil @@ -188,7 +188,7 @@ func (f *sharedScopedInformerFactory) ForResource(resource schema.GroupVersionRe case existinginterfacesv1.SchemeGroupVersion.WithResource("clustertesttypes"): informer := f.Existinginterfaces().V1().ClusterTestTypes().Informer() return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil - // Group=secondexample, Version=V1 + // Group=secondexample.dev, Version=V1 case secondexamplev1.SchemeGroupVersion.WithResource("testtypes"): informer := f.Secondexample().V1().TestTypes().Informer() return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil diff --git a/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1/fake/clustertesttype.go b/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1/fake/clustertesttype.go index 61133c33b..94baccdfa 100644 --- a/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1/fake/clustertesttype.go +++ b/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1/fake/clustertesttype.go @@ -38,8 +38,8 @@ import ( examplev1client "acme.corp/pkg/generated/clientset/versioned/typed/example/v1" ) -var clusterTestTypesResource = schema.GroupVersionResource{Group: "example", Version: "v1", Resource: "clustertesttypes"} -var clusterTestTypesKind = schema.GroupVersionKind{Group: "example", Version: "v1", Kind: "ClusterTestType"} +var clusterTestTypesResource = schema.GroupVersionResource{Group: "example.dev", Version: "v1", Resource: "clustertesttypes"} +var clusterTestTypesKind = schema.GroupVersionKind{Group: "example.dev", Version: "v1", Kind: "ClusterTestType"} type clusterTestTypesClusterClient struct { *kcptesting.Fake diff --git a/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1/fake/testtype.go b/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1/fake/testtype.go index 7122e601d..283e2a973 100644 --- a/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1/fake/testtype.go +++ b/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1/fake/testtype.go @@ -39,8 +39,8 @@ import ( kcpexamplev1 "acme.corp/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1" ) -var testTypesResource = schema.GroupVersionResource{Group: "example", Version: "v1", Resource: "testtypes"} -var testTypesKind = schema.GroupVersionKind{Group: "example", Version: "v1", Kind: "TestType"} +var testTypesResource = schema.GroupVersionResource{Group: "example.dev", Version: "v1", Resource: "testtypes"} +var testTypesKind = schema.GroupVersionKind{Group: "example.dev", Version: "v1", Kind: "TestType"} type testTypesClusterClient struct { *kcptesting.Fake diff --git a/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1/fake/withoutverbtype.go b/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1/fake/withoutverbtype.go index 0d5edd979..6f93450d7 100644 --- a/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1/fake/withoutverbtype.go +++ b/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1/fake/withoutverbtype.go @@ -28,8 +28,8 @@ import ( kcpexamplev1 "acme.corp/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1" ) -var withoutVerbTypesResource = schema.GroupVersionResource{Group: "example", Version: "v1", Resource: "withoutverbtypes"} -var withoutVerbTypesKind = schema.GroupVersionKind{Group: "example", Version: "v1", Kind: "WithoutVerbType"} +var withoutVerbTypesResource = schema.GroupVersionResource{Group: "example.dev", Version: "v1", Resource: "withoutverbtypes"} +var withoutVerbTypesKind = schema.GroupVersionKind{Group: "example.dev", Version: "v1", Kind: "WithoutVerbType"} type withoutVerbTypesClusterClient struct { *kcptesting.Fake diff --git a/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1alpha1/fake/clustertesttype.go b/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1alpha1/fake/clustertesttype.go index c1bbe02d1..fff689735 100644 --- a/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1alpha1/fake/clustertesttype.go +++ b/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1alpha1/fake/clustertesttype.go @@ -38,8 +38,8 @@ import ( examplev1alpha1client "acme.corp/pkg/generated/clientset/versioned/typed/example/v1alpha1" ) -var clusterTestTypesResource = schema.GroupVersionResource{Group: "example", Version: "v1alpha1", Resource: "clustertesttypes"} -var clusterTestTypesKind = schema.GroupVersionKind{Group: "example", Version: "v1alpha1", Kind: "ClusterTestType"} +var clusterTestTypesResource = schema.GroupVersionResource{Group: "example.dev", Version: "v1alpha1", Resource: "clustertesttypes"} +var clusterTestTypesKind = schema.GroupVersionKind{Group: "example.dev", Version: "v1alpha1", Kind: "ClusterTestType"} type clusterTestTypesClusterClient struct { *kcptesting.Fake diff --git a/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1alpha1/fake/testtype.go b/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1alpha1/fake/testtype.go index 090b873ff..582a0ff3f 100644 --- a/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1alpha1/fake/testtype.go +++ b/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1alpha1/fake/testtype.go @@ -39,8 +39,8 @@ import ( kcpexamplev1alpha1 "acme.corp/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1alpha1" ) -var testTypesResource = schema.GroupVersionResource{Group: "example", Version: "v1alpha1", Resource: "testtypes"} -var testTypesKind = schema.GroupVersionKind{Group: "example", Version: "v1alpha1", Kind: "TestType"} +var testTypesResource = schema.GroupVersionResource{Group: "example.dev", Version: "v1alpha1", Resource: "testtypes"} +var testTypesKind = schema.GroupVersionKind{Group: "example.dev", Version: "v1alpha1", Kind: "TestType"} type testTypesClusterClient struct { *kcptesting.Fake diff --git a/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1beta1/fake/clustertesttype.go b/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1beta1/fake/clustertesttype.go index 1fc2574d0..bb282611b 100644 --- a/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1beta1/fake/clustertesttype.go +++ b/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1beta1/fake/clustertesttype.go @@ -38,8 +38,8 @@ import ( examplev1beta1client "acme.corp/pkg/generated/clientset/versioned/typed/example/v1beta1" ) -var clusterTestTypesResource = schema.GroupVersionResource{Group: "example", Version: "v1beta1", Resource: "clustertesttypes"} -var clusterTestTypesKind = schema.GroupVersionKind{Group: "example", Version: "v1beta1", Kind: "ClusterTestType"} +var clusterTestTypesResource = schema.GroupVersionResource{Group: "example.dev", Version: "v1beta1", Resource: "clustertesttypes"} +var clusterTestTypesKind = schema.GroupVersionKind{Group: "example.dev", Version: "v1beta1", Kind: "ClusterTestType"} type clusterTestTypesClusterClient struct { *kcptesting.Fake diff --git a/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1beta1/fake/testtype.go b/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1beta1/fake/testtype.go index 90c28be49..af86c5554 100644 --- a/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1beta1/fake/testtype.go +++ b/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1beta1/fake/testtype.go @@ -39,8 +39,8 @@ import ( kcpexamplev1beta1 "acme.corp/pkg/kcpexisting/clients/clientset/versioned/typed/example/v1beta1" ) -var testTypesResource = schema.GroupVersionResource{Group: "example", Version: "v1beta1", Resource: "testtypes"} -var testTypesKind = schema.GroupVersionKind{Group: "example", Version: "v1beta1", Kind: "TestType"} +var testTypesResource = schema.GroupVersionResource{Group: "example.dev", Version: "v1beta1", Resource: "testtypes"} +var testTypesKind = schema.GroupVersionKind{Group: "example.dev", Version: "v1beta1", Kind: "TestType"} type testTypesClusterClient struct { *kcptesting.Fake diff --git a/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v2/fake/clustertesttype.go b/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v2/fake/clustertesttype.go index 6079c9744..7e3cf4cb4 100644 --- a/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v2/fake/clustertesttype.go +++ b/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v2/fake/clustertesttype.go @@ -38,8 +38,8 @@ import ( examplev2client "acme.corp/pkg/generated/clientset/versioned/typed/example/v2" ) -var clusterTestTypesResource = schema.GroupVersionResource{Group: "example", Version: "v2", Resource: "clustertesttypes"} -var clusterTestTypesKind = schema.GroupVersionKind{Group: "example", Version: "v2", Kind: "ClusterTestType"} +var clusterTestTypesResource = schema.GroupVersionResource{Group: "example.dev", Version: "v2", Resource: "clustertesttypes"} +var clusterTestTypesKind = schema.GroupVersionKind{Group: "example.dev", Version: "v2", Kind: "ClusterTestType"} type clusterTestTypesClusterClient struct { *kcptesting.Fake diff --git a/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v2/fake/testtype.go b/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v2/fake/testtype.go index e757239fc..73b2333a1 100644 --- a/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v2/fake/testtype.go +++ b/examples/pkg/kcpexisting/clients/clientset/versioned/typed/example/v2/fake/testtype.go @@ -39,8 +39,8 @@ import ( kcpexamplev2 "acme.corp/pkg/kcpexisting/clients/clientset/versioned/typed/example/v2" ) -var testTypesResource = schema.GroupVersionResource{Group: "example", Version: "v2", Resource: "testtypes"} -var testTypesKind = schema.GroupVersionKind{Group: "example", Version: "v2", Kind: "TestType"} +var testTypesResource = schema.GroupVersionResource{Group: "example.dev", Version: "v2", Resource: "testtypes"} +var testTypesKind = schema.GroupVersionKind{Group: "example.dev", Version: "v2", Kind: "TestType"} type testTypesClusterClient struct { *kcptesting.Fake diff --git a/examples/pkg/kcpexisting/clients/clientset/versioned/typed/secondexample/v1/fake/clustertesttype.go b/examples/pkg/kcpexisting/clients/clientset/versioned/typed/secondexample/v1/fake/clustertesttype.go index 0709c5b90..eae881b2b 100644 --- a/examples/pkg/kcpexisting/clients/clientset/versioned/typed/secondexample/v1/fake/clustertesttype.go +++ b/examples/pkg/kcpexisting/clients/clientset/versioned/typed/secondexample/v1/fake/clustertesttype.go @@ -38,8 +38,8 @@ import ( secondexamplev1client "acme.corp/pkg/generated/clientset/versioned/typed/secondexample/v1" ) -var clusterTestTypesResource = schema.GroupVersionResource{Group: "secondexample", Version: "v1", Resource: "clustertesttypes"} -var clusterTestTypesKind = schema.GroupVersionKind{Group: "secondexample", Version: "v1", Kind: "ClusterTestType"} +var clusterTestTypesResource = schema.GroupVersionResource{Group: "secondexample.dev", Version: "v1", Resource: "clustertesttypes"} +var clusterTestTypesKind = schema.GroupVersionKind{Group: "secondexample.dev", Version: "v1", Kind: "ClusterTestType"} type clusterTestTypesClusterClient struct { *kcptesting.Fake diff --git a/examples/pkg/kcpexisting/clients/clientset/versioned/typed/secondexample/v1/fake/testtype.go b/examples/pkg/kcpexisting/clients/clientset/versioned/typed/secondexample/v1/fake/testtype.go index 72b7192c3..57a0f8f63 100644 --- a/examples/pkg/kcpexisting/clients/clientset/versioned/typed/secondexample/v1/fake/testtype.go +++ b/examples/pkg/kcpexisting/clients/clientset/versioned/typed/secondexample/v1/fake/testtype.go @@ -39,8 +39,8 @@ import ( kcpsecondexamplev1 "acme.corp/pkg/kcpexisting/clients/clientset/versioned/typed/secondexample/v1" ) -var testTypesResource = schema.GroupVersionResource{Group: "secondexample", Version: "v1", Resource: "testtypes"} -var testTypesKind = schema.GroupVersionKind{Group: "secondexample", Version: "v1", Kind: "TestType"} +var testTypesResource = schema.GroupVersionResource{Group: "secondexample.dev", Version: "v1", Resource: "testtypes"} +var testTypesKind = schema.GroupVersionKind{Group: "secondexample.dev", Version: "v1", Kind: "TestType"} type testTypesClusterClient struct { *kcptesting.Fake diff --git a/examples/pkg/kcpexisting/clients/informers/externalversions/generic.go b/examples/pkg/kcpexisting/clients/informers/externalversions/generic.go index 611135eca..18fcd2e98 100644 --- a/examples/pkg/kcpexisting/clients/informers/externalversions/generic.go +++ b/examples/pkg/kcpexisting/clients/informers/externalversions/generic.go @@ -96,22 +96,22 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Example3().V1().TestTypes().Informer()}, nil case example3v1.SchemeGroupVersion.WithResource("clustertesttypes"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Example3().V1().ClusterTestTypes().Informer()}, nil - // Group=example, Version=V1 + // Group=example.dev, Version=V1 case examplev1.SchemeGroupVersion.WithResource("testtypes"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Example().V1().TestTypes().Informer()}, nil case examplev1.SchemeGroupVersion.WithResource("clustertesttypes"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Example().V1().ClusterTestTypes().Informer()}, nil - // Group=example, Version=V1alpha1 + // Group=example.dev, Version=V1alpha1 case examplev1alpha1.SchemeGroupVersion.WithResource("testtypes"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Example().V1alpha1().TestTypes().Informer()}, nil case examplev1alpha1.SchemeGroupVersion.WithResource("clustertesttypes"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Example().V1alpha1().ClusterTestTypes().Informer()}, nil - // Group=example, Version=V1beta1 + // Group=example.dev, Version=V1beta1 case examplev1beta1.SchemeGroupVersion.WithResource("testtypes"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Example().V1beta1().TestTypes().Informer()}, nil case examplev1beta1.SchemeGroupVersion.WithResource("clustertesttypes"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Example().V1beta1().ClusterTestTypes().Informer()}, nil - // Group=example, Version=V2 + // Group=example.dev, Version=V2 case examplev2.SchemeGroupVersion.WithResource("testtypes"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Example().V2().TestTypes().Informer()}, nil case examplev2.SchemeGroupVersion.WithResource("clustertesttypes"): @@ -121,7 +121,7 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Existinginterfaces().V1().TestTypes().Informer()}, nil case existinginterfacesv1.SchemeGroupVersion.WithResource("clustertesttypes"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Existinginterfaces().V1().ClusterTestTypes().Informer()}, nil - // Group=secondexample, Version=V1 + // Group=secondexample.dev, Version=V1 case secondexamplev1.SchemeGroupVersion.WithResource("testtypes"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Secondexample().V1().TestTypes().Informer()}, nil case secondexamplev1.SchemeGroupVersion.WithResource("clustertesttypes"): diff --git a/examples/test/kcp/controller_test.go b/examples/test/kcp/controller_test.go new file mode 100644 index 000000000..ff02ff41d --- /dev/null +++ b/examples/test/kcp/controller_test.go @@ -0,0 +1,101 @@ +/* +Copyright 2025 The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kcp + +import ( + "context" + "testing" + "time" + + "github.com/kcp-dev/logicalcluster/v3" + + clienttesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/tools/cache" + + examplev1 "acme.corp/pkg/apis/example/v1" + "acme.corp/pkg/kcp/clients/clientset/versioned/fake" + informers "acme.corp/pkg/kcp/clients/informers/externalversions" +) + +// TestFakeClient demonstrates how to use a fake client with SharedInformerFactory in tests. +func TestFakeClient(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + watcherStarted := make(chan struct{}) + // Create the fake client. + client := fake.NewSimpleClientset() + // A catch-all watch reactor that allows us to inject the watcherStarted channel. + client.PrependWatchReactor("*", func(action clienttesting.Action) (handled bool, ret watch.Interface, err error) { + gvr := action.GetResource() + ns := action.GetNamespace() + watch, err := client.Tracker().Watch(gvr, ns) + if err != nil { + return false, nil, err + } + close(watcherStarted) + return true, watch, nil + }) + + // We will create an informer that writes added testTypes to a channel. + testTypes := make(chan *examplev1.TestType, 1) + informerFactory := informers.NewSharedInformerFactory(client, 0) + testTypeInformer := informerFactory.Example().V1().TestTypes().Informer() + if _, err := testTypeInformer.AddEventHandler(&cache.ResourceEventHandlerFuncs{ + AddFunc: func(obj interface{}) { + testType := obj.(*examplev1.TestType) + t.Logf("testType added: %s/%s", testType.Namespace, testType.Name) + testTypes <- testType + }, + }); err != nil { + t.Fatalf("Failed to add event handler: %v", err) + } + + // Make sure informers are running. + informerFactory.Cluster(logicalcluster.Name("root")).Start(ctx.Done()) + + // This is not required in tests, but it serves as a proof-of-concept by + // ensuring that the informer goroutine have warmed up and called List before + // we send any events to it. + cache.WaitForCacheSync(ctx.Done(), testTypeInformer.HasSynced) + + // The fake client doesn't support resource version. Any writes to the client + // after the informer's initial LIST and before the informer establishing the + // watcher will be missed by the informer. Therefore we wait until the watcher + // starts. + // Note that the fake client isn't designed to work with informer. It + // doesn't support resource version. It's encouraged to use a real client + // in an integration/E2E test if you need to test complex behavior with + // informer/controllers. + <-watcherStarted + // Inject an event into the fake client. + p := &examplev1.TestType{ObjectMeta: metav1.ObjectMeta{Name: "my-testobj"}} + _, err := client.ExampleV1().TestTypes().Cluster(logicalcluster.NewPath("root")).Namespace("test-ns").Create(ctx, p, metav1.CreateOptions{}) + if err != nil { + t.Fatalf("error injecting testType add: %v", err) + } + + select { + case testType := <-testTypes: + t.Logf("Got testType from channel: %s/%s", testType.Namespace, testType.Name) + case <-time.After(wait.ForeverTestTimeout): + t.Error("Informer did not get the added testType") + } +} diff --git a/examples/test/kcpexisting/controller_test.go b/examples/test/kcpexisting/controller_test.go new file mode 100644 index 000000000..4b9005bcf --- /dev/null +++ b/examples/test/kcpexisting/controller_test.go @@ -0,0 +1,101 @@ +/* +Copyright 2025 The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package kcpexisting + +import ( + "context" + "testing" + "time" + + "github.com/kcp-dev/logicalcluster/v3" + + clienttesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/tools/cache" + + examplev1 "acme.corp/pkg/apis/example/v1" + "acme.corp/pkg/kcpexisting/clients/clientset/versioned/fake" + informers "acme.corp/pkg/kcpexisting/clients/informers/externalversions" +) + +// TestFakeClient demonstrates how to use a fake client with SharedInformerFactory in tests. +func TestFakeClient(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + watcherStarted := make(chan struct{}) + // Create the fake client. + client := fake.NewSimpleClientset() + // A catch-all watch reactor that allows us to inject the watcherStarted channel. + client.PrependWatchReactor("*", func(action clienttesting.Action) (handled bool, ret watch.Interface, err error) { + gvr := action.GetResource() + ns := action.GetNamespace() + watch, err := client.Tracker().Watch(gvr, ns) + if err != nil { + return false, nil, err + } + close(watcherStarted) + return true, watch, nil + }) + + // We will create an informer that writes added testTypes to a channel. + testTypes := make(chan *examplev1.TestType, 1) + informerFactory := informers.NewSharedInformerFactory(client, 0) + testTypeInformer := informerFactory.Example().V1().TestTypes().Informer() + if _, err := testTypeInformer.AddEventHandler(&cache.ResourceEventHandlerFuncs{ + AddFunc: func(obj interface{}) { + testType := obj.(*examplev1.TestType) + t.Logf("testType added: %s/%s", testType.Namespace, testType.Name) + testTypes <- testType + }, + }); err != nil { + t.Fatalf("Failed to add event handler: %v", err) + } + + // Make sure informers are running. + informerFactory.Cluster(logicalcluster.Name("root")).Start(ctx.Done()) + + // This is not required in tests, but it serves as a proof-of-concept by + // ensuring that the informer goroutine have warmed up and called List before + // we send any events to it. + cache.WaitForCacheSync(ctx.Done(), testTypeInformer.HasSynced) + + // The fake client doesn't support resource version. Any writes to the client + // after the informer's initial LIST and before the informer establishing the + // watcher will be missed by the informer. Therefore we wait until the watcher + // starts. + // Note that the fake client isn't designed to work with informer. It + // doesn't support resource version. It's encouraged to use a real client + // in an integration/E2E test if you need to test complex behavior with + // informer/controllers. + <-watcherStarted + // Inject an event into the fake client. + p := &examplev1.TestType{ObjectMeta: metav1.ObjectMeta{Name: "my-testobj"}} + _, err := client.ExampleV1().TestTypes().Cluster(logicalcluster.NewPath("root")).Namespace("test-ns").Create(ctx, p, metav1.CreateOptions{}) + if err != nil { + t.Fatalf("error injecting testType add: %v", err) + } + + select { + case testType := <-testTypes: + t.Logf("Got testType from channel: %s/%s", testType.Namespace, testType.Name) + case <-time.After(wait.ForeverTestTimeout): + t.Error("Informer did not get the added testType") + } +} diff --git a/examples/test/singlecluster/controller_test.go b/examples/test/singlecluster/controller_test.go new file mode 100644 index 000000000..583c73e10 --- /dev/null +++ b/examples/test/singlecluster/controller_test.go @@ -0,0 +1,99 @@ +/* +Copyright 2025 The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package singlecluster + +import ( + "context" + "testing" + "time" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apimachinery/pkg/watch" + clienttesting "k8s.io/client-go/testing" + "k8s.io/client-go/tools/cache" + + examplev1 "acme.corp/pkg/apis/example/v1" + "acme.corp/pkg/generated/clientset/versioned/fake" + informers "acme.corp/pkg/generated/informers/externalversions" +) + +// TestFakeClient demonstrates how to use a fake client with SharedInformerFactory in tests. +func TestFakeClient(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + watcherStarted := make(chan struct{}) + // Create the fake client. + client := fake.NewSimpleClientset() + // A catch-all watch reactor that allows us to inject the watcherStarted channel. + client.PrependWatchReactor("*", func(action clienttesting.Action) (handled bool, ret watch.Interface, err error) { + gvr := action.GetResource() + ns := action.GetNamespace() + watch, err := client.Tracker().Watch(gvr, ns) + if err != nil { + return false, nil, err + } + close(watcherStarted) + return true, watch, nil + }) + + // We will create an informer that writes added testTypes to a channel. + testTypes := make(chan *examplev1.TestType, 1) + informerFactory := informers.NewSharedInformerFactory(client, 0) + testTypeInformer := informerFactory.Example().V1().TestTypes().Informer() + if _, err := testTypeInformer.AddEventHandler(&cache.ResourceEventHandlerFuncs{ + AddFunc: func(obj interface{}) { + testType := obj.(*examplev1.TestType) + t.Logf("testType added: %s/%s", testType.Namespace, testType.Name) + testTypes <- testType + }, + }); err != nil { + t.Fatalf("Failed to add event handler: %v", err) + } + + // Make sure informers are running. + informerFactory.Start(ctx.Done()) + + // This is not required in tests, but it serves as a proof-of-concept by + // ensuring that the informer goroutine have warmed up and called List before + // we send any events to it. + cache.WaitForCacheSync(ctx.Done(), testTypeInformer.HasSynced) + + // The fake client doesn't support resource version. Any writes to the client + // after the informer's initial LIST and before the informer establishing the + // watcher will be missed by the informer. Therefore we wait until the watcher + // starts. + // Note that the fake client isn't designed to work with informer. It + // doesn't support resource version. It's encouraged to use a real client + // in an integration/E2E test if you need to test complex behavior with + // informer/controllers. + <-watcherStarted + // Inject an event into the fake client. + p := &examplev1.TestType{ObjectMeta: metav1.ObjectMeta{Name: "my-testobj"}} + _, err := client.ExampleV1().TestTypes("test-ns").Create(ctx, p, metav1.CreateOptions{}) + if err != nil { + t.Fatalf("error injecting testType add: %v", err) + } + + select { + case testType := <-testTypes: + t.Logf("Got testType from channel: %s/%s", testType.Namespace, testType.Name) + case <-time.After(wait.ForeverTestTimeout): + t.Error("Informer did not get the added testType") + } +} diff --git a/go.mod b/go.mod index 6a1351d4c..f8d426ebf 100644 --- a/go.mod +++ b/go.mod @@ -4,34 +4,33 @@ go 1.23.0 require ( github.com/onsi/ginkgo v1.16.5 - github.com/onsi/gomega v1.35.1 - github.com/spf13/cobra v1.8.1 - github.com/spf13/pflag v1.0.5 - golang.org/x/text v0.21.0 - golang.org/x/tools v0.29.0 - k8s.io/apimachinery v0.32.0 - k8s.io/code-generator v0.32.0 - k8s.io/gengo/v2 v2.0.0-20250106234829-0359904fc2a6 + github.com/onsi/gomega v1.36.2 + github.com/spf13/cobra v1.9.1 + github.com/spf13/pflag v1.0.6 + golang.org/x/text v0.24.0 + golang.org/x/tools v0.32.0 + k8s.io/apimachinery v0.32.3 + k8s.io/code-generator v0.32.3 + k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 k8s.io/klog/v2 v2.130.1 - sigs.k8s.io/controller-tools v0.16.1 + sigs.k8s.io/controller-tools v0.17.3 ) require ( - github.com/fatih/color v1.17.0 // indirect + github.com/fatih/color v1.18.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-logr/logr v1.4.2 // indirect - github.com/google/go-cmp v0.6.0 // indirect + github.com/google/go-cmp v0.7.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/nxadm/tail v1.4.8 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect - golang.org/x/mod v0.22.0 // indirect - golang.org/x/net v0.34.0 // indirect - golang.org/x/sync v0.10.0 // indirect - golang.org/x/sys v0.29.0 // indirect - google.golang.org/protobuf v1.36.2 // indirect + golang.org/x/mod v0.24.0 // indirect + golang.org/x/net v0.39.0 // indirect + golang.org/x/sync v0.13.0 // indirect + golang.org/x/sys v0.32.0 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index 48536a804..fab425244 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,9 @@ -github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= 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/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= -github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= +github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= +github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= 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.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= @@ -24,10 +24,10 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw 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.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db h1:097atOisP2aRj7vFgYQBbFN4U4JNXUNYpxael3UzMyo= -github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad h1:a6HEuzUHeKH6hwfN/ZoQgRgVIWFJljSWa/zetS2WTvg= +github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= @@ -50,22 +50,22 @@ 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.21.0 h1:7rg/4f3rB88pb5obDgNZrNHrQ4e6WpjonchcpuBRnZM= -github.com/onsi/ginkgo/v2 v2.21.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= +github.com/onsi/ginkgo/v2 v2.22.1 h1:QW7tbJAUDyVDVOM5dFa7qaybo+CRfR7bemlQUN6Z8aM= +github.com/onsi/ginkgo/v2 v2.22.1/go.mod h1:S6aTpoRsSq2cZOd+pssHAlKW/Q/jZt6cPrPlnj4a1xM= 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.35.1 h1:Cwbd75ZBPxFSuZ6T+rN/WCb/gOc6YgFBXLlZLhC7Ds4= -github.com/onsi/gomega v1.35.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= +github.com/onsi/gomega v1.36.2 h1:koNYke6TVk6ZmnyHrCXba/T/MoLBXFjeC1PtvYgw0A8= +github.com/onsi/gomega v1.36.2/go.mod h1:DdwyADRjrc825LhMEkD76cHR5+pUnjhUN8GlHlRPHzY= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= -github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= +github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= +github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= +github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -73,20 +73,20 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk 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/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= -golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= +golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= -golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= +golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY= +golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/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-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= -golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610= +golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/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-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -98,17 +98,17 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= -golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= -golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE= -golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588= +golang.org/x/tools v0.32.0 h1:Q7N1vhpkQv7ybVzLFtTjvQya2ewbwNDZzUgfXGqtMWU= +golang.org/x/tools v0.32.0/go.mod h1:ZxrU41P/wAbZD8EDa6dDCa6XfpkhJ7HFMjHJXfBDu8s= 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= @@ -119,8 +119,8 @@ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQ google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.36.2 h1:R8FeyR1/eLmkutZOM5CWghmo5itiG9z0ktFlTVLuTmU= -google.golang.org/protobuf v1.36.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.1 h1:yBPeRvTftaleIgM3PZ/WBIZ7XM/eEYAaEyCwvyjq/gk= +google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= @@ -134,13 +134,13 @@ 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.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/apimachinery v0.32.0 h1:cFSE7N3rmEEtv4ei5X6DaJPHHX0C+upp+v5lVPiEwpg= -k8s.io/apimachinery v0.32.0/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= -k8s.io/code-generator v0.32.0 h1:s0lNN8VSWny8LBz5t5iy7MCdgwdOhdg7vAGVxvS+VWU= -k8s.io/code-generator v0.32.0/go.mod h1:b7Q7KMZkvsYFy72A79QYjiv4aTz3GvW0f1T3UfhFq4s= -k8s.io/gengo/v2 v2.0.0-20250106234829-0359904fc2a6 h1:SdzkGIk4b5LFkVO36PuO0Bx4tpBDJDpNN0F1/v8JM5c= -k8s.io/gengo/v2 v2.0.0-20250106234829-0359904fc2a6/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= +k8s.io/apimachinery v0.32.3 h1:JmDuDarhDmA/Li7j3aPrwhpNBA94Nvk5zLeOge9HH1U= +k8s.io/apimachinery v0.32.3/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= +k8s.io/code-generator v0.32.3 h1:31p2TVzC9+hVdSkAFruAk3JY+iSfzrJ83Qij1yZutyw= +k8s.io/code-generator v0.32.3/go.mod h1:+mbiYID5NLsBuqxjQTygKM/DAdKpAjvBzrJd64NU1G8= +k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 h1:si3PfKm8dDYxgfbeA6orqrtLkvvIeH8UqffFJDl0bz4= +k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -sigs.k8s.io/controller-tools v0.16.1 h1:gvIsZm+2aimFDIBiDKumR7EBkc+oLxljoUVfRbDI6RI= -sigs.k8s.io/controller-tools v0.16.1/go.mod h1:0I0xqjR65YTfoO12iR+mZR6s6UAVcUARgXRlsu0ljB0= +sigs.k8s.io/controller-tools v0.17.3 h1:lwFPLicpBKLgIepah+c8ikRBubFW5kOQyT88r3EwfNw= +sigs.k8s.io/controller-tools v0.17.3/go.mod h1:1ii+oXcYZkxcBXzwv3YZBlzjt1fvkrCGjVF73blosJI=